summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_smem.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:47:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-06 10:47:17 +0000
commit715e035e9477bae8708dc45e18fd2e5178ec41e6 (patch)
treedc6a12f0e9ea29ec8674d2f9c770d1d98bce8f1a /gcc/ada/sem_smem.adb
parent9fad9fcc089e6e2a433429705e4212e1d9d89edb (diff)
downloadgcc-715e035e9477bae8708dc45e18fd2e5178ec41e6.tar.gz
2007-04-20 Ed Schonberg <schonberg@adacore.com>
* sem_smem.adb (Check_Shared_Var): Check explicitly for as task object, to prevent subsequent expansion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125461 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_smem.adb')
-rw-r--r--gcc/ada/sem_smem.adb11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ada/sem_smem.adb b/gcc/ada/sem_smem.adb
index 2682c88c7d4..6584867f843 100644
--- a/gcc/ada/sem_smem.adb
+++ b/gcc/ada/sem_smem.adb
@@ -6,7 +6,7 @@
-- --
-- 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- --
@@ -77,6 +77,15 @@ package body Sem_Smem is
"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.