[Bug fortran/125762] Segfault in gfc_conv_scalarized_array_ref for a DATA statement
jvdelisle2 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 18 23:27:02 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125762
--- Comment #3 from Jerry DeLisle <jvdelisle2 at gmail dot com> ---
(In reply to Mikael Morin from comment #2)
> How is it possible the array ref remains AR_UNKNOWN?
> resolve_data_variables should call gfc_resolve_expr on every value.
Very good point. Its related to the ordering of gfc_resolve_values and
gfc_resolve_data.
The resolve_values runs before resolve_data in the same pass. So when
resolve_values traverses the namespace, p1->value is still NULL. Then
resolve_data stores the unresolved t(3) (with AR_UNKNOWN) into p1->value — and
resolve_values never runs again.
I am testing a different patch.
More information about the Gcc-bugs
mailing list