VR-VALUES [PR28794]: optimize compare assignments also
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr103281-1.c
blob09964d0b46b046e82d30c43b9cd1fee892f866dc
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3 /* PR tree-optmization/103281 */
5 void foo(void);
7 static unsigned b;
9 int main() {
10 for (; b < 3; b++) {
11 char c = b;
12 char a = c ? c : c << 1;
13 if (!(a < 1 ^ b))
14 foo();
18 /* the call to foo should be optimized away. */
19 /* { dg-final { scan-tree-dump-not "foo " "optimized" } } */