]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c
Testsuite: mark IPA test as requiring alias support
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-icf-38.c
1 /* { dg-do link } */
2 /* { dg-require-alias "" } */
3 /* { dg-options "-O2 -fdump-ipa-icf-optimized -flto -fdump-tree-optimized" } */
4 /* { dg-require-effective-target lto } */
5 /* { dg-additional-sources "ipa-icf-38a.c" }*/
6
7 /* Based on ipa-icf-3.c. */
8
9 typedef int v4si __attribute__ ((vector_size (16)));
10
11 __attribute__ ((noinline))
12 int foo(void)
13 {
14 v4si a = {1,2,3,4};
15 v4si b = {3,2,1,4};
16 v4si c;
17
18 return 54;
19 }
20
21 extern int bar(void);
22
23 int main()
24 {
25 int volatile a = foo();
26 int volatile b = bar();
27
28 return 0;
29 }
30
31 /* { dg-final { scan-wpa-ipa-dump "Semantic equality hit:foo/\[0-9+\]+->bar/\[0-9+\]+" "icf" } } */
32 /* { dg-final { scan-wpa-ipa-dump "Equal symbols: 1" "icf" } } */
33 /* { dg-final { scan-ltrans-tree-dump "Function foo" "optimized" } } */
34 /* { dg-final { scan-ltrans-tree-dump-not "Function bar" "optimized" } } */