OSDN Git Service

PR debug/46375
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Nov 2010 09:57:20 +0000 (09:57 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 12 Nov 2010 09:57:20 +0000 (09:57 +0000)
* emit-rtl.c (remove_insn): Do not mark BBs upon debug insns.

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

gcc/ChangeLog
gcc/emit-rtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr46375.c [new file with mode: 0644]

index 03de2e2..5607e75 100644 (file)
@@ -1,3 +1,8 @@
+2010-11-12  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR debug/46375
+       * emit-rtl.c (remove_insn): Do not mark BBs upon debug insns.
+
 2010-11-11  Rodrigo Rivas Costa  <rodrigorivascosta@gmail.com>
 
        PR lto/46376
index 60fe39b..2db0cff 100644 (file)
@@ -3867,7 +3867,7 @@ remove_insn (rtx insn)
   if (!BARRIER_P (insn)
       && (bb = BLOCK_FOR_INSN (insn)))
     {
-      if (INSN_P (insn))
+      if (NONDEBUG_INSN_P (insn))
        df_set_bb_dirty (bb);
       if (BB_HEAD (bb) == insn)
        {
index e67a296..4b01e09 100644 (file)
@@ -1,3 +1,7 @@
+2010-11-12  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * gcc.dg/pr46375.c: New test.
+
 2010-11-11  Nathan Froyd  <froydnj@codesourcery.com>
 
        PR c/44782
diff --git a/gcc/testsuite/gcc.dg/pr46375.c b/gcc/testsuite/gcc.dg/pr46375.c
new file mode 100644 (file)
index 0000000..0126bc9
--- /dev/null
@@ -0,0 +1,16 @@
+/* PR debug/46375 */
+/* Reported by Zdenek Sojka <zsojka@seznam.cz> */
+/* { dg-do compile } */
+/* { dg-options "-fgcse -fno-tree-dominator-opts -fcompare-debug -O" } */
+
+void bar (void);
+
+void
+foo (int **pp)
+{
+  int *p = 0;
+  if (pp)
+    p = *pp;
+  if (p && *p)
+    bar ();
+}