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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [alloc_comp_constraint_5.f90] - Blame information for rev 827

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

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Check that ALLOCATABLE components aren't allowed to the right of a non-zero
3
! rank part reference.
4
program test
5
 
6
    implicit none
7
    type :: foo
8
        real, allocatable :: bar(:)
9
    end type foo
10
    type(foo), target :: x(3)
11
    integer :: i
12
    real, pointer :: p(:)
13
 
14
    allocate(x(:)%bar(5))! { dg-error "must not have the ALLOCATABLE attribute" }
15
    x(:)%bar(1) = 1.0    ! { dg-error "must not have the ALLOCATABLE attribute" }
16
    p => x(:)%bar(1)     ! { dg-error "must not have the ALLOCATABLE attribute" }
17
 
18
end program test

powered by: WebSVN 2.1.0

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