public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29732]  New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration
@ 2006-11-05 23:13 reichelt at gcc dot gnu dot org
  2006-11-05 23:20 ` [Bug c++/29732] " reichelt at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-11-05 23:13 UTC (permalink / raw)
  To: gcc-bugs

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

=================================================
struct A
{
  template<int> template<typename T> friend void foo(T) {}
  void bar() { foo(0); }
};
=================================================

bug.cc: In member function 'void A::bar()':
bug.cc:4: internal compiler error: in retrieve_specialization, at cp/pt.c:847
Please submit a full bug report, [etc.]


-- 
           Summary: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend
                    declaration
           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=29732


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

* [Bug c++/29732] [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
@ 2006-11-05 23:20 ` reichelt at gcc dot gnu dot org
  2006-11-12 20:39 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-11-05 23:20 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=29732


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

* [Bug c++/29732] [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
  2006-11-05 23:20 ` [Bug c++/29732] " reichelt at gcc dot gnu dot org
@ 2006-11-12 20:39 ` mmitchel at gcc dot gnu dot org
  2006-11-26  0:22 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-11-12 20:39 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/29732] [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
  2006-11-05 23:20 ` [Bug c++/29732] " reichelt at gcc dot gnu dot org
  2006-11-12 20:39 ` mmitchel at gcc dot gnu dot org
@ 2006-11-26  0:22 ` pinskia at gcc dot gnu dot org
  2006-12-07 18:11 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-26  0:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-11-26 00:22 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-26 00:22:09
               date|                            |


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


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

* [Bug c++/29732] [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-11-26  0:22 ` pinskia at gcc dot gnu dot org
@ 2006-12-07 18:11 ` mmitchel at gcc dot gnu dot org
  2006-12-08  6:27 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-07 18:11 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=29732


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

* [Bug c++/29732] [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-12-07 18:11 ` mmitchel at gcc dot gnu dot org
@ 2006-12-08  6:27 ` mmitchel at gcc dot gnu dot org
  2006-12-08  8:10 ` [Bug c++/29732] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-08  6:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mmitchel at gcc dot gnu dot org  2006-12-08 06:27 -------
Subject: Bug 29732

Author: mmitchel
Date: Fri Dec  8 06:27:22 2006
New Revision: 119649

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119649
Log:
        PR c++/29732
        * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
        (explicit_class_specialization_p): Declare.
        * pt.c (explicit_class_specialization_p): New function.
        * parser.c (cp_parser_init_declarator): Check correct number of
        template parameters for in-class function definitions.
        (cp_parser_check_declrator_template_parameters): Stop looking for
        template classes when we find an explicit specialization.
        PR c++/29732
        * g++.dg/template/crash65.C: New test.
        * g++.dg/template/spec16.C: Tweak error markers.

Added:
    trunk/gcc/testsuite/g++.dg/template/crash65.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/template/spec16.C


-- 


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


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

* [Bug c++/29732] [4.0/4.1/4.2 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-12-08  6:27 ` mmitchel at gcc dot gnu dot org
@ 2006-12-08  8:10 ` mmitchel at gcc dot gnu dot org
  2006-12-10 23:48 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-08  8:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mmitchel at gcc dot gnu dot org  2006-12-08 08:10 -------
Fixed in 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/4.2 regression] ICE
                   |ICE on invalid friend       |on invalid friend
                   |declaration                 |declaration


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


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

* [Bug c++/29732] [4.0/4.1/4.2 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-12-08  8:10 ` [Bug c++/29732] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
@ 2006-12-10 23:48 ` mmitchel at gcc dot gnu dot org
  2006-12-12  1:47 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-10 23:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2006-12-10 23:48 -------
Subject: Bug 29732

Author: mmitchel
Date: Sun Dec 10 23:48:13 2006
New Revision: 119719

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119719
Log:
        PR c++/29732
        * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
        (explicit_class_specialization_p): Declare.
        * pt.c (explicit_class_specialization_p): New function.
        * parser.c (cp_parser_init_declarator): Check correct number of
        template parameters for in-class function definitions.
        (cp_parser_check_declarator_template_parameters): Stop looking for
        template classes when we find an explicit specialization.

        PR c++/29732
        * g++.dg/template/crash65.C: New test.
        * g++.dg/template/spec16.C: Tweak error markers.

        PR c++/29732
        * testsuite/ext/pb_assoc/example/mapping_level_neg.cc: Tweak error
        markers. 

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/crash65.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/cp-tree.h
    branches/gcc-4_1-branch/gcc/cp/parser.c
    branches/gcc-4_1-branch/gcc/cp/pt.c
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/spec16.C
    branches/gcc-4_1-branch/libstdc++-v3/ChangeLog
   
branches/gcc-4_1-branch/libstdc++-v3/testsuite/ext/pb_assoc/example/mapping_level_neg.cc


-- 


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


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

* [Bug c++/29732] [4.0/4.1/4.2 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-12-10 23:48 ` mmitchel at gcc dot gnu dot org
@ 2006-12-12  1:47 ` mmitchel at gcc dot gnu dot org
  2006-12-12  1:53 ` [Bug c++/29732] [4.0 " mmitchel at gcc dot gnu dot org
  2007-02-03 20:55 ` gdr at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-12  1:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2006-12-12 01:47 -------
Subject: Bug 29732

Author: mmitchel
Date: Tue Dec 12 01:46:57 2006
New Revision: 119759

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119759
Log:
        PR c++/29732
        * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
        (explicit_class_specialization_p): Declare.
        * pt.c (explicit_class_specialization_p): New function.
        * parser.c (cp_parser_init_declarator): Check correct number of
        template parameters for in-class function definitions.
        (cp_parser_check_declarator_template_parameters): Stop looking for
        template classes when we find an explicit specialization.
        PR c++/29732
        * g++.dg/template/crash65.C: New test.
        * g++.dg/template/spec16.C: Tweak error markers.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/crash65.C
Modified:
    branches/gcc-4_2-branch/gcc/cp/ChangeLog
    branches/gcc-4_2-branch/gcc/cp/cp-tree.h
    branches/gcc-4_2-branch/gcc/cp/parser.c
    branches/gcc-4_2-branch/gcc/cp/pt.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_2-branch/gcc/testsuite/g++.dg/template/spec16.C


-- 


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


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

* [Bug c++/29732] [4.0 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-12-12  1:47 ` mmitchel at gcc dot gnu dot org
@ 2006-12-12  1:53 ` mmitchel at gcc dot gnu dot org
  2007-02-03 20:55 ` gdr at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-12-12  1:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2006-12-12 01:53 -------
Fixed in 4.1.2, 4.2.0.


-- 

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/4.2 regression] ICE|[4.0 regression] ICE on
                   |on invalid friend           |invalid friend declaration
                   |declaration                 |


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


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

* [Bug c++/29732] [4.0 regression] ICE on invalid friend declaration
  2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-12-12  1:53 ` [Bug c++/29732] [4.0 " mmitchel at gcc dot gnu dot org
@ 2007-02-03 20:55 ` gdr at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 20:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from gdr at gcc dot gnu dot org  2007-02-03 20:55 -------
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=29732


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

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-05 23:13 [Bug c++/29732] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid friend declaration reichelt at gcc dot gnu dot org
2006-11-05 23:20 ` [Bug c++/29732] " reichelt at gcc dot gnu dot org
2006-11-12 20:39 ` mmitchel at gcc dot gnu dot org
2006-11-26  0:22 ` pinskia at gcc dot gnu dot org
2006-12-07 18:11 ` mmitchel at gcc dot gnu dot org
2006-12-08  6:27 ` mmitchel at gcc dot gnu dot org
2006-12-08  8:10 ` [Bug c++/29732] [4.0/4.1/4.2 " mmitchel at gcc dot gnu dot org
2006-12-10 23:48 ` mmitchel at gcc dot gnu dot org
2006-12-12  1:47 ` mmitchel at gcc dot gnu dot org
2006-12-12  1:53 ` [Bug c++/29732] [4.0 " mmitchel at gcc dot gnu dot org
2007-02-03 20:55 ` 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).