Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/spec-barrier-3.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-Wpedantic" } */ /* __builtin_speculation_safe_value returns a value with the same type as its first argument. There should be a warning if that isn't type-compatible with the use. */ int * f (int x) { return __builtin_speculation_safe_value (x); /* { dg-warning "returning 'int' from a function with return type 'int \\*' makes pointer from integer without a cast" } */ } /* { dg-prune-output "this target does not define a speculation barrier;" } */