This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29431] New: Not Implemented: complex character array constructors
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Oct 2006 15:55:51 -0000
- Subject: [Bug fortran/29431] New: Not Implemented: complex character array constructors
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In fixing PR29373, I separated off the part to do with the function declaration
from that triggered by the constructor.
! { dg-do compile }
! Tests patch for PR29373, in which the implicit character
! statement messes up the function declaration because the
! requisite functions in decl.c were told nothing about
! implicit types.
!
! Contributed by Tobias Schlueter <tobi@gcc.gnu.org>
!
implicit character*32 (a-z)
CHARACTER(len=255), DIMENSION(1,2) :: a
! Reporters original, which triggers another error:
! gfc_todo: Not Implemented: complex character array
! constructors.
a = reshape((/ to_string(1.0) /), (/ 1, 2 /)) ! uncommented
a = to_string(1.0)
print *, a
CONTAINS
FUNCTION to_string(x)
character*32 to_string ! moved from function declaration.
REAL, INTENT(in) :: x
WRITE(to_string, FMT="(F6.3)") x
END FUNCTION
END PROGRAM
does this
[prt@localhost pr29373]# /svn-4.2/bin/gfortran pr29373a.f90
pr29373a.f90: In function ?MAIN__?:
pr29373a.f90:24: fatal error: gfc_todo: Not Implemented: complex character
array constructors
compilation terminated.
Paul
--
Summary: Not Implemented: complex character array constructors
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pault at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29431