public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40684] New: ICE in tsubst
@ 2009-07-08 15:44 jakub at gcc dot gnu dot org
2009-07-08 20:11 ` [Bug c++/40684] " dodji at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-08 15:44 UTC (permalink / raw)
To: gcc-bugs
// { dg-options "-std=c++0x" }
struct A
{
};
template <typename S, typename T, typename U, typename S::v = &S::v::s>
typename S::A
foo (S c, T t, U u)
{
}
struct B
{
struct C
{
template <typename U>
C (U t)
{
A a;
A b = foo (this, a, t);
}
} c;
B () : c (A ())
{
}
};
int
main ()
{
B f;
}
ICEs in tsubst (seeing ADDR_EXPR there). This is likely invalid testcase,
though the ICE is the only diagnostics issued, whether the original
testcase from http://bugzilla.redhat.com/509596 is valid or not is unclear.
--
Summary: ICE in tsubst
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40684
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40684] ICE in tsubst
2009-07-08 15:44 [Bug c++/40684] New: ICE in tsubst jakub at gcc dot gnu dot org
@ 2009-07-08 20:11 ` dodji at gcc dot gnu dot org
2009-07-09 13:21 ` dodji at redhat dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-07-08 20:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dodji at gcc dot gnu dot org 2009-07-08 20:11 -------
I could reproduce on trunk.
I am testing the patchlet below:
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index b4bd465..d042f98 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -12949,8 +12949,9 @@ type_unification_real (tree tparms,
to explicitly check cxx_dialect here. */
if (TREE_PURPOSE (TREE_VEC_ELT (tparms, i)))
{
- tree arg = tsubst (TREE_PURPOSE (TREE_VEC_ELT (tparms, i)),
- targs, tf_none, NULL_TREE);
+ tree arg = tsubst_template_arg
+ (TREE_PURPOSE (TREE_VEC_ELT (tparms, i)),
+ targs, tf_none, NULL_TREE);
if (arg == error_mark_node)
return 1;
else
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dodji at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-07-08 20:11:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40684
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40684] ICE in tsubst
2009-07-08 15:44 [Bug c++/40684] New: ICE in tsubst jakub at gcc dot gnu dot org
2009-07-08 20:11 ` [Bug c++/40684] " dodji at gcc dot gnu dot org
@ 2009-07-09 13:21 ` dodji at redhat dot com
2009-07-09 17:57 ` dodji at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dodji at redhat dot com @ 2009-07-09 13:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dodji at gcc dot gnu dot org 2009-07-09 13:21 -------
Subject: Re: ICE in tsubst
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The patch was submitted for review at
http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00491.html .
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkpV7n8ACgkQPejI7lrem2FcOQCfT7Fugugl7RggRNEquSTzUvSq
i90An1sHpvnjNJIRRmFnUDD8AYldOWym
=eQuh
-----END PGP SIGNATURE-----
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40684
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40684] ICE in tsubst
2009-07-08 15:44 [Bug c++/40684] New: ICE in tsubst jakub at gcc dot gnu dot org
2009-07-08 20:11 ` [Bug c++/40684] " dodji at gcc dot gnu dot org
2009-07-09 13:21 ` dodji at redhat dot com
@ 2009-07-09 17:57 ` dodji at gcc dot gnu dot org
2009-07-09 18:01 ` dodji at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-07-09 17:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dodji at gcc dot gnu dot org 2009-07-09 17:56 -------
Subject: Bug 40684
Author: dodji
Date: Thu Jul 9 17:56:44 2009
New Revision: 149423
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149423
Log:
2009-07-09 Dodji Seketeli <dodji@redhat.com>
gcc/cp/ChangeLog:
PR c++/40684
* pt.c (type_unification_real): Use tsubst_template_arg instead
of tsubst to substitute default template arguments.
gcc/testsuite/ChangeLog:
PR c++/40684
* g++.dg/template/unify11.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/unify11.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40684
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40684] ICE in tsubst
2009-07-08 15:44 [Bug c++/40684] New: ICE in tsubst jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-07-09 17:57 ` dodji at gcc dot gnu dot org
@ 2009-07-09 18:01 ` dodji at gcc dot gnu dot org
2009-07-09 18:03 ` dodji at gcc dot gnu dot org
2009-07-23 17:41 ` hjl dot tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-07-09 18:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dodji at gcc dot gnu dot org 2009-07-09 18:01 -------
Subject: Bug 40684
Author: dodji
Date: Thu Jul 9 18:00:58 2009
New Revision: 149425
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149425
Log:
2009-07-09 Dodji Seketeli <dodji@redhat.com>
gcc/cp/ChangeLog:
PR c++/40684
* pt.c (type_unification_real): Use tsubst_template_arg instead
of tsubst to substitute default template arguments.
gcc/testsuite/ChangeLog:
PR c++/40684
* gcc/testsuite/g++.dg/template/unify11.C: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/unify11.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/pt.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40684
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40684] ICE in tsubst
2009-07-08 15:44 [Bug c++/40684] New: ICE in tsubst jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-07-09 18:01 ` dodji at gcc dot gnu dot org
@ 2009-07-09 18:03 ` dodji at gcc dot gnu dot org
2009-07-23 17:41 ` hjl dot tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: dodji at gcc dot gnu dot org @ 2009-07-09 18:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dodji at gcc dot gnu dot org 2009-07-09 18:02 -------
Fixed in 4.4.1 and 4.5.
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40684
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/40684] ICE in tsubst
2009-07-08 15:44 [Bug c++/40684] New: ICE in tsubst jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-07-09 18:03 ` dodji at gcc dot gnu dot org
@ 2009-07-23 17:41 ` hjl dot tools at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-07-23 17:41 UTC (permalink / raw)
To: gcc-bugs
--
hjl dot tools at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40684
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-23 17:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-08 15:44 [Bug c++/40684] New: ICE in tsubst jakub at gcc dot gnu dot org
2009-07-08 20:11 ` [Bug c++/40684] " dodji at gcc dot gnu dot org
2009-07-09 13:21 ` dodji at redhat dot com
2009-07-09 17:57 ` dodji at gcc dot gnu dot org
2009-07-09 18:01 ` dodji at gcc dot gnu dot org
2009-07-09 18:03 ` dodji at gcc dot gnu dot org
2009-07-23 17:41 ` hjl dot tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).