Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/c-c++-common/spec-barrier-2.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
/* { dg-do run } */ /* { dg-additional-options "-Wno-volatile" { target c++ } } */ /* Even on targets that don't need the optional failval parameter, side-effects on the operand should still be calculated. */ int x = 3; volatile int y = 9; int main () { int z = __builtin_speculation_safe_value (x, y++); if (z != 3 || y != 10) __builtin_abort (); return 0; } /* { dg-prune-output "this target does not define a speculation barrier;" } */