-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2000, Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2007, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
"not supported in Shared_Passive partitions",
Id);
+ -- Objects with default-initialized types will be rejected when
+ -- the initialization code is generated. However we must flag tasks
+ -- earlier on, to prevent expansion of stream attributes that is
+ -- bound to fail.
+
+ elsif Has_Task (T) then
+ Error_Msg_N
+ ("Shared_Passive partitions cannot contain tasks", Id);
+
-- Currently we do not support unconstrained record types, since we
-- use 'Write to write out values. This could probably be special
-- cased and handled in the future if necessary.