]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2009-04-29 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Apr 2009 10:39:26 +0000 (10:39 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 29 Apr 2009 10:39:26 +0000 (10:39 +0000)
PR tree-optimization/39941
* tree-ssa-pre.c (eliminate): Schedule update-ssa after
eliminating an indirect call.

* gcc.c-torture/compile/pr39941.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146948 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr39941.c [new file with mode: 0644]
gcc/tree-ssa-pre.c

index a6e64b92fd2b36c33f5529ba6c05dd38d2939329..149e083d967f172e0c53bec0e66b32924d9659d2 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-29  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/39941
+       * tree-ssa-pre.c (eliminate): Schedule update-ssa after
+       eliminating an indirect call.
+
 2009-04-29  Richard Guenther  <rguenther@suse.de>
 
        * tree-cfg.c (verify_types_in_gimple_reference): Add require_lvalue
index bd54a302f243eebefef30332458b5f12642d3da4..4533e4b1a332305976a4b589d554fd60d4cac7ac 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-29  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/39941
+       * gcc.c-torture/compile/pr39941.c: New testcase.
+
 2009-04-29  Bernd Schmidt  <bernd.schmidt@analog.com>
 
        * gcc.target/bfin/20090411-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39941.c b/gcc/testsuite/gcc.c-torture/compile/pr39941.c
new file mode 100644 (file)
index 0000000..b620908
--- /dev/null
@@ -0,0 +1,12 @@
+typedef void (*entry_func) (void) __attribute__ ((noreturn));
+extern entry_func entry_addr;
+static void bsd_boot_entry (void)
+{
+  stop ();
+}   
+void bsd_boot (void)
+{
+  entry_addr = (entry_func) bsd_boot_entry;
+  (*entry_addr) ();
+}
+
index 61207b2f849cac043d12ea5238cd4276551ddaeb..11b88eddc36ac8f2d7f7b7b56c81332277c0d51b 100644 (file)
@@ -4131,6 +4131,11 @@ eliminate (void)
                  update_stmt (stmt);
                  if (maybe_clean_or_replace_eh_stmt (stmt, stmt))
                    gimple_purge_dead_eh_edges (b);
+
+                 /* Changing an indirect call to a direct call may
+                    have exposed different semantics.  This may
+                    require an SSA update.  */
+                 todo |= TODO_update_ssa;
                }
            }
        }