1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-rtl-final"  } */
3 /* { dg-skip-if "Odd label definition syntax" { mmix-*-* } } */
4 
5 extern int printf (const char *, ...);
6 
7 static int __attribute__ ((noinline))
foo(int arg)8 foo (int arg)
9 {
10   return 7 * arg;
11 }
12 
13 static int __attribute__ ((noinline))
bar(int arg)14 bar (int arg)
15 {
16   return arg * arg;
17 }
18 
19 int
baz(int arg)20 baz (int arg)
21 {
22   printf("%d\n", bar (3));
23   printf("%d\n", bar (4));
24   printf("%d\n", foo (5));
25   printf("%d\n", foo (6));
26   /* adding or removing the following call should not affect foo
27      function's clone numbering */
28   printf("%d\n", bar (7));
29   return foo (8);
30 }
31 
32 /* { dg-final { scan-rtl-dump-times {(?n)^;; Function bar.constprop \(bar[.$_]constprop[.$_]0,} 1 "final" } } */
33 /* { dg-final { scan-rtl-dump-times {(?n)^;; Function bar.constprop \(bar[.$_]constprop[.$_]1,} 1 "final" } } */
34 /* { dg-final { scan-rtl-dump-times {(?n)^;; Function bar.constprop \(bar[.$_]constprop[.$_]2,} 1 "final" } } */
35 /* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]0,} 1 "final" } } */
36 /* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]1,} 1 "final" } } */
37 /* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]2,} 1 "final" } } */
38 /* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]3,} 0 "final" } } */
39 /* { dg-final { scan-rtl-dump-times {(?n)^;; Function foo.constprop \(foo[.$_]constprop[.$_]4,} 0 "final" } } */
40