May 16 [Issue 24553] New: all 0 struct initializer with float is still stored in data section | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24553 Issue ID: 24553 Summary: all 0 struct initializer with float is still stored in data section Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: backend Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: schveiguy@gmail.com Consider these structs: ```d struct A { int[10000] x; } struct B { float[10000] x; } struct C { float[10000] x = 0; } struct D { char[10000] x = 0; } ``` A and D do not store any static data in the binary, because they are zero-initialized types (char.init is non-zero, but the assignment sets it to 0). B obviously must store static data because float.init is NaN. But C still stores static data (10000 32-bit 0s). This should not happen. -- |
Copyright © 1999-2021 by the D Language Foundation