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() {
|
|
|
|
%FP = load void ()** @G ; <void ()*> [#uses=1]
|
|
|
|
call void %FP( )
|
|
|
|
ret void
|
2004-10-09 21:50:05 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|