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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [array_constructor_type_10.f03] - Blame information for rev 749

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/27997
5
!
6
! Array constructor with typespec and dynamic
7
! character length.
8
!
9
PROGRAM test
10
  CALL foo(8, "short", "short")
11
  CALL foo(2, "lenghty", "le")
12
CONTAINS
13
  SUBROUTINE foo (n, s, shouldBe)
14
    CHARACTER(len=*) :: s
15
    CHARACTER(len=*) :: shouldBe
16
    CHARACTER(len=16) :: arr(2)
17
    INTEGER :: n
18
    arr = [ character(len=n) :: s, s ]
19
    IF (arr(1) /= shouldBe .OR. arr(2) /= shouldBe) THEN
20
      CALL abort ()
21
    END IF
22
  END SUBROUTINE foo
23
END PROGRAM test

powered by: WebSVN 2.1.0

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