public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108348] ICE in gen_movoo, at config/rs6000/mma.md:292 Date: Tue, 10 Jan 2023 08:34:47 +0000 [thread overview] Message-ID: <bug-108348-4-iux0Jcm9kW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108348-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108348 --- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> --- (In reply to Kewen Lin from comment #3) > There seem to be two alternatives to fix this, one is to raise error in > rs6000_pass_by_reference like what we do in rs6000_function_arg, but we need > something like mma_return_type_error to avoid re-erroring; the other is to > teach the function rs6000_opaque_type_invalid_use_p about function call > statement on arguments and return values. For now, the argument and return > value checking is against the modes directly rather than the types, maybe to > unique them into rs6000_opaque_type_invalid_use_p is better? > > Hi @Segher and @Peter, what do you think of this? Ah, the later is a bad idea, as the current checking is for non MMA but the function argument and return values checking should happen all the time. With further thinking, the fix can be: (always return false for MMA modes, let rs6000_function_arg to raise error msg.) diff --git a/gcc/config/rs6000/rs6000-call.cc b/gcc/config/rs6000/rs6000-call.cc index 59c51fa3579..6767a1f541c 100644 --- a/gcc/config/rs6000/rs6000-call.cc +++ b/gcc/config/rs6000/rs6000-call.cc @@ -2013,6 +2013,11 @@ rs6000_pass_by_reference (cumulative_args_t, const function_arg_info &arg) { if (TARGET_DEBUG_ARG) fprintf (stderr, "function_arg_pass_by_reference: AltiVec\n"); + /* We do not allow MMA types being used as function arguments, + return false to avoid the ICE on the copying for passing by + reference. */ + if (TYPE_MODE (arg.type) == OOmode || TYPE_MODE (arg.type) == XOmode) + return 0; return 1; }
next prev parent reply other threads:[~2023-01-10 8:34 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-10 2:59 [Bug target/108348] New: " asolokha at gmx dot com 2023-01-10 3:22 ` [Bug target/108348] " linkw at gcc dot gnu.org 2023-01-10 7:55 ` linkw at gcc dot gnu.org 2023-01-10 8:24 ` linkw at gcc dot gnu.org 2023-01-10 8:34 ` linkw at gcc dot gnu.org [this message] 2023-01-10 17:08 ` bergner at gcc dot gnu.org 2023-01-11 2:51 ` linkw at gcc dot gnu.org 2023-01-18 8:35 ` cvs-commit at gcc dot gnu.org 2023-02-13 2:03 ` cvs-commit at gcc dot gnu.org 2023-02-13 2:09 ` cvs-commit at gcc dot gnu.org 2023-02-13 2:18 ` cvs-commit at gcc dot gnu.org 2023-02-13 2:22 ` linkw at gcc dot gnu.org
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-108348-4-iux0Jcm9kW@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: linkBe 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).