This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/53419] loop incorrectly optimized to endless loop at -O2 for table delimited by extern addresses (x86-32)
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 19 May 2012 21:54:03 +0000
- Subject: [Bug tree-optimization/53419] loop incorrectly optimized to endless loop at -O2 for table delimited by extern addresses (x86-32)
- Auto-submitted: auto-generated
- References: <bug-53419-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53419
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-19 21:54:03 UTC ---
> extern func_ptr_t init_array_begin[1];
> extern func_ptr_t init_array_end[1];
The array sizes say they are size of one. If you want to be correct and not
allow GCC to optimize away the check because array overflow, use [] instead of
[1].