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
2014-01-30 Alangi Derick <alangiderick@gmail.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
array_constructor_type_14.f03
blob
0e24334dcfc8640eb752b5bb67ca02109fdc6be3
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 = (/ 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