* gcc-interface/trans.c (node_has_volatile_full_access) <N_Identifier>:
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / 20030320-1.c
blob72d0d0966c6becada43a5d13cbd4a03a8a9ab2a3
1 /* Failed on powerpc64-linux with a segfault due to ifcvt generating
2 conditional returns without updating dominance info.
3 Extracted from glibc's dl-load.c. */
5 typedef __SIZE_TYPE__ size_t;
7 static size_t
8 is_dst (const char *start, const char *name, const char *str,
9 int is_path, int secure)
11 size_t len;
12 _Bool is_curly = 0;
14 if (name[0] == '{')
16 is_curly = 1;
17 ++name;
20 len = 0;
21 while (name[len] == str[len] && name[len] != '\0')
22 ++len;
24 if (is_curly)
26 if (name[len] != '}')
27 return 0;
30 --name;
32 len += 2;
34 else if (name[len] != '\0' && name[len] != '/'
35 && (!is_path || name[len] != ':'))
36 return 0;
38 if (__builtin_expect (secure, 0)
39 && ((name[len] != '\0' && (!is_path || name[len] != ':'))
40 || (name != start + 1 && (!is_path || name[-2] != ':'))))
41 return 0;
43 return len;