PR target/83368
[official-gcc.git] / gcc / testsuite / gfortran.dg / inline_matmul_20.f90
blob0f8728ab1dce0f84db4a228f2cc8b796b10af4a3
1 ! { dg-do run }
2 ! { dg-additional-options "-fno-realloc-lhs -ffrontend-optimize" }
3 ! This used to segfault at runtime.
4 ! Original test case by Harald Anlauf.
5 program gfcbug142
6 implicit none
7 real, allocatable :: b(:,:)
8 integer :: n = 5
9 character(len=20) :: line
10 allocate (b(n,n))
11 call random_number (b)
12 write (unit=line,fmt='(2I5)') shape (matmul (b, transpose (b)))
13 if (line /= ' 5 5') call abort
14 end program gfcbug142