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

            Bug ID: 108047
           Summary: ice: unexpected expression of kind implicit_conv_expr
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C++ source code:

namespace std {
template <class> class initializer_list;
struct Trans_NS___cxx11_basic_string;
struct vector {
  vector(initializer_list<Trans_NS___cxx11_basic_string>);
};
struct Trans_NS___cxx11_basic_string {
  Trans_NS___cxx11_basic_string(const char *);
};
} // namespace std
constexpr auto kBufVecX = "";
template <typename> struct TestXswap {
  std::vector BuffersIn() { return {kBufVecX}; }
};


does this 

$ ~/gcc/results.20221208.asan.ubsan/bin/g++ -c -w bug866.cc
bug866.cc: In member function ‘std::vector TestXswap< <template-parameter-1-1>
>::BuffersIn()’:
bug866.cc:13:45: internal compiler error: unexpected expression
‘(std::Trans_NS___cxx11_basic_string)kBufVecX’ of kind implicit_conv_expr
   13 |   std::vector BuffersIn() { return {kBufVecX}; }
      |                                             ^
0x7386ae cxx_eval_constant_expression(constexpr_ctx const*, tree_node*,
value_cat, bool*, bool*, tree_node**)
        ../../trunk.d1/gcc/cp/constexpr.cc:8013

It was ok the day before:

$ ~/gcc/results.20221207.asan.ubsan/bin/g++ -c -w bug866.cc
$ 

The git hashes are 3ad0f470c16d5528 and 7410032a772a9e77, a range
of 24 commits.

Reply via email to