[Bug c++/96867] [11 Regression] ICE: tree check: expected parm_decl, have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086 since r11-2849

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Sep 1 07:21:11 GMT 2020


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

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

https://gcc.gnu.org/g:a37b0cccf4965f13006d2928f57a71e46e341cf8

commit r11-2962-ga37b0cccf4965f13006d2928f57a71e46e341cf8
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Tue Sep 1 09:17:58 2020 +0200

    openmp: Check for PARM_DECL before using C_ARRAY_PARAMETER or
DECL_ARRAY_PARAMETER_P [PR96867]

    The C++ macro performs a PARM_DECL_CHECK, so will ICE if not tested on a
PARM_DECL,
    C_ARRAY_PARAMETER doesn't, but probably should, otherwise it is testing
e.g.
    C_DECL_VARIABLE_SIZE on VAR_DECLs.

    2020-09-01  Jakub Jelinek  <jakub@redhat.com>

            PR c++/96867
            * c-typeck.c (handle_omp_array_sections_1): Test C_ARRAY_PARAMETER
            only on PARM_DECLs.

            * semantics.c (handle_omp_array_sections_1): Test
            DECL_ARRAY_PARAMETER_P only on PARM_DECLs.

            * c-c++-common/gomp/pr96867.c: New test.


More information about the Gcc-bugs mailing list