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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Test the fix for PR47348, in which the substring length
3
! in the array constructor at line 19 would be missed and
4
! the length of q used instead.
5
!
6
! Contributed by Thomas Koenig  
7
!
8
program main
9
  implicit none
10
  character(len = *), parameter :: fmt='(2(A,"|"))'
11
  character(len = *), parameter :: test='xyc|aec|'
12
  integer :: i
13
  character(len = 4) :: q
14
  character(len = 8) :: buffer
15
  q = 'xy'
16
  i = 2
17
  write (buffer, fmt) (/ trim(q), 'ae' /)//'c'
18
  if (buffer .ne. test) Call abort
19
  write (buffer, FMT) (/ q(1:i), 'ae' /)//'c'
20
  if (buffer .ne. test) Call abort
21
end program main

powered by: WebSVN 2.1.0

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