public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23219] New: ICE: Segmentation fault
@ 2005-08-03 18:27 gnu dot org at journalscape dot com
  2005-08-03 18:28 ` [Bug c++/23219] " gnu dot org at journalscape dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gnu dot org at journalscape dot com @ 2005-08-03 18:27 UTC (permalink / raw)
  To: gcc-bugs

gcc-4.1-20050716-glibc-2.3.2-hdrs-2.6.11.2/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-g++
-O2 bug3.ii

Crashes with 
bug3.ii:6: internal compiler error: Segmentation fault

This test case was reduced using delta (http://www.cs.berkeley.edu/~dsw/), I'll
attach the source file you can use to reproduce the error.

-- 
           Summary: ICE: Segmentation fault
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gnu dot org at journalscape dot com
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug c++/23219] ICE: Segmentation fault
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
@ 2005-08-03 18:28 ` gnu dot org at journalscape dot com
  2005-08-03 18:29 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gnu dot org at journalscape dot com @ 2005-08-03 18:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gnu dot org at journalscape dot com  2005-08-03 18:28 -------
Created an attachment (id=9423)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9423&action=view)
testcase to reproduce internal compiler error


-- 


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


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

* [Bug c++/23219] ICE: Segmentation fault
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
  2005-08-03 18:28 ` [Bug c++/23219] " gnu dot org at journalscape dot com
@ 2005-08-03 18:29 ` pinskia at gcc dot gnu dot org
  2005-08-03 18:32 ` [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-03 18:29 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #9423|application/octet-stream    |text/plain
          mime type|                            |


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
  2005-08-03 18:28 ` [Bug c++/23219] " gnu dot org at journalscape dot com
  2005-08-03 18:29 ` pinskia at gcc dot gnu dot org
@ 2005-08-03 18:32 ` pinskia at gcc dot gnu dot org
  2005-08-03 18:39 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-03 18:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-03 18:32 -------
Confirmed, backtrace:
#0  0x08131d4d in decl_namespace_context (decl=0xb7d8a8fc) at /home/peshtigo/pinskia/src/gnu/
gcc/src/gcc/cp/tree.c:1349
#1  0x0814d29f in current_decl_namespace () at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/
name-lookup.c:2882
#2  0x08151b0a in lookup_name_real (name=0xb7d8bed4, prefer_type=1, nonclass=0, block_p=1 
'\001', namespaces_only=0, flags=768)
    at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/name-lookup.c:3582
#3  0x080e1301 in cp_parser_lookup_name (parser=0xb7d8d068, name=Variable "name" is not 
available.
) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:14608
#4  0x080f0825 in cp_parser_class_name (parser=0xb7d8d068, typename_keyword_p=0 '\0', 
template_keyword_p=0 '\0', 
    tag_type=typename_type, check_dependency_p=1 '\001', class_head_p=0 '\0', is_declaration=0 '\0')
    at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:12510
#5  0x080f0d72 in cp_parser_nested_name_specifier_opt (parser=0xb7d8d068, 
typename_keyword_p=0 '\0', check_dependency_p=1 '\001', 
    type_p=0 '\0', is_declaration=0 '\0') at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:
3749
#6  0x080f2e25 in cp_parser_simple_type_specifier (parser=0xb7d8d068, decl_specs=0xbfe9a390, 
flags=Variable "flags" is not available.
)
    at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:9660


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
 GCC target triplet|x86_64-unknown-linux-gnu    |
           Keywords|                            |error-recovery, ice-on-
                   |                            |invalid-code
      Known to fail|                            |4.1.0
      Known to work|                            |3.4.0 4.0.0
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-03 18:32:52
               date|                            |
            Summary|ICE: Segmentation fault     |[4.1 Regression] ICE:
                   |                            |Segmentation fault in
                   |                            |decl_namespace_context
   Target Milestone|---                         |4.1.0


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
                   ` (2 preceding siblings ...)
  2005-08-03 18:32 ` [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context pinskia at gcc dot gnu dot org
@ 2005-08-03 18:39 ` pinskia at gcc dot gnu dot org
  2005-08-04 11:29 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-03 18:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-03 18:39 -------
Here is something a little smaller:
template <class _Tp> class insert_iterator<slist<_Tp> > {};
template <class _Value> class insert_iterator<int > {
hash_set<_Value>;


Reduced by hand.

-- 


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
                   ` (3 preceding siblings ...)
  2005-08-03 18:39 ` pinskia at gcc dot gnu dot org
@ 2005-08-04 11:29 ` rguenth at gcc dot gnu dot org
  2005-08-05  9:12 ` nathan at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-08-04 11:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rguenth at gcc dot gnu dot org  2005-08-04 11:29 -------
I have a patch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-08-03 18:32:52         |2005-08-04 11:29:37
               date|                            |


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
                   ` (4 preceding siblings ...)
  2005-08-04 11:29 ` rguenth at gcc dot gnu dot org
@ 2005-08-05  9:12 ` nathan at gcc dot gnu dot org
  2005-08-05 17:38 ` reichelt at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-08-05  9:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2005-08-05 09:12 -------
stealing from Richard -- thanks for your investigation.  If it turns out your
patch is best, I'll let you know :)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|rguenth at gcc dot gnu dot  |nathan at gcc dot gnu dot
                   |org                         |org


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
                   ` (5 preceding siblings ...)
  2005-08-05  9:12 ` nathan at gcc dot gnu dot org
@ 2005-08-05 17:38 ` reichelt at gcc dot gnu dot org
  2005-08-05 17:52 ` reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-08-05 17:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-08-05 17:38 -------
Richard's patch indeed does not fix the shorter testcase

==================================
template<int> struct A<X<> > {};
struct A {};
==================================

which leads to a segfault in layout_decl at stor-layout.c:295


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
                   ` (6 preceding siblings ...)
  2005-08-05 17:38 ` reichelt at gcc dot gnu dot org
@ 2005-08-05 17:52 ` reichelt at gcc dot gnu dot org
  2005-08-11  9:24 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-08-05 17:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-08-05 17:52 -------
Even shorter testcase:

==============================
template<int> struct A a;
struct A {};
==============================


-- 


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
                   ` (7 preceding siblings ...)
  2005-08-05 17:52 ` reichelt at gcc dot gnu dot org
@ 2005-08-11  9:24 ` cvs-commit at gcc dot gnu dot org
  2005-08-11  9:29 ` nathan at gcc dot gnu dot org
  2005-08-11  9:31 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-11  9:24 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-11 09:24 -------
Subject: Bug 23219

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	nathan@gcc.gnu.org	2005-08-11 09:23:57

Modified files:
	gcc/cp         : ChangeLog name-lookup.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/parse: crash28.C 

Log message:
	cp:
	PR c++/23219
	* name-lookup.c (pushtag): Process the template type before
	altering the identifier lookup fields.  Remove unreachable code
	creating an empty stub decl.
	testsuite:
	PR c++/23219
	* g++.dg/parse/crash28.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4846&r2=1.4847
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.135&r2=1.136
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5907&r2=1.5908
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash28.C.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
                   ` (8 preceding siblings ...)
  2005-08-11  9:24 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-11  9:29 ` nathan at gcc dot gnu dot org
  2005-08-11  9:31 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-08-11  9:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nathan at gcc dot gnu dot org  2005-08-11 09:29 -------
Fixed mainline and 4.0

2005-08-11  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/23219
	* name-lookup.c (pushtag): Process the template type before
	altering the identifier lookup fields.  Remove unreachable code
	creating an empty stub decl.



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


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


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

* [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context
  2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
                   ` (9 preceding siblings ...)
  2005-08-11  9:29 ` nathan at gcc dot gnu dot org
@ 2005-08-11  9:31 ` cvs-commit at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-11  9:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-08-11 09:31 -------
Subject: Bug 23219

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	nathan@gcc.gnu.org	2005-08-11 09:31:22

Modified files:
	gcc/cp         : ChangeLog name-lookup.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/parse: crash28.C 

Log message:
	cp:
	PR c++/23219
	* name-lookup.c (pushtag): Process the template type before
	altering the identifier lookup fields.
	testsuite:
	PR c++/23219
	* g++.dg/parse/crash28.C: New.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.74&r2=1.4648.2.75
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.109.4.5&r2=1.109.4.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.328&r2=1.5084.2.329
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash28.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

end of thread, other threads:[~2005-08-11  9:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-03 18:27 [Bug c++/23219] New: ICE: Segmentation fault gnu dot org at journalscape dot com
2005-08-03 18:28 ` [Bug c++/23219] " gnu dot org at journalscape dot com
2005-08-03 18:29 ` pinskia at gcc dot gnu dot org
2005-08-03 18:32 ` [Bug c++/23219] [4.1 Regression] ICE: Segmentation fault in decl_namespace_context pinskia at gcc dot gnu dot org
2005-08-03 18:39 ` pinskia at gcc dot gnu dot org
2005-08-04 11:29 ` rguenth at gcc dot gnu dot org
2005-08-05  9:12 ` nathan at gcc dot gnu dot org
2005-08-05 17:38 ` reichelt at gcc dot gnu dot org
2005-08-05 17:52 ` reichelt at gcc dot gnu dot org
2005-08-11  9:24 ` cvs-commit at gcc dot gnu dot org
2005-08-11  9:29 ` nathan at gcc dot gnu dot org
2005-08-11  9:31 ` cvs-commit 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).