[Bug fortran/37802] New: [4.4 Regression] array descriptors for matmul messed up?
tkoenig at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Oct 11 07:56:00 GMT 2008
>From Dominique, a potential wrong-code:
$ cat mat-2.f90
program mat
implicit none
complex, allocatable :: a(:,:),b(:,:)
complex :: d(1,1)
allocate(a(4,1),b(4,1))
a = cmplx(0.5,2.0)
b = cmplx(2.0,0.5)
d = matmul(a,transpose(b))
print *, d
print *, matmul(a,transpose(b))
deallocate(a,b)
end program mat
$ gfortran -g mat-2.f90
$ gdb ./a.out
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) r
Starting program: /home/ig25/Krempel/Matmul/a.out
( 0.0000000 , 4.2500000 )
a.out: ../../../../gcc/trunk/libgfortran/generated/matmul_c4.c:96: matmul_c4:
Assertion `((a)->dtype & 0x07) == 2 || ((b)->dtype & 0x07) == 2' failed.
Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
(gdb) up
#1 0xb7d41640 in raise () from /lib/i686/cmov/libc.so.6
(gdb) up
#2 0xb7d43018 in abort () from /lib/i686/cmov/libc.so.6
(gdb) up
#3 0xb7d3a5be in __assert_fail () from /lib/i686/cmov/libc.so.6
(gdb) up
#4 0xb7f45d7d in *_gfortran_matmul_c4 (retarray=0xbfd6661c, a=0xbfd6680c,
b=0xbfd667b4,
try_blas=0, blas_limit=0, gemm=0)
at ../../../../gcc/trunk/libgfortran/generated/matmul_c4.c:95
95 assert (GFC_DESCRIPTOR_RANK (a) == 2
(gdb) p/x a->dtype
$1 = 0x40880000
(gdb) p/x b->dtype
$2 = 0x0
(gdb)
--
Summary: [4.4 Regression] array descriptors for matmul messed up?
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37802
More information about the Gcc-bugs
mailing list