diff options
author | Bob Duff <duff@adacore.com> | 2021-05-12 11:56:47 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2021-05-12 12:15:55 +0200 |
commit | ac18ded230f1559f271f8d66121b2f16805f0b27 (patch) | |
tree | f4bd24814c747e04b2268d864479cdada523bfbb /gcc/omp-low.c | |
parent | 3835aa0eb90292d652dd6b200f302f3cac7e643f (diff) | |
download | gcc-ac18ded230f1559f271f8d66121b2f16805f0b27.zip gcc-ac18ded230f1559f271f8d66121b2f16805f0b27.tar.gz gcc-ac18ded230f1559f271f8d66121b2f16805f0b27.tar.bz2 |
Fix uninitialized variable in Atree.Size_In_Slots
Size_In_Slots uses the Nkind to look up the size in a table indexed
by Nkind. This patch fixes a couple of places where the Nkind is
wrong (uninitialized or zeroed out) so Size_In_Slots cannot be used.
gcc/ada/
PR ada/100564
* atree.adb (Change_Node): Do not call Zero_Slots on a Node_Id
when the Nkind has not yet been set; call the other Zero_Slots
that takes a range of slot offsets. Call the new Mutate_Kind
that takes an Old_Size, for the same reason -- the size cannot
be computed without the Nkind.
(Mutate_Nkind): New function that allows specifying the Old_Size.
(Size_In_Slots): Assert that the Nkind has proper (nonzero) value.
* atree.ads: Minor reformatting.
Diffstat (limited to 'gcc/omp-low.c')
0 files changed, 0 insertions, 0 deletions