repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
re PR libfortran/47439 (Fun with scratch files on Windows MKTEMP only allows for...
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
array_constructor_type_14.f03
blob
04ac728010a203cfd2b4fd72a0ec611b50ec445c
1
! { 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