public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113404] New: ICE: in to_constant, at poly-int.h:588 with -march=rv64gcv -mbig-endian --param=riscv-vector-abi
@ 2024-01-15 18:24 zsojka at seznam dot cz
  2024-01-16  3:20 ` [Bug target/113404] " cvs-commit at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: zsojka at seznam dot cz @ 2024-01-15 18:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113404

            Bug ID: 113404
           Summary: ICE: in to_constant, at poly-int.h:588 with
                    -march=rv64gcv -mbig-endian --param=riscv-vector-abi
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: riscv64-unknown-linux-gnu

Created attachment 57088
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57088&action=edit
reduced testcase

This has been reduced from
gcc.target/riscv/rvv/base/float-point-dynamic-frm-66.c

Compiler output:
$ riscv64-unknown-linux-gnu-gcc -march=rv64gcv -mbig-endian
--param=riscv-vector-abi a-float-point-dynamic-frm-66.i
a-float-point-dynamic-frm-66.i: In function 'test_float_point_dynamic_frm':
a-float-point-dynamic-frm-66.i:2:14: warning: ABI for the vector type is
currently in experimental stage and may changes in the upcoming version of GCC.
[-Wpsabi]
    2 | vfloat32m1_t test_float_point_dynamic_frm(vfloat32m1_t) {}
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
during RTL pass: expand
a-float-point-dynamic-frm-66.i:2:14: internal compiler error: in to_constant,
at poly-int.h:588
0xab4c2c poly_int<2u, unsigned short>::to_constant() const
        /repo/gcc-trunk/gcc/poly-int.h:588
0xab4de1 poly_int<2u, unsigned short>::to_constant() const
        /repo/gcc-trunk/gcc/tree.h:4055
0xab4de1 default_function_arg_padding(machine_mode, tree_node const*)
        /repo/gcc-trunk/gcc/targhooks.cc:844
0x12e2327 locate_and_pad_parm(machine_mode, tree_node*, int, int, int,
tree_node*, args_size*, locate_and_pad_arg_data*)
        /repo/gcc-trunk/gcc/function.cc:4061
0x12e2aca assign_parm_find_entry_rtl
        /repo/gcc-trunk/gcc/function.cc:2614
0x12e2c89 assign_parms
        /repo/gcc-trunk/gcc/function.cc:3693
0x12e59df expand_function_start(tree_node*)
        /repo/gcc-trunk/gcc/function.cc:5152
0x112fafb execute
        /repo/gcc-trunk/gcc/cfgexpand.cc:6739
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-riscv64/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-7255-20240115165927-g6c703b4eb68-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.0.1/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --with-isa-spec=2.2
--with-sysroot=/usr/riscv64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux-gnu
--with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld
--with-as=/usr/bin/riscv64-unknown-linux-gnu-as --disable-multilib
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-7255-20240115165927-g6c703b4eb68-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240115 (experimental) (GCC)

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

* [Bug target/113404] ICE: in to_constant, at poly-int.h:588 with -march=rv64gcv -mbig-endian --param=riscv-vector-abi
  2024-01-15 18:24 [Bug target/113404] New: ICE: in to_constant, at poly-int.h:588 with -march=rv64gcv -mbig-endian --param=riscv-vector-abi zsojka at seznam dot cz
@ 2024-01-16  3:20 ` cvs-commit at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-16  3:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113404

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Pan Li <panli@gcc.gnu.org>:

https://gcc.gnu.org/g:5134d3074ad7a462b4c8e2c0bc904b5ba40b7373

commit r14-7271-g5134d3074ad7a462b4c8e2c0bc904b5ba40b7373
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date:   Tue Jan 16 11:04:49 2024 +0800

    RISC-V: Report Sorry when users enable RVV in big-endian mode [PR113404]

    As PR113404 mentioned: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113404

    We have ICE when we enable RVV in big-endian mode:

    during RTL pass: expand
    a-float-point-dynamic-frm-66.i:2:14: internal compiler error: in
to_constant, at poly-int.h:588
    0xab4c2c poly_int<2u, unsigned short>::to_constant() const
            /repo/gcc-trunk/gcc/poly-int.h:588
    0xab4de1 poly_int<2u, unsigned short>::to_constant() const
            /repo/gcc-trunk/gcc/tree.h:4055
    0xab4de1 default_function_arg_padding(machine_mode, tree_node const*)
            /repo/gcc-trunk/gcc/targhooks.cc:844
    0x12e2327 locate_and_pad_parm(machine_mode, tree_node*, int, int, int,
tree_node*, args_size*, locate_and_pad_arg_data*)
            /repo/gcc-trunk/gcc/function.cc:4061
    0x12e2aca assign_parm_find_entry_rtl
            /repo/gcc-trunk/gcc/function.cc:2614
    0x12e2c89 assign_parms
            /repo/gcc-trunk/gcc/function.cc:3693
    0x12e59df expand_function_start(tree_node*)
            /repo/gcc-trunk/gcc/function.cc:5152
    0x112fafb execute
            /repo/gcc-trunk/gcc/cfgexpand.cc:6739

    Report users that we don't support RVV in big-endian mode for the following
reasons:
    1. big-endian in RISC-V is pretty rare case.
    2. We didn't test RVV in big-endian and we don't have enough time to test
it since it's stage 4 now.

    Naive disallow RVV in big-endian.

    Tested no regression, ok for trunk ?

    gcc/ChangeLog:

            PR target/113404
            * config/riscv/riscv.cc (riscv_override_options_internal): Report
sorry
            for RVV in big-endian mode.

    gcc/testsuite/ChangeLog:

            PR target/113404
            * gcc.target/riscv/rvv/base/big_endian-1.c: New test.
            * gcc.target/riscv/rvv/base/big_endian-2.c: New test.

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

end of thread, other threads:[~2024-01-16  3:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-15 18:24 [Bug target/113404] New: ICE: in to_constant, at poly-int.h:588 with -march=rv64gcv -mbig-endian --param=riscv-vector-abi zsojka at seznam dot cz
2024-01-16  3:20 ` [Bug target/113404] " cvs-commit at gcc dot gnu.org

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).