Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fsplit-paths -fno-tree-cselim -fdump-tree-split-paths-details -fno-finite-loops -fno-tree-dominator-opts -fno-tree-vrp -w" } */
3
4 struct __sFILE
5 {
6 unsigned char *_p;
7 int _r;
8 };
9 typedef struct __sFILE __FILE;
10 struct _reent
11 {
12 __FILE *_stdin, *_stdout, *_stderr;
13 };
14 extern struct _reent *_impure_ptr;
15 extern char contextbufs[10][1024];
16 extern int contextoffset;
17 extern int sflag;
18 int strtosichar (char *, int);
19 int ichartosstr (int, int);
20 void treeinsert (int, int, int);
21 void stop(void);
22 int __srget_r (struct _reent *, __FILE *);
23 void
24 givehelp (int interactive)
25 {
26 if (interactive)
27 {
28 while ((--((_impure_ptr->_stdin))->_r <
29 0 ? __srget_r (_impure_ptr,
30 (_impure_ptr->
31 _stdin)) : (int) (*((_impure_ptr->_stdin))->
32 _p++)) != ' ');
33 }
34 }
35
36 void
37 oof (void)
38 {
39 int bufsize;
40 int hadnl;
41 while (1)
42 {
43 if (bufsize == (sizeof contextbufs[0]) / 2 - 1)
44 {
45 if (contextbufs[0][0] == '*' || contextbufs[0][0] == '@')
46 treeinsert (ichartosstr (strtosichar (contextbufs[0] + 1, 0), 1),
47 (100 + 4 * 20 + 4), contextbufs[0][0] == '*');
48 }
49 if (hadnl)
50 contextoffset = 0;
51 else
52 contextoffset += bufsize;
53 if (sflag)
54 {
55 stop ();
56 }
57 }
58 }
59
60
61 /* lookharder becomes an ifcvt'd/cmov. */
62 void
63 lookharder (char *string)
64 {
65 register char *g;
66 register char *s;
67 for (s = string; *s != '\0'; s++)
68 {
69 if (*s == '*')
70 {
71 *g++ = '.';
72 }
73 else
74 *g++ = *s;
75 }
76 }
77
78 /* { dg-final { scan-tree-dump-times "Duplicating join block" 2 "split-paths" } } */