diff options
author | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-31 21:45:33 +0000 |
---|---|---|
committer | (no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-31 21:45:33 +0000 |
commit | 1224d4c98f0cffe7aaaba0a0b35e293fcc98b760 (patch) | |
tree | 3ba53133d7a3ae0189e2949d16991e14d7de7c30 | |
parent | 12345c76376bdcc4b11cfc97dddebf8c0d752a1b (diff) | |
download | gcc-1224d4c98f0cffe7aaaba0a0b35e293fcc98b760.tar.gz |
This commit was manufactured by cvs2svn to create branch
'gcc-3_3-branch'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_3-branch@82503 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/gcc.dg/sparc-trap-1.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/sparc-trap-1.c b/gcc/testsuite/gcc.dg/sparc-trap-1.c new file mode 100644 index 00000000000..a516a886495 --- /dev/null +++ b/gcc/testsuite/gcc.dg/sparc-trap-1.c @@ -0,0 +1,20 @@ +/* PR target/15693 */ +/* { dg-do compile { target sparc*-*-* } } */ +/* { dg-options "-O2" } */ + +/* This used to fail on SPARC at -O2 because the combiner + produces a compare insn that was not rematched by the + compare expander. */ + +static __inline__ __attribute__ ((always_inline)) +int page_mapping (unsigned flags) +{ + if (1u & (flags >> 16)) + return 1; + return 0; +} +void install_page (unsigned flags) +{ + if (__builtin_expect (!page_mapping (flags), 0)) + __builtin_trap (); +} |