<div dir="ltr">Did you see this failure on Clang ToT today? There was something like this that I fixed a week or two ago (had introduced this about a week before that).<br><br>Could you provide the crash report stuff (the reproduction file and shell script/command line) so I can easily reproduce this?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 13, 2015 at 10:57 AM, Ulrich Weigand <span dir="ltr"><<a href="mailto:Ulrich.Weigand@de.ibm.com" target="_blank">Ulrich.Weigand@de.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
David Blaikie wrote:<br>
<br>
+void ComplexExprEmitter::EmitStoreOfComplex(ComplexPairTy Val, LValue<br>
lvalue,<br>
+ bool isInit,<br>
+ SourceLocation DbgLoc) {<br>
+ if (auto *DI = CGF.getDebugInfo())<br>
+ DI->EmitLocation(CGF.Builder, DbgLoc);<br>
+<br>
<br>
This seems to have broken compiling functions that return complex values on<br>
SystemZ. This happens e.g. in the<br>
SingleSource/UnitTests/conditional-gnu-ext test-suite case. The symptom is<br>
a failed assertion:<br>
<br>
clang: /home/uweigand/llvm/llvm-head/tools/clang/lib/CodeGen/CGDebugInfo.cpp:2649:<br>
void clang::CodeGen::CGDebugInfo::EmitLocation<br>
(clang::CodeGen::CGBuilderTy&, clang::SourceLocation, bool): Assertion<br>
`!LexicalBlockStack.empty()' failed.<br>
0 clang 0x000000008299efb0 llvm::sys::PrintStackTrace(_IO_FILE*) + 32<br>
1 clang 0x000000008299d100<br>
2 clang 0x000003ffffd82a2c<br>
3 libc.so.6 0x0000004d7295dcfe gsignal + 70<br>
4 libc.so.6 0x0000004d7295f652 abort + 326<br>
5 libc.so.6 0x0000004d729553aa<br>
6 libc.so.6 0x0000004d7295544c __assert_perror_fail + 0<br>
7 clang 0x00000000805aa4fa<br>
8 clang 0x00000000807088a0<br>
9 clang 0x0000000080708bf8<br>
clang::CodeGen::CodeGenFunction::EmitStoreOfComplex(std::pair<llvm::Value*,<br>
llvm::Value*>, clang::CodeGen::LValue, bool, clang::SourceLocation) + 88<br>
10 clang 0x00000000806b7d1c<br>
clang::CodeGen::CodeGenFunction::EmitFunctionEpilog<br>
(clang::CodeGen::CGFunctionInfo const&, bool, clang::SourceLocation) + 1180<br>
11 clang 0x00000000805ef866<br>
clang::CodeGen::CodeGenFunction::FinishFunction(clang::SourceLocation) +<br>
246<br>
12 clang 0x00000000805f37be<br>
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,<br>
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 798<br>
<br>
The call in EmitFunctionEpilog is from here:<br>
<br>
case ABIArgInfo::Indirect: {<br>
auto AI = CurFn->arg_begin();<br>
if (RetAI.isSRetAfterThis())<br>
++AI;<br>
switch (getEvaluationKind(RetTy)) {<br>
case TEK_Complex: {<br>
ComplexPairTy RT =<br>
EmitLoadOfComplex(MakeNaturalAlignAddrLValue(ReturnValue, RetTy),<br>
EndLoc);<br>
EmitStoreOfComplex(RT, MakeNaturalAlignAddrLValue(AI, RetTy),<br>
/*isInit*/ true);<br>
break;<br>
}<br>
<br>
I'm not sure I understand exactly what's going on here, but it looks like<br>
LexicalBlockStack.empty() is simply supposed to be true at this point<br>
during epilog generation? In that case, the assertion would always<br>
fail ...<br>
<br>
I'm assuming this happens only on SystemZ because it is one of the few<br>
platforms that return complex values via implicit reference.<br>
<br>
Any suggestions how to fix this? Thanks!<br>
<br>
<br>
Mit freundlichen Gruessen / Best Regards<br>
<br>
Ulrich Weigand<br>
<br>
--<br>
Dr. Ulrich Weigand | Phone: +49-7031/16-3727<br>
STSM, GNU/Linux compilers and toolchain<br>
IBM Deutschland Research & Development GmbH<br>
Vorsitzende des Aufsichtsrats: Martina Koederitz | Geschäftsführung: Dirk<br>
Wittkopp<br>
Sitz der Gesellschaft: Böblingen | Registergericht: Amtsgericht<br>
Stuttgart, HRB 243294<br>
<br>
</blockquote></div><br></div>