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/] [null_1.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
! PR fortran/20858
3
! If we have "x = null(i)", then "null()" acquires the type, kind type,
4
! and rank of i and these need to match those of x.
5
program null_1
6
   integer, parameter :: sp = kind(1.e0), dp = kind(1.d0)
7
   integer,  pointer :: i => null()
8
   real(sp), pointer :: x => null()
9
   real(dp), pointer :: y => null()
10
   real(sp), pointer :: z(:) => null()
11
   x => null(i)     ! { dg-error "types in pointer assignment" }
12
   x => null(y)     ! { dg-error "types in pointer assignment" }
13
   z => null(i)     ! { dg-error "types in pointer assignment" }
14
   z => null(y)     ! { dg-error "types in pointer assignment" }
15
   x => null(z)     ! { dg-error "ranks in pointer assignment" }
16
   z => null(x)     ! { dg-error "ranks in pointer assignment" }
17
   z => null(z)
18
   nullify(i, x, y, z)
19
end program null_1

powered by: WebSVN 2.1.0

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