This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Fix PR15326


A minor correction to the testcase I posted earlier. Note to self: don't edit
testcases after you verified that they work.

- Tobi

Tobias Schlüter wrote:
> ! { dg-do run }
> ! we didn't deal correctly with functions whose lengths depends on
> ! their arguments
> implicit none
> character (len = 10) :: T1, T2
> T1 = ""
> if (LEN(D(T1)).NE.10) call abort
          ^ changed here
> T2 = D (T1)
> if (t1.ne."          ") call abort
> if (t2.ne."1234567890") call abort
> contains
>   function D (String)
>     character (len = *), intent(in) :: String
>     character (len = Len(String)) :: D
>     D = "1234567890"
>     return
>   end function D
> end


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]