* [Bug c++/26988] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
@ 2006-04-02 16:21 ` pinskia at gcc dot gnu dot org
2006-04-18 3:45 ` bangerth at dealii dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-02 16:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-04-02 16:21 -------
Related to PR 9050.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |9050
Summary|template function in |template constructor in
|template class derived from |template class derived from
|virtual base can not be |virtual base can not be
|specialized |specialized
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
2006-04-02 16:21 ` [Bug c++/26988] template constructor " pinskia at gcc dot gnu dot org
@ 2006-04-18 3:45 ` bangerth at dealii dot org
2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2006-04-18 3:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from bangerth at dealii dot org 2006-04-18 03:45 -------
Confirmed, though this doesn't seem to have anything to do with PR 9050.
Here's a shorter testcase:
--------------
struct B{};
struct Bar : virtual B {
template <typename T> Bar( T const& cast );
};
template <> Bar::Bar( int const & cast ) {}
template <typename T>
struct Foo : virtual B {
template <typename T1> Foo( T1 const& cast );
};
template< > template< >
Foo< char >::Foo( int const & cast ) {}
---------------------
g/x> /home/bangerth/bin/gcc-4.1-pre/bin/c++ -c x.cc
x.cc:7: error: template-id ‘Bar<>’ for ‘Bar::Bar(const
int&)’ does not match any template declaration
x.cc:7: error: invalid function declaration
x.cc:15: error: template-id ‘Foo<>’ for ‘Foo<char>::Foo(const
int&)’ does not match any template declaration
x.cc:15: error: invalid function declaration
The thing that makes me think that this has nothing to do with 9050 is that
if the inheritance is made non-virtual, then the bug goes away. That's
certainly odd behavior -- this is a bug in semantic analysis, not in the
parser!
This used to work in 2.95, so is a regression of rejects-valid kind.
W.
--
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bangerth at dealii dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Known to fail| |3.3.5 3.4.4 4.0.1 4.1.0
Known to work| |2.95
Priority|P3 |P2
Last reconfirmed|0000-00-00 00:00:00 |2006-04-18 03:45:10
date| |
Target Milestone|--- |4.1.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
2006-04-02 16:21 ` [Bug c++/26988] template constructor " pinskia at gcc dot gnu dot org
2006-04-18 3:45 ` bangerth at dealii dot org
@ 2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
2006-09-17 19:34 ` [Bug c++/26988] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25 2:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mmitchel at gcc dot gnu dot org 2006-05-25 02:34 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.1 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.0/4.1/4.2 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (2 preceding siblings ...)
2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
@ 2006-09-17 19:34 ` pinskia at gcc dot gnu dot org
2007-01-11 4:05 ` [Bug c++/26988] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-17 19:34 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|template constructor in |[4.0/4.1/4.2 Regression]
|template class derived from |template constructor in
|virtual base can not be |template class derived from
|specialized |virtual base can not be
| |specialized
Target Milestone|4.1.2 |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.0/4.1/4.2/4.3 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (3 preceding siblings ...)
2006-09-17 19:34 ` [Bug c++/26988] [4.0/4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2007-01-11 4:05 ` mmitchel at gcc dot gnu dot org
2007-02-03 16:45 ` gdr at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-01-11 4:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2007-01-11 04:05 -------
The problem here is that we are not skipping artificial arguments (other than
the "this" pointer) when trying to match the specialization. The additional
parameters for constructors for classes with virtual bases are therefore
confusing the compiler.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.0/4.1/4.2/4.3 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (4 preceding siblings ...)
2007-01-11 4:05 ` [Bug c++/26988] [4.0/4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
@ 2007-02-03 16:45 ` gdr at gcc dot gnu dot org
2007-02-03 20:28 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 16:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from gdr at gcc dot gnu dot org 2007-02-03 16:45 -------
Won't fix in GCC-4.0.x Adjusting milestone.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.4 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.0/4.1/4.2/4.3 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (5 preceding siblings ...)
2007-02-03 16:45 ` gdr at gcc dot gnu dot org
@ 2007-02-03 20:28 ` pinskia at gcc dot gnu dot org
2007-02-11 20:15 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-03 20:28 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.3 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.0/4.1/4.2/4.3 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (6 preceding siblings ...)
2007-02-03 20:28 ` pinskia at gcc dot gnu dot org
@ 2007-02-11 20:15 ` mmitchel at gcc dot gnu dot org
2007-02-11 21:41 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-11 20:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mmitchel at gcc dot gnu dot org 2007-02-11 20:15 -------
Subject: Bug 26988
Author: mmitchel
Date: Sun Feb 11 20:15:13 2007
New Revision: 121822
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121822
Log:
PR c++/26988
* pt.c (determine_specialization): Use skip_artificial_parms_for.
(fn_type_unificiation): Likewise.
(get_bindings): Likewise.
PR c++/26988
* g++.dg/template/spec34.C: New test
Added:
trunk/gcc/testsuite/g++.dg/template/spec34.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.0/4.1/4.2/4.3 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (7 preceding siblings ...)
2007-02-11 20:15 ` mmitchel at gcc dot gnu dot org
@ 2007-02-11 21:41 ` mmitchel at gcc dot gnu dot org
2007-02-11 21:41 ` [Bug c++/26988] [4.0/4.1 " mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-11 21:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from mmitchel at gcc dot gnu dot org 2007-02-11 21:41 -------
Subject: Bug 26988
Author: mmitchel
Date: Sun Feb 11 21:40:56 2007
New Revision: 121826
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121826
Log:
PR c++/26988
* pt.c (determine_specialization): Use skip_artificial_parms_for.
(fn_type_unificiation): Likewise.
(get_bindings): Likewise.
PR c++/26988
* g++.dg/template/spec34.C: New test
Added:
branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/spec34.C
Modified:
branches/gcc-4_2-branch/gcc/cp/ChangeLog
branches/gcc-4_2-branch/gcc/cp/pt.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.0/4.1 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (8 preceding siblings ...)
2007-02-11 21:41 ` mmitchel at gcc dot gnu dot org
@ 2007-02-11 21:41 ` mmitchel at gcc dot gnu dot org
2007-02-14 9:10 ` mmitchel at gcc dot gnu dot org
2008-07-04 15:27 ` [Bug c++/26988] [4.1 " jsm28 at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-11 21:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from mmitchel at gcc dot gnu dot org 2007-02-11 21:41 -------
Fixed in 4.2.0, 4.3.0.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1/4.2/4.3 Regression]|[4.0/4.1 Regression]
|template constructor in |template constructor in
|template class derived from |template class derived from
|virtual base can not be |virtual base can not be
|specialized |specialized
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.0/4.1 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (9 preceding siblings ...)
2007-02-11 21:41 ` [Bug c++/26988] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2007-02-14 9:10 ` mmitchel at gcc dot gnu dot org
2008-07-04 15:27 ` [Bug c++/26988] [4.1 " jsm28 at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:10 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/26988] [4.1 Regression] template constructor in template class derived from virtual base can not be specialized
2006-04-02 15:05 [Bug c++/26988] New: template function in template class derived from virtual base can not be specialized nuttygraphics at yahoo dot com
` (10 preceding siblings ...)
2007-02-14 9:10 ` mmitchel at gcc dot gnu dot org
@ 2008-07-04 15:27 ` jsm28 at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 15:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jsm28 at gcc dot gnu dot org 2008-07-04 15:26 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|3.3.5 3.4.4 4.0.1 4.0.4 |3.3.5 3.4.4 4.0.1 4.0.4
|4.1.0 |4.1.0 4.1.3
Known to work|2.95 |2.95 4.2.0 4.3.0
Resolution| |FIXED
Target Milestone|4.1.3 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26988
^ permalink raw reply [flat|nested] 13+ messages in thread