seen with trunk 20240101 building the conntrack-tools package with LTO enabled, seen on different architectures: during GIMPLE pass: alias ../extensions/libct_proto_udp.c: In function 'final_check': ../extensions/libct_proto_udp.c:162:13: internal compiler error: in handle_call_arg, at tree-ssa-structalias.cc:4119 162 | static void final_check(unsigned int flags, | ^ 0x95f3ee handle_call_arg ../../src/gcc/tree-ssa-structalias.cc:4119 0x1c7c620 handle_rhs_call ../../src/gcc/tree-ssa-structalias.cc:4344 0x1c5ef69 find_func_aliases_for_call ../../src/gcc/tree-ssa-structalias.cc:5018 0x1c5ef69 find_func_aliases ../../src/gcc/tree-ssa-structalias.cc:5121 0x1c5c01e compute_points_to_sets ../../src/gcc/tree-ssa-structalias.cc:7573 0x1c5c01e compute_may_aliases() ../../src/gcc/tree-ssa-structalias.cc:8027 0x1b03a70 execute_function_todo ../../src/gcc/passes.cc:2063 0x1a7f141 do_per_function ../../src/gcc/passes.cc:1687 0x1a7f141 execute_todo ../../src/gcc/passes.cc:2142 Please submit a full bug report, with preprocessed source (by using -freport-bug).
Created attachment 56976 [details] reduced test case reduced test case, still requires another object file
the ICE goes away, if I also build the conntrack.o object file with -fPIC
Created attachment 56981 [details] reduced test case reduced test case, without object files. the compiler is configured with --enable-pie
Looks like an issue with IPA modref and WPA?
From the last reproducer, one doesn't really need any extra libraries. Just ./cc1 -quiet -Wdate-time -std=gnu99 -W -Wall -Wmissing-prototypes -Wwrite-strings -Wfloat-equal -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wstrict-prototypes -Wundef -Wno-unused-parameter -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection libct_proto_udp.i -fPIC ./cc1 -quiet -Wdate-time -std=gnu99 -W -Wall -Wmissing-prototypes -Wwrite-strings -Wfloat-equal -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wstrict-prototypes -Wundef -Wno-unused-parameter -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection conntrack.i -fpie ./xgcc -B ./ -std=gnu99 -W -Wall -Wmissing-prototypes -Wwrite-strings -Wfloat-equal -Wshadow -Wpointer-arith -Wbad-function-cast -Wsign-compare -Waggregate-return -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wstrict-prototypes -Wundef -Wno-unused-parameter -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z -Wl,relro -o conntrack.so conntrack.i libct_proto_udp.s -v -save-temps reproduces it. The ICE is on 4105 /* As an compile time optimization if we make no difference between 4106 direct and indirect accesses make arg transitively closed. 4107 This avoids the need to build indir arg and do everything twice. */ 4108 if (((flags & EAF_NO_INDIRECT_CLOBBER) != 0) 4109 == ((flags & EAF_NO_DIRECT_CLOBBER) != 0) 4110 && (((flags & EAF_NO_INDIRECT_READ) != 0) 4111 == ((flags & EAF_NO_DIRECT_READ) != 0)) 4112 && (((flags & EAF_NO_INDIRECT_ESCAPE) != 0) 4113 == ((flags & EAF_NO_DIRECT_ESCAPE) != 0)) 4114 && (((flags & EAF_NOT_RETURNED_INDIRECTLY) != 0) 4115 == ((flags & EAF_NOT_RETURNED_DIRECTLY) != 0))) 4116 { 4117 make_transitive_closure_constraints (tem); 4118 callarg_transitive = true; 4119 gcc_checking_assert (!(flags & EAF_NO_DIRECT_READ)); 4120 }
Our bisect seed can't bisect lto though...
(In reply to Jakub Jelinek from comment #6) > Our bisect seed can't bisect lto though... Honza added this stuff.
Indeed this (the reduced testcase from comment #3) can be bisected to Honza's r12-5177-g494bdadf28d0fb (Enable pure-const discovery in modref).