[Bug middle-end/45496] Static members of templates cause LTO to omit required code

2010-09-03 Thread rguenth at gcc dot gnu dot org


--- Comment #24 from rguenth at gcc dot gnu dot org  2010-09-03 09:47 
---
Fixed for 4.5.2.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.5.2


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



[Bug middle-end/45496] Static members of templates cause LTO to omit required code

2010-09-03 Thread rguenth at gcc dot gnu dot org


--- Comment #25 from rguenth at gcc dot gnu dot org  2010-09-03 09:48 
---
Subject: Bug 45496

Author: rguenth
Date: Fri Sep  3 09:47:09 2010
New Revision: 163801

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163801
Log:
2010-09-03  Richard Guenther  rguent...@suse.de

* lto-elf.c (validate_file): Always error if validation fails.

2010-09-03  Richard Guenther  rguent...@suse.de

PR lto/45496
Backport from mainline
2010-07-07  Jakub Jelinek  ja...@redhat.com

* lto-elf.c (ELFOSABI_NONE, ELFOSABI_LINUX): Define if not defined.
(validate_file): Allow merging of ELFOSABI_NONE with ELFOSABI_LINUX
objects.

Modified:
branches/gcc-4_5-branch/gcc/lto/ChangeLog
branches/gcc-4_5-branch/gcc/lto/lto-elf.c


-- 


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



[Bug middle-end/45496] Static members of templates cause LTO to omit required code

2010-09-02 Thread rguenth at gcc dot gnu dot org


--- Comment #19 from rguenth at gcc dot gnu dot org  2010-09-02 15:00 
---
The important difference is

@@ -83,7 +83,7 @@
.weak   _ZN6holderIvE3varE
.section   
.bss._ZN6holderIvE3varE,awG,@nobits,_ZN6holderIvE3varE,comdat
.align 4
-   .type   _ZN6holderIvE3varE, @object
+   .type   _ZN6holderIvE3varE, @gnu_unique_object
.size   _ZN6holderIvE3varE, 4
 _ZN6holderIvE3varE:
.zero   4

so it seems that HAVE_GAS_GNU_UNIQUE_OBJECT / USE_GNU_UNIQUE_OBJECT in
elfos.h is broken.

Confirmed.

CCing Jason who added it.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||jason at gcc dot gnu dot org
 Status|UNCONFIRMED |NEW
  Component|lto |middle-end
 Ever Confirmed|0   |1
   Keywords||lto
   Last reconfirmed|-00-00 00:00:00 |2010-09-02 15:00:22
   date||


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



[Bug middle-end/45496] Static members of templates cause LTO to omit required code

2010-09-02 Thread alexey at feldgendler dot ru


--- Comment #20 from alexey at feldgendler dot ru  2010-09-02 15:13 ---
Indeed, when gcc is configured with --disable-gnu-unique-object, the bug
doesn't occur.

binutils 2.20.1-12 from Debian.


-- 


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



[Bug middle-end/45496] Static members of templates cause LTO to omit required code

2010-09-02 Thread rguenth at gcc dot gnu dot org


--- Comment #21 from rguenth at gcc dot gnu dot org  2010-09-02 15:23 
---
Last guess in the wild is that libelf0 (from libelf) doesn't handle the
object file like it should and we somehow silently treat it as an empty one.


-- 


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



[Bug middle-end/45496] Static members of templates cause LTO to omit required code

2010-09-02 Thread rguenth at gcc dot gnu dot org


--- Comment #22 from rguenth at gcc dot gnu dot org  2010-09-02 15:34 
---
Fixed with http://gcc.gnu.org/viewcvs?root=gccview=revrev=161935 on trunk.

Needs backporting.  I'll do that.  Can you verify this fixes your problem?


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-09-02 15:00:22 |2010-09-02 15:34:25
   date||


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



[Bug middle-end/45496] Static members of templates cause LTO to omit required code

2010-09-02 Thread alexey at feldgendler dot ru


--- Comment #23 from alexey at feldgendler dot ru  2010-09-02 15:55 ---
Yes, the patch fixes the observed bug. Thanks a lot!

However, there's also the issue of missing error reporting for a failure to
read ELF. I don't know if it should be fixed as part of this bug or separately.


-- 


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