summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr96325.f90
blob: b6a86e84eda3003ab2c2fbdf9c6439655122373c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do compile }
!
! Test the fix for PR96325 in which the typebound procedure reference
! 'foo' was applied to an intrinsic type component without generating
! an error. The result of the expression was the value of the arg..
!
! Contributed by Gerhardt Steinmetz  <gscfq@t-online.de>
!
   implicit none

   type t2
      integer r1
   end type

   type(t2) :: t
   integer :: a

   a = t%r1%foo(1) ! { dg-error "is not an inquiry reference" }
   if (a == 42) stop

   end