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 panov at canopus dot iacp dot dvo dot ru  2003-11-18 03:06 -------
I tryed the gcc-3.3-20031117, the bug still arises when "-O2 -mcpu=pentium4
-funroll-loops" used. The program crases (checked with gdb) at the following code:

    for (j = 0; j < GRID_SIZE; j++) {
      for (k = 0; k < GRID_SIZE; k++) {
#ifdef WEIGHTS /* undefined */
        wts_d[j][k] = (double) rand () / max_rand * .5 + .5;
        wts_h[j][k] = (double) rand () / max_rand * .5 + .5;
        wts_v[j][k] = (double) rand () / max_rand * .5 + .5;
#else 
        wts_d[j][k] = 1.0;
        wts_h[j][k] = 1.0; /* This line crashes */
        wts_v[j][k] = 1.0;
#endif 
      }
    }

The compiled program is right when -O1 used. If you use  -mcpu != pentium4 (or
undefined) the program hangs (eats all CPU time). 

My cpu:
 cat /proc/cpuinfo 
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Pentium(R) 4 CPU 2.66GHz
stepping        : 7
cpu MHz         : 2672.776
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips        : 5334.63

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |


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]