public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40825] New: mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2
@ 2009-07-22 14:05 jbeulich at novell dot com
2009-07-22 14:06 ` [Bug c++/40825] " jbeulich at novell dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jbeulich at novell dot com @ 2009-07-22 14:05 UTC (permalink / raw)
To: gcc-bugs
Compiling this file for NetWare, or, after pre-processing it and stripping down
to a reasonably small one, natively for Linux produces "'d' is used
uninitialized in this function".
While the original code in libstdc++ looks broken (which will be reported as a
separate bug), the warning and the generated code are incorrect, since 'd'
definitely gets constructed at source level.
Neither the waring nor the incorrect code generation can be observed at -O1.
I will attach the stripped-down, usable on plain Linux, example in a second.
--
Summary: mis-optimization of libstdc++'s
atomic.cc:__atomic_flag_wait_explicit() at -O2
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jbeulich at novell dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40825
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/40825] mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2
2009-07-22 14:05 [Bug c++/40825] New: mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2 jbeulich at novell dot com
@ 2009-07-22 14:06 ` jbeulich at novell dot com
2009-07-22 14:08 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jbeulich at novell dot com @ 2009-07-22 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jbeulich at novell dot com 2009-07-22 14:06 -------
Created an attachment (id=18238)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18238&action=view)
example source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40825
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/40825] mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2
2009-07-22 14:05 [Bug c++/40825] New: mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2 jbeulich at novell dot com
2009-07-22 14:06 ` [Bug c++/40825] " jbeulich at novell dot com
@ 2009-07-22 14:08 ` rguenth at gcc dot gnu dot org
2009-07-22 14:09 ` paolo dot carlini at oracle dot com
2009-07-22 14:18 ` jbeulich at novell dot com
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-22 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-07-22 14:08 -------
Can you give a hint on what exactly is miscompiled? (the testcase isn't an
executable one that fails if miscompiled...)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40825
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/40825] mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2
2009-07-22 14:05 [Bug c++/40825] New: mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2 jbeulich at novell dot com
2009-07-22 14:06 ` [Bug c++/40825] " jbeulich at novell dot com
2009-07-22 14:08 ` rguenth at gcc dot gnu dot org
@ 2009-07-22 14:09 ` paolo dot carlini at oracle dot com
2009-07-22 14:18 ` jbeulich at novell dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-07-22 14:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo dot carlini at oracle dot com 2009-07-22 14:09 -------
The library issue is PR40654.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40825
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/40825] mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2
2009-07-22 14:05 [Bug c++/40825] New: mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2 jbeulich at novell dot com
` (2 preceding siblings ...)
2009-07-22 14:09 ` paolo dot carlini at oracle dot com
@ 2009-07-22 14:18 ` jbeulich at novell dot com
3 siblings, 0 replies; 5+ messages in thread
From: jbeulich at novell dot com @ 2009-07-22 14:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jbeulich at novell dot com 2009-07-22 14:17 -------
Just as the warning says - construction of 'd' is missing. The warning lead me
to look at the generated code, just to see that they are in sync (and hence
perhaps have the same root cause).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40825
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-22 14:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-22 14:05 [Bug c++/40825] New: mis-optimization of libstdc++'s atomic.cc:__atomic_flag_wait_explicit() at -O2 jbeulich at novell dot com
2009-07-22 14:06 ` [Bug c++/40825] " jbeulich at novell dot com
2009-07-22 14:08 ` rguenth at gcc dot gnu dot org
2009-07-22 14:09 ` paolo dot carlini at oracle dot com
2009-07-22 14:18 ` jbeulich at novell dot com
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).