This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/11841] [3.3 Regression] The code compiled with -funroll-loops crashes


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]