summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2012-12-10 18:07:47 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2012-12-10 18:07:47 +0000
commitbb1a9f4cb94c137336fbb9bea605edb9f454eb0d (patch)
treef3a39b94aa1a423f47ac9a44fc48021bcd2ba701 /gnu
parentb0df29af882c4d620b5f6e88a55df70741281ad7 (diff)
Fix c-bounded when arrays are declared without the size expression.
The array_size was uninitialized and used to work by accident. Spotted with SSP on MIPS. OK miod@. Tested by jasper@.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/gcc/gcc/c-bounded.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gnu/gcc/gcc/c-bounded.c b/gnu/gcc/gcc/c-bounded.c
index eab953fd906..63f6fe0a025 100644
--- a/gnu/gcc/gcc/c-bounded.c
+++ b/gnu/gcc/gcc/c-bounded.c
@@ -446,7 +446,7 @@ check_bounded_info (status, info, params)
if (array_size_expr)
array_size = (TREE_INT_CST_LOW (array_size_expr) + 1) * type_size;
else
- array_size_expr = 0;
+ array_size = 0;
length = TREE_INT_CST_LOW (length_expr);
/* XXX - warn about a too-small buffer? */