Commit 4c5a0615 by Eric Botcazou Committed by Eric Botcazou

decl.c (gnat_to_gnu_entity): Fix formatting.

	* gcc-interface/decl.c (gnat_to_gnu_entity): Fix formatting.
	* gcc-interface/utils.c (create_field_decl): Avoid superfluous work.

From-SVN: r138440
parent 90d245c5
2008-07-31 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Fix formatting.
* gcc-interface/utils.c (create_field_decl): Avoid superfluous work.
2008-07-31 Pascal Obry <obry@adacore.com> 2008-07-31 Pascal Obry <obry@adacore.com>
* prj-nmsc.adb: Keep Object and Exec directory casing. * prj-nmsc.adb: Keep Object and Exec directory casing.
...@@ -3062,7 +3062,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -3062,7 +3062,7 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* Discard old fields that are outside the new type. /* Discard old fields that are outside the new type.
This avoids confusing code scanning it to decide This avoids confusing code scanning it to decide
how to pass it to functions on some platforms. */ how to pass it to functions on some platforms. */
if (TREE_CODE (gnu_new_pos) == INTEGER_CST if (TREE_CODE (gnu_new_pos) == INTEGER_CST
&& TREE_CODE (TYPE_SIZE (gnu_type)) == INTEGER_CST && TREE_CODE (TYPE_SIZE (gnu_type)) == INTEGER_CST
&& !integer_zerop (gnu_size) && !integer_zerop (gnu_size)
......
...@@ -1755,7 +1755,7 @@ create_field_decl (tree field_name, tree field_type, tree record_type, ...@@ -1755,7 +1755,7 @@ create_field_decl (tree field_name, tree field_type, tree record_type,
of a copy. This is the case for true bitfields, but the DECL_BIT_FIELD of a copy. This is the case for true bitfields, but the DECL_BIT_FIELD
value we have at this point is not accurate enough, so we don't account value we have at this point is not accurate enough, so we don't account
for this here and let finish_record_type decide. */ for this here and let finish_record_type decide. */
if (!type_for_nonaliased_component_p (field_type)) if (!addressable && !type_for_nonaliased_component_p (field_type))
addressable = 1; addressable = 1;
DECL_NONADDRESSABLE_P (field_decl) = !addressable; DECL_NONADDRESSABLE_P (field_decl) = !addressable;
......
2008-07-31 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/discr10.ad[sb]: New test.
2008-07-31 Jakub Jelinek <jakub@redhat.com> 2008-07-31 Jakub Jelinek <jakub@redhat.com>
PR target/35100 PR target/35100
......
package body Discr10 is
function Get (X : R) return R is
begin
return R'(D1 => False, D2 => False, D3 => X.D3);
end;
end Discr10;
package Discr10 is
subtype Index is Natural range 0 .. 150;
type List is array (Index range <>) of Integer;
type R (D1 : Boolean := True; D2 : Boolean := False; D3 : Index := 0) is
record
case D2 is
when True =>
L : List (1 .. D3);
case D1 is
when True => I : Integer;
when False => null;
end case;
when False =>
null;
end case;
end record;
function Get (X : R) return R;
end Discr10;
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