public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/43038] New: DECL_PRESERVE_P static globals not completely preserved with -flto
@ 2010-02-11 16:38 baldrick at gcc dot gnu dot org
2010-02-11 16:42 ` [Bug lto/43038] " rguenth at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: baldrick at gcc dot gnu dot org @ 2010-02-11 16:38 UTC (permalink / raw)
To: gcc-bugs
The fact that LinkObj is initialized with LinkVar does not seem to be
preserved when using -flto:
extern const char LinkVar;
__attribute__((used)) static const char *const LinkObj = LinkVar;
--
Summary: DECL_PRESERVE_P static globals not completely preserved
with -flto
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: baldrick at gcc dot gnu dot org
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43038
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/43038] DECL_PRESERVE_P static globals not completely preserved with -flto
2010-02-11 16:38 [Bug lto/43038] New: DECL_PRESERVE_P static globals not completely preserved with -flto baldrick at gcc dot gnu dot org
@ 2010-02-11 16:42 ` rguenth at gcc dot gnu dot org
2010-02-11 16:43 ` baldrick at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-02-11 16:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2010-02-11 16:42 -------
Confirmed.
The following fails to link with -flto
static int foobar __attribute__((used));
extern void abort (void);
int main()
{
int res;
asm("movl foobar(%%rip), %0" : "=g" (res));
if (res != 0)
abort ();
return 0;
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |lto, wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2010-02-11 16:42:09
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43038
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/43038] DECL_PRESERVE_P static globals not completely preserved with -flto
2010-02-11 16:38 [Bug lto/43038] New: DECL_PRESERVE_P static globals not completely preserved with -flto baldrick at gcc dot gnu dot org
2010-02-11 16:42 ` [Bug lto/43038] " rguenth at gcc dot gnu dot org
@ 2010-02-11 16:43 ` baldrick at gcc dot gnu dot org
2010-04-23 16:14 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: baldrick at gcc dot gnu dot org @ 2010-02-11 16:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from baldrick at gcc dot gnu dot org 2010-02-11 16:42 -------
Sorry, small bug in the testcase, should have been:
extern const char LinkVar;
__attribute__((used)) static const char *const LinkObj = &LinkVar;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43038
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/43038] DECL_PRESERVE_P static globals not completely preserved with -flto
2010-02-11 16:38 [Bug lto/43038] New: DECL_PRESERVE_P static globals not completely preserved with -flto baldrick at gcc dot gnu dot org
2010-02-11 16:42 ` [Bug lto/43038] " rguenth at gcc dot gnu dot org
2010-02-11 16:43 ` baldrick at gcc dot gnu dot org
@ 2010-04-23 16:14 ` rguenth at gcc dot gnu dot org
2010-06-03 15:15 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-23 16:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-04-23 16:14 -------
Honza, you might want to have a look here.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
Last reconfirmed|2010-02-11 16:42:09 |2010-04-23 16:14:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43038
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/43038] DECL_PRESERVE_P static globals not completely preserved with -flto
2010-02-11 16:38 [Bug lto/43038] New: DECL_PRESERVE_P static globals not completely preserved with -flto baldrick at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-06-03 15:15 ` rguenth at gcc dot gnu dot org
@ 2010-06-03 15:15 ` rguenth at gcc dot gnu dot org
2010-06-06 10:33 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-03 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-06-03 15:13 -------
Re-confirmed on trunk.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2010-04-23 16:14:36 |2010-06-03 15:13:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43038
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/43038] DECL_PRESERVE_P static globals not completely preserved with -flto
2010-02-11 16:38 [Bug lto/43038] New: DECL_PRESERVE_P static globals not completely preserved with -flto baldrick at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-04-23 16:14 ` rguenth at gcc dot gnu dot org
@ 2010-06-03 15:15 ` rguenth at gcc dot gnu dot org
2010-06-03 15:15 ` rguenth at gcc dot gnu dot org
2010-06-06 10:33 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-03 15:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2010-06-03 15:14 -------
Ah, it does not work because we mangle foobar to foobar.1234, not because
we eliminate it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43038
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug lto/43038] DECL_PRESERVE_P static globals not completely preserved with -flto
2010-02-11 16:38 [Bug lto/43038] New: DECL_PRESERVE_P static globals not completely preserved with -flto baldrick at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-06-03 15:15 ` rguenth at gcc dot gnu dot org
@ 2010-06-06 10:33 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-06 10:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2010-06-06 10:32 -------
*** Bug 44429 has been marked as a duplicate of this bug. ***
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |astrange at ithinksw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43038
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-06-06 10:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11 16:38 [Bug lto/43038] New: DECL_PRESERVE_P static globals not completely preserved with -flto baldrick at gcc dot gnu dot org
2010-02-11 16:42 ` [Bug lto/43038] " rguenth at gcc dot gnu dot org
2010-02-11 16:43 ` baldrick at gcc dot gnu dot org
2010-04-23 16:14 ` rguenth at gcc dot gnu dot org
2010-06-03 15:15 ` rguenth at gcc dot gnu dot org
2010-06-03 15:15 ` rguenth at gcc dot gnu dot org
2010-06-06 10:33 ` rguenth at gcc dot gnu dot org
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).