From a4d031c79e899114f408bfa96ca3e3d934c31a7b Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Mon, 20 Feb 2012 23:43:31 +0000 Subject: re PR middle-end/52141 ([trans-mem] ICE due to asm statement in trans-mem.c:expand_block_tm) PR middle-end/52141 * trans-mem.c (ipa_tm_scan_irr_block): Error out on GIMPLE_ASM's in a transaction safe function. From-SVN: r184417 --- gcc/trans-mem.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/trans-mem.c') diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index d760db3..aa330dd 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -3736,6 +3736,13 @@ ipa_tm_scan_irr_block (basic_block bb) assembly statement is not relevant to the transaction is to wrap it in a __tm_waiver block. This is not yet implemented, so we can't check for it. */ + if (is_tm_safe (current_function_decl)) + { + tree t = build1 (NOP_EXPR, void_type_node, size_zero_node); + SET_EXPR_LOCATION (t, gimple_location (stmt)); + TREE_BLOCK (t) = gimple_block (stmt); + error ("%Kasm not allowed in % function", t); + } return true; default: -- cgit v1.1