This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Fix gcc.dg/noncompile/20010425-1.c
- From: Diego Novillo <dnovillo at redhat dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 12 Sep 2003 12:17:47 -0400
- Subject: [tree-ssa] Fix gcc.dg/noncompile/20010425-1.c
- Organization: Red Hat Canada
Avoids getting into an infinite loop in expand_deferred_fns when there
are syntax errors in the code.
Bootstrapped and tested x86 and amd64.
Diego.
* tree-optimize.c (tree_rest_of_compilation): Set TREE_ASM_WRITTEN
for functions that have errors.
Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 1.1.4.45
diff -d -c -p -r1.1.4.45 tree-optimize.c
*** tree-optimize.c 4 Sep 2003 13:52:38 -0000 1.1.4.45
--- tree-optimize.c 11 Sep 2003 23:08:45 -0000
*************** tree_rest_of_compilation (tree fndecl)
*** 187,193 ****
/* Don't bother doing anything if there are errors. */
if (errorcount || sorrycount)
! return;
timevar_push (TV_EXPAND);
--- 187,196 ----
/* Don't bother doing anything if there are errors. */
if (errorcount || sorrycount)
! {
! TREE_ASM_WRITTEN (fndecl) = 1;
! return;
! }
timevar_push (TV_EXPAND);