[Bug c/101171] [10 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in c_expr_sizeof_expr, at c/c-typeck.c:3006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101171 Jakub Jelinek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #13 from Jakub Jelinek --- Fixed.
[Bug c/101171] [10 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in c_expr_sizeof_expr, at c/c-typeck.c:3006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101171 --- Comment #12 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:be5f5f6ea368e2b8b9a0012ecbe2e83aeabdf714 commit r9-10083-gbe5f5f6ea368e2b8b9a0012ecbe2e83aeabdf714 Author: Jakub Jelinek Date: Thu Jun 24 15:55:28 2021 +0200 c: Fix C cast error-recovery [PR101171] The following testcase ICEs during error-recovery, as build_c_cast calls note_integer_operands on error_mark_node and that wraps it into C_MAYBE_CONST_EXPR which is unexpected and causes ICE later on. Seems most other callers of note_integer_operands check early if something is error_mark_node and return before calling note_integer_operands on it. The following patch fixes it by not calling on error_mark_node, another possibility would be to handle error_mark_node in note_integer_operands and just return it. 2021-06-24 Jakub Jelinek PR c/101171 * c-typeck.c (build_c_cast): Don't call note_integer_operands on error_mark_node. * gcc.dg/pr101171.c: New test. (cherry picked from commit fdc5522fb04b4a820b28c4d1f16f54897f5978de)
[Bug c/101171] [10 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in c_expr_sizeof_expr, at c/c-typeck.c:3006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101171 --- Comment #11 from CVS Commits --- The releases/gcc-10 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ca1771b4efc555a0499975f75a5158b72722cfa0 commit r10-10626-gca1771b4efc555a0499975f75a5158b72722cfa0 Author: Jakub Jelinek Date: Thu Jun 24 15:55:28 2021 +0200 c: Fix C cast error-recovery [PR101171] The following testcase ICEs during error-recovery, as build_c_cast calls note_integer_operands on error_mark_node and that wraps it into C_MAYBE_CONST_EXPR which is unexpected and causes ICE later on. Seems most other callers of note_integer_operands check early if something is error_mark_node and return before calling note_integer_operands on it. The following patch fixes it by not calling on error_mark_node, another possibility would be to handle error_mark_node in note_integer_operands and just return it. 2021-06-24 Jakub Jelinek PR c/101171 * c-typeck.c (build_c_cast): Don't call note_integer_operands on error_mark_node. * gcc.dg/pr101171.c: New test. (cherry picked from commit fdc5522fb04b4a820b28c4d1f16f54897f5978de)
[Bug c/101171] [10 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in c_expr_sizeof_expr, at c/c-typeck.c:3006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101171 Andrew Pinski changed: What|Removed |Added CC||changochen1 at gmail dot com --- Comment #10 from Andrew Pinski --- *** Bug 93574 has been marked as a duplicate of this bug. ***
[Bug c/101171] [10 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in c_expr_sizeof_expr, at c/c-typeck.c:3006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101171 Andrew Pinski changed: What|Removed |Added CC||doko at debian dot org --- Comment #9 from Andrew Pinski --- *** Bug 97892 has been marked as a duplicate of this bug. ***
[Bug c/101171] [10 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in c_expr_sizeof_expr, at c/c-typeck.c:3006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101171 Jakub Jelinek changed: What|Removed |Added Summary|[10/11 Regression] ICE: |[10 Regression] ICE: tree |tree check: expected class |check: expected class |‘type’, have ‘exceptional’ |‘type’, have ‘exceptional’ |(error_mark) in |(error_mark) in |c_expr_sizeof_expr, at |c_expr_sizeof_expr, at |c/c-typeck.c:3006 |c/c-typeck.c:3006 --- Comment #8 from Jakub Jelinek --- Fixed for 11.2 too.