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.c-torture/execute/nestfunc-5.c


Tsk tsk.  Whoever added FUNCTION_RECEIVES_NONLOCAL_GOTO didn't check
to see what else readonly_flag was used for.  In this case, it's
set for __const__ functions.

In this case, the call to recursive was elimiated as dead code by
gimplification.


r~


        * tree.h (FUNCTION_RECEIVES_NONLOCAL_GOTO): Use unsigned_flag.

Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.342.2.154
diff -c -p -d -r1.342.2.154 tree.h
*** tree.h	19 Dec 2003 07:01:36 -0000	1.342.2.154
--- tree.h	3 Jan 2004 22:50:48 -0000
*************** struct tree_common GTY(())
*** 259,264 ****
--- 259,266 ----
             INTEGER_TYPE, ENUMERAL_TYPE, FIELD_DECL
         SAVE_EXPR_NOPLACEHOLDER in
  	   SAVE_EXPR
+        FUNCTION_RECEIVES_NONLOCAL_GOTO in
+ 	   FUNCTION_DECL
  
     asm_written_flag:
  
*************** extern void tree_operand_check_failed (i
*** 666,673 ****
     when the node is a type).  */
  #define TREE_READONLY(NODE) ((NODE)->common.readonly_flag)
  
- #define FUNCTION_RECEIVES_NONLOCAL_GOTO(NODE) ((NODE)->common.readonly_flag)
- 
  /* In a LABEL_DECL, nonzero means this label is a jump target for
     a nonlocal goto.  */
  #define NONLOCAL_LABEL(NODE) ((NODE)->common.readonly_flag)
--- 667,672 ----
*************** extern void tree_operand_check_failed (i
*** 684,689 ****
--- 683,694 ----
  /* In INTEGER_TYPE or ENUMERAL_TYPE nodes, means an unsigned type.
     In FIELD_DECL nodes, means an unsigned bit field.  */
  #define TREE_UNSIGNED(NODE) ((NODE)->common.unsigned_flag)
+ 
+ /* In FUNCTION_DECL nodes, means that this function contains a label that is
+    a target of a non-local goto.  */
+ /* ??? Why isn't this in struct function?  */
+ #define FUNCTION_RECEIVES_NONLOCAL_GOTO(NODE) \
+   ((NODE)->common.unsigned_flag)
  
  #define TYPE_TRAP_SIGNED(NODE) \
    (flag_trapv && ! TREE_UNSIGNED (TYPE_CHECK (NODE)))


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