[PATCH] Speed up get_ref_base_and_extent

Eric Botcazou ebotcazou@adacore.com
Wed Mar 28 20:40:00 GMT 2007

> I don't see that function - the closest match is convert_to_thin_pointer.

Sorry about that - not yet factored out, still in decl.c:gnat_to_gnu_entity:

	/* Create a record type for the object and its template and
	   set the template at a negative offset.  */
	tem = build_unc_object_type (gnu_template_type, tem,
				     create_concat_name (gnat_entity, "XUT"));
	  = size_binop (MINUS_EXPR, size_zero_node,
			byte_position (TREE_CHAIN (TYPE_FIELDS (tem))));
	DECL_FIELD_OFFSET (TREE_CHAIN (TYPE_FIELDS (tem))) = size_zero_node;
	  = bitsize_zero_node;
	TYPE_OBJECT_RECORD_TYPE (gnu_type) = tem;

The testcase I posted fails with both versions.

Eric Botcazou

More information about the Gcc-patches mailing list