From 48e0c338ca0e294436471a8c9ce8fcb81f5205e4 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 17 Jan 2007 02:45:19 +0000 Subject: [PATCH] Test cases for PR1117. llvm-svn: 33281 --- .../Regression/Assembler/2007-01-16-CrashOnBadCast.ll | 8 ++++++++ .../Regression/Assembler/2007-01-16-CrashOnBadCast2.ll | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 llvm/test/Regression/Assembler/2007-01-16-CrashOnBadCast.ll create mode 100644 llvm/test/Regression/Assembler/2007-01-16-CrashOnBadCast2.ll diff --git a/llvm/test/Regression/Assembler/2007-01-16-CrashOnBadCast.ll b/llvm/test/Regression/Assembler/2007-01-16-CrashOnBadCast.ll new file mode 100644 index 000000000000..5e113001642f --- /dev/null +++ b/llvm/test/Regression/Assembler/2007-01-16-CrashOnBadCast.ll @@ -0,0 +1,8 @@ +; PR1117 +; RUN: llvm-as < %s 2>&1 > /dev/null | \ +; RUN: grep "invalid cast opcode for cast from" + +define i8* %nada(i64 %X) { + %result = trunc i64 %X to i8* + ret i8* %result +} diff --git a/llvm/test/Regression/Assembler/2007-01-16-CrashOnBadCast2.ll b/llvm/test/Regression/Assembler/2007-01-16-CrashOnBadCast2.ll new file mode 100644 index 000000000000..80cbeaccb75c --- /dev/null +++ b/llvm/test/Regression/Assembler/2007-01-16-CrashOnBadCast2.ll @@ -0,0 +1,5 @@ +; PR1117 +; RUN: llvm-as < %s 2>&1 > /dev/null | \ +; RUN: grep "invalid cast opcode for cast from" + +%X = constant i8* trunc (i64 0 to i8*)