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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [array_constructor_type_14.f03] - Blame information for rev 715

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR fortran/27997
3
!
4
! Array constructor with typespec
5
! for derived types.
6
 
7
PROGRAM test
8
  IMPLICIT NONE
9
 
10
  TYPE foo
11
    INTEGER :: i
12
    REAL :: x
13
  END TYPE foo
14
 
15
  TYPE(foo), PARAMETER :: x = foo(42, 42.)
16
 
17
  TYPE(foo), DIMENSION(2) :: arr
18
 
19
  arr = (/ TYPE(foo) :: x, foo(0, 1.) /)
20
  IF (arr(1)%i /= 42 .OR. arr(1)%x /= 42. .OR. &
21
      arr(2)%i /= 0 .OR. arr(2)%x /= 1.) THEN
22
    CALL abort()
23
  END IF
24
END PROGRAM test

powered by: WebSVN 2.1.0

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