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

            Bug ID: 127717
           Summary: ICE in verify_ctor_sanity, at cp/constexpr.cc:7384
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: prlw1 at cam dot ac.uk
  Target Milestone: ---

Created attachment 65746
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65746&action=edit
xz compressed preprocessed source

I happened upon the ICE when idly trying to compile the std::execution
fibonacci benchmark from

  https://github.com/NVIDIA/stdexec/blob/main/examples/benchmark/fibonacci.cpp

from HEAD 7b0141dbef56e8eff8bd6e3f0165a5792187a8d6

Not exactly a minimal reproducer... It includes tbb 2023.1.0 which I have
installed under /usr/pkg.

I was using gcc HEAD from 8e84facee1236564d6db77234c656db0f9b79e91

```
/usr/local/gcc/bin/g++  -O2 -fPIE -g -Werror -std=c++29 -freport-bug    
-I/usr/src/local/stdexec/include -I/usr/pkg/include  -c   
/usr/src/local/stdexec/examples/benchmark/fibonacci.cpp
In file included from
/usr/src/local/stdexec/examples/benchmark/fibonacci.cpp:2:
/usr/src/local/stdexec/include/exec/any_sender_of.hpp:92:60: internal compiler
error: in verify_ctor_sanity, at cp/constexpr.cc:7384
   92 |     inline constexpr auto _check_query_impl_v = __msuccess{};
      |                                                            ^
0x288ae9b internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:787
0x2da1e68 fancy_abort(char const*, int, char const*)
        ../../gcc/diagnostics/context.cc:1813
0x29fc171 verify_ctor_sanity
        ../../gcc/cp/constexpr.cc:7384
0x7d55c1 verify_ctor_sanity
        ../../gcc/cp/constexpr.cc:7384
0x7d55c1 cxx_eval_bare_aggregate
        ../../gcc/cp/constexpr.cc:7429
0x7c7cef cxx_eval_constant_expression(constexpr_ctx const*, tree_node*,
value_cat, bool*, bool*, tree_node**)
        ../../gcc/cp/constexpr.cc:10695
0x7d97ed cxx_eval_outermost_constant_expr
        ../../gcc/cp/constexpr.cc:11677
0x7e3b47 maybe_constant_init_1
        ../../gcc/cp/constexpr.cc:12324
0xac493f store_init_value(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/cp/typeck2.cc:1098
0x861704 check_initializer
        ../../gcc/cp/decl.cc:8778
0x86836e cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int,
cp_decomp*)
        ../../gcc/cp/decl.cc:9898
0x99d396 cp_parser_init_declarator
        ../../gcc/cp/parser.cc:26526
0x99e69c cp_parser_single_declaration
        ../../gcc/cp/parser.cc:36783
0x99e911 cp_parser_template_declaration_after_parameters
        ../../gcc/cp/parser.cc:36436
0x99e911 cp_parser_explicit_template_declaration
        ../../gcc/cp/parser.cc:36610
0x9af210 cp_parser_declaration
        ../../gcc/cp/parser.cc:17738
0x9ae381 cp_parser_toplevel_declaration
        ../../gcc/cp/parser.cc:17848
0x9ae381 cp_parser_declaration_seq_opt
        ../../gcc/cp/parser.cc:17553
0x9ae8af cp_parser_namespace_body
        ../../gcc/cp/parser.cc:24603
0x9ae8af cp_parser_namespace_definition
        ../../gcc/cp/parser.cc:24581
/usr/local/gcc/libexec/gcc/x86_64-unknown-netbsd11.99/17.0.0/cc1plus -quiet -I
/usr/src/local/stdexec/include -I /usr/pkg/include
/usr/src/local/stdexec/examples/benchmark/fibonacci.cpp -quiet -dumpbase
fibonacci.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -g -O2 -Werror
-std=c++29 -fPIE -freport-bug -o /tmp//cchYZFY3.s
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Preprocessed source stored into /tmp//ccw6V4NQ.out file, please attach this to
your bugreport.
```

Reply via email to