From 9e72fc1163667e2c668840ed87012694c55ae6aa Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 27 Apr 2007 06:56:53 +0000 Subject: [PATCH] Test that eh_selector lowering accepts global variables as well as bitcasts of global variables. llvm-svn: 36500 --- .../CodeGen/Generic/2007-04-14-EHSelectorCrash.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 llvm/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll diff --git a/llvm/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll b/llvm/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll new file mode 100644 index 000000000000..4f4d4f056c90 --- /dev/null +++ b/llvm/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll @@ -0,0 +1,14 @@ +; RUN: llvm-as < %s | llc -enable-eh + +; ModuleID = '2007-04-14-EHSelectorCrash.bc' +@__gnat_others_value = external constant i32 ; [#uses=1] + +define void @_ada_eh() { +entry: + %eh_select = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector( i8* null, i8* bitcast (i32 (...)* @__gnat_eh_personality to i8*), i32* @__gnat_others_value ) ; [#uses=0] + ret void +} + +declare i32 @llvm.eh.selector(i8*, i8*, ...) + +declare i32 @__gnat_eh_personality(...)