2 ! { dg-options -Wsurprising }
4 integer, target
:: t
, s
6 ! The tests for character pointers are currently commented out,
7 ! because they don't yet work correctly.
9 !!$character*5, pointer :: d
10 !!$character*5, target :: c, e
14 ! We didn't dereference the pointer in the following line.
15 p
= f() ! { dg-warning "POINTER-valued function" }
17 if (p
.ne
.2) call abort()
18 if (p
.ne
.s
) call abort()
20 !!$! verify that we also dereference correctly the result of a function
21 !!$! which returns its result by reference
24 !!$d = g() ! dg-warning "POINTER valued function" ""
25 !!$if (d.ne."Hallo") call abort()
33 !!$character, pointer :: g