This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49519] [4.7 Regression] Revision 175272 miscompiled 447.dealII in SPEC CPU 2006
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Jun 2011 04:41:32 +0000
- Subject: [Bug c++/49519] [4.7 Regression] Revision 175272 miscompiled 447.dealII in SPEC CPU 2006
- Auto-submitted: auto-generated
- References: <bug-49519-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49519
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-06-24 04:41:09 UTC ---
Revert this patch:
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 4d2caa8..2716f78 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -10246,7 +10246,7 @@ tsubst_arg_types (tree arg_types,
/* Do array-to-pointer, function-to-pointer conversion, and ignore
top-level qualifiers as required. */
- type = TYPE_MAIN_VARIANT (type_decays_to (type));
+ type = cv_unqualified (type_decays_to (type));
/* We do not substitute into default arguments here. The standard
mandates that they be instantiated only when needed, which is
fixes the crash.