diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-19 18:58:02 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-19 18:58:02 +0000 |
commit | 8c1094a62cdc4bf69447af40b0780c6b4ba5492e (patch) | |
tree | ef8d3b826fee39c7f1f196a3aa6ebd16183d1bd6 /libmudflap | |
parent | 042161e83fb9a7e7038f6cb4ac0d3cfaacad4b92 (diff) | |
download | gcc-8c1094a62cdc4bf69447af40b0780c6b4ba5492e.tar.gz |
PR libmudflap/40778
* tree-mudflap.c (mf_artificial): New function.
(execute_mudflap_function_ops, execute_mudflap_function_decls,
mx_register_decls, mudflap_enqueue_decl): Use it.
* testsuite/libmudflap.c/fail68-frag.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183307 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libmudflap')
-rw-r--r-- | libmudflap/ChangeLog | 5 | ||||
-rw-r--r-- | libmudflap/testsuite/libmudflap.c/fail68-frag.c | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/libmudflap/ChangeLog b/libmudflap/ChangeLog index edcfb199599..3d3e5af21a9 100644 --- a/libmudflap/ChangeLog +++ b/libmudflap/ChangeLog @@ -1,3 +1,8 @@ +2012-01-19 Jakub Jelinek <jakub@redhat.com> + + PR libmudflap/40778 + * testsuite/libmudflap.c/fail68-frag.c: New test. + 2012-01-01 Jakub Jelinek <jakub@redhat.com> * mf-runtime.c (__mf_usage): Update copyright notice dates. diff --git a/libmudflap/testsuite/libmudflap.c/fail68-frag.c b/libmudflap/testsuite/libmudflap.c/fail68-frag.c new file mode 100644 index 00000000000..7b2f8cf2cb0 --- /dev/null +++ b/libmudflap/testsuite/libmudflap.c/fail68-frag.c @@ -0,0 +1,27 @@ +/* PR libmudflap/40778 */ + +char p[32]; +static int j; + +__attribute__((noinline)) +static void foo (int i) +{ + if (j++ == 0) + p[i + 4] = 12; + else + p[i - 4] = 13; +} + +int +main () +{ + foo (30); + foo (30); + foo (30); + return 0; +} + +/* { dg-output "mudflap violation 1.*" } */ +/* { dg-output "Nearby object 1.*" } */ +/* { dg-output "mudflap object.*name.*p" } */ +/* { dg-do run { xfail *-*-* } } */ |