public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9769: [3.2/3.3 regression] miscompilation with -freg-struct-return
@ 2003-03-11 23:18 jason
  0 siblings, 0 replies; 2+ messages in thread
From: jason @ 2003-03-11 23:18 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jbakker, nobody, ulammers

Synopsis: [3.2/3.3 regression] miscompilation with -freg-struct-return

State-Changed-From-To: analyzed->closed
State-Changed-By: jason
State-Changed-When: Tue Mar 11 23:18:59 2003
State-Changed-Why:
    A warning was added to the docs last September:
    
    Warning: code compiled with the -freg-struct-return
    switch is not binary compatible with code compiled with the
    -fpcc-struct-return switch.
    Use it to conform to a non-default application binary interface.
    
    The default under Solaris is -fpcc-struct-return.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9769


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

* Re: c++/9769: [3.2/3.3 regression] miscompilation with -freg-struct-return
@ 2003-03-07  2:08 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-03-07  2:08 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jbakker, nobody, ulammers

Old Synopsis: compiles wrong code but executable SEGV with -freg-struct-return
New Synopsis: [3.2/3.3 regression] miscompilation with -freg-struct-return

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Mar  7 02:08:46 2003
State-Changed-Why:
    Confirmed with 3.2.2 and 3.3. It works with 3.0 and 
    present mainline. However, I admit that I am unclear 
    about whether this is an ABI-incompatible switch: does
    one need to recompile libstdc++ when one wants to use it?
    The docs are not entirely clear about this.
    
    At any rate, here's a backtrace of where the program
    crashes:
    #0  std::string::_M_iend() const (this=0x19)
        at /home/bangerth/tmp/gcc/bin/i686-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:249
    #1  0x08048f39 in std::string& std::string::append<char const*>(char const*, char const*) (this=0xbffff174, __first=0x8048fbc "*** ", __last=0x8048fc0 "")
        at /home/bangerth/bin/gcc-3.3-pre/include/c++/3.3/bits/basic_string.h:492
    #2  0x08048ee9 in std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (__lhs=0x8048fbc "*** ", __rhs=@0xbffff184)
        at /home/bangerth/bin/gcc-3.3-pre/include/c++/3.3/bits/basic_string.tcc:620
    #3  0x08048d61 in main () at x.cc:7
    #4  0x4012a9ed in __libc_start_main () from /lib/libc.so.6
    
    Obviously, the this pointer in frame 0 is botched up.
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9769


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

end of thread, other threads:[~2003-03-11 23:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-11 23:18 c++/9769: [3.2/3.3 regression] miscompilation with -freg-struct-return jason
  -- strict thread matches above, loose matches on Subject: below --
2003-03-07  2:08 bangerth

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