[Bug c++/11503] [3.3/3.4 Regression] segfault when instantiating template with ADDR_EXPR
bangerth at dealii dot org
gcc-bugzilla@gcc.gnu.org
Fri Jul 11 20:44:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11503
------- Additional Comments From bangerth at dealii dot org 2003-07-11 20:44 -------
I can't compress the testcase much more:
------------------------------
struct x {
int foo () {}
};
template <class T>
struct vector {
T& bar () {}
};
template <class T>
struct y {
typedef struct {
x t;
} s;
vector<s> array;
int foo ()
{ return array.bar().t.foo(); }
};
int i = y<x>().foo ();
------------------------------------
The most interesting observation is probably that if I replace the
typedef struct {...} s;
stuff with simply
struct s {...};
then the ICE goes away. So maybe it has to do with a bad interaction of
templates and anonymous struct.s
W.
More information about the Gcc-bugs
mailing list