re PR target/52530 (Many 64-bit execution failures on Solaris 10/11 with Sun as)
authorUros Bizjak <ubizjak@gmail.com>
Sun, 11 Mar 2012 19:47:58 +0000 (20:47 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sun, 11 Mar 2012 19:47:58 +0000 (20:47 +0100)
PR target/52530
* gcc.dg/torture/pr52530.c: New test.

From-SVN: r185201

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr52530.c [new file with mode: 0644]

index a9a31200b0304bfbd7d4b9734738fde0ae01be6d..cb5afed9926fcc900dda41f937926b108d266807 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/52530
+       * gcc.dg/torture/pr52530.c: New test.
+
 2012-03-11  Oleg Endo  <olegendo@gcc.gnu.org>
 
        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 (file)
index 0000000..d32ea82
--- /dev/null
@@ -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;
+}