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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:7ab1abf3b82a3bcfff9b7bc596166fef6a0d83ab

commit r11-6810-g7ab1abf3b82a3bcfff9b7bc596166fef6a0d83ab
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Jan 20 08:35:20 2021 +0100

    openmp: Don't ICE on detach clause with erroneous decl [PR98742]

    Similarly to how we handle erroneous operands to e.g. allocate clause,
    this change just removes those clauses instead of accessing
TYPE_MAIN_VARIANT
    of its type, which doesn't work on error_mark_node.  Also, just for good
    measure, bails out if TYPE_NAME is NULL.

    2021-01-20  Jakub Jelinek  <ja...@redhat.com>

            PR c++/98742
            * semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
            error_operand_p, remove clause without further checking.  Check
            for non-NULL TYPE_NAME.

            * c-c++-common/gomp/task-detach-2.c: New test.

Reply via email to