aboutsummaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-12-04 23:51:42 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2006-12-04 22:51:42 +0000
commit26979bc292e163864289597602beb01705188349 (patch)
treeaec6f99c441c9265e6586e4694d0aa72c7570eaa /gcc/explow.c
parent477d851ce1a3b9fbe06c921ebd99925276792085 (diff)
downloadgcc-26979bc292e163864289597602beb01705188349.zip
gcc-26979bc292e163864289597602beb01705188349.tar.gz
gcc-26979bc292e163864289597602beb01705188349.tar.bz2
cp-objcp-common.c (cp_expr_size): Return NULL in the case size is undefined.
* cp-objcp-common.c (cp_expr_size): Return NULL in the case size is undefined. * builtins.c (fold_builtin_memory_op): Check that expr_size match. * explow.c (expr_size, int_expr_size): Assert that size is non_NULL. From-SVN: r119515
Diffstat (limited to 'gcc/explow.c')
-rw-r--r--gcc/explow.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index e21e9c1..a710274 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -245,7 +245,11 @@ expr_size (tree exp)
if (TREE_CODE (exp) == WITH_SIZE_EXPR)
size = TREE_OPERAND (exp, 1);
else
- size = SUBSTITUTE_PLACEHOLDER_IN_EXPR (lang_hooks.expr_size (exp), exp);
+ {
+ size = lang_hooks.expr_size (exp);
+ gcc_assert (size);
+ size = SUBSTITUTE_PLACEHOLDER_IN_EXPR (size, exp);
+ }
return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), 0);
}
@@ -261,7 +265,10 @@ int_expr_size (tree exp)
if (TREE_CODE (exp) == WITH_SIZE_EXPR)
size = TREE_OPERAND (exp, 1);
else
- size = lang_hooks.expr_size (exp);
+ {
+ size = lang_hooks.expr_size (exp);
+ gcc_assert (size);
+ }
if (size == 0 || !host_integerp (size, 0))
return -1;