aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C
blob: 0a96edc3183285eb0399f905845b64848e7ee50a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile { target c++20 } }

int a, b, c;

void
__attribute__((noinline))
bar()
{
  if (a == 123)
    [[likely]] c = 5;		// { dg-warning "both" }
  else
    [[likely]] b = 77;
}

int main()
{
  bar ();
  return 0;
}