]> gcc.gnu.org Git - gcc.git/commitdiff
regclass.c (globalize_reg): Update regs_invalidated_by_call.
authorRichard Henderson <rth@gcc.gnu.org>
Sun, 16 Jun 2002 21:52:45 +0000 (14:52 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 16 Jun 2002 21:52:45 +0000 (14:52 -0700)
        * regclass.c (globalize_reg): Update regs_invalidated_by_call.
* gcc.dg/20020616-1.c: New.

From-SVN: r54681

gcc/ChangeLog
gcc/regclass.c
gcc/testsuite/gcc.dg/20020616-1.c [new file with mode: 0644]

index 72678e57e02b651145e97d8543aa72f47190124c..6ea3f3fc371030ea24348d91b30ef9e10d418ce7 100644 (file)
@@ -1,14 +1,19 @@
+2002-06-16  Richard Henderson  <rth@redhat.com>
+
+       PR opt/6722
+       * regclass.c (globalize_reg): Update regs_invalidated_by_call.
+
 2002-06-16  Neil Booth  <neil@daikokuya.demon.co.uk>
 
-       * config.gcc: Add an i386/sysv4-cpp.h.  Remove i386-aout.h from
-       vxworks.
-config/i386:
-       * i386-aout.h, i386elf.h, sysv4.h: Remove CPP_PREDEFINES.
-       * linux64.h: Use TARGET_OS_CPP_BUILTINS rather than
+       * config.gcc: Add i386/sysv4-cpp.h; remove i386-aout.h from vxworks.
+       * config/i386/i386-aout.h, config/i386/i386elf.h,
+       config/i386/sysv4.h: Remove CPP_PREDEFINES.
+       * config/i386/linux64.h, config/i386/i386elf.h, config/i386/mach.h,
+       config/i386/netware.h, config/i386/rtemself.h, config/i386/sco5.h,
+       config/i386/sol2.h, config/i386/vsta.h, config/i386/vxi386.h,
+       config/i386/win32.h: Use TARGET_OS_CPP_BUILTINS rather than
        CPP_PREDEFINES and part of CPP_SPEC.
-       i386elf.h, mach.h, netware.h, rtemself.h, sco5.h, sol2.h,
-       vsta.h, vxi386.h, win32.h: Similarly.
-       * sysv4-cpp.h: New.
+       * config/i386/sysv4-cpp.h: New.
 
 2002-06-16  Richard Henderson  <rth@redhat.com>
 
index 6a7acb9793da317015cf5dc635766ac3ebc532fb..84bf97f21db6fed042bc0a3250dea9b4fb075227 100644 (file)
@@ -824,6 +824,7 @@ globalize_reg (i)
   SET_HARD_REG_BIT (fixed_reg_set, i);
   SET_HARD_REG_BIT (call_used_reg_set, i);
   SET_HARD_REG_BIT (call_fixed_reg_set, i);
+  SET_HARD_REG_BIT (regs_invalidated_by_call, i);
 }
 \f
 /* Now the data and code for the `regclass' pass, which happens
diff --git a/gcc/testsuite/gcc.dg/20020616-1.c b/gcc/testsuite/gcc.dg/20020616-1.c
new file mode 100644 (file)
index 0000000..4630664
--- /dev/null
@@ -0,0 +1,29 @@
+/* PR opt/6722 */
+/* { dg-do run { target i?86-*-* } } */
+/* { dg-options "-O2" } */
+
+register int k asm("%ebx");
+
+void __attribute__((noinline))
+foo()
+{
+  k = 1;
+}
+
+void test()
+{
+  int i;
+  for (i = 0; i < 10; i += k)
+    {
+      k = 0;
+      foo();
+    }
+}
+
+int main()
+{
+  int old = k;
+  test();
+  k = old;
+  return 0;
+}
This page took 0.17079 seconds and 5 git commands to generate.