http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46808
Summary: Too verbose diagnostic messages when compiling with LTO Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: trivial Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: d.g.gorbac...@gmail.com ===== 1.c ===== int main(void) { return 0; } =============== ===== 2.c ===== int main; =============== $ gcc -flto -fuse-linker-plugin 1.c 2.c 2.c:1:5: error: function 'main' redeclared as variable 1.c:1:5: note: previously declared here 2.c:1:5: warning: type of 'main' does not match original declaration [enabled by default] 1.c:1:5: note: previously declared here lto1: fatal error: errors during merging of translation units compilation terminated. lto-wrapper: gcc returned 1 exit status /usr/local/bin/ld: fatal error: lto-wrapper failed collect2: ld returned 1 exit status Compare it with: $ gcc -combine 1.c 2.c 2.c:1:5: error: 'main' redeclared as different kind of symbol 1.c:1:5: note: previous definition of 'main' was here