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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR 45290: [F08] pointer initialization
4
!
5
! Contributed by Janus Weil 
6
 
7
subroutine sub
8
  implicit none
9
 
10
  real, target, save :: r
11
  integer, target, save, dimension(1:3) :: v
12
 
13
  integer, save :: i
14
  integer, target :: j
15
  integer, target, save, allocatable :: a
16
 
17
 
18
  integer, pointer :: dp0 => 13  ! { dg-error "Error in pointer initialization" }
19
  integer, pointer :: dp1 => r   ! { dg-error "Different types in pointer assignment" }
20
  integer, pointer :: dp2 => v   ! { dg-error "Different ranks in pointer assignment" }
21
  integer, pointer :: dp3 => i   ! { dg-error "is neither TARGET nor POINTER" }
22
  integer, pointer :: dp4 => j   ! { dg-error "must have the SAVE attribute" }
23
  integer, pointer :: dp5 => a   ! { dg-error "must not be ALLOCATABLE" }
24
 
25
  type :: t
26
    integer, pointer :: dpc0 => 13  ! { dg-error "Error in pointer initialization" }
27
    integer, pointer :: dpc1 => r   ! { dg-error "is REAL but should be INTEGER" }
28
    integer, pointer :: dpc2 => v   ! { dg-error "rank of the element.*does not match" }
29
    integer, pointer :: dpc3 => i   ! { dg-error "should be a POINTER or a TARGET" }
30
    integer, pointer :: dpc4 => j   ! { dg-error "must have the SAVE attribute" }
31
    integer, pointer :: dpc5 => a   ! { dg-error "must not be ALLOCATABLE" }
32
  end type
33
 
34
  type(t) ::u
35
 
36
end subroutine

powered by: WebSVN 2.1.0

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