Comment # 7 on bug 139 from
I'm doing some experiments with D on microcontrollers lately (AVR 8 bit
hello-world(blinking LED) is working: https://github.com/jpf91/GDC/tree/microD
) and I came across this again.

This bugfix leads to the strange situation that zero initializers are a
performance penalty on these systems as RW memory is scarce, but intilizers
with one member not set to zero are put into .rodata and are therefore a better
option.

GCC puts all zero initialzed objects into rodata as well:
------------------------------------------------------------
struct Test
{
    int a;
    int b;
};

const struct Test tb = {0,0};
------------------------------------------------------------
    .globl    tb
    .section    .rodata
    .align 4
    .type    tb, @object
    .size    tb, 8
tb:
    .zero    8
------------------------------------------------------------


So are there any objections against reverting this commit?


You are receiving this mail because: