[LLVMbugs] [Bug 6372] New: UNREACHABLE executed at LiveIntervalAnalysis.cpp:773!

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 21 13:20:12 PST 2010


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

           Summary: UNREACHABLE executed at LiveIntervalAnalysis.cpp:773!
           Product: clang
           Version: trunk
          Platform: Other
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P5
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hinokind at gmail.com
   Estimated Hours: 0.0


Created an attachment (id=4269)
 --> (http://www.llvm.org/bugs/attachment.cgi?id=4269)
testcase

clang r96756

$ cat unreach.c
typedef struct whatever
{
    enum {} foo;
    enum {} bar;
    long foobar;
} hax;
void *foo()
{
    hax *image = 0;
    char index;
    long x;
    char *p = 0;
    for (x=0; x < image->bar; x++)
    {
        index=*p++ & 0xFF;
        if (index >= image->foobar)
        {
            invalid(0, 0, index);
            index=0; 
        }
        p[x]=index;
        index=*p++ & 0xFF;
        if (index >= image->foobar)
        {
            invalid(0, 0, index);
            index=0;
        }
        p[x]=index;
    }
}

$ clang -O1 unreach.c
unreach.c:18:4: warning: implicit declaration of function 'invalid' is invalid
in C99 [-Wimplicit-function-declaration]
                        invalid(0, 0, index);
                        ^
unreach.c:30:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
Unrecognized copy instruction!
UNREACHABLE executed at LiveIntervalAnalysis.cpp:773!
Stack dump:
0.    Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-freebsd8.0 -S -disable-free -main-file-name unreach.c
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir /usr/local/lib/clang/1.1 -O1
-fmessage-length 157 -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/cc-lS8A9z.s -x c unreach.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Simple Register Coalescing' on function '@foo'
clang: error: compiler command failed due to signal 6 (use -v to see
invocation)

-- 
Configure bugmail: http://www.llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the llvm-bugs mailing list