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] - Blame information for rev 424

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
! Tests fix for PR29115, in which an ICE would be produced by
3
! non-pointer elements being supplied to the pointer components
4
! in a derived type constructor.
5
!
6
! Contributed by Paul Thomas  
7
!
8
  type :: homer
9
    integer, pointer :: bart(:)
10
  end type homer
11
  type(homer) :: marge
12
  integer :: duff_beer
13
  marge = homer (duff_beer) ! { dg-error "should be a POINTER or a TARGET" }
14
end
15
 
16
!
17
! The following yield an ICE, see PR 34083
18
!
19
subroutine foo
20
  type ByteType
21
    character(len=1) :: singleByte
22
  end type
23
  type (ByteType) :: bytes(4)
24
 
25
  print *, size(bytes)
26
  bytes = ByteType((/'H', 'i', '!', ' '/)) ! { dg-error "rank of the element in the derived type constructor" }
27
end subroutine foo

powered by: WebSVN 2.1.0

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