public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103705] New: ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928
@ 2021-12-14  7:35 asolokha at gmx dot com
  2021-12-14 10:17 ` [Bug c++/103705] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029 marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2021-12-14  7:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103705
           Summary: ICE: tree check: expected tree that contains 'decl
                    minimal' structure, have 'array_ref' in
                    finish_omp_clauses, at cp/semantics.c:7928
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, openmp
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++ 12.0.0 20211212 snapshot (g:0b52083ea2c2dd9897031fdc3802a68fd4aa45ef) ICEs
when compiling the following testcase, reduced from
test/OpenMP/target_update_from_messages.cpp, w/ -fopenmp:

struct S6 {
  int aa[2];
};

int main(int argc, char **argv) {
  S6 s6[1];

#pragma omp target update from(s6[0].aa[0:1])

  return 0;
}

% g++-12.0.0 -fopenmp -c a6slhg1u.cpp
a6slhg1u.cpp: In function 'int main(int, char**)':
a6slhg1u.cpp:8:46: internal compiler error: tree check: expected tree that
contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at
cp/semantics.c:7928
    8 | #pragma omp target update from(s6[0].aa[0:1])
      |                                              ^
0x867eab tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/tree.c:8876
0x951671 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/tree.h:3555
0xb863cb finish_omp_clauses(tree_node*, c_omp_region_type)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/semantics.c:7928
0xad9e8b cp_parser_omp_all_clauses
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:40261
0xaee66b cp_parser_omp_target_update
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:44135
0xaee66b cp_parser_omp_target
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:44309
0xabb124 cp_parser_pragma
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:47798
0xac36f0 cp_parser_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:12346
0xac4a8d cp_parser_statement_seq_opt
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:12802
0xac4b68 cp_parser_compound_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:12751
0xae5593 cp_parser_function_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:24998
0xae5593 cp_parser_ctor_initializer_opt_and_function_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:25049
0xae658a cp_parser_function_definition_after_declarator
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:31182
0xae784b cp_parser_function_definition_from_specifiers_and_declarator
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:31098
0xae784b cp_parser_init_declarator
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:22520
0xac166f cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:15232
0xaf2bb5 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:14918
0xaf3599 cp_parser_toplevel_declaration
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:14939
0xaf3599 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:4987
0xaf3599 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp/parser.c:47944

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

* [Bug c++/103705] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029
  2021-12-14  7:35 [Bug c++/103705] New: ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 asolokha at gmx dot com
@ 2021-12-14 10:17 ` marxin at gcc dot gnu.org
  2022-01-04 11:09 ` [Bug c++/103705] [12 Regression] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-14 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE: tree check: expected   |ICE: tree check: expected
                   |tree that contains 'decl    |tree that contains 'decl
                   |minimal' structure, have    |minimal' structure, have
                   |'array_ref' in              |'array_ref' in
                   |finish_omp_clauses, at      |finish_omp_clauses, at
                   |cp/semantics.c:7928         |cp/semantics.c:7928 since
                   |                            |r12-5838-g6c0399378e77d029
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-12-14
                 CC|                            |cltang at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-5838-g6c0399378e77d029.

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

* [Bug c++/103705] [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029
  2021-12-14  7:35 [Bug c++/103705] New: ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 asolokha at gmx dot com
  2021-12-14 10:17 ` [Bug c++/103705] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029 marxin at gcc dot gnu.org
@ 2022-01-04 11:09 ` rguenth at gcc dot gnu.org
  2022-01-14 13:59 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-04 11:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
           Priority|P3                          |P1
            Summary|ICE: tree check: expected   |[12 Regression] ICE: tree
                   |tree that contains 'decl    |check: expected tree that
                   |minimal' structure, have    |contains 'decl minimal'
                   |'array_ref' in              |structure, have 'array_ref'
                   |finish_omp_clauses, at      |in finish_omp_clauses, at
                   |cp/semantics.c:7928 since   |cp/semantics.c:7928 since
                   |r12-5838-g6c0399378e77d029  |r12-5838-g6c0399378e77d029

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

* [Bug c++/103705] [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029
  2021-12-14  7:35 [Bug c++/103705] New: ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 asolokha at gmx dot com
  2021-12-14 10:17 ` [Bug c++/103705] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029 marxin at gcc dot gnu.org
  2022-01-04 11:09 ` [Bug c++/103705] [12 Regression] " rguenth at gcc dot gnu.org
@ 2022-01-14 13:59 ` cvs-commit at gcc dot gnu.org
  2022-03-03 10:00 ` burnus at gcc dot gnu.org
  2022-03-03 10:44 ` cltang at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-14 13:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Chung-Lin Tang <cltang@gcc.gnu.org>:

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

commit r12-6584-gcd7484d05cd4b7a9d741fe8bf6c4525406ed7620
Author: Chung-Lin Tang <cltang@codesourcery.com>
Date:   Fri Jan 14 21:58:34 2022 +0800

    openmp: Fix ICE in [PR103705]

    Fix ICE for cases like:
      #pragma omp target update from(s[0].a[0:1])

    where multiple ARRAY_REF nodes exist and require more than one peeling
    during [c_]finish_omp_clauses.

            PR c++/103705

    gcc/c/ChangeLog:

            * c-typeck.c (c_finish_omp_clauses): Also continue peeling off of
            outer node for ARRAY_REFs.

    gcc/cp/ChangeLog:

            * semantics.c (finish_omp_clauses): Also continue peeling off of
            outer node for ARRAY_REFs.

    gcc/testsuite/ChangeLog:

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

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

* [Bug c++/103705] [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029
  2021-12-14  7:35 [Bug c++/103705] New: ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-01-14 13:59 ` cvs-commit at gcc dot gnu.org
@ 2022-03-03 10:00 ` burnus at gcc dot gnu.org
  2022-03-03 10:44 ` cltang at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-03-03 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Can this be closed? Or is something in addition still needed?

(It is marked as GCC 12 regression and I see one mainline/GCC12 commit for it.)

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

* [Bug c++/103705] [12 Regression] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029
  2021-12-14  7:35 [Bug c++/103705] New: ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-03-03 10:00 ` burnus at gcc dot gnu.org
@ 2022-03-03 10:44 ` cltang at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cltang at gcc dot gnu.org @ 2022-03-03 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

Chung-Lin Tang <cltang at gcc dot gnu.org> changed:

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

--- Comment #4 from Chung-Lin Tang <cltang at gcc dot gnu.org> ---
I don't see more to fix ATM. Closing for now.

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

end of thread, other threads:[~2022-03-03 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14  7:35 [Bug c++/103705] New: ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 asolokha at gmx dot com
2021-12-14 10:17 ` [Bug c++/103705] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'array_ref' in finish_omp_clauses, at cp/semantics.c:7928 since r12-5838-g6c0399378e77d029 marxin at gcc dot gnu.org
2022-01-04 11:09 ` [Bug c++/103705] [12 Regression] " rguenth at gcc dot gnu.org
2022-01-14 13:59 ` cvs-commit at gcc dot gnu.org
2022-03-03 10:00 ` burnus at gcc dot gnu.org
2022-03-03 10:44 ` cltang 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).