<html>
<head>
<base href="http://bugzilla.gdcproject.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - GDC writes all-zero initialisers in the rodata section"
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=139#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - GDC writes all-zero initialisers in the rodata section"
href="http://bugzilla.gdcproject.org/show_bug.cgi?id=139">bug 139</a>
from <span class="vcard"><a class="email" href="mailto:johannespfau@gmail.com" title="Johannes Pfau <johannespfau@gmail.com>"> <span class="fn">Johannes Pfau</span></a>
</span></b>
<pre>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;
}
----------------</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are watching all bug changes.</li>
</ul>
</body>
</html>