public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12369] New: internal compiler error: segmentation fault
@ 2003-09-22 21:24 zhaojiangbin at yahoo dot com
  2003-09-22 22:12 ` [Bug c++/12369] [3.3 regression] ICE with templates and friends bangerth at dealii dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: zhaojiangbin at yahoo dot com @ 2003-09-22 21:24 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: internal compiler error: segmentation fault
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zhaojiangbin at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org

The following code causes ICE and Segmentation fault on line (1):

struct A {
    template<class T> T* make() { return new T(); }
};
 
struct B {
    friend B* A::make< B >(); // (1)
};

Compilation command line: g++ -o ice.o ice.cc

Output of g++ -v:

Reading specs from /usr/lib/gcc-lib/i386-linux/3.3.1/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i386-linux
Thread model: posix
gcc version 3.3.1 (Debian)


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

* [Bug c++/12369] [3.3 regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
@ 2003-09-22 22:12 ` bangerth at dealii dot org
  2003-09-22 22:56 ` [Bug c++/12369] [3.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: bangerth at dealii dot org @ 2003-09-22 22:12 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lerdsuwa at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2003-09-22 20:58:28
               date|                            |
            Summary|internal compiler error:    |[3.3 regression] ICE with
                   |segmentation fault          |templates and friends
   Target Milestone|---                         |3.3.2


------- Additional Comments From bangerth at dealii dot org  2003-09-22 20:58 -------
Confirmed, this is a regression on the 3.3 branch against
3.2 that compiled this fine. Mainline is fine as well. Here's
what I get with 3.3 compiled with checking enabled:

g/x> /home/bangerth/bin/gcc-3.3*/bin/c++ -c x.cc
x.cc:6: internal compiler error: tree check: expected identifier_node, have
   template_id_expr in grokfndecl, at cp/decl.c:9594
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Kriang, you have done all that great work in this area lately --
is this something that you think is possible to fix on the
release branch?

W.


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
  2003-09-22 22:12 ` [Bug c++/12369] [3.3 regression] ICE with templates and friends bangerth at dealii dot org
@ 2003-09-22 22:56 ` pinskia at gcc dot gnu dot org
  2003-09-23 13:53 ` lerdsuwa at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-22 22:56 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.3 regression] ICE with   |[3.3 Regression] ICE with
                   |templates and friends       |templates and friends


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-22 21:28 -------
>From Phil's regression hunter (when it was fixed on the mainline): Search converges between 
2003-07-15-trunk (#344) and 2003-07-16-trunk (#345).
(MIght have been fixed by <http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00993.html>).


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
  2003-09-22 22:12 ` [Bug c++/12369] [3.3 regression] ICE with templates and friends bangerth at dealii dot org
  2003-09-22 22:56 ` [Bug c++/12369] [3.3 Regression] " pinskia at gcc dot gnu dot org
@ 2003-09-23 13:53 ` lerdsuwa at gcc dot gnu dot org
  2003-09-25 12:51 ` lerdsuwa at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-09-23 13:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


lerdsuwa at gcc dot gnu dot org changed:

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


------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2003-09-23 12:56 -------
This the patch I fixed in the mainline

  http://gcc.gnu.org/ml/gcc-patches/2003-07/msg01682.html

I'll check to see if 3.3 branch needs the same or different
fix.


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (2 preceding siblings ...)
  2003-09-23 13:53 ` lerdsuwa at gcc dot gnu dot org
@ 2003-09-25 12:51 ` lerdsuwa at gcc dot gnu dot org
  2003-10-04  9:08 ` andreas dot meier_ at gmx dot de
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-09-25 12:51 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2003-09-25 12:23 -------
Patch submitted:

  http://gcc.gnu.org/ml/gcc-patches/2003-09/msg01673.html


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (3 preceding siblings ...)
  2003-09-25 12:51 ` lerdsuwa at gcc dot gnu dot org
@ 2003-10-04  9:08 ` andreas dot meier_ at gmx dot de
  2003-10-05 18:34 ` mark at codesourcery dot com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: andreas dot meier_ at gmx dot de @ 2003-10-04  9:08 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


andreas dot meier_ at gmx dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot com


------- Additional Comments From andreas dot meier_ at gmx dot de  2003-10-04 09:08 -------
Patch submitted:

  http://gcc.gnu.org/ml/gcc-patches/2003-09/msg01673.html


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (4 preceding siblings ...)
  2003-10-04  9:08 ` andreas dot meier_ at gmx dot de
@ 2003-10-05 18:34 ` mark at codesourcery dot com
  2003-10-16  9:34 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mark at codesourcery dot com @ 2003-10-05 18:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From mark at codesourcery dot com  2003-10-05 18:34 -------
Subject: Re:  [3.3 Regression] ICE with templates and friends

On Sat, 2003-10-04 at 02:08, andreas dot meier_ at gmx dot de wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12369

This patch is OK for 3.3.

Thanks,


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (5 preceding siblings ...)
  2003-10-05 18:34 ` mark at codesourcery dot com
@ 2003-10-16  9:34 ` cvs-commit at gcc dot gnu dot org
  2003-10-16  9:35 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-16  9:34 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-10-16 09:34 -------
Subject: Bug 12369

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	mmitchel@gcc.gnu.org	2003-10-16 09:34:00

Modified files:
	gcc            : tree.h 
	gcc/cp         : ChangeLog decl.c friend.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: friend25.C 

Log message:
	PR c++/12369
	* g++.dg/template/friend25.C: New test.
	
	PR c++/7939
	* g++.dg/template/crash11.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.367.2.6&r2=1.367.2.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.3076.2.216&r2=1.3076.2.217
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.965.2.63&r2=1.965.2.64
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/friend.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.77.4.2&r2=1.77.4.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.307&r2=1.2261.2.308
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/friend25.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (6 preceding siblings ...)
  2003-10-16  9:34 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-16  9:35 ` mmitchel at gcc dot gnu dot org
  2003-10-16 18:40 ` andreas dot meier_ at gmx dot de
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-10-16  9:35 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-10-16 09:34 -------
Fixed in GCC 3.3.3.


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (7 preceding siblings ...)
  2003-10-16  9:35 ` mmitchel at gcc dot gnu dot org
@ 2003-10-16 18:40 ` andreas dot meier_ at gmx dot de
  2003-10-16 19:03 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: andreas dot meier_ at gmx dot de @ 2003-10-16 18:40 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From andreas dot meier_ at gmx dot de  2003-10-16 18:40 -------
It may be useful to add the testcase to mainline


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (8 preceding siblings ...)
  2003-10-16 18:40 ` andreas dot meier_ at gmx dot de
@ 2003-10-16 19:03 ` mmitchel at gcc dot gnu dot org
  2003-10-17 11:17 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-10-16 19:03 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From mmitchel at gcc dot gnu dot org  2003-10-16 19:03 -------
I'll let Kriang take care of that when he gets back from vacation.


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (9 preceding siblings ...)
  2003-10-16 19:03 ` mmitchel at gcc dot gnu dot org
@ 2003-10-17 11:17 ` cvs-commit at gcc dot gnu dot org
  2003-10-17 11:18 ` lerdsuwa at gcc dot gnu dot org
  2003-10-17 12:38 ` reichelt at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-10-17 11:17 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-10-17 11:14 -------
Subject: Bug 12369

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	lerdsuwa@gcc.gnu.org	2003-10-17 11:14:55

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/template: friend25.C 

Log message:
	PR c++/12369
	* g++.dg/template/friend25.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3127&r2=1.3128
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/friend25.C.diff?cvsroot=gcc&r1=1.1&r2=1.2


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (10 preceding siblings ...)
  2003-10-17 11:17 ` cvs-commit at gcc dot gnu dot org
@ 2003-10-17 11:18 ` lerdsuwa at gcc dot gnu dot org
  2003-10-17 12:38 ` reichelt at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-10-17 11:18 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From lerdsuwa at gcc dot gnu dot org  2003-10-17 11:17 -------
Done.  The testcase is committed to mainline.


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

* [Bug c++/12369] [3.3 Regression] ICE with templates and friends
  2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
                   ` (11 preceding siblings ...)
  2003-10-17 11:18 ` lerdsuwa at gcc dot gnu dot org
@ 2003-10-17 12:38 ` reichelt at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2003-10-17 12:38 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From reichelt at gcc dot gnu dot org  2003-10-17 12:07 -------
Just a remark: It's already fixed in GCC 3.3.2
(and not only in 3.3.3 as Mark wrote in comment 8).


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

end of thread, other threads:[~2003-10-17 12:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-22 21:24 [Bug c++/12369] New: internal compiler error: segmentation fault zhaojiangbin at yahoo dot com
2003-09-22 22:12 ` [Bug c++/12369] [3.3 regression] ICE with templates and friends bangerth at dealii dot org
2003-09-22 22:56 ` [Bug c++/12369] [3.3 Regression] " pinskia at gcc dot gnu dot org
2003-09-23 13:53 ` lerdsuwa at gcc dot gnu dot org
2003-09-25 12:51 ` lerdsuwa at gcc dot gnu dot org
2003-10-04  9:08 ` andreas dot meier_ at gmx dot de
2003-10-05 18:34 ` mark at codesourcery dot com
2003-10-16  9:34 ` cvs-commit at gcc dot gnu dot org
2003-10-16  9:35 ` mmitchel at gcc dot gnu dot org
2003-10-16 18:40 ` andreas dot meier_ at gmx dot de
2003-10-16 19:03 ` mmitchel at gcc dot gnu dot org
2003-10-17 11:17 ` cvs-commit at gcc dot gnu dot org
2003-10-17 11:18 ` lerdsuwa at gcc dot gnu dot org
2003-10-17 12:38 ` 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).