[LLVMbugs] [Bug 2175] New: llvm-gcc abort on tricky VLA cast

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Mar 25 16:36:46 PDT 2008


           Summary: llvm-gcc abort on tricky VLA cast
           Product: tools
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: gohman at apple.com
                CC: llvmbugs at cs.uiuc.edu

llvm-gcc aborts on this:

void *p(void);
long d(void);

float foo(long i0, long i1, long i2, long i3, long i4, long i5) {
  return ((float (*(*(*)[d()])[])[])p())[i0][i1][i2][i3][i4][i5];

The abort looks like this:

Unhandled expression!
 <save_expr 0x41d14990
    type <integer_type 0x41d0c3f0 long int public SI
        size <integer_cst 0x41d046c0 constant invariant 32>
        unit size <integer_cst 0x41d041e0 constant invariant 4>
        align 32 symtab 2 alias set -1 precision 32 min <integer_cst 0x41d047e0
-2147483648> max <integer_cst 0x41d04810 2147483647>
        LLVM:  i32
        pointer_to_this <pointer_type 0x41d16b60>>
    side-effects invariant
    arg 0 <call_expr 0x41d14900 type <integer_type 0x41d0c3f0 long int>
        arg 0 <addr_expr 0x41d148d0 type <pointer_type 0x41dbacb0>
            constant invariant arg 0 <function_decl 0x41dbb300 d>>>>
t.c: In function ‘foo’:
t.c:4: internal compiler error: in Emit, at llvm-convert.cpp:851

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