repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libgfortran/ChangeLog:
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
dependency_42.f90
blob
8f067322f9a13e1660078a29a0ed3095bc4941e5
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
)
15
if
(
any
(
q
-
r
/=
0
))
call
abort
16
end