builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / varpool-1.c
blobcb7aebdb9ca55602d2826eeecf339c3b0a1ea25d
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 int
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 int
18 main ()
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);