Hi Andre, while the patch works with the reduced testcase, it runs into the newly added gcc_assert() when trying the original testcase in the PR.
I also wonder if this use of gcc_assert() is a good idea or good style: + gcc_assert (gfc_resolve_expr (tgt_expr)); Since gcc_assert is a macro, and its precise definition depends on configuration and could possibly be defined to be a no-op, I suggest to evaluate arguments with side-effects outside and pass the return code to gcc_assert. (There are also many other ways to handle this situation. Then removing the gcc_assert around the gfc_resolve_expr() avoids the ICE, but restores the reported error. So not OK yet. Sorry! Thanks, Harald Am 13.12.24 um 10:10 schrieb Andre Vehreschild:
Hi all, attached patch fixes an reject-valid of an array constructor in an associate by resolving the array constructor before parsing the associate-block. I am not 100% sure, if that is the right place to do this. But given, that there is already a special casing before the patch, I just propose to do the resolve there. Regstests ok on x86_64-pc-linux-gnu / F41. Ok for mainline ? Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de