public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97670] New: [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finistree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at ch_omp_clauses, at cp/semantics.c:8251
@ 2020-11-02 11:04 asolokha at gmx dot com
  2020-11-02 13:40 ` [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2020-11-02 11:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97670
           Summary: [11 Regression] ICE: tree check: expected tree that
                    contains 'decl minimal' structure, have 'mem_ref' in
                    finistree check: expected tree that contains 'decl
                    minimal' structure, have 'mem_ref' in
                    finish_omp_clauses, at ch_omp_clauses, at
                    cp/semantics.c:8251
           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: ---

g++-11.0.0-alpha20201101 snapshot (g:590febb5f6624f78b36402a7c9a9c318978f1efa)
ICEs when compiling the following testcase, reduced from
test/OpenMP/for_reduction_codegen_UDR.cpp from the clang 10.0.1 test suite, w/
-fopenmp:

enum omp_allocator_handle_t {
  omp_cgroup_mem_alloc = 6,
};

struct pd {
};

void
d9 ()
{
  int t7;
  pd gy[1] = { pd(), };

#pragma omp for reduction (& : gy) allocate (omp_cgroup_mem_alloc: gy)
  for (t7 = 0; t7 < 1; ++t7)
    {
    }
}

% g++-11.0.0 -fopenmp -c xbxpjk57.cpp
xbxpjk57.cpp: In function 'void d9()':
xbxpjk57.cpp:14:32: error: user defined reduction not found for 'gy'
   14 | #pragma omp for reduction (& : gy) allocate (omp_cgroup_mem_alloc: gy)
      |                                ^~
xbxpjk57.cpp:14:71: internal compiler error: tree check: expected tree that
contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at
cp/semantics.c:8251
   14 | #pragma omp for reduction (& : gy) allocate (omp_cgroup_mem_alloc: gy)
      |                                                                       ^
0x7df75e tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/tree.c:9905
0x6a8d5c contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/tree.h:3427
0x6a8d5c finish_omp_clauses(tree_node*, c_omp_region_type)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/semantics.c:8251
0x9dcb4c cp_parser_omp_all_clauses
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:37749
0x9f8028 cp_parser_omp_for
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:39744
0x9cc29c cp_parser_omp_construct
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:43421
0x9cd9ad cp_parser_pragma
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:44079
0x9d5ba4 cp_parser_statement
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:11548
0x9d688d cp_parser_statement_seq_opt
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:11940
0x9d6968 cp_parser_compound_statement
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:11890
0x9ef944 cp_parser_function_body
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:23262
0x9ef944 cp_parser_ctor_initializer_opt_and_function_body
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:23313
0x9f3179 cp_parser_function_definition_after_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:29205
0x9f41a9 cp_parser_function_definition_from_specifiers_and_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:29121
0x9f41a9 cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:20848
0x9d2b2e cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:13888
0x9ff526 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:13587
0x9ffb90 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:4793
0x9ffb90 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/cp/parser.c:44251
0xb22e0d c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201101/work/gcc-11-20201101/gcc/c-family/c-opts.c:1198

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

* [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at cp/semantics.c:8251
  2020-11-02 11:04 [Bug c++/97670] New: [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finistree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at ch_omp_clauses, at cp/semantics.c:8251 asolokha at gmx dot com
@ 2020-11-02 13:40 ` rguenth at gcc dot gnu.org
  2020-11-03  8:11 ` [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at cp/semantics.c:8251 since r11-4471-g3a8b20947f2b1559 marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-02 13:40 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

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

* [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at cp/semantics.c:8251 since r11-4471-g3a8b20947f2b1559
  2020-11-02 11:04 [Bug c++/97670] New: [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finistree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at ch_omp_clauses, at cp/semantics.c:8251 asolokha at gmx dot com
  2020-11-02 13:40 ` [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, " rguenth at gcc dot gnu.org
@ 2020-11-03  8:11 ` marxin at gcc dot gnu.org
  2020-11-03 15:37 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-03  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
      Known to fail|                            |11.0
            Summary|[11 Regression] ICE: tree   |[11 Regression] ICE: tree
                   |check: expected tree that   |check: expected tree that
                   |contains 'decl minimal'     |contains 'decl minimal'
                   |structure, have 'mem_ref'   |structure, have 'mem_ref'
                   |in finish_omp_clauses, at   |in finish_omp_clauses, at
                   |cp/semantics.c:8251         |cp/semantics.c:8251 since
                   |                            |r11-4471-g3a8b20947f2b1559
     Ever confirmed|0                           |1
      Known to work|                            |10.2.0
   Last reconfirmed|                            |2020-11-03
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-4471-g3a8b20947f2b1559.

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

* [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at cp/semantics.c:8251 since r11-4471-g3a8b20947f2b1559
  2020-11-02 11:04 [Bug c++/97670] New: [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finistree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at ch_omp_clauses, at cp/semantics.c:8251 asolokha at gmx dot com
  2020-11-02 13:40 ` [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, " rguenth at gcc dot gnu.org
  2020-11-03  8:11 ` [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at cp/semantics.c:8251 since r11-4471-g3a8b20947f2b1559 marxin at gcc dot gnu.org
@ 2020-11-03 15:37 ` jakub at gcc dot gnu.org
  2020-11-04  9:02 ` cvs-commit at gcc dot gnu.org
  2020-11-04  9:05 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-03 15:37 UTC (permalink / raw)
  To: gcc-bugs

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

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
             Status|NEW                         |ASSIGNED

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

Untested fix.

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

* [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at cp/semantics.c:8251 since r11-4471-g3a8b20947f2b1559
  2020-11-02 11:04 [Bug c++/97670] New: [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finistree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at ch_omp_clauses, at cp/semantics.c:8251 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2020-11-03 15:37 ` jakub at gcc dot gnu.org
@ 2020-11-04  9:02 ` cvs-commit at gcc dot gnu.org
  2020-11-04  9:05 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-04  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:9649031577028310e853025672c71dfb500494f0

commit r11-4710-g9649031577028310e853025672c71dfb500494f0
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Nov 4 09:37:22 2020 +0100

    openmp: allocate clause vs. *reduction array sections [PR97670]

    This patch finds the base expression of reduction array sections and uses
it
    in checks whether allocate clause lists only variables that have been
privatized.
    Also fixes a pasto that caused an ICE.

    2020-11-04  Jakub Jelinek  <jakub@redhat.com>

            PR c++/97670
    gcc/c-family/
            * c-omp.c (c_omp_split_clauses): Look through array reductions to
find
            underlying decl to clear in the allocate_head bitmap.
    gcc/c/
            * c-typeck.c (c_finish_omp_clauses): Look through array reductions
to
            find underlying decl to clear in the aligned_head bitmap.
    gcc/cp/
            * semantics.c (finish_omp_clauses): Look through array reductions
to
            find underlying decl to clear in the aligned_head bitmap.  Use
            DECL_UID (t) instead of DECL_UID (OMP_CLAUSE_DECL (c)) when
clearing
            in the bitmap.  Only diagnose errors about allocate vars not being
            privatized on the same construct on allocate clause if it has
            a DECL_P OMP_CLAUSE_DECL.
    gcc/testsuite/
            * c-c++-common/gomp/allocate-4.c: New test.
            * g++.dg/gomp/allocate-2.C: New test.
            * g++.dg/gomp/allocate-3.C: New test.

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

* [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at cp/semantics.c:8251 since r11-4471-g3a8b20947f2b1559
  2020-11-02 11:04 [Bug c++/97670] New: [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finistree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at ch_omp_clauses, at cp/semantics.c:8251 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2020-11-04  9:02 ` cvs-commit at gcc dot gnu.org
@ 2020-11-04  9:05 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-04  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

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-11-04  9:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 11:04 [Bug c++/97670] New: [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finistree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at ch_omp_clauses, at cp/semantics.c:8251 asolokha at gmx dot com
2020-11-02 13:40 ` [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, " rguenth at gcc dot gnu.org
2020-11-03  8:11 ` [Bug c++/97670] [11 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'mem_ref' in finish_omp_clauses, at cp/semantics.c:8251 since r11-4471-g3a8b20947f2b1559 marxin at gcc dot gnu.org
2020-11-03 15:37 ` jakub at gcc dot gnu.org
2020-11-04  9:02 ` cvs-commit at gcc dot gnu.org
2020-11-04  9:05 ` 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).