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

Subversion Repositories openrisc

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

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 "-c -Wall" }
3
!
4
! PR fortran/42360
5
!
6
MODULE m
7
  TYPE :: t1
8
    INTEGER :: a = 42, b
9
  END TYPE
10
 
11
  TYPE :: t2
12
    INTEGER :: a, b
13
  END TYPE
14
 
15
CONTAINS
16
  SUBROUTINE sub1(x)             ! no warning, default initializer
17
    type(t1), intent(out) :: x
18
  END SUBROUTINE
19
 
20
  SUBROUTINE sub2(x)             ! no warning, initialized
21
    type(t2), intent(out) :: x
22
    x%a = 42
23
  END SUBROUTINE
24
 
25
  SUBROUTINE sub3(x)             ! { dg-warning "not set" }
26
    type(t2), intent(out) :: x
27
  END SUBROUTINE
28
END MODULE
29
 
30
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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