[Bug tree-optimization/85168] New: ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85168 Bug ID: 85168 Summary: ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ivo.raisr at oracle dot com Target Milestone: --- Created attachment 43815 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43815&action=edit reproducer.c With gcc 8.0.1 built recently from SVN, I receive internal compiler error: SSA corruption when -O2 is used: void g(void) { ^ 0xdcec2e fail_abnormal_edge_coalesce ../../src/gcc/tree-ssa-coalesce.c:1012 0xdcec2e coalesce_partitions ../../src/gcc/tree-ssa-coalesce.c:1401 0xdcec2e coalesce_ssa_name() ../../src/gcc/tree-ssa-coalesce.c:1888 0xd6450e remove_ssa_form ../../src/gcc/tree-outof-ssa.c:948 0xd6450e rewrite_out_of_ssa(ssaexpand*) ../../src/gcc/tree-outof-ssa.c:1174 0x8b2820 execute ../../src/gcc/cfgexpand.c:6227 The full source module is not publicly available. I have creduce'd it to the following minimal form: typedef struct { struct { char a; } b; } c; int d, f; c *e; extern void i(void); void g(void) { c *h = e; if (f) { i(); h--; if (d) if (h->b.a) i(); } if (h->b.a) __builtin_setjmp(0); e = h; } The problem is reproducible with: $ gcc -fdump-rtl-expand-details -O2 -c but not with: $ gcc -fdump-rtl-expand-details -O1 -c
[Bug tree-optimization/85168] ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85168 Ivo Raisr changed: What|Removed |Added CC||ivo.raisr at oracle dot com --- Comment #1 from Ivo Raisr --- Debug output for rtl-expand shows: ... Partition map Partition 0 (h_5(ab) - 5 ) Partition 1 (h_6(ab) - 6 ) Partition 2 (h_7 - 7 ) Partition 3 (h_12(ab) - 12 ) Partition 4 (h_14(ab) - 14 ) Partition 5 (h_20 - 20 ) Partition 6 (pretmp_21 - 21 ) Partition 7 (pretmp_22 - 22 ) Partition 8 (pretmp_23 - 23 ) Partition 9 (prephitmp_24 - 24 ) Conflict graph: 3: 4 4: 3 ... Abnormal coalesce: (6)h_6(ab) & (12)h_12(ab) [map: 1, 3] : Success -> 1 Abnormal coalesce: (6)h_6(ab) & (14)h_14(ab) [map: 1, 4] : Fail due to conflict I am not sure if the conflict is because h_12 and h_14 are still live at the same time or that h_7 and h_20 are not marked abnormal.
[Bug tree-optimization/85168] [7 Regression] ICE in tree-ssa-coalesce.c: SSA corruption: Unable to coalesce ssa_names which are marked as MUST COALESCE when -O2 is used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85168 --- Comment #7 from Ivo Raisr --- Fix backported to 7.3.0 correctly compiles the original (huge) source module. Thank you, Richard.
[Bug tree-optimization/82244] New: -O2: ICE: tree check: expected ssa_name, have integer_cst in replace_uses_by, at tree-cfg.c:1904
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82244 Bug ID: 82244 Summary: -O2: ICE: tree check: expected ssa_name, have integer_cst in replace_uses_by, at tree-cfg.c:1904 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ivo.raisr at oracle dot com Target Milestone: --- Created attachment 42202 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42202&action=edit reduced.c (reformatted file to make it more readable) With gcc 8.0 (source snapshot gcc-8-20170827) we hit internal compiler error: during GIMPLE pass: vrp reduced.c:10:5: internal compiler error: tree check: expected ssa_name, have integer_cst in replace_uses_by, at tree-cfg.c:1904 int c(void) { ^ 0x78cc94 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc-8-20170827/gcc/tree.c:9076 0x6b6046 tree_check(tree_node*, char const*, int, char const*, tree_code) ../../gcc-8-20170827/gcc/tree.h:3098 0x6b6046 replace_uses_by(tree_node*, tree_node*) ../../gcc-8-20170827/gcc/tree-cfg.c:1904 0x7864c2 remove_range_assertions ../../gcc-8-20170827/gcc/tree-vrp.c:7044 0xf27c33 execute_vrp ../../gcc-8-20170827/gcc/tree-vrp.c:11463 0xf27c33 execute ../../gcc-8-20170827/gcc/tree-vrp.c:11547 Full pre-processed sources are not publicly available. C-reduce was able to produce "reduced.bare.c" which I slightly reformatted to make it more readable: "reduced.c". Both files attached. Reproduce as: $ gcc -c reduced.c -O2
[Bug tree-optimization/82244] -O2: ICE: tree check: expected ssa_name, have integer_cst in replace_uses_by, at tree-cfg.c:1904
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82244 Ivo Raisr changed: What|Removed |Added CC||ivo.raisr at oracle dot com --- Comment #1 from Ivo Raisr --- Created attachment 42203 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42203&action=edit reduced.bare.c (output produced by C-reduce)
[Bug tree-optimization/82244] -O2: ICE: tree check: expected ssa_name, have integer_cst in replace_uses_by, at tree-cfg.c:1904
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82244 --- Comment #2 from Ivo Raisr --- Reproducible with gcc 8.0 and 7.2. I was not able to reproduce it with 6.3.0.
[Bug tree-optimization/82276] New: -O2: ICE: SSA corruption during RTL pass: expand; at tree-ssa-coalesce.c:1010
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82276 Bug ID: 82276 Summary: -O2: ICE: SSA corruption during RTL pass: expand; at tree-ssa-coalesce.c:1010 Product: gcc Version: c++-concepts Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ivo.raisr at oracle dot com Target Milestone: --- With gcc 8.0 (SVN revision 252973 from 2017-09-19) we hit internal compiler error: Unable to coalesce ssa_names 8 and 28 which are marked as MUST COALESCE. f_8(ab) and f_28(ab) during RTL pass: expand reduced-2.c:12:6: internal compiler error: SSA corruption void c(void) { ^ 0xe23c9c fail_abnormal_edge_coalesce ../../gcc-trunk/gcc/tree-ssa-coalesce.c:1010 0xe23c9c coalesce_partitions ../../gcc-trunk/gcc/tree-ssa-coalesce.c:1399 0xe23c9c coalesce_ssa_name() ../../gcc-trunk/gcc/tree-ssa-coalesce.c:1886 0xdc997b remove_ssa_form ../../gcc-trunk/gcc/tree-outof-ssa.c:948 0xdc997b rewrite_out_of_ssa(ssaexpand*) ../../gcc-trunk/gcc/tree-outof-ssa.c:1172 0x992a90 execute ../../gcc-trunk/gcc/cfgexpand.c:6164 Full pre-processed source is not publicly available but it is the same one as for bug #82244. C-reduce was able to produce "reduced-2.bare.c" which I slightly reformatted to make it more readable: "reduced-2.c". Both files attached. Reproduce as: $ gcc -c reduced-2.c -O2
[Bug tree-optimization/82276] -O2: ICE: SSA corruption during RTL pass: expand; at tree-ssa-coalesce.c:1010
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82276 Ivo Raisr changed: What|Removed |Added CC||ivo.raisr at oracle dot com --- Comment #1 from Ivo Raisr --- Created attachment 42215 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42215&action=edit reduced-2.bare.c (output produced by C-reduce)
[Bug tree-optimization/82276] -O2: ICE: SSA corruption during RTL pass: expand; at tree-ssa-coalesce.c:1010
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82276 --- Comment #2 from Ivo Raisr --- Created attachment 42216 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42216&action=edit slightly reformatted output from C-reduce to make it more readable
[Bug tree-optimization/82276] -O2: ICE: SSA corruption during RTL pass: expand; at tree-ssa-coalesce.c:1010
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82276 --- Comment #3 from Ivo Raisr --- Reproducible with gcc 8.0 and 7.2. I was not able to reproduce it with 6.3.0.
[Bug tree-optimization/82337] New: -O2: ICE: SSA corruption at tree-ssa-coalesce.c:1010
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82337 Bug ID: 82337 Summary: -O2: ICE: SSA corruption at tree-ssa-coalesce.c:1010 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ivo.raisr at oracle dot com Target Milestone: --- With gcc 8.0, 7.2 and 6.3.1 we hit internal compiler error: Unable to coalesce ssa_names 7 and 15 which are marked as MUST COALESCE. i_7(ab) and i_15(ab) during RTL pass: expand reduced-3.c:12:6: internal compiler error: SSA corruption void g(void) { ^ 0xe24c8c fail_abnormal_edge_coalesce ../../gcc-trunk/gcc/tree-ssa-coalesce.c:1010 0xe24c8c coalesce_partitions ../../gcc-trunk/gcc/tree-ssa-coalesce.c:1399 0xe24c8c coalesce_ssa_name() ../../gcc-trunk/gcc/tree-ssa-coalesce.c:1886 0xdca93b remove_ssa_form ../../gcc-trunk/gcc/tree-outof-ssa.c:948 0xdca93b rewrite_out_of_ssa(ssaexpand*) ../../gcc-trunk/gcc/tree-outof-ssa.c:1172 0x992d70 execute ../../gcc-trunk/gcc/cfgexpand.c:6164 Full pre-processed sources are not publicly available. C-reduce was able to produce "reduced-3.bare.c" which I slightly reformatted to make it more readable: "reduced-3.c". Both files attached. Reproduce as: $ gcc -c reduced-3.c -O2
[Bug tree-optimization/82337] -O2: ICE: SSA corruption at tree-ssa-coalesce.c:1010
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82337 Ivo Raisr changed: What|Removed |Added CC||ivo.raisr at oracle dot com --- Comment #1 from Ivo Raisr --- Created attachment 42240 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42240&action=edit reduced-3.bare.c (output produced by C-reduce)
[Bug tree-optimization/82337] -O2: ICE: SSA corruption at tree-ssa-coalesce.c:1010
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82337 --- Comment #2 from Ivo Raisr --- Created attachment 42241 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42241&action=edit reduced-3.c (slightly reformatted source to make it more readable)
[Bug tree-optimization/82337] [5/6/7/8 Regression] ICE: SSA corruption at tree-ssa-coalesce.c:1010
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82337 --- Comment #10 from Ivo Raisr --- (In reply to Bill Schmidt from comment #9) I confirm this fixes the problem also in the original full-blown source.
[Bug tree-optimization/82545] New: -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545 Bug ID: 82545 Summary: -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ivo.raisr at oracle dot com Target Milestone: --- gcc 8 and 7 produce an internal compiler error on the following program (also) attached. $ gcc --version gcc (GCC) 8.0.0 20171012 (experimental) $ uname -a Linux 4.10.0-37-generic #41-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux $ gcc -O2 -fsanitize=address -c reduced.c during GIMPLE pass: sanopt reduced.c: In function ‘a’: reduced.c:4:6: internal compiler error: in gimple_split_edge, at tree-cfg.c:2838 void a(void) { ^ 0x6b9315 gimple_split_edge ../../src/gcc/tree-cfg.c:2838 0x99a5cd split_edge(edge_def*) ../../src/gcc/cfghooks.c:638 0xafc5d7 gimple_find_edge_insert_loc ../../src/gcc/gimple-iterator.c:793 0xafd36d gsi_commit_one_edge_insert(edge_def*, basic_block_def**) ../../src/gcc/gimple-iterator.c:884 0xafd43e gsi_commit_edge_inserts() ../../src/gcc/gimple-iterator.c:863 0x6b0d11 execute ../../src/gcc/sanopt.c:1359 gcc 8: FAIL, ICE produced. SVN version 253695. gcc 7: FAIL, ICE produced. SVN version 253695, gcc-7-branch. gcc 6: PASS, ICE not produced. SVN version 253695, gcc-6-branch.
[Bug tree-optimization/82545] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545 Ivo Raisr changed: What|Removed |Added CC||ivo.raisr at oracle dot com --- Comment #1 from Ivo Raisr --- Created attachment 42351 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42351&action=edit reproducer, reformatted for better readability
[Bug tree-optimization/82545] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545 --- Comment #2 from Ivo Raisr --- Created attachment 42352 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42352&action=edit C-reduced reproducer, not reformatted
[Bug tree-optimization/82545] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545 --- Comment #3 from Ivo Raisr --- $ cat reduced.c extern void c(int); extern void d(void); void a(void) { { int b; &b; __builtin_setjmp(0); c(b); } d(); }
[Bug tree-optimization/82545] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545 --- Comment #4 from Ivo Raisr --- The reproducer was C-reduce'd from a large source file (30 MB) which is not publicly available.
[Bug sanitizer/82545] [7/8 Regression] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545 --- Comment #7 from Ivo Raisr --- If no viable solution to splitting an abnormal edge is found, I wonder if we could actually prevent getting into this situation?
[Bug sanitizer/82545] [7 Regression] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545 --- Comment #10 from Ivo Raisr --- Thank you for the fix. Works on the full source file as well.
[Bug sanitizer/82545] [7 Regression] -O2: ICE in gimple_split_edge, at tree-cfg.c:2838, during GIMPLE pass sanopt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82545 --- Comment #11 from Ivo Raisr --- (In reply to Martin Liška from comment #9) > Fixed on trunk, queued for backports. I wonder if you had a chance for backporting this into gcc-7 branch? Let me know if I can be of assistance here.