Hi all, Attached is a simple patch that adds a more specific error when you have an unsized type in a gep. Turns $ echo "@g = global i64 ptrtoint(%C* getelementptr(%C* null, i32 1) to i64)" | opt -S opt: <stdin>:1:30: error: invalid indices for getelementptr @g = global i64 ptrtoint(%C* getelementptr(%C* null, i32 1) to i64) into $ echo "@g = global i64 ptrtoint(%C* getelementptr(%C* null, i32 1) to i64)" | opt -S Debug+Asserts/bin/opt: <stdin>:1:30: error: unsized type in getelementptr @g = global i64 ptrtoint(%C* getelementptr(%C* null, i32 1) to i64) Thanks Joey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120222/6a3e78e8/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: unsized_type.diff Type: text/x-patch Size: 1494 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120222/6a3e78e8/attachment.bin>