diff mbox

[Ada] Fix ICE on component of complex as Out parameter

Message ID 48355810.RMBbOdfdxj@polaris
State New
Headers show

Commit Message

Eric Botcazou Dec. 20, 2015, 10:38 a.m. UTC
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  <ebotcazou@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  <ebotcazou@adacore.com>

	* gnat.dg/complex1.adb: New test.
	* gnat.dg/complex1_pkg.ads: New helper.
diff mbox

Patch

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,