aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenth@gcc.gnu.org>2014-11-26 10:15:25 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-11-26 10:15:25 +0000
commitb8a8c4723c3fe55e696787cd7a961bc2085eb762 (patch)
tree6291e5e88598d17d655bef1a520d049f54957438
parent42bc3520017ef04b19bee9a6ae4fc35d55cd2537 (diff)
downloadgcc-b8a8c4723c3fe55e696787cd7a961bc2085eb762.zip
gcc-b8a8c4723c3fe55e696787cd7a961bc2085eb762.tar.gz
gcc-b8a8c4723c3fe55e696787cd7a961bc2085eb762.tar.bz2
gimple-fold.c (get_symbol_constant_value): Allow all GIMPLE register type zero-constants.
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
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/gimple-fold.c3
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e7845c7..c1f9da7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 98ec117..5c75671 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -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));
}