aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/exp_smem.adb6
-rw-r--r--gcc/ada/sem_attr.adb11
2 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ada/exp_smem.adb b/gcc/ada/exp_smem.adb
index 65ed01e..6898cbe 100644
--- a/gcc/ada/exp_smem.adb
+++ b/gcc/ada/exp_smem.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2000 Free Software Foundation, Inc. --
+-- Copyright (C) 1998-2005 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- --
@@ -344,8 +344,6 @@ package body Exp_Smem is
New_Reference_To (S, Loc),
New_Occurrence_Of (Ent, Loc)));
- Set_OK_For_Stream (Atr, True);
-
Insert_After_And_Analyze (N,
Make_Subprogram_Body (Loc,
Specification =>
@@ -408,8 +406,6 @@ package body Exp_Smem is
New_Reference_To (S, Loc),
New_Occurrence_Of (Ent, Loc)));
- Set_OK_For_Stream (Atr, True);
-
Insert_After_And_Analyze (N,
Make_Subprogram_Body (Loc,
Specification =>
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 8780f6b..a391113 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -1244,7 +1244,8 @@ package body Sem_Attr is
Btyp := Implementation_Base_Type (P_Type);
-- Stream attributes not allowed on limited types unless the
- -- special OK_For_Stream flag is set.
+ -- stream attribute was generated by the expander (in which
+ -- case the underlying type will be used, as described in Sinfo).
if Is_Limited_Type (P_Type)
and then Comes_From_Source (N)
@@ -1460,10 +1461,14 @@ package body Sem_Attr is
-- There is no clean way to check this. That's not surprising,
-- the front end should not be doing this kind of test ???. The
-- way we do it is test for either "86" or "pentium" being in
- -- the string for the target name.
+ -- the string for the target name. However, we need to exclude
+ -- x86_64 for this check.
for J in T'First .. T'Last - 1 loop
- if T (J .. J + 1) = "86"
+ if (T (J .. J + 1) = "86"
+ and then
+ (J + 4 > T'Last
+ or else T (J + 2 .. J + 4) /= "_64"))
or else (J <= T'Last - 6
and then T (J .. J + 6) = "pentium")
then