Bug#219505: g++-3.3: g++ 3.3 miscompiles somes *&
Package: g++-3.3
Version: 1:3.3.2-3
Severity: normal
The following code is miscompiled. Both cloned::cloned and cloned::log
should point to the same thing, but cloned::log doesn't point to
cloned::cloned. This is not a problem in g++3.2 or g++2.95.
James A. Morrison
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux orino 2.6.0-test7 #3 Fri Oct 17 18:50:53 EDT 2003 i686
Locale: LANG=C, LC_CTYPE=C
Versions of packages g++-3.3 depends on:
ii gcc-3.3 1:3.3.2-3 The GNU C compiler
ii gcc-3.3-base 1:3.3.2-3 The GNU Compiler Collection (base
ii libc6 2.3.2.ds1-9 GNU C Library: Shared libraries an
ii libstdc++5-3.3-dev 1:3.3.2-3 The GNU Standard C++ Library v3 (d
-- no debconf information
#include <wvstreams/wvlog.h>
#include <wvstreams/wvstreamclone.h>
#include <iostream>
class cloner : WvStreamClone
{
WvLog *&log;
public:
cloner() : WvStreamClone(0), log(static_cast<WvLog*>(cloned)) {
printf("HI");
printf("bye %p:%p\n", &cloned, &log); }
virtual ~cloner() { }
virtual bool isok() const { if (log) return log->isok(); else return false; }
};
int main(int argc, char *argv[])
{
WvLog *log = new WvLog("Kick Me!");
cloner kickme;
return 0;
}
Reply to: