trans.c (assoc_to_constructor): Make sure Corresponding_Discriminant is only called...
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 2 May 2017 09:21:19 +0000 (09:21 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Tue, 2 May 2017 09:21:19 +0000 (11:21 +0200)
commit4ec7c4ec03148023c0d7ee29c46a8c79d36438b4
treedcbc0076f6b89fee7e1d0e1540b4e89bd0eab770
parent52e0a9f766c29557c52b6dbef536103d30d97e86
trans.c (assoc_to_constructor): Make sure Corresponding_Discriminant is only called on discriminants.

2017-05-02  Eric Botcazou  <ebotcazou@adacore.com>

* gcc-interface/trans.c (assoc_to_constructor): Make sure
Corresponding_Discriminant is only called on discriminants.
Skip the saving of the result only for them.
(gnat_to_gnu) <N_Selected_Component>: Likewise.
<N_Unchecked_Type_Conversion>: Translate the result type first.
(gigi): Set TREE_NOTHROW on Begin_Handler.
(stmt_list_cannot_raise_p): New predicate.
(Exception_Handler_to_gnu_gcc): Emit a simple final call instead of
a cleanup if the statements of the handler cannot raise.
(process_freeze_entity): Use Is_Record_Type.
(process_type): Likewise.

From-SVN: r247484
gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c