OSDN Git Service

Index: gcc/ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / sparc-trap-1.c
1 /* PR target/15693 */
2 /* { dg-do compile { target sparc*-*-* } } */
3 /* { dg-options "-O2" } */
4
5 /* This used to fail on SPARC at -O2 because the combiner
6    produces a compare insn that was not rematched by the
7    compare expander.  */
8
9 static __inline__ __attribute__ ((always_inline))
10 int page_mapping (unsigned flags)
11 {
12   if (1u & (flags >> 16))
13     return 1;
14   return 0;
15 }
16 void install_page (unsigned flags)
17 {
18   if (__builtin_expect (!page_mapping (flags), 0))
19     __builtin_trap ();
20 }