annotate gcc/testsuite/gfortran.dg/dependency_28.f90 @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ! { dg-do compile }
kono
parents:
diff changeset
2 ! { dg-options "-Warray-temporaries" }
kono
parents:
diff changeset
3 module foobar
kono
parents:
diff changeset
4 type baz
kono
parents:
diff changeset
5 integer :: i
kono
parents:
diff changeset
6 integer :: j
kono
parents:
diff changeset
7 integer :: k
kono
parents:
diff changeset
8 integer :: m
kono
parents:
diff changeset
9 end type baz
kono
parents:
diff changeset
10 contains
kono
parents:
diff changeset
11 subroutine foo(a,b,c,i)
kono
parents:
diff changeset
12 real, dimension(10) :: a,b
kono
parents:
diff changeset
13 type(baz) :: c
kono
parents:
diff changeset
14 integer, dimension(10) :: i
kono
parents:
diff changeset
15 a(i(1):i(2)) = a(i(1):i(2)) + b(i(1):i(2))
kono
parents:
diff changeset
16 a(i(1):i(2)) = a(i(3):i(5)) ! { dg-warning "Creating array temporary" }
kono
parents:
diff changeset
17 a(c%i:c%j) = a(c%i:c%j) + b(c%k:c%m)
kono
parents:
diff changeset
18 a(c%k:c%m) = a(c%i:c%j) + b(c%k:c%m) ! { dg-warning "Creating array temporary" }
kono
parents:
diff changeset
19 end subroutine foo
kono
parents:
diff changeset
20 end module foobar