blob: cc8b3e2a565ef4ac7c8a57c9c2cbd2a29e16035f [file] [log] [blame]
/* PR sanitizer/112727 */
/* { dg-do compile } */
/* { dg-options "-O2 -fsanitize=shift-exponent,bounds-strict -Wuninitialized" } */
#ifndef __cplusplus
#define bool _Bool
#endif
struct S { bool s[8]; };
void
foo (const struct S *x)
{
unsigned n = 0;
for (unsigned j = 0; j < 8; j++)
n |= ((!x->s[j]) ? 1 : 0) << (16 + j);
}