Debian Codegraph @

gcc/testsuite/gcc.dg/ipa/pr119852.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-ipa-clones" } */
3
4 typedef struct rtx_def *rtx;
5 enum rtx_code {
6 LAST_AND_UNUSED_RTX_CODE};
7 extern const char * const rtx_format[((int) LAST_AND_UNUSED_RTX_CODE)];
8 struct rtx_def {
9 enum rtx_code code;
10 };
11 typedef int (*rtx_function) (rtx *, void *);
12 extern int for_each_rtx (rtx *, rtx_function, void *);
13 int
14 replace_label (rtx *x, void *data)
15 {
16 rtx l = *x;
17 if (l == (rtx) 0)
18 {
19 {
20 rtx new_c, new_l;
21 for_each_rtx (&new_c, replace_label, data);
22 }
23 }
24 }
25 static int
26 for_each_rtx_1 (rtx exp, int n, rtx_function f, void *data)
27 {
28 int result, i, j;
29 const char *format = (rtx_format[(int) (((enum rtx_code) (exp)->code))]);
30 rtx *x;
31 for (; format[n] != '\0'; n++)
32 {
33 switch (format[n])
34 {
35 case 'e':
36 result = (*f) (x, data);
37 {
38 result = for_each_rtx_1 (*x, i, f, data);
39 }
40 }
41 }
42 }
43 int
44 for_each_rtx (rtx *x, rtx_function f, void *data)
45 {
46 int i;
47 return for_each_rtx_1 (*x, i, f, data);
48 }
49
50 /* { dg-final { scan-ipa-dump-not "(null)" "ipa-clones" } } */