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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR fortran/43362
4
!
5
module m
6
  implicit none
7
  type t
8
    integer, pointer :: a
9
  end type t
10
  type t2
11
    type(t) :: b
12
  end type t2
13
  type t3
14
    type(t), pointer :: b
15
  end type t3
16
contains
17
 pure subroutine foo(x)
18
   type(t), target, intent(in) :: x
19
   type(t2) :: y
20
   type(t3) :: z
21
 
22
   ! The following gave an ICE but is valid:
23
   y = t2(x) ! Note: F2003, C1272 (3) and (4) do not apply
24
 
25
   ! Variant which is invalid as C1272 (3) applies
26
   z = t3(x) ! { dg-error "Invalid expression in the structure constructor" }
27
 end subroutine foo
28
end module m
29
 
30
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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