* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / varpool-1.c
blob48f1cd3593ce86fc06102295b2619fdb88bd2fff
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;
8 static inline
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;
17 main ()
19 return simplify_after_inline (unnecesary_static_initialized_variable,
20 unnecesary_static_initialized_variable2) +
21 simplify_after_inline (unnecesary_static_initialized_variable,
22 unnecesary_static_initialized_variable2);