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]

c++/2334: Bug in C++



>Number:         2334
>Category:       c++
>Synopsis:       Bug in C++
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 21 01:26:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Charles Galambos
>Release:        gcc version 2.95.3 20010315 (release)
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The attached C++ code compiles and works fine with gcc-2.95.2
but failed to compile with gcc-2.95.3

.../gcc-2.95.3/bin/g++ bug2.cc

I've tried to simplify the code further, but without
any luck.  I've tried removing the templates, and taking
out the virtual base class, but both seem to be necessary
to produce the failure.
>How-To-Repeat:

.../gcc-2.95.3/bin/g++ bug2.cc

fails but

.../gcc-2.95.2/bin/g++ bug2.cc

works.
>Fix:
If you take out the required copy constructor the 
code compiles. (The code between #if 0 and #endif 
in the attached file) Unfortunatly you can't then
control the arguments passed to the base classes.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug2.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug2.cc"

CmNsYXNzIERQRW50aXR5QyAKewogcHVibGljOgogIERQRW50aXR5QyhpbnQgbnYpCiAgICA6IHYo
bnYpCiAgICB7fQogIAogIGludCB2Owp9OwoKY2xhc3MgRFBQb3J0QyAKICA6IHZpcnR1YWwgcHVi
bGljIERQRW50aXR5Qwp7CiBwdWJsaWM6CiAgRFBQb3J0QygpCiAgICA6IERQRW50aXR5QygxKQog
ICAge30KICAvLzogRGVmYXVsdCBjb25zdHJ1Y3Rvci4gIAogIAp9OwoKdGVtcGxhdGU8Y2xhc3Mg
RGF0YVQ+CmNsYXNzIERQSVBvcnRDIAogIDogcHVibGljIERQUG9ydEMgCnsKcHVibGljOgogIERQ
SVBvcnRDKCkgCiAgICA6IERQRW50aXR5QygxKQogIHt9CiAgLy86IERlZmF1bHQgY29uc3RydWN0
b3IuCgojaWYgMQogIERQSVBvcnRDKGNvbnN0IERQSVBvcnRDPERhdGFUPiAmb3RoKSAKICAgIDog
RFBFbnRpdHlDKDIpLAogICAgICBEUFBvcnRDKG90aCkKICB7fQogIC8vOiBDb3B5IGNvbnN0cnVj
dG9yLiAgCiNlbmRpZgogIAogIERQSVBvcnRDKGludCBudikgCiAgICA6IERQRW50aXR5QyhudikK
ICB7fQogIC8vOiBEZWZhdWx0IGNvbnN0cnVjdG9yLgoKfTsKCnRlbXBsYXRlPGNsYXNzIE91dFQ+
CmNsYXNzIERQRnVuY0lTdHJlYW1DIDogcHVibGljIERQSVBvcnRDPE91dFQ+IHsKcHVibGljOgog
IERQRnVuY0lTdHJlYW1DKCkgCiAgICA6IERQRW50aXR5QygwKQogICAge30KICAvLzogRGVmYXVs
dCBDb25zdHJ1Y3Rvci4KfTsKCiNpbmNsdWRlIDxpb3N0cmVhbS5oPgoKaW50IG1haW4oKQp7CiAg
RFBJUG9ydEM8aW50PiB5ID0gRFBGdW5jSVN0cmVhbUM8aW50PiAoKTsKICBjZXJyIDw8IHkudiA8
PCAiXG4iOwogIHJldHVybiAwOwp9Cg==


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