public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rainer@emrich-ebersheim.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65581] [5 Regression] testsuite lto issue: multiple definition of `main', undefined reference to `WinMain'
Date: Thu, 26 Mar 2015 12:59:00 -0000	[thread overview]
Message-ID: <bug-65581-4-Hanop2J87k@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65581-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 from Rainer Emrich <rainer@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!


  parent reply	other threads:[~2015-03-26 12:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 12:27 [Bug target/65581] New: " rainer@emrich-ebersheim.de
2015-03-26 12:33 ` [Bug target/65581] [5 Regression] " rainer@emrich-ebersheim.de
2015-03-26 12:43 ` rguenth at gcc dot gnu.org
2015-03-26 12:43 ` rguenth at gcc dot gnu.org
2015-03-26 12:59 ` rainer@emrich-ebersheim.de [this message]
2015-03-26 15:49 ` ktietz at gcc dot gnu.org
2015-04-01 14:51 ` rainer@emrich-ebersheim.de
2015-04-01 23:18 ` hubicka at gcc dot gnu.org
2015-04-02  9:06 ` rainer@emrich-ebersheim.de
2015-04-02  9:07 ` rainer@emrich-ebersheim.de
2015-04-02 16:29 ` hubicka at gcc dot gnu.org
2015-04-02 18:42 ` rainer@emrich-ebersheim.de
2015-04-02 23:31 ` hubicka at gcc dot gnu.org
2015-04-03  9:23 ` rainer@emrich-ebersheim.de
2015-04-04 21:59 ` rainer@emrich-ebersheim.de
2015-04-06 18:41 ` rainer@emrich-ebersheim.de

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65581-4-Hanop2J87k@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).