[LLVMbugs] [Bug 7432] New: llvm2cpp service dies when fed code with dynamic labels

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jun 20 22:42:26 PDT 2010


           Summary: llvm2cpp service dies when fed code with dynamic
           Product: Website
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: General Website
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: felixcca at yahoo.ca
                CC: llvmbugs at cs.uiuc.edu

When compiling C code with dynamic gotos and asking llvm2cpp to show library
calls, it dies from a "Bad constant" error.

Steps to reproduce:
1. Go to http://llvm.org/demo/index.cgi
2. Enter a program that has dynamic gotos:

#include <time.h>

int main() {
    void* array[] = {&&foo, &&bar};
    goto *array[time(NULL) % 2];
    foo: return 1;
    bar: return 2;
    return 0;

3. Check "Show LLVM C++ API Code"
4. Click "Compile Source Code"

Expected results:
It should display the appropriate API calls to generate such instructions.

Actual Results:
llvm2cpp dies because of a "Bad Constant" error, even though the compiler
managed to make valid LLVM bytecode out of the C code.

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