Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/derived-chartypes-4.f90

raw
1 ! { dg-additional-options "-fdump-tree-gimple" }
2
3 ! { dg-additional-options -Wuninitialized }
4
5 type :: type1
6 character(len=35,kind=4) :: a
7 end type type1
8
9 type :: type2
10 character(len=46,kind=4), pointer :: b
11 end type type2
12
13 type(type1) :: foo
14 type(type2) :: bar
15
16 type(type1), pointer :: pfoo
17 ! { dg-note {'pfoo' was declared here} {} { target *-*-* } .-1 }
18 type(type2), pointer :: pbar
19 ! { dg-note {'pbar' was declared here} {} { target *-*-* } .-1 }
20
21 class(type1), pointer :: cfoo
22 ! { dg-note {'cfoo' declared here} {} { target *-*-* } .-1 }
23 ! { dg-note {'cfoo\._data' was declared here} {} { target *-*-* } .-2 }
24 class(type2), pointer :: cbar
25 ! { dg-note {'cbar' declared here} {} { target *-*-* } .-1 }
26 ! { dg-note {'cbar\._data' was declared here} {} { target *-*-* } .-2 }
27
28 class(type1), allocatable :: acfoo
29 class(type2), allocatable :: acbar
30
31 !$acc enter data copyin(foo%a)
32 !$acc enter data copyin(bar%b)
33
34 !$acc enter data copyin(pfoo%a)
35 ! { dg-warning {'pfoo' is used uninitialized} {} { target *-*-* } .-1 }
36 !$acc enter data copyin(pbar%b)
37 ! { dg-warning {'pbar' is used uninitialized} {} { target *-*-* } .-1 }
38
39 !$acc enter data copyin(cfoo%a)
40 ! { dg-warning {'cfoo\._data' is used uninitialized} {} { target *-*-* } .-1 }
41 !$acc enter data copyin(cbar%b)
42 ! { dg-warning {'cbar\._data' is used uninitialized} {} { target *-*-* } .-1 }
43
44 !$acc enter data copyin(acfoo%a)
45 !$acc enter data copyin(acbar%b)
46
47 ! { dg-final { scan-tree-dump-times "to:\[^\\\[\]*\\\[len: 140\\\]" 4 "gimple" } }
48 ! { dg-final { scan-tree-dump-times "to:\[^\\\[\]*\\\[len: 184\\\]" 4 "gimple" } }
49
50 end