diff options
| author | Eric Botcazou <ebotcazou@adacore.com> | 2025-09-26 19:45:10 +0200 |
|---|---|---|
| committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-10-28 11:24:05 +0100 |
| commit | f714e1baf8804dfcff5bf9f23cd548c2c2e32a40 (patch) | |
| tree | 0ef7927076fc5a7bf4e14358a610fc881f6abea4 /contrib/gcc-changelog/git_commit.py | |
| parent | e863ad5cc2c846c10765c81f054cc07c3008e30e (diff) | |
| download | gcc-f714e1baf8804dfcff5bf9f23cd548c2c2e32a40.zip gcc-f714e1baf8804dfcff5bf9f23cd548c2c2e32a40.tar.gz gcc-f714e1baf8804dfcff5bf9f23cd548c2c2e32a40.tar.bz2 | |
ada: Fix unexpected overflow check before fixed-point multiplication
The problem is that the code generating the fixed-point multiply uses the
subtypes of the operands to size the operation, while operations are to be
performed in base types, which are signed per the RM 3.5.9(12) subclause.
As a consequence, when the subtypes are fully asymmetric unsigned, the size
is too small and an incorrect overflow check is generated.
The code generating the divide was fixed a long time ago, this aligns the
code generating the multiply and the code generating the remainder, which
in turn requires a couple of adjustments to related routines.
gcc/ada/ChangeLog:
PR ada/122063
* exp_fixd.adb (Build_Double_Divide_Code): Convert the result of the
multiply.
(Build_Multiply): Use base types of operands to size the operation.
(Build_Rem): Likewise.
(Build_Scaled_Divide_Code): Convert the result of the multiply.
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
0 files changed, 0 insertions, 0 deletions
