[tree-ssa] Fix gcc.dg/noncompile/20010425-1.c

Diego Novillo dnovillo@redhat.com
Fri Sep 12 16:17:00 GMT 2003


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);
  




More information about the Gcc-patches mailing list