diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-04 22:51:42 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-04 22:51:42 +0000 |
commit | 92552a26b31e9d7d857794cf1271c3b6a9e064b1 (patch) | |
tree | aec6f99c441c9265e6586e4694d0aa72c7570eaa /gcc/explow.c | |
parent | a62d86ae7e685296bbac99149180e2a333e7f2c5 (diff) | |
download | gcc-92552a26b31e9d7d857794cf1271c3b6a9e064b1.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119515 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index e21e9c112ec..a7102744710 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; |