[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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=32104action=edit gcc49-pr59776.patch So, do we want to do this instead? In this particular case, even no DW_OP_GNU_reinterpret is needed.
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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.
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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.
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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.0 +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); ?
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776 --- Comment #12 from Richard Henderson rth at gcc dot gnu.org --- Works for me.
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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=207695root=gccview=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
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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.
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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.
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59776 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2014-01-12 CC||mpolacek at gcc dot gnu.org Component|c |middle-end Target Milestone|--- |4.8.4 Summary|gcc -g -O1 ICE in |[4.8/4.9 Regression] gcc -g |expand_debug_locations, at |-O1 ICE in |cfgexpand.c:3865|expand_debug_locations, at ||cfgexpand.c:3865 Ever confirmed|0 |1 --- Comment #1 from Marek Polacek mpolacek at gcc dot gnu.org --- Confirmed.
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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; }
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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.
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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?
[Bug middle-end/59776] [4.8/4.9 Regression] gcc -g -O1 ICE in expand_debug_locations, at cfgexpand.c:3865
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.