https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65581

--- Comment #3 from Rainer Emrich <rai...@emrich-ebersheim.de> ---
(In reply to Richard Biener from comment #2)
> Can you try reducing to a minimal example?  it would seem that  int main() {
> return 0; } should already fail this way?
test.c:
int main()
{
  return  0;
}

Installed gcc:
gcc test.c -fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -flto -lm
-o test.exe
D:\msys64\tmp\ccNrn9pc.lto.o:<artificial>:(.text.startup+0x0): multiple
definition of `main'
D:/x86_64-w64-trunk/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):D:/opt/devel/gnu/src/gcc-mingw-w64/mingw-w64-runtime.git/mingw-w64-crt/crt/crt0_c.c:17:
first defined here
D:/x86_64-w64-trunk/mingw/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):
In function `main':
D:/opt/devel/gnu/src/gcc-mingw-w64/mingw-w64-runtime.git/mingw-w64-crt/crt/crt0_c.c:18:
undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status

Yeah, there's a real problem!

Reply via email to