summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lto/pr47924_0.c
blob: f7fdb44b073bc69bb266b1819148eecf52ff88bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-lto-do link } */
/* { dg-lto-options {{-O2 -flto}} } */

extern void link_error (void);
short *p __attribute__((used));
int i __attribute__((used));

int main()
{
  if (i == 0)
    return;

  *p = 0;

  if (i == 0)
    link_error ();

  return 0;
}