https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93931

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/cp/parser.c.jj  2020-03-18 13:36:34.217840388 +0100
+++ gcc/cp/parser.c     2020-03-18 18:52:53.630586929 +0100
@@ -34059,6 +34059,8 @@ cp_parser_omp_var_list_no_open (cp_parse
                                           token->location);
            }
        }
+      if (outer_automatic_var_p (decl))
+       decl = process_outer_var_ref (decl, tf_warning_or_error);
       if (decl == error_mark_node)
        ;
       else if (kind != 0)
fixes the ICE, but doesn't seem to be enough, for some reason gimplification
still replaces the uses of score inside of the body with __closure->score
access, which is wrong.

Reply via email to