[Bug fortran/43136] Excess copy-in/copy-out with character argument

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 15 07:33:00 GMT 2019


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |tkoenig at gcc dot gnu.org

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 45431
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45431&action=edit
Patch which works, but causes some regressions

Apparently, in argument_checking_13.f90, the test in the last routine

interface
  subroutine rlv3(y)
    character   :: y(3)
  end subroutine rlv3
end interface

character(2)          :: assumed_sh_dummy(:,:,:)
...
call rlv3(assumed_sh_dummy(1,1,1)(1:2)) ! { dg-error "contains too few
elements" }

does not trigger the warning if it is replaced by

call rlv3(assumed_sh_dummy(1,1,1))

So, this needs another test.


More information about the Gcc-bugs mailing list