OSDN Git Service

2006-10-09 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Oct 2006 16:10:38 +0000 (16:10 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Oct 2006 16:10:38 +0000 (16:10 +0000)
PR middle-end/29254
* cgraphunit.c (verify_cgraph_node): Bail out on earlier
errors.

* gcc.dg/pr29254.c: New testcase.

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

gcc/ChangeLog
gcc/cgraphunit.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr29254.c [new file with mode: 0644]

index ac05e54..3ac5ae1 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-09  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/29254
+       * cgraphunit.c (verify_cgraph_node): Bail out on earlier
+       errors.
+
 2006-10-09  Steve Ellcey  <sje@cup.hp.com>
 
        PR target/27880
index 94a4044..6b3cab0 100644 (file)
@@ -694,6 +694,9 @@ verify_cgraph_node (struct cgraph_node *node)
   block_stmt_iterator bsi;
   bool error_found = false;
 
+  if (errorcount || sorrycount)
+    return;
+
   timevar_push (TV_CGRAPH_VERIFY);
   for (e = node->callees; e; e = e->next_callee)
     if (e->aux)
index 6d463b5..c477d67 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-09  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/29254
+       * gcc.dg/pr29254.c: New testcase.
+
 2006-10-08  Erik Edelmann  <edelmann@gcc.gnu.org>
            Paul Thomas  <pault@gcc.gnu.org>
 
diff --git a/gcc/testsuite/gcc.dg/pr29254.c b/gcc/testsuite/gcc.dg/pr29254.c
new file mode 100644 (file)
index 0000000..6259089
--- /dev/null
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -Werror" } */
+/* { dg-warning "warnings being treated as errors" "" {target "*-*-*"} 0 } */
+
+list_compare (int * list1)
+{
+  if (list1)
+    value_compare ();
+}
+
+func1 (int * f){}
+
+value_compare (int * a)
+{
+    if (a)
+        list_compare (a);
+}
+
+func2 (const int * fb)
+{
+  func1 ((int *) fb); /* { dg-warning "discards qualifiers" } */
+}