OSDN Git Service

* gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Feb 2012 10:41:10 +0000 (10:41 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Feb 2012 10:41:10 +0000 (10:41 +0000)
commita3b35344fdbeff504110ca9a62a8aad75061de45
treebf702654748c8ce1cea4e17b381a5fe5c9856517
parent6b5f97e1d12cb6bc16ba28958ecadef605e014f8
* gcc-interface/ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Add checking.
(TYPE_BY_REFERENCE_P): New flag.
(TYPE_IS_BY_REFERENCE_P): New macro.
(TYPE_DUMMY_P): Add checking and remove VOID_TYPE.
(TYPE_IS_DUMMY_P): Adjust for above change.
* gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_BY_REFERENCE_P
and TYPE_IS_BY_REFERENCE_P instead of TREE_ADDRESSABLE.
(gnat_to_gnu_param): Likewise.
(maybe_pad_type): Likewise.
(make_type_from_size): Use TYPE_IS_PACKED_ARRAY_TYPE_P.
* gcc-interface/misc.c (must_pass_by_ref): Use TYPE_IS_BY_REFERENCE_P
instead of TREE_ADDRESSABLE.
* gcc-interface/trans.c (finalize_nrv): Likewise.
(call_to_gnu): Likewise.  Do not create a temporary for return values
with by-reference type here.
(gnat_to_gnu): Test TYPE_IS_DUMMY_P instead of TYPE_DUMMY_P.
(gnat_gimplify_expr) <ADDR_EXPR>: Don't do anything for non-constant
CONSTRUCTORs and calls.
* gcc-interface/utils.c (make_dummy_type): Get the equivalent type of
the underlying type and use it throughout.  Use TYPE_IS_BY_REFERENCE_P
instead of TREE_ADDRESSABLE.
* gcc-interface/utils2.c (build_cond_expr): Deal with by-reference
types explicitly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184594 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/gcc-interface/ada-tree.h
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/misc.c
gcc/ada/gcc-interface/trans.c
gcc/ada/gcc-interface/utils.c
gcc/ada/gcc-interface/utils2.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/aggr19.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/aggr19_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/aggr19_pkg.ads [new file with mode: 0644]