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] New: [5 Regression] ICE (segfault) on arm-linux-gnueabihf
Date: Fri, 27 Feb 2015 10:21:00 -0000	[thread overview]
Message-ID: <bug-65233-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 65233
           Summary: [5 Regression] ICE (segfault) on arm-linux-gnueabihf
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

seen when building ardour on armhf, r220999

$ g++ -c -O3 audio_track.ii
audio_track.ii: In function 'void export_stuff()':
audio_track.ii:71:6: internal compiler error: Segmentation fault
 void export_stuff() {
      ^
Please submit a full bug report,
with preprocessed source if appropriate.

(gdb) bt
#0  0x005ebd8e in integer_zerop(tree_node const*) ()
#1  0x003a1a2e in walk_ssa_copies(tree_node*, hash_set<tree_node*,
default_hashset_traits>**) ()
#2  0x003a27a0 in
ipa_polymorphic_call_context::ipa_polymorphic_call_context(tree_node*,
tree_node*, gimple_statement_base*, tree_node**) ()
#3  0x0034f028 in fold_stmt_1(gimple_stmt_iterator*, bool, tree_node*
(*)(tree_node*)) ()
#4  0x004c9070 in replace_uses_by(tree_node*, tree_node*) ()
#5  0x004c9554 in gimple_merge_blocks(basic_block_def*, basic_block_def*) ()
#6  0x0028242c in merge_blocks(basic_block_def*, basic_block_def*) ()
#7  0x004ce264 in cleanup_tree_cfg_bb(basic_block_def*) ()
#8  0x004ce6d8 in cleanup_tree_cfg() ()
#9  0x00432232 in execute_function_todo(function*, void*) ()
#10 0x004326b8 in execute_todo(unsigned int) ()
#11 0x00433f88 in execute_one_pass(opt_pass*) ()
#12 0x00434220 in execute_pass_list_1(opt_pass*) [clone .constprop.59] ()
#13 0x0043422a in execute_pass_list_1(opt_pass*) [clone .constprop.59] ()
#14 0x00434258 in execute_pass_list(function*, opt_pass*) ()
#15 0x00298a2a in cgraph_node::expand() ()
#16 0x0029a4b0 in symbol_table::compile() [clone .part.42] ()
#17 0x0029a6ec in symbol_table::finalize_compilation_unit() ()
#18 0x001a3210 in cp_write_global_declarations() ()
#19 0x004a916a in compile_file() ()
#20 0x00156ec2 in toplev::main(int, char**) ()
#21 0x00157914 in main ()

$ cat audio_track.ii
template <class> class A;
class B;
struct C {
  A<B> &operator*();
};
int a;
class D {
public:
  virtual void m_fn1() {}
  void m_fn2() { m_fn1(); }
};

class shared_count {
  D *pi_;

public:
  shared_count() : pi_() {}
  ~shared_count() {
    if (pi_)
      pi_->m_fn2();
  }
  shared_count(shared_count const &p1) : pi_(p1.pi_) {
    if (pi_)
      __sync_fetch_and_add(&a, 1);
  }
  void m_fn3(shared_count &p1) {
    D *b = p1.pi_;
    p1.pi_ = pi_;
    pi_ = b;
  }
};

class G;
struct F {
  typedef G *type;
};
template <class T> class A {
  typedef A this_type;

public:
  typedef T element_type;
  A() {}
  template <class Y> A(A<Y> &p1, element_type *p2) : px(p2), pn(p1.pn) {}
  A &operator=(A p1) {
    this_type(p1).m_fn5(*this);
    return *this;
  }
  element_type *m_fn4();
  typedef element_type *this_type::*unspecified_bool_type;
  operator unspecified_bool_type() { return px ? 0 : &this_type::px; }
  void m_fn5(A &p1) {
    p1.px = px;
    pn.m_fn3(p1.pn);
  }
  element_type *px;
  shared_count pn;
};

template <class, class U> A<G> dynamic_pointer_cast(A<U> &p1) {
  G *p = dynamic_cast<G *>(p1.m_fn4());
  return p ? A<G>(p1, p) : A<G>();
}

class B {
public:
  void m_fn7();
  virtual void m_fn6();
};
class G : public B {};
F::type c;
void export_stuff() {
  C i;
  for (;;) {
    A<G> d;
    if (d = dynamic_pointer_cast<G>(*i))
      c->m_fn7();
  }
}


             reply	other threads:[~2015-02-27  8:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-27 10:21 doko at gcc dot gnu.org [this message]
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
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@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).