/* { dg-do compile } */ /* { dg-options "-O2 -Wstrict-aliasing" } */ #include struct A { virtual ~A(); }; A* foo(); void bar(std::list x) { std::list y = x; if (*y.rbegin()) delete foo(); }