blob: b09567e62a9eea1ce36fff3c749a90be595e89d8 [file] [log] [blame]
/* { dg-do run } */
/* 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;" } */