[LLVMbugs] [Bug 16651] New: Assertion `CanSROA' failed.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 18 08:41:47 PDT 2013


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

            Bug ID: 16651
           Summary: Assertion `CanSROA' failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: chandlerc at gmail.com
          Reporter: jan.smets at alcatel-lucent.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Compile with -O2

clang: /jasmets/clang/llvm/lib/Transforms/Scalar/SROA.cpp:1954:
bool<unnamed>::AllocaPartitionRewriter::visit(const<unnamed>::Partition*):
Assertion `CanSROA' failed.
0  clang           0x0000000001f52fb2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang           0x0000000001f541aa
2  libpthread.so.0 0x00007fa68ab89500
3  libc.so.6       0x00007fa689c6d8a5 gsignal + 53
4  libc.so.6       0x00007fa689c6f085 abort + 373
5  libc.so.6       0x00007fa689c66a1e
6  libc.so.6       0x00007fa689c66ae0 __assert_perror_fail + 0
7  clang           0x0000000001b6117e
8  clang           0x0000000001b630d0
9  clang           0x0000000001b64e11
10 clang           0x0000000001b65a7d
11 clang           0x0000000001eed908
llvm::FPPassManager::runOnFunction(llvm::Function&) + 568
12 clang           0x0000000001eedac7
llvm::FunctionPassManagerImpl::run(llvm::Function&) + 183
13 clang           0x0000000001eeddec
llvm::FunctionPassManager::run(llvm::Function&) + 220
14 clang           0x000000000080a2c6
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1686
15 clang           0x00000000008078d9
16 clang           0x00000000009af2fe clang::ParseAST(clang::Sema&, bool, bool)
+ 382
17 clang           0x00000000008065ae clang::CodeGenAction::ExecuteAction() +
78
18 clang           0x0000000000685d69 clang::FrontendAction::Execute() + 313
19 clang           0x00000000006674c5
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 341
20 clang           0x00000000006484d7
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1543
21 clang           0x000000000063e0f8 cc1_main(char const**, char const**, char
const*, void*) + 984
22 clang           0x0000000000646118 main + 7448
23 libc.so.6       0x00007fa689c59cdd __libc_start_main + 253
24 clang           0x000000000063db39
Stack dump:
0.      Program arguments: /jasmets/clang/prefix/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name test.c
-mrelocation-model static -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -target-linker-version 2.20.51.0.2
-momit-leaf-frame-pointer -coverage-file /tmp/test -resource-dir
/jasmets/clang/prefix/bin/../lib/clang/3.4 -internal-isystem /usr/local/include
-internal-isystem /jasmets/clang/prefix/bin/../lib/clang/3.4/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdebug-compilation-dir /jasmets/HEAD-CLANG/panos/rchips -ferror-limit 19
-fmessage-length 197 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -o /tmp/test -x c /tmp/test.c 
1.      <eof> parser at end of file
2.      Per-function optimization
3.      Running pass 'SROA' on function '@bla'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (trunk 186576)
Target: x86_64-unknown-linux-gnu
Thread model: posix




typedef struct
{
    unsigned int lower;
    unsigned int upper;
} TICK; 

extern volatile TICK vxAbsTicks;

typedef struct
{

    unsigned char ace : 1;
    unsigned char something;
    unsigned char dir : 1;
    typeof(vxAbsTicks.lower) xyz;
} tBla; 


void bla(void)
{
    unsigned d;
    {   

        {    
            for (d = 0; d < 2; d++)
            {    
                int dir = (d == 0) ? 1:2 ; 
                {    
                    {    
                        {    
                            tBla * path = 0x12334;
                            tBla temp_path;
                            temp_path = *path;
                            if (temp_path.ace == 1) break;
                            if (temp_path.dir != dir) continue;
                            printf("Something");
                        }    
                    }    
                }    
                printf("\n");
            }    
        }    
    }   
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130718/bc4a745c/attachment.html>


More information about the llvm-bugs mailing list