2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / matmul_7.f90
blobb3f925a21457f2c046ff477e14183204fd854d60
1 ! { dg-do run }
2 ! PR 35988 - failure on some zero-sized matmuls.
3 ! Test case contributed by Dick Hendrickson.
5 program try_gf1003
7 call gf1003a( 9, 8, 6)
8 call gf1003b( 9, 8, 6)
9 call gf1003c( 9, 8, 6) !fails
10 call gf1003d( 9, 8, 6) !fails
11 end program
14 SUBROUTINE GF1003a(nf9,nf8,nf6)
15 REAL RDA(3,2)
16 REAL RDA1(3,5)
17 REAL RDA2(5,2)
18 RDA = MATMUL(RDA1(:, 9:8),RDA2( 8:6,:))
19 END SUBROUTINE
21 SUBROUTINE GF1003b(nf9,nf8,nf6)
22 REAL RDA(3,2)
23 REAL RDA1(3,0)
24 REAL RDA2(0,2)
25 RDA = MATMUL(RDA1(:,NF9:NF8),RDA2(NF9:NF8,:))
26 END SUBROUTINE
28 SUBROUTINE GF1003c(nf9,nf8,nf6)
29 REAL RDA(3,2)
30 REAL RDA1(3,0)
31 REAL RDA2(0,2)
32 RDA = MATMUL(RDA1(:,NF9:NF8),RDA2(NF8:NF6,:))
33 END SUBROUTINE
35 SUBROUTINE GF1003d(nf9,nf8,nf6)
36 REAL RDA(3,2)
37 REAL RDA1(3,5)
38 REAL RDA2(5,2)
39 RDA = MATMUL(RDA1(:,NF9:NF8),RDA2(NF8:NF6,:))
40 END SUBROUTINE