public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31132]  New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration
@ 2007-03-11 11:56 reichelt at gcc dot gnu dot org
  2007-03-11 11:57 ` [Bug c++/31132] " reichelt at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-03-11 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

=====================================
template<typename T> class A
{
  static int i;
  friend int T::foo();
};

struct B
{
  void foo() { A<B>::i; }
};
=====================================

bug.cc: In instantiation of 'A<B>':
bug.cc:9:   instantiated from here
bug.cc:4: error: prototype for 'int B::foo()' does not match any in class 'B'
bug.cc:9: error: candidate is: void B::foo()
bug.cc:4: error: 'int B::foo()' cannot be overloaded
bug.cc:9: error: with 'void B::foo()'
bug.cc: In member function 'void B::foo()':
bug.cc:9: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_type_parm in template_class_depth,
at cp/pt.c:295
Please submit a full bug report, [etc.]


-- 
           Summary: [4.1/4.2/4.3 regression] ICE on inconsistent friend
                    declaration
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, 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=31132


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

* [Bug c++/31132] [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration
  2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
@ 2007-03-11 11:57 ` reichelt at gcc dot gnu dot org
  2007-03-11 19:55 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-03-11 11:57 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.3


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


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

* [Bug c++/31132] [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration
  2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
  2007-03-11 11:57 ` [Bug c++/31132] " reichelt at gcc dot gnu dot org
@ 2007-03-11 19:55 ` mmitchel at gcc dot gnu dot org
  2007-04-29  6:53 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-03-11 19:55 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


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


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

* [Bug c++/31132] [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration
  2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
  2007-03-11 11:57 ` [Bug c++/31132] " reichelt at gcc dot gnu dot org
  2007-03-11 19:55 ` mmitchel at gcc dot gnu dot org
@ 2007-04-29  6:53 ` pinskia at gcc dot gnu dot org
  2007-08-15 17:07 ` pcarlini at suse dot de
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-29  6:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-04-29 07:52 -------
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         |2007-04-29 07:52:55
               date|                            |


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


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

* [Bug c++/31132] [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration
  2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-04-29  6:53 ` pinskia at gcc dot gnu dot org
@ 2007-08-15 17:07 ` pcarlini at suse dot de
  2007-08-16  9:05 ` paolo at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2007-08-15 17:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pcarlini at suse dot de  2007-08-15 17:07 -------
On it.


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/31132] [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration
  2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-08-15 17:07 ` pcarlini at suse dot de
@ 2007-08-16  9:05 ` paolo at gcc dot gnu dot org
  2007-08-16  9:08 ` [Bug c++/31132] [4.1/4.2 " pcarlini at suse dot de
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-08-16  9:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo at gcc dot gnu dot org  2007-08-16 09:05 -------
Subject: Bug 31132

Author: paolo
Date: Thu Aug 16 09:05:17 2007
New Revision: 127535

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127535
Log:
/cp
2007-08-16  Paolo Carlini  <pcarlini@suse.de>

        PR c++/31132
        * pt.c (tsubst_friend_function): When check_classfn
        returns error_mark_node likewise return it.

/testsuite
2007-08-16  Paolo Carlini  <pcarlini@suse.de>

        PR c++/31132
        * g++.dg/template/crash69.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/template/crash69.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/31132] [4.1/4.2 regression] ICE on inconsistent friend declaration
  2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-08-16  9:05 ` paolo at gcc dot gnu dot org
@ 2007-08-16  9:08 ` pcarlini at suse dot de
  2008-07-04 22:00 ` [Bug c++/31132] [4.2 " jsm28 at gcc dot gnu dot org
  2009-03-30 21:41 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2007-08-16  9:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pcarlini at suse dot de  2007-08-16 09:08 -------
Fixing the problem on 4_1-branch and 4_2-branch depends on fixing 27211...


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |27211
         AssignedTo|pcarlini at suse dot de     |unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.1/4.2/4.3 regression] ICE|[4.1/4.2 regression] ICE on
                   |on inconsistent friend      |inconsistent friend
                   |declaration                 |declaration


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


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

* [Bug c++/31132] [4.2 regression] ICE on inconsistent friend declaration
  2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-08-16  9:08 ` [Bug c++/31132] [4.1/4.2 " pcarlini at suse dot de
@ 2008-07-04 22:00 ` jsm28 at gcc dot gnu dot org
  2009-03-30 21:41 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 22:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jsm28 at gcc dot gnu dot org  2008-07-04 22:00 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2 regression] ICE on |[4.2 regression] ICE on
                   |inconsistent friend         |inconsistent friend
                   |declaration                 |declaration
   Target Milestone|4.1.3                       |4.2.5


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


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

* [Bug c++/31132] [4.2 regression] ICE on inconsistent friend declaration
  2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-07-04 22:00 ` [Bug c++/31132] [4.2 " jsm28 at gcc dot gnu dot org
@ 2009-03-30 21:41 ` jsm28 at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-30 21:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2009-03-30 21:41 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|                            |4.2.5
      Known to work|                            |4.3.0
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


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


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

end of thread, other threads:[~2009-03-30 21:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-11 11:56 [Bug c++/31132] New: [4.1/4.2/4.3 regression] ICE on inconsistent friend declaration reichelt at gcc dot gnu dot org
2007-03-11 11:57 ` [Bug c++/31132] " reichelt at gcc dot gnu dot org
2007-03-11 19:55 ` mmitchel at gcc dot gnu dot org
2007-04-29  6:53 ` pinskia at gcc dot gnu dot org
2007-08-15 17:07 ` pcarlini at suse dot de
2007-08-16  9:05 ` paolo at gcc dot gnu dot org
2007-08-16  9:08 ` [Bug c++/31132] [4.1/4.2 " pcarlini at suse dot de
2008-07-04 22:00 ` [Bug c++/31132] [4.2 " jsm28 at gcc dot gnu dot org
2009-03-30 21:41 ` jsm28 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).