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/] [proc_ptr_2.f90] - Blame information for rev 399

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
!
3
! checking invalid code for PROCEDURE POINTERS
4
!
5
! Contributed by Janus Weil 
6
 
7
PROCEDURE(REAL), POINTER :: ptr
8
PROCEDURE(REAL), SAVE    :: noptr    ! { dg-error "attribute conflicts with" }
9
REAL :: x
10
 
11
 abstract interface
12
   subroutine bar(a)
13
     integer :: a
14
   end subroutine bar
15
 end interface
16
 
17
ptr => cos(4.0)        ! { dg-error "Invalid procedure pointer assignment" }
18
ptr => x               ! { dg-error "Invalid procedure pointer assignment" }
19
ptr => sin(x)          ! { dg-error "Invalid procedure pointer assignment" }
20
 
21
ptr => bar             ! { dg-error "is invalid in procedure pointer assignment" }
22
 
23
ALLOCATE(ptr)          ! { dg-error "must be ALLOCATABLE" }
24
 
25
end

powered by: WebSVN 2.1.0

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