view gcc/testsuite/gcc.dg/ipa/ipa-icf-28.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile { target init_priority } } */
/* { dg-options "-O2 -fdump-ipa-icf-details -fno-inline"  } */

__attribute__ ((noinline, constructor(200)))
int foo()
{
  return 123;
}

__attribute__ ((noinline, constructor(400)))
int bar()
{
  return 123;
}

int main()
{
  foo() + bar();

  return 0;
}
/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf"  } } */
/* { dg-final { scan-ipa-dump "different decl attributes" "icf"  } } */