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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Tests patch for PR29431, which arose from PR29373.
3
!
4
! Contributed by Tobias Schlueter  
5
!
6
  implicit none
7
  CHARACTER(len=6), DIMENSION(2,2)  :: a
8
 
9
! Reporters original triggered another error:
10
! gfc_todo: Not Implemented: complex character array
11
! constructors.
12
 
13
  a = reshape([to_string(1.0), trim("abcdef"), &
14
               to_string(7.0), trim("hijklm")], &
15
               [2, 2])
16
  print *, a
17
 
18
  CONTAINS
19
    FUNCTION to_string(x)
20
      character*6 to_string
21
      REAL, INTENT(in) :: x
22
      WRITE(to_string, FMT="(F6.3)") x
23
    END FUNCTION
24
end

powered by: WebSVN 2.1.0

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