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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Structure constructor with component naming.
3
 
4
PROGRAM test
5
  IMPLICIT NONE
6
 
7
  ! Structure of basic data types
8
  TYPE :: basics_t
9
    INTEGER :: i
10
    REAL :: r
11
    COMPLEX :: c
12
    LOGICAL :: l
13
  END TYPE basics_t
14
 
15
  TYPE(basics_t) :: basics
16
 
17
  basics = basics_t (42, -1.5, c=(.5, .5), l=.FALSE.)
18
  IF (basics%i /= 42 .OR. basics%r /= -1.5 &
19
      .OR. basics%c /= (.5, .5) .OR. basics%l) THEN
20
    CALL abort()
21
  END IF
22
 
23
  basics = basics_t (r=-1.5, i=42, l=.FALSE., c=(.5, .5))
24
  IF (basics%i /= 42 .OR. basics%r /= -1.5 &
25
      .OR. basics%c /= (.5, .5) .OR. basics%l) THEN
26
    CALL abort()
27
  END IF
28
 
29
END PROGRAM test

powered by: WebSVN 2.1.0

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