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++/11503] [3.3/3.4 Regression] segfault when instantiating template with ADDR_EXPR


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.


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