public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/52634] multiple definition error when using alias
Date: Tue, 20 Mar 2012 14:56:00 -0000	[thread overview]
Message-ID: <bug-52634-4-1nza3CtjfP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52634-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52634

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-03-20
     Ever Confirmed|0                           |1

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-20 14:42:33 UTC ---
Reduced testcase:

t1.c
----
extern int cfliteValueCallBacks;
void baz (int *);
int main () { baz(&cfliteValueCallBacks); }

t2.c
----
int cfliteKeyCallBacks = 5;
extern int cfliteValueCallBacks __attribute__((alias("cfliteKeyCallBacks")));

fails as:

gcc-4.7 -flto -flto-partition=1to1 t1.c t2.c -r -nostdlib
/tmp/ccPs2Uvd.ltrans1.ltrans.o:(.bss+0x0): multiple definition of
`cfliteKeyCallBacks'
/tmp/ccPs2Uvd.ltrans0.ltrans.o:(.data+0x0): first defined here
collect2: error: ld returned 1 exit status

Not sure if the source is valid by design.


  parent reply	other threads:[~2012-03-20 14:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 12:32 [Bug lto/52634] New: " tianbin at cernet dot edu.cn
2012-03-20 13:16 ` [Bug lto/52634] " rguenth at gcc dot gnu.org
2012-03-20 14:17 ` tianbin at cernet dot edu.cn
2012-03-20 14:31 ` tianbin at cernet dot edu.cn
2012-03-20 14:56 ` rguenth at gcc dot gnu.org [this message]
2012-03-20 15:05 ` rguenth at gcc dot gnu.org
2012-03-20 17:22 ` hubicka at gcc dot gnu.org
2012-03-25 10:24 ` hubicka at gcc dot gnu.org
2012-04-09 23:39 ` hubicka at gcc dot gnu.org
2012-04-10 15:10 ` hubicka at gcc dot gnu.org
2012-10-14  9:14 ` tianbin at cernet dot edu.cn
2021-12-24  8:59 ` pinskia at gcc dot gnu.org

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-52634-4-1nza3CtjfP@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).