public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113766] ICE: in generate_insn, at config/riscv/riscv-vector-builtins.cc:4186 with (invalid?) __riscv_vfredosum_tu()
Date: Thu, 08 Feb 2024 06:52:14 +0000	[thread overview]
Message-ID: <bug-113766-4-pg6eezX7A5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113766-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 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:9ec08782b45869b33fec2a8772c25118221208e3

commit r14-8875-g9ec08782b45869b33fec2a8772c25118221208e3
Author: Pan Li <pan2.li@intel.com>
Date:   Wed Feb 7 16:34:46 2024 +0800

    RISC-V: Bugfix for RVV overloaded intrinsic ICE in function checker

    There is another corn case when similar as below example:

    void test (void)
    {
      __riscv_vaadd ();
    }

    We report error when overloaded function with empty args.  For example:

    test.c: In function 'foo':
    test.c:8:3: error: no matching function call to '__riscv_vaadd' with empty
args
        8 |   __riscv_vaadd ();
          |   ^~~~~~~~~~~~~~~~~~~~

    Unfortunately, it will meet another ICE similar to below after above
    message.  The underlying build function checker will have zero args
    and break some assumption of the function checker.  For example, the
    count of args is not less than 2.

    ice.c: In function âfooâ:
    ice.c:8:3: internal compiler error: in require_immediate, at
    config/riscv/riscv-vector-builtins.cc:4252
        8 |   __riscv_vaadd ();
          |   ^~~~~~~~~~~~~
    0x20b36ac riscv_vector::function_checker::require_immediate(unsigned
    int, long, long) const
           
.../__RISC-V_BUILD__/../gcc/config/riscv/riscv-vector-builtins.cc:4252
    0x20b890c riscv_vector::alu_def::check(riscv_vector::function_checker&)
const
           
.../__RISC-V_BUILD__/../gcc/config/riscv/riscv-vector-builtins-shapes.cc:387
    0x20b38d7 riscv_vector::function_checker::check()
           
.../__RISC-V_BUILD__/../gcc/config/riscv/riscv-vector-builtins.cc:4315
    0x20b4876 riscv_vector::check_builtin_call(unsigned int, vec<unsigned int,
va_heap, vl_ptr>,
           
.../__RISC-V_BUILD__/../gcc/config/riscv/riscv-vector-builtins.cc:4605
    0x2069393 riscv_check_builtin_call
            .../__RISC-V_BUILD__/../gcc/config/riscv/riscv-c.cc:227

    Below test are passed for this patch.

    * The riscv regression tests.

            PR target/113766

    gcc/ChangeLog:

            * config/riscv/riscv-vector-builtins-shapes.cc (struct alu_def):
Make
            sure the c.arg_num is >= 2 before checking.
            (struct build_frm_base): Ditto.
            (struct narrow_alu_def): Ditto.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/base/pr113766-1.c: Add new cases.

    Signed-off-by: Pan Li <pan2.li@intel.com>

      parent reply	other threads:[~2024-02-08  6:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 11:57 [Bug target/113766] New: " zsojka at seznam dot cz
2024-02-06  0:44 ` [Bug target/113766] " pan2.li at intel dot com
2024-02-07  1:19 ` cvs-commit at gcc dot gnu.org
2024-02-08  6:52 ` cvs-commit at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113766-4-pg6eezX7A5@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).