public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "doko at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/65233] [5 Regression] ICE (segfault) on arm-linux-gnueabihf Date: Sun, 01 Mar 2015 08:59:00 -0000 [thread overview] Message-ID: <bug-65233-4-p9xu9Pjahn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65233-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65233 --- Comment #8 from Matthias Klose <doko at gcc dot gnu.org> --- this is the testcase from ardour3: $ g++ -c -g -O3 -fPIC track3.ii track3.ii: In member function 'void F::apply(void (Track::*)(T, void*), T, void*) [with T = bool]': track3.ii:108:1: internal compiler error: Segmentation fault F::apply (void (Track::*p1) (T, void *), T p2, void *) ^ Please submit a full bug report, with preprocessed source if appropriate. $ cat track3.ii namespace std { template < typename _Tp > void swap (_Tp p1, _Tp & p2) { p2 = p1; } template < typename _Tp > struct A { _Tp & operator* (); }; template < typename _Tp > class B { public: typedef A < _Tp > iterator; }; } int a; class C { int use_count_; public: virtual void destroy (); void release () { if (use_count_) destroy (); } }; class shared_count { C *pi_; public: shared_count ():pi_ () { } ~shared_count () { if (pi_) pi_->release (); } shared_count (shared_count const &p1):pi_ (p1.pi_) { if (pi_) __sync_fetch_and_add (&a, 1); } void swap (shared_count & p1) { C *b = p1.pi_; p1.pi_ = pi_; pi_ = b; } }; template < class T > class D { typedef D this_type; public: typedef T element_type; D () { } template < class Y > D (D < Y > p1, element_type * p2):px (p2), pn (p1.pn) { } D & operator= (D p1) { this_type (p1).swap (*this); return *this; } element_type *get () { } typedef element_type *this_type::*unspecified_bool_type; operator unspecified_bool_type () { return px ? 0 : &this_type::px; } void swap (D & p1) { std::swap (px, p1.px); pn.swap (p1.pn); } element_type *px; shared_count pn; }; class Track; template < class, class U > D < Track > dynamic_pointer_cast (D < U > &p1) { Track *p; return p ? D < Track > (p1, p) : D < Track > (); } class F { public: template < class T > void apply (void (Track::*)(T, void *), T, void *); }; class G { protected: F _route_group; }; class Track:G { void prep_record_enabled (bool, void *); }; template < class T > void F::apply (void (Track::*p1) (T, void *), T p2, void *) { for (std::B < D < int > >::iterator i;;) { D < Track > c; if (c = dynamic_pointer_cast < Track > (*i)) (c.get ()->*p1) (p2, this); } } void Track::prep_record_enabled (bool p1, void *) { _route_group.apply (&Track::prep_record_enabled, p1, &_route_group); }
next prev parent reply other threads:[~2015-03-01 8:59 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-27 10:21 [Bug target/65233] New: " doko at gcc dot gnu.org 2015-02-27 10:32 ` [Bug target/65233] " rguenth at gcc dot gnu.org 2015-02-27 10:41 ` ktkachov at gcc dot gnu.org 2015-02-27 10:53 ` doko at gcc dot gnu.org 2015-02-27 11:46 ` jakub at gcc dot gnu.org 2015-02-27 12:05 ` doko at gcc dot gnu.org 2015-02-27 12:07 ` jakub at gcc dot gnu.org 2015-02-27 20:31 ` aldyh at gcc dot gnu.org 2015-03-01 8:59 ` doko at gcc dot gnu.org [this message] 2015-03-01 10:18 ` [Bug target/65233] [5 Regression] ICE (segfault) on arm-linux-gnueabihf and aarch64-linux-gnu doko at gcc dot gnu.org 2015-03-01 10:19 ` doko at gcc dot gnu.org 2015-03-01 15:33 ` aldyh at gcc dot gnu.org 2015-03-01 16:56 ` aldyh at gcc dot gnu.org 2015-03-02 4:38 ` law at redhat dot com 2015-03-02 5:22 ` [Bug middle-end/65233] " aldyh at gcc dot gnu.org 2015-03-02 5:38 ` aldyh at gcc dot gnu.org 2015-03-02 5:49 ` aldyh at gcc dot gnu.org 2015-03-02 5:50 ` aldyh at gcc dot gnu.org 2015-03-02 21:41 ` law at redhat dot com 2015-03-03 19:33 ` aldyh at gcc dot gnu.org 2015-03-04 13:27 ` rguenth at gcc dot gnu.org 2015-03-05 8:38 ` 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-65233-4-p9xu9Pjahn@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: linkBe 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).