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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Test the fix for a regression caused by the first fix of PR31879.
3
! Reported by Tobias Burnus 
4
!
5
MODULE input_val_types
6
  IMPLICIT NONE
7
  INTEGER, PARAMETER :: default_string_length=80
8
  TYPE val_type
9
    CHARACTER(len=default_string_length), DIMENSION(:), POINTER :: c_val
10
  END TYPE val_type
11
CONTAINS
12
  SUBROUTINE val_get (val, c_val)
13
    TYPE(val_type), POINTER                  :: val
14
    CHARACTER(LEN=*), INTENT(out)            :: c_val
15
    INTEGER                                  :: i, l_out
16
    i=1
17
    c_val((i-1)*default_string_length+1:MIN (l_out, i*default_string_length)) = &
18
               val%c_val(i)(1:MIN (80, l_out-(i-1)*default_string_length))
19
  END SUBROUTINE val_get
20
END MODULE input_val_types
21
 
22
! { dg-final { cleanup-modules "input_val_types" } }

powered by: WebSVN 2.1.0

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