diff options
author | Tristan Gingold <gingold@adacore.com> | 2015-10-23 13:01:23 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-23 15:01:23 +0200 |
commit | 9733088f6ab15a857474e6b66f4757e9710f1a37 (patch) | |
tree | 1037042989730774aecb88482c90ea06c6ea176f /gcc/ada/gcc-interface/utils2.c | |
parent | 6f99dcec636ac8bd0aec5ff9eec9cc6627d4889e (diff) | |
download | gcc-9733088f6ab15a857474e6b66f4757e9710f1a37.zip gcc-9733088f6ab15a857474e6b66f4757e9710f1a37.tar.gz gcc-9733088f6ab15a857474e6b66f4757e9710f1a37.tar.bz2 |
utils2.c (build_call_alloc_dealloc): Check no implicit task and protected object restrictions.
2015-10-23 Tristan Gingold <gingold@adacore.com>
* gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
task and protected object restrictions.
From-SVN: r229252
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 13421b4..ce1a2f2 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -2329,8 +2329,13 @@ build_call_alloc_dealloc (tree gnu_obj, tree gnu_size, tree gnu_type, /* Check that we aren't violating the associated restriction. */ if (!(Nkind (gnat_node) == N_Allocator && Comes_From_Source (gnat_node))) - Check_No_Implicit_Heap_Alloc (gnat_node); - + { + Check_No_Implicit_Heap_Alloc (gnat_node); + if (Has_Task (Etype (gnat_node))) + Check_No_Implicit_Task_Alloc (gnat_node); + if (Has_Protected (Etype (gnat_node))) + Check_No_Implicit_Protected_Alloc (gnat_node); + } return maybe_wrap_malloc (gnu_size, gnu_type, gnat_node); } } |