OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

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

! { dg-do compile }
! Test the fix for PR25097, in which subobjects of the optional dummy argument
! could appear as argument A of the PRESENT intrinsic.
! 
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
 MODULE M1
  TYPE T1
   INTEGER :: I
  END TYPE T1
 CONTAINS
  SUBROUTINE S1(D1)
   TYPE(T1), OPTIONAL :: D1(4)
   write(6,*) PRESENT(D1%I)  ! { dg-error "must not be a subobject" }
   write(6,*) PRESENT(D1(1)) ! { dg-error "must not be a subobject" }
   write(6,*) PRESENT(D1)
  END SUBROUTINE S1
 END MODULE
 END
! { dg-final { cleanup-modules "M1" } }

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.