* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
@ 2004-12-14 11:09 ` Thomas dot Koenig at online dot de
2004-12-14 16:07 ` sgk at troutmask dot apl dot washington dot edu
` (30 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-14 11:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-14 11:08 -------
Same problem with -O1 . -O0 doesn't segfault.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|LAPACK test xeigtsts |LAPACK test xeigtsts
|segfaults |segfaults with optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
2004-12-14 11:09 ` [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization Thomas dot Koenig at online dot de
@ 2004-12-14 16:07 ` sgk at troutmask dot apl dot washington dot edu
2004-12-16 15:59 ` Thomas dot Koenig at online dot de
` (29 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2004-12-14 16:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sgk at troutmask dot apl dot washington dot edu 2004-12-14 16:06 -------
My success with LAPACK is on i386-*-FreeBSD. LAPACK
dies a horrible death on amd64-*-FreeBSD. Your segfault
is a BUS ERROR for me. I believe this is a x86_64 target
problem.
--
steve
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
2004-12-14 11:09 ` [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization Thomas dot Koenig at online dot de
2004-12-14 16:07 ` sgk at troutmask dot apl dot washington dot edu
@ 2004-12-16 15:59 ` Thomas dot Koenig at online dot de
2004-12-17 9:30 ` Thomas dot Koenig at online dot de
` (28 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-16 15:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-16 15:59 -------
I reran the tests with the 20041114 snapshot at -O1, and
the segfault did indeed go away, so this is a regression.
Quite likely, this is a IA-64 target problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (2 preceding siblings ...)
2004-12-16 15:59 ` Thomas dot Koenig at online dot de
@ 2004-12-17 9:30 ` Thomas dot Koenig at online dot de
2005-01-06 14:43 ` tobi at gcc dot gnu dot org
` (27 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2004-12-17 9:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2004-12-17 09:30 -------
With 20041121, there was a problem with
xeigtstc hanging with -O1 on IA-64.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (3 preceding siblings ...)
2004-12-17 9:30 ` Thomas dot Koenig at online dot de
@ 2005-01-06 14:43 ` tobi at gcc dot gnu dot org
2005-01-06 15:43 ` giovannibajo at libero dot it
` (26 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: tobi at gcc dot gnu dot org @ 2005-01-06 14:43 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |19292
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (4 preceding siblings ...)
2005-01-06 14:43 ` tobi at gcc dot gnu dot org
@ 2005-01-06 15:43 ` giovannibajo at libero dot it
2005-01-06 15:46 ` pinskia at gcc dot gnu dot org
` (25 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: giovannibajo at libero dot it @ 2005-01-06 15:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2005-01-06 15:43 -------
I'm no Fortran guru, but could be this related to PR 17675?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (5 preceding siblings ...)
2005-01-06 15:43 ` giovannibajo at libero dot it
@ 2005-01-06 15:46 ` pinskia at gcc dot gnu dot org
2005-01-06 17:01 ` Thomas dot Koenig at online dot de
` (24 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-06 15:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-06 15:46 -------
Yes this is most likely PR 17675 which effects all targets where unaligned loads cause an processor
exception (and the OS does not handle it) (ia64 is one of these targets).
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |17675
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (6 preceding siblings ...)
2005-01-06 15:46 ` pinskia at gcc dot gnu dot org
@ 2005-01-06 17:01 ` Thomas dot Koenig at online dot de
2005-01-09 4:53 ` giovannibajo at libero dot it
` (23 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-06 17:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-06 17:01 -------
(In reply to comment #5)
> I'm no Fortran guru, but could be this related to PR 17675?
I don't think this is an alignment problem. Apparently,
ia64-unknown-linux-gnu sets up the processor differently from
HP-UX.
Test case:
$ cat equiv.f
integer a(5)
double precision d1,d2
equivalence (a(1),d1), (a(4),d2)
call foo(d1,d2)
print *,d1,d2
end
subroutine foo(d1,d2)
double precision d1,d2
d1 = 3.14D0
d2 = 2.71D0
end
$ gfortran equiv.f
$ ./a.out
3.14000000000000 2.71000000000000
$ ifort equiv.f
fortcom: Warning: equiv.f, line 2: Alignment of variable or array is
inconsistent with its data type. [D2]
double precision d1,d2
--------------------------^
$ ./a.out
3.14000000000000 2.71000000000000
$ g77 equiv.f
Can't place `d1' as directed by EQUIVALENCE due to alignment restrictions
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (7 preceding siblings ...)
2005-01-06 17:01 ` Thomas dot Koenig at online dot de
@ 2005-01-09 4:53 ` giovannibajo at libero dot it
2005-01-09 22:59 ` pbrook at gcc dot gnu dot org
` (22 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: giovannibajo at libero dot it @ 2005-01-09 4:53 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (8 preceding siblings ...)
2005-01-09 4:53 ` giovannibajo at libero dot it
@ 2005-01-09 22:59 ` pbrook at gcc dot gnu dot org
2005-01-09 23:16 ` ebotcazou at gcc dot gnu dot org
` (21 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2005-01-09 22:59 UTC (permalink / raw)
To: gcc-bugs
--
Bug 18977 depends on bug 17675, which changed state.
Bug 17675 Summary: [Regression w.r.t. g77] Alignment constraints not honored in EQUIVALENCE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17675
What |Old Value |New Value
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (9 preceding siblings ...)
2005-01-09 22:59 ` pbrook at gcc dot gnu dot org
@ 2005-01-09 23:16 ` ebotcazou at gcc dot gnu dot org
2005-01-16 23:21 ` pbrook at gcc dot gnu dot org
` (20 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2005-01-09 23:16 UTC (permalink / raw)
To: gcc-bugs
--
Bug 18977 depends on bug 17675, which changed state.
Bug 17675 Summary: [Regression w.r.t. g77] Alignment constraints not honored in EQUIVALENCE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17675
What |Old Value |New Value
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (10 preceding siblings ...)
2005-01-09 23:16 ` ebotcazou at gcc dot gnu dot org
@ 2005-01-16 23:21 ` pbrook at gcc dot gnu dot org
2005-01-26 9:42 ` Thomas dot Koenig at online dot de
` (19 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2005-01-16 23:21 UTC (permalink / raw)
To: gcc-bugs
--
Bug 18977 depends on bug 17675, which changed state.
Bug 17675 Summary: [Regression w.r.t. g77] Alignment constraints not honored in EQUIVALENCE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17675
What |Old Value |New Value
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (11 preceding siblings ...)
2005-01-16 23:21 ` pbrook at gcc dot gnu dot org
@ 2005-01-26 9:42 ` Thomas dot Koenig at online dot de
2005-01-26 10:00 ` steven at gcc dot gnu dot org
` (18 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-26 9:42 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |5900
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (12 preceding siblings ...)
2005-01-26 9:42 ` Thomas dot Koenig at online dot de
@ 2005-01-26 10:00 ` steven at gcc dot gnu dot org
2005-01-26 15:26 ` Thomas dot Koenig at online dot de
` (17 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-26 10:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-01-26 10:00 -------
Is there a test case someone can attach to this bug?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (13 preceding siblings ...)
2005-01-26 10:00 ` steven at gcc dot gnu dot org
@ 2005-01-26 15:26 ` Thomas dot Koenig at online dot de
2005-01-26 17:23 ` Thomas dot Koenig at online dot de
` (16 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-26 15:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-26 15:26 -------
(In reply to comment #8)
> Is there a test case someone can attach to this bug?
I'm working on it. The error vanishes if slasy2.f is
compiled with -O0, which is at least a start.
An equivalent error occurs in dlasy2.f, BTW, which also goes away
if dlasy2.f is compiled with -O0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (14 preceding siblings ...)
2005-01-26 15:26 ` Thomas dot Koenig at online dot de
@ 2005-01-26 17:23 ` Thomas dot Koenig at online dot de
2005-01-26 19:08 ` sgk at troutmask dot apl dot washington dot edu
` (15 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-26 17:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-26 17:23 -------
Here we go:
$ cat sl-error.f
implicit none
real x(2,2)
call foo(x)
end
subroutine foo(x)
real x(2,2)
real tmp(4), t16(4,4), btmp(4),temp
DO 120 I = 1, 4
K = 5 - I
TEMP = 1.0 / T16( K, K )
TMP( K ) = BTMP( K )*TEMP
DO 110 J = K + 1, 4
TMP( K ) = TMP( K ) - ( TEMP*T16( K, J ) )*TMP( J )
110 CONTINUE
120 CONTINUE
X( 1, 1 ) = TMP( 1 )
X( 2, 1 ) = TMP( 2 )
X( 1, 2 ) = TMP( 3 )
X( 2, 2 ) = TMP( 4 )
end
$ gfortran sl-error.f
$ ./a.out
$ gfortran -O1 sl-error.f
$ ./a.out
Segmentation fault
$ gfortran -dumpmachine
ia64-unknown-linux-gnu
$ gfortran -v
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)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug fortran/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (15 preceding siblings ...)
2005-01-26 17:23 ` Thomas dot Koenig at online dot de
@ 2005-01-26 19:08 ` sgk at troutmask dot apl dot washington dot edu
2005-01-26 19:46 ` [Bug target/18977] " Thomas dot Koenig at online dot de
` (14 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2005-01-26 19:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sgk at troutmask dot apl dot washington dot edu 2005-01-26 19:07 -------
Thomas,
Your reduce test case compiles and runs fine on amd64-*-freebsd6.0.
This must be a target bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (16 preceding siblings ...)
2005-01-26 19:08 ` sgk at troutmask dot apl dot washington dot edu
@ 2005-01-26 19:46 ` Thomas dot Koenig at online dot de
2005-01-27 15:09 ` Thomas dot Koenig at online dot de
` (13 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-26 19:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-26 19:46 -------
Selected component "target" instead of "fortran".
--
What |Removed |Added
----------------------------------------------------------------------------
Component|fortran |target
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (17 preceding siblings ...)
2005-01-26 19:46 ` [Bug target/18977] " Thomas dot Koenig at online dot de
@ 2005-01-27 15:09 ` Thomas dot Koenig at online dot de
2005-01-27 15:25 ` [Bug target/18977] [4.0 regression] " Thomas dot Koenig at online dot de
` (12 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-27 15:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From Thomas dot Koenig at online dot de 2005-01-27 15:09 -------
Created an attachment (id=8084)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8084&action=view)
Failing C source code
This is indeed a target bug. I've attached a C source
code (from the t02.original file) which works OK with -O0
and generates a segfault at -O1:
$ gcc sl2-error.c
$ ./a.out
$ gcc -O1 sl2-error.c
$ ./a.out
Segmentation fault
$ gcc -v
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)
$ gcc -dumpmachine
ia64-unknown-linux-gnu
This is a regression from 3.2.3:
$ /usr/bin/gcc -O3 sl2-error.c && ./a.out
$ /usr/bin/gcc -O1 sl2-error.c && ./a.out
$ /usr/bin/gcc -O0 sl2-error.c && ./a.out
$ /usr/bin/gcc -v
Reading specs from /usr/lib/gcc-lib/ia64-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=ia64-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-49)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (18 preceding siblings ...)
2005-01-27 15:09 ` Thomas dot Koenig at online dot de
@ 2005-01-27 15:25 ` Thomas dot Koenig at online dot de
2005-01-27 15:32 ` Thomas dot Koenig at online dot de
` (11 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-27 15:25 UTC (permalink / raw)
To: gcc-bugs
--
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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (19 preceding siblings ...)
2005-01-27 15:25 ` [Bug target/18977] [4.0 regression] " Thomas dot Koenig at online dot de
@ 2005-01-27 15:32 ` Thomas dot Koenig at online dot de
2005-01-27 15:33 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-27 15:32 UTC (permalink / raw)
To: gcc-bugs
--
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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (20 preceding siblings ...)
2005-01-27 15:32 ` Thomas dot Koenig at online dot de
@ 2005-01-27 15:33 ` pinskia at gcc dot gnu dot org
2005-01-28 13:48 ` Thomas dot Koenig at online dot de
` (9 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-27 15:33 UTC (permalink / raw)
To: gcc-bugs
--
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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (21 preceding siblings ...)
2005-01-27 15:33 ` pinskia at gcc dot gnu dot org
@ 2005-01-28 13:48 ` Thomas dot Koenig at online dot de
2005-01-28 14:29 ` Thomas dot Koenig at online dot de
` (8 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-28 13:48 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (22 preceding siblings ...)
2005-01-28 13:48 ` Thomas dot Koenig at online dot de
@ 2005-01-28 14:29 ` Thomas dot Koenig at online dot de
2005-02-01 11:13 ` giovannibajo at libero dot it
` (7 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-28 14:29 UTC (permalink / raw)
To: gcc-bugs
------- 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 <stdio.h>
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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (23 preceding siblings ...)
2005-01-28 14:29 ` Thomas dot Koenig at online dot de
@ 2005-02-01 11:13 ` giovannibajo at libero dot it
2005-02-01 21:32 ` wilson at tuliptree dot org
` (6 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: giovannibajo at libero dot it @ 2005-02-01 11:13 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (24 preceding siblings ...)
2005-02-01 11:13 ` giovannibajo at libero dot it
@ 2005-02-01 21:32 ` wilson at tuliptree dot org
2005-02-12 16:29 ` wilson at gcc dot gnu dot org
` (5 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: wilson at tuliptree dot org @ 2005-02-01 21:32 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (25 preceding siblings ...)
2005-02-01 21:32 ` wilson at tuliptree dot org
@ 2005-02-12 16:29 ` wilson at gcc dot gnu dot org
2005-02-14 17:53 ` Thomas dot Koenig at online dot de
` (4 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-02-12 16:29 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (26 preceding siblings ...)
2005-02-12 16:29 ` wilson at gcc dot gnu dot org
@ 2005-02-14 17:53 ` Thomas dot Koenig at online dot de
2005-02-15 16:20 ` wilson at gcc dot gnu dot org
` (3 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-02-14 17:53 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug target/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (27 preceding siblings ...)
2005-02-14 17:53 ` Thomas dot Koenig at online dot de
@ 2005-02-15 16:20 ` wilson at gcc dot gnu dot org
2005-02-19 1:53 ` [Bug tree-optimization/18977] " wilson at gcc dot gnu dot org
` (2 subsequent siblings)
31 siblings, 0 replies; 33+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-02-15 16:20 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (28 preceding siblings ...)
2005-02-15 16:20 ` wilson at gcc dot gnu dot org
@ 2005-02-19 1:53 ` wilson at gcc dot gnu dot org
2005-02-19 11:53 ` cvs-commit at gcc dot gnu dot org
2005-02-19 12:57 ` wilson at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-02-19 1:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at gcc dot gnu dot org 2005-02-18 20:53 -------
This is a tree-optimization problem not a target problem.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |wilson at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Component|target |tree-optimization
Last reconfirmed|2005-02-12 04:00:42 |2005-02-18 20:53:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (29 preceding siblings ...)
2005-02-19 1:53 ` [Bug tree-optimization/18977] " wilson at gcc dot gnu dot org
@ 2005-02-19 11:53 ` cvs-commit at gcc dot gnu dot org
2005-02-19 12:57 ` wilson at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-19 11:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-18 23:01 -------
Subject: Bug 18977
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: wilson@gcc.gnu.org 2005-02-18 23:01:33
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/execute: loop-ivopts-1.c
Log message:
PR tree-optimization/18977
* gcc.c-torture/execute/loop-ivopts-1.c: New testcase.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5050&r2=1.5051
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/loop-ivopts-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread
* [Bug tree-optimization/18977] [4.0 regression] LAPACK test xeigtsts segfaults with optimization
2004-12-14 10:44 [Bug fortran/18977] New: LAPACK test xeigtsts segfaults Thomas dot Koenig at online dot de
` (30 preceding siblings ...)
2005-02-19 11:53 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-19 12:57 ` wilson at gcc dot gnu dot org
31 siblings, 0 replies; 33+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-02-19 12:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at gcc dot gnu dot org 2005-02-18 23:11 -------
As previously noted, it was fixed by a patch from Zdenek Dvorak which had no
testcase. This testcase has been added, and this bug report can be closed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|4.0.0 |
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18977
^ permalink raw reply [flat|nested] 33+ messages in thread