Bug 57577 - internal compiler error: tree check: expected class 'expression', have 'constant' (integer_cst) in tree_operand_check, at tree.h:4123
Summary: internal compiler error: tree check: expected class 'expression', have 'const...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-10 14:00 UTC by Anna
Modified: 2014-01-10 15:53 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Reproducer (80 bytes, text/x-csrc)
2013-06-10 14:00 UTC, Anna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anna 2013-06-10 14:00:53 UTC
Created attachment 30284 [details]
Reproducer

Hi,
attached test case fails with ICE:

$ gcc -fcilkplus 1.c
1.c: In function 'main':
1.c:7:1: internal compiler error: tree check: expected class 'expression', have 'constant' (integer_cst) in tree_operand_check, at tree.h:4123
 }
 ^
0xae7d99 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*)
        /home/anna/trunk/gcc/tree.c:9110
0x4c3cef expr_check
        /home/anna/trunk/gcc/tree.h:3859
0x4c3cef tree_operand_check
        /home/anna/trunk/gcc/tree.h:4123
0x531755 tree_operand_check(tree_node*, int, char const*, int, char const*)
        /home/anna/trunk/gcc/tree.h:4111
0x55255d build_array_notation_expr(unsigned int, tree_node*, tree_node*, tree_code, unsigned int, tree_node*, tree_node*)
        /home/anna/trunk/gcc/c/c-array-notation.c:1264
0x555cf8 expand_array_notation_exprs(tree_node*)
        /home/anna/trunk/gcc/c/c-array-notation.c:2777
0x555b90 expand_array_notation_exprs(tree_node*)
        /home/anna/trunk/gcc/c/c-array-notation.c:2765
0x5438f3 c_parser_compound_statement
        /home/anna/trunk/gcc/c/c-parser.c:4098
0x5447aa c_parser_declaration_or_fndef
        /home/anna/trunk/gcc/c/c-parser.c:1758
0x54958b c_parser_external_declaration
        /home/anna/trunk/gcc/c/c-parser.c:1363
0x549ff6 c_parser_translation_unit
        /home/anna/trunk/gcc/c/c-parser.c:1251
0x549ff6 c_parse_file()
        /home/anna/trunk/gcc/c/c-parser.c:11000
0x59c954 c_common_parse_file()
        /home/anna/trunk/gcc/c-family/c-opts.c:1046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Compiler used is:
Target: x86_64-unknown-linux-gnu
Configured with: /home/anna/trunk/configure --with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --enable-cloog-backend=isl --with-fpmath=sse --enable-languages=c,c++,fortran,java,lto
Thread model: posix
gcc version 4.9.0 20130608 (experimental) (GCC)
Comment 1 Anna 2013-06-10 14:04:28 UTC
Also, when I change "A[:] = foo (B[:][:]);" to "A[0] = foo (B[:][:]);" compilation hangs.
Comment 2 Marek Polacek 2014-01-10 15:28:43 UTC
This has been fixed (199971 still ICEs, but 200471 is ok).
Comment 3 H.J. Lu 2014-01-10 15:44:37 UTC
(In reply to Marek Polacek from comment #2)
> This has been fixed (199971 still ICEs, but 200471 is ok).

Shouldn't we add the testcase?
Comment 4 Marek Polacek 2014-01-10 15:53:00 UTC
(In reply to H.J. Lu from comment #3)
> Shouldn't we add the testcase?

We already have one: c-c++-common/cilk-plus/AN/pr57577.c