]> gcc.gnu.org Git - gcc.git/commit
Fix bogus -Wstringop-overflow warning in Ada
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 5 Oct 2022 10:21:03 +0000 (12:21 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Wed, 5 Oct 2022 11:48:57 +0000 (13:48 +0200)
commit853ce8eea4ff97850a987167e603387b3d0f1401
treee3491bc0be8ba478000800fc3038f91b25a72baf
parentbcc27369910b818047bca466fbcef6a3034dfc7f
Fix bogus -Wstringop-overflow warning in Ada

It comes from a discrepancy between get_offset_range, which uses a signed
type, and handle_array_ref, which uses an unsigned one, to do computations.

gcc/
PR tree-optimization/106698
* pointer-query.cc (handle_array_ref): Fix handling of low bound.

gcc/testsuite/
* gnat.dg/lto26.adb: New test.
* gnat.dg/lto26_pkg1.ads, gnat.dg/lto26_pkg1.adb: New helper.
* gnat.dg/lto26_pkg2.ads, gnat.dg/lto26_pkg2.adb: Likewise.
gcc/pointer-query.cc
gcc/testsuite/gnat.dg/lto26.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto26_pkg1.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto26_pkg1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto26_pkg2.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/lto26_pkg2.ads [new file with mode: 0644]
This page took 0.066003 seconds and 6 git commands to generate.