2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / c-c++-common / pr36513.c
blobb8b2d6d8060d4bcdb008b7ec9e0cae500540aab6
1 /* PR 36513: -Wlogical-op warns about strchr */
2 /* { dg-do compile } */
3 /* { dg-options "-Wlogical-op" } */
5 extern void *__rawmemchr (const void *__s, int __c);
6 int main1 ()
8 char *s, t;
9 (__extension__ (__builtin_constant_p (t)
10 && !__builtin_constant_p (s)
11 && (t) == '\0'
12 ? (char *) __rawmemchr (s, t)
13 : __builtin_strchr (s, t)));
15 return 0;