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

            Bug ID: 108698
           Summary: [13 Regression] decltype ((T() +
                    ‘excess_precision_expr’ not supported by
                    dump_expr<expression error>)) median(ndarray<T>) [with
                    T = double]’: since  r13-3290-g98e341130f87984a
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu

The following is isolated from python-scipy package:

$ cat scipy.ii
template <class> struct ndarray {};
template <class T> decltype(T() + 1.) median(ndarray<T>);
struct Trans_NS_functor_median {
  template <typename... Types> void operator()(Types...) { median(Types()...);
}
};
struct siegelslopes {
  void operator()(siegelslopes, double, void()) {
    ndarray<double> __trans_tmp_9;
    Trans_NS_functor_median{}(__trans_tmp_9);
  }
} siegelslopes0_y;
double siegelslopes0_x;
void siegelslopes0_method() {
  siegelslopes()(siegelslopes0_y, siegelslopes0_x, siegelslopes0_method);
}

$ g++ scipy.ii -c -m32 -std=c++14
scipy.ii: In instantiation of ‘decltype ((T() + ‘excess_precision_expr’ not
supported by dump_expr<expression error>)) median(ndarray<T>) [with T =
double]’:
scipy.ii:2:39: sorry, unimplemented: mangling excess_precision_expr
    2 | template <class T> decltype(T() + 1.) median(ndarray<T>);
      |                                       ^~~~~~

$ g++-12 scipy.ii -c -m32 -std=c++14

Reply via email to