From 961ce1191f290dc2abdd987427a6972622ed85a8 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 7 Jun 2013 20:45:45 +0930 Subject: [PATCH] varasm.c (force_const_mem): Assert mode is not VOID or BLK. * varasm.c (force_const_mem): Assert mode is not VOID or BLK. From-SVN: r199804 --- gcc/ChangeLog | 4 ++++ gcc/varasm.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 806d3be704ba..b27f22a033f1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2013-06-07 Alan Modra + + * varasm.c (force_const_mem): Assert mode is not VOID or BLK. + 2013-06-07 Kyrylo Tkachov * config/arm/constraints.md (Df): New constraint. diff --git a/gcc/varasm.c b/gcc/varasm.c index c088ebf90080..bf3a0768f86e 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3567,7 +3567,8 @@ force_const_mem (enum machine_mode mode, rtx x) *slot = desc; /* Align the location counter as required by EXP's data type. */ - align = GET_MODE_ALIGNMENT (mode == VOIDmode ? word_mode : mode); + gcc_checking_assert (mode != VOIDmode && mode != BLKmode); + align = GET_MODE_ALIGNMENT (mode); #ifdef CONSTANT_ALIGNMENT { tree type = lang_hooks.types.type_for_mode (mode, 0); -- 2.43.5