diff options
-rw-r--r-- | gcc/ada/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 19 | ||||
-rw-r--r-- | gcc/ada/gnat_ugn.texi | 4 | ||||
-rw-r--r-- | gcc/ada/sem_util.adb | 3 | ||||
-rw-r--r-- | gcc/ada/vms_data.ads | 8 |
5 files changed, 43 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c3c02be..17fba32 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,16 @@ 2010-06-17 Ed Schonberg <schonberg@adacore.com> + * exp_ch4.adb: expand NOT for VMS types. + * sem_util.adb: Use OpenVMS_On_Target for IS_VMS_Operator. + +2010-06-17 Sergey Rybin <rybin@adacore.com> + + * vms_data.ads: Add qualifier for '--no-elim-dispatch' gnatelim option. + * gnat_ugn.texi (gnatelim): add description for --no-elim-dispatch + option. + +2010-06-17 Ed Schonberg <schonberg@adacore.com> + * exp_ch6.adb (Expand_Call): Do not expand a call to an internal protected operation if the subprogram has been eliminated. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 99e8fc0..5174be4 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -6631,7 +6631,7 @@ package body Exp_Ch4 is --------------------- -- If the argument is other than a Boolean array type, there is no special - -- expansion required. + -- expansion required, except for VMS operations on signed integers. -- For the packed case, we call the special routine in Exp_Pakd, except -- that if the component size is greater than one, we use the standard @@ -6681,6 +6681,23 @@ package body Exp_Ch4 is return; end if; + -- For the VMS "not" on signed integer types, use conversion to and + -- from a predefined modular type. + + if Is_VMS_Operator (Entity (N)) then + declare + LI : constant Entity_Id := RTE (RE_Unsigned_64); + + begin + Rewrite (N, + Unchecked_Convert_To (Typ, + (Make_Op_Not (Loc, + Right_Opnd => Unchecked_Convert_To (LI, Right_Opnd (N)))))); + Analyze_And_Resolve (N, Typ); + return; + end; + end if; + -- Only array types need any other processing if not Is_Array_Type (Typ) then diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 4a2bdbb..c36b283 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -10727,6 +10727,10 @@ is named @file{gnatelim.log} and is located in the current directory. @cindex @option{^-log^/LOGFILE^} (@command{gnatelim}) Duplicate all the output sent to @file{stderr} into a specified log file. +@cindex @option{^--no-elim-dispatch^/NO_DISPATCH^} (@command{gnatelim}) +@item ^--no-elim-dispatch^/NO_DISPATCH^ +Do not generate pragmas for dispatching operations. + @cindex @option{^-o^/OUTPUT^} (@command{gnatelim}) @item ^-o^/OUTPUT^=@var{report_file} Put @command{gnatelim} output into a specified file. If this file already exists, diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 927688c..a47e739 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -7034,7 +7034,8 @@ package body Sem_Util is begin return Ekind (Op) = E_Function and then Is_Intrinsic_Subprogram (Op) - and then Scope (Op) = System_Aux_Id; + and then Chars (Scope (Scope (Op))) = Name_System + and then OpenVMS_On_Target; end Is_VMS_Operator; ----------------- diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads index 7a87c4a..9d1443e 100644 --- a/gcc/ada/vms_data.ads +++ b/gcc/ada/vms_data.ads @@ -3597,6 +3597,13 @@ package VMS_Data is -- HIGH A great number of messages are output, most of them not -- being useful for the user. + S_Elim_Nodisp : aliased constant S := "/NO_DISPATCH " & + "--no-elim-dispatch"; + -- /NONO_DISPATCH (D) + -- /NO_DISPATCH + -- + -- Do not generate pragmas for dispatching operations. + S_Elim_Project : aliased constant S := "/PROJECT_FILE=<" & "-P>"; -- /PROJECT_FILE=filename @@ -3709,6 +3716,7 @@ package VMS_Data is S_Elim_Logfile 'Access, S_Elim_Main 'Access, S_Elim_Mess 'Access, + S_Elim_Nodisp 'Access, S_Elim_Out 'Access, S_Elim_Project 'Access, S_Elim_Quiet 'Access, |