diff options
author | Richard Biener <rguenther@suse.de> | 2020-09-23 10:07:37 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-09-23 10:09:40 +0200 |
commit | 371f0b990f2bbf638b44da27cf6fc5f86e0d6d4e (patch) | |
tree | 55362519fc12a9a50f2ab3751fd6d5bf5341d09d /gcc | |
parent | 6b4e8bf88f1172ce8561f57b12fb81063b21a78f (diff) | |
download | gcc-371f0b990f2bbf638b44da27cf6fc5f86e0d6d4e.zip gcc-371f0b990f2bbf638b44da27cf6fc5f86e0d6d4e.tar.gz gcc-371f0b990f2bbf638b44da27cf6fc5f86e0d6d4e.tar.bz2 |
middle-end/97162 - fix ICE when building gamess
This appropriately guards the check for a hard register in
compare_base_decls which otherwise ICEs when passed a CONST_DECL.
2020-09-23 Richard Biener <rguenther@suse.de>
PR middle-end/97162
* alias.c (compare_base_decls): Use DECL_HARD_REGISTER
and guard with VAR_P.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/alias.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/alias.c b/gcc/alias.c index 1cb702b..f6d7a17 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2142,10 +2142,10 @@ compare_base_decls (tree base1, tree base2) /* If we have two register decls with register specification we cannot decide unless their assembler names are the same. */ - if (DECL_REGISTER (base1) - && DECL_REGISTER (base2) - && HAS_DECL_ASSEMBLER_NAME_P (base1) - && HAS_DECL_ASSEMBLER_NAME_P (base2) + if (VAR_P (base1) + && VAR_P (base2) + && DECL_HARD_REGISTER (base1) + && DECL_HARD_REGISTER (base2) && DECL_ASSEMBLER_NAME_SET_P (base1) && DECL_ASSEMBLER_NAME_SET_P (base2)) { |