public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Kito Cheng <kito@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5653] RISC-V: Fix bug of TARGET_COMPUTE_MULTILIB implemented in riscv. Date: Thu, 2 Feb 2023 13:32:33 +0000 (GMT) [thread overview] Message-ID: <20230202133233.84FA53858412@sourceware.org> (raw) https://gcc.gnu.org/g:a02aacf55a35876ddc1e534778dc37fae29054f6 commit r13-5653-ga02aacf55a35876ddc1e534778dc37fae29054f6 Author: Jin Ma <jinma@linux.alibaba.com> Date: Thu Feb 2 19:46:04 2023 +0800 RISC-V: Fix bug of TARGET_COMPUTE_MULTILIB implemented in riscv. MAX_MATCH_SCORE is not assigned anywhere except initialized to 0, causing BEST_MATCH_MULTI_LIB to always be 0 or -1, which will cause the result of TARGET_COMPUTE_MULTILIB hook to fail. gcc/ChangeLog: * common/config/riscv/riscv-common.cc (riscv_compute_multilib): Fix finding best match score. Diff: --- gcc/common/config/riscv/riscv-common.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index 616e2f897b9..787674003cb 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -1700,7 +1700,10 @@ riscv_compute_multilib ( /* Record highest match score multi-lib setting. */ if (match_score > max_match_score) - best_match_multi_lib = i; + { + best_match_multi_lib = i; + max_match_score = match_score; + } } if (best_match_multi_lib == -1)
reply other threads:[~2023-02-02 13:32 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230202133233.84FA53858412@sourceware.org \ --to=kito@gcc.gnu.org \ --cc=gcc-cvs@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).