public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/55862] New: ICE in compute_antic, at tree-ssa-pre.c:2495 @ 2013-01-03 14:13 antoine.balestrat at gmail dot com 2013-01-03 16:20 ` [Bug tree-optimization/55862] [4.8 Regression] " rguenth at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: antoine.balestrat at gmail dot com @ 2013-01-03 14:13 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55862 Bug #: 55862 Summary: ICE in compute_antic, at tree-ssa-pre.c:2495 Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: antoine.balestrat@gmail.com Hi ! The following testcase makes GCC 4.8.0 as of 20130103 crash at -O2. It may be related to PR55348 (which was probably a dup anyway). $ cat antic.c int g, a, *b; void f(void) { int *p; if(g) { int **k = &p; if(0) { while(g++) for(*b = 0; *b; b++) label1: ; } for(; g; p++) for(a = 0; a < 1; a++) { int *c = p; label2: if(a < 1) *c = 0; } goto label1; } goto label2; } $ xgcc -O2 -w antic.c antic.c: In function ‘f’: antic.c:3:6: internal compiler error: in compute_antic, at tree-ssa-pre.c:2495 void f(void) ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/55862] [4.8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2495 2013-01-03 14:13 [Bug tree-optimization/55862] New: ICE in compute_antic, at tree-ssa-pre.c:2495 antoine.balestrat at gmail dot com @ 2013-01-03 16:20 ` rguenth at gcc dot gnu.org 2013-01-04 11:59 ` rguenth at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2013-01-03 16:20 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55862 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2013-01-03 Known to work| |4.7.3 AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | Target Milestone|--- |4.8.0 Summary|ICE in compute_antic, at |[4.8 Regression] ICE in |tree-ssa-pre.c:2495 |compute_antic, at | |tree-ssa-pre.c:2495 Ever Confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-03 16:19:41 UTC --- Mine. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/55862] [4.8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2495 2013-01-03 14:13 [Bug tree-optimization/55862] New: ICE in compute_antic, at tree-ssa-pre.c:2495 antoine.balestrat at gmail dot com 2013-01-03 16:20 ` [Bug tree-optimization/55862] [4.8 Regression] " rguenth at gcc dot gnu.org @ 2013-01-04 11:59 ` rguenth at gcc dot gnu.org 2013-01-04 13:29 ` rguenth at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2013-01-04 11:59 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55862 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-04 11:59:42 UTC --- For BB 7 we iterate between (gdb) call debug_bitmap_set (old) debug[0] := { {mem_ref<0B>,addr_expr<&g>}@.MEM_7 (0018), {plus_expr,g.0_18,1} (0031), {plus_expr,g.4_37,1} (0046), {mem_ref<0B>,addr_expr<&b>}@.MEM_7 (0049), {pointer_plus_expr,pretmp_45,4} (0050) } (gdb) call debug_bitmap_set (((bb_value_sets_t) ((block)->aux))->antic_in) debug[0] := { p_25 (0024), {mem_ref<0B>,addr_expr<&g>}@.MEM_7 (0018), {plus_expr,g.0_18,1} (0031), {plus_expr,g.4_37,1} (0046), {mem_ref<0B>,addr_expr<&b>}@.MEM_7 (0049), {pointer_plus_expr,pretmp_45,4} (0050) } (gdb) call debug_bitmap_set (old) debug[0] := { p_25 (0024), {mem_ref<0B>,addr_expr<&g>}@.MEM_7 (0018), {plus_expr,g.0_18,1} (0031), {plus_expr,g.4_37,1} (0046), {mem_ref<0B>,addr_expr<&b>}@.MEM_7 (0049), {pointer_plus_expr,pretmp_45,4} (0050) } (gdb) call debug_bitmap_set (((bb_value_sets_t) ((block)->aux))->antic_in) debug[0] := { {mem_ref<0B>,addr_expr<&g>}@.MEM_7 (0018), {plus_expr,g.0_18,1} (0031), {plus_expr,g.4_37,1} (0046), {mem_ref<0B>,addr_expr<&b>}@.MEM_7 (0049), {pointer_plus_expr,pretmp_45,4} (0050) } (gdb) call debug_bitmap_set (old) debug[0] := { {mem_ref<0B>,addr_expr<&g>}@.MEM_7 (0018), {plus_expr,g.0_18,1} (0031), {plus_expr,g.4_37,1} (0046), {mem_ref<0B>,addr_expr<&b>}@.MEM_7 (0049), {pointer_plus_expr,pretmp_45,4} (0050) } (gdb) call debug_bitmap_set (((bb_value_sets_t) ((block)->aux))->antic_in) debug[0] := { p_25 (0024), {mem_ref<0B>,addr_expr<&g>}@.MEM_7 (0018), {plus_expr,g.0_18,1} (0031), {plus_expr,g.4_37,1} (0046), {mem_ref<0B>,addr_expr<&b>}@.MEM_7 (0049), {pointer_plus_expr,pretmp_45,4} (0050) } The CFG is quite complicated ... easier to read testcase: int g, a, *b; void f(void) { int *p; if(g) { int **k = &p; for(; g; p++) for(a = 0; a < 1; a++) { int *c = p; label2: if(a < 1) *c = 0; } goto label1; while(g++) for(*b = 0; *b; b++) label1: ; } goto label2; } I have a patch. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/55862] [4.8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2495 2013-01-03 14:13 [Bug tree-optimization/55862] New: ICE in compute_antic, at tree-ssa-pre.c:2495 antoine.balestrat at gmail dot com 2013-01-03 16:20 ` [Bug tree-optimization/55862] [4.8 Regression] " rguenth at gcc dot gnu.org 2013-01-04 11:59 ` rguenth at gcc dot gnu.org @ 2013-01-04 13:29 ` rguenth at gcc dot gnu.org 2013-01-04 13:29 ` rguenth at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2013-01-04 13:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55862 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-04 13:29:21 UTC --- Fixed. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/55862] [4.8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2495 2013-01-03 14:13 [Bug tree-optimization/55862] New: ICE in compute_antic, at tree-ssa-pre.c:2495 antoine.balestrat at gmail dot com ` (2 preceding siblings ...) 2013-01-04 13:29 ` rguenth at gcc dot gnu.org @ 2013-01-04 13:29 ` rguenth at gcc dot gnu.org 2013-01-07 13:50 ` rguenth at gcc dot gnu.org 2013-01-07 14:06 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2013-01-04 13:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55862 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-04 13:29:02 UTC --- Author: rguenth Date: Fri Jan 4 13:28:53 2013 New Revision: 194906 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194906 Log: 2013-01-04 Richard Biener <rguenther@suse.de> PR tree-optimization/55862 * tree-ssa-pre.c (phi_translate_1): Valueize SSA names after translating them through PHI nodes. * gcc.dg/torture/pr55862.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/torture/pr55862.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-pre.c ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/55862] [4.8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2495 2013-01-03 14:13 [Bug tree-optimization/55862] New: ICE in compute_antic, at tree-ssa-pre.c:2495 antoine.balestrat at gmail dot com ` (3 preceding siblings ...) 2013-01-04 13:29 ` rguenth at gcc dot gnu.org @ 2013-01-07 13:50 ` rguenth at gcc dot gnu.org 2013-01-07 14:06 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2013-01-07 13:50 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55862 --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-07 13:50:03 UTC --- Followup, because of PR55888. We have <bb 11>: # c_21 = PHI <p_66(18), p_67(3)> # p_41 = PHI <p_66(18), p_67(3)> a.1_42 = a; goto <bb 5>; <bb 5>: # c_57 = PHI <c_1(16), c_21(11)> # a.1_63 = PHI <a.1_25(16), a.1_42(11)> # p_65 = PHI <p_30(16), p_41(11)> *c_57 = 0; and when PHI-translating p_65 we end up with p_41 (or c_21 value-ized). But AVAIL_OUT of BB 11 is: debug[0] := { c_12(D) (0014), p_32(D) (0027), g.0_11 (0013), c_21 (0033), a.1_42 (0034) } thus contains _only_ c_21 (well, exactly one expression per value - it is a value set after all). And clean via valid_in_sets does case NAME: return bitmap_set_contains_expr (AVAIL_OUT (block), expr); thus checks for the expression availability. That looks bogus to me. Instead we should verify if there is a leader for the NAME in AVAIL_OUT. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/55862] [4.8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2495 2013-01-03 14:13 [Bug tree-optimization/55862] New: ICE in compute_antic, at tree-ssa-pre.c:2495 antoine.balestrat at gmail dot com ` (4 preceding siblings ...) 2013-01-07 13:50 ` rguenth at gcc dot gnu.org @ 2013-01-07 14:06 ` rguenth at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2013-01-07 14:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55862 --- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-07 14:06:32 UTC --- Author: rguenth Date: Mon Jan 7 14:06:26 2013 New Revision: 194971 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194971 Log: 2013-01-07 Richard Biener <rguenther@suse.de> PR tree-optimization/55888 PR tree-optimization/55862 * tree-ssa-pre.c (phi_translate_1): Revert previous change. (valid_in_sets): Check if a NAME has a leader in AVAIL_OUT, not if it is contained therein. * gcc.dg/torture/pr55888.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/torture/pr55888.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-pre.c ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-01-07 14:06 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-01-03 14:13 [Bug tree-optimization/55862] New: ICE in compute_antic, at tree-ssa-pre.c:2495 antoine.balestrat at gmail dot com 2013-01-03 16:20 ` [Bug tree-optimization/55862] [4.8 Regression] " rguenth at gcc dot gnu.org 2013-01-04 11:59 ` rguenth at gcc dot gnu.org 2013-01-04 13:29 ` rguenth at gcc dot gnu.org 2013-01-04 13:29 ` rguenth at gcc dot gnu.org 2013-01-07 13:50 ` rguenth at gcc dot gnu.org 2013-01-07 14:06 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).