public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/65549] [4.9/5 Regression] crash in htab_hash_string with -flto -g
Date: Tue, 07 Apr 2015 10:21:00 -0000	[thread overview]
Message-ID: <bug-65549-4-UhtDuYrusO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65549-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #20 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Also crashes with 4.8.

markus@x4 tmp % < tcp_client.ii
template <typename> struct __and_;
template <typename> class function;
template <typename _Functor> class _Base_manager {
protected:
  static _Functor *_M_get_pointer(int) {}
};

template <typename, typename> class A;
template <typename _Res, typename _Functor, typename... _ArgTypes>
class A<_Res(_ArgTypes...), _Functor> : _Base_manager<_Functor> {
public:
  static _Res _M_invoke(const int &) {
    (*_Base_manager<_Functor>::_M_get_pointer(0))();
  }
};

template <typename, typename> using __check_func_return_type = int;
template <typename _Res, typename... _ArgTypes>
class function<_Res(_ArgTypes...)> {
  template <typename> using _Invoke = decltype(0);
  template <typename _Functor>
  using _Callable = __and_<__check_func_return_type<_Invoke<_Functor>, _Res>>;
  template <typename, typename> using _Requires = int;

public:
  template <typename _Functor, typename = _Requires<_Callable<_Functor>, void>>
  function(_Functor);
  using _Invoker_type = _Res (*)(const int &);
  _Invoker_type _M_invoker;
};

template <typename _Res, typename... _ArgTypes>
template <typename _Functor, typename>
function<_Res(_ArgTypes...)>::function(_Functor) {
  _M_invoker = A<_Res(), _Functor>::_M_invoke;
}

class B {
public:
  void configuration();
  void run(int, int, function<void()>);
};
main() {
  B app;
  app.run(0, 0, [&] { app.configuration(); });
}

markus@x4 tmp % /usr/x86_64-pc-linux-gnu/gcc-bin/4.8.4/g++ -std=gnu++1y -flto
-g -O2 -r -nostdlib -fno-inline -flto-partition=max tcp_client.ii
lto1: internal compiler error: in build_abbrev_table, at dwarf2out.c:7478


  parent reply	other threads:[~2015-04-07 10:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-65549-4@http.gcc.gnu.org/bugzilla/>
2015-03-25 12:08 ` [Bug debug/65549] [5 Regression] crash in htab_hash_string with -flto trippels at gcc dot gnu.org
2015-03-27  8:25 ` trippels at gcc dot gnu.org
2015-03-30 12:05 ` [Bug debug/65549] [5 Regression] crash in htab_hash_string with -flto -g jakub at gcc dot gnu.org
2015-03-30 12:28 ` rguenth at gcc dot gnu.org
2015-03-30 12:30 ` rguenth at gcc dot gnu.org
2015-03-30 17:28 ` jakub at gcc dot gnu.org
2015-03-31  9:51 ` rguenth at gcc dot gnu.org
2015-03-31 13:06 ` rguenth at gcc dot gnu.org
2015-03-31 13:12 ` rguenth at gcc dot gnu.org
2015-03-31 13:13 ` rguenth at gcc dot gnu.org
2015-03-31 13:16 ` trippels at gcc dot gnu.org
2015-03-31 15:53 ` trippels at gcc dot gnu.org
2015-03-31 16:04 ` trippels at gcc dot gnu.org
2015-03-31 19:52 ` hubicka at gcc dot gnu.org
2015-04-01 12:19 ` jakub at gcc dot gnu.org
2015-04-07 10:07 ` rguenth at gcc dot gnu.org
2015-04-07 10:08 ` [Bug debug/65549] [4.9/5 " rguenth at gcc dot gnu.org
2015-04-07 10:21 ` trippels at gcc dot gnu.org [this message]
2015-04-16  9:11 ` [Bug debug/65549] [4.9/5/6 " ferdinandw+gcc at gmail dot com
2015-04-16 10:14 ` ferdinandw+gcc at gmail dot com
2015-04-17  7:58 ` rguenth at gcc dot gnu.org
2015-04-17  8:32 ` rguenth at gcc dot gnu.org
2015-04-17  8:34 ` rguenth at gcc dot gnu.org
2015-04-17  8:38 ` avi@cloudius-systems.com
2015-04-17  8:39 ` rguenth at gcc dot gnu.org
2015-04-17  8:55 ` avi@cloudius-systems.com
2015-04-17 10:15 ` rguenth at gcc dot gnu.org
2015-04-20  7:36 ` rguenther at suse dot de
2015-04-27  9:15 ` ebotcazou at gcc dot gnu.org
2015-06-02 12:33 ` rguenth at gcc dot gnu.org
2015-06-02 12:33 ` [Bug debug/65549] [4.9/5 " rguenth at gcc dot gnu.org
2015-06-03  7:39 ` [Bug debug/65549] [4.9 " rguenth at gcc dot gnu.org
2015-06-03 11:04 ` rguenth at gcc dot gnu.org
2015-06-11 13:40 ` rguenth at gcc dot gnu.org
2015-06-11 13:40 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65549-4-UhtDuYrusO@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).