summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog42
-rw-r--r--gcc/ada/sem_ch6.adb14
-rw-r--r--gcc/ada/sinfo.ads4
-rw-r--r--gcc/ada/uintp.adb2
4 files changed, 50 insertions, 12 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index b538ecfc8f3..2533fd336b5 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,45 @@
+2012-08-06 Robert Dewar <dewar@adacore.com>
+
+ * sem_ch6.adb: Remove useless flag Body_Deleted.
+
+2012-08-06 Thomas Quinot <quinot@adacore.com>
+
+ * sinfo.ads (End_Span): Change default from No_Uint to Uint_0,
+ as this is what all usage occurrences of this attribute are
+ expecting.
+ * uintp.adb (UI_To_Int): Add assertion to guard against calling
+ with No_Uint.
+
+2012-08-06 Vincent Pucci <pucci@adacore.com>
+
+PR ada/54125
+ * exp_attr.adb (Expand_N_Attribute_Reference): Expand new
+ Atomic_Always_Lock_Free attribute.
+ * sem_attr.adb (Analyze_Attribute): Analyze new
+ Atomic_Always_Lock_Free attribute.
+ (Eval_Attribute): Nothing to do with new Atomic_Always_Lock_Free
+ attribute.
+ * sem_ch9.adb (Allows_Lock_Free_Implementation):
+ Support_Atomic_Primitives check replaces previous erroneous
+ size check.
+ * sem_util.adb, sem_util.ads (Support_Atomic_Primitives):
+ New routine.
+ * snames.ads-tmpl: New name Name_Atomic_Always_Lock_Free and
+ new attribute Attribute_Atomic_Always_Lock_Free defined.
+ * s-atopri.adb: Support_Atomic_Primitives checks replaced by
+ Atomic_Always_Lock_Free queries.
+ * system-aix64.ads, system-aix.ads, system-darwin-ppc.ads,
+ system-hpux.ads, system-linux-alpha.ads, system-linux-hppa.ads,
+ system-linux-ppc.ads, system-linux-s390.ads,
+ system-linux-s390x.ads, system-linux-sh4.ads,
+ system-linux-sparc.ads, system-lynxos178-ppc.ads,
+ system-lynxos-ppc.ads, system-mingw.ads,
+ system-vxworks-arm.ads, system-solaris-sparc.ads,
+ system-solaris-sparcv9.ads, system-vms_64.ads,
+ system-vxworks-m68k.ads, system-vxworks-mips.ads,
+ system-vxworks-ppc.ads, system-vxworks-sparcv9.ads: Flag
+ Support_Atomic_Primitives removed.
+
2012-08-06 Hristian Kirtchev <kirtchev@adacore.com>
* sem_mech.adb (Set_Mechanisms): OUT and IN OUT parameters are
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index 5f061616ee3..d48dd10e524 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -1804,7 +1804,6 @@ package body Sem_Ch6 is
procedure Analyze_Subprogram_Body_Helper (N : Node_Id) is
Loc : constant Source_Ptr := Sloc (N);
- Body_Deleted : constant Boolean := False;
Body_Spec : constant Node_Id := Specification (N);
Body_Id : Entity_Id := Defining_Entity (Body_Spec);
Prev_Id : constant Entity_Id := Current_Entity_In_Scope (Body_Id);
@@ -2076,9 +2075,8 @@ package body Sem_Ch6 is
Set_Has_Missing_Return (Id);
end if;
- elsif (Is_Generic_Subprogram (Id)
- or else not Is_Machine_Code_Subprogram (Id))
- and then not Body_Deleted
+ elsif Is_Generic_Subprogram (Id)
+ or else not Is_Machine_Code_Subprogram (Id)
then
Error_Msg_N ("missing RETURN statement in function body", N);
end if;
@@ -3133,13 +3131,9 @@ package body Sem_Ch6 is
end loop;
end if;
- -- Check references in body unless it was deleted. Note that the
- -- check of Body_Deleted here is not just for efficiency, it is
- -- necessary to avoid junk warnings on formal parameters.
+ -- Check references in body
- if not Body_Deleted then
- Check_References (Body_Id);
- end if;
+ Check_References (Body_Id);
end;
end Analyze_Subprogram_Body_Helper;
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index ec8e9aedeff..50135afca2a 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -4119,7 +4119,7 @@ package Sinfo is
-- Then_Statements (List2)
-- Elsif_Parts (List3) (set to No_List if none present)
-- Else_Statements (List4) (set to No_List if no else part present)
- -- End_Span (Uint5) (set to No_Uint if expander generated)
+ -- End_Span (Uint5) (set to Uint_0 if expander generated)
-- N_Elsif_Part
-- Sloc points to ELSIF
@@ -4151,7 +4151,7 @@ package Sinfo is
-- Sloc points to CASE
-- Expression (Node3)
-- Alternatives (List4)
- -- End_Span (Uint5) (set to No_Uint if expander generated)
+ -- End_Span (Uint5) (set to Uint_0 if expander generated)
-- Note: Before Ada 2012, a pragma in a statement sequence is always
-- followed by a statement, and this is true in the tree even in Ada
diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb
index ce7436ffccd..a98bd9f376b 100644
--- a/gcc/ada/uintp.adb
+++ b/gcc/ada/uintp.adb
@@ -2213,6 +2213,8 @@ package body Uintp is
----------------
function UI_To_Int (Input : Uint) return Int is
+ pragma Assert (Input /= No_Uint);
+
begin
if Direct (Input) then
return Direct_Val (Input);