[Ada] Crash on timed entry call with a delay given by a type conversion
authorEd Schonberg <schonberg@adacore.com>
Mon, 8 Jul 2019 08:13:48 +0000 (08:13 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 8 Jul 2019 08:13:48 +0000 (08:13 +0000)
commit1bb2e1d96eb23d2289765cd0fd9ef10b7a3b7ea3
treeb1108e19b45ac022aa019c1afef900cbf8b9c194
parent92c7734db7af1395be571c5ec023a38fb7b42adf
[Ada] Crash on timed entry call with a delay given by a type conversion

This patch fixes a compiler crash in the compiler on a timed entry call
whose delay expression is a type conversion, when FLoat_Overflow checks
are enabled.

2019-07-08  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* exp_ch9.adb (Expand_N_Timed_Entry_Call): Do not insert twice
the assignment statement that computes the delay value, to
prevent improper tree sharing when the value is a type
conversion and Float_Overflow checks are enabled.

gcc/testsuite/

* gnat.dg/entry1.adb, gnat.dg/entry1.ads: New testcase.

From-SVN: r273210
gcc/ada/ChangeLog
gcc/ada/exp_ch9.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/entry1.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/entry1.ads [new file with mode: 0644]