https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121572
--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Sam James from comment #7) > Created attachment 62135 [details] > pr121572-elfutils.tar.xz > > At r16-3190-g5cf1b9a03ec5b6, I noticed some bugginess with consumers of > elfutils/libelf (libdwfl) error handling. With your patch (the one posted > last night), I get an ICE with elfutils at a different place to Sergei's > above testcase. > > I didn't clean it up, cvise only now finished. I'll try the new patch. > > But for now: > ``` > + gcc -O3 -flto=auto -fPIC -o libdw.so -shared -o libdw.so > -Wl,--version-script=libdw.map -Wl,--whole-archive dwarf_error.os > dwfl_begin.os dwfl_error.os argp-std.os -Wl,--no-whole-archive > + cat x.txt > argp-std.i:13:6: warning: type of ‘dwfl_begin’ does not match original > declaration [-Wlto-type-mismatch] > 13 | int *dwfl_begin(Dwfl_Callbacks *); > | ^ > dwfl_begin.i:9:6: note: type mismatch in parameter 1 > 9 | int *dwfl_begin() { __libdwfl_seterrno(DWFL_E_LIBELF); } > | ^ > dwfl_begin.i:9:6: note: ‘dwfl_begin’ was previously declared here > during RTL pass: x86_cse > argp-std.i: In function ‘parse_opt’: > argp-std.i:29:1: internal compiler error: in ix86_place_single_tls_call, at > config/i386/i386-features.cc:3873 > 29 | } > | ^` > ``` I can't reproduce it with the updated v2 patch.