[Bug other/82352] link error 'defined in discarded section'
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Sep 29 09:03:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82352
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Created attachment 42259
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42259&action=edit
Reduced single compilation unit test-case
Confirmed, following ICEs in GCC (with -fchecking):
g++-7 pr82352-2.cpp -O2 -c -fchecking
pr82352-2.cpp:42:7: warning: direct base ‘B’ inaccessible in ‘o’ due to
ambiguity
class o : B, n
^
pr82352-2.cpp:51:1: error: comdat-local function called by void h::i() outside
its comdat
}
^
_ZN1fI1oE1dEv.part.0/38 (void f<e>::d() [with e = o]) @0x149a95bd5450
Type: function definition analyzed
Visibility: comdat_group:_ZN1fI1oE1dEv artificial
Same comdat group as: _ZN1fI1oE1dEv/26
References: _ZTI1a/24 (addr)
Referring:
Availability: local
First run: 1
Function flags: body local icf_merged split_part unlikely_executed
Called by: _ZN1h1iEv.part.1/39 (1.00 per call) (can throw external)
_ZN1fI1oE1dEv/26 (can throw external)
Calls: __cxa_allocate_exception/31 (1.00 per call) __cxa_throw/32 (1.00 per
call) (can throw external)
pr82352-2.cpp:51: confused by earlier errors, bailing out
Caused by my commit r246848.
More information about the Gcc-bugs
mailing list