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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [structure_constructor_4.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 component naming, test that an error is emitted if
3
! a component is given two initializers.
4
 
5
PROGRAM test
6
  IMPLICIT NONE
7
 
8
  ! Structure of basic data types
9
  TYPE :: basics_t
10
    INTEGER :: i
11
    REAL :: r
12
  END TYPE basics_t
13
 
14
  TYPE(basics_t) :: basics
15
 
16
  basics = basics_t (42, r=1.5, i=15) ! { dg-error "'i' is initialized twice" }
17
  basics = basics_t (42, r=1., r=-2.) ! { dg-error "has already appeared in the current argument list" }
18
 
19
END PROGRAM test

powered by: WebSVN 2.1.0

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