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.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [used_before_typed_1.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! { dg-options "-std=f95" }
! { dg-options "-std=f95" }
! PR fortran/32095
! PR fortran/32095
! PR fortran/34228
! PR fortran/34228
! Check that standards-conforming mode rejects uses of variables that
! Check that standards-conforming mode rejects uses of variables that
! are used before they are typed.
! are used before they are typed.
SUBROUTINE test1 (n, arr, m, arr2, k, arr3, a) ! { dg-error "has no IMPLICIT" }
SUBROUTINE test1 (n, arr, m, arr2, k, arr3, a) ! { dg-error "has no IMPLICIT" }
  IMPLICIT NONE
  IMPLICIT NONE
  INTEGER :: arr(n) ! { dg-error "used before it is typed" }
  INTEGER :: arr(n) ! { dg-error "used before it is typed" }
  INTEGER :: n
  INTEGER :: n
  INTEGER :: m, arr2(m) ! { dg-bogus "used before it is typed" }
  INTEGER :: m, arr2(m) ! { dg-bogus "used before it is typed" }
  INTEGER, DIMENSION(k) :: arr3 ! { dg-error "used before it is typed" }
  INTEGER, DIMENSION(k) :: arr3 ! { dg-error "used before it is typed" }
  INTEGER :: k
  INTEGER :: k
  CHARACTER(len=LEN(a)) :: a ! { dg-error "'a' is used before it is typed" }
  CHARACTER(len=LEN(a)) :: a ! { dg-error "'a' is used before it is typed" }
  REAL(KIND=l) :: x ! { dg-error "has no IMPLICIT type" }
  REAL(KIND=l) :: x ! { dg-error "has no IMPLICIT type" }
  REAL(KIND=KIND(y)) :: y ! { dg-error "has no IMPLICIT type" }
  REAL(KIND=KIND(y)) :: y ! { dg-error "has no IMPLICIT type" }
  DATA str/'abc'/ ! { dg-error "used before it is typed" }
  DATA str/'abc'/ ! { dg-error "used before it is typed" }
  CHARACTER(len=3) :: str, str2
  CHARACTER(len=3) :: str, str2
  DATA str2/'abc'/ ! { dg-bogus "used before it is typed" }
  DATA str2/'abc'/ ! { dg-bogus "used before it is typed" }
END SUBROUTINE test1
END SUBROUTINE test1
SUBROUTINE test2 (n, arr, m, arr2)
SUBROUTINE test2 (n, arr, m, arr2)
  IMPLICIT INTEGER(a-z)
  IMPLICIT INTEGER(a-z)
  INTEGER :: arr(n)
  INTEGER :: arr(n)
  REAL :: n ! { dg-error "already has basic type" }
  REAL :: n ! { dg-error "already has basic type" }
  INTEGER :: m, arr2(m) ! { dg-bogus "already has an IMPLICIT type" }
  INTEGER :: m, arr2(m) ! { dg-bogus "already has an IMPLICIT type" }
END SUBROUTINE test2
END SUBROUTINE test2
SUBROUTINE test3 (n, arr, m, arr2)
SUBROUTINE test3 (n, arr, m, arr2)
  IMPLICIT REAL(a-z)
  IMPLICIT REAL(a-z)
  INTEGER :: arr(n) ! { dg-error "must be of INTEGER type" }
  INTEGER :: arr(n) ! { dg-error "must be of INTEGER type" }
  INTEGER :: m, arr2(m) ! { dg-bogus "must be of INTEGER type" }
  INTEGER :: m, arr2(m) ! { dg-bogus "must be of INTEGER type" }
END SUBROUTINE test3
END SUBROUTINE test3
 
 

powered by: WebSVN 2.1.0

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