Debian Codegraph @

gcc/testsuite/gfortran.dg/pr96325.f90

raw
1 ! { dg-do compile }
2 !
3 ! Test the fix for PR96325 in which the typebound procedure reference
4 ! 'foo' was applied to an intrinsic type component without generating
5 ! an error. The result of the expression was the value of the arg..
6 !
7 ! Contributed by Gerhardt Steinmetz <[email protected]>
8 !
9 implicit none
10
11 type t2
12 integer r1
13 end type
14
15 type(t2) :: t
16 integer :: a
17
18 a = t%r1%foo(1) ! { dg-error "is not an inquiry reference" }
19 if (a == 42) stop
20
21 end