aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2007-06-06 12:47:17 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-06-06 12:47:17 +0200
commitff6821917192a0e459c2b050723a2a66d4b2cb8f (patch)
treedc6a12f0e9ea29ec8674d2f9c770d1d98bce8f1a /gcc
parent13f34a3ff1be41d95ada5f840c25060072e7abf4 (diff)
downloadgcc-ff6821917192a0e459c2b050723a2a66d4b2cb8f.zip
gcc-ff6821917192a0e459c2b050723a2a66d4b2cb8f.tar.gz
gcc-ff6821917192a0e459c2b050723a2a66d4b2cb8f.tar.bz2
sem_smem.adb (Check_Shared_Var): Check explicitly for as task object, to prevent subsequent expansion.
2007-04-20 Ed Schonberg <schonberg@adacore.com> * sem_smem.adb (Check_Shared_Var): Check explicitly for as task object, to prevent subsequent expansion. From-SVN: r125461
Diffstat (limited to 'gcc')
-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 2682c88..6584867 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.