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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [common_errors_1.f90] - Blame information for rev 581

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
! Tests a number of error messages relating to derived type objects
3
! in common blocks.  Originally due to PR 33198
4
 
5
subroutine one
6
type a
7
   sequence
8
   integer :: i = 1
9
end type a
10
type(a) :: t ! { dg-error "Derived type variable .t. in COMMON at ... may not have default initializer" }
11
common /c/ t
12
end
13
 
14
subroutine first
15
type a
16
   integer :: i
17
   integer :: j
18
end type a
19
type(a) :: t  ! { dg-error "Derived type variable .t. in COMMON at ... has neither the SEQUENCE nor the BIND.C. attribute" }
20
common /c/ t
21
end
22
 
23
subroutine prime
24
type a
25
   sequence
26
   integer, allocatable :: i(:)
27
   integer :: j
28
end type a
29
type(a) :: t  ! { dg-error "Derived type variable .t. in COMMON at ... has an ultimate component that is allocatable" }
30
common /c/ t
31
end
32
 
33
subroutine source
34
parameter(x=0.) ! { dg-error "COMMON block .x. at ... is used as PARAMETER at ..." }
35
common /x/ i  ! { dg-error "COMMON block .x. at ... is used as PARAMETER at ..." }
36
intrinsic sin
37
common /sin/ j ! { dg-error "COMMON block .sin. at ... is also an intrinsic procedure" }
38
end subroutine source

powered by: WebSVN 2.1.0

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