* [Bug debug/18067] ICE at loc_descriptor_from_tree_1 in dwarf2out.c
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
@ 2004-10-19 23:06 ` phython at gcc dot gnu dot org
2004-10-19 23:12 ` pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: phython at gcc dot gnu dot org @ 2004-10-19 23:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From phython at gcc dot gnu dot org 2004-10-19 23:05 -------
Created an attachment (id=7379)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7379&action=view)
preprocessed source for snow.c
Compile with -O1 -g
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug debug/18067] ICE at loc_descriptor_from_tree_1 in dwarf2out.c
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
2004-10-19 23:06 ` [Bug debug/18067] " phython at gcc dot gnu dot org
@ 2004-10-19 23:12 ` pinskia at gcc dot gnu dot org
2004-10-19 23:14 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-19 23:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-19 23:12 -------
Might be related to PR 14900 or 17076 but I cannot reproduce this on powerpc-darwin (even after
supplying -gdwarf-2 since dwarf-2 is not default).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug debug/18067] ICE at loc_descriptor_from_tree_1 in dwarf2out.c
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
2004-10-19 23:06 ` [Bug debug/18067] " phython at gcc dot gnu dot org
2004-10-19 23:12 ` pinskia at gcc dot gnu dot org
@ 2004-10-19 23:14 ` pinskia at gcc dot gnu dot org
2004-10-19 23:43 ` [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-19 23:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-19 23:14 -------
I can produce with a cross to i686-pc-linux, reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA)
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-10-19 23:14 ` pinskia at gcc dot gnu dot org
@ 2004-10-19 23:43 ` pinskia at gcc dot gnu dot org
2004-10-19 23:49 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-19 23:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-19 23:43 -------
Here is the reduced testcase:
typedef unsigned int size_t;
extern void *memcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n) ;
int encode_q_branch(int level, unsigned char *t, int stride1)
{
const int block_w= level;
const int stride= stride1;
unsigned char current_mb[3][stride*block_w];
memcpy(¤t_mb[0][0], t, 1);
}
: Search converges between 2004-07-02-trunk (#477) and 2004-07-04-trunk (#478).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|debug |tree-optimization
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2004-10-19 23:43:07
date| |
Summary|ICE at |[4.0 Regression] ICE at
|loc_descriptor_from_tree_1 |loc_descriptor_from_tree_1
|in dwarf2out.c |in dwarf2out.c (VLA)
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA)
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-10-19 23:43 ` [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) pinskia at gcc dot gnu dot org
@ 2004-10-19 23:49 ` pinskia at gcc dot gnu dot org
2004-10-20 0:01 ` reichelt at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-19 23:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-19 23:49 -------
Oh, I forgot to say the problem is that we are not taking the variables in the size out of SSA form for
some reason.
Here is the tree level at .vars which shows the problem:
saved_stack.3 = __builtin_stack_save ();
D.1135 = __builtin_alloca ((unsigned int) (level * stride1) * 3);
memcpy ((unsigned char *) (unsigned char[(unsigned int) (block_w_3 * stride_5 - 1)] *) (unsigned
char[2][(unsigned int) (block_w_3 * stride_5 - 1)] *) D.1135, t, 1);
__builtin_stack_restore (saved_stack.3);
Note the block_w_3 and stride_5.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA)
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-10-19 23:49 ` pinskia at gcc dot gnu dot org
@ 2004-10-20 0:01 ` reichelt at gcc dot gnu dot org
2004-10-31 16:33 ` phython at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-10-20 0:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-10-20 00:01 -------
Here's an even shorter example (for i686-pc-linux-gnu):
=====================
void foo(int i)
{
const int j=i+1;
int a[1][j*j];
}
=====================
The regression seems to appear a little later with this example:
: Search converges between 2004-07-16-trunk (#487) and 2004-07-17-trunk (#488).
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Keywords| |monitored
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA)
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-10-20 0:01 ` reichelt at gcc dot gnu dot org
@ 2004-10-31 16:33 ` phython at gcc dot gnu dot org
2004-10-31 17:06 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: phython at gcc dot gnu dot org @ 2004-10-31 16:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From phython at gcc dot gnu dot org 2004-10-31 16:33 -------
I hacked around the ICE by doing nothing for SSA_NAMEs in
loc_descriptor_from_tree_1. The optimized dump clearly shows that SSA_NAMES in
declarations are not rewritten out of SSA.
;; Function foo (foo)
foo (i)
{
int a[D.1141][D.1138_9 * 4];
const int j;
void * saved_stack.1;
void * D.1143;
int[0][(unsigned int) (j_3 * j_3 - 1)] * a.0;
unsigned int D.1141;
bit_size_type D.1140;
bit_size_type D.1139;
unsigned int D.1138;
int D.1137;
<bb 0>:
saved_stack.1 = __builtin_stack_save ();
j = i + 1;
D.1143 = __builtin_alloca ((unsigned int) (j * j) * 4);
__builtin_stack_restore (saved_stack.1);
return;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA)
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-10-31 16:33 ` phython at gcc dot gnu dot org
@ 2004-10-31 17:06 ` pinskia at gcc dot gnu dot org
2004-11-17 15:13 ` phython at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-31 17:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-10-31 17:05 -------
*** Bug 18253 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |atmosfear at users dot
| |sourceforge dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA)
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-10-31 17:06 ` pinskia at gcc dot gnu dot org
@ 2004-11-17 15:13 ` phython at gcc dot gnu dot org
2004-12-19 5:13 ` [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
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: phython at gcc dot gnu dot org @ 2004-11-17 15:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From phython at gcc dot gnu dot org 2004-11-17 15:13 -------
As Andrew mentioned, this bug affects more than powerpc. An enable-checking
build is needed to reproduce this bug. With a disable-checking build the
debugging code ignores SSA_NAMEs.
--
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|ppc-linux |
GCC host triplet|ppc-linux |
GCC target triplet|ppc-linux |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) with const int.
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-11-17 15:13 ` phython at gcc dot gnu dot org
@ 2004-12-19 5:13 ` pinskia at gcc dot gnu dot org
2004-12-19 5:22 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-19 5:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-19 05:13 -------
For some reason the const makes a difference.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0 Regression] ICE at |[4.0 Regression] ICE at
|loc_descriptor_from_tree_1 |loc_descriptor_from_tree_1
|in dwarf2out.c (VLA) |in dwarf2out.c (VLA) with
| |const int.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) with const int.
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-12-19 5:13 ` [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
@ 2004-12-19 5:22 ` pinskia at gcc dot gnu dot org
2004-12-19 5:52 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-19 5:22 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) with const int.
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-12-19 5:22 ` pinskia at gcc dot gnu dot org
@ 2004-12-19 5:52 ` pinskia at gcc dot gnu dot org
2004-12-19 5:52 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-19 5:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-19 05:51 -------
I decided after all this was the correct fix and it had been running the bootstrap/testing already and
just finished so I decided to post it.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01376.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) with const int.
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-12-19 5:52 ` pinskia at gcc dot gnu dot org
@ 2004-12-19 5:52 ` pinskia at gcc dot gnu dot org
2004-12-19 21:08 ` cvs-commit at gcc dot gnu dot org
2004-12-19 21:10 ` rth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-19 5:52 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) with const int.
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (12 preceding siblings ...)
2004-12-19 5:52 ` pinskia at gcc dot gnu dot org
@ 2004-12-19 21:08 ` cvs-commit at gcc dot gnu dot org
2004-12-19 21:10 ` rth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-19 21:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-19 21:08 -------
Subject: Bug 18067
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: rth@gcc.gnu.org 2004-12-19 21:08:34
Modified files:
gcc : ChangeLog stor-layout.c
Added files:
gcc/testsuite/gcc.dg/debug: 20041219-1.c
Log message:
PR 18067
* stor-layout.c (variable_size): Force creation of a SAVE_EXPR.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6891&r2=2.6892
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/stor-layout.c.diff?cvsroot=gcc&r1=1.220&r2=1.221
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/debug/20041219-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18067] [4.0 Regression] ICE at loc_descriptor_from_tree_1 in dwarf2out.c (VLA) with const int.
2004-10-19 23:04 [Bug debug/18067] New: ICE at loc_descriptor_from_tree_1 in dwarf2out.c phython at gcc dot gnu dot org
` (13 preceding siblings ...)
2004-12-19 21:08 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-19 21:10 ` rth at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-12-19 21:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rth at gcc dot gnu dot org 2004-12-19 21:10 -------
fixed: http://gcc.gnu.org/ml/gcc-patches/2004-12/msg01377.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18067
^ permalink raw reply [flat|nested] 16+ messages in thread