Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gfortran.dg/inline_matmul_3.f90 @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 (2018-10-25) |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
130:e108057fa461 | 132:d34655255c78 |
---|---|
13 | 13 |
14 data a / 2., -3., 5., -7., 11., -13./ | 14 data a / 2., -3., 5., -7., 11., -13./ |
15 data b /17., -23., 29., -31., 37., -39., 41., -47./ | 15 data b /17., -23., 29., -31., 37., -39., 41., -47./ |
16 data cres /195., -304., 384., 275., -428., 548., 347., -540., 692., 411., -640., 816./ | 16 data cres /195., -304., 384., 275., -428., 548., 347., -540., 692., 411., -640., 816./ |
17 c = matmul(a,b) | 17 c = matmul(a,b) |
18 if (sum(c-cres)>1e-4) call abort | 18 if (sum(c-cres)>1e-4) STOP 1 |
19 | 19 |
20 calloc = matmul(a,b) | 20 calloc = matmul(a,b) |
21 if (sum(calloc-cres)>1e-4) call abort | 21 if (sum(calloc-cres)>1e-4) STOP 2 |
22 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort | 22 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 3 |
23 deallocate(calloc) | 23 deallocate(calloc) |
24 | 24 |
25 allocate(calloc(4,4)) | 25 allocate(calloc(4,4)) |
26 calloc = matmul(a,b) | 26 calloc = matmul(a,b) |
27 if (sum(calloc-cres)>1e-4) call abort | 27 if (sum(calloc-cres)>1e-4) STOP 4 |
28 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort | 28 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 5 |
29 deallocate(calloc) | 29 deallocate(calloc) |
30 | 30 |
31 allocate(calloc(3,3)) | 31 allocate(calloc(3,3)) |
32 calloc = matmul(a,b) | 32 calloc = matmul(a,b) |
33 if (sum(calloc-cres)>1e-4) call abort | 33 if (sum(calloc-cres)>1e-4) STOP 6 |
34 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort | 34 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 7 |
35 deallocate(calloc) | 35 deallocate(calloc) |
36 | 36 |
37 block | 37 block |
38 real :: aa(a1, a2), bb(b1, b2), cc(c1, c2) | 38 real :: aa(a1, a2), bb(b1, b2), cc(c1, c2) |
39 aa = a | 39 aa = a |
40 bb = b | 40 bb = b |
41 | 41 |
42 cc = matmul(aa,bb) | 42 cc = matmul(aa,bb) |
43 if (sum(cc-cres)>1e-4) call abort | 43 if (sum(cc-cres)>1e-4) STOP 8 |
44 calloc = matmul(aa,bb) | 44 calloc = matmul(aa,bb) |
45 if (sum(calloc-cres)>1e-4) call abort | 45 if (sum(calloc-cres)>1e-4) STOP 9 |
46 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort | 46 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 10 |
47 calloc = 42. | 47 calloc = 42. |
48 deallocate(calloc) | 48 deallocate(calloc) |
49 | 49 |
50 allocate(calloc(4,4)) | 50 allocate(calloc(4,4)) |
51 calloc = matmul(aa,bb) | 51 calloc = matmul(aa,bb) |
52 if (sum(calloc-cres)>1e-4) call abort | 52 if (sum(calloc-cres)>1e-4) STOP 11 |
53 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort | 53 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 12 |
54 deallocate(calloc) | 54 deallocate(calloc) |
55 | 55 |
56 allocate(calloc(3,3)) | 56 allocate(calloc(3,3)) |
57 calloc = matmul(aa,bb) | 57 calloc = matmul(aa,bb) |
58 if (sum(calloc-cres)>1e-4) call abort | 58 if (sum(calloc-cres)>1e-4) STOP 13 |
59 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) call abort | 59 if (any([size(calloc,1), size(calloc,2)] /= [3,4])) STOP 14 |
60 deallocate(calloc) | 60 deallocate(calloc) |
61 end block | 61 end block |
62 | 62 |
63 end program main | 63 end program main |
64 ! { dg-final { scan-tree-dump-times "_gfortran_matmul" 8 "optimized" } } | 64 ! { dg-final { scan-tree-dump-times "_gfortran_matmul" 8 "optimized" } } |