Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/independent-cloneids-1.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-O3 -fipa-cp -fipa-cp-clone" } */ | |
3 | |
4 extern int printf (const char *, ...); | |
5 | |
6 static int __attribute__ ((noinline)) | |
7 foo (int arg) | |
8 { | |
9 return 7 * arg; | |
10 } | |
11 | |
12 static int __attribute__ ((noinline)) | |
13 bar (int arg) | |
14 { | |
15 return arg * arg; | |
16 } | |
17 | |
18 int | |
19 baz (int arg) | |
20 { | |
21 printf("%d\n", bar (3)); | |
22 printf("%d\n", bar (4)); | |
23 printf("%d\n", foo (5)); | |
24 printf("%d\n", foo (6)); | |
25 /* adding or removing the following call should not affect foo | |
26 function's clone numbering */ | |
27 printf("%d\n", bar (7)); | |
28 return foo (8); | |
29 } | |
30 | |
31 /* { dg-final { scan-assembler-times {(?n)^_*bar[.$_]constprop[.$_]0:} 1 } } */ | |
32 /* { dg-final { scan-assembler-times {(?n)^_*bar[.$_]constprop[.$_]1:} 1 } } */ | |
33 /* { dg-final { scan-assembler-times {(?n)^_*bar[.$_]constprop[.$_]2:} 1 } } */ | |
34 /* { dg-final { scan-assembler-times {(?n)^_*foo[.$_]constprop[.$_]0:} 1 } } */ | |
35 /* { dg-final { scan-assembler-times {(?n)^_*foo[.$_]constprop[.$_]1:} 1 } } */ | |
36 /* { dg-final { scan-assembler-times {(?n)^_*foo[.$_]constprop[.$_]2:} 1 } } */ | |
37 /* { dg-final { scan-assembler-not {(?n)^_*foo[.$_]constprop[.$_]3:} } } */ | |
38 /* { dg-final { scan-assembler-not {(?n)^_*foo[.$_]constprop[.$_]4:} } } */ |