public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108887] New: [13 Regression] ICE in process_function_and_variable_attributes since r13-3601
@ 2023-02-22 14:53 jakub at gcc dot gnu.org
  2023-02-22 15:17 ` [Bug c++/108887] " mpolacek at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-02-22 14:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108887
           Summary: [13 Regression] ICE in
                    process_function_and_variable_attributes since
                    r13-3601
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

Since r13-3601-g2b0e81d5cc2f7e1d773f6c502bd65b097f392675 we ICE:
./cc1plus -quiet -O2 rh2171964.ii
cc1plus: internal compiler error: Segmentation fault
0x10bf746 crash_signal
        ../../gcc/toplev.cc:314
0xa2d845 process_function_and_variable_attributes
        ../../gcc/cgraphunit.cc:861
0xa2ed43 analyze_functions
        ../../gcc/cgraphunit.cc:1181
0xa32419 symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.cc:2545
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Testcase:
template <int __v> struct integral_constant {
  static constexpr int value = __v;
};
using false_type = integral_constant<false>;
template <bool, bool, typename...> struct __result_of_impl;
template <typename _Functor, typename... _ArgTypes>
struct __result_of_impl<false, false, _Functor, _ArgTypes...> {
  typedef decltype(0) type;
};
template <typename... _ArgTypes>
struct __invoke_result
    : __result_of_impl<false_type::value, false_type::value, _ArgTypes...> {};
template <typename, typename _Fn, typename... _Args>
void __invoke_impl(_Fn __f, _Args... __args) {
  __f(__args...);
}
template <typename, typename _Callable, typename... _Args>
void __invoke_r(_Callable __fn, _Args... __args) {
  using __result = __invoke_result<_Args...>;
  using __type = typename __result::type;
  __invoke_impl<__type>(__fn, __args...);
}
struct QString {
  QString(const char *);
};
template <typename> class function;
template <typename _Functor> struct _Base_manager {
  static _Functor _M_get_pointer(int) { __builtin_abort (); }
};
template <typename, typename> class _Function_handler;
template <typename _Res, typename _Functor, typename... _ArgTypes>
struct _Function_handler<_Res(_ArgTypes...), _Functor> {
  using _Base = _Base_manager<_Functor>;
  static _Res _M_invoke(const int &__functor, _ArgTypes &&...__args) {
    auto __trans_tmp_1 = _Base::_M_get_pointer(__functor);
    __invoke_r<_Res>(__trans_tmp_1, __args...);
  }
};
template <typename _Res, typename... _ArgTypes>
struct function<_Res(_ArgTypes...)> {
  template <typename _Functor>
  using _Handler = _Function_handler<_Res(_ArgTypes...), _Functor>;
  template <typename _Functor> function(_Functor) {
    using _My_handler = _Handler<_Functor>;
    _M_invoker = _My_handler::_M_invoke;
  }
  using _Invoker_type = _Res (*)(const int &, _ArgTypes &&...);
  _Invoker_type _M_invoker;
};
struct QRegularExpression {
  QRegularExpression(QString);
};
struct AbstractAccount {
  void get(function<void(AbstractAccount *)>,
           function<void(AbstractAccount *)>);
};
struct AbstractTimelineModel {
  AbstractAccount m_account;
};
struct LinkPaginationTimelineModel : AbstractTimelineModel {
  void fillTimeline();
};
void LinkPaginationTimelineModel::fillTimeline() {
  [] {};
  m_account.get([](AbstractAccount *) { static QRegularExpression re(""); },
                [](AbstractAccount *) {});
}

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

end of thread, other threads:[~2023-03-30 12:13 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 14:53 [Bug c++/108887] New: [13 Regression] ICE in process_function_and_variable_attributes since r13-3601 jakub at gcc dot gnu.org
2023-02-22 15:17 ` [Bug c++/108887] " mpolacek at gcc dot gnu.org
2023-02-22 15:18 ` jakub at gcc dot gnu.org
2023-02-23 11:43 ` jakub at gcc dot gnu.org
2023-03-03 15:34 ` hubicka at gcc dot gnu.org
2023-03-03 16:32 ` jakub at gcc dot gnu.org
2023-03-03 17:09 ` hubicka at ucw dot cz
2023-03-07  2:55 ` jason at gcc dot gnu.org
2023-03-07 20:07 ` jason at gcc dot gnu.org
2023-03-07 21:23 ` jason at gcc dot gnu.org
2023-03-09 13:51 ` hubicka at ucw dot cz
2023-03-30 11:23 ` cvs-commit at gcc dot gnu.org
2023-03-30 12:13 ` jason 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).