aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-tree.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2006-09-09 00:41:21 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2006-09-09 00:41:21 +0100
commit3542a5c0f694a66f6e126b71a668c51a87f609f3 (patch)
treee813322b0c544ad6765cf8b4c6af8958787846b1 /gcc/c-tree.h
parenta7b9d08c3563ec731b3213c279a25e66be384d0b (diff)
downloadgcc-3542a5c0f694a66f6e126b71a668c51a87f609f3.zip
gcc-3542a5c0f694a66f6e126b71a668c51a87f609f3.tar.gz
gcc-3542a5c0f694a66f6e126b71a668c51a87f609f3.tar.bz2
re PR c/28504 (ICE with variable sized array)
PR c/28504 * c-tree.h (struct c_arg_info): Add pending_sizes. * c-parser.c (c_parser_parms_declarator, c_parser_parms_list_declarator): Initialize pending_sizes. * c-decl.c (get_parm_info): Initialize pending_sizes. (get_parm_info): Set pending_sizes. (grokdeclarator): Call put_pending_sizes for parameters for function definition only. testsuite: * gcc.dg/vla-10.c: New test. From-SVN: r116789
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r--gcc/c-tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h
index 3503c79..79579b0 100644
--- a/gcc/c-tree.h
+++ b/gcc/c-tree.h
@@ -309,6 +309,11 @@ struct c_arg_info {
/* A list of non-parameter decls (notably enumeration constants)
defined with the parameters. */
tree others;
+ /* A list of VLA sizes from the parameters. In a function
+ definition, these are used to ensure that side-effects in sizes
+ of arrays converted to pointers (such as a parameter int i[n++])
+ take place; otherwise, they are ignored. */
+ tree pending_sizes;
/* True when these arguments had [*]. */
BOOL_BITFIELD had_vla_unspec : 1;
};