This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR29254 (cgraph, P1)
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <jh at suse dot de>
- Date: Mon, 9 Oct 2006 16:27:36 +0200 (CEST)
- Subject: [PATCH] Fix PR29254 (cgraph, P1)
This patch fixes an ICE-after-error (still P1...) by not verifying
the cgraph in that case (which is what other entries into that code do).
Bootstrapped and tested on x86_64-unknonw-linux-gnu.
Ok for mainline?
Thanks,
Richard.
--
Richard Guenther <rguenther@suse.de>
Novell / SUSE Labs
2006-10-09 Richard Guenther <rguenther@suse.de>
PR middle-end/29254
* cgraphunit.c (verify_cgraph_node): Bail out on earlier
errors.
* gcc.dg/pr29254.c: New testcase.
Index: cgraphunit.c
===================================================================
*** cgraphunit.c (revision 117569)
--- cgraphunit.c (working copy)
*************** verify_cgraph_node (struct cgraph_node *
*** 694,699 ****
--- 694,702 ----
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)
/* { 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" } */
}