https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49802

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu.org
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #11 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
As far as I can tell, this has since been fixed. I checked the various cases in
the comments. C3 will run correctly if the code is fixed.

implicit none
character(len=10) :: str

str = "123456789"
call by_value(str)
print *, str
if (str /= "123456789") call abort()

contains
  subroutine by_value(y)
   !character(len=*), value :: y ------ Not allowed with value
    character(len=10), value :: y

    print *, len(y)
    if (len(y) /= 10) call abort()
    print *, y
    y = "abcdefghij"
    print *, y
   !if (str /= "abcdefghij") call abort() ------- Bogus test
    if (y /= "abcdefghij") call abort()

  end subroutine
end

Closing as fixed

Reply via email to