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_6.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=gnu" }
3
 
4
! Allow legacy code to work even if not only a single symbol is used as
5
! expression but a basic arithmetic expression.
6
 
7
SUBROUTINE test (n, m)
8
  IMPLICIT NONE
9
 
10
  ! These should go fine.
11
  INTEGER :: arr1(n + 1) ! { dg-bogus "used before it is typed" }
12
  INTEGER :: arr2(n / (2 * m**5)) ! { dg-bogus "used before it is typed" }
13
 
14
  ! These should fail for obvious reasons.
15
  INTEGER :: arr3(n * 1.1) ! { dg-error "must be of INTEGER type" }
16
  INTEGER :: arr4(REAL (m)) ! { dg-error "used before it is typed" }
17
  INTEGER :: arr5(SIN (m)) ! { dg-error "used before it is typed" }
18
 
19
  INTEGER :: n, m
20
END SUBROUTINE test

powered by: WebSVN 2.1.0

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