diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2021-03-19 09:21:11 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2021-03-19 09:25:23 +0100 |
commit | b980edba506442c846cc779243ceeffd13065740 (patch) | |
tree | 0cc3db8d427a637ef5e93d1ac113907e6e4e971c /gcc/tree-vect-slp-patterns.c | |
parent | 287e3e8466f44f9d395a2e4dcfcda56cc34ceb1c (diff) | |
download | gcc-b980edba506442c846cc779243ceeffd13065740.zip gcc-b980edba506442c846cc779243ceeffd13065740.tar.gz gcc-b980edba506442c846cc779243ceeffd13065740.tar.bz2 |
Fix segfault during encoding of CONSTRUCTORs
The segfault occurs in native_encode_initializer when it is encoding the
CONSTRUCTOR for an array whose lower bound is negative (it's OK in Ada).
The computation of the current position is done in HOST_WIDE_INT and this
does not work for arrays whose original range has a negative lower bound
and a positive upper bound; the computation must be done in sizetype
instead so that it may wrap around.
gcc/
PR middle-end/99641
* fold-const.c (native_encode_initializer) <CONSTRUCTOR>: For an
array type, do the computation of the current position in sizetype.
Diffstat (limited to 'gcc/tree-vect-slp-patterns.c')
0 files changed, 0 insertions, 0 deletions