Index: testsuite/c-c++-common/tm/inline-asm.c
===================================================================
--- testsuite/c-c++-common/tm/inline-asm.c	(revision 0)
+++ testsuite/c-c++-common/tm/inline-asm.c	(revision 0)
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O1" } */
+
+static inline void
+inline_death ()
+{
+  __asm__ ("");			/* { dg-error "asm not allowed" } */
+}
+
+void
+tranfunction ()
+{
+  __transaction
+    {
+      inline_death ();
+    }
+}
Index: trans-mem.c
===================================================================
--- trans-mem.c	(revision 168123)
+++ trans-mem.c	(working copy)
@@ -3929,6 +3929,13 @@ ipa_tm_diagnose_transaction (struct cgra
 	      gimple stmt = gsi_stmt (gsi);
 	      tree fndecl;
 
+	      if (gimple_code (stmt) == GIMPLE_ASM)
+		{
+		  error_at (gimple_location (stmt),
+			    "asm not allowed in atomic transaction");
+		  continue;
+		}
+
 	      if (!is_gimple_call (stmt))
 		continue;
 	      fndecl = gimple_call_fndecl (stmt);
