Add a testcase for PR target/63534
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 25 Nov 2014 21:07:43 +0000 (21:07 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Tue, 25 Nov 2014 21:07:43 +0000 (13:07 -0800)
PR target/63534
* gcc.target/i386/pr63534.c: New test.

From-SVN: r218062

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

index 1c17f23af0708d76d5f98cb2d78f1651bd7da219..e0f444113458f7e564e0e6eb566f166a91eb7ebc 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/63534
+       * gcc.target/i386/pr63534.c: New test.
+
 2014-11-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/63527
diff --git a/gcc/testsuite/gcc.target/i386/pr63534.c b/gcc/testsuite/gcc.target/i386/pr63534.c
new file mode 100644 (file)
index 0000000..39dd8c1
--- /dev/null
@@ -0,0 +1,15 @@
+/* PR target/pr63534 */
+/* { dg-do compile { target { ia32 && fpic } } } */
+/* { dg-options "-O2 -fPIC" } */
+
+extern void bar (void);
+
+void
+foo (void)
+{
+  bar ();
+  bar ();
+}
+
+/* We shouldn't load EBX again.  */
+/* { dg-final { scan-assembler-not "movl\[ \t\]%\[^,\]+, %ebx" } } */