[Bug tree-optimization/37868] New: code that doesn't breaks TBAA is misoptimized even with -fno-strict-aliasing
edwintorok at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Oct 18 18:17:00 GMT 2008
+++ This bug was initially created as a clone of Bug #37867 +++
Cloning bug on Chris's request.
Running gcc-4.3 -O2 on PR1386.c I get different results than with -O1.
$ gcc-4.3 -O1 PR1386.c && ./a.out
PR1386.c: In function ÂmainÂ:
PR1386.c:15: warning: large integer implicitly truncated to unsigned type
PR1386.c:17: warning: large integer implicitly truncated to unsigned type
bad bits: 0
$ gcc-4.3 -O2 PR1386.c && ./a.out
PR1386.c: In function ÂmainÂ:
PR1386.c:15: warning: large integer implicitly truncated to unsigned type
PR1386.c:17: warning: large integer implicitly truncated to unsigned type
bad bits: fffffffffffffff0
$ g++-4.3 -O2 -fno-strict-aliasing x.c
x.c: In function Âint main()Â:
x.c:15: warning: large integer implicitly truncated to unsigned type
x.c:17: warning: large integer implicitly truncated to unsigned type
edwin@debian:~$ ./a.out
bad bits: fffffffffffffff0
--
Summary: code that doesn't breaks TBAA is misoptimized even with
-fno-strict-aliasing
Product: gcc
Version: 4.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: edwintorok at gmail dot com
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37868
More information about the Gcc-bugs
mailing list