This breaks a lot of benchmarks in SPEC CPU 2000. t.c
int i; t2.c int i; int main() { return i; } $ ./xgcc -B. -o t t1.c t2.c $ ./xgcc -B. -o t t1.c t2.c -flto t2.c:1:5: error: 'i' has already been defined t1.c:1:5: error: previously defined here lto-wrapper: ././xgcc returned 1 exit status collect2: lto-wrapper returned 1 exit status the LTO behavior is wrong for C. The testcase would violate the C++ ODR, but LTO should not reject the valid C program (note ODR violations do not need to be diagnosed). -- Summary: [LTO] complains about two tentative definitions Product: gcc Version: lto Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40721