OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [alloc_comp_constraint_1.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Check that we don't allow IO or NAMELISTs with types with allocatable
3
! components (PR 20541)
4
program main
5
 
6
    type :: foo
7
        integer, allocatable :: x(:)
8
    end type foo
9
 
10
    type :: bar
11
        type(foo) :: x
12
    end type bar
13
 
14
    type(foo) :: a
15
    type(bar) :: b
16
    namelist /blah/ a ! { dg-error "has ALLOCATABLE or POINTER components and thus requires a defined input/output" }
17
 
18
    write (*, *) a  ! { dg-error "cannot have ALLOCATABLE components" }
19
 
20
    read (*, *) b  ! { dg-error "cannot have ALLOCATABLE components" }
21
 
22
end program main

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.