Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / pr84739.c
blob6903425c5c4769c956510e3510bf5ef20b21a9d0
1 /* PR tree-optimization/84739 */
2 /* { dg-do compile } */
3 /* { dg-require-weak "" } */
4 /* { dg-options "-O2" } */
6 static void baz (void) __attribute__((weakref("bar"))); /* { dg-warning "alias between functions of incompatible types" } */
8 int
9 foo (int x, int y)
11 if (x)
12 y = 0;
13 if (y)
14 goto lab;
15 y = 0;
16 lab:
17 return y;
20 void
21 bar (int x, int y) /* { dg-message "aliased declaration here" } */
23 y = foo (x, y);
24 if (y != 0)
25 baz ();