gcc/testsuite/gcc.dg/ipa/ipa-icf-28.c
raw| 1 | /* { dg-do compile { target init_priority } } */ |
| 2 | /* { dg-options "-O2 -fdump-ipa-icf-details -fno-inline" } */ |
| 3 | |
| 4 | __attribute__ ((noinline, constructor(200))) |
| 5 | int foo() |
| 6 | { |
| 7 | return 123; |
| 8 | } |
| 9 | |
| 10 | __attribute__ ((noinline, constructor(400))) |
| 11 | int bar() |
| 12 | { |
| 13 | return 123; |
| 14 | } |
| 15 | |
| 16 | int main() |
| 17 | { |
| 18 | foo() + bar(); |
| 19 | |
| 20 | return 0; |
| 21 | } |
| 22 | /* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */ |
| 23 | /* { dg-final { scan-ipa-dump "different decl attributes" "icf" } } */ |