This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/54986] Internal Error: segmentation fault


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54986

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-10-19 14:34:09 UTC ---
A little bit further reduced:

struct A;
struct B
{
  int *_ptr;
  bool operator==(B *p1)
  {
    return p1->_ptr;
  }
};
struct C {
  A* ref_SYMBptr();
};
struct A
{
  B sommet;
};
typedef C *gen_op_context;
struct D
{
  D(gen_op_context) {}
};

D c(0);
const long d = (long)&c;
B *const   e = (B *)&d;

static bool
fn1(C& p1)
{
  return p1.ref_SYMBptr()->sommet == e;
}

void
fn2()
{
  C b;
  fn1(b);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]