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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [derived_constructor_comps_2.f90] - Rev 325

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

! { dg-do compile }
! Tests fix for PR29115, in which an ICE would be produced by 
! non-pointer elements being supplied to the pointer components
! in a derived type constructor.
!
! Contributed by Paul Thomas  <pault@gcc.gnu.org>
!
  type :: homer
    integer, pointer :: bart(:)
  end type homer
  type(homer) :: marge
  integer :: duff_beer
  marge = homer (duff_beer) ! { dg-error "should be a POINTER or a TARGET" }
end

!
! The following yield an ICE, see PR 34083
!
subroutine foo
  type ByteType
    character(len=1) :: singleByte
  end type
  type (ByteType) :: bytes(4)

  print *, size(bytes)
  bytes = ByteType((/'H', 'i', '!', ' '/)) ! { dg-error "rank of the element in the derived type constructor" }
end subroutine foo

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.