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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [same_type_as_1.f03] - Rev 302

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

! { dg-do compile }
!
! Error checking for the intrinsic functions SAME_TYPE_AS and EXTENDS_TYPE_OF.
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

 type :: t1
  integer :: i
 end type 

 type :: ts
  sequence
  integer :: j
 end type

 TYPE(t1) :: x1
 TYPE(ts) :: x2

 integer :: i

 print *, SAME_TYPE_AS (i,x1)   ! { dg-error "must be of a derived type" }
 print *, SAME_TYPE_AS (x1,x2)  ! { dg-error "must be of an extensible type" }

 print *, EXTENDS_TYPE_OF (i,x1)   ! { dg-error "must be of a derived type" }
 print *, EXTENDS_TYPE_OF (x1,x2)  ! { dg-error "must be of an extensible type" }

end

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

powered by: WebSVN 2.1.0

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