On 9/18/25 10:52 PM, Qing Zhao wrote:


On Sep 17, 2025, at 12:08, Jakub Jelinek <[email protected]> wrote:

Hi!

-ftrivial-auto-var-init= also calls .DEFERRED_INIT for temporaries
if they have VOID_TYPE_P TARGET_EXPR_INITIAL (otherwise they are expanded
as INIT_EXPR of the TARGET_EXPR_SLOT and TARGET_EXPR_INITIAL and so
everything is initialized; trying to emit .DEFERRED_INIT in such a case
breaks a lot of stuff because e.g. const vars turned into static but
not static when .DEFERRED_INIT is done will try to write into .rodata).

A little confused with the above. Do you mean that not all temporaries are 
initialized to zero, only
the temporaries that have VOID_TYPE_P TARGET_EXPR_INITIAL are initialized to 
zero?

Temporaries with non-void INITIAL are initialized to that value, so there's no need to also initialize them to zero.

Jason

Reply via email to