public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41986] New: incorrect execution via addition of -finline-functions
@ 2009-11-08 9:44 tim dot dawborn at gmail dot com
2009-11-08 9:45 ` [Bug c++/41986] " tim dot dawborn at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: tim dot dawborn at gmail dot com @ 2009-11-08 9:44 UTC (permalink / raw)
To: gcc-bugs
Compiling with "-Wall -O2" results in the correct execution of this code.
Compiling with "-Wall -O2 -finline-functions" with the code as attached, causes
the assertion to fail, which should not happen. However, if you uncomment
either of the std::cout lines in Decoder.cc or DecoderDerivs.cc and recompile
with "-Wall -O2 -finline-functions", the assertion does not fail. It appears if
you force the any of the "node" variables to be read, the assertion will not
fail (the correct execution).
--
Summary: incorrect execution via addition of -finline-functions
Product: gcc
Version: 4.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tim dot dawborn at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41986
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/41986] incorrect execution via addition of -finline-functions
2009-11-08 9:44 [Bug c++/41986] New: incorrect execution via addition of -finline-functions tim dot dawborn at gmail dot com
@ 2009-11-08 9:45 ` tim dot dawborn at gmail dot com
2009-11-08 11:37 ` rguenth at gcc dot gnu dot org
2009-11-08 14:15 ` tim dot dawborn at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: tim dot dawborn at gmail dot com @ 2009-11-08 9:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tim dot dawborn at gmail dot com 2009-11-08 09:45 -------
Created an attachment (id=18992)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18992&action=view)
the code required to reproduce the bug
$ tar -zxf test.tgz
$ cd test
$ make clean all
$ ./main
main: Decoder.cc:22: Node* Decoder::best_equiv(Node*): Assertion
`max_node->score == max_score' failed.
Aborted
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41986
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/41986] incorrect execution via addition of -finline-functions
2009-11-08 9:44 [Bug c++/41986] New: incorrect execution via addition of -finline-functions tim dot dawborn at gmail dot com
2009-11-08 9:45 ` [Bug c++/41986] " tim dot dawborn at gmail dot com
@ 2009-11-08 11:37 ` rguenth at gcc dot gnu dot org
2009-11-08 14:15 ` tim dot dawborn at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-08 11:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-11-08 11:36 -------
You seem to run afoul generic floating point equality comparison issues.
best_score possibly modifies scores and calls back to best_equiv. Roudning
issues with the accumulation can lead to the failure.
So, we need some analysis on your part to prove this is a bug with GCC,
we're not application debuggers ;)
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41986
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/41986] incorrect execution via addition of -finline-functions
2009-11-08 9:44 [Bug c++/41986] New: incorrect execution via addition of -finline-functions tim dot dawborn at gmail dot com
2009-11-08 9:45 ` [Bug c++/41986] " tim dot dawborn at gmail dot com
2009-11-08 11:37 ` rguenth at gcc dot gnu dot org
@ 2009-11-08 14:15 ` tim dot dawborn at gmail dot com
2 siblings, 0 replies; 4+ messages in thread
From: tim dot dawborn at gmail dot com @ 2009-11-08 14:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tim dot dawborn at gmail dot com 2009-11-08 14:15 -------
Thanks. Your comment sparked an idea. There is no bug in the logic of the
source code itself, nor should there be any floating point differences
anywhere. There should be no floating point differences as for every two
floating point variables $a$ and $b$ which are checked for equality, before the
check happens, $a$ will be assigned the value $b$. I've refined the code needed
to replicate down a lot and will repost the bug under a more suitable heading,
as it has nothing to do with inline-functions. Sorry to waste your time :)
Summary:
Upon further inspection, the description of this ticket is not correct. Will
re-file bug under appropriate heading.
--
tim dot dawborn at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41986
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-08 14:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-08 9:44 [Bug c++/41986] New: incorrect execution via addition of -finline-functions tim dot dawborn at gmail dot com
2009-11-08 9:45 ` [Bug c++/41986] " tim dot dawborn at gmail dot com
2009-11-08 11:37 ` rguenth at gcc dot gnu dot org
2009-11-08 14:15 ` tim dot dawborn at gmail 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).