[LLVMbugs] [Bug 14248] New: SROA.cpp:2506: Assertion `[...] && "Only alloca-wide loads can be split and recomposed"' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Nov 3 03:34:03 PDT 2012


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

             Bug #: 14248
           Summary: SROA.cpp:2506: Assertion `[...] && "Only alloca-wide
                    loads can be split and recomposed"' failed.
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: antoine.balestrat at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


With LLVM/Clang 3.2 as of r166877, at -O1 and higher :

$ cat alloca.c
void f(void)
{
    int *pa, **pb = &pa;
    char c;

    while(*pa)
        *pb = &c;
}

$ clong -O1 -w alloca.c
clang: /home/merkil/git/clang/llvm/lib/Transforms/Scalar/SROA.cpp:2506: bool
<anonymous namespace>::AllocaPartitionRewriter::visitLoadInst(llvm::LoadInst
&): Assertion `LI.getType()->getIntegerBitWidth() ==
TD.getTypeSizeInBits(OldAI.getAllocatedType()) && "Only alloca-wide loads can
be split and recomposed"' failed.
0  clang           0x0000000001a8b7bf
1  clang           0x0000000001a8bca3
2  libpthread.so.0 0x00007f031abbe970
3  libc.so.6       0x00007f0319e2ac75 gsignal + 53
4  libc.so.6       0x00007f0319e2bf87 abort + 327
5  libc.so.6       0x00007f0319e23d82
6  libc.so.6       0x00007f0319e23e32
7  clang           0x0000000001736ae6
8  clang           0x0000000001734737
9  clang           0x0000000001730101
10 clang           0x00000000019f0a0b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 443
11 clang           0x00000000019eff88
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 168
12 clang           0x00000000019efe6c
llvm::FunctionPassManager::run(llvm::Function&) + 108
13 clang           0x000000000079f055
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5669
14 clang           0x000000000079cbca
15 clang           0x00000000008cf0f4 clang::ParseAST(clang::Sema&, bool, bool)
+ 532
16 clang           0x000000000079bc12 clang::CodeGenAction::ExecuteAction() +
178
17 clang           0x000000000063ec95 clang::FrontendAction::Execute() + 101
18 clang           0x000000000061e2dd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973
19 clang           0x00000000006067f8
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3768
20 clang           0x00000000005faedf cc1_main(char const**, char const**, char
const*, void*) + 767
21 clang           0x0000000000602a06 main + 3574
22 libc.so.6       0x00007f0319e17695 __libc_start_main + 245
23 clang           0x00000000005faafd
Stack dump:
0.    Program arguments: /home/merkil/git/clang/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
alloca.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.22.90.20120727 -momit-leaf-frame-pointer -resource-dir
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/git/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-w -fdebug-compilation-dir /home/merkil -ferror-limit 19 -fmessage-length 0
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -o
/tmp/alloca-0fTUZc.o -x c alloca.c 
1.    <eof> parser at end of file
2.    Per-function optimization
3.    Running pass 'SROA' on function '@f'
clang: error: unable to execute command: Aborted

-- 
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