https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68033
Bug ID: 68033 Summary: OpenMP: ICE with teams distribute Product: gcc Version: 5.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp Assignee: unassigned at gcc dot gnu.org Reporter: mliska at suse dot cz CC: jakub at gcc dot gnu.org Target Milestone: --- Created attachment 36551 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36551&action=edit test-case Hello. Using official gcc 5.1: gcc version 5.1.1 20150713 [gcc-5-branch revision 225736] (SUSE Linux) $ gcc -fopenmp lud_omp.c: #0 c_tree_printer (pp=0x1df9c90, text=<optimized out>, spec=0x1df4bf1 "E", precision=<optimized out>, wide=<optimized out>, set_locus=false, hash=false) at ../../gcc/c/c-objc-common.c:182 #1 0x00000000012e827c in pp_format (pp=0x1df9c90, text=0x7fffffffc300) at ../../gcc/pretty-print.c:613 #2 0x00000000012e44f3 in diagnostic_report_diagnostic (context=0x1daaa60 <global_diagnostic_context>, diagnostic=0x7fffffffc300) at ../../gcc/diagnostic.c:865 #3 0x00000000012e5156 in error (gmsgid=0x142e118 "%qE not specified in enclosing parallel") at ../../gcc/diagnostic.c:1137 #4 0x0000000000894988 in omp_notice_variable (ctx=0x1e112b0, decl=0x7ffff6a6fcf0, in_code=<optimized out>) at ../../gcc/gimplify.c:5841 #5 0x00000000008945c9 in omp_notice_variable (ctx=0x1e11250, decl=0x7ffff6a6fcf0, in_code=<optimized out>) at ../../gcc/gimplify.c:5951 #6 0x00000000008952c3 in gimplify_var_or_parm_decl (expr_p=expr_p@entry=0x7ffff6a6c160) at ../../gcc/gimplify.c:1806 #7 0x0000000000899424 in gimplify_expr (expr_p=expr_p@entry=0x7ffff6a6c160, pre_p=pre_p@entry=0x7fffffffc6a8, post_p=0x7fffffffc538, post_p@entry=0x0, gimple_test_f=<optimized out>, fallback=fallback@entry=1) at ../../gcc/gimplify.c:8531 #8 0x000000000089fafd in gimplify_omp_for (expr_p=expr_p@entry=0x7ffff6a67680, pre_p=pre_p@entry=0x7fffffffc8b8) at ../../gcc/gimplify.c:7270 #9 0x00000000008990bd in gimplify_expr (expr_p=0x7ffff6a67680, pre_p=pre_p@entry=0x7fffffffc8b8, post_p=0x7fffffffc758, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8562 #10 0x000000000089a967 in gimplify_stmt (stmt_p=stmt_p@entry=0x7ffff6a67680, seq_p=seq_p@entry=0x7fffffffc8b8) at ../../gcc/gimplify.c:5519 #11 0x000000000089b16e in gimplify_bind_expr (expr_p=expr_p@entry=0x7fffffffcb50, pre_p=pre_p@entry=0x7fffffffcbb0) at ../../gcc/gimplify.c:1136 #12 0x000000000089943a in gimplify_expr (expr_p=0x7fffffffcb50, pre_p=pre_p@entry=0x7fffffffcbb0, post_p=0x7fffffffc968, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8297 #13 0x000000000089a967 in gimplify_stmt (stmt_p=stmt_p@entry=0x7fffffffcb50, seq_p=seq_p@entry=0x7fffffffcbb0) at ../../gcc/gimplify.c:5519 #14 0x000000000089a224 in gimplify_and_add (seq_p=0x7fffffffcbb0, t=0x7ffff6a67660) at ../../gcc/gimplify.c:423 #15 gimplify_and_return_first (seq_p=0x7fffffffcbb0, t=<optimized out>) at ../../gcc/gimplify.c:435 #16 gimplify_omp_parallel (pre_p=0x7fffffffcc80, expr_p=0x7fffffffcc98) at ../../gcc/gimplify.c:6901 #17 gimplify_expr (expr_p=0x7fffffffcc98, pre_p=pre_p@entry=0x7fffffffcc80, post_p=0x7fffffffcaf8, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8547 #18 0x000000000089a967 in gimplify_stmt (stmt_p=stmt_p@entry=0x7fffffffcc98, seq_p=seq_p@entry=0x7fffffffcc80) at ../../gcc/gimplify.c:5519 #19 0x00000000008a04b8 in gimplify_and_add (seq_p=0x7fffffffcc80, t=0x7ffff6a6c7f8) at ../../gcc/gimplify.c:423 #20 gimplify_omp_for (expr_p=expr_p@entry=0x7fffffffce98, pre_p=pre_p@entry=0x7fffffffce88) at ../../gcc/gimplify.c:7413 #21 0x00000000008990bd in gimplify_expr (expr_p=0x7fffffffce98, pre_p=pre_p@entry=0x7fffffffce88, post_p=0x7fffffffcd38, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8562 #22 0x000000000089a967 in gimplify_stmt (stmt_p=stmt_p@entry=0x7fffffffce98, seq_p=seq_p@entry=0x7fffffffce88) at ../../gcc/gimplify.c:5519 #23 0x000000000089f639 in gimplify_and_add (seq_p=0x7fffffffce88, t=0x7ffff68dad38) at ../../gcc/gimplify.c:423 #24 gimplify_omp_workshare (expr_p=expr_p@entry=0x7ffff6a676b0, pre_p=pre_p@entry=0x7fffffffd098) at ../../gcc/gimplify.c:7543 #25 0x0000000000898f89 in gimplify_expr (expr_p=0x7ffff6a676b0, pre_p=pre_p@entry=0x7fffffffd098, post_p=0x7fffffffcf38, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8598 #26 0x000000000089a967 in gimplify_stmt (stmt_p=stmt_p@entry=0x7ffff6a676b0, seq_p=seq_p@entry=0x7fffffffd098) at ../../gcc/gimplify.c:5519 #27 0x000000000089b16e in gimplify_bind_expr (expr_p=expr_p@entry=0x7fffffffd2a0, pre_p=pre_p@entry=0x7fffffffd298) at ../../gcc/gimplify.c:1136 #28 0x000000000089943a in gimplify_expr (expr_p=0x7fffffffd2a0, pre_p=pre_p@entry=0x7fffffffd298, post_p=0x7fffffffd148, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8297 #29 0x000000000089a967 in gimplify_stmt (stmt_p=stmt_p@entry=0x7fffffffd2a0, seq_p=seq_p@entry=0x7fffffffd298) at ../../gcc/gimplify.c:5519 #30 0x000000000089f90f in gimplify_and_add (seq_p=0x7fffffffd298, t=0x7ffff6a67690) at ../../gcc/gimplify.c:423 #31 gimplify_and_return_first (seq_p=0x7fffffffd298, t=<optimized out>) at ../../gcc/gimplify.c:435 #32 gimplify_omp_workshare (expr_p=expr_p@entry=0x7ffff6a69460, pre_p=pre_p@entry=0x7fffffffd638) at ../../gcc/gimplify.c:7514 #33 0x0000000000898f89 in gimplify_expr (expr_p=0x7ffff6a69460, pre_p=pre_p@entry=0x7fffffffd638, post_p=0x7fffffffd348, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8598 #34 0x000000000089a967 in gimplify_stmt (stmt_p=<optimized out>, seq_p=seq_p@entry=0x7fffffffd638) at ../../gcc/gimplify.c:5519 #35 0x0000000000898e8c in gimplify_statement_list (pre_p=0x7fffffffd638, expr_p=0x7ffff6a67710) at ../../gcc/gimplify.c:1487 #36 gimplify_expr (expr_p=0x7ffff6a67710, pre_p=pre_p@entry=0x7fffffffd638, post_p=0x7fffffffd4d8, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8515 #37 0x000000000089a967 in gimplify_stmt (stmt_p=stmt_p@entry=0x7ffff6a67710, seq_p=seq_p@entry=0x7fffffffd638) at ../../gcc/gimplify.c:5519 #38 0x000000000089b16e in gimplify_bind_expr (expr_p=expr_p@entry=0x7ffff6a66bb8, pre_p=pre_p@entry=0x7fffffffd828) at ../../gcc/gimplify.c:1136 #39 0x000000000089943a in gimplify_expr (expr_p=0x7ffff6a66bb8, pre_p=pre_p@entry=0x7fffffffd828, post_p=0x7fffffffd6e8, post_p@entry=0x0, gimple_test_f=gimple_test_f@entry=0x8923f0 <is_gimple_stmt(tree)>, fallback=fallback@entry=0) at ../../gcc/gimplify.c:8297 #40 0x000000000089a967 in gimplify_stmt (stmt_p=stmt_p@entry=0x7ffff6a66bb8, seq_p=seq_p@entry=0x7fffffffd828) at ../../gcc/gimplify.c:5519 #41 0x000000000089b812 in gimplify_body (fndecl=fndecl@entry=0x7ffff6a66af8, do_parms=do_parms@entry=true) at ../../gcc/gimplify.c:9234 #42 0x000000000089bb38 in gimplify_function_tree (fndecl=fndecl@entry=0x7ffff6a66af8) at ../../gcc/gimplify.c:9388 #43 0x0000000000754708 in cgraph_node::analyze (this=this@entry=0x7ffff6a6e000) at ../../gcc/cgraphunit.c:633 #44 0x0000000000756bc0 in analyze_functions () at ../../gcc/cgraphunit.c:1023 #45 0x00000000007570f6 in symbol_table::finalize_compilation_unit (this=0x7ffff68d4000) at ../../gcc/cgraphunit.c:2452 #46 0x000000000066c283 in c_write_global_declarations () at ../../gcc/c/c-decl.c:10799 #47 0x0000000000a9593d in compile_file () at ../../gcc/toplev.c:613 #48 0x0000000000a97c68 in do_compile () at ../../gcc/toplev.c:2067 #49 0x0000000000a97e97 in toplev::main (this=0x7fffffffdab0, argc=22, argv=0x7fffffffdbb8) at ../../gcc/toplev.c:2165 #50 0x00000000012d1a30 in main (argc=22, argv=0x7fffffffdbb8) at ../../gcc/main.c:39 Thanks, Martin