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
This commit is contained in:
parent
90d245c562
commit
4c5a06150c
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@ -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.
|
||||
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)
|
||||
|
@ -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
|
||||
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;
|
||||
|
@ -1,3 +1,7 @@
|
||||
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
|
||||
|
8
gcc/testsuite/gnat.dg/discr10.adb
Normal file
8
gcc/testsuite/gnat.dg/discr10.adb
Normal file
@ -0,0 +1,8 @@
|
||||
package body Discr10 is
|
||||
|
||||
function Get (X : R) return R is
|
||||
begin
|
||||
return R'(D1 => False, D2 => False, D3 => X.D3);
|
||||
end;
|
||||
|
||||
end Discr10;
|
23
gcc/testsuite/gnat.dg/discr10.ads
Normal file
23
gcc/testsuite/gnat.dg/discr10.ads
Normal file
@ -0,0 +1,23 @@
|
||||
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;
|
Loading…
Reference in New Issue
Block a user