This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/53045] Missing loop termination
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 Apr 2012 09:23:09 +0000
- Subject: [Bug tree-optimization/53045] Missing loop termination
- Auto-submitted: auto-generated
- References: <bug-53045-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53045
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-04-20 09:23:09 UTC ---
struct { double d[1]; } foo0, foo1, foo2, foo3, foo4, foo5, foo6, foo7;
int main ()
{
struct { double d; } bar[8]
= { 48.394, 39.3, -397.9, 3484.9, -8.394, -93.3, 7.9, 84.94 };
int i;
for (i = 0; i < 8; i++)
foo0.d[i] = bar[i].d;
return 0;
}
This is invalid source - foo0.d[1] is an out-of-bound access. Number of
iteration analysis correctly concludes that i is in the range of [0, 0]
and optimizes away the loop exit test.