https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81006
Bug ID: 81006 Summary: ICE with zero-size array and #pragma omp task depend Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: ice-on-valid-code, openmp Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: reichelt at gcc dot gnu.org Target Milestone: --- The following (valid?) testcase triggers an ICE since GCC 4.9.0 (when compiled with -fopenmp): =================================================== int a[] = {}; void foo() { #pragma omp task depend(out: a[:]) {} } =================================================== bug.c: In function 'foo': bug.c:5:11: internal compiler error: in size_binop_loc, at fold-const.c:1770 #pragma omp task depend(out: a[:]) ^~~ 0x885b57 size_binop_loc(unsigned int, tree_code, tree_node*, tree_node*) ../../gcc/gcc/fold-const.c:1769 0x6237da handle_omp_array_sections_1 ../../gcc/gcc/c/c-typeck.c:12365 0x62431d handle_omp_array_sections ../../gcc/gcc/c/c-typeck.c:12508 0x6287a8 c_finish_omp_clauses(tree_node*, c_omp_region_type) ../../gcc/gcc/c/c-typeck.c:13334 0x63684e c_parser_omp_task ../../gcc/gcc/c/c-parser.c:15713 0x63684e c_parser_omp_construct ../../gcc/gcc/c/c-parser.c:17405 0x63789e c_parser_pragma ../../gcc/gcc/c/c-parser.c:10393 0x655f5d c_parser_compound_statement_nostart ../../gcc/gcc/c/c-parser.c:4892 0x65653e c_parser_compound_statement ../../gcc/gcc/c/c-parser.c:4757 0x6527e7 c_parser_declaration_or_fndef ../../gcc/gcc/c/c-parser.c:2125 0x65a223 c_parser_external_declaration ../../gcc/gcc/c/c-parser.c:1468 0x65ac89 c_parser_translation_unit ../../gcc/gcc/c/c-parser.c:1349 0x65ac89 c_parse_file() ../../gcc/gcc/c/c-parser.c:18131 0x6b8566 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1104 Please submit a full bug report, [etc.]