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
+2015-10-23 Tristan Gingold <gingold@adacore.com>
+
+ * gcc-interface/utils2.c (build_call_alloc_dealloc): Check no implicit
+ task and protected object restrictions.
+
2015-10-23 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch12.adb, exp_ch6.adb: Minor reformatting.
/* 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);
}
}