aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index f94151b..50909af 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -3707,7 +3707,8 @@ compute_objsize (tree dest, int ostype, tree *pdecl /* = NULL */)
if (DECL_P (ref))
{
*pdecl = ref;
- return DECL_SIZE_UNIT (ref);
+ if (tree size = DECL_SIZE_UNIT (ref))
+ return TREE_CODE (size) == INTEGER_CST ? size : NULL_TREE;
}
tree type = TREE_TYPE (dest);