Commit 3e23fb2e by Andrew Pinski Committed by Andrew Pinski

re PR c/43248 (ICE: tree check: expected class 'type', have 'exceptional'…

re PR c/43248 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1233)

2010-03-04  Andrew Pinski  <andrew_pinski@caviumnetworks.com>

        PR c/43248
        * c-decl.c (build_compound_literal): Return early if init is
        an error_mark_node.
2010-03-04  Andrew Pinski  <andrew_pinski@caviumnetworks.com>

        PR c/43248
        * gcc.dg/compound-literal-1.c: New testcase.

From-SVN: r157233
parent 76f76cd0
2010-03-04 Andrew Pinski <andrew_pinski@caviumnetworks.com>
PR c/43248
* c-decl.c (build_compound_literal): Return early if init is
an error_mark_node.
2010-03-04 Martin Jambor <mjambor@suse.cz> 2010-03-04 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/43164 PR tree-optimization/43164
......
...@@ -4462,7 +4462,8 @@ build_compound_literal (location_t loc, tree type, tree init, bool non_const) ...@@ -4462,7 +4462,8 @@ build_compound_literal (location_t loc, tree type, tree init, bool non_const)
tree complit; tree complit;
tree stmt; tree stmt;
if (type == error_mark_node) if (type == error_mark_node
|| init == error_mark_node)
return error_mark_node; return error_mark_node;
decl = build_decl (loc, VAR_DECL, NULL_TREE, type); decl = build_decl (loc, VAR_DECL, NULL_TREE, type);
......
2010-03-04 Andrew Pinski <andrew_pinski@caviumnetworks.com>
PR c/43248
* gcc.dg/compound-literal-1.c: New testcase.
2010-03-04 Martin Jambor <mjambor@suse.cz> 2010-03-04 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/43164 PR tree-optimization/43164
......
/* { dg-do compile } */
/* PR c/43248 */
int foo(__SIZE_TYPE__ i)
{
i ? : (void *){}; /* { dg-error "" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment