diff --git a/test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll b/test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll new file mode 100644 index 00000000000..18496f2658d --- /dev/null +++ b/test/Regression/Transforms/InstCombine/2002-09-17-GetElementPtrCrash.ll @@ -0,0 +1,12 @@ +; RUN: as < %s | opt -instcombine + +%bob = type { int } + +int %alias() { + %pbob1 = alloca %bob + %pbob2 = getelementptr %bob* %pbob1 + %pbobel = getelementptr %bob* %pbob2, long 0, ubyte 0 + %rval = load int* %pbobel + ret int %rval +} +