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

--- Comment #4 from Andrei Horodniceanu <a.horodniceanu at proton dot me> ---
Sorry for the wait:
-----
$ cat repro.d
module object;
struct Gcx
{
    float thing = 0.0;
}
$ /root/build/./gcc/gdc -B/root/build/./gcc/
-B/tmp/gcc/x86_64-pc-linux-gnu/bin/ -B/tmp/gcc/x86_64-pc-linux-gnu/lib/
-fsyntax-only repro.d
==112865== Conditional jump or move depends on uninitialised value(s)
==112865==    at 0x8B41E1: dmd.dstruct._isZeroInit(dmd.expression.Expression)
(in /root/build/gcc/d21)
==112865==    by 0x8B464E: StructDeclaration::finalizeSize() (in
/root/build/gcc/d21)
==112865==    by 0x81202C: dmd.aggregate.AggregateDeclaration.determineSize(ref
const(dmd.location.Loc)) (in /root/build/gcc/d21)
==112865==    by 0x9C532C: Semantic2Visitor::visit(AggregateDeclaration*) (in
/root/build/gcc/d21)
==112865==    by 0x9C55B4: Semantic2Visitor::visit(Module*) (in
/root/build/gcc/d21)
==112865==    by 0x9C5A89: dmd.semantic2.semantic2(dmd.dsymbol.Dsymbol,
dmd.dscope.Scope*) (in /root/build/gcc/d21)
==112865==    by 0xA7092D: d_parse_file() (in /root/build/gcc/d21)
==112865==    by 0xFD35AE: compile_file() (in /root/build/gcc/d21)
==112865==    by 0x80D056: toplev::main(int, char**) (in /root/build/gcc/d21)
==112865==    by 0x80E94F: main (in /root/build/gcc/d21)
==112865==
-----
I hope it is the same bug.

Also note that:
-------
$ cat repro.d
module object;
struct Gcx
{
    float thing = 0/*instead of 0.0*/;
}
$ /root/build/./gcc/gdc -B/root/build/./gcc/
-B/tmp/gcc/x86_64-pc-linux-gnu/bin/ -B/tmp/gcc/x86_64-pc-linux-gnu/lib/
-fsyntax-only repro.d ; echo $?
0
-------

Reply via email to