[to-be-committed] [RISC-V] Use Zbkb for general 64 bit constants when profitable
[official-gcc.git] / gcc / testsuite / gfortran.dg / private_type_10.f90
blobb091db4f7f13cd0b6e958259a03bee1d961ab523
1 ! { dg-do compile }
2 ! { dg-options "-std=f95" }
4 ! PR fortran/34438
6 ! Check that error is not issued for local, non-module
7 ! variables.
9 ! Contributed by Sven Buijssen
11 module demo
12 implicit none
13 private
14 type myint
15 integer :: bar = 42
16 end type myint
17 public :: func
18 contains
19 subroutine func()
20 type(myint) :: foo
21 end subroutine func
22 end module demo
24 module demo2
25 implicit none
26 private
27 type myint
28 integer :: bar = 42
29 end type myint
30 type(myint), save :: foo2 ! { dg-error "of PRIVATE derived type" }
31 public :: foo2
32 end module demo2