2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / split-path-6.c
blobe9b4f2628d55112c2c417d032e39d55aec5aea35
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fsplit-paths -fno-tree-cselim -fdump-tree-split-paths-details -w" } */
4 struct __sFILE
6 unsigned char *_p;
7 int _r;
8 };
9 typedef struct __sFILE __FILE;
10 struct _reent
12 __FILE *_stdin, *_stdout, *_stderr;
14 extern struct _reent *_impure_ptr;
15 extern char contextbufs[10][1024];
16 extern int contextoffset;
17 extern int sflag;
18 void
19 givehelp (interactive)
20 int interactive;
22 if (interactive)
24 while ((--((_impure_ptr->_stdin))->_r <
25 0 ? __srget_r (_impure_ptr,
26 (_impure_ptr->
27 _stdin)) : (int) (*((_impure_ptr->_stdin))->
28 _p++)) != ' ');
32 oof ()
34 int bufsize;
35 int hadnl;
36 while (1)
38 if (bufsize == (sizeof contextbufs[0]) / 2 - 1)
40 if (contextbufs[0][0] == '*' || contextbufs[0][0] == '@')
41 treeinsert (ichartosstr (strtosichar (contextbufs[0] + 1, 0), 1),
42 (100 + 4 * 20 + 4), contextbufs[0][0] == '*');
44 if (hadnl)
45 contextoffset = 0;
46 else
47 contextoffset += bufsize;
48 if (sflag)
50 stop ();
55 void
56 lookharder (string)
57 char *string;
59 register char *g;
60 register char *s;
61 for (s = string; *s != '\0'; s++)
63 if (*s == '*')
65 *g++ = '.';
67 else
68 *g++ = *s;
72 /* { dg-final { scan-tree-dump-times "Duplicating join block" 3 "split-paths" } } */