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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fbounds-check" }
3
!
4
! PR fortran/40383
5
! Gave before a bogus out of bounds.
6
! Contributed by Joost VandeVondele.
7
!
8
MODULE M1
9
  INTEGER, PARAMETER :: default_string_length=80
10
END MODULE M1
11
MODULE M2
12
 USE M1
13
 IMPLICIT NONE
14
CONTAINS
15
 FUNCTION F1(a,b,c,d) RESULT(RES)
16
   CHARACTER(LEN=default_string_length), OPTIONAL :: a,b,c,d
17
   LOGICAL :: res
18
 END FUNCTION F1
19
END MODULE M2
20
 
21
MODULE M3
22
 USE M1
23
 USE M2
24
 IMPLICIT NONE
25
CONTAINS
26
 SUBROUTINE S1
27
   CHARACTER(LEN=default_string_length) :: a,b
28
   LOGICAL :: L1
29
   INTEGER :: i
30
   DO I=1,10
31
      L1=F1(a,b)
32
   ENDDO
33
 END SUBROUTINE
34
END MODULE M3
35
 
36
USE M3
37
CALL S1
38
END
39
 
40
! { dg-final { cleanup-modules "m1 m2 m3" } }

powered by: WebSVN 2.1.0

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