This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18436] [3.4/4.0 Regression] ICE in perform_or_defer_access_check (binfo is NULL)
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Nov 2004 10:35:27 -0000
- Subject: [Bug c++/18436] [3.4/4.0 Regression] ICE in perform_or_defer_access_check (binfo is NULL)
- References: <20041112001014.18436.sylvain.pion@sophia.inria.fr>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jakub at gcc dot gnu dot org 2004-11-12 10:35 -------
I see segfault in perform_or_defer_access_check too, on:
template <class T1, class T2>
struct P
{
T1 t1;
T2 t2;
P () : t1(), t2() { }
template <class U1, class U2>
P (const P<U1, U2> &x) : t1(x.t1), t2(x.t2) { }
};
template <typename T>
inline void
f (T &x, T &y)
{
const T t = x; x = y; y = t;
}
template <class T>
struct A
{
static void f (T &x, T &y) { T t = x; x = y; y = t; }
};
template <class T>
struct B : public A<T>
{
static void g (T *x, T *y) { f (*y, *x); }
};
int
foo ()
{
P<long, long> *a, *b;
B<P<long, long> >::g (a, b);
}
Works with GCC 3.3, segfaults with 3.4.3 and 4.0 current.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18436