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 middle-end/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break strict-aliasing



------- Comment #3 from paolo dot carlini at oracle dot com  2009-01-30 16:57 -------
In the meanwhile the patch for PR38503 has been installed and unfortunately I
have to report that this issue seems indeed different, eg, this testcase is
still not fixed on x86_64-linux:

#include <string>
#include <list>

class A;

class B {
public:
    void foo(A&);
    std::string s;
};

class A {
public:
    A& qaz() {
        l.push_back( new A() );
        return *l.back();
    }
    std::list<A*> l;
};

void bar()
{
    A a;
    B b;
    b.foo(a.qaz());
}


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-30 16:57:42
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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