[patch] Tame fix for PR ipa/99122

Eric Botcazou botcazou@adacore.com
Thu Jun 3 10:50:05 GMT 2021


> Not sure whether we know VLA results are always returned by
> reference?  In particular does this mean we'll never see a
> WITH_SIZE_EXPR on the LHS of a call?  You might have noticed
> I've done WITH_SIZE_EXPR "enhancements" recently on trunk.

VLAs are always aggregate_value_p so the caller passes the address of the 
return slot, but they are not always DECL_BY_REFERENCE, at least in Ada.

In Ada we use DECL_BY_REFERENCE only for self-referential types, i.e. types 
whose size is not the same for all the objects, because we need to control the 
amount of returned bytes on a case-by-case basis; when the size is uniform, 
this complication is unnecessary.

> As for the patch we indeed didn't have a testcase covering the
> return case so it should be safe to revert the return part.

OK, thanks, patch installed.

-- 
Eric Botcazou




More information about the Gcc-patches mailing list