Add a testcase for PR bootstrap/66978
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 24 Jul 2015 12:08:00 +0000 (12:08 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 24 Jul 2015 12:08:00 +0000 (05:08 -0700)
PR bootstrap/66978
* gcc.target/i386/pr66978.c: New test.

From-SVN: r226150

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr66978.c [new file with mode: 0644]

index 72955da88ee6d8f92eff8f258f3edcecef42a66c..3e8c2d2d82f8254b7901521d60a118f9f9e00755 100644 (file)
@@ -1,3 +1,8 @@
+2015-07-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR bootstrap/66978
+       * gcc.target/i386/pr66978.c: New test.
+
 2015-07-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        * gcc.target/s390/gpr2fprsavecfi.c: New test.
diff --git a/gcc/testsuite/gcc.target/i386/pr66978.c b/gcc/testsuite/gcc.target/i386/pr66978.c
new file mode 100644 (file)
index 0000000..7e4a631
--- /dev/null
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mx32 -maddress-mode=short" } */
+
+extern int foo (int *);
+int
+bar (int *p)
+{
+  __attribute__ ((noinline, noclone))
+  int hack_digit (void)
+    {
+      return foo (p);
+    }
+  return hack_digit ();
+}