From: Duncan Sands Date: Fri, 27 Apr 2007 06:56:53 +0000 (+0000) Subject: Test that eh_selector lowering accepts global variables as well as bitcasts X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c88725fe21ca0cd2f0de28458b0ae333dd4317d6;p=oota-llvm.git Test that eh_selector lowering accepts global variables as well as bitcasts of global variables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36500 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll b/test/CodeGen/Generic/2007-04-14-EHSelectorCrash.ll new file mode 100644 index 00000000000..4f4d4f056c9 --- /dev/null +++ b/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(...)