public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-9432] rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279]
@ 2021-03-10 23:48 Peter Bergner
0 siblings, 0 replies; only message in thread
From: Peter Bergner @ 2021-03-10 23:48 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0a35ff4ecdd22745bda9afd8fe095fb469acd624
commit r10-9432-g0a35ff4ecdd22745bda9afd8fe095fb469acd624
Author: Peter Bergner <bergner@linux.ibm.com>
Date: Thu Feb 25 21:35:28 2021 -0600
rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279]
The initialization of compat builtins assumes the builtin we are creating
a compatible builtin for exists and ICEs if it doesn't. However, there are
valid reasons why some builtins are disabled for a particular compile.
In this case, the MMA builtins are disabled for -mcpu=440 (and other cpus),
so instead of ICEing, we should just skip adding the MMA compat builtin.
2021-02-25 Peter Bergner <bergner@linux.ibm.com>
gcc/
PR target/99279
* config/rs6000/rs6000-call.c (rs6000_init_builtins): Replace assert
with an "if" test.
(cherry picked from commit 0159535adb0e7400f2c6922f14a7602f6b90cf69)
Diff:
---
gcc/config/rs6000/rs6000-call.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c
index e1e0d306ae3..538a57adceb 100644
--- a/gcc/config/rs6000/rs6000-call.c
+++ b/gcc/config/rs6000/rs6000-call.c
@@ -12532,9 +12532,9 @@ rs6000_init_builtins (void)
for (i = 0; i < ARRAY_SIZE (bdesc_compat); i++, d++)
{
tree decl = rs6000_builtin_decls[(int)d->code];
- gcc_assert (decl != NULL);
- add_builtin_function (d->name, TREE_TYPE (decl), (int)d->code,
- BUILT_IN_MD, NULL, NULL_TREE);
+ if (decl != NULL)
+ add_builtin_function (d->name, TREE_TYPE (decl), (int)d->code,
+ BUILT_IN_MD, NULL, NULL_TREE);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-10 23:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 23:48 [gcc r10-9432] rs6000: Fix ICE in rs6000_init_builtins when compiling with -mcpu=440 [PR99279] Peter Bergner
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).