public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: bangerth@dealii.org
To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, jbakker@rssd.esa.int,
	nobody@gcc.gnu.org, ulammers@rssd.esa.int
Subject: Re: c++/9769: [3.2/3.3 regression] miscompilation with -freg-struct-return
Date: Fri, 07 Mar 2003 02:08:00 -0000	[thread overview]
Message-ID: <20030307020846.5414.qmail@sources.redhat.com> (raw)

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


             reply	other threads:[~2003-03-07  2:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-07  2:08 bangerth [this message]
2003-03-11 23:18 jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030307020846.5414.qmail@sources.redhat.com \
    --to=bangerth@dealii.org \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-gnats@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=jbakker@rssd.esa.int \
    --cc=nobody@gcc.gnu.org \
    --cc=ulammers@rssd.esa.int \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).