view gcc/testsuite/gfortran.dg/namelist_34.f90 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! { dg-options -std=f95 }
! PR fortran/32905 - accepts types with ultimate POINTER components
! updated for PR78659
MODULE types
  type :: tp3
    real :: x
    integer, pointer :: i
  end type

  type :: tp2
    type(tp3) :: t
  end type

  type :: tp1
    integer :: i
    type(tp2) :: t
  end type
END MODULE

MODULE nml
USE types
   type(tp1) :: t1
   type(tp3) :: t3
! The following are allowed under f2003.
   namelist /a/ t1    ! { dg-error "with ALLOCATABLE or POINTER components" }
   namelist /b/ t3    ! { dg-error "with ALLOCATABLE or POINTER components" }
END MODULE