------- Additional Comments From wilson at gcc dot gnu dot org 2005-02-12 04:00 ------- I have taken an initial look. This is an ivopts problem. Compiling with -O -fno-ivopts works.
There is clearly something wrong with ivopts if I look at the t54.ivopts dump file. For the J loop iterator, I get before the loop # ivtmp.41_57 = PHI <ivtmp.41_58(9), 4294967296(0)>; and inside the loop ivtmp.41_58 = ivtmp.41_57 - 4294967295; Translating that into hex, we have an initial value of 0x1 00000000. And an increment of 0xffffffff 00000001. The first addition produces a value of 0x1, so a loop that iterates once works correctly. If the loop needs to execute more than once, we are screwed, as now the iterator ends up with useless values. I haven't tried looking at ivopts yet, but I wonder if perhaps this is a 64-bit hosting issue, and ivopts is getting some mixed 32-bit/64-bit arithmetic wrong. Trying this theory, I compiled the testcase on an x86_64 system, and got the same failure, with the same bogus iterator values. I updated my source trees, rebuilt, and now it works on both IA-64 and x86-64. This bug must have been fixed sometime within the last week or two by a patch for another ivopts PR. It would be nice to know which one fixed it though. I will check to see if I can figure this out easily. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2005-02-12 04:00:42 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977