Index: gcc.target/cris/torture/sync-mis-op-i-2a.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-2a.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-op-i-2a.c	(working copy)
@@ -2,4 +2,5 @@
 /* { dg-additional-sources "../sync-1.c" } */
 /* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
 /* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-1ml.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-1ml.c	(revision 0)
+++ gcc.target/cris/torture/sync-mis-xchg-i-1ml.c	(revision 0)
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-2ml.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-2ml.c	(revision 0)
+++ gcc.target/cris/torture/sync-mis-xchg-i-2ml.c	(revision 0)
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-3ml.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-3ml.c	(revision 0)
+++ gcc.target/cris/torture/sync-mis-xchg-i-3ml.c	(revision 0)
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-1.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-1.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-xchg-i-1.c	(working copy)
@@ -1,4 +1,4 @@
 /* { dg-do run { target *-*-linux* } } */
 /* { dg-additional-sources "../sync-1.c" } */
-/* { dg-options "-Dxchg -Dtype=int" } */
+/* { dg-options "-Dxchg -Dtype=int -mno-unaligned-atomic-may-use-library" } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-2.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-2.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-xchg-i-2.c	(working copy)
@@ -1,4 +1,4 @@
 /* { dg-do run { target *-*-linux* } } */
 /* { dg-additional-sources "../sync-1.c" } */
-/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -mno-unaligned-atomic-may-use-library" } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-3.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-3.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-xchg-i-3.c	(working copy)
@@ -1,4 +1,4 @@
 /* { dg-do run { target *-*-linux* } } */
 /* { dg-additional-sources "../sync-1.c" } */
-/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -mno-unaligned-atomic-may-use-library" } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-2a.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-2a.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-xchg-i-2a.c	(working copy)
@@ -2,4 +2,5 @@
 /* { dg-additional-sources "../sync-1.c" } */
 /* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
 /* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-s-1ml.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-s-1ml.c	(revision 0)
+++ gcc.target/cris/torture/sync-mis-xchg-s-1ml.c	(revision 0)
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=short -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-s-1.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-s-1.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-xchg-s-1.c	(working copy)
@@ -1,4 +1,4 @@
 /* { dg-do run { target *-*-linux* } } */
 /* { dg-additional-sources "../sync-1.c" } */
-/* { dg-options "-Dxchg -Dtype=short" } */
+/* { dg-options "-Dxchg -Dtype=short -mno-unaligned-atomic-may-use-library" } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-i-1ml.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-1ml.c	(revision 0)
+++ gcc.target/cris/torture/sync-mis-op-i-1ml.c	(revision 0)
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-i-2ml.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-2ml.c	(revision 0)
+++ gcc.target/cris/torture/sync-mis-op-i-2ml.c	(revision 0)
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-i-3ml.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-3ml.c	(revision 0)
+++ gcc.target/cris/torture/sync-mis-op-i-3ml.c	(revision 0)
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-i-1.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-1.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-op-i-1.c	(working copy)
@@ -1,4 +1,4 @@
 /* { dg-do run { target *-*-linux* } } */
 /* { dg-additional-sources "../sync-1.c" } */
-/* { dg-options "-Dop -Dtype=int" } */
+/* { dg-options "-Dop -Dtype=int -mno-unaligned-atomic-may-use-library" } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-i-2.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-2.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-op-i-2.c	(working copy)
@@ -1,4 +1,4 @@
 /* { dg-do run { target *-*-linux* } } */
 /* { dg-additional-sources "../sync-1.c" } */
-/* { dg-options "-Dop -Dtype=int -Dmisalignment=2" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -mno-unaligned-atomic-may-use-library" } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-i-1a.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-1a.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-op-i-1a.c	(working copy)
@@ -2,4 +2,5 @@
 /* { dg-additional-sources "../sync-1.c" } */
 /* { dg-options "-Dop -Dtype=int -DTRAP_USING_ABORT -mno-trap-using-break8" } */
 /* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-i-3.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-3.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-op-i-3.c	(working copy)
@@ -1,4 +1,4 @@
 /* { dg-do run { target *-*-linux* } } */
 /* { dg-additional-sources "../sync-1.c" } */
-/* { dg-options "-Dop -Dtype=int -Dmisalignment=3" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -mno-unaligned-atomic-may-use-library" } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-i-3a.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-i-3a.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-op-i-3a.c	(working copy)
@@ -2,4 +2,5 @@
 /* { dg-additional-sources "../sync-1.c" } */
 /* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
 /* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-s-1ml.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-s-1ml.c	(revision 0)
+++ gcc.target/cris/torture/sync-mis-op-s-1ml.c	(revision 0)
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=short -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-op-s-1.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-s-1.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-op-s-1.c	(working copy)
@@ -1,6 +1,6 @@
 /* { dg-do run { target *-*-linux* } } */
 /* { dg-additional-sources "../sync-1.c" } */
-/* { dg-options "-Dop -Dtype=short" } */
+/* { dg-options "-Dop -Dtype=short -mno-unaligned-atomic-may-use-library" } */
 
 /* Make sure we get a SIGTRAP or equivalent when passing unaligned
    but otherwise valid pointers to the atomic builtins.  */
@@ -76,7 +76,6 @@ void trap_handler(int signum)
 
 int main(void)
 {
-  type x = 0;
   type ret;
 
 #ifndef TRAP_USING_ABORT
@@ -86,7 +85,9 @@ int main(void)
 #endif
 #endif
 
+#ifndef mis_ok
   trap_expected = 1;
+#endif
 
 #if op
   sfa (&s.i, &s.i, 42);
@@ -98,10 +99,24 @@ int main(void)
      should do it.  */
   trap_expected = 0;
 
+#ifdef mis_ok
+  /* We're missing a sequence point, but we shouldn't have the initial
+     value.  */
+  if (s.i == (type) 0xdeadbeef)
+    abort ();
+  exit (0);
+#endif
+
   sfa (&x, &x, 1);
 #else
   acen (&s.i, &x, &ret);
 
+#ifdef mis_ok
+  if (s.i != 2 || x != 2 || ret != (type) 0xdeadbeef)
+    abort ();
+  exit (0);
+#endif
+
   trap_expected = 0;
 
   acen (&x, &x, &ret);
Index: gcc.target/cris/torture/sync-mis-op-s-1a.c
===================================================================
--- gcc.target/cris/torture/sync-mis-op-s-1a.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-op-s-1a.c	(working copy)
@@ -2,4 +2,5 @@
 /* { dg-additional-sources "../sync-1.c" } */
 /* { dg-options "-Dop -Dtype=short -DTRAP_USING_ABORT -mno-trap-using-break8" } */
 /* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-1a.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-1a.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-xchg-i-1a.c	(working copy)
@@ -2,4 +2,5 @@
 /* { dg-additional-sources "../sync-1.c" } */
 /* { dg-options "-Dxchg -Dtype=int -DTRAP_USING_ABORT -mno-trap-using-break8" } */
 /* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-i-3a.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-i-3a.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-xchg-i-3a.c	(working copy)
@@ -2,4 +2,5 @@
 /* { dg-additional-sources "../sync-1.c" } */
 /* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
 /* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
 #include "sync-mis-op-s-1.c"
Index: gcc.target/cris/torture/sync-mis-xchg-s-1a.c
===================================================================
--- gcc.target/cris/torture/sync-mis-xchg-s-1a.c	(revision 189754)
+++ gcc.target/cris/torture/sync-mis-xchg-s-1a.c	(working copy)
@@ -2,4 +2,5 @@
 /* { dg-additional-sources "../sync-1.c" } */
 /* { dg-options "-Dxchg -Dtype=short -DTRAP_USING_ABORT -mno-trap-using-break8" } */
 /* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
 #include "sync-mis-op-s-1.c"
