gimple-parser.c (c_parser_gimple_binary_expression): Avoid building IL when arguments...
authorPrasad Ghangal <prasad.ghangal@gmail.com>
Fri, 10 Feb 2017 12:47:05 +0000 (12:47 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 10 Feb 2017 12:47:05 +0000 (12:47 +0000)
commit3dcde5efcd2ead7eee8864a46e1cc0e1fa459318
treecf76d3c77f76b388d6e610eac2a03eb64d5251d9
parent6139a3b76c3f149f17d7415d84633cbe617ed72b
gimple-parser.c (c_parser_gimple_binary_expression): Avoid building IL when arguments are error_mark_node.

2017-02-10  Prasad Ghangal  <prasad.ghangal@gmail.com>
Richard Biener  <rguenther@suse.de>

* gimple-parser.c (c_parser_gimple_binary_expression): Avoid
building IL when arguments are error_mark_node.
(c_parser_gimple_unary_expression): Likewise.
(c_parser_gimple_if_stmt): Likewise.
(c_parser_gimple_switch_stmt): Likewise.
(c_parser_gimple_return_stmt): Likewise.
(c_parser_parse_ssa_name): When name lookup fails do not build
an SSA name.  Use undeclared rather than not declared in error
reporting.

* gcc.dg/gimplefe-error-1.c: New testcase.
* gcc.dg/gimplefe-error-2.c: New testcase.
* gcc.dg/gimplefe-error-3.c: New testcase.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r245326
gcc/c/ChangeLog
gcc/c/gimple-parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/gimplefe-error-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gimplefe-error-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gimplefe-error-3.c [new file with mode: 0644]