https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91169
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Mon Aug 5 12:30:49 2019 New Revision: 274114 URL: https://gcc.gnu.org/viewcvs?rev=274114&root=gcc&view=rev Log: 2019-08-05 Richard Biener <rguent...@suse.de> PR middle-end/91169 * fold-const.c (get_array_ctor_element_at_index): Create offset_ints according to the sign of the index type and treat that as signed if it is obviously so. * gnat.dg/array37.adb: New testcase. Added: trunk/gcc/testsuite/gnat.dg/array37.adb Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog