This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/11841] [3.3 Regression] The code compiled with -funroll-loops crashes
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Mar 2004 21:38:19 -0000
- Subject: [Bug optimization/11841] [3.3 Regression] The code compiled with -funroll-loops crashes
- References: <20030807012210.11841.panov@canopus.iacp.dvo.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-03-30 21:38 -------
Here's a reduced testcase:
=========================================
int main()
{
double d[2];
int i, j;
for (i=0; i<2; ++i)
for (j=0; j<2; ++j)
d[i+j] = 0;
return (int)&i;
}
=========================================
This program segfaults when I compile it with "gcc -O2 -funroll-loops"
on my i686-pc-linux-gnu box.
It runs fine, when compiles without "-funroll-loops" or with "-O" instead
of "-O2".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11841