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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [structure_constructor_9.f90] - Blame information for rev 700

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-std=f95" }
3
! Check for notify-std-messages when F2003 structure constructors are compiled
4
! with -std=f95.
5
 
6
PROGRAM test
7
  IMPLICIT NONE
8
 
9
  ! Basic type with default initializers
10
  TYPE :: basics_t
11
    INTEGER :: i = 42
12
    REAL :: r = 1.5
13
  END TYPE basics_t
14
 
15
  TYPE(basics_t) :: basics
16
 
17
  ! This is ok in F95
18
  basics = basics_t (1, 2.)
19
 
20
  ! No argument naming in F95
21
  basics = basics_t (1, r = 4.2) ! { dg-error "Fortran 2003" }
22
 
23
  ! No optional arguments in F95
24
  basics = basics_t () ! { dg-error "Fortran 2003" }
25
  basics = basics_t (5) ! { dg-error "Fortran 2003" }
26
 
27
END PROGRAM test

powered by: WebSVN 2.1.0

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