re PR fortran/16404 (should reject invalid code with -pedantic -std=f95 ? (x8))
[gcc.git] / gcc / testsuite / gfortran.dg / private_type_2.f90
1 ! { dg-do compile }
2 ! PR16404 test 6 - A public type cannot have private-type components.
3 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
4 MODULE TEST
5 PRIVATE
6 TYPE :: info_type
7 INTEGER :: value
8 END TYPE info_type
9 TYPE :: all_type! { dg-error "PRIVATE type and cannot be a component" }
10 TYPE(info_type) :: info
11 END TYPE
12 public all_type
13 END MODULE
14 END
15