public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14032] non type boolean template argument partial specialization to argument in parent never matches
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
@ 2005-10-22 13:57 ` lerdsuwa at gcc dot gnu dot org
  2006-11-09  5:25 ` bangerth at dealii dot org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2005-10-22 13:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from lerdsuwa at gcc dot gnu dot org  2005-10-22 13:57 -------
Won't work on it for a long while.


-- 

lerdsuwa at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|lerdsuwa at gcc dot gnu dot |unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] non type boolean template argument partial specialization to argument in parent never matches
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
  2005-10-22 13:57 ` [Bug c++/14032] non type boolean template argument partial specialization to argument in parent never matches lerdsuwa at gcc dot gnu dot org
@ 2006-11-09  5:25 ` bangerth at dealii dot org
  2006-11-09  5:33 ` [Bug c++/14032] Specialization of inner template using outer template argument doesn't work bangerth at dealii dot org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: bangerth at dealii dot org @ 2006-11-09  5:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from bangerth at dealii dot org  2006-11-09 05:25 -------
*** Bug 29767 has been marked as a duplicate of this bug. ***


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pluto at agmk dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
  2005-10-22 13:57 ` [Bug c++/14032] non type boolean template argument partial specialization to argument in parent never matches lerdsuwa at gcc dot gnu dot org
  2006-11-09  5:25 ` bangerth at dealii dot org
@ 2006-11-09  5:33 ` bangerth at dealii dot org
  2006-11-14 16:31 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: bangerth at dealii dot org @ 2006-11-09  5:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from bangerth at dealii dot org  2006-11-09 05:33 -------
PR29767 made me try whether we can achieve the same wrong effect for
template type parameters, and indeed we can:
--------------------
template <typename T> struct outer { 
    template <typename T2, typename U> 
    struct inner { 
        static int f() { return inner<T,int>::N; }; 
    }; 

    template <typename U> 
    struct inner<T,U> { 
        static const int N = 1; 
    }; 
}; 

int i = outer<int>::inner<double,int>::f(); 
------------------
This compiles with icc, but doesn't with gcc:
g/x> /home/bangerth/bin/gcc-4.2-pre/bin/c++ -c x.cc
x.cc: In static member function &#8216;static int outer<T>::inner<T2, U>::f()
[with T2 = double, U = int, T = int]&#8217;:
x.cc:13:   instantiated from here
x.cc:4: error: &#8216;N&#8217; is not a member of &#8216;outer<int>::inner<int,
int>&#8217;

As PR29767 shows, this can actually lead to wrong code.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|non type boolean template   |Specialization of inner
                   |argument partial            |template using outer
                   |specialization to argument  |template argument doesn't
                   |in parent never matches     |work


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-11-09  5:33 ` [Bug c++/14032] Specialization of inner template using outer template argument doesn't work bangerth at dealii dot org
@ 2006-11-14 16:31 ` pinskia at gcc dot gnu dot org
  2006-11-14 17:40 ` zjasz at yahoo dot com
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-14 16:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-11-14 16:30 -------
*** Bug 29830 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zjasz at yahoo dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2006-11-14 16:31 ` pinskia at gcc dot gnu dot org
@ 2006-11-14 17:40 ` zjasz at yahoo dot com
  2006-11-14 17:46 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: zjasz at yahoo dot com @ 2006-11-14 17:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from zjasz at yahoo dot com  2006-11-14 17:40 -------
(In reply to comment #6)
> Work postponed to GCC 4.1.  This bug is tricky to fix.

What is the status of this bug? Will be resolved in the next release?
For us is critical because a whole framework is built up on this.:,,,(
Unfortunately we don't have any workaround!

/jz


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2006-11-14 17:40 ` zjasz at yahoo dot com
@ 2006-11-14 17:46 ` rguenth at gcc dot gnu dot org
  2006-11-14 17:54 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-11-14 17:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2006-11-14 17:46 -------
Raising severity, some more people in CC.  This at least seems to be an often
reported problem.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2006-11-14 17:46 ` rguenth at gcc dot gnu dot org
@ 2006-11-14 17:54 ` pinskia at gcc dot gnu dot org
  2006-11-14 18:37 ` bangerth at math dot tamu dot edu
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-14 17:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from pinskia at gcc dot gnu dot org  2006-11-14 17:54 -------
(In reply to comment #12)
> Raising severity, some more people in CC.  This at least seems to be an often
> reported problem.

It is not a regression as far as I can tell.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2006-11-14 17:54 ` pinskia at gcc dot gnu dot org
@ 2006-11-14 18:37 ` bangerth at math dot tamu dot edu
  2007-02-16 15:10 ` twhitehe at uwo dot ca
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: bangerth at math dot tamu dot edu @ 2006-11-14 18:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from bangerth at math dot tamu dot edu  2006-11-14 18:37 -------
Subject: Re:  Specialization of inner template using outer template argument
doesn't work


> It is not a regression as far as I can tell.

True. However it does produce wrong code.
W.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2006-11-14 18:37 ` bangerth at math dot tamu dot edu
@ 2007-02-16 15:10 ` twhitehe at uwo dot ca
  2007-02-16 18:40 ` bangerth at dealii dot org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: twhitehe at uwo dot ca @ 2007-02-16 15:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from twhitehe at uwo dot ca  2007-02-16 15:10 -------
This is a duplicate of 4882, however, I don't have the power to mark it as that
(not that that would necessarily be a good thing as this contains more recent
begging and is flagged with a higher priority).


-- 

twhitehe at uwo dot ca changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |twhitehe at uwo dot ca


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2007-02-16 15:10 ` twhitehe at uwo dot ca
@ 2007-02-16 18:40 ` bangerth at dealii dot org
  2007-02-16 18:48 ` bangerth at dealii dot org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: bangerth at dealii dot org @ 2007-02-16 18:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from bangerth at dealii dot org  2007-02-16 18:39 -------
*** Bug 4882 has been marked as a duplicate of this bug. ***


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |duret_g at epita dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2007-02-16 18:40 ` bangerth at dealii dot org
@ 2007-02-16 18:48 ` bangerth at dealii dot org
  2007-08-29  1:01 ` jason at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: bangerth at dealii dot org @ 2007-02-16 18:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from bangerth at dealii dot org  2007-02-16 18:47 -------
If anyone ever fixes this, the various duplicates of this bug
have a number of interesting variants that may be worth adding
to the testsuite as well.

W.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2007-02-16 18:48 ` bangerth at dealii dot org
@ 2007-08-29  1:01 ` jason at gcc dot gnu dot org
  2007-09-04 12:28 ` jason at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-08-29  1:01 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-01-20 00:58:11         |2007-08-29 01:00:33
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2007-08-29  1:01 ` jason at gcc dot gnu dot org
@ 2007-09-04 12:28 ` jason at gcc dot gnu dot org
  2007-09-04 12:28 ` jason at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-09-04 12:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from jason at gcc dot gnu dot org  2007-09-04 12:27 -------
Subject: Bug 14032

Author: jason
Date: Tue Sep  4 12:27:21 2007
New Revision: 128076

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128076
Log:
        PR c++/14032
        * pt.c (most_specialized_class): Substitute outer template
        arguments into the arguments of a member template partial
        specialization.
        (strip_innermost_template_args): New fn.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2007-09-04 12:28 ` jason at gcc dot gnu dot org
@ 2007-09-04 12:28 ` jason at gcc dot gnu dot org
  2007-09-04 15:43 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-09-04 12:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from jason at gcc dot gnu dot org  2007-09-04 12:28 -------
Subject: Bug 14032

Author: jason
Date: Tue Sep  4 12:27:38 2007
New Revision: 128077

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128077
Log:
        PR c++/14032
        * pt.c (most_specialized_class): Substitute outer template
        arguments into the arguments of a member template partial
        specialization.
        (strip_innermost_template_args): New fn.

Added:
    trunk/gcc/testsuite/g++.dg/template/mem-partial1.C
    trunk/gcc/testsuite/g++.dg/template/mem-partial2.C


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2007-09-04 12:28 ` jason at gcc dot gnu dot org
@ 2007-09-04 15:43 ` jason at gcc dot gnu dot org
  2007-09-13 16:06 ` jason at gcc dot gnu dot org
  2007-09-15 15:36 ` reichelt at gcc dot gnu dot org
  16 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-09-04 15:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from jason at gcc dot gnu dot org  2007-09-04 15:43 -------
Subject: Bug 14032

Author: jason
Date: Tue Sep  4 15:43:00 2007
New Revision: 128090

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128090
Log:
        PR c++/14032
        * pt.c (most_specialized_class): Substitute outer template
        arguments into the arguments of a member template partial
        specialization.
        (strip_innermost_template_args): New fn.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/mem-partial1.C
      - copied unchanged from r128077,
trunk/gcc/testsuite/g++.dg/template/mem-partial1.C
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/mem-partial2.C
      - copied unchanged from r128077,
trunk/gcc/testsuite/g++.dg/template/mem-partial2.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/pt.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2007-09-04 15:43 ` jason at gcc dot gnu dot org
@ 2007-09-13 16:06 ` jason at gcc dot gnu dot org
  2007-09-15 15:36 ` reichelt at gcc dot gnu dot org
  16 siblings, 0 replies; 17+ messages in thread
From: jason at gcc dot gnu dot org @ 2007-09-13 16:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from jason at gcc dot gnu dot org  2007-09-13 16:06 -------
Fixed for 4.2.2 and 4.3.0.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|3.3.1 3.2.3 2.95.3 3.4.0    |3.3.1 3.2.3 2.95.3 3.4.0
                   |4.0.0 4.1.2 4.2.0 4.3.0     |4.0.0 4.1.2 4.2.0
      Known to work|                            |4.2.2 4.3.0
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug c++/14032] Specialization of inner template using outer template argument doesn't work
       [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
                   ` (15 preceding siblings ...)
  2007-09-13 16:06 ` jason at gcc dot gnu dot org
@ 2007-09-15 15:36 ` reichelt at gcc dot gnu dot org
  16 siblings, 0 replies; 17+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-09-15 15:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from reichelt at gcc dot gnu dot org  2007-09-15 15:35 -------
*** Bug 10574 has been marked as a duplicate of this bug. ***


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc-bugzilla at contacts dot
                   |                            |eelis dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14032


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-09-15 15:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-14032-7865@http.gcc.gnu.org/bugzilla/>
2005-10-22 13:57 ` [Bug c++/14032] non type boolean template argument partial specialization to argument in parent never matches lerdsuwa at gcc dot gnu dot org
2006-11-09  5:25 ` bangerth at dealii dot org
2006-11-09  5:33 ` [Bug c++/14032] Specialization of inner template using outer template argument doesn't work bangerth at dealii dot org
2006-11-14 16:31 ` pinskia at gcc dot gnu dot org
2006-11-14 17:40 ` zjasz at yahoo dot com
2006-11-14 17:46 ` rguenth at gcc dot gnu dot org
2006-11-14 17:54 ` pinskia at gcc dot gnu dot org
2006-11-14 18:37 ` bangerth at math dot tamu dot edu
2007-02-16 15:10 ` twhitehe at uwo dot ca
2007-02-16 18:40 ` bangerth at dealii dot org
2007-02-16 18:48 ` bangerth at dealii dot org
2007-08-29  1:01 ` jason at gcc dot gnu dot org
2007-09-04 12:28 ` jason at gcc dot gnu dot org
2007-09-04 12:28 ` jason at gcc dot gnu dot org
2007-09-04 15:43 ` jason at gcc dot gnu dot org
2007-09-13 16:06 ` jason at gcc dot gnu dot org
2007-09-15 15:36 ` reichelt at gcc dot gnu dot org

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).