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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [derived_recursion.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
! { dg-options "-O0" }
3
! Tests patch for PR24158 - The module would compile, in spite
4
! of the recursion between the derived types. This would cause
5
! an ICE in the commented out main program. The standard demands
6
! that derived type components be already defined, to break
7
! recursive derived type definitions.
8
!
9
! Contributed by Paul Thomas 
10
!
11
module snafu
12
  type       ::   a
13
    integer    :: v
14
    type(b)    :: i ! { dg-error "not been previously defined" }
15
  end type a
16
  type       ::   b
17
    type(a)    :: i
18
  end type b
19
  type (a)   :: foo
20
end module snafu
21
 
22
!  use snafu
23
!  foo%v = 1
24
!  end
25
 
26
! { dg-final { cleanup-modules "snafu" } }

powered by: WebSVN 2.1.0

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