1/* PR tree-optimization/60971 */
2/* { dg-do run } */
3
4#ifndef __cplusplus
5#define bool _Bool
6#endif
7
8volatile unsigned char c;
9
10__attribute__((noinline)) unsigned char
11foo (void)
12{
13  return c;
14}
15
16__attribute__((noinline)) bool
17bar (void)
18{
19  return foo () & 1;
20}
21
22int
23main ()
24{
25  c = 0x41;
26  c = bar ();
27  if (c != 1)
28    __builtin_abort ();
29  c = 0x20;
30  c = bar ();
31  if (c != 0)
32    __builtin_abort ();
33  return 0;
34}
35