Patchwork [Ada] Small adjustment in gigi

login
register
mail settings
Submitter Eric Botcazou
Date Sept. 19, 2010, 1:49 p.m.
Message ID <201009191549.11821.ebotcazou@adacore.com>
Download mbox | patch
Permalink /patch/65161/
State New
Headers show

Comments

Eric Botcazou - Sept. 19, 2010, 1:49 p.m.
This adjusts the type of the incomplete type, aka dummy type, built by gigi 
when fat pointers are being defined under certain circumstances.

Tested on i586-suse-linux, applied on the mainline.


2010-09-19  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Use record
	type instead of enumeral type as the dummy type built for the template
	type of fat pointers.

Patch

Index: gcc-interface/decl.c
===================================================================
--- gcc-interface/decl.c	(revision 164416)
+++ gcc-interface/decl.c	(working copy)
@@ -3558,7 +3558,7 @@  gnat_to_gnu_entity (Entity_Id gnat_entit
 	    gnu_type = TYPE_POINTER_TO (gnu_desig_type);
 	    if (!gnu_type)
 	      {
-		tree gnu_template_type = make_node (ENUMERAL_TYPE);
+		tree gnu_template_type = make_node (RECORD_TYPE);
 		tree gnu_ptr_template = build_pointer_type (gnu_template_type);
 		tree gnu_array_type = make_node (ENUMERAL_TYPE);
 		tree gnu_ptr_array = build_pointer_type (gnu_array_type);