This is the mail archive of the gcc@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]

Re: RFA: Adding a location_t (or pointer) to tree_exp for 3.4 only.


On Mon, Oct 06, 2003 at 05:46:47PM -0700, Richard Henderson wrote:
> build_cxx_call, for one.  *After* propagating nothrow info.

As in the patch in my previous post, for testing purposes,
I did replace TREE_CODE() with a code that warns me whenever
it is used for a EXPR_WITH_FILE_LOCATION (wrapping the newly
wrapped CALL_EXPR).  I used TREE_CODE_NOCHECK to do what the
old TREE_CODE did.

Next, I manually investigated every place where this happened
and either turned off the warning (using TREE_CODE_NOCHECK or
with ++nocheck ... --nocheck wraps) and/or added code to handle
the EXPR_WITH_FILE_LOCATION.

Obvious places where no fix is needed is code like:

  if (TREE_CODE(t) == FOOBAR)

because FOOBAR != CALL_EXPR, and thus a wrapping with a
EXPR_WITH_FILE_LOCATION where TREE_CODE() suddenly returns
EXPR_WITH_FILE_LOCATION instead of CALL_EXPR, has no effect.

At other places it was less obvious and at several places
a fix was indeed needed to handle the EXPR_WITH_FILE_LOCATION:
automatic unwrapping had NOT taken place already and it
DID matter that the 'tree' at that point represents a CALL_EXPR,
although being wrapped up in a wfl now.  Examples of this are
where we test for TREE_CODE(t) == CALL_EXPR or a switch that
handles CALL_EXPR but does not handle EXPR_WITH_FILE_LOCATION.


For the little test case that I am using, I managed to fix
every place in gcc : either by using TREE_CODE_NOCHECK or
by handling the EXPR_WITH_FILE_LOCATION.  This resulted in
the following diff.  Please don't judge this diff on usefulness
or style - it is only intended to demonstrate the impact of using
WFL for CALL_EXPR-essions in build_cxx_call.

At *every* place where the diff changes something, we DID arrive
with a EXPR_WITH_FILE_LOCATION containing the CALL_EXPR *instead*
of getting there with the CALL_EXPR itself.

The changes to tree.h are not relevant for this demonstration
and are therefore not included.

Index: c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.461
diff -u -d -p -r1.461 c-common.c
--- c-common.c	25 Sep 2003 01:25:43 -0000	1.461
+++ c-common.c	7 Oct 2003 18:10:54 -0000
@@ -5733,10 +5733,10 @@ c_estimate_num_insns_1 (tree *tp, int *w
   /* Assume that constants and references counts nothing.  These should
      be majorized by amount of operations among them we count later
      and are common target of CSE and similar optimizations.  */
-  if (TREE_CODE_CLASS (TREE_CODE (x)) == 'c'
-      || TREE_CODE_CLASS (TREE_CODE (x)) == 'r')
+  if (TREE_CODE_CLASS (TREE_CODE_NOCHECK (x)) == 'c'
+      || TREE_CODE_CLASS (TREE_CODE_NOCHECK (x)) == 'r')
     return NULL;
-  switch (TREE_CODE (x))
+  switch (TREE_CODE_NOCHECK (x))
     { 
     /* Reconginze assignments of large structures and constructors of
        big arrays.  */
Index: cgraphunit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraphunit.c,v
retrieving revision 1.33
diff -u -d -p -r1.33 cgraphunit.c
--- cgraphunit.c	26 Sep 2003 00:14:28 -0000	1.33
+++ cgraphunit.c	7 Oct 2003 18:10:54 -0000
@@ -227,7 +227,34 @@ record_call_1 (tree *tp, int *walk_subtr
 {
   tree t = *tp;
 
-  switch (TREE_CODE (t))
+  /* Another serious problem: we get here with our WFL for 't',
+     but the switch does not handle EXPR_WITH_FILE_LOCATION.
+     Getting here from:
+#0  0x0855e48d in record_call_1 (tp=0x402fe254, walk_subtrees=0xbfffed7c,
+    data=0x402fd3cc) at ../../../gcc/gcc-mainline/gcc/cgraphunit.c:230
+#1  0x0855abae in walk_tree (tp=0x402fe254, func=0x855e457 <record_call_1>,
+    data=0x402fd3cc, htab_=0x8767da0) at ../../../gcc/gcc-mainline/gcc/tree-inline.c:1720
+#2  0x0855b891 in walk_tree (tp=0x4026f584, func=0x855e457 <record_call_1>,
+    data=0x402fd3cc, htab_=0x8767da0) at ../../../gcc/gcc-mainline/gcc/tree-inline.c:1846
+#3  0x0855e782 in record_call_1 (tp=0x402fe330, walk_subtrees=0xbfffee7c,
+    data=0x402fd3cc) at ../../../gcc/gcc-mainline/gcc/cgraphunit.c:267
+#4  0x0855abae in walk_tree (tp=0x402fe330, func=0x855e457 <record_call_1>,
+    data=0x402fd3cc, htab_=0x8767da0) at ../../../gcc/gcc-mainline/gcc/tree-inline.c:1720
+#5  0x0855b01a in walk_tree (tp=0x402fe1b8, func=0x855e457 <record_call_1>,
+    data=0x402fd3cc, htab_=0x8767da0) at ../../../gcc/gcc-mainline/gcc/tree-inline.c:1771
+#6  0x0855b01a in walk_tree (tp=0x402fe17c, func=0x855e457 <record_call_1>,
+    data=0x402fd3cc, htab_=0x8767da0) at ../../../gcc/gcc-mainline/gcc/tree-inline.c:1771
+#7  0x0855b01a in walk_tree (tp=0xbfffefd4, func=0x855e457 <record_call_1>,
+    data=0x402fd3cc, htab_=0x8767da0) at ../../../gcc/gcc-mainline/gcc/tree-inline.c:1771
+#8  0x0855e891 in cgraph_create_edges (decl=0x402fd3cc, body=0x402fe168)
+    at ../../../gcc/gcc-mainline/gcc/cgraphunit.c:300
+#9  0x0855e904 in cgraph_analyze_function (node=0x402fd654)
+    at ../../../gcc/gcc-mainline/gcc/cgraphunit.c:314
+#10 0x0855e3fe in cgraph_finalize_function (decl=0x402fd3cc, nested=false)
+    at ../../../gcc/gcc-mainline/gcc/cgraphunit.c:209
+  */
+  tree t2 = t;
+  switch (TREE_CODE_NOCHECK (t))
     {
     case VAR_DECL:
       /* ??? Really, we should mark this decl as *potentially* referenced
@@ -248,9 +275,14 @@ record_call_1 (tree *tp, int *walk_subtr
 	}
       break;
 
+    case EXPR_WITH_FILE_LOCATION:
+      ++nocheck;
+      t2 = EXPR_WFL_NODE (t);
+      --nocheck;
     case CALL_EXPR:
+      if (TREE_CODE (t2) == CALL_EXPR)
       {
-	tree decl = get_callee_fndecl (*tp);
+	tree decl = get_callee_fndecl (t2);
 	if (decl && TREE_CODE (decl) == FUNCTION_DECL)
 	  {
 	    if (DECL_BUILT_IN (decl))
@@ -264,7 +296,7 @@ record_call_1 (tree *tp, int *walk_subtr
 	       taken by something that is not a function call.  So only
 	       walk the function parameter list, skip the other subtrees.  */
 
-	    walk_tree (&TREE_OPERAND (*tp, 1), record_call_1, data,
+	    walk_tree (&TREE_OPERAND (t2, 1), record_call_1, data,
 		       visited_nodes);
 	    *walk_subtrees = 0;
 	  }
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/expr.c,v
retrieving revision 1.589
diff -u -d -p -r1.589 expr.c
--- expr.c	28 Sep 2003 04:56:33 -0000	1.589
+++ expr.c	7 Oct 2003 18:10:56 -0000
@@ -4150,6 +4150,7 @@ expand_assignment (tree to, tree from, i
 {
   rtx to_rtx = 0;
   rtx result;
+  tree unwrapped_from = from;
 
   /* Don't crash if the lhs of the assignment was erroneous.  */
 
@@ -4287,8 +4288,38 @@ expand_assignment (tree to, tree from, i
      since it might be a promoted variable where the zero- or sign- extension
      needs to be done.  Handling this in the normal way is safe because no
      computation is done before the call.  */
-  if (TREE_CODE (from) == CALL_EXPR && ! aggregate_value_p (from, from)
-      && TREE_CODE (TYPE_SIZE (TREE_TYPE (from))) == INTEGER_CST
+  if (TREE_CODE_NOCHECK (from) == EXPR_WITH_FILE_LOCATION)
+  {
+/* We get here from
+#0  expand_assignment (to=0x402fd804, from=0x40266440, want_value=0)
+    at ../../../gcc/gcc-mainline/gcc/expr.c:4293
+#1  0x084fde22 in expand_decl_init (decl=0x402fd804)
+    at ../../../gcc/gcc-mainline/gcc/stmt.c:3985
+#2  0x0822d642 in emit_local_var (decl=0x402fd804)
+    at ../../../gcc/gcc-mainline/gcc/c-semantics.c:287
+#3  0x0822d9fb in genrtl_decl_stmt (t=0x402fe3fc)
+    at ../../../gcc/gcc-mainline/gcc/c-semantics.c:382
+#4  0x08230396 in expand_stmt (t=0x402fe3fc)
+    at ../../../gcc/gcc-mainline/gcc/c-semantics.c:809
+#5  0x0822fc73 in genrtl_compound_stmt (t=0x402fe3d4)
+    at ../../../gcc/gcc-mainline/gcc/c-semantics.c:723
+#6  0x082303f5 in expand_stmt (t=0x402fe3d4)
+    at ../../../gcc/gcc-mainline/gcc/c-semantics.c:829
+#7  0x0821f568 in c_expand_expr (exp=0x402fe3e8, target=0x40264210, tmode=VOIDmode,
+    modifier=0) at ../../../gcc/gcc-mainline/gcc/c-common.c:4098
+#8  0x080b4cc7 in cxx_expand_expr (exp=0x402fe3e8, target=0x40264210, tmode=VOIDmode,
+    modifier=0) at ../../../gcc/gcc-mainline/gcc/cp/expr.c:122
+#9  0x0830bc65 in expand_expr (exp=0x402fe3e8, target=0x0, tmode=VOIDmode,
+    modifier=EXPAND_NORMAL) at ../../../gcc/gcc-mainline/gcc/expr.c:9493
+#10 0x082efdea in expand_expr (exp=0x402664e0, target=0x0, tmode=VOIDmode,
+    modifier=EXPAND_NORMAL) at ../../../gcc/gcc-mainline/gcc/expr.c:6991
+*/
+    ++nocheck;
+    unwrapped_from = EXPR_WFL_NODE(from);
+    --nocheck;
+  }
+  if (TREE_CODE_NOCHECK (unwrapped_from) == CALL_EXPR && ! aggregate_value_p (unwrapped_from, unwrapped_from)
+      && TREE_CODE (TYPE_SIZE (TREE_TYPE (unwrapped_from))) == INTEGER_CST
       && ! ((TREE_CODE (to) == VAR_DECL || TREE_CODE (to) == PARM_DECL)
 	    && GET_CODE (DECL_RTL (to)) == REG))
     {
@@ -4433,7 +4464,7 @@ store_expr (tree exp, rtx target, int wa
       expand_expr (exp, const0_rtx, VOIDmode, 0);
       return NULL_RTX;
     }
-  if (TREE_CODE (exp) == COMPOUND_EXPR)
+  if (TREE_CODE_NOCHECK (exp) == COMPOUND_EXPR)
     {
       /* Perform first part of compound expression, then assign from second
 	 part.  */
@@ -4442,7 +4473,7 @@ store_expr (tree exp, rtx target, int wa
       emit_queue ();
       return store_expr (TREE_OPERAND (exp, 1), target, want_value);
     }
-  else if (TREE_CODE (exp) == COND_EXPR && GET_MODE (target) == BLKmode)
+  else if (TREE_CODE_NOCHECK (exp) == COND_EXPR && GET_MODE (target) == BLKmode)
     {
       /* For conditional expression, get safe form of the target.  Then
 	 test the condition, doing the appropriate assignment on either
@@ -6613,14 +6644,17 @@ expand_expr (tree exp, rtx target, enum 
   tree type = TREE_TYPE (exp);
   int unsignedp = TREE_UNSIGNED (type);
   enum machine_mode mode;
-  enum tree_code code = TREE_CODE (exp);
+  enum tree_code code = TREE_CODE_NOCHECK (exp);	/* That it is ok here to set code to
+                                                           EXPR_WITH_FILE_LOCATION when that
+							   wraps a CALL_EXPR was the most
+							   difficult decision. */
   optab this_optab;
   rtx subtarget, original_target;
   int ignore;
   tree context;
 
   /* Handle ERROR_MARK before anybody tries to access its type.  */
-  if (TREE_CODE (exp) == ERROR_MARK || TREE_CODE (type) == ERROR_MARK)
+  if (TREE_CODE_NOCHECK (exp) == ERROR_MARK || TREE_CODE_NOCHECK (type) == ERROR_MARK)
     {
       op0 = CONST0_RTX (tmode);
       if (op0 != 0)
Index: rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.c,v
retrieving revision 1.126
diff -u -d -p -r1.126 rtl.c
--- rtl.c	30 Jul 2003 19:23:31 -0000	1.126
+++ rtl.c	7 Oct 2003 18:10:57 -0000
@@ -28,6 +28,7 @@ Software Foundation, 59 Temple Place - S
 #include "ggc.h"
 #include "errors.h"
 
+int nocheck = 0;
 
 /* Indexed by rtx code, gives number of operands for an rtx with that code.
    Does NOT include rtx header data (code and links).  */
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/stmt.c,v
retrieving revision 1.333
diff -u -d -p -r1.333 stmt.c
--- stmt.c	28 Sep 2003 19:09:49 -0000	1.333
+++ stmt.c	7 Oct 2003 18:11:02 -0000
@@ -3979,7 +3979,7 @@ expand_decl_init (tree decl)
 			   0);
       emit_queue ();
     }
-  else if (DECL_INITIAL (decl) && TREE_CODE (DECL_INITIAL (decl)) != TREE_LIST)
+  else if (DECL_INITIAL (decl) && TREE_CODE_NOCHECK (DECL_INITIAL (decl)) != TREE_LIST)
     {
       emit_line_note (DECL_SOURCE_LOCATION (decl));
       expand_assignment (decl, DECL_INITIAL (decl), 0);
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.81
diff -u -d -p -r1.81 tree-inline.c
--- tree-inline.c	23 Sep 2003 20:02:48 -0000	1.81
+++ tree-inline.c	7 Oct 2003 18:11:04 -0000
@@ -40,7 +40,6 @@ Boston, MA 02111-1307, USA.  */
 #include "cgraph.h"
 #include "intl.h"
 
-
 /* This should be eventually be generalized to other languages, but
    this would require a shared function-as-trees infrastructure.  */
 #ifndef INLINER_FOR_JAVA
@@ -1227,7 +1226,7 @@ expand_call_inline (tree *tp, int *walk_
 
   /* Recurse, but letting recursive invocations know that we are
      inside the body of a TARGET_EXPR.  */
-  if (TREE_CODE (*tp) == TARGET_EXPR)
+  if (TREE_CODE_NOCHECK (*tp) == TARGET_EXPR)
     {
 #ifndef INLINER_FOR_JAVA
       int i, len = first_rtl_op (TARGET_EXPR);
@@ -1253,7 +1252,7 @@ expand_call_inline (tree *tp, int *walk_
       abort ();
 #endif /* INLINER_FOR_JAVA */
     }
-  else if (TREE_CODE (t) == EXPR_WITH_FILE_LOCATION)
+  else if (TREE_CODE_NOCHECK (t) == EXPR_WITH_FILE_LOCATION)
     {
       /* We're walking the subtree directly.  */
       *walk_subtrees = 0;
@@ -1724,7 +1723,10 @@ walk_tree (tree *tp, walk_tree_fn func, 
   if (result)
     return result;
 
-  code = TREE_CODE (*tp);
+  code = TREE_CODE_NOCHECK (*tp);
+  /* The _NOCHECK is only ok if: */
+  my_friendly_assert ( STATEMENT_CODE_P (CALL_EXPR) == STATEMENT_CODE_P (EXPR_WITH_FILE_LOCATION), whatisthis );
+  my_friendly_assert ( IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (CALL_EXPR)) == IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (EXPR_WITH_FILE_LOCATION)), foobar );
 
 #ifndef INLINER_FOR_JAVA
   /* Even if we didn't, FUNC may have decided that there was nothing
@@ -1933,7 +1935,10 @@ walk_tree_without_duplicates (tree *tp, 
 tree
 copy_tree_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
 {
-  enum tree_code code = TREE_CODE (*tp);
+  enum tree_code code = TREE_CODE_NOCHECK (*tp);
+  /* The _NOCHECK is ok when: */
+  my_friendly_assert( IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (CALL_EXPR)) ==
+                      IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (EXPR_WITH_FILE_LOCATION)), 0);
 
   /* We make copies of most nodes.  */
   if (IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (code))
@@ -1959,7 +1964,7 @@ copy_tree_r (tree *tp, int *walk_subtree
 
       /* For now, we don't update BLOCKs when we make copies.  So, we
 	 have to nullify all scope-statements.  */
-      if (TREE_CODE (*tp) == SCOPE_STMT)
+      if (TREE_CODE_NOCHECK (*tp) == SCOPE_STMT)
 	SCOPE_STMT_BLOCK (*tp) = NULL_TREE;
 #else /* INLINER_FOR_JAVA */
 	  || (*lang_hooks.tree_inlining.tree_chain_matters_p) (*tp))
Index: tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.330
diff -u -d -p -r1.330 tree.c
--- tree.c	22 Sep 2003 05:09:12 -0000	1.330
+++ tree.c	7 Oct 2003 18:11:05 -0000
@@ -139,7 +139,7 @@ decl_assembler_name (tree decl)
 size_t
 tree_size (tree node)
 {
-  enum tree_code code = TREE_CODE (node);
+  enum tree_code code = TREE_CODE_NOCHECK (node);
 
   switch (TREE_CODE_CLASS (code))
     {
@@ -344,7 +344,7 @@ tree
 copy_node (tree node)
 {
   tree t;
-  enum tree_code code = TREE_CODE (node);
+  enum tree_code code = TREE_CODE_NOCHECK (node);
   size_t length;
 
   length = tree_size (node);
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.447
diff -u -d -p -r1.447 tree.h
--- tree.h	28 Sep 2003 19:09:49 -0000	1.447
+++ tree.h	7 Oct 2003 18:11:08 -0000
@@ -267,7 +267,20 @@ struct tree_common GTY(())
 
 /* The tree-code says what kind of node it is.
    Codes are defined in tree.def.  */
+extern int nocheck;
+#if 0
 #define TREE_CODE(NODE) ((enum tree_code) (NODE)->common.code)
+#else
+/* TEST CODE - REMOVE */
+#define TREE_CODE(NODE) __extension__					\
+({  enum tree_code code = ((enum tree_code) (NODE)->common.code);	\
+    if (!nocheck && code == EXPR_WITH_FILE_LOCATION &&			\
+        (TREE_CODE_NOCHECK(((NODE)->exp.operands[0])) == CALL_EXPR))	\
+      printf("TREE_CODE: %s:%d\n", __FILE__, __LINE__);			\
+    code; })
+#define TREE_CODE_NOCHECK(NODE) ((enum tree_code) (NODE)->common.code)
+#endif
+
 #define TREE_SET_CODE(NODE, VALUE) \
 ((NODE)->common.code = (ENUM_BITFIELD (tree_code)) (VALUE))
 
[...deleted...]
Index: cp/call.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/call.c,v
retrieving revision 1.437
diff -u -d -p -r1.437 call.c
--- cp/call.c	27 Sep 2003 16:44:04 -0000	1.437
+++ cp/call.c	7 Oct 2003 18:11:11 -0000
@@ -4293,7 +4293,7 @@ convert_default_arg (tree type, tree arg
 {
   /* If the ARG is an unparsed default argument expression, the
      conversion cannot be performed.  */
-  if (TREE_CODE (arg) == DEFAULT_ARG)
+  if (TREE_CODE_NOCHECK (arg) == DEFAULT_ARG)
     {
       error ("the default argument for parameter %d of `%D' has "
 	     "not yet been parsed",
@@ -4306,7 +4306,7 @@ convert_default_arg (tree type, tree arg
 
   arg = break_out_target_exprs (arg);
 
-  if (TREE_CODE (arg) == CONSTRUCTOR)
+  if (TREE_CODE_NOCHECK (arg) == CONSTRUCTOR)
     {
       arg = digest_init (type, arg, 0);
       arg = convert_for_initialization (0, type, arg, LOOKUP_NORMAL,
@@ -4642,7 +4642,18 @@ build_cxx_call(tree fn, tree args, tree 
 
   if (IS_AGGR_TYPE (TREE_TYPE (fn)))
     fn = build_cplus_new (TREE_TYPE (fn), fn);
-  return convert_from_reference (fn);
+
+  fn = convert_from_reference (fn);
+
+  /* Wrap every call in a wfl in order to garantee that the correct
+     locus debug information is emitted.  This exception is made for
+     calls because they turn up in debugger back traces.  */
+  ++nocheck;
+  fn = build_expr_wfl (fn, input_location.file, input_location.line, 0);
+  EXPR_WFL_EMIT_LINE_NOTE (fn) = 1;
+  --nocheck;
+
+  return fn;
 }
 
 static GTY(()) tree java_iface_lookup_fn;
Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1138
diff -u -d -p -r1.1138 decl.c
--- cp/decl.c	30 Sep 2003 22:58:39 -0000	1.1138
+++ cp/decl.c	7 Oct 2003 18:11:19 -0000
@@ -8764,7 +8764,7 @@ grokfndecl (tree ctype, 
 
   for (t = TYPE_ARG_TYPES (TREE_TYPE (decl)); t; t = TREE_CHAIN (t))
     if (TREE_PURPOSE (t)
-	&& TREE_CODE (TREE_PURPOSE (t)) == DEFAULT_ARG)
+	&& TREE_CODE_NOCHECK (TREE_PURPOSE (t)) == DEFAULT_ARG)
       {
 	has_default_arg = 1;
 	break;
@@ -11633,13 +11633,13 @@ require_complete_types_for_parms (tree p
 int
 local_variable_p (tree t)
 {
-  if ((TREE_CODE (t) == VAR_DECL
+  if ((TREE_CODE_NOCHECK (t) == VAR_DECL
        /* A VAR_DECL with a context that is a _TYPE is a static data
 	  member.  */
        && !TYPE_P (CP_DECL_CONTEXT (t))
        /* Any other non-local variable must be at namespace scope.  */
        && !DECL_NAMESPACE_SCOPE_P (t))
-      || (TREE_CODE (t) == PARM_DECL))
+      || (TREE_CODE_NOCHECK (t) == PARM_DECL))
     return 1;
 
   return 0;
@@ -11680,11 +11680,13 @@ check_default_argument (tree decl, tree 
   tree var;
   tree decl_type;
 
-  if (TREE_CODE (arg) == DEFAULT_ARG)
+  if (TREE_CODE_NOCHECK (arg) == DEFAULT_ARG)
+  {
     /* We get a DEFAULT_ARG when looking at an in-class declaration
        with a default argument.  Ignore the argument for now; we'll
        deal with it after the class is complete.  */
     return arg;
+  }
 
   if (processing_template_decl || uses_template_parms (arg))
     /* We don't do anything checking until instantiation-time.  Note
Index: cp/init.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/init.c,v
retrieving revision 1.344
diff -u -d -p -r1.344 init.c
--- cp/init.c	28 Sep 2003 04:37:40 -0000	1.344
+++ cp/init.c	7 Oct 2003 18:11:23 -0000
@@ -1591,7 +1591,7 @@ decl_constant_value (tree decl)
      as an lvalue or as an rvalue.  If it is an lvalue, it's not safe
      to replace the second and third operands with their
      initializers.  So, we do that here.  */
-  if (TREE_CODE (decl) == COND_EXPR)
+  if (TREE_CODE_NOCHECK (decl) == COND_EXPR)
     {
       tree d1;
       tree d2;
Index: cp/optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/optimize.c,v
retrieving revision 1.101
diff -u -d -p -r1.101 optimize.c
--- cp/optimize.c	22 Sep 2003 05:09:23 -0000	1.101
+++ cp/optimize.c	7 Oct 2003 18:11:23 -0000
@@ -70,7 +70,7 @@ calls_setjmp_r (tree *tp, int *walk_subt
                 void *data ATTRIBUTE_UNUSED)
 {
   /* We're only interested in FUNCTION_DECLS.  */
-  if (TREE_CODE (*tp) != FUNCTION_DECL)
+  if (TREE_CODE_NOCHECK (*tp) != FUNCTION_DECL)
     return NULL_TREE;
 
   return setjmp_call_p (*tp) ? *tp : NULL_TREE;
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.784
diff -u -d -p -r1.784 pt.c
--- cp/pt.c	23 Sep 2003 15:42:21 -0000	1.784
+++ cp/pt.c	7 Oct 2003 18:11:30 -0000
@@ -4602,7 +4602,12 @@ for_each_template_parm (tree t, tree_fn_
 int
 uses_template_parms (tree t)
 {
-  return for_each_template_parm (t, 0, 0, NULL);
+  ++nocheck;	/* Because uses_template_parms should only be called with types, never with a call_expr */
+  		/* Now it IS called with a call_expr, but in that case this function threats 't' the
+		   same as when it is a wfl anyway: as a not-type */
+  int result = for_each_template_parm (t, 0, 0, NULL);
+  --nocheck;
+  return result;
 }
 
 static int tinst_depth;
Index: cp/semantics.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/semantics.c,v
retrieving revision 1.368
diff -u -d -p -r1.368 semantics.c
--- cp/semantics.c	23 Sep 2003 15:42:21 -0000	1.368
+++ cp/semantics.c	7 Oct 2003 18:11:32 -0000
@@ -2716,7 +2716,7 @@ simplify_aggr_init_exprs_r (tree* tp, 
       return NULL_TREE;
     }
   /* Only AGGR_INIT_EXPRs are interesting.  */
-  else if (TREE_CODE (*tp) != AGGR_INIT_EXPR)
+  else if (TREE_CODE_NOCHECK (*tp) != AGGR_INIT_EXPR)
     return NULL_TREE;
 
   simplify_aggr_init_expr (tp);
Index: cp/tree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/tree.c,v
retrieving revision 1.348
diff -u -d -p -r1.348 tree.c
--- cp/tree.c	22 Sep 2003 05:09:23 -0000	1.348
+++ cp/tree.c	7 Oct 2003 18:11:32 -0000
@@ -71,7 +71,37 @@ lvalue_p_1 (tree ref, 
   if (ref == current_class_ptr)
     return clk_none;
 
-  switch (TREE_CODE (ref))
+/* This is a definite problem case: we get here with the new WFL,
+   containing the CALL_EXPR - but the switch does not take WFL's
+   into account!  We get here from:
+#0  0x082477b8 in lvalue_p_1 (ref=0x40266380, treat_class_rvalues_as_lvalues=1)
+    at ../../../gcc/gcc-mainline/gcc/cp/tree.c:74
+#1  0x082489c0 in lvalue_p (ref=0x40266380)
+    at ../../../gcc/gcc-mainline/gcc/cp/tree.c:209
+#2  0x0804ce18 in standard_conversion (to=0x4026a57c, from=0x4026a57c, expr=0x40266380)
+    at ../../../gcc/gcc-mainline/gcc/cp/call.c:619
+#3  0x08050cdf in implicit_conversion (to=0x4026a57c, from=0x4026a57c, expr=0x40266380,
+    flags=3) at ../../../gcc/gcc-mainline/gcc/cp/call.c:1220
+#4  0x080516c6 in add_function_candidate (candidates=0xbfffea54, fn=0x402f4870,
+    ctype=0x0, arglist=0x402edb7c, access_path=0x0, conversion_path=0x0, flags=3)
+    at ../../../gcc/gcc-mainline/gcc/cp/call.c:1373
+#5  0x0805e210 in add_candidates (fns=0x402f4870, args=0x402edb7c, explicit_targs=0x0,
+    template_only=false, conversion_path=0x0, access_path=0x0, flags=3,
+    candidates=0xbfffea54) at ../../../gcc/gcc-mainline/gcc/cp/call.c:3461
+#6  0x08059990 in perform_overload_resolution (fn=0x402f4870, args=0x402edb7c,
+    candidates=0xbfffea54, any_viable_p=0xbfffea4f)
+    at ../../../gcc/gcc-mainline/gcc/cp/call.c:2705
+#7  0x08059a2c in build_new_function_call (fn=0x402f4870, args=0x402edb7c)
+    at ../../../gcc/gcc-mainline/gcc/cp/call.c:2732
+#8  0x082407be in finish_call_expr (fn=0x402f4870, args=0x402edb7c,
+    disallow_virtual=false, koenig_p=true)
+    at ../../../gcc/gcc-mainline/gcc/cp/semantics.c:1693
+#9  0x081b5c7f in cp_parser_postfix_expression (parser=0x402f9140, address_p=false)
+    at ../../../gcc/gcc-mainline/gcc/cp/parser.c:3588
+#10 0x081b6896 in cp_parser_unary_expression (parser=0x402f9140, address_p=false)
+    at ../../../gcc/gcc-mainline/gcc/cp/parser.c:4122
+*/
+  switch (TREE_CODE_NOCHECK (ref))
     {
       /* preincrements and predecrements are valid lvals, provided
 	 what they refer to are valid lvals.  */
@@ -151,6 +181,14 @@ lvalue_p_1 (tree ref, 
     case TARGET_EXPR:
       return treat_class_rvalues_as_lvalues ? clk_class : clk_none;
 
+    case EXPR_WITH_FILE_LOCATION:
+      ++nocheck;
+      if (TREE_CODE (EXPR_WFL_NODE (ref)) != CALL_EXPR)
+      {
+	--nocheck;
+        break;
+      }
+      --nocheck;
     case CALL_EXPR:
     case VA_ARG_EXPR:
       /* Any class-valued call would be wrapped in a TARGET_EXPR.  */
@@ -1180,7 +1218,7 @@ bot_manip (tree* tp, int* walk_subtrees,
       *walk_subtrees = 0;
       return NULL_TREE;
     }
-  if (TREE_CODE (t) == TARGET_EXPR)
+  if (TREE_CODE_NOCHECK (t) == TARGET_EXPR)
     {
       tree u;
 
@@ -1209,8 +1247,44 @@ bot_manip (tree* tp, int* walk_subtrees,
       *walk_subtrees = 0;
       return NULL_TREE;
     }
-  else if (TREE_CODE (t) == CALL_EXPR)
+/* Another definite problem case: we get here with a EXPR_WITH_FILE_LOCATION
+   that wraps a CALL_EXPR, but do not test for EXPR_WITH_FILE_LOCATION.
+#0  0x081ca56a in bot_manip (tp=0xbfffe970, walk_subtrees=0xbfffe93c, data=0x8775ce0)
+    at ../../../gcc/gcc-mainline/gcc/cp/tree.c:1246
+#1  0x0856936a in walk_tree (tp=0xbfffe970, func=0x81c9e1d <bot_manip>, data=0x8775ce0,
+    htab_=0x0) at ../../../gcc/gcc-mainline/gcc/tree-inline.c:1721
+#2  0x081ca7bb in break_out_target_exprs (t=0x40266360)
+    at ../../../gcc/gcc-mainline/gcc/cp/tree.c:1290
+#3  0x0805dff2 in convert_default_arg (type=0x4026a57c, arg=0x40266360, fn=0x402f4ec4,
+    parmnum=1) at ../../../gcc/gcc-mainline/gcc/cp/call.c:4307
+#4  0x0805f120 in build_over_call (cand=0x402ff0a0, flags=3)
+    at ../../../gcc/gcc-mainline/gcc/cp/call.c:4477
+#5  0x08056ccd in build_new_function_call (fn=0x402f4ec4, args=0x402fe1f4)
+    at ../../../gcc/gcc-mainline/gcc/cp/call.c:2751
+#6  0x081beefc in finish_call_expr (fn=0x402f4ec4, args=0x402fe1f4,
+    disallow_virtual=false, koenig_p=true)
+    at ../../../gcc/gcc-mainline/gcc/cp/semantics.c:1693
+#7  0x08154531 in cp_parser_postfix_expression (parser=0x402f9140, address_p=false)
+    at ../../../gcc/gcc-mainline/gcc/cp/parser.c:3588
+#8  0x081550e8 in cp_parser_unary_expression (parser=0x402f9140, address_p=false)
+    at ../../../gcc/gcc-mainline/gcc/cp/parser.c:4122
+#9  0x08155832 in cp_parser_cast_expression (parser=0x402f9140, address_p=false)
+    at ../../../gcc/gcc-mainline/gcc/cp/parser.c:4546
+#10 0x08163686 in cp_parser_simple_cast_expression (parser=0x402f9140)
+    at ../../../gcc/gcc-mainline/gcc/cp/parser.c:13791
+*/
+  else if (TREE_CODE_NOCHECK (t) == CALL_EXPR)
     mark_used (TREE_OPERAND (TREE_OPERAND (t, 0), 0));
+  else if (TREE_CODE_NOCHECK (t) == EXPR_WITH_FILE_LOCATION)
+  {
+    /* This is just a hack to get past this point; unwrap the WFL. */
+    tree exp;
+    ++nocheck;
+    exp = EXPR_WFL_NODE(t);
+    --nocheck;
+    if (TREE_CODE_NOCHECK (exp) == CALL_EXPR)
+      mark_used (TREE_OPERAND (TREE_OPERAND (exp, 0), 0));
+  }
 
   /* Make a copy of this node.  */
   return copy_tree_r (tp, walk_subtrees, NULL);
@@ -1227,7 +1301,7 @@ bot_replace (tree* t, 
 {
   splay_tree target_remap = ((splay_tree) data);
 
-  if (TREE_CODE (*t) == VAR_DECL)
+  if (TREE_CODE_NOCHECK (*t) == VAR_DECL)
     {
       splay_tree_node n = splay_tree_lookup (target_remap,
 					     (splay_tree_key) *t);
@@ -1632,7 +1706,7 @@ tree
 lvalue_type (tree arg)
 {
   tree type = TREE_TYPE (arg);
-  if (TREE_CODE (arg) == OVERLOAD)
+  if (TREE_CODE_NOCHECK (arg) == OVERLOAD)
     type = unknown_type_node;
   return type;
 }
@@ -2086,7 +2160,7 @@ cp_add_pending_fn_decls (void* fns_p, tr
 int
 cp_is_overload_p (tree t)
 {
-  return TREE_CODE (t) == OVERLOAD;
+  return TREE_CODE_NOCHECK (t) == OVERLOAD;
 }
 
 /* Determine whether VAR is a declaration of an automatic variable in
Index: cp/typeck.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
retrieving revision 1.505
diff -u -d -p -r1.505 typeck.c
--- cp/typeck.c	28 Sep 2003 19:09:53 -0000	1.505
+++ cp/typeck.c	7 Oct 2003 18:11:37 -0000
@@ -163,8 +163,8 @@ complete_type_or_diagnostic (tree type, 
 int
 type_unknown_p (tree exp)
 {
-  return (TREE_CODE (exp) == OVERLOAD
-          || TREE_CODE (exp) == TREE_LIST
+  return (TREE_CODE_NOCHECK (exp) == OVERLOAD
+          || TREE_CODE_NOCHECK (exp) == TREE_LIST
 	  || TREE_TYPE (exp) == unknown_type_node);
 }
 
@@ -5573,7 +5573,7 @@ convert_for_assignment (tree type, tree 
   register enum tree_code coder;
 
   /* Strip NON_LVALUE_EXPRs since we aren't using as an lvalue.  */
-  if (TREE_CODE (rhs) == NON_LVALUE_EXPR)
+  if (TREE_CODE_NOCHECK (rhs) == NON_LVALUE_EXPR)
     rhs = TREE_OPERAND (rhs, 0);
 
   rhstype = TREE_TYPE (rhs);
@@ -5586,7 +5586,7 @@ convert_for_assignment (tree type, tree 
 
   if (rhs == error_mark_node || rhstype == error_mark_node)
     return error_mark_node;
-  if (TREE_CODE (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node)
+  if (TREE_CODE_NOCHECK (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node)
     return error_mark_node;
 
   rhs = dubious_conversion_warnings (type, rhs, errtype, fndecl, parmnum);
@@ -5599,7 +5599,7 @@ convert_for_assignment (tree type, tree 
     }
 
   /* Simplify the RHS if possible.  */
-  if (TREE_CODE (rhs) == CONST_DECL)
+  if (TREE_CODE_NOCHECK (rhs) == CONST_DECL)
     rhs = DECL_INITIAL (rhs);
   
   /* We do not use decl_constant_value here because of this case:
@@ -5674,13 +5674,13 @@ convert_for_initialization (tree exp, tr
 
   /* build_c_cast puts on a NOP_EXPR to make the result not an lvalue.
      Strip such NOP_EXPRs, since RHS is used in non-lvalue context.  */
-  if (TREE_CODE (rhs) == NOP_EXPR
+  if (TREE_CODE_NOCHECK (rhs) == NOP_EXPR
       && TREE_TYPE (rhs) == TREE_TYPE (TREE_OPERAND (rhs, 0))
       && codel != REFERENCE_TYPE)
     rhs = TREE_OPERAND (rhs, 0);
 
   if (rhs == error_mark_node
-      || (TREE_CODE (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node))
+      || (TREE_CODE_NOCHECK (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node))
     return error_mark_node;
 
   if (TREE_CODE (TREE_TYPE (rhs)) == REFERENCE_TYPE)



While the above patch is enough to garantee correct compilation
(despite the wrapping of CALL_EXPR inside a WFL) for the simple
test case, it is NOT enough in general.  When using this compiler
to compile a big C++ source file, the following additional
locations were printed that need manual checking before we can
be sure that the wrapping doesn't do any harm (see patch above
for tree.h so see where TREE_CODE: is printed):

TREE_CODE: ../../../gcc/gcc-mainline/gcc/builtins.c:5331
TREE_CODE: ../../../gcc/gcc-mainline/gcc/c-common.c:1234
TREE_CODE: ../../../gcc/gcc-mainline/gcc/c-common.c:1235
TREE_CODE: ../../../gcc/gcc-mainline/gcc/c-common.c:1243
TREE_CODE: ../../../gcc/gcc-mainline/gcc/c-common.c:1244
TREE_CODE: ../../../gcc/gcc-mainline/gcc/c-common.c:1252
TREE_CODE: ../../../gcc/gcc-mainline/gcc/c-common.c:2254
TREE_CODE: ../../../gcc/gcc-mainline/gcc/c-common.c:2602
TREE_CODE: ../../../gcc/gcc-mainline/gcc/c-common.c:2627
TREE_CODE: ../../../gcc/gcc-mainline/gcc/convert.c:102
TREE_CODE: ../../../gcc/gcc-mainline/gcc/convert.c:204
TREE_CODE: ../../../gcc/gcc-mainline/gcc/convert.c:287
TREE_CODE: ../../../gcc/gcc-mainline/gcc/convert.c:85
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/cvt.c:702
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/cvt.c:704
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/cvt.c:808
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/cvt.c:890
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/decl.c:14367
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/decl.c:7548
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/decl.c:7573
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/decl.c:7613
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/decl.c:7875
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/semantics.c:1195
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/semantics.c:1199
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:349
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:882
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:884
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:886
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:887
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:888
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:889
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:896
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:898
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:901
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:902
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/tree.c:903
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck2.c:329
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck2.c:353
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck2.c:400
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck2.c:404
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck2.c:416
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck2.c:419
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck2.c:504
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:1290
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:1426
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:2828
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:3152
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:3294
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:3295
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:4406
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:4758
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:4866
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5182
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5190
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5543
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5810
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5812
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5813
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5814
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5820
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:5987
TREE_CODE: ../../../gcc/gcc-mainline/gcc/cp/typeck.c:6028
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:1862
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:1941
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:2005
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:2131
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:2336
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:3000
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:3229
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:4152
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:4904
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:4990
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:4992
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:4995
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:4997
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5000
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5002
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5066
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5071
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5072
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5100
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5105
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5106
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5147
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5151
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5169
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5172
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5214
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5220
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5224
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5230
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5236
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5237
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5247
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5250
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5251
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5286
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5287
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5364
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5387
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5621
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5632
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5647
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5679
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:5815
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:6065
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:6069
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:6770
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:6794
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:6910
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:6921
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7007
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7077
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7143
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7144
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7167
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7287
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7288
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7289
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7299
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7309
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7317
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7327
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7328
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7329
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7355
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7389
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7390
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7391
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7392
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7406
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7413
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7428
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7445
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7529
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7618
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7620
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7666
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7713
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7737
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7774
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7785
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:7948
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:976
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:978
TREE_CODE: ../../../gcc/gcc-mainline/gcc/fold-const.c:984
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:1474
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:1886
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:1913
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:1916
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:1920
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:4129
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:4169
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:588
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:592
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:605
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:609
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:812
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:815
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:827
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:830
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:857
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree.c:860
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree-inline.c:428
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree-inline.c:492
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree-inline.c:495
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree-inline.c:501
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree-inline.c:531
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree-inline.c:554
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree-inline.c:580
TREE_CODE: ../../../gcc/gcc-mainline/gcc/tree-inline.c:890
TREE_CODE: gtype-cp.h:218
TREE_CODE: gtype-cp.h:241

So, at least one hunk would/should be added to the diff
above for each line printed here.

... that, and the convincing fact that despite all the care
that I took the compiler DID crash (just to prove how dangerous
this is?), make be ask you to reconsider and let me solve adding
a location_t to CALL_EXPR-essions differently.  Not by means of WFL.

What is your opinion?  Shall we go for adding the location_t
to tree_exp, shall I add it after the normal tree_exp struct
for CALL_EXPR only (less memory usage and still totally safe),
or do you have other ideas?

-- 
Carlo Wood <carlo@alinoe.com>


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