public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/58454] New: Potentially wrong(or at least weird/inconsistent) code generation with -O2 -fno-strict-overflow
@ 2013-09-18  1:28 mednafen at gmail dot com
  2013-09-18  5:00 ` pinskia
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: mednafen at gmail dot com @ 2013-09-18  1:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58454
           Summary: Potentially wrong(or at least weird/inconsistent) code
                    generation with -O2 -fno-strict-overflow
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mednafen at gmail dot com

Created attachment 30844
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30844&action=edit
Testcase program.

Working:
XXX@willow:~/halt$ /usr/local/gcc-4.8.1/bin/gcc -Wall -O0 -o halt halt.c 
XXX@willow:~/halt$ ./halt 
IMm3: ****
IMm2: ***
IMm1: **
IM: *


????:
XXX@willow:~/halt$ /usr/local/gcc-4.8.1/bin/gcc -Wall -O2 -o halt halt.c 
XXX@willow:~/halt$ ./halt 
IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3:
****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3:
****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3: ****IMm3:
****IMm3: ****Aborted


Working:
XXX@willow:~/halt$ /usr/local/gcc-4.8.1/bin/gcc -Wall -O2
-fno-aggressive-loop-optimizations -o halt halt.c
XXX@willow:~/halt$ ./halt 
IMm3:
****************************************************************************************************Aborted


Broken:
XXX@willow:~/halt$ /usr/local/gcc-4.8.1/bin/gcc -Wall -O2 -fno-strict-overflow
-o halt halt.c 
XXX@willow:~/halt$ ./halt 
IMm3: ****
IMm2: ***
IMm1:
*********************************************************************************************Aborted


Broken:
XXX@willow:~/halt$ /usr/local/gcc-4.8.1/bin/gcc -Wall -O2
-fno-aggressive-loop-optimizations -fno-strict-overflow -o halt halt.c 
XXX@willow:~/halt$ ./halt 
IMm3: ****
IMm2: ***
IMm1:
*********************************************************************************************Aborted


Working:
XXX@willow:~/halt$ /usr/local/gcc-4.8.1/bin/gcc -Wall -O2 -fno-strict-overflow
-fno-tree-vrp -o halt halt.c
XXX@willow:~/halt$ ./halt
IMm3: ****
IMm2: ***
IMm1: **
IM: *


Working:
XXX@willow:~/halt$ /usr/local/gcc-4.8.1/bin/gcc -Wall -O2 -fno-strict-overflow
-fwrapv -o halt halt.c
XXX@willow:~/halt$ ./halt 
IMm3: ****
IMm2: ***
IMm1: **
IM: *


XXX@willow:~/halt$ /usr/local/gcc-4.8.1/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc-4.8.1/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.8.1/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.1/configure --prefix=/usr/local/gcc-4.8.1
Thread model: posix
gcc version 4.8.1 (GCC)


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

end of thread, other threads:[~2021-05-14 10:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-18  1:28 [Bug c/58454] New: Potentially wrong(or at least weird/inconsistent) code generation with -O2 -fno-strict-overflow mednafen at gmail dot com
2013-09-18  5:00 ` pinskia
2013-09-18  5:00 ` [Bug c/58454] " pinskia at gmail dot com
2013-09-18  5:56 ` mednafen at gmail dot com
2013-09-18  8:45 ` rguenth at gcc dot gnu.org
2013-09-20  0:08 ` ian at airs dot com
2013-09-20  7:45 ` manu at gcc dot gnu.org
2021-05-14 10:00 ` [Bug tree-optimization/58454] " jakub at gcc dot gnu.org

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