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++/61421] Invalid -O2 optimization breaks program


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61421

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
template<class T> class list2
{
  public:
    struct node {
        node    *next;
        node    *prev;
    };

    node    anchor;

  public:
    /* API */
}

struct Obj : list2<Obj>::node {
    /* obj-specific elements */
}

list2<Obj>    main_list;


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