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 g++.bob/case1.C


Has been failing since

date: 2003/11/13 02:47:41;  author: hubicka;  state: Exp;  lines: +4 -0

        * gimplify.c (gimplify_expr): Check labels.

Jan, you need to be more careful about checking for regressions.
Trivially fixed by using create_artificial_label more places.


r~


	* c-common.c (c_add_case_label): Use create_artificial_label.
	* tree-simple.h (create_artificial_label): Move decl ...
	* tree.h: ... here.

Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.344.2.51
diff -c -p -d -u -r1.344.2.51 c-common.c
--- c-common.c	17 Nov 2003 00:31:00 -0000	1.344.2.51
+++ c-common.c	17 Nov 2003 07:13:25 -0000
@@ -3897,8 +3897,7 @@ c_add_case_label (splay_tree cases, tree
   splay_tree_node node;
 
   /* Create the LABEL_DECL itself.  */
-  label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
-  DECL_CONTEXT (label) = current_function_decl;
+  label = create_artificial_label ();
 
   /* If there was an error processing the switch condition, bail now
      before we get more confused.  */
@@ -4020,7 +4019,7 @@ c_add_case_label (splay_tree cases, tree
      that just leads to duplicates and thence to aborts later on.  */
   if (!cases->root)
     {
-      tree t = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
+      tree t = create_artificial_label ();
       add_stmt (build_stmt (LABEL_STMT, t));
     }
   return error_mark_node;
Index: tree-simple.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-simple.h,v
retrieving revision 1.1.4.40
diff -c -p -d -u -r1.1.4.40 tree-simple.h
--- tree-simple.h	12 Nov 2003 22:06:26 -0000	1.1.4.40
+++ tree-simple.h	17 Nov 2003 07:13:25 -0000
@@ -25,7 +25,6 @@ Boston, MA 02111-1307, USA.  */
 
 #include "tree-iterator.h"
 
-extern tree create_artificial_label (void);
 extern tree create_tmp_var (tree, const char *);
 extern tree create_tmp_alias_var (tree, const char *);
 extern bool is_gimple_tmp_var (tree);
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.342.2.127
diff -c -p -d -u -r1.342.2.127 tree.h
--- tree.h	16 Nov 2003 23:00:59 -0000	1.342.2.127
+++ tree.h	17 Nov 2003 07:13:25 -0000
@@ -3473,6 +3473,7 @@ extern void declare_nonlocal_label (tree
 extern int containing_blocks_have_cleanups_or_stack_level (void);
 
 /* In gimplify.c.  */
+extern tree create_artificial_label (void);
 extern void gimplify_function_tree (tree);
 extern const char *get_name (tree);
 extern tree unshare_expr (tree);


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