public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96867] New: ICE: tree check: expected parm_decl, have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086
@ 2020-08-31 12:51 asolokha at gmx dot com
  2020-08-31 13:00 ` [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 jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2020-08-31 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96867
           Summary: ICE: tree check: expected parm_decl, have var_decl in
                    handle_omp_array_sections_1, at cp/semantics.c:5086
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, openmp
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200830 snapshot (g:6ccadc4c0486ff011a32c74de1a31148acb3cbe2)
ICEs when compiling the following testcase, reduced from
test/OpenMP/target_update_to_messages.cpp from the clang 10.0.1 test suite, w/
-fopenmp:

int *cq;

void
l0 (int va)
{
#pragma omp target update to (va, cq[:])
}

% g++-11.0.0 -fopenmp -c jwicc9e4.cpp
jwicc9e4.cpp: In function 'void l0(int)':
jwicc9e4.cpp:6:41: internal compiler error: tree check: expected parm_decl,
have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086
    6 | #pragma omp target update to (va, cq[:])
      |                                         ^
0x7c2ce2 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/tree.c:9714
0x68e1c2 tree_check(tree_node*, char const*, int, char const*, tree_code)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/tree.h:3295
0x68e1c2 handle_omp_array_sections_1
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/semantics.c:5086
0xa61af2 handle_omp_array_sections
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/semantics.c:5159
0xa669e9 finish_omp_clauses(tree_node*, c_omp_region_type)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/semantics.c:7325
0x9bde94 cp_parser_omp_all_clauses
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:37627
0x9db114 cp_parser_omp_target_update
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:40714
0x9db114 cp_parser_omp_target
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:40893
0x9ae8b2 cp_parser_pragma
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:43948
0x9b77bc cp_parser_statement
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:11529
0x9b845d cp_parser_statement_seq_opt
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:11921
0x9b8538 cp_parser_compound_statement
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:11871
0x9d0bfc cp_parser_function_body
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:23170
0x9d0bfc cp_parser_ctor_initializer_opt_and_function_body
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:23221
0x9d43d9 cp_parser_function_definition_after_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:29116
0x9d5439 cp_parser_function_definition_from_specifiers_and_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:29032
0x9d5439 cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:20776
0x9b473e cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:13811
0x9e06fe cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:13510
0x9e0df0 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200830/work/gcc-11-20200830/gcc/cp/parser.c:4793

target_update_from_messages.cpp fails similarly.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [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
  2020-08-31 12:51 [Bug c++/96867] New: ICE: tree check: expected parm_decl, have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086 asolokha at gmx dot com
@ 2020-08-31 13:00 ` jakub at gcc dot gnu.org
  2020-08-31 13:02 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-08-31 13:00 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-08-31
            Summary|ICE: tree check: expected   |[11 Regression] ICE: tree
                   |parm_decl, have var_decl in |check: expected parm_decl,
                   |handle_omp_array_sections_1 |have var_decl in
                   |, at cp/semantics.c:5086    |handle_omp_array_sections_1
                   |                            |, at cp/semantics.c:5086
                   |                            |since r11-2849
                 CC|                            |jakub at gcc dot gnu.org
           Priority|P3                          |P1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r11-2849-g3d5ed337cb354c2f85a9caf60377bad887b18d53

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [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
  2020-08-31 12:51 [Bug c++/96867] New: ICE: tree check: expected parm_decl, have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086 asolokha at gmx dot com
  2020-08-31 13:00 ` [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 jakub at gcc dot gnu.org
@ 2020-08-31 13:02 ` jakub at gcc dot gnu.org
  2020-08-31 13:20 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-08-31 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
         Depends on|                            |96678
             Status|NEW                         |ASSIGNED


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96678
[Bug 96678] [OpenMP] Rejects map(var[:]) of known size with "for pointer type
length expression must be specified"

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [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
  2020-08-31 12:51 [Bug c++/96867] New: ICE: tree check: expected parm_decl, have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086 asolokha at gmx dot com
  2020-08-31 13:00 ` [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 jakub at gcc dot gnu.org
  2020-08-31 13:02 ` jakub at gcc dot gnu.org
@ 2020-08-31 13:20 ` jakub at gcc dot gnu.org
  2020-09-01  7:21 ` cvs-commit at gcc dot gnu.org
  2020-09-01  8:35 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-08-31 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49159
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49159&action=edit
gcc11-pr96867.patch

Untested fix.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [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
  2020-08-31 12:51 [Bug c++/96867] New: ICE: tree check: expected parm_decl, have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2020-08-31 13:20 ` jakub at gcc dot gnu.org
@ 2020-09-01  7:21 ` cvs-commit at gcc dot gnu.org
  2020-09-01  8:35 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-01  7:21 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [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
  2020-08-31 12:51 [Bug c++/96867] New: ICE: tree check: expected parm_decl, have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2020-09-01  7:21 ` cvs-commit at gcc dot gnu.org
@ 2020-09-01  8:35 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-09-01  8:35 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-01  8:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-31 12:51 [Bug c++/96867] New: ICE: tree check: expected parm_decl, have var_decl in handle_omp_array_sections_1, at cp/semantics.c:5086 asolokha at gmx dot com
2020-08-31 13:00 ` [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 jakub at gcc dot gnu.org
2020-08-31 13:02 ` jakub at gcc dot gnu.org
2020-08-31 13:20 ` jakub at gcc dot gnu.org
2020-09-01  7:21 ` cvs-commit at gcc dot gnu.org
2020-09-01  8:35 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).