[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-02-14 Thread wilson at gcc dot gnu dot org

--- Additional Comments From wilson at gcc dot gnu dot org  2005-02-15 
04:20 ---
It was fixed by the ivopts patch for 18687, which was a patch to reduce
compilation time.  The patch says nothing about fixing bugs, or changing the
result.  It only claims to make ivopts faster.  Since this patch has no
testcase, we clearly need to add the testcase from this PR to the testsuite.

The patch that fixed it:
http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00307.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-02-14 Thread Thomas dot Koenig at online dot de

--- Additional Comments From Thomas dot Koenig at online dot de  2005-02-14 
12:25 ---
I can confirm that this is fixed in the 20050213 snapshot.
Both the reduced C test case and the original Fortran routine
don't segfault any more.  Thanks to whoever fixed this :-)


I would suggest adding sl4-error.c to the testsuite, to make
sure that this does not regress.

Thomas


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-02-12 Thread wilson at gcc dot gnu dot org

--- 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 ;
and inside the loop
  ivtmp.41_58 = ivtmp.41_57 - 4294967295;
Translating that into hex, we have an initial value of 0x1 .  And an
increment of 0x 0001.  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|-00-00 00:00:00 |2005-02-12 04:00:42
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-02-01 Thread wilson at tuliptree dot org

--- Additional Comments From wilson at tuliptree dot org  2005-02-01 21:32 
---
Subject: Re:  [4.0 regression] LAPACK test xeigtsts
segfaults with optimization

On Tue, 2005-02-01 at 03:13, giovannibajo at libero dot it wrote:
> --- Additional Comments From giovannibajo at libero dot it  2005-02-01 
> 11:13 ---
> Jim, this is a ia64 regression that greatly affects Fortran (LAPACK), and 
> there 
> is a simple C testcase for it. Would you mind having a look?

I saw the discussion, and was hoping to get a chance to look at it, but
because of personal issues it may be a few weeks before I get a chance.




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-02-01 Thread giovannibajo at libero dot it

--- Additional Comments From giovannibajo at libero dot it  2005-02-01 
11:13 ---
Jim, this is a ia64 regression that greatly affects Fortran (LAPACK), and there 
is a simple C testcase for it. Would you mind having a look?

-- 
   What|Removed |Added

 CC||wilson at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-01-28 Thread Thomas dot Koenig at online dot de

--- Additional Comments From Thomas dot Koenig at online dot de  2005-01-28 
14:29 ---
The inner loop does not terminate in this example,
until a segfault is hit.

$ cat sl5-error.c
#include 

void foo(float * x);

int main()
{
  float x[4];
  foo (x);
  return 0;
}

void foo (float *x)
{
int i,j,k;
float temp;
static float t16[16]={1.,2.,3.,4.,5.,6.,7.,8.,9.,
  10.,11.,12.,13.,14.,15.,16.};
static float tmp[4]={0.,0.,0.,0.};

for (i=0; i<4; i++) {
k = 3 - i;
temp = t16[5*k];
for(j=k+1; j<4; j++) {
printf("i=%d, j=%d, k=%d\n",i,j,k);
tmp[k] = t16[k+  j*4] * temp;
}
}
x[0] = tmp[0];
x[1] = tmp[1];
x[2] = tmp[2];
x[3] = tmp[3];
}
$ gcc sl5-error.c
$ ./a.out
i=1, j=3, k=2
i=2, j=2, k=1
i=2, j=3, k=1
i=3, j=1, k=0
i=3, j=2, k=0
i=3, j=3, k=0
$ gcc -O1 sl5-error.c
$ ./a.out
i=1, j=3, k=2
i=2, j=2, k=1
i=2, j=3, k=1
i=2, j=4, k=1
i=2, j=5, k=1
i=2, j=6, k=1

... and so on, until

i=2, j=803, k=1
i=2, j=804, k=1
i=2, j=805, k=1
i=2, j=806, k=1
i=2, j=807, k=1
i=2, j=808, k=1
Segmentation fault
$ gcc -v ; gcc -dumpmachine
Using built-in specs.
Configured with: ../gcc-4.0-20050123/configure --prefix=/home/zfkts
--enable-languages=c,f95
Thread model: posix
gcc version 4.0.0 20050123 (experimental)
ia64-unknown-linux-gnu


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-01-28 Thread Thomas dot Koenig at online dot de

--- Additional Comments From Thomas dot Koenig at online dot de  2005-01-28 
13:47 ---
Created an attachment (id=8090)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8090&action=view)
Simpler example of failing C source code

This is a simpler example of failing C code (which won't
make peoples' eyes cross from looking at converted Fortran
DO loops and array indices), and which also has its variables
initialized.

The error is the same:
$ gcc -O1 sl4-error.c
$ ./a.out
Segmentation fault
$ gcc -v ; gcc -dumpmachine
Using built-in specs.
Configured with: ../gcc-4.0-20050123/configure --prefix=/home/zfkts
--enable-languages=c,f95
Thread model: posix
gcc version 4.0.0 20050123 (experimental)
ia64-unknown-linux-gnu


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-01-27 Thread pinskia at gcc dot gnu dot org


-- 
   What|Removed |Added

   GCC host triplet|ia64-unknown-linux-gnu  |
 GCC target triplet||ia64-unknown-linux-gnu
   Target Milestone|--- |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-01-27 Thread Thomas dot Koenig at online dot de


-- 
   What|Removed |Added

  Known to fail||4.0.0
  Known to work||3.2.3


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977


[Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization

2005-01-27 Thread Thomas dot Koenig at online dot de


-- 
   What|Removed |Added

Summary|LAPACK test xeigtsts|[4.0 regression] LAPACK test
   |segfaults with optimization |xeigtsts segfaults with
   ||optimization


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977