2 /* { dg-options "-O" } */
4 /* Test that __builtin_speculation_safe_value returns the correct value. */
5 /* This test will cause an unfiltered warning to be emitted on targets
6 that have not implemented support for speculative execution
7 barriers. They should fix that rather than disabling this
15 #ifdef __SIZEOF_INT128__
21 if (__builtin_speculation_safe_value (a
) != 1)
23 if (__builtin_speculation_safe_value (b
) != 2)
25 if (__builtin_speculation_safe_value (c
) != 3)
27 if (__builtin_speculation_safe_value (d
) != 4)
29 if (__builtin_speculation_safe_value (e
) != 5)
31 if (__builtin_speculation_safe_value (f
) != &c
)
33 #ifdef __SIZEOF_INT128__
34 if (__builtin_speculation_safe_value (g
) != 9)