Am 09.02.22 um 22:11 schrieb Harald Anlauf via Gcc-patches:
Dear all,

as we did not properly check the initialization of pointers in
DATA statements for valid initial data targets, we could either
ICE or generate wrong code.  Testcase based on Gerhard's, BTW.

The attached patch adds a check in gfc_assign_data_value by
calling gfc_check_pointer_assign, as the latter did not get
called otherwise.

Along the course I introduced a new macro IS_POINTER() that
should help to make the code more readable whenever we need
to check the attributes of a symbol to see whether it is a
pointer, CLASS or not.  At least it may save some typing in
the future.

Regtested on x86_64-pc-linux-gnu.  OK for mainline?

Thanks,
Harald


Reply via email to