blob: 8019076f9463e3ba31cd0f9f1049d2fc37bac7cf [file] [log] [blame]
Dan Gohman18800922009-09-11 18:01:28 +00001; RUN: opt < %s -globalopt -S | not grep global
Chris Lattnered8d7672004-10-09 21:50:05 +00002
Tanya Lattner5640bd12008-03-01 09:15:35 +00003@G = internal global void ()* null ; <void ()**> [#uses=2]
Chris Lattnered8d7672004-10-09 21:50:05 +00004
Tanya Lattner5640bd12008-03-01 09:15:35 +00005define internal void @Actual() {
6 ret void
Chris Lattnered8d7672004-10-09 21:50:05 +00007}
8
Tanya Lattner5640bd12008-03-01 09:15:35 +00009define void @init() {
10 store void ()* @Actual, void ()** @G
11 ret void
Chris Lattnered8d7672004-10-09 21:50:05 +000012}
13
Tanya Lattner5640bd12008-03-01 09:15:35 +000014define void @doit() {
15 %FP = load void ()** @G ; <void ()*> [#uses=1]
16 call void %FP( )
17 ret void
Chris Lattnered8d7672004-10-09 21:50:05 +000018}
Tanya Lattner5640bd12008-03-01 09:15:35 +000019