diff mbox

[Ada] Small adjustment in gigi

Message ID 201009191549.11821.ebotcazou@adacore.com
State New
Headers show

Commit Message

Eric Botcazou Sept. 19, 2010, 1:49 p.m. UTC
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.
diff mbox

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);