https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89497
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> --- Created attachment 45822 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45822&action=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 0x7ffff79b1e0f ??? /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 0xe5cccc 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