blob: 9003004d431d6165121efb355d2a29881561cf29 [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() {
David Blaikiea79ac142015-02-27 21:17:42 +000015 %FP = load void ()*, void ()** @G ; <void ()*> [#uses=1]
Tanya Lattner5640bd12008-03-01 09:15:35 +000016 call void %FP( )
17 ret void
Chris Lattnered8d7672004-10-09 21:50:05 +000018}
Tanya Lattner5640bd12008-03-01 09:15:35 +000019