aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-08-12 08:59:18 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-12 08:59:18 +0000
commit1361a4fbe10d119c76339f06992ac60de54f124d (patch)
treea5e0312929d92335c340069f16d6098fbc1a2393 /gcc/tree.c
parent935b02aea97d8d2aa40e65e908228c4666cb1803 (diff)
downloadgcc-1361a4fbe10d119c76339f06992ac60de54f124d.zip
gcc-1361a4fbe10d119c76339f06992ac60de54f124d.tar.gz
gcc-1361a4fbe10d119c76339f06992ac60de54f124d.tar.bz2
[Ada] Fix leak of Do_Range_Check flag in -gnatVa mode
This fixes a small glitch in Insert_Valid_Check, which needs to propagate the Do_Range_Check flag onto the rewritten expression, but uses its Original_Node as the source of the copy. Now Original_Node does not necessarily point to the node that was just rewritten, but to the ultimately original node, which is not the same node if the expression was rewritten multiple times. The end result is that a stalled Do_Range_Check flag can be wrongly resintated and leak to the code generator. 2019-08-12 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * checks.adb (Insert_Valid_Check): Do not retrieve the Do_Range_Check flag from the Original_Node but from the Validated_Object. Remove useless bypass for floating-point types. gcc/testsuite/ * gnat.dg/range_check7.adb: New testcase. From-SVN: r274285
Diffstat (limited to 'gcc/tree.c')
0 files changed, 0 insertions, 0 deletions