[Bug c++/16625] Discarded Linkonce sections in .rodata

2007-03-07 Thread michael dot klein at fazi dot de


--- Comment #46 from michael dot klein at fazi dot de  2007-03-07 10:20 
---
Created an attachment (id=13158)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13158&action=view)
Non-reversed patch to make configure test for comdat support work with binutils
snapshots


-- 

michael dot klein at fazi dot de changed:

   What|Removed |Added

  Attachment #13157|0   |1
is obsolete||


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



[Bug c++/16625] Discarded Linkonce sections in .rodata

2007-03-07 Thread michael dot klein at fazi dot de


--- Comment #45 from michael dot klein at fazi dot de  2007-03-07 10:13 
---
Created an attachment (id=13157)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13157&action=view)
Patch to configure test for comdat support work with binutils snapshots

gcc's configure test for COMDAT support seems to work only with regular
releases but not with snapshots, where gld doesn't print a version number:

$ gld -v
GNU ld version 070227 20070227


-- 


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



[Bug c++/16625] Discarded Linkonce sections in .rodata

2007-03-06 Thread michael dot klein at fazi dot de


--- Comment #44 from michael dot klein at fazi dot de  2007-03-06 16:33 
---
(In reply to comment #43)
> It means your gcc 4.1.1 was built with a very old binutils and it doesn't
> support COMDAT group

Yes, this gcc was build with binutils 2.15 from Debian Sarge.

Thanks


-- 


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



[Bug c++/16625] Discarded Linkonce sections in .rodata

2007-03-06 Thread michael dot klein at fazi dot de


--- Comment #42 from michael dot klein at fazi dot de  2007-03-06 12:07 
---
Created an attachment (id=13152)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13152&action=view)
Testcase (generated assembly files from gcc 4.1.1)


-- 


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



[Bug c++/16625] Discarded Linkonce sections in .rodata

2007-03-05 Thread michael dot klein at fazi dot de


--- Comment #40 from michael dot klein at fazi dot de  2007-03-05 16:20 
---
Subject: Re:  Discarded Linkonce sections in .rodata

On Mon, 5 Mar 2007, hjl at lucon dot org wrote:

> Can I reproduce it on Linux?

Using gcc 4.1.1 with binutils-070227 I can also reproduce it on Linux,
binutils 2.15 from Debian Sarge do not exhibit this problem.

As this is a closes source application I can't upload the source code.
Would the generated asm code be of any help?

The smallest testcase I have is currently ~500k lines asm, split accross
two files.

/Michael


-- 


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



[Bug c++/16625] Discarded Linkonce sections in .rodata

2007-03-05 Thread michael dot klein at fazi dot de


--- Comment #36 from michael dot klein at fazi dot de  2007-03-05 08:43 
---
Subject: Re:  Discarded Linkonce sections in .rodata

>> One possible workaround is to reorder the objects during link, so that those
>> with .gnu.linkonce.r.* come first.
>>
>> If this a compiler or a linker bug? (I'd blame the linker ;))
>
> It is most likely a Solaris specific compiler bug.

Erm, this bug was originally reported for i686-pc-linux-gnu, and none of
the 33 previous comments refers to Solaris.

Forgot to mention that the bug exhibits only with GNU ld,
Solaris ld links fine without object reordering or other tricks.

/Michael


-- 


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



[Bug c++/16625] Discarded Linkonce sections in .rodata

2007-03-02 Thread michael dot klein at fazi dot de


--- Comment #34 from michael dot klein at fazi dot de  2007-03-02 16:25 
---
Could the be related to
http://sources.redhat.com/ml/binutils/2004-08/msg00187.html?

I'm getting those linker errors with both gcc 4.1.1 and gcc 4.1.2 on
x86-Solaris with GNU ld from binutils-070227, but only when compiling with -O2
or -O3, but not with -O0.

The referenced symbols shows up (gnm -a *.o) in several objects like this:

 t .gnu.linkonce.t._ZN10otl_streamlsEj
 W _ZN10otl_streamlsEj

But in the object mentioned in the error messages like this:

 r .gnu.linkonce.r._ZN10otl_streamlsEj
 t .gnu.linkonce.t._ZN10otl_streamlsEj
 W _ZN10otl_streamlsEj

One possible workaround is to reorder the objects during link, so that those
with .gnu.linkonce.r.* come first.

If this a compiler or a linker bug? (I'd blame the linker ;))


-- 

michael dot klein at fazi dot de changed:

   What|Removed |Added

 CC|        |michael dot klein at fazi
   |            |dot de


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



[Bug target/26397] Program crashes when rethrowing exception

2006-04-24 Thread michael dot klein at fazi dot de


--- Comment #5 from michael dot klein at fazi dot de  2006-04-24 09:26 
---
Actually, gcc is installed both with *and* without "-X.Y.Z" on all machines
here except the Debian Linuxes (AIX, HP-UX, Solaris), but none of them carries
a g++ ending with "-X.Y.Z".

According to truss, libstdc++.a and libgcc.a are definitely pulled from
/usr/local/lib/gcc/powerpc-ibm-aix5.2.0.0/4.0.2

Anyway, I just noticed something odd, the program works when:
- compiled and linked with 3.3.6
- compiled with 3.3.6, linked with 4.0.2
- compiled with 4.0.2, linked with 3.3.6

And the program only crashes if it is compiled *and* linked with 4.0.2. Any
reasonable explanation for this?


-- 


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



[Bug target/26397] Program crashes when rethrowing exception

2006-02-21 Thread michael dot klein at fazi dot de


--- Comment #3 from michael dot klein at fazi dot de  2006-02-21 16:21 
---
Didn't help, same result with powerpc-ibm-aix5.2.0.0-g++ (there is no
powerpc-ibm-aix5.2.0.0-g++-4.0.2 here).


-- 


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



[Bug target/26397] Program crashes when rethrowing exception

2006-02-21 Thread michael dot klein at fazi dot de


--- Comment #1 from michael dot klein at fazi dot de  2006-02-21 15:57 
---
Created an attachment (id=10887)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10887&action=view)
Preprocessed source


-- 


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



[Bug c++/26397] New: Program crashes when rethrowing exception

2006-02-21 Thread michael dot klein at fazi dot de
The program below crashes with illegal instruction when rethrowing the
previously caught exception.

GCC version:

$ powerpc-ibm-aix5.2.0.0-gcc-4.0.2 -v
Using built-in specs.
Target: powerpc-ibm-aix5.2.0.0
Configured with: ../gcc-4.0.2/configure --disable-nls --enable-threads=posix
--enable-languages=c,c++ --disable-shared
--enable-version-specific-runtime-libs 
Thread model: aix
gcc version 4.0.2

$ powerpc-ibm-aix5.2.0.0-gcc-4.0.2 exctest.cpp -lstdc++ -o exctest


#include 

struct FzException
{
  const char *what()
  {
mWhat = std::string("a") + std::string("b");
return mWhat.c_str();
  }

  std::string mWhat;
};


int main(int, char **argv)
{
  try
  {
try
{
  throw FzException();
}
catch(FzException & e)
{
  e.what();
  throw;
}
  }
  catch(...)
  {
exit(1);
  }
}


-- 
   Summary: Program crashes when rethrowing exception
   Product: gcc
   Version: 4.0.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michael dot klein at fazi dot de
 GCC build triplet: powerpc-ibm-aix5.2.0.0
  GCC host triplet: powerpc-ibm-aix5.2.0.0
GCC target triplet: powerpc-ibm-aix5.2.0.0


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