diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/cold-attribute-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/cold-attribute-2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/cold-attribute-2.c b/gcc/testsuite/gcc.target/i386/cold-attribute-2.c new file mode 100644 index 000000000..93ea90661 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/cold-attribute-2.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ +#include <string.h> +t(int c) +{ + if (__builtin_expect (c, 0)) + { + cold_hint (); + return c * 11; + } + return c; +} + +/* { dg-final { scan-assembler "imul" } } */ |