[LLVMbugs] [Bug 11391] New: Regression in expression evaluator

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 16 02:22:00 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11391

             Bug #: 11391
           Summary: Regression in expression evaluator
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: abramobagnara at tin.it
                CC: llvmbugs at cs.uiuc.edu, richard-llvm at metafoo.co.uk
    Classification: Unclassified


$ cat z.c
struct x {
  _Complex float f;
};

int f1() {
  struct x s;
  return __builtin_constant_p(s.f = 1);
}
$ clang -c z.c
clang:
/home/abramo/eclair_swi/deps/build/llvm-r144645/tools/clang/lib/AST/ExprConstant.cpp:824:
bool ExtractSubobject(<unnamed>::EvalInfo&, <unnamed>::CCValue&,
clang::QualType, const<unnamed>::SubobjectDesignator&, clang::QualType):
Assertion `!Obj.isLValue() && "extracting subobject of lvalue"' failed.
0  clang     0x0a23e09b
1  clang     0x0a23de28
2            0x002ef400 __kernel_sigreturn + 0
3  libc.so.6 0x00bb4a82 abort + 386
4  libc.so.6 0x00baa718 __assert_fail + 248
5  clang     0x09795cc0
6  clang     0x097bddda
7  clang     0x097afe8f
8  clang     0x097a13e8
9  clang     0x097bc9ce
10 clang     0x097af588
11 clang     0x097a0941
12 clang     0x097a25d4
13 clang     0x097a2c52 clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&,
clang::ASTContext const&) const + 240
14 clang     0x097a3032 clang::Expr::isEvaluatable(clang::ASTContext const&)
const + 78
15 clang     0x0979c601
16 clang     0x097acb68
17 clang     0x097a23c8
18 clang     0x097a2c52 clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&,
clang::ASTContext const&) const + 240
19 clang     0x08f1a771
clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(clang::FunctionDecl const*,
unsigned int, clang::CallExpr const*) + 117
20 clang     0x08e68687
clang::CodeGen::CodeGenFunction::EmitCallExpr(clang::CallExpr const*,
clang::CodeGen::ReturnValueSlot) + 389
21 clang     0x08e94adb
22 clang     0x08ea0e92
23 clang     0x08e940b0
24 clang     0x08e9fdd6
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool) + 182
25 clang     0x08ef4d38
clang::CodeGen::CodeGenFunction::EmitReturnStmt(clang::ReturnStmt const&) + 514
26 clang     0x08ef2a21 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*) + 735
27 clang     0x08ef2e26
clang::CodeGen::CodeGenFunction::EmitCompoundStmt(clang::CompoundStmt const&,
bool, clang::CodeGen::AggValueSlot) + 248
28 clang     0x08ef2c51
clang::CodeGen::CodeGenFunction::EmitSimpleStmt(clang::Stmt const*) + 213
29 clang     0x08ef2797 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*) + 85
30 clang     0x08f09410
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::CodeGen::FunctionArgList&)
+ 146
31 clang     0x08f0985c
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&) + 764
32 clang     0x08db18d9
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl)
+ 839
33 clang     0x08daf7d4
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl) + 392
34 clang     0x08daf33d
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 741
35 clang     0x08db465a
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 246
36 clang     0x08da9164
37 clang     0x08da7bb9
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 155
38 clang     0x08f2b860 clang::ParseAST(clang::Sema&, bool) + 389
39 clang     0x08c35cb7 clang::ASTFrontendAction::ExecuteAction() + 253
40 clang     0x08da70f3 clang::CodeGenAction::ExecuteAction() + 897
41 clang     0x08c35912 clang::FrontendAction::Execute() + 328
42 clang     0x08c15aca
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 778
43 clang     0x08be8e50
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 880
44 clang     0x08bd91bf cc1_main(char const**, char const**, char const*,
void*) + 1035
45 clang     0x08be4912 main + 521
46 libc.so.6 0x00b9dbd6 __libc_start_main + 230
47 clang     0x08bd8441
Stack dump:
0.    Program arguments: /home/abramo/eclair_swi/deps/bin/clang -cc1 -triple
i386-pc-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name z.c
-mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases
-target-cpu pentium4 -target-linker-version 2.21.0.20110327
-momit-leaf-frame-pointer -coverage-file z.o -resource-dir
/home/abramo/eclair_swi/deps/bin/../lib/clang/3.1 -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem /usr/local/include
-internal-isystem /home/abramo/eclair_swi/deps/bin/../lib/clang/3.1/include
-internal-externc-isystem /usr/include/i486-linux-gnu -internal-externc-isystem
/include -internal-externc-isystem /usr/include -fdebug-compilation-dir
/home/abramo -ferror-limit 19 -fmessage-length 80 -fgnu-runtime
-fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi
-fdiagnostics-show-option -fcolor-diagnostics -o z.o -x c z.c 
1.    <eof> parser at end of file
2.    z.c:5:5: LLVM IR generation of declaration 'f1'
3.    z.c:5:5: Generating code for declaration 'f1'
4.    z.c:5:10: LLVM IR generation of compound statement ('{}')
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 2 (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/z-0mt3an.i
clang: note: diagnostic msg: /tmp/z-0mt3an.sh

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list