PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / Wstrict-overflow-27.c
blob95d101ad02e573a439f69f16da730659e2463d3d
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -Wstrict-overflow=2 -Werror" } */
4 typedef __SIZE_TYPE__ size_t;
5 extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
6 char **__restrict __save_ptr)
7 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
8 extern const unsigned short int **__ctype_b_loc (void)
9 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
10 extern int *DEBUGLEVEL_CLASS;
11 size_t debug_num_classes = 0;
12 void debug_parse_param(char *param);
13 void
14 debug_parse_levels(const char *params_str, size_t str_len)
16 char str[str_len+1];
17 char *tok, *saveptr;
18 size_t i;
19 tok = strtok_r(str, " \t,\n\r", &saveptr);
20 if (((*__ctype_b_loc ())[(int) ((tok[0]))]))
21 tok = strtok_r(((void *)0), " \t,\n\r", &saveptr);
22 else
23 DEBUGLEVEL_CLASS[0] = 0;
24 for (i = 0 +1; i < debug_num_classes; i++)
25 DEBUGLEVEL_CLASS[i] = DEBUGLEVEL_CLASS[0];
26 while (tok != ((void *)0) )
27 debug_parse_param(tok);