From: Tristan Gingold Date: Fri, 23 Oct 2015 13:01:23 +0000 (+0000) Subject: utils2.c (build_call_alloc_dealloc): Check no implicit task and protected object... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9733088f6ab15a857474e6b66f4757e9710f1a37;p=gcc.git utils2.c (build_call_alloc_dealloc): Check no implicit task and protected object restrictions. 2015-10-23 Tristan Gingold * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit task and protected object restrictions. From-SVN: r229252 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 941ce252c76..28cc00cf8e0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2015-10-23 Tristan Gingold + + * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit + task and protected object restrictions. + 2015-10-23 Hristian Kirtchev * sem_ch12.adb, exp_ch6.adb: Minor reformatting. diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 13421b4f051..ce1a2f2dcb3 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); } }