[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #13 from Martin Liška --- Minimal command line options: $ gcc 1.i 2.i 3.i 4.i -fPIC -O2 -fno-semantic-interposition -flto=8 -shared -finline-functions during GIMPLE pass: vrp 3.i: In function ‘d’: 3.i:14:6: internal compiler error: Segmentation fault 14 | void d() { | ^ 0xc87e44 crash_signal /home/marxin/Programming/gcc/gcc/toplev.c:326 0x77b79e0f ??? /usr/src/debug/glibc-2.29-2.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0xd8b7e0 ptr_deref_may_alias_decl_p /home/marxin/Programming/gcc/gcc/tree-ssa-alias.c:169 0xd90374 indirect_ref_may_alias_decl_p /home/marxin/Programming/gcc/gcc/tree-ssa-alias.c:1155 0xd91335 refs_may_alias_p_1(ao_ref*, ao_ref*, bool) /home/marxin/Programming/gcc/gcc/tree-ssa-alias.c:1499 0x9cbb5c gimple_fold_builtin_memory_op /home/marxin/Programming/gcc/gcc/gimple-fold.c:927 0x9cdddb gimple_fold_builtin /home/marxin/Programming/gcc/gcc/gimple-fold.c:3854 0x9cf1f8 gimple_fold_call /home/marxin/Programming/gcc/gcc/gimple-fold.c:4354 0x9d02e2 fold_stmt_1 /home/marxin/Programming/gcc/gcc/gimple-fold.c:5019 0xcd2826 replace_uses_by(tree_node*, tree_node*) /home/marxin/Programming/gcc/gcc/tree-cfg.c:2026 0xcd2de7 gimple_merge_blocks /home/marxin/Programming/gcc/gcc/tree-cfg.c:2112 0x82097f merge_blocks(basic_block_def*, basic_block_def*) /home/marxin/Programming/gcc/gcc/cfghooks.c:793 0xcdfd80 cleanup_tree_cfg_bb /home/marxin/Programming/gcc/gcc/tree-cfgcleanup.c:719 0xce1348 cleanup_tree_cfg_noloop /home/marxin/Programming/gcc/gcc/tree-cfgcleanup.c:905 0xce1348 cleanup_tree_cfg() /home/marxin/Programming/gcc/gcc/tree-cfgcleanup.c:989 0xbb3917 execute_function_todo /home/marxin/Programming/gcc/gcc/passes.c:1930 0xbb2ae2 do_per_function /home/marxin/Programming/gcc/gcc/passes.c:1638 0xbb3c95 execute_todo /home/marxin/Programming/gcc/gcc/passes.c:2031
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #12 from Martin Liška --- (In reply to Andrew Pinski from comment #11) > (In reply to Martin Liška from comment #6) > > Created attachment 45822 [details] > > Reduced test-case > > > > However, this reduced test-case fails with GCC-8 branch for all releases. > > Started on trunk with r256457 and was fixed on trunk r265421: > > r265421 just make the bug latent. Yep, I can confirm current trunk is affected with: diff --git a/gcc/passes.def b/gcc/passes.def index 446a7c48276..0816bfd7258 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -88,7 +88,6 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_merge_phi); NEXT_PASS (pass_dse); NEXT_PASS (pass_cd_dce); - NEXT_PASS (pass_phiopt, true /* early_p */); NEXT_PASS (pass_early_ipa_sra); NEXT_PASS (pass_tail_recursion); NEXT_PASS (pass_convert_switch);
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #11 from Andrew Pinski --- (In reply to Martin Liška from comment #6) > Created attachment 45822 [details] > Reduced test-case > > However, this reduced test-case fails with GCC-8 branch for all releases. > Started on trunk with r256457 and was fixed on trunk r265421: r265421 just make the bug latent.
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #10 from Martin Liška --- (In reply to darkkirb from comment #9) > I have bisected the fix a bit (I didn't have enough time today to finish it) > and i found that the fix has happened in one of the 322 commits between > > d1540be4d3b4b8ac6d19997539c13d2ca74f65e4 (2018-09-26, broken) > > and > > 44257478a8d157f8e0030bb7abe1c3ac91be9302 (2018-10-31, fixed) > > Hopefully the fix can be applied to the gcc-8_0 branch. I already bisected that, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497#c6
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #9 from darkkirb at darkkirb dot de --- I have bisected the fix a bit (I didn't have enough time today to finish it) and i found that the fix has happened in one of the 322 commits between d1540be4d3b4b8ac6d19997539c13d2ca74f65e4 (2018-09-26, broken) and 44257478a8d157f8e0030bb7abe1c3ac91be9302 (2018-10-31, fixed) Hopefully the fix can be applied to the gcc-8_0 branch.
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #8 from Martin Liška --- I can also confirm that building the whole project with original flags and current GCC trunk is fine.
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 Martin Liška changed: What|Removed |Added Known to work||7.4.0, 9.0 Known to fail||8.1.0, 8.2.0 --- Comment #7 from Martin Liška --- Will it help Richi? Can you please take a look?
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #6 from Martin Liška --- Created attachment 45822 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45822=edit Reduced test-case However, this reduced test-case fails with GCC-8 branch for all releases. Started on trunk with r256457 and was fixed on trunk r265421: $ gcc 1.i 2.i 3.i 4.i -fPIC -O3 -fno-semantic-interposition -flto=8 -shared 3.i:9:4: warning: type of ‘ppdFindNextAttr’ does not match original declaration [-Wlto-type-mismatch] b *ppdFindNextAttr(); ^ 2.i:1:6: note: ‘ppdFindNextAttr’ was previously declared here int *ppdFindNextAttr() { return 0; } ^ 2.i:1:6: note: code may be misoptimized unless -fno-strict-aliasing is used during GIMPLE pass: vrp 3.i: In function ‘d’: 3.i:14:6: internal compiler error: Segmentation fault void d() { ^ 0xdfd704 crash_signal ../../gcc/toplev.c:325 0x779b1e0f ??? /usr/src/debug/glibc-2.29-1.3.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0xf2a8bc ptr_deref_may_alias_decl_p ../../gcc/tree-ssa-alias.c:169 0xf2cb91 indirect_ref_may_alias_decl_p ../../gcc/tree-ssa-alias.c:1154 0xf2db42 refs_may_alias_p_1(ao_ref*, ao_ref*, bool) ../../gcc/tree-ssa-alias.c:1488 0xaa0876 gimple_fold_builtin_memory_op ../../gcc/gimple-fold.c:918 0xaa79ca gimple_fold_builtin ../../gcc/gimple-fold.c:3657 0xaa95c9 gimple_fold_call ../../gcc/gimple-fold.c:4159 0xaaba38 fold_stmt_1 ../../gcc/gimple-fold.c:4834 0xaac069 fold_stmt(gimple_stmt_iterator*) ../../gcc/gimple-fold.c:4981 0xe44b2a replace_uses_by(tree_node*, tree_node*) ../../gcc/tree-cfg.c:2025 0xe44fac gimple_merge_blocks ../../gcc/tree-cfg.c:2111 0x8c1c5a merge_blocks(basic_block_def*, basic_block_def*) ../../gcc/cfghooks.c:793 0xe5 cleanup_tree_cfg_bb ../../gcc/tree-cfgcleanup.c:715 0xe5cfae cleanup_tree_cfg_1 ../../gcc/tree-cfgcleanup.c:797 0xe5d2f6 cleanup_tree_cfg_noloop ../../gcc/tree-cfgcleanup.c:911 0xe5d410 cleanup_tree_cfg() ../../gcc/tree-cfgcleanup.c:971 0xcdc9ef execute_function_todo ../../gcc/passes.c:1947 0xcdbb84 do_per_function ../../gcc/passes.c:1659 0xcdcd6d execute_todo ../../gcc/passes.c:2048
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #5 from Martin Liška --- Created attachment 45821 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45821=edit Unreduced test-case Started to fail with r268745 which is definitely a culprit: $ gcc 11.i 22.i 33.i 44.i -fPIC -O3 -fno-semantic-interposition -flto=8 -shared during GIMPLE pass: vrp ppd-localize.c: In function ‘ppdLocalize’: ppd-localize.c:51:1: internal compiler error: Segmentation fault ppdLocalize(ppd_file_t *ppd) /* I - PPD file */ ^ 0xdfd704 crash_signal ../../gcc/toplev.c:325 0x779b1e0f ??? /usr/src/debug/glibc-2.29-1.3.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0xf2ac71 ptr_derefs_may_alias_p(tree_node*, tree_node*) ../../gcc/tree-ssa-alias.c:284 0xf2d2de indirect_refs_may_alias_p ../../gcc/tree-ssa-alias.c:1303 0xf2dbfa refs_may_alias_p_1(ao_ref*, ao_ref*, bool) ../../gcc/tree-ssa-alias.c:1498 0xaa0876 gimple_fold_builtin_memory_op ../../gcc/gimple-fold.c:918 0xaa79ca gimple_fold_builtin ../../gcc/gimple-fold.c:3657 0xaa95c9 gimple_fold_call ../../gcc/gimple-fold.c:4159 0xaaba38 fold_stmt_1 ../../gcc/gimple-fold.c:4834 0xaac069 fold_stmt(gimple_stmt_iterator*) ../../gcc/gimple-fold.c:4981 0xe44b2a replace_uses_by(tree_node*, tree_node*) ../../gcc/tree-cfg.c:2025 0xe44fac gimple_merge_blocks ../../gcc/tree-cfg.c:2111 0x8c1c5a merge_blocks(basic_block_def*, basic_block_def*) ../../gcc/cfghooks.c:793 0xe5 cleanup_tree_cfg_bb ../../gcc/tree-cfgcleanup.c:715 0xe5cfae cleanup_tree_cfg_1 ../../gcc/tree-cfgcleanup.c:797 0xe5d2f6 cleanup_tree_cfg_noloop ../../gcc/tree-cfgcleanup.c:911 0xe5d410 cleanup_tree_cfg() ../../gcc/tree-cfgcleanup.c:971 0xcdc9ef execute_function_todo ../../gcc/passes.c:1947 0xcdbb84 do_per_function ../../gcc/passes.c:1659 0xcdcd6d execute_todo ../../gcc/passes.c:2048
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 --- Comment #4 from Martin Liška --- (In reply to Richard Biener from comment #3) > Does trunk work? Thunk is fine. > Also I wonder whether the graphite flags are necessary to > trigger the issue (and as recommendation, don't use -fgraphite-identity, No. > it is for debugging, also avoid -floop-nest-optimize and -fipa-pta). Give me some time, I'm reducing that right now (both options and source files).
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 Richard Biener changed: What|Removed |Added Target Milestone|--- |8.4 --- Comment #3 from Richard Biener --- Does trunk work? Also I wonder whether the graphite flags are necessary to trigger the issue (and as recommendation, don't use -fgraphite-identity, it is for debugging, also avoid -floop-nest-optimize and -fipa-pta).
[Bug lto/89497] [8 Regression] ICE caused by Segmentation Fault when compiling cups 2.2.10 with LTO flags enabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497 Martin Liška changed: What|Removed |Added Keywords||ice-on-valid-code Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2019-02-26 Assignee|unassigned at gcc dot gnu.org |marxin at gcc dot gnu.org Summary|[8.2 regression] ICE caused |[8 Regression] ICE caused |by Segmentation Fault when |by Segmentation Fault when |compiling cups 2.2.10 with |compiling cups 2.2.10 with |LTO flags enabled |LTO flags enabled Ever confirmed|0 |1 Known to fail||8.3.0 --- Comment #2 from Martin Liška --- Confirmed, investigating right now.