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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [allocate_deferred_char_scalar_2.f03] - 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 PR47519, in which the character length was not
3
! calculated for the SOURCE expressions below and an ICE resulted.
4
!
5
! Contributed by Tobias Burnus  
6
!
7
program note7_35
8
   implicit none
9
   character(:), allocatable :: name
10
   character(:), allocatable :: src
11
   integer n
12
   n = 10
13
   allocate(name, SOURCE=repeat('x',n))
14
   if (name .ne. 'xxxxxxxxxx') call abort
15
   if (len (name) .ne. 10 ) call abort
16
   deallocate(name)
17
   src = 'xyxy'
18
   allocate(name, SOURCE=repeat(src,n))
19
   if (name(37:40) .ne. 'xyxy') call abort
20
   if (len (name) .ne. 40 ) call abort
21
end program note7_35

powered by: WebSVN 2.1.0

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