From 4ee27193ec6d9e19751d24c8302f051ac979cad6 Mon Sep 17 00:00:00 2001 From: Robert Dewar Date: Tue, 15 Mar 2005 17:01:34 +0100 Subject: [PATCH] exp_smem.adb, [...]: Remove OK_For_Stream flag, not used, not needed. 2005-03-08 Robert Dewar * exp_smem.adb, sem_attr.adb: Remove OK_For_Stream flag, not used, not needed. Add documentation to replace the use of this flag Fix kludge for Maximum_Alignment on x86 so that it does not apply to the x86_64. From-SVN: r96496 --- gcc/ada/exp_smem.adb | 6 +----- gcc/ada/sem_attr.adb | 11 ++++++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gcc/ada/exp_smem.adb b/gcc/ada/exp_smem.adb index 65ed01e4a57..6898cbea354 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 8780f6b08f8..a3911138a0b 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