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_7.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-fbounds-check" }
3
! { dg-shouldfail "Character length mismatch" }
4
 
5
! PR fortran/37746
6
! Test bounds-checking for string length of dummy arguments.
7
 
8
MODULE m
9
CONTAINS
10
 
11
  SUBROUTINE test (opt)
12
    IMPLICIT NONE
13
    CHARACTER(len=5), OPTIONAL :: opt
14
  END SUBROUTINE test
15
 
16
END MODULE m
17
 
18
PROGRAM main
19
  USE m
20
  IMPLICIT NONE
21
  CALL test ('') ! 0 length, but not absent argument.
22
END PROGRAM main
23
 
24
! { dg-output "shorter than the declared one for dummy argument 'opt' \\(0/5\\)" }
25
! { 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.