1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-final { scan-assembler-not "unnecesary_static_initialized_variable" } } */
5 static int unnecesary_static_initialized_variable
;
6 static int *unnecesary_static_initialized_variable2
=
7 &unnecesary_static_initialized_variable
;
9 simplify_after_inline (int param1
, int *param2
)
11 if (unnecesary_static_initialized_variable
!= param1
)
12 return unnecesary_static_initialized_variable
;
13 if (unnecesary_static_initialized_variable2
!= param2
)
14 return unnecesary_static_initialized_variable
;
20 return simplify_after_inline (unnecesary_static_initialized_variable
,
21 unnecesary_static_initialized_variable2
) +
22 simplify_after_inline (unnecesary_static_initialized_variable
,
23 unnecesary_static_initialized_variable2
);