https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103716
--- Comment #4 from anlauf at gcc dot gnu.org --- (In reply to G. Steinmetz from comment #3) > On my environment(s) the history for r9 is as follows : > > <= 20181028 : Error: Unexpected '%' for nonderived-type variable 'x' > at (1) > 20181104..20190824 : ICE in check_assumed_size_reference/gfc_format_decoder > 20191005..20200125 : ICE in gimplify_expr > >= 20200508 : accepted, no Error, no ICE > > (sorry for the sparse coverage with r9 binaries between 20200125 and > 20200508) OK, I checked again, and find top-of-the-branch r9 generating questionable code. print *, g(x%len) generates D.3874 = g (&(integer(kind=4)) _x, _x); (note the 2 arguments), while print *, g(len(x)) generates D.3876 = (integer(kind=4)) _x; D.3877 = g (&D.3876); which is how it should have been.