Return hash of ADDR_EXPR if its argument is CONSTANT_CLASS_P.
authorRichard Biener <rguenther@suse.de>
Wed, 24 Oct 2018 13:49:47 +0000 (13:49 +0000)
committerMartin Liska <marxin@gcc.gnu.org>
Wed, 24 Oct 2018 13:49:47 +0000 (13:49 +0000)
2018-10-24  Richard Biener  <rguenther@suse.de>

* varasm.c (const_hash_1): Return hash of ADDR_EXPR
if its argument is CONSTANT_CLASS_P.

From-SVN: r265462

gcc/ChangeLog
gcc/varasm.c

index 582d65a9c4a96563ca55824b35cf58f9dbcd5d0d..270726a373061c080143b955dbe2c86dd5515af4 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-24  Richard Biener  <rguenther@suse.de>
+
+       * varasm.c (const_hash_1): Return hash of ADDR_EXPR
+       if its argument is CONSTANT_CLASS_P.
+
 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
index 06f41d002fd120e327c2667a083e622e7b47ba67..545e13fef6aa071689261c9c77b593e103b8c95e 100644 (file)
@@ -3051,6 +3051,10 @@ const_hash_1 (const tree exp)
       }
 
     case ADDR_EXPR:
+      if (CONSTANT_CLASS_P (TREE_OPERAND (exp, 0)))
+       return const_hash_1 (TREE_OPERAND (exp, 0));
+
+      /* Fallthru.  */
     case FDESC_EXPR:
       {
        struct addr_const value;