re PR tree-optimization/33593 (tree-outof-ssa moves sources of non-call exceptions...
[gcc.git] / gcc / testsuite / g++.dg / tree-ssa / pr21584-1.C
1 extern "C" {
2
3 extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
4 throw () __attribute__ ((__nonnull__ (1, 2)));
5
6 extern char *foo (char *__restrict __s) throw ();
7 }
8
9 class cset {
10 public:
11 cset();
12 int operator()(unsigned char) const;
13 private:
14 char v[(127 * 2 + 1)+1];
15 };
16
17 inline int cset::operator()(unsigned char c) const
18 {
19 return v[c];
20 }
21
22 extern cset csspace;
23
24 void baz()
25 {
26 char *vec;
27 char buf[512];
28
29 char *p = buf;
30 while (csspace(*p))
31 p++;
32
33 if (*p != '#' && (p = foo(buf)) != 0) {
34 vec = new char[10+ 1];
35 strcpy(vec, p);
36 }
37 }
38