http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59073

            Bug ID: 59073
           Summary: [4.9 Regression] ICE with missing increment in OpenMP
                    for-loop
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet (compiled with "-fopenmp") triggers an ICE
on trunk:

==========================================
void foo()
{
  int i; 
#pragma omp distribute parallel for
  for (i = 0; i < 10; i) ;
}
==========================================

bug.c: In function 'foo':
bug.c:5:23: error: invalid increment expression
   for (i = 0; i < 10; i) ;
                       ^
bug.c:4:9: internal compiler error: in gimplify_omp_for, at gimplify.c:6899
 #pragma omp distribute parallel for
         ^
0x7ecf0e gimplify_omp_for
        ../../gcc/gcc/gimplify.c:6899
0x7d9281 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:8188
0x7dd856 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5657
0x7d9e73 gimplify_statement_list
        ../../gcc/gcc/gimplify.c:1548
0x7d9e73 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:8144
0x7dd856 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5657
0x7de5b4 gimplify_bind_expr
        ../../gcc/gcc/gimplify.c:1229
0x7da201 gimplify_expr(tree_node**, gimple_statement_d**, gimple_statement_d**,
bool (*)(tree_node*), int)
        ../../gcc/gcc/gimplify.c:7926
0x7dd856 gimplify_stmt(tree_node**, gimple_statement_d**)
        ../../gcc/gcc/gimplify.c:5657
0x7def5e gimplify_body(tree_node*, bool)
        ../../gcc/gcc/gimplify.c:8836
0x7df4b6 gimplify_function_tree(tree_node*)
        ../../gcc/gcc/gimplify.c:8974
0x674d17 analyze_function
        ../../gcc/gcc/cgraphunit.c:638
0x676024 analyze_functions
        ../../gcc/gcc/cgraphunit.c:1005
0x677535 finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2263
0x53ef53 c_write_global_declarations()
        ../../gcc/gcc/c/c-decl.c:10287
Please submit a full bug report, [etc.]

The regression appeared between 4.9.0 20131005 and 4.9.0 20131012.

Reply via email to