Bug 100837 - nds32le-linux: error: array subscript 2 is above array bounds of 'rtx_def* [2]'
Summary: nds32le-linux: error: array subscript 2 is above array bounds of 'rtx_def* [2]'
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 12.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2021-05-30 18:55 UTC by Jan-Benedict Glaw
Modified: 2023-03-05 10:13 UTC (History)
0 users

See Also:
Host:
Target: nds32le-linux, nds32be-elf, nds32le-elf
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Benedict Glaw 2021-05-30 18:55:47 UTC
Hi!

As I started automated testing again, I found an issue with the nds32 backend code. Host/build compiler is nearly master, GCC source tree is a8f588be038317bf1e9c71f7e626a3d23255ab37.

./gcc/configure --target=nds32le-linux --enable-werror-always --enable-languages=all --disable-gcov --disable-shared --disable-threads --without-headers --prefix=/var/lib/laminar/run/gcc-nds32le-linux/1/toolchain-install

make all-gcc
[...]
[all 2021-05-30 18:46:49] /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 insn-emit.o -MT insn-emit.o -MMD -MP -MF ./.deps/insn-emit.TPo insn-emit.c
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md: In function 'rtx_def* gen_unspec_clr_pending_hwint(rtx)':
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:304:12: warning: unquoted identifier or keyword '__nds32__clr_pending_hwint' in format [-Wformat-diag]
[all 2021-05-30 18:46:51]   304 |     error ("__nds32__clr_pending_hwint not support NDS32_INT_SWI,"
[all 2021-05-30 18:46:51]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51]   305 |            " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
[all 2021-05-30 18:46:51]       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:304:12: warning: unquoted identifier or keyword 'NDS32_INT_SWI' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:304:12: warning: unquoted identifier or keyword 'NDS32_INT_ALZ' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:304:12: warning: unquoted identifier or keyword 'NDS32_INT_IDIVZE' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:304:12: warning: unquoted identifier or keyword 'NDS32_INT_DSSIM' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md: In function 'rtx_def* gen_unspec_get_pending_int(rtx, rtx)':
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:362:12: warning: unquoted identifier or keyword 'get_pending_int' in format [-Wformat-diag]
[all 2021-05-30 18:46:51]   362 |     error ("get_pending_int not support NDS32_INT_ALZ,"
[all 2021-05-30 18:46:51]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51]   363 |            " NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
[all 2021-05-30 18:46:51]       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:362:12: warning: unquoted identifier or keyword 'NDS32_INT_ALZ' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:362:12: warning: unquoted identifier or keyword 'NDS32_INT_IDIVZE' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:362:12: warning: unquoted identifier or keyword 'NDS32_INT_DSSIM' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md: In function 'rtx_def* gen_unspec_set_int_priority(rtx, rtx)':
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:420:12: warning: unquoted identifier or keyword 'set_int_priority' in format [-Wformat-diag]
[all 2021-05-30 18:46:51]   420 |     error ("set_int_priority not support NDS32_INT_SWI,"
[all 2021-05-30 18:46:51]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51]   421 |            " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
[all 2021-05-30 18:46:51]       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:420:12: warning: unquoted identifier or keyword 'NDS32_INT_SWI' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:420:12: warning: unquoted identifier or keyword 'NDS32_INT_ALZ' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:420:12: warning: unquoted identifier or keyword 'NDS32_INT_IDIVZE' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:420:12: warning: unquoted identifier or keyword 'NDS32_INT_DSSIM' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md: In function 'rtx_def* gen_unspec_get_int_priority(rtx, rtx)':
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:480:12: warning: unquoted identifier or keyword 'set_int_priority' in format [-Wformat-diag]
[all 2021-05-30 18:46:51]   480 |     error ("set_int_priority not support NDS32_INT_SWI,"
[all 2021-05-30 18:46:51]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51]   481 |            " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
[all 2021-05-30 18:46:51]       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:480:12: warning: unquoted identifier or keyword 'NDS32_INT_SWI' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:480:12: warning: unquoted identifier or keyword 'NDS32_INT_ALZ' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:480:12: warning: unquoted identifier or keyword 'NDS32_INT_IDIVZE' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:480:12: warning: unquoted identifier or keyword 'NDS32_INT_DSSIM' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md: In function 'rtx_def* gen_unspec_set_trig_level(rtx)':
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:517:12: warning: unquoted identifier or keyword '__nds32__set_trig_type_level' in format [-Wformat-diag]
[all 2021-05-30 18:46:51]   517 |     error ("__nds32__set_trig_type_level not support NDS32_INT_SWI,"
[all 2021-05-30 18:46:51]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51]   518 |            " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
[all 2021-05-30 18:46:51]       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:517:12: warning: unquoted identifier or keyword 'NDS32_INT_SWI' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:517:12: warning: unquoted identifier or keyword 'NDS32_INT_ALZ' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:517:12: warning: unquoted identifier or keyword 'NDS32_INT_IDIVZE' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:517:12: warning: unquoted identifier or keyword 'NDS32_INT_DSSIM' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md: In function 'rtx_def* gen_unspec_set_trig_edge(rtx)':
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:554:12: warning: unquoted identifier or keyword '__nds32__set_trig_type_edge' in format [-Wformat-diag]
[all 2021-05-30 18:46:51]   554 |     error ("__nds32__set_trig_type_edge not support NDS32_INT_SWI,"
[all 2021-05-30 18:46:51]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51]   555 |            " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
[all 2021-05-30 18:46:51]       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:554:12: warning: unquoted identifier or keyword 'NDS32_INT_SWI' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:554:12: warning: unquoted identifier or keyword 'NDS32_INT_ALZ' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:554:12: warning: unquoted identifier or keyword 'NDS32_INT_IDIVZE' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:554:12: warning: unquoted identifier or keyword 'NDS32_INT_DSSIM' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md: In function 'rtx_def* gen_unspec_get_trig_type(rtx, rtx)':
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:591:12: warning: unquoted identifier or keyword '__nds32__get_trig_type' in format [-Wformat-diag]
[all 2021-05-30 18:46:51]   591 |     error ("__nds32__get_trig_type not support NDS32_INT_SWI,"
[all 2021-05-30 18:46:51]       |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51]   592 |            " NDS32_INT_ALZ, NDS32_INT_IDIVZE, NDS32_INT_DSSIM");
[all 2021-05-30 18:46:51]       |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:591:12: warning: unquoted identifier or keyword 'NDS32_INT_SWI' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:591:12: warning: unquoted identifier or keyword 'NDS32_INT_ALZ' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:591:12: warning: unquoted identifier or keyword 'NDS32_INT_IDIVZE' in format [-Wformat-diag]
[all 2021-05-30 18:46:51] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:591:12: warning: unquoted identifier or keyword 'NDS32_INT_DSSIM' in format [-Wformat-diag]
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md: In function 'rtx_def* gen_unspec_get_pending_int(rtx, rtx)':
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:359:17: error: array subscript 2 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2021-05-30 18:47:04]   359 |       operands[2] = GEN_INT (31 - (INTVAL (operands[1]) - 32));
[all 2021-05-30 18:47:04]       |       ~~~~~~~~~~^
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:352:9: note: while referencing 'operands'
[all 2021-05-30 18:47:04]   352 |       system_reg = GEN_INT (__NDS32_REG_INT_PEND2__);
[all 2021-05-30 18:47:04]       |         ^~~~~~~~
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:353:17: error: array subscript 2 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2021-05-30 18:47:04]   353 |       operands[2] = GEN_INT (31 - INTVAL (operands[1]));
[all 2021-05-30 18:47:04]       |       ~~~~~~~~~~^
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:352:9: note: while referencing 'operands'
[all 2021-05-30 18:47:04]   352 |       system_reg = GEN_INT (__NDS32_REG_INT_PEND2__);
[all 2021-05-30 18:47:04]       |         ^~~~~~~~
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:347:17: error: array subscript 2 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2021-05-30 18:47:04]   347 |       operands[2] = GEN_INT (15);
[all 2021-05-30 18:47:04]       |       ~~~~~~~~~~^
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:352:9: note: while referencing 'operands'
[all 2021-05-30 18:47:04]   352 |       system_reg = GEN_INT (__NDS32_REG_INT_PEND2__);
[all 2021-05-30 18:47:04]       |         ^~~~~~~~
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:342:17: error: array subscript 2 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2021-05-30 18:47:04]   342 |       operands[2] = GEN_INT (31 - INTVAL (operands[1]));
[all 2021-05-30 18:47:04]       |       ~~~~~~~~~~^
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:352:9: note: while referencing 'operands'
[all 2021-05-30 18:47:04]   352 |       system_reg = GEN_INT (__NDS32_REG_INT_PEND2__);
[all 2021-05-30 18:47:04]       |         ^~~~~~~~
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:369:17: error: array subscript 2 is above array bounds of 'rtx_def* [2]' [-Werror=array-bounds]
[all 2021-05-30 18:47:04]   369 |       emit_insn (gen_ashlsi3 (operands[0], operands[0], operands[2]));
[all 2021-05-30 18:47:04]       |       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[all 2021-05-30 18:47:04] ../../gcc/gcc/config/nds32/nds32-intrinsic.md:352:9: note: while referencing 'operands'
[all 2021-05-30 18:47:04]   352 |       system_reg = GEN_INT (__NDS32_REG_INT_PEND2__);
[all 2021-05-30 18:47:04]       |         ^~~~~~~~
[all 2021-05-30 18:47:05] cc1plus: all warnings being treated as errors
[all 2021-05-30 18:47:05] make[1]: *** [Makefile:1142: insn-emit.o] Error 1
[all 2021-05-30 18:47:05] make[1]: Leaving directory '/var/lib/laminar/run/gcc-nds32le-linux/1/toolchain-build/gcc'
[all 2021-05-30 18:47:05] make: *** [Makefile:4414: all-gcc] Error 2