This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11503] [3.3/3.4 Regression] segfault when instantiating template with ADDR_EXPR
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2003 20:44:04 -0000
- Subject: [Bug c++/11503] [3.3/3.4 Regression] segfault when instantiating template with ADDR_EXPR
- References: <20030711191311.11503.zlomek@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.