aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-fold.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r--gcc/gimple-fold.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 1f3d80e..ab74494 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -4552,6 +4552,8 @@ clear_padding_type (clear_padding_struct *buf, tree type, HOST_WIDE_INT sz)
case ARRAY_TYPE:
HOST_WIDE_INT nelts, fldsz;
fldsz = int_size_in_bytes (TREE_TYPE (type));
+ if (fldsz == 0)
+ break;
nelts = sz / fldsz;
if (nelts > 1
&& sz > 8 * UNITS_PER_WORD