* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
@ 2014-01-12 18:19 ` mpolacek at gcc dot gnu.org
2014-01-12 20:38 ` zeccav at gmail dot com
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-01-12 18:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
struct S { float f, g; };
void
sub_ (struct S *p)
{
struct S s1, s2;
s1 = *p;
*(int *) &s2.f = 0;
s2 = s1;
}
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
2014-01-12 18:19 ` [Bug middle-end/59776] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
@ 2014-01-12 20:38 ` zeccav at gmail dot com
2014-01-12 21:48 ` mpolacek at gcc dot gnu.org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: zeccav at gmail dot com @ 2014-01-12 20:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #3 from Vittorio Zecca <zeccav at gmail dot com> ---
Missing right brace at end of code.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
2014-01-12 18:19 ` [Bug middle-end/59776] [4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
2014-01-12 20:38 ` zeccav at gmail dot com
@ 2014-01-12 21:48 ` mpolacek at gcc dot gnu.org
2014-01-13 6:57 ` zeccav at gmail dot com
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-01-12 21:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Vittorio Zecca from comment #3)
> Missing right brace at end of code.
What do you mean?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (2 preceding siblings ...)
2014-01-12 21:48 ` mpolacek at gcc dot gnu.org
@ 2014-01-13 6:57 ` zeccav at gmail dot com
2014-01-13 22:47 ` mpolacek at gcc dot gnu.org
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: zeccav at gmail dot com @ 2014-01-13 6:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #5 from Vittorio Zecca <zeccav at gmail dot com> ---
I am sorry I was not clear enough, in your shorter test case, after "s2 = s1;"
there is a right brace "}" missing.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (3 preceding siblings ...)
2014-01-13 6:57 ` zeccav at gmail dot com
@ 2014-01-13 22:47 ` mpolacek at gcc dot gnu.org
2014-01-31 11:31 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-01-13 22:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu.org
--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r195015.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (4 preceding siblings ...)
2014-01-13 22:47 ` mpolacek at gcc dot gnu.org
@ 2014-01-31 11:31 ` rguenth at gcc dot gnu.org
2014-02-06 16:58 ` mpolacek at gcc dot gnu.org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-31 11:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (5 preceding siblings ...)
2014-01-31 11:31 ` rguenth at gcc dot gnu.org
@ 2014-02-06 16:58 ` mpolacek at gcc dot gnu.org
2014-02-07 19:36 ` rth at gcc dot gnu.org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-02-06 16:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P1
Version|4.8.2 |4.9.0
Target Milestone|4.8.4 |4.9.0
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (6 preceding siblings ...)
2014-02-06 16:58 ` mpolacek at gcc dot gnu.org
@ 2014-02-07 19:36 ` rth at gcc dot gnu.org
2014-02-11 13:49 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rth at gcc dot gnu.org @ 2014-02-07 19:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #7 from Richard Henderson <rth at gcc dot gnu.org> ---
Definitely SRA's fault. See
http://gcc.gnu.org/ml/gcc-patches/2014-02/msg00489.html
for analysis, and the hackiest of patches.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (7 preceding siblings ...)
2014-02-07 19:36 ` rth at gcc dot gnu.org
@ 2014-02-11 13:49 ` jakub at gcc dot gnu.org
2014-02-11 14:11 ` jamborm at gcc dot gnu.org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-11 13:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32104
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32104&action=edit
gcc49-pr59776.patch
So, do we want to do this instead? In this particular case, even no
DW_OP_GNU_reinterpret is needed.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (8 preceding siblings ...)
2014-02-11 13:49 ` jakub at gcc dot gnu.org
@ 2014-02-11 14:11 ` jamborm at gcc dot gnu.org
2014-02-11 14:37 ` rth at gcc dot gnu.org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-02-11 14:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #9 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> Created attachment 32104 [details]
> gcc49-pr59776.patch
>
> So, do we want to do this instead? In this particular case, even no
> DW_OP_GNU_reinterpret is needed.
Yes, thanks a lot.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (9 preceding siblings ...)
2014-02-11 14:11 ` jamborm at gcc dot gnu.org
@ 2014-02-11 14:37 ` rth at gcc dot gnu.org
2014-02-11 14:42 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rth at gcc dot gnu.org @ 2014-02-11 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #10 from Richard Henderson <rth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #8)
> So, do we want to do this instead? In this particular case, even no
> DW_OP_GNU_reinterpret is needed.
Well, except for the whole dhrs = NULL_TREE thing on the previous line.
Either we need a check for that on the IF, or that line really needs to
be a gcc_unreachable.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (10 preceding siblings ...)
2014-02-11 14:37 ` rth at gcc dot gnu.org
@ 2014-02-11 14:42 ` jakub at gcc dot gnu.org
2014-02-11 14:47 ` rth at gcc dot gnu.org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-11 14:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So:
--- gcc/tree-sra.c.jj 2014-02-08 00:53:46.000000000 +0100
+++ gcc/tree-sra.c 2014-02-11 14:31:51.469937602 +0100
@@ -2950,6 +2950,10 @@ load_assign_lhs_subreplacements (struct
lacc);
else
drhs = NULL_TREE;
+ if (drhs
+ && !useless_type_conversion_p (lacc->type, TREE_TYPE (drhs)))
+ drhs = fold_build1_loc (loc, VIEW_CONVERT_EXPR,
+ lacc->type, drhs);
ds = gimple_build_debug_bind (get_access_replacement (lacc),
drhs, gsi_stmt (*old_gsi));
gsi_insert_after (new_gsi, ds, GSI_NEW_STMT);
?
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (11 preceding siblings ...)
2014-02-11 14:42 ` jakub at gcc dot gnu.org
@ 2014-02-11 14:47 ` rth at gcc dot gnu.org
2014-02-11 17:47 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rth at gcc dot gnu.org @ 2014-02-11 14:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #12 from Richard Henderson <rth at gcc dot gnu.org> ---
Works for me.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (12 preceding siblings ...)
2014-02-11 14:47 ` rth at gcc dot gnu.org
@ 2014-02-11 17:47 ` jakub at gcc dot gnu.org
2014-02-11 17:48 ` [Bug middle-end/59776] [4.8 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-11 17:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Feb 11 17:46:34 2014
New Revision: 207695
URL: http://gcc.gnu.org/viewcvs?rev=207695&root=gcc&view=rev
Log:
PR debug/59776
* tree-sra.c (load_assign_lhs_subreplacements): Add VIEW_CONVERT_EXPR
around drhs if type conversion to lacc->type is not useless.
* gcc.dg/guality/pr59776.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/guality/pr59776.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-sra.c
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (13 preceding siblings ...)
2014-02-11 17:47 ` jakub at gcc dot gnu.org
@ 2014-02-11 17:48 ` jakub at gcc dot gnu.org
2014-03-06 8:00 ` jakub at gcc dot gnu.org
2014-03-06 8:28 ` jakub at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-11 17:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P1 |P2
Status|NEW |ASSIGNED
Assignee|rth at gcc dot gnu.org |jakub at gcc dot gnu.org
Target Milestone|4.9.0 |4.8.3
Summary|[4.8/4.9 Regression] gcc -g |[4.8 Regression] gcc -g -O1
|-O1 ICE in |ICE in
|expand_debug_locations, at |expand_debug_locations, at
|cfgexpand.c:3865 |cfgexpand.c:3865
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed for the trunk so far.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (14 preceding siblings ...)
2014-02-11 17:48 ` [Bug middle-end/59776] [4.8 " jakub at gcc dot gnu.org
@ 2014-03-06 8:00 ` jakub at gcc dot gnu.org
2014-03-06 8:28 ` jakub at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-06 8:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar 6 07:59:29 2014
New Revision: 208366
URL: http://gcc.gnu.org/viewcvs?rev=208366&root=gcc&view=rev
Log:
Backport from mainline
2014-02-11 Richard Henderson <rth@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR debug/59776
* tree-sra.c (load_assign_lhs_subreplacements): Add VIEW_CONVERT_EXPR
around drhs if type conversion to lacc->type is not useless.
* gcc.dg/guality/pr59776.c: New test.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/guality/pr59776.c
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
branches/gcc-4_8-branch/gcc/tree-sra.c
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug middle-end/59776] [4.8 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
2014-01-12 17:35 [Bug c/59776] New: gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865 zeccav at gmail dot com
` (15 preceding siblings ...)
2014-03-06 8:00 ` jakub at gcc dot gnu.org
@ 2014-03-06 8:28 ` jakub at gcc dot gnu.org
16 siblings, 0 replies; 18+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-06 8:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 18+ messages in thread