https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103508
kargls at comcast dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargls at comcast dot net
--- Comment #4 from kargls at comcast dot net ---
(In reply to Paul Thomas from comment #3)
> (In reply to G. Steinmetz from comment #1)
> > This is the working version :
> >
> Indeed!
>
> 15-branch now emits:
> pr103508.f90:12:9:
>
> 12 | end
> | 1
> Error: END BLOCK statement expected at (1)
> (null):0: confused by earlier errors, bailing out
>
> whereas mainline emits the error and goes into an infinite loop.
>
> Oddly, this non-PDT version does the same:
> program p
> type t
> integer :: n = 1
> character(3) :: c
> end type
> block
> block
> type(t) :: x
> x%c = 'abc'
> print *, len(x%c)
> end
> end
> end
The above compiles if one uses labeled block statements.
% cat oi.f90
program p
type t
integer :: n = 1
character(3) :: c
end type
one: block
two: block
type(t) :: x
x%c = 'abc'
print *, len(x%c)
end block two
end block one
end
% gfcx -o z oi.f90 && ./z
3
Likely, getting confused by the nested unlabeled construct.