public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* nvtpx: error: array subscript -1 is below array bounds of 'short int [2][16]'
@ 2021-09-04 19:10 Jan-Benedict Glaw
  2021-09-17 19:26 ` Martin Sebor
  0 siblings, 1 reply; 2+ messages in thread
From: Jan-Benedict Glaw @ 2021-09-04 19:10 UTC (permalink / raw)
  To: gcc; +Cc: Tom de Vries

[-- Attachment #1: Type: text/plain, Size: 3333 bytes --]

Hi!

Running automated tests again, I found that when building current
(2fcfc03459a907c0237ea6e2c6e4ce4871034bed) GCC with a recent GCC, a
build (make all-gcc) when ./configure'ed for -target=nvptx-none
--enable-werror-always --enable-languages=all --disable-gcov
--disable-shared --disable-threads --without-headers fails with:

[all 2021-09-04 16:33:59] /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody  -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o lra-constraints.o -MT lra-constraints.o -MMD -MP -MF ./.deps/lra-constraints.TPo ../../gcc/gcc/lra-constraints.c
[all 2021-09-04 16:34:07] In function 'bool check_and_process_move(bool*, bool*)',
[all 2021-09-04 16:34:07]     inlined from 'bool curr_insn_transform(bool)' at ../../gcc/gcc/lra-constraints.c:4092:33:
[all 2021-09-04 16:34:07] ../../gcc/gcc/lra-constraints.c:1317:56: error: array subscript -1 is below array bounds of 'short int [2][16]' [-Werror=array-bounds]
[all 2021-09-04 16:34:07]  1317 |       reg_renumber[dregno] = ira_class_hard_regs[dclass][0];
[all 2021-09-04 16:34:07] In file included from ../../gcc/gcc/lra-constraints.c:123:
[all 2021-09-04 16:34:07] ../../gcc/gcc/ira.h: In function 'bool curr_insn_transform(bool)':
[all 2021-09-04 16:34:07] ../../gcc/gcc/ira.h:85:9: note: while referencing 'target_ira::x_ira_class_hard_regs'
[all 2021-09-04 16:34:07]    85 |   short x_ira_class_hard_regs[N_REG_CLASSES][FIRST_PSEUDO_REGISTER];
[all 2021-09-04 16:34:07]       |         ^~~~~~~~~~~~~~~~~~~~~
[all 2021-09-04 16:34:07] In function 'bool check_and_process_move(bool*, bool*)',
[all 2021-09-04 16:34:07]     inlined from 'bool curr_insn_transform(bool)' at ../../gcc/gcc/lra-constraints.c:4092:33:
[all 2021-09-04 16:34:07] ../../gcc/gcc/lra-constraints.c:1324:56: error: array subscript -1 is below array bounds of 'short int [2][16]' [-Werror=array-bounds]
[all 2021-09-04 16:34:07]  1324 |       reg_renumber[sregno] = ira_class_hard_regs[sclass][0];
[all 2021-09-04 16:34:07] In file included from ../../gcc/gcc/lra-constraints.c:123:
[all 2021-09-04 16:34:07] ../../gcc/gcc/ira.h: In function 'bool curr_insn_transform(bool)':
[all 2021-09-04 16:34:07] ../../gcc/gcc/ira.h:85:9: note: while referencing 'target_ira::x_ira_class_hard_regs'
[all 2021-09-04 16:34:07]    85 |   short x_ira_class_hard_regs[N_REG_CLASSES][FIRST_PSEUDO_REGISTER];
[all 2021-09-04 16:34:07]       |         ^~~~~~~~~~~~~~~~~~~~~
[all 2021-09-04 16:34:13] cc1plus: all warnings being treated as errors
[all 2021-09-04 16:34:13] make[1]: *** [Makefile:1142: lra-constraints.o] Error 1
[all 2021-09-04 16:34:13] make[1]: Leaving directory '/var/lib/laminar/run/gcc-nvptx-none/5/toolchain-build/gcc'
[all 2021-09-04 16:34:13] make: *** [Makefile:4407: all-gcc] Error 2

Thanks,
  Jan-Benedict

-- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-17 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04 19:10 nvtpx: error: array subscript -1 is below array bounds of 'short int [2][16]' Jan-Benedict Glaw
2021-09-17 19:26 ` Martin Sebor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).