public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103349] New: ICE in potential_constant_expression_1, at cp/constexpr.c:9104 (sorry, unimplemented: unexpected AST of kind omp_masked)
@ 2021-11-21 17:45 asolokha at gmx dot com
  2021-11-21 19:50 ` [Bug c++/103349] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: asolokha at gmx dot com @ 2021-11-21 17:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103349
           Summary: ICE in potential_constant_expression_1, at
                    cp/constexpr.c:9104 (sorry, unimplemented: unexpected
                    AST of kind omp_masked)
           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-alpha20211114 snapshot (g:3057f1ab737582a9fb37a3fb967ed8bf3659f2f4)
ICEs when compiling the following testcase, reduced from
test/OpenMP/masked_codegen.cpp from the clang 13.0.0 test suite, w/ -fopenmp:

int c;

void
lambda_masked (int a, int b)
{
  [=] ()
  {
#pragma omp masked
    c = a + b;
  };
}

% g++-12.0.0 -fopenmp -c zvbd9hfy.cpp
zvbd9hfy.cpp: In lambda function:
zvbd9hfy.cpp:10:3: sorry, unimplemented: unexpected AST of kind omp_masked
   10 |   };
      |   ^
zvbd9hfy.cpp:10:3: internal compiler error: in potential_constant_expression_1,
at cp/constexpr.c:9104
0x9776f3 potential_constant_expression_1
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/constexpr.c:9104
0x978f51 potential_constant_expression_1
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/constexpr.c:8445
0x97a16f potential_constant_expression_1(tree_node*, bool, bool, bool, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/constexpr.c:9126
0x97a16f potential_constant_expression(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/constexpr.c:9135
0x9e7d4b finish_function(bool)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/decl.c:17740
0xa24a2a finish_lambda_function(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/lambda.c:1559
0xabb92e cp_parser_lambda_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:11668
0xabb92e cp_parser_lambda_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:10987
0xabc4d3 cp_parser_primary_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:5674
0xabf18e cp_parser_postfix_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:7580
0xaa696a cp_parser_binary_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:9910
0xaa751a cp_parser_assignment_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:10214
0xaa91c9 cp_parser_expression
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:10384
0xaac9d8 cp_parser_expression_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:12578
0xab9b3a cp_parser_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:12374
0xababed cp_parser_statement_seq_opt
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:12726
0xabacc8 cp_parser_compound_statement
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:12675
0xadb733 cp_parser_function_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:24899
0xadb733 cp_parser_ctor_initializer_opt_and_function_body
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:24950
0xadc700 cp_parser_function_definition_after_declarator
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/cp/parser.c:31080

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

* [Bug c++/103349] ICE in potential_constant_expression_1, at cp/constexpr.c:9104 (sorry, unimplemented: unexpected AST of kind omp_masked)
  2021-11-21 17:45 [Bug c++/103349] New: ICE in potential_constant_expression_1, at cp/constexpr.c:9104 (sorry, unimplemented: unexpected AST of kind omp_masked) asolokha at gmx dot com
@ 2021-11-21 19:50 ` jakub at gcc dot gnu.org
  2021-11-22  9:14 ` cvs-commit at gcc dot gnu.org
  2021-11-22 11:02 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-21 19:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
                 CC|                            |jakub at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org
   Last reconfirmed|                            |2021-11-21

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

* [Bug c++/103349] ICE in potential_constant_expression_1, at cp/constexpr.c:9104 (sorry, unimplemented: unexpected AST of kind omp_masked)
  2021-11-21 17:45 [Bug c++/103349] New: ICE in potential_constant_expression_1, at cp/constexpr.c:9104 (sorry, unimplemented: unexpected AST of kind omp_masked) asolokha at gmx dot com
  2021-11-21 19:50 ` [Bug c++/103349] " jakub at gcc dot gnu.org
@ 2021-11-22  9:14 ` cvs-commit at gcc dot gnu.org
  2021-11-22 11:02 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-22  9:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 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:4b1e14346a08554dc33f71fca980578a7a3e38a2

commit r12-5446-g4b1e14346a08554dc33f71fca980578a7a3e38a2
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Nov 22 10:13:24 2021 +0100

    openmp: Handle OMP_MASKED in potential_constant_expression_1 [PR103349]

    WHen adding OMP_MASKED, I apparently forgot to handle it in
    potential_constant_expression_1, which means we can ICE on it.

    2021-11-22  Jakub Jelinek  <jakub@redhat.com>

            PR c++/103349
            * constexpr.c (potential_constant_expression_1): Punt on
OMP_MASKED.

            * g++.dg/gomp/masked-1.C: New test.

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

* [Bug c++/103349] ICE in potential_constant_expression_1, at cp/constexpr.c:9104 (sorry, unimplemented: unexpected AST of kind omp_masked)
  2021-11-21 17:45 [Bug c++/103349] New: ICE in potential_constant_expression_1, at cp/constexpr.c:9104 (sorry, unimplemented: unexpected AST of kind omp_masked) asolokha at gmx dot com
  2021-11-21 19:50 ` [Bug c++/103349] " jakub at gcc dot gnu.org
  2021-11-22  9:14 ` cvs-commit at gcc dot gnu.org
@ 2021-11-22 11:02 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-11-22 11:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2021-11-22 11:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-21 17:45 [Bug c++/103349] New: ICE in potential_constant_expression_1, at cp/constexpr.c:9104 (sorry, unimplemented: unexpected AST of kind omp_masked) asolokha at gmx dot com
2021-11-21 19:50 ` [Bug c++/103349] " jakub at gcc dot gnu.org
2021-11-22  9:14 ` cvs-commit at gcc dot gnu.org
2021-11-22 11:02 ` 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).