Debian Codegraph @

gcc/testsuite/g++.dg/cpp23/attr-assume12.C

raw
1 // PR middle-end/110754
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-O2 -fdump-tree-optimized" }
4 // { dg-final { scan-tree-dump-times "a ={v} x" 1 "optimized" } }
5 // { dg-final { scan-tree-dump-not "={v} a" "optimized" } }
6 // { dg-final { scan-tree-dump-times "return 0;" 1 "optimized" } }
7
8 int
9 foo (int x)
10 {
11 volatile int a = x;
12 [[gnu::assume (x == (a & 0))]];
13 return x;
14 }