public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29729]  New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
@ 2006-11-05 20:30 reichelt at gcc dot gnu dot org
  2006-11-05 23:19 ` [Bug c++/29729] " reichelt at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-11-05 20:30 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE since GCC 3.0:

=================================================
template<typename T> void foo(T)
{
  struct A
  {
    template<int> struct B
    {
      typedef B<0> C;
    };
  };
}
=================================================

bug.cc: In function 'void foo(T)':
bug.cc:1: internal compiler error: in tsubst, at cp/pt.c:7337
Please submit a full bug report, [etc.]


-- 
           Summary: [4.0/4.1/4.2/4.3 regression] ICE with template class in
                    template function
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/29729] [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
@ 2006-11-05 23:19 ` reichelt at gcc dot gnu dot org
  2006-11-07  1:04 ` bangerth at dealii dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-11-05 23:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.4


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


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

* [Bug c++/29729] [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
  2006-11-05 23:19 ` [Bug c++/29729] " reichelt at gcc dot gnu dot org
@ 2006-11-07  1:04 ` bangerth at dealii dot org
  2006-11-07  1:10 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2006-11-07  1:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bangerth at dealii dot org  2006-11-07 01:04 -------
Why exactly is this invalid again?
W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org


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


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

* [Bug c++/29729] [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
  2006-11-05 23:19 ` [Bug c++/29729] " reichelt at gcc dot gnu dot org
  2006-11-07  1:04 ` bangerth at dealii dot org
@ 2006-11-07  1:10 ` pinskia at gcc dot gnu dot org
  2006-11-07  4:38 ` bangerth at dealii dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-07  1:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-11-07 01:10 -------
(In reply to comment #1)
> Why exactly is this invalid again?
Because local types cannot be templates.


-- 


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


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

* [Bug c++/29729] [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-11-07  1:10 ` pinskia at gcc dot gnu dot org
@ 2006-11-07  4:38 ` bangerth at dealii dot org
  2006-11-12 20:38 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2006-11-07  4:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bangerth at dealii dot org  2006-11-07 04:38 -------
(In reply to comment #2)
> (In reply to comment #1)
> > Why exactly is this invalid again?
> Because local types cannot be templates.

I don't think that's true. A local type cannot be a template
argument (14.3.1/2) but I can't find why local types can't be
templates.

In any case, I can confirm the ICE.

W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-07 04:38:21
               date|                            |


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


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

* [Bug c++/29729] [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-11-07  4:38 ` bangerth at dealii dot org
@ 2006-11-12 20:38 ` mmitchel at gcc dot gnu dot org
  2006-12-05 21:50 ` mmitchel 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 @ 2006-11-12 20:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2006-11-12 20:38 -------
>From [temp.mem]:

"A local class shall not have member templates."

Therefore, this is indeed invalid.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/29729] [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-11-12 20:38 ` mmitchel at gcc dot gnu dot org
@ 2006-12-05 21:50 ` mmitchel at gcc dot gnu dot org
  2006-12-06  5:13 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-05 21:50 UTC (permalink / raw)
  To: gcc-bugs



-- 

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=29729


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

* [Bug c++/29729] [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-12-05 21:50 ` mmitchel at gcc dot gnu dot org
@ 2006-12-06  5:13 ` mmitchel at gcc dot gnu dot org
  2006-12-06 17:41 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-06  5:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2006-12-06 05:12 -------
Subject: Bug 29729

Author: mmitchel
Date: Wed Dec  6 05:12:46 2006
New Revision: 119575

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119575
Log:
        PR c++/29729
        * decl2.c (check_member_template): Move check for member
        templates in local classes to ...
        * parser.c (cp_parser_template_declaration_after_export):
        ... here.
        PR c++/29729
        * g++.dg/template/crash63.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/template/crash63.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl2.c
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/29729] [4.0/4.1/4.2/4.3 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-12-06  5:13 ` mmitchel at gcc dot gnu dot org
@ 2006-12-06 17:41 ` mmitchel at gcc dot gnu dot org
  2006-12-06 17:42 ` [Bug c++/29729] [4.0/4.1 " 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 @ 2006-12-06 17:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2006-12-06 17:41 -------
Subject: Bug 29729

Author: mmitchel
Date: Wed Dec  6 17:41:29 2006
New Revision: 119586

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119586
Log:
        PR c++/29729
        * decl2.c (check_member_template): Move check for member
        templates in local classes to ...
        * parser.c (cp_parser_template_declaration_after_export):
        ... here.
        PR c++/29729
        * g++.dg/template/crash63.C: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/crash63.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/decl2.c
    branches/gcc-4_2-branch/gcc/cp/parser.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/29729] [4.0/4.1 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-12-06 17:41 ` mmitchel at gcc dot gnu dot org
@ 2006-12-06 17:42 ` mmitchel at gcc dot gnu dot org
  2006-12-06 21:05 ` 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 @ 2006-12-06 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from mmitchel at gcc dot gnu dot org  2006-12-06 17:42 -------
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] ICE
                   |ICE with template class in  |with template class in
                   |template function           |template function


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


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

* [Bug c++/29729] [4.0/4.1 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-12-06 17:42 ` [Bug c++/29729] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2006-12-06 21:05 ` mmitchel at gcc dot gnu dot org
  2006-12-06 21:18 ` [Bug c++/29729] [4.0 " mmitchel at gcc dot gnu dot org
  2007-02-03 20:50 ` gdr at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-06 21:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from mmitchel at gcc dot gnu dot org  2006-12-06 21:05 -------
Subject: Bug 29729

Author: mmitchel
Date: Wed Dec  6 21:04:52 2006
New Revision: 119597

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119597
Log:
        PR c++/29729
        * decl2.c (check_member_template): Move check for member
        templates in local classes to ...
        * parser.c (cp_parser_template_declaration_after_export):
        ... here.
        PR c++/29729
        * g++.dg/template/crash63.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/crash63.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/decl2.c
    branches/gcc-4_1-branch/gcc/cp/parser.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/29729] [4.0 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-12-06 21:05 ` mmitchel at gcc dot gnu dot org
@ 2006-12-06 21:18 ` mmitchel at gcc dot gnu dot org
  2007-02-03 20:50 ` gdr at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-06 21:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from mmitchel at gcc dot gnu dot org  2006-12-06 21:17 -------
Fixed in 4.1.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.0/4.1 regression] ICE    |[4.0 regression] ICE with
                   |with template class in      |template class in template
                   |template function           |function


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


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

* [Bug c++/29729] [4.0 regression] ICE with template class in template function
  2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-12-06 21:18 ` [Bug c++/29729] [4.0 " mmitchel at gcc dot gnu dot org
@ 2007-02-03 20:50 ` gdr at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 20:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from gdr at gcc dot gnu dot org  2007-02-03 20:50 -------
Fixed in GCC-4.1.2.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.0.4                       |4.1.2


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


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

end of thread, other threads:[~2007-02-03 20:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-05 20:30 [Bug c++/29729] New: [4.0/4.1/4.2/4.3 regression] ICE with template class in template function reichelt at gcc dot gnu dot org
2006-11-05 23:19 ` [Bug c++/29729] " reichelt at gcc dot gnu dot org
2006-11-07  1:04 ` bangerth at dealii dot org
2006-11-07  1:10 ` pinskia at gcc dot gnu dot org
2006-11-07  4:38 ` bangerth at dealii dot org
2006-11-12 20:38 ` mmitchel at gcc dot gnu dot org
2006-12-05 21:50 ` mmitchel at gcc dot gnu dot org
2006-12-06  5:13 ` mmitchel at gcc dot gnu dot org
2006-12-06 17:41 ` mmitchel at gcc dot gnu dot org
2006-12-06 17:42 ` [Bug c++/29729] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2006-12-06 21:05 ` mmitchel at gcc dot gnu dot org
2006-12-06 21:18 ` [Bug c++/29729] [4.0 " mmitchel at gcc dot gnu dot org
2007-02-03 20:50 ` gdr 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).