This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/62006] Bad code generation with -O3 (possibly due to -ftree-partial-pre)
- From: "tkoeppe at google dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 04 Aug 2014 13:48:43 +0000
- Subject: [Bug tree-optimization/62006] Bad code generation with -O3 (possibly due to -ftree-partial-pre)
- Auto-submitted: auto-generated
- References: <bug-62006-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62006
--- Comment #11 from Thomas KÃppe <tkoeppe at google dot com> ---
Created attachment 33240
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33240&action=edit
Further fixing: Uses uintptr_ts for the difference
On Jonathan's suggestion I changed the distance computation to go through a
uintptr_t conversion.
Jonathan suggested compiling with -fno-elide-constructors, and indeed the
attached code breaks when that option is passed. As you said, the UB caused by
the distance computations of automatic objects seems to be the stumbling point.