diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-09-13 10:37:49 -0700 |
commit | e252b51ccde010cbd2a146485d8045103cd99533 (patch) | |
tree | e060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/ada/gcc-interface/cuintp.c | |
parent | f10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff) | |
parent | 104c05c5284b7822d770ee51a7d91946c7e56d50 (diff) | |
download | gcc-e252b51ccde010cbd2a146485d8045103cd99533.zip gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2 |
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/ada/gcc-interface/cuintp.c')
-rw-r--r-- | gcc/ada/gcc-interface/cuintp.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/ada/gcc-interface/cuintp.c b/gcc/ada/gcc-interface/cuintp.c index dada72a..6ac82d7 100644 --- a/gcc/ada/gcc-interface/cuintp.c +++ b/gcc/ada/gcc-interface/cuintp.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2020, Free Software Foundation, Inc. * + * Copyright (C) 1992-2021, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -49,8 +49,7 @@ For efficiency, this method is used only for integer values larger than the constant Uint_Bias. If a Uint is less than this constant, then it contains - the integer value itself. The origin of the Uints_Ptr table is adjusted so - that a Uint value of Uint_Bias indexes the first element. + the integer value itself. First define a utility function that is build_int_cst for integral types and does a conversion for floating-point types. */ @@ -85,9 +84,9 @@ UI_To_gnu (Uint Input, tree type) gnu_ret = build_cst_from_int (comp_type, Input - Uint_Direct_Bias); else { - Int Idx = Uints_Ptr[Input].Loc; - Pos Length = Uints_Ptr[Input].Length; - Int First = Udigits_Ptr[Idx]; + Int Idx = (*Uints_Ptr)[Input - Uint_Table_Start].Loc; + Pos Length = (*Uints_Ptr)[Input - Uint_Table_Start].Length; + Int First = (*Udigits_Ptr)[Idx]; tree gnu_base; gcc_assert (Length > 0); @@ -109,14 +108,14 @@ UI_To_gnu (Uint Input, tree type) fold_build2 (MULT_EXPR, comp_type, gnu_ret, gnu_base), build_cst_from_int (comp_type, - Udigits_Ptr[Idx])); + (*Udigits_Ptr)[Idx])); else for (Idx++, Length--; Length; Idx++, Length--) gnu_ret = fold_build2 (PLUS_EXPR, comp_type, fold_build2 (MULT_EXPR, comp_type, gnu_ret, gnu_base), build_cst_from_int (comp_type, - Udigits_Ptr[Idx])); + (*Udigits_Ptr)[Idx])); } gnu_ret = convert (type, gnu_ret); |