[LLVMbugs] [Bug 3249] New: Crash in llvm-gcc with variably modified type and pointer subtraction

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Dec 20 22:29:30 PST 2008


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

           Summary: Crash in llvm-gcc with variably modified type and
                    pointer subtraction
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu


Testcase:
int a() {return (char(*)[printf("asdf\n")])0 + 1 -
(char(*)[printf("asdf\n")])0;}

Output:
<stdin>: In function ‘a’:
<stdin>:1: warning: implicit declaration of function ‘printf’
<stdin>:1: warning: incompatible implicit declaration of built-in function
‘printf’
Unhandled expression!
TREE_CODE: 118
 <save_expr 0xb7b731e0
    type <integer_type 0xb7b772a0 int public SI
        size <integer_cst 0xb7b6d6e4 constant invariant 32>
        unit size <integer_cst 0xb7b6d40c constant invariant 4>
        align 32 symtab 1 alias set -1 precision 32 min <integer_cst 0xb7b6d690
-2147483648> max <integer_cst 0xb7b6d6ac 2147483647>
        LLVM:  i32
        pointer_to_this <pointer_type 0xb7b77cc0>>
    side-effects invariant public
    arg 0 <var_decl 0xb7bf40d0 D.964 type <integer_type 0xb7b772a0 int>
        used ignored asm-frame-size 0 SI file <stdin> line 1 size <integer_cst
0xb7b6d6e4 32> unit size <integer_cst 0xb7b6d40c 4>
        align 32 context <function_decl 0xb7be8400 a>
        LLVM: i32* %0
        chain <var_decl 0xb7bf4138 D.965 type <integer_type 0xb7b772a0 int>
            used ignored asm-frame-size 0 SI file <stdin> line 1 size
<integer_cst 0xb7b6d6e4 32> unit size <integer_cst 0xb7b6d40c 4>
            align 32 context <function_decl 0xb7be8400 a>>>>
<stdin>:1: internal compiler error: in Emit, at llvm-convert.cpp:947
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.


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