comparison gcc/testsuite/gcc.dg/ipa/ipa-icf-38.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* { dg-do link } */
2 /* { dg-options "-O2 -fdump-ipa-icf -flto -fdump-tree-optimized" } */
3 /* { dg-require-effective-target lto } */
4 /* { dg-additional-sources "ipa-icf-38a.c" }*/
5
6 /* Based on ipa-icf-3.c. */
7
8 typedef int v4si __attribute__ ((vector_size (16)));
9
10 __attribute__ ((noinline))
11 int foo(void)
12 {
13 v4si a = {1,2,3,4};
14 v4si b = {3,2,1,4};
15 v4si c;
16
17 return 54;
18 }
19
20 extern int bar(void);
21
22 int main()
23 {
24 int volatile a = foo();
25 int volatile b = bar();
26
27 return 0;
28 }
29
30 /* { dg-final { scan-wpa-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */
31 /* { dg-final { scan-wpa-ipa-dump "Equal symbols: 1" "icf" } } */
32 /* { dg-final { scan-ltrans-tree-dump "Function foo" "optimized" } } */
33 /* { dg-final { scan-ltrans-tree-dump-not "Function bar" "optimized" } } */