public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51843] New: ICE with LTO and attribute `dllimport'
@ 2012-01-13  6:55 d.g.gorbachev at gmail dot com
  2012-01-13  9:58 ` [Bug target/51843] " rguenth at gcc dot gnu.org
  2014-08-07  2:27 ` d.g.gorbachev at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2012-01-13  6:55 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51843
           Summary: ICE with LTO and attribute `dllimport'
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com
            Target: *-*-mingw32


Created attachment 26312
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26312
Testcase

"If a symbol previously declared `dllimport' is later defined, the attribute is
ignored in subsequent references, and a warning is emitted."

GCC 4.7.0 gives this error:

In file included from :0:0:
main.c: In function 'main':
main.c:4:5: error: constant not recomputed when ADDR_EXPR changed
&bar
In file included from b.c:1:0,
                 from :1:
main.c:6:7: note: in statement
# .MEM_3 = VDEF <.MEM_2(D)>
bar = 7;

In file included from :0:0:
main.c:4:5: internal compiler error: verify_gimple failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

GCC 4.6.3 just ignores the attribute, emitting no warning.

Without LTO, the two `bar's are treated as 2 different variables.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-07  2:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-13  6:55 [Bug target/51843] New: ICE with LTO and attribute `dllimport' d.g.gorbachev at gmail dot com
2012-01-13  9:58 ` [Bug target/51843] " rguenth at gcc dot gnu.org
2014-08-07  2:27 ` d.g.gorbachev at gmail dot com

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).