[Bug 139] GDC writes all-zero initialisers in the rodata section
via D.gnu
d.gnu at puremagic.com
Wed Nov 26 10:56:39 PST 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=139
--- Comment #10 from Johannes Pfau <johannespfau at gmail.com> ---
Reverting this change exposes a test failure in phobos. However every seemingly
unrelated change hides the error. gcc-4.9 works fine. So I wonder whether this
is actually a bug in the GCC-5 snapshot?
Here's the reduced test case:
----------------
import core.stdc.string;
void test()
{
struct S { @disable this();}
S s = void;
emplaceInitializer(&s);
}
T* emplaceInitializer(T)(T* chunk)
{
static immutable init = T.init;
memcpy(chunk, &init, T.sizeof);
return chunk;
}
----------------
gdc conv.d -c
(sorry, forgot to change language)
----------------
conv.d: In Funktion »emplaceInitializer«:
conv.d:11: Fehler: nicht-triviale Umwandlung bei Zuweisung
ulong
void *
MEM[(unsigned char * {ref-all})chunk] = D.2533;
conv.d:11: interner Compiler-Fehler: verify_gimple gescheitert
0xb2dc8f verify_gimple_in_seq(gimple_statement_base*)
../../gcc-5-20140831/gcc/tree-cfg.c:4672
0x930759 gimplify_body(tree_node*, bool)
../../gcc-5-20140831/gcc/gimplify.c:8847
0x930b16 gimplify_function_tree(tree_node*)
../../gcc-5-20140831/gcc/gimplify.c:8932
0x7a94b7 cgraph_node::analyze()
../../gcc-5-20140831/gcc/cgraphunit.c:612
0x7abdad analyze_functions
../../gcc-5-20140831/gcc/cgraphunit.c:988
0x7ac515 symbol_table::finalize_compilation_unit()
../../gcc-5-20140831/gcc/cgraphunit.c:2277
0x6f487e d_finish_compilation(tree_node**, int)
../../gcc-5-20140831/gcc/d/d-objfile.cc:1947
----------------
----------------
{
void * D.2533;
struct S * D.2534;
D.2533 = {};
MEM[(unsigned char * {ref-all})chunk] = D.2533;
D.2534 = chunk;
return D.2534;
}
----------------
--
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20141126/d6eaf894/attachment.html>
More information about the D.gnu
mailing list