view gcc/testsuite/gcc.dg/lto/pr60461_0.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-lto-do link } */
/* { dg-lto-options {{-Os -flto} } } */


struct S
{
  int f1;
  int f2;
} a[1] = { {0, 0} }; 

int b, c;

static unsigned short fn1 (struct S);

void
fn2 ()
{
  for (; c;)
    ;
  b = 0;
  fn1 (a[0]);
}

unsigned short
fn1 (struct S p)
{
  if (p.f1)
    fn2 ();
  return 0;
}

int
main ()
{
  fn2 ();
  return 0;
}