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

--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Fri, Feb 09, 2024 at 10:06:47PM +0000, anlauf at gcc dot gnu.org wrote:
> 
> --- Comment #4 from anlauf at gcc dot gnu.org ---
> Created attachment 57374
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57374&action=edit
> Proof-of-concept patch
> 
> The attached - hackish - patch tries to avoid the infinite recursion by
> fixing up the character length especially for the intrinsics ADJUST[LR].
> 
> I'm not entirely happy with this, but could not yet find a better place.
> And in gfc_resolve_adjustl the backend_decl is not yet set.
> 

You're much quicker than I!  I only just identified the
infinite recursion and where it was occurring in the
scalarizer.  I got sidetrack on a whole different issue.

I'm wondering if we need to worry about other actual
arguments.  I note

subroutine test_adjustl(x)
  character(*) :: x(100)
   x = adjustl(x)
  call bar(x)
end subroutine

does not cause problems.

Reply via email to