diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-29 11:48:36 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-07-29 11:48:36 +0000 |
commit | 35fddbd609f99241296cc6513f0e3fe230e483e7 (patch) | |
tree | 82438dd0eee48ce62911adc53aee6ffa7ce76d1d /gcc/c | |
parent | 155ff204ffa87514b1bcd5fd94f16d3d9ca5c0d9 (diff) | |
download | gcc-35fddbd609f99241296cc6513f0e3fe230e483e7.tar.gz |
PR c/71583
* c-parser.c (c_parser_postfix_expression_after_paren_type): Also
check expr.value.
* gcc.dg/noncompile/pr71583.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238861 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c')
-rw-r--r-- | gcc/c/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c/c-parser.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index b1c42ff4ca5..a47b8a3b5ed 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2016-07-29 Marek Polacek <polacek@redhat.com> + + PR c/71583 + * c-parser.c (c_parser_postfix_expression_after_paren_type): Also + check expr.value. + 2016-07-22 Uros Bizjak <ubizjak@gmail.com> * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1, diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 8952bca363a..a86cae29940 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -8232,7 +8232,9 @@ c_parser_postfix_expression_after_paren_type (c_parser *parser, set_c_expr_source_range (&expr, init.src_range); expr.original_code = ERROR_MARK; expr.original_type = NULL; - if (type != error_mark_node && type_expr) + if (type != error_mark_node + && expr.value != error_mark_node + && type_expr) { if (TREE_CODE (expr.value) == C_MAYBE_CONST_EXPR) { |