Commit 9733088f by Tristan Gingold Committed by Arnaud Charlet

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
parent 6f99dcec
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.
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment