OSDN Git Service

2006-05-20 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 May 2006 22:35:02 +0000 (22:35 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 20 May 2006 22:35:02 +0000 (22:35 +0000)
        PR middle-end/25776
        * cgraphunit.c (cgraph_optimize): Don't run ipa passes if error
        or sorry count is non zero.

2006-05-20  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/25776
        * g++.dg/other/error11.C: New test.

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

gcc/ChangeLog
gcc/cgraphunit.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/error11.C [new file with mode: 0644]

index 7deb475..f05e632 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR middle-end/25776
+       * cgraphunit.c (cgraph_optimize): Don't run ipa passes if error
+       or sorry count is non zero.
+
 2006-05-20  Andreas Schwab  <schwab@suse.de>
 
        * config/pa/pa-linux.h (STRING_ASM_OP): Prepend and append a tab.
index 5ff4fff..44b3d4f 100644 (file)
@@ -1410,7 +1410,11 @@ cgraph_optimize (void)
       fprintf (cgraph_dump_file, "Marked ");
       dump_cgraph (cgraph_dump_file);
     }
-  ipa_passes ();
+    
+  /* Don't run the IPA passes if there was any error or sorry messages.  */
+  if (errorcount == 0 && sorrycount == 0)
+    ipa_passes ();
+
   /* This pass remove bodies of extern inline functions we never inlined.
      Do this later so other IPA passes see what is really going on.  */
   cgraph_remove_unreachable_nodes (false, dump_file);
index 10b3a7d..d558ee2 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR middle-end/25776
+       * g++.dg/other/error11.C: New test. 
+
 2006-05-20  Richard Sandiford  <richard@codesourcery.com>
 
        * gcc.target/mips/pr26765.c: Add -w to options.
diff --git a/gcc/testsuite/g++.dg/other/error11.C b/gcc/testsuite/g++.dg/other/error11.C
new file mode 100644 (file)
index 0000000..d8a641c
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-options "-O1" } */
+struct A
+{
+  ERROR; /* { dg-error "ERROR" } */
+  ~A();
+};
+
+struct B
+{
+  virtual ~B();
+};
+
+struct C : B, A {};
+
+struct D : C {};
+
+D d;