https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120743
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
--- Comment #4 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Jerry DeLisle from comment #3)
>
> Here is a smaller reproducer.
>
...
>
> Delete the if statement inside the do while and the problem diasappears.
For me the problem remains as long as there are substrings of attrlist.
Probable culprit: r16-1096-gafa2de8093a0cd
In gfc_conv_substring:
> gfc_conv_expr_type (&start, ref->u.ss.start, gfc_charlen_type_node);
-> start.expr has type gfc_charlen_type_node
> diff = fold_build2 (MINUS_EXPR, size_type_node, start.expr,
> build_one_cst (size_type_node));
-> start.expr is used with type size_type node.
Oops.