From: Uros Bizjak Date: Sun, 11 Mar 2012 19:47:58 +0000 (+0100) Subject: re PR target/52530 (Many 64-bit execution failures on Solaris 10/11 with Sun as) X-Git-Tag: misc/gccgo-go1_1_2~4072 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bddc10b6363e76276ceab3244d04435a8941cd49;p=thirdparty%2Fgcc.git re PR target/52530 (Many 64-bit execution failures on Solaris 10/11 with Sun as) PR target/52530 * gcc.dg/torture/pr52530.c: New test. From-SVN: r185201 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a9a31200b030..cb5afed9926f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-03-11 Uros Bizjak + + PR target/52530 + * gcc.dg/torture/pr52530.c: New test. + 2012-03-11 Oleg Endo PR target/51244 diff --git a/gcc/testsuite/gcc.dg/torture/pr52530.c b/gcc/testsuite/gcc.dg/torture/pr52530.c new file mode 100644 index 000000000000..d32ea828cb5f --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr52530.c @@ -0,0 +1,30 @@ +/* { dg-do run } */ + +extern void abort (void); + +struct foo +{ + int *f; + int i; +}; + +int baz; + +void __attribute__ ((noinline)) +bar (struct foo x) +{ + *(x.f) = x.i; +} + +int +main () +{ + struct foo x = { &baz, 0xdeadbeef }; + + bar (x); + + if (baz != 0xdeadbeef) + abort (); + + return 0; +}