Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / c-c++-common / spec-barrier-2.c
blobb09567e62a9eea1ce36fff3c749a90be595e89d8
1 /* { dg-do run } */
3 /* Even on targets that don't need the optional failval parameter,
4 side-effects on the operand should still be calculated. */
6 int x = 3;
7 volatile int y = 9;
9 int main ()
11 int z = __builtin_speculation_safe_value (x, y++);
12 if (z != 3 || y != 10)
13 __builtin_abort ();
14 return 0;
17 /* { dg-prune-output "this target does not define a speculation barrier;" } */