summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr27758.c
blob: d385fc5c94ae21443b4acbf7a5bdf10374de607e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* PR target/27758 */
/* { dg-do run { target fpic } } */
/* { dg-options "-O0 -fpic" } */

typedef int (*fn) (void);

static inline int
foo (void)
{
  return 1;
}
   
fn
test (void)
{
  return foo;
}

int
main (void)
{
  fn f = test ();
  return f () != 1;
}