1 /* { dg-do compile } */
2 /* { dg-options "-mcmodel=medany -mexplicit-relocs" } */
3
4 /* Verify that the branch doesn't get optimized away. */
5 extern int weak_func(void) __attribute__ ((weak));
6
7 int
8 sub (void)
9 {
10 if (weak_func)
11 return weak_func ();
12 return 0;
13 }
14 /* { dg-final { scan-assembler "b\(ne|eq\)" } } */