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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [auto_char_dummy_array_3.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do run }

! PR fortran/49885
! Check that character arrays with non-constant char-length are handled
! correctly.

! Contributed by Daniel Kraft <d@domob.eu>,
! based on original test case and variant by Tobias Burnus in comment 2.

PROGRAM main
  IMPLICIT NONE

  CALL s (10)
      
CONTAINS

  SUBROUTINE s (nb)
    INTEGER :: nb
    CHARACTER(MAX (80, nb)) :: bad_rec(1)

    bad_rec(1)(1:2) = 'abc'
    IF (bad_rec(1)(1:2) /= 'ab') CALL abort ()
  END SUBROUTINE s

END PROGRAM main

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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