Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gfortran.dg/dependency_42.f90 @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
111 | 1 ! { dg-do run } |
2 ! { dg-options "-Warray-temporaries" } | |
3 ! PR fortran/56937 - unnecessary temporaries with vector indices | |
4 program main | |
5 real :: q(4), r(4), p(3) | |
6 integer :: idx(3) | |
7 p = [0.5, 1.0, 2.0] | |
8 idx = [4,3,1] | |
9 r = 1.0 | |
10 r(idx) = r(idx) + p | |
11 q = 1.0 | |
12 q(4) = q(4) + p(1) | |
13 q(3) = q(3) + p(2) | |
14 q(1) = q(1) + p(3) | |
131 | 15 if (any (q - r /= 0)) STOP 1 |
111 | 16 end |