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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [char_result_12.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-final { cleanup-modules "gfcbug45" } }
2
! { dg-do run }
3
! Tests the fix for PR29912, in which the call to JETTER
4
! would cause a segfault beause a temporary was not being written.
5
!
6
! COntributed by Philip Mason  
7
!
8
 program testat
9
 character(len=4)   :: ctemp(2)
10
 character(len=512) :: temper(2)
11
 !
12
 !------------------------
13
 !'This was OK.'
14
 !------------------------
15
 temper(1) = 'doncaster'
16
 temper(2) = 'uxbridge'
17
 ctemp     = temper
18
 if (any (ctemp /= ["donc", "uxbr"])) call abort ()
19
 !
20
 !------------------------
21
 !'This went a bit wrong.'
22
 !------------------------
23
 ctemp = jetter(1,2)
24
 if (any (ctemp /= ["donc", "uxbr"])) call abort ()
25
 
26
 contains
27
   function jetter(id1,id2)
28
   character(len=512) :: jetter(id1:id2)
29
   jetter(id1) = 'doncaster'
30
   jetter(id2) = 'uxbridge'
31
   end function jetter
32
 end program testat
33
 

powered by: WebSVN 2.1.0

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