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