]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Mon, 31 May 2004 21:45:33 +0000 (21:45 +0000)
committerNo Author <no-author@gcc.gnu.org>
Mon, 31 May 2004 21:45:33 +0000 (21:45 +0000)
'gcc-3_3-branch'.

From-SVN: r82503

gcc/testsuite/gcc.dg/sparc-trap-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/sparc-trap-1.c b/gcc/testsuite/gcc.dg/sparc-trap-1.c
new file mode 100644 (file)
index 0000000..a516a88
--- /dev/null
@@ -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 ();
+}