]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Thu, 21 Apr 2016 09:12:45 +0000 (11:12 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 21 Apr 2016 09:12:45 +0000 (11:12 +0200)
2016-04-21  Philippe Gil  <gil@adacore.com>

* krunch.adb (Krunch): Fix krunching of i-java.

2016-04-21  Arnaud Charlet  <charlet@adacore.com>

* exp_ch8.adb (Evaluation_Required): Always return
True when Modify_Tree_For_C.

From-SVN: r235320

gcc/ada/ChangeLog
gcc/ada/exp_ch8.adb
gcc/ada/krunch.adb

index ced75bf61e0450d124d828f429c14abcb2d9da4c..c06c004f2c9f4ae2ba6a4bd6a2ab515ae52c5ca8 100644 (file)
@@ -1,3 +1,12 @@
+2016-04-21  Philippe Gil  <gil@adacore.com>
+
+       * krunch.adb (Krunch): Fix krunching of i-java.
+
+2016-04-21  Arnaud Charlet  <charlet@adacore.com>
+
+       * exp_ch8.adb (Evaluation_Required): Always return
+       True when Modify_Tree_For_C.
+
 2016-04-21  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gnatlink.adb (Gnatlink): Robustify detection of Windows target.
index dfd1796ac77a6453ef34dae7fe70b553e74c62d7..9e06db274175aaa0509263ecb0d5e3c7aaac2c98 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 B o d y                                  --
 --                                                                          --
---          Copyright (C) 1992-2015, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2016, 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- --
@@ -116,6 +116,8 @@ package body Exp_Ch8 is
       --  interested in these operations if they occur as part of the name
       --  itself, subscripts are just values that are computed as part of the
       --  evaluation, so their form is unimportant.
+      --  In addition, always return True for Modify_Tree_For_C since the
+      --  code generator doesn't know how to handle renamings.
 
       -------------------------
       -- Evaluation_Required --
@@ -123,7 +125,10 @@ package body Exp_Ch8 is
 
       function Evaluation_Required (Nam : Node_Id) return Boolean is
       begin
-         if Nkind_In (Nam, N_Indexed_Component, N_Slice) then
+         if Modify_Tree_For_C then
+            return True;
+
+         elsif Nkind_In (Nam, N_Indexed_Component, N_Slice) then
             if Is_Packed (Etype (Prefix (Nam))) then
                return True;
             else
index 12b8f7137114a7f274143cc7dc78a83ff99473a6..a4e0caba3cb7786845fe565e7cec415cf0c4247c 100644 (file)
@@ -107,6 +107,7 @@ begin
         or else (Curlen =  9 and then Buffer (3 ..  9) = "fortran")
         or else (Curlen = 16 and then Buffer (3 .. 16) = "packed_decimal")
         or else (Curlen >  8 and then Buffer (3 ..  9) = "vxworks")
+        or else (Curlen >  5 and then Buffer (3 ..  6) = "java")
       then
          Krlen := 8;
       else