]> gcc.gnu.org Git - gcc.git/commit
Fix segfault on elaboration of empty 1-element array at -O
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 11 Nov 2020 13:52:45 +0000 (14:52 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 11 Nov 2020 13:52:45 +0000 (14:52 +0100)
commitec1b8711945e99677fe5b135d343781bc2e106ad
treeddffaa1186f42cf949f26c8ee1adb502a5d9e8b9
parent1c91516aeb8362696786e17f83d8366de9a31f81
Fix segfault on elaboration of empty 1-element array at -O

This is a rather obscure case where the elaboration of an empty array
whose base type is an array type of length at most 1 goes awry when
the code is compiled with optimization.

gcc/ada/ChangeLog:
* gcc-interface/trans.c (can_be_lower_p): Remove.
(Regular_Loop_to_gnu): Add ENTRY_COND unconditionally if
BOTTOM_COND is non-zero.

gcc/testsuite/ChangeLog:
* gnat.dg/opt89.adb: New test.
gcc/ada/gcc-interface/trans.c
gcc/testsuite/gnat.dg/opt89.adb [new file with mode: 0644]
This page took 0.069433 seconds and 6 git commands to generate.