http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56138
Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-01-30 AssignedTo|unassigned at gcc dot |pault at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #1 from Paul Thomas <pault at gcc dot gnu.org> 2013-01-30 06:10:59 UTC --- Created attachment 29305 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29305 Fix for testcase in comment #0 Whilst the patch fixes the testcase and allows John Reid's version of iso_varying_string (ISO/IEC JTC1/SC22/WG5 N1913) to compile, the test programme does not, for the lack of deferred character length components in gfortran. Note that ifort correctly compiles both. Bootstraps and regtests OK with: ! { dg-do run } ! Checks the fix for PR56138. ! ! Taken from ISO/IEC JTC1/SC22/WG5 N1913 by John Reid ! Reported by Tobias Burnus <bur...@gcc.gnu.org> ! character(Len = :), allocatable :: bar bar = "bar" if (LEN (s_to_c ("foo"//bar)) .ne. 6) call abort If (s_to_c (bar//"foo") .ne. "barfoo") call abort contains PURE FUNCTION s_to_c (string) CHARACTER(LEN=*), INTENT(IN) :: string CHARACTER(LEN=:), ALLOCATABLE :: s_to_c s_to_c = string ENDFUNCTION s_to_c end This PR, therefore becomes one to fix deferred character length components.