view gcc/testsuite/gcc.dg/lto/chkp-ctor-merge_0.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* { dg-lto-do run } */
/* { dg-require-effective-target mpx } */
/* { dg-lto-options { { -O2 -flto -fcheck-pointer-bounds -mmpx -nodefaultlibs -lc } } } */

int glob = 1;

void __attribute__((constructor))
ctor1 ()
{
  glob += 1;
}


void __attribute__((constructor))
ctor2 ()
{
  glob -= 2;
}

int main (int argc, const char **argv)
{
  return glob;
}