<div dir="ltr">Hi,<div><br></div><div>My brother (Tarun) and I have been attempting to get dragonegg working with gcc-5 and llvm-3.6. So far we have had some success and most of the compilator and validator tests of dragonegg pass. However the following validator tests fail and we don't understand why.</div><div><br></div><div><span style="font-size:16px">    The Validator :: c++/2007-01-06-ELF-Thunk-</span><span style="font-size:16px">Sections.cpp</span><br style="font-size:16px"><span style="font-size:16px">    The Validator :: c/ExternFunctionWeakref.c</span><br style="font-size:16px"><span style="font-size:16px">    The Validator :: c/ExternVariableWeakref.c</span><br style="font-size:16px"><span style="font-size:16px">    The Validator :: c/InternFunctionWeakref.c</span><br style="font-size:16px"><span style="font-size:16px">    The Validator :: c/InternVariableWeakref.c</span><br style="font-size:16px"></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">Since the last four are extremely similar, I give the example of ExternVariableWeakref.c below:</span></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">The test file looks like:</span></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">// RUN: %dragonegg -S %s -o - | FileCheck %s</span><br style="font-size:16px"><span style="font-size:16px">static int variable_weakref __attribute__ ((weakref("bar")));</span><br style="font-size:16px"><span style="font-size:16px">int *use_variable = &variable_weakref;</span><br style="font-size:16px"><span style="font-size:16px">// CHECK: @use_variable = unnamed_addr global i32* @bar</span><br style="font-size:16px"><span style="font-size:16px">// CHECK: @bar = extern_weak global i32</span><span style="font-size:16px"><br></span></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">And the output we get (which ideally should match the CHECK sections above) is:</span></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">@use_variable = unnamed_addr global i32* @variable_weakref</span><br style="font-size:16px"><span style="font-size:16px">@variable_weakref = internal global i32 0</span><span style="font-size:16px"><br></span></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">Note that for some reason, it is not creating a weak symbol.</span></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">We'd appreciate any suggestions on how these might be fixed or where to look to figure out what's going on.</span></div><div><span style="font-size:16px"><br></span></div><div><span style="font-size:16px">Thanks and Regards,</span></div><div><span style="font-size:16px">Arun Prabhu</span></div></div>