This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]