LAPACK test problem dumps core at -O2 - egcs-19981101 g77 - mips-sgi-irix6.2
Billinghurst, David (RTD)
David.Billinghurst@riotinto.com.au
Wed Nov 11 18:07:00 GMT 1998
I have narrowed this down to one loop, but I can't reduce the size of the
test case ;-<
The problem is with the double loop around a statement function cabs1 in
routine cchkgk
Almost any change to the loop - for example the write statement below -
eliminates the error
*** cchkgk.f Thu Nov 12 07:57:15 1998
--- cchkgk2.f Thu Nov 12 09:00:18 1998
***************
*** 148,157 ****
--- 148,158 ----
CALL CGEMM( 'C', 'N', M, M, N, CONE, VLF, LDVL, WORK,
LDWORK,
$ CZERO, F, LDF )
*
VMAX = ZERO
DO 70 J = 1, M
+ write(6,*) 'j = '
DO 60 I = 1, M
VMAX = MAX( VMAX, CABS1( E( I, J )-F( I, J ) ) )
60 CONTINUE
70 CONTINUE
> -----Original Message-----
> From: Billinghurst, David (RTD)
> Sent: Friday, November 06, 1998 5:43 PM
> To: 'egcs-bugs@cygnus.com'
> Subject: LAPACK test problem dumps core at -O2 - egcs-19981101 g77 -
> mips-sgi-irix6.2
>
> System: mips-sgi-irix6.2
> Compiler: egcs-19981101 g77
>
> Problem: LAPACK test problem dumps core at -O2
>
>
> The following problem is derived from the LAPACK test suite.
> LAPACK usually compiles and passes without error using egcs g77.
>
> This case may be of interest since the current egcs snapshot passes
> all the of the testsuite, apart from the usual gcc failures.
> Error is due to optimisation of subroutine cchkgk. -O1 is OK. -O2 isn't
>
> Reproduce by:
>
> # expected behaviour
> /usr/local/tmp/egcs-19981101/bin/g77 -o bug-O1 -g -O1 all.f
>
> bug-O1 < bug2.in
> .. test output of CGGBAK ..
> value of largest test error = 0.000E+00
> example number where CGGBAL info is not 0 = 0
> example number where CGGBAK(L) info is not 0 = 0
> example number where CGGBAK(R) info is not 0 = 0
> example number having largest error = 0
> number of examples where info is not 0 = 0
> total number of examples tested = 1
>
> # At -O2 get
> /usr/local/tmp/egcs-19981101/bin/g77 -o bug-O2 -g -O2 all.f
> bug-O2 < bug2.in
> Bus error (core dumped)
>
> dbx bug-O2 core
> dbx version 7.1 Dec 3 1996 17:03:19
> Core from signal SIGBUS: Bus error
> (dbx) where
> > 0 cchkgk_() ["/usr/people/billingd/dev/cgbak/all.f":47, 0x10003650]
> 1 MAIN__() ["/usr/people/billingd/dev/cgbak/all.f":2, 0x10002a9c]
> 2 main(argc = 2147429864, argv = 0x7fff2df0)
> ["/exd2/billingd/obj/egcs-19981101/mips-sgi-irix6.2/libf2c/libF77/../../..
> /../../src/egcs-19981101/libf2c/libF77/main.c":61, 0x10012d80]
> 3 __start()
> ["/vince/6.2-mar09/work/irix/lib/libc/libc_n32_M3/csu/crt1text.s":166,
> 0x10002984]
> (dbx)
>
> +++++++++++++++++++++++++++++++++++++++++
> (Mr) David Billinghurst
> Comalco Research and Technical Support
> PO Box 316, Thomastown, Vic, Australia, 3074
> Phone: +61 3 9469 0642
> FAX: +61 3 9462 2700
> Email: David.Billinghurst@riotinto.com.au
>
> << File: bug2.in >> << File: all.f.gz >>
More information about the Gcc-bugs
mailing list