gimple-fold.c (get_symbol_constant_value): Allow all GIMPLE register type zero-constants.
authorRichard Biener <rguenth@gcc.gnu.org>
Wed, 26 Nov 2014 10:15:25 +0000 (10:15 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Wed, 26 Nov 2014 10:15:25 +0000 (10:15 +0000)
2014-11-26  Richard Biener  <rguenther@suse.de>

* gimple-fold.c (get_symbol_constant_value): Allow all
GIMPLE register type zero-constants.

From-SVN: r218076

gcc/ChangeLog
gcc/gimple-fold.c

index e7845c7b51a1f88f911958f0d0b12062394228b7..c1f9da7b31f7380b902059a7def2d508ed5584fc 100644 (file)
@@ -1,4 +1,9 @@
-2014-11-25  Mark Wielaard  <mjw@redhat.com>
+2014-11-26  Richard Biener  <rguenther@suse.de>
+
+       * gimple-fold.c (get_symbol_constant_value): Allow all
+       GIMPLE register type zero-constants.
+
+2014-11-26  Mark Wielaard  <mjw@redhat.com>
 
        * dwarf2out.c (gen_subprogram_die): Add DW_AT_noreturn when the
        function decl has TREE_THIS_VOLATILE.
index 98ec1176a7c90aaa5408a5c18530742f1f3f05ad..5c75671c310fc0924c41d010d7bbd9722b4b9ee1 100644 (file)
@@ -254,8 +254,7 @@ get_symbol_constant_value (tree sym)
         have zero as the initializer if they may not be
         overridden at link or run time.  */
       if (!val
-          && (INTEGRAL_TYPE_P (TREE_TYPE (sym))
-              || SCALAR_FLOAT_TYPE_P (TREE_TYPE (sym))))
+          && is_gimple_reg_type (TREE_TYPE (sym)))
        return build_zero_cst (TREE_TYPE (sym));
     }