This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34824] ICE with explicit copy constructor
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2008 12:26:53 -0000
- Subject: [Bug c++/34824] ICE with explicit copy constructor
- References: <bug-34824-15653@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-01-17 12:26 -------
Confirmed. Even if it doesn't look like it makes sense to have an explicit
copy constructor, the standard does not seem to prohibit this.
But,
B f(A const &a) { return B(a); }
invokes the copy constructor for B, and thus would raise an error.
A diagnostic is missing.
Interestingly EDG ICEs as well ;)
/icpc -strict_ansi -S t.C
icpc: error: Fatal error in
/suse/rguenther/bin/opt/intel/cce/9.1.039/bin/mcpcom, terminated by
segmentation violation
compilation aborted for t.C (code 1)
2.95 wrongly accepts this code, but doesn't ICE. So not a regression
IMHO.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic, ice-on-invalid-
| |code
Known to fail| |3.3.6 4.1.3 4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2008-01-17 12:26:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34824