view gcc/testsuite/gcc.dg/lto/ipacp_0.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-lto-options {{ -O1 -flto -flto-partition=1to1 -fipa-cp -fipa-cp-clone}} } */
/* { dg-lto-do run } */

/* Test that clonning happens and we unify declarations of a from both units.  */
const int a = 5;
extern void clone_me (int *);

int
main(void)
{
  int i;
  for (i=0;i<100;i++)
   clone_me ((int *)&a);
  return 0;
}