comparison gcc/testsuite/gcc.dg/pr69802.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* PR tree-optimization/69802 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Wall" } */
4
5 struct S { unsigned f : 1; };
6 int a, d;
7
8 int
9 foo (void)
10 {
11 unsigned b = 0;
12 struct S c;
13 d = ((1 && b) < c.f) & c.f; /* { dg-warning "is used uninitialized" } */
14 return a;
15 }
16
17 int
18 bar (_Bool c)
19 {
20 unsigned b = 0;
21 d = ((1 && b) < c) & c;
22 return a;
23 }