+2008-07-17 Paolo Bonzini <bonzini@gnu.org>
+
+ PR rtl-optimization/36753
+ * fwprop.c (use_killed_between): Don't shortcut
+ single-definition global registers.
+
2008-07-16 Jan Hubicka <jh@suse.cz>
* cgraph.h (varpool_empty_needed_queue): Declare.
return true;
/* Check if the reg in USE has only one definition. We already
- know that this definition reaches use, or we wouldn't be here. */
+ know that this definition reaches use, or we wouldn't be here.
+ However, this is invalid for hard registers because if they are
+ live at the beginning of the function it does not mean that we
+ have an uninitialized access. */
regno = DF_REF_REGNO (use);
def = DF_REG_DEF_CHAIN (regno);
- if (def && (def->next_reg == NULL))
+ if (def
+ && def->next_reg == NULL
+ && regno >= FIRST_PSEUDO_REGISTER)
return false;
/* Check locally if we are in the same basic block. */
+2008-07-17 Paolo Bonzini <bonzini@gnu.org>
+
+ PR rtl-optimization/36753
+ * gcc.target/i386/pr36753.c: New.
+
2008-07-17 Tobias Burnus <burnus@net-b.de>
PR fortran/36825
--- /dev/null
+/* { dg-options "-O2" } */
+/* { dg-do run } */
+
+#if defined __i386__
+#define REG "edi"
+#else
+#define REG "r14"
+#endif
+
+register unsigned long *ds asm(REG);
+
+extern void abort (void);
+
+__attribute__ ((noinline)) void
+test (void)
+{
+ *++ds = 31337;
+}
+
+int
+main ()
+{
+ unsigned long stack[2];
+ stack[0] = 0;
+ stack[1] = 0;
+ ds = stack;
+ test ();
+ if (ds != stack + 1 || *ds != 31337)
+ abort ();
+ return 0;
+}