[Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) with const int.

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Dec 19 05:22:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-19 05:22 -------
This patch fixes it but I don't know if it is the correct fix, I have not bootstrapped it yet but it works as it 
removes the constraint when not to add SAVE_EXPR around the expression:
Index: tree.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/tree.c,v
retrieving revision 1.457
diff -u -p -r1.457 tree.c
--- tree.c      17 Dec 2004 08:17:01 -0000      1.457
+++ tree.c      19 Dec 2004 05:21:23 -0000
@@ -1669,7 +1669,6 @@ save_expr (tree expr)
   inner = skip_simple_arithmetic (t);
 
   if (TREE_INVARIANT (inner)
-      || (TREE_READONLY (inner) && ! TREE_SIDE_EFFECTS (inner))
       || TREE_CODE (inner) == SAVE_EXPR
       || TREE_CODE (inner) == ERROR_MARK)
     return t;

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067



More information about the Gcc-bugs mailing list