This is a regression present on the mainline only, a small oversight in the
overhaul of the implementation of renaming.
Tested on x86_64-suse-linux, applied on the mainline.
2015-12-20 Eric Botcazou <ebotca...@adacore.com>
* gcc-interface/utils2.c (gnat_rewrite_reference) <REALPART_EXPR>: New
case identical to FLOAT_EXPR.
<IMAGPART_EXPR>: Likewise.
2015-12-20 Eric Botcazou <ebotca...@adacore.com>
* gnat.dg/complex1.adb: New test.
* gnat.dg/complex1_pkg.ads: New helper.
--
Eric Botcazou
Index: gcc-interface/utils2.c
===================================================================
--- gcc-interface/utils2.c (revision 231856)
+++ gcc-interface/utils2.c (working copy)
@@ -2664,6 +2664,8 @@ gnat_rewrite_reference (tree ref, rewrit
CASE_CONVERT:
case FLOAT_EXPR:
case FIX_TRUNC_EXPR:
+ case REALPART_EXPR:
+ case IMAGPART_EXPR:
case VIEW_CONVERT_EXPR:
result
= build1 (code, type,
-- { dg-do compile }
with Ada.Numerics.Complex_types; use Ada.Numerics.Complex_types;
with Complex1_Pkg; use Complex1_Pkg;
procedure Complex1 is
Z : Complex;
begin
Coord (Z.Re, Z.Im);
end;
package Complex1_Pkg is
procedure Coord (x,y : out Float);
end Complex1_Pkg;