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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [alloc_comp_constraint_5.f90] - Rev 316

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do compile }
! Check that ALLOCATABLE components aren't allowed to the right of a non-zero
! rank part reference.
program test

    implicit none
    type :: foo
        real, allocatable :: bar(:)
    end type foo
    type(foo), target :: x(3)
    integer :: i
    real, pointer :: p(:)

    allocate(x(:)%bar(5))! { dg-error "must not have the ALLOCATABLE attribute" }
    x(:)%bar(1) = 1.0    ! { dg-error "must not have the ALLOCATABLE attribute" }
    p => x(:)%bar(1)     ! { dg-error "must not have the ALLOCATABLE attribute" }

end program test

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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