diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2012-02-20 23:43:31 +0000 |
---|---|---|
committer | Aldy Hernandez <aldyh@gcc.gnu.org> | 2012-02-20 23:43:31 +0000 |
commit | a4d031c79e899114f408bfa96ca3e3d934c31a7b (patch) | |
tree | ecc42fa4efdac72cf8b9746e66dae3721a9e7497 /gcc/trans-mem.c | |
parent | 6e887223a0bfe4e691107cc2a7d7fc3793cd93fd (diff) | |
download | gcc-a4d031c79e899114f408bfa96ca3e3d934c31a7b.zip gcc-a4d031c79e899114f408bfa96ca3e3d934c31a7b.tar.gz gcc-a4d031c79e899114f408bfa96ca3e3d934c31a7b.tar.bz2 |
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
Diffstat (limited to 'gcc/trans-mem.c')
-rw-r--r-- | gcc/trans-mem.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 %<transaction_safe%> function", t); + } return true; default: |