Commit 7d9979e6 by Eric Botcazou Committed by Eric Botcazou

decl.c (components_to_record): Restrict the previous change to fields with variable size.

	* gcc-interface/decl.c (components_to_record): Restrict the previous
	change to fields with variable size.

From-SVN: r234696
parent ddd6d421
2016-04-02 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Restrict the previous
change to fields with variable size.
2016-03-27 Eric Botcazou <ebotcazou@adacore.com> 2016-03-27 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (components_to_record): Add special case for * gcc-interface/decl.c (components_to_record): Add special case for
single field with representation clause at offset 0. single field with representation clause at offset 0.
2016-03-16 Svante Signell <svante.signell@gmail.com> 2016-03-16 Svante Signell <svante.signell@gmail.com>
......
...@@ -7606,13 +7606,15 @@ components_to_record (tree gnu_record_type, Node_Id gnat_component_list, ...@@ -7606,13 +7606,15 @@ components_to_record (tree gnu_record_type, Node_Id gnat_component_list,
if (p_gnu_rep_list && gnu_rep_list) if (p_gnu_rep_list && gnu_rep_list)
*p_gnu_rep_list = chainon (*p_gnu_rep_list, gnu_rep_list); *p_gnu_rep_list = chainon (*p_gnu_rep_list, gnu_rep_list);
/* If only one field has a rep clause and it starts at 0, put back the field /* Deal with the annoying case of an extension of a record with variable size
at the head of the regular field list. This will avoid creating a useless and partial rep clause, for which the _Parent field is forced at offset 0
REP part below and deal with the annoying case of an extension of a record and has variable size, which we do not support below. Note that we cannot
with variable size and rep clause, for which the _Parent field is forced do it if the field has fixed size because we rely on the presence of the
at offset 0 and has variable size, which we do not support below. */ REP part built below to trigger the reordering of the fields in a derived
record type when all the fields have a fixed position. */
else if (gnu_rep_list else if (gnu_rep_list
&& !DECL_CHAIN (gnu_rep_list) && !DECL_CHAIN (gnu_rep_list)
&& TREE_CODE (DECL_SIZE (gnu_rep_list)) != INTEGER_CST
&& !variants_have_rep && !variants_have_rep
&& first_free_pos && first_free_pos
&& integer_zerop (first_free_pos) && integer_zerop (first_free_pos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment