aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/pr123026.c
blob: 4dcce8a6289f4288b7a63ed9c3fd9a4e5624b290 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do run } */
/* { dg-additional-options "-O3 -march=armv8-a -std=c99" } */

#include <stdbool.h>

int g;

__attribute__ ((noipa)) void
foo(bool a) {
  for (int i = 0; i < 4; i++)
    if (!i || a)
      g += 1;
}

int main()
{
  foo(0);
  if (g != 1)
    __builtin_abort();
  return 0;
}