aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr90020.c
blob: 40035aa758e6e4ab325d37d5c20982778f60085a (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
25
26
27
/* { dg-do run  { target { weak_undefined } } } */
/* { dg-add-options weak_undefined } */

void __attribute__((noinline,noclone))
check (int i)
{
  if (i == 0)
    __builtin_exit (0);
}

int i;
extern int x __attribute__((weak));

int main(int argc, char **argv)
{
  if (argc)
    {
      check (i);
      return x;
    }
  else
    {
      check (i);
      return x-1;
    }
  return 0;
}