-
- Downloads
re PR c/41935 (ICE : tree check: expected integer_cst, have nop_expr in...
re PR c/41935 (ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301) PR middle-end/41935 * c-common.c (fold_offsetof_1) <case ARRAY_REF>: Don't crash for VLAs or non-constant index, allow index one past the last element and allow exceeding array bound in arrays that might be used as flexible array members. * gcc.dg/pr41935.c: New test. * c-c++-common/pr41935.c: New test. * c-c++-common/builtin-offsetof.c (f0): Allow index one past the last element. * gcc.c-torture/execute/pr41935.c: New test. From-SVN: r153962
Showing
- gcc/ChangeLog 8 additions, 0 deletionsgcc/ChangeLog
- gcc/c-common.c 40 additions, 8 deletionsgcc/c-common.c
- gcc/testsuite/ChangeLog 9 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/c-c++-common/builtin-offsetof.c 2 additions, 2 deletionsgcc/testsuite/c-c++-common/builtin-offsetof.c
- gcc/testsuite/c-c++-common/pr41935.c 70 additions, 0 deletionsgcc/testsuite/c-c++-common/pr41935.c
- gcc/testsuite/gcc.c-torture/execute/pr41935.c 25 additions, 0 deletionsgcc/testsuite/gcc.c-torture/execute/pr41935.c
- gcc/testsuite/gcc.dg/pr41935.c 25 additions, 0 deletionsgcc/testsuite/gcc.dg/pr41935.c
Loading
Please register or sign in to comment