2009-09-11 18:01:28 +00:00
|
|
|
; RUN: opt < %s -globalopt -S | not grep global
|
2004-10-09 21:50:05 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
@G = internal global void ()* null ; <void ()**> [#uses=2]
|
2004-10-09 21:50:05 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define internal void @Actual() {
|
|
|
|
ret void
|
2004-10-09 21:50:05 +00:00
|
|
|
}
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define void @init() {
|
|
|
|
store void ()* @Actual, void ()** @G
|
|
|
|
ret void
|
2004-10-09 21:50:05 +00:00
|
|
|
}
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define void @doit() {
|
2015-02-27 21:17:42 +00:00
|
|
|
%FP = load void ()*, void ()** @G ; <void ()*> [#uses=1]
|
2008-03-01 09:15:35 +00:00
|
|
|
call void %FP( )
|
|
|
|
ret void
|
2004-10-09 21:50:05 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|