gcc/testsuite/g++.dg/ipa/comdat.C
raw| 1 | /* { dg-do compile { target *-*-linux* *-*-gnu* *-*-uclinux* } } */ |
| 2 | /* { dg-options "-O2 -fdump-ipa-comdats" } */ |
| 3 | #include <stdio.h> |
| 4 | __attribute__ ((noinline)) |
| 5 | static int q(void) |
| 6 | { |
| 7 | return printf ("test"); |
| 8 | } |
| 9 | inline int t(void) |
| 10 | { |
| 11 | return q(); |
| 12 | } |
| 13 | int (*f)()=t; |
| 14 | /* { dg-final { scan-ipa-dump-times "Localizing symbol" 1 "comdats" } } */ |