* gcc-interface/decl.c (gnat_to_gnu_entity): Fix formatting.
* gcc-interface/utils.c (create_field_decl): Avoid superfluous work.
From-SVN: r138440
+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>
* prj-nmsc.adb: Keep Object and Exec directory casing.
/* Discard old fields that are outside the new type.
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
&& TREE_CODE (TYPE_SIZE (gnu_type)) == INTEGER_CST
&& !integer_zerop (gnu_size)
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
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;
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>
PR target/35100
--- /dev/null
+package body Discr10 is
+
+ function Get (X : R) return R is
+ begin
+ return R'(D1 => False, D2 => False, D3 => X.D3);
+ end;
+
+end Discr10;
--- /dev/null
+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;