public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/30047] Corrupt return value in specific context
       [not found] <bug-30047-4@http.gcc.gnu.org/bugzilla/>
@ 2011-04-12 19:44 ` ktietz at gcc dot gnu.org
  0 siblings, 0 replies; 3+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-04-12 19:44 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ktietz at gcc dot gnu.org
         Resolution|                            |DUPLICATE

--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-04-12 19:44:10 UTC ---
Dup of 47490

*** This bug has been marked as a duplicate of bug 47490 ***


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

* [Bug target/30047] Corrupt return value in specific context
  2006-12-02  7:29 [Bug libstdc++/30047] New: " spam at david dot osborn dot name
  2008-06-08 19:56 ` [Bug target/30047] " gcc at david dot osborn dot name
@ 2008-06-08 20:02 ` gcc at david dot osborn dot name
  1 sibling, 0 replies; 3+ messages in thread
From: gcc at david dot osborn dot name @ 2008-06-08 20:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from gcc at david dot osborn dot name  2008-06-08 20:01 -------
Created an attachment (id=15738)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15738&action=view)
compiler output

This shows bad code being generated.  The return value (12345) gets pushed into
eax on line 77, and then is subsequently overwritten for a call to
__Unwind_SjLj_Unregister.  Line 85 was added by me to show how to recover the
return value.


-- 


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


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

* [Bug target/30047] Corrupt return value in specific context
  2006-12-02  7:29 [Bug libstdc++/30047] New: " spam at david dot osborn dot name
@ 2008-06-08 19:56 ` gcc at david dot osborn dot name
  2008-06-08 20:02 ` gcc at david dot osborn dot name
  1 sibling, 0 replies; 3+ messages in thread
From: gcc at david dot osborn dot name @ 2008-06-08 19:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from gcc at david dot osborn dot name  2008-06-08 19:55 -------
Created an attachment (id=15736)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15736&action=view)
reduced testcase

This bug still exists in GCC 4.3.1.  I've narrowed it down to line 183 in
bits/basic_ios.tcc where it says:

extern template class basic_ios<char>;

If you comment out this line, the code produces the correct result (12345). 
Otherwise it produced zero consistently.  The attached testcase leaves a lot
out of the iostream classes, so it may be technically invalid.  But it yields
that same results as the previous testcase, as well as with respect to the
"extern template" line.

Also, the std::vector in the original testcase can be replaced by an empty
class with an explicit destructor.


-- 


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


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

end of thread, other threads:[~2011-04-12 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-30047-4@http.gcc.gnu.org/bugzilla/>
2011-04-12 19:44 ` [Bug target/30047] Corrupt return value in specific context ktietz at gcc dot gnu.org
2006-12-02  7:29 [Bug libstdc++/30047] New: " spam at david dot osborn dot name
2008-06-08 19:56 ` [Bug target/30047] " gcc at david dot osborn dot name
2008-06-08 20:02 ` gcc at david dot osborn dot name

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