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/] [used_before_typed_4.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
! { dg-options "-std=f95" }
3
 
4
! Test for a special case of the used-before-typed errors, when the symbols
5
! not-yet-typed are indices.
6
 
7
SUBROUTINE test (n, arr1, m, arr2) ! { dg-error "has no IMPLICIT type" }
8
  IMPLICIT NONE
9
 
10
  INTEGER :: myarr(42)
11
 
12
  INTEGER :: arr1(SIZE (myarr(1:n))) ! { dg-error "'n' is used before" }
13
  INTEGER :: n
14
 
15
  INTEGER :: arr2(LEN ("hello"(1:m))) ! { dg-error "'m' is used before" }
16
  INTEGER :: m
17
 
18
  WRITE (*,*) SIZE (arr1)
19
  WRITE (*,*) SIZE (arr2)
20
END SUBROUTINE test
21
 
22
PROGRAM main
23
  IMPLICIT NONE
24
  INTEGER :: arr1(42), arr2(42)
25
  CALL test (3, arr1, 2, arr2)
26
END PROGRAM main

powered by: WebSVN 2.1.0

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