[gcc r11-3385] middle-end/97162 - fix ICE when building gamess

Richard Biener rguenth@gcc.gnu.org
Wed Sep 23 08:09:49 GMT 2020


https://gcc.gnu.org/g:371f0b990f2bbf638b44da27cf6fc5f86e0d6d4e

commit r11-3385-g371f0b990f2bbf638b44da27cf6fc5f86e0d6d4e
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Sep 23 10:07:37 2020 +0200

    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.

Diff:
---
 gcc/alias.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/alias.c b/gcc/alias.c
index 1cb702be2ce..f6d7a1791c4 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))
     {


More information about the Gcc-cvs mailing list