https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83465

--- Comment #2 from Yibiao Yang <yangyibiao at nju dot edu.cn> ---
(In reply to Martin Liška from comment #1)
> Here I admit it's confusing, but it's related how GCC emits variable
> initiation for scalars and arrays with -O0:
> 
> While for the scalar we do:
> struct S * const ss;
> ss = &g;
> 
>       movq    $g, -8(%rbp)
> 
> In case of the array we use default value in assembly:
> 
>       .type   sa.1804, @object
>       .size   sa.1804, 16
> sa.1804:
>       .quad   g
>       .quad   g

Thanks very much for this detailed explanation.

Reply via email to