[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Thu, 14 Jun 2012 10:46:14 +0000 (12:46 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 14 Jun 2012 10:46:14 +0000 (12:46 +0200)
2012-06-14  Gary Dismukes  <dismukes@adacore.com>

* exp_ch9.adb: Minor reformatting.

2012-06-14  Thomas Quinot  <quinot@adacore.com>

* freeze.adb (Freeze_Record_Type): Warn about useless bit order
specification [when there's no component clause] regardless
of whether the specified bit order is reversed or not.

2012-06-14  Tristan Gingold  <gingold@adacore.com>

* raise-gcc.c (__gnat_personality_seh0): New function.

2012-06-14  Tristan Gingold  <gingold@adacore.com>

* gnatname.adb (Gnatname): Make sure that dynamic table
argument_data is initialized.

2012-06-14  Robert Dewar  <dewar@adacore.com>

* sem_aux.adb: Minor code reorganization.

From-SVN: r188608

gcc/ada/ChangeLog
gcc/ada/exp_ch9.adb
gcc/ada/freeze.adb
gcc/ada/gnatname.adb
gcc/ada/raise-gcc.c
gcc/ada/sem_aux.adb

index 4fa567771cbece9f59a0cd224ab114f7dbf285c3..3efe1d536d27990d3fa6545a372e0295b52061f7 100644 (file)
@@ -1,3 +1,26 @@
+2012-06-14  Gary Dismukes  <dismukes@adacore.com>
+
+       * exp_ch9.adb: Minor reformatting.
+
+2012-06-14  Thomas Quinot  <quinot@adacore.com>
+
+       * freeze.adb (Freeze_Record_Type): Warn about useless bit order
+       specification [when there's no component clause] regardless
+       of whether the specified bit order is reversed or not.
+
+2012-06-14  Tristan Gingold  <gingold@adacore.com>
+
+       * raise-gcc.c (__gnat_personality_seh0): New function.
+
+2012-06-14  Tristan Gingold  <gingold@adacore.com>
+
+       * gnatname.adb (Gnatname): Make sure that dynamic table
+       argument_data is initialized.
+
+2012-06-14  Robert Dewar  <dewar@adacore.com>
+
+       * sem_aux.adb: Minor code reorganization.
+
 2012-06-14  Vincent Pucci  <pucci@adacore.com>
 
        * einfo.adb einfo.ads (Get_Rep_Item): Removed.
index 3f622beeac1400e5fd0220008c4deb92e8870082..c340baf85d893285f1f4b615a3c093b4139e25a0 100644 (file)
@@ -13668,7 +13668,7 @@ package body Exp_Ch9 is
       Args := New_List;
 
       --  Priority parameter. Set to Unspecified_Priority unless there is a
-      --  priority rep item, in which case we take the value from the rep item.
+      --  Priority rep item, in which case we take the value from the rep item.
 
       if Has_Rep_Item (Ttyp, Name_Priority) then
          Append_To (Args,
index 6dd00b3c984cfa74b126537202941c16f33c2723..e58dac5a589437354fd19444c474bc11a4f47312 100644 (file)
@@ -2168,20 +2168,23 @@ package body Freeze is
 
          --  Deal with Bit_Order aspect specifying a non-default bit order
 
-         if Reverse_Bit_Order (Rec) and then Base_Type (Rec) = Rec then
+         ADC :=
+           Get_Attribute_Definition_Clause (Rec, Attribute_Bit_Order);
+
+         if Present (ADC) and then Base_Type (Rec) = Rec then
             if not Placed_Component then
-               ADC :=
-                 Get_Attribute_Definition_Clause (Rec, Attribute_Bit_Order);
                Error_Msg_N ("?bit order specification has no effect", ADC);
                Error_Msg_N
                  ("\?since no component clauses were specified", ADC);
 
             --  Here is where we do the processing for reversed bit order
 
-            elsif not Reverse_Storage_Order (Rec) then
+            elsif Reverse_Bit_Order (Rec)
+                    and then not Reverse_Storage_Order (Rec)
+            then
                Adjust_Record_For_Reverse_Bit_Order (Rec);
 
-            --  Case where we have both a reverse Bit_Order and a corresponding
+            --  Case where we have both an explicit Bit_Order and the same
             --  Scalar_Storage_Order: leave record untouched, the back-end
             --  will take care of required layout conversions.
 
index c741834ec29a58bf1731769a27c99daecd9f9372..68375ef21db4edcddf86264da19231fdf16881c5 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 2001-2011, Free Software Foundation, Inc.         --
+--          Copyright (C) 2001-2012, 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- --
@@ -575,7 +575,15 @@ begin
    --  Initialize tables
 
    Arguments.Set_Last (0);
-   Arguments.Increment_Last;
+   declare
+      New_Arguments : Argument_Data;
+      pragma Warnings (Off, New_Arguments);
+      --  Declaring this defaulted initialized object ensures
+      --  that the new allocated component of table Arguments
+      --  is correctly initialized.
+   begin
+      Arguments.Append (New_Arguments);
+   end;
    Patterns.Init (Arguments.Table (1).Directories);
    Patterns.Set_Last (Arguments.Table (1).Directories, 0);
    Patterns.Init (Arguments.Table (1).Name_Patterns);
index b29d3b535a98f41f5a36e612fe266c6864e1c625..1cfb622434951460f3efa7b1165fd3bb537b3bef 100644 (file)
@@ -1026,6 +1026,8 @@ extern void __gnat_notify_unhandled_exception (void);
 
 #ifdef __USING_SJLJ_EXCEPTIONS__
 #define PERSONALITY_FUNCTION    __gnat_personality_sj0
+#elif defined(__SEH__)
+#define PERSONALITY_FUNCTION    __gnat_personality_imp
 #else
 #define PERSONALITY_FUNCTION    __gnat_personality_v0
 #endif
@@ -1061,6 +1063,9 @@ typedef int version_arg_t;
 typedef _Unwind_Action phases_arg_t;
 #endif
 
+#ifdef __SEH__
+static
+#endif
 _Unwind_Reason_Code
 PERSONALITY_FUNCTION (version_arg_t, phases_arg_t,
                       _Unwind_Exception_Class, _Unwind_Exception *,
@@ -1208,6 +1213,16 @@ __gnat_Unwind_ForcedUnwind (_Unwind_Exception *e,
 
 #endif /* __USING_SJLJ_EXCEPTIONS__ */
 
+#ifdef __SEH__
+EXCEPTION_DISPOSITION
+__gnat_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame,
+                        PCONTEXT ms_orig_context,
+                        PDISPATCHER_CONTEXT ms_disp)
+{
+  return _GCC_specific_handler (ms_exc, this_frame, ms_orig_context,
+                               ms_disp, __gnat_personality_imp);
+}
+#endif /* SEH */
 #else
 /* ! IN_RTS  */
 
index d08fa452d6452d4dd828b6d255b76c681f0532ee..d729519003e761d2f3c16445e537e6b012b6f199 100644 (file)
@@ -464,10 +464,7 @@ package body Sem_Aux is
                 or else (Nam = Name_Priority
                           and then Chars (N) = Name_Interrupt_Priority))
          then
-            if Check_Parents then
-               return N;
-
-            elsif Entity (N) = E then
+            if Check_Parents or else Entity (N) = E then
                return N;
             end if;
 
@@ -524,10 +521,7 @@ package body Sem_Aux is
                   --  This node represents the parent type of type E (if any)
 
                begin
-                  if No (Par) then
-                     return N;
-
-                  elsif not Present_In_Rep_Item (Par, N) then
+                  if No (Par) or else not Present_In_Rep_Item (Par, N) then
                      return N;
                   end if;
                end;