On Tue, May 06, 2025 at 07:43:41PM +0200, Harald Anlauf wrote:
>
> the new logic misses the following bad code:
>
> print *, c_associated(c_loc(val), 42)
>
> This now ICEs here.
>
> I suggest to not 'return true' too early before all arguments
> have been checked.
>
Good catch, Harald. We probably need to check c_ptr_2 first
if it is present.
F2023, 18.2.3.2 has
C_PTR_1 shall be a scalar of type C_PTR or C_FUNPTR.
C_PTR_2 (optional) shall be a scalar of the same type as C_PTR_1.
if (c_ptr_2)
{
if (!same_type_check (c_ptr_1, 0, c_ptr_2, 1)
return false;
...
}
--
Steve