From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 557 invoked by alias); 11 Jul 2009 17:45:50 -0000 Received: (qmail 462 invoked by uid 48); 11 Jul 2009 17:45:39 -0000 Date: Sat, 11 Jul 2009 17:45:00 -0000 Subject: [Bug lto/40721] New: [LTO] complains about two tentative definitions X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00932.txt.bz2 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