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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Structure constructor with default initialization, test that an error is
3
! emitted for components without default initializer missing value.
4
 
5
PROGRAM test
6
  IMPLICIT NONE
7
 
8
  ! Structure of basic data types
9
  TYPE :: basics_t
10
    INTEGER :: i = 42
11
    REAL :: r
12
    COMPLEX :: c = (0., 1.)
13
  END TYPE basics_t
14
 
15
  TYPE(basics_t) :: basics
16
 
17
  basics = basics_t (i = 42) ! { dg-error "No initializer for component 'r'" }
18
  basics = basics_t (42) ! { dg-error "No initializer for component 'r'" }
19
 
20
END PROGRAM test

powered by: WebSVN 2.1.0

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