public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type
@ 2005-03-13 22:12 belyshev at depni dot sinp dot msu dot ru
2005-03-13 22:16 ` [Bug c++/20463] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-03-13 22:12 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]
This invalid code snippet produces ICE on mainline and 4.0 branch:
-------------------------------------------------------------------------------
template < typename T > struct C;
template < typename T > void C < T > :: f ()
{
const foo bar;
}
-------------------------------------------------------------------------------
foo.cc:3: error: invalid use of undefined type struct C<T>
foo.cc:1: error: declaration of struct C<T>
foo.cc:3: error: template definition of non-template void C<T>::f()
foo.cc: In member function void C<T>::f():
foo.cc:5: error: foo does not name a type
foo.cc:5: internal compiler error: Segmentation fault
--
Summary: [4.0/4.1 regression] ICE on using undefined type
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belyshev at depni dot sinp dot msu dot ru
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/20463] [4.0/4.1 regression] ICE on using undefined type
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
@ 2005-03-13 22:16 ` pinskia at gcc dot gnu dot org
2005-03-18 12:05 ` pcarlini at suse dot de
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-13 22:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-13 22:16 -------
Confirmed, related to PR 20461 but not the same bug. Here is the backtrace:
#0 0x080e734a in cp_parser_diagnose_invalid_type_name (parser=0xb7c82d00, scope=Variable
"scope" is not available.
)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:2002
#1 0x080f5d4c in cp_parser_parse_and_diagnose_invalid_type_name (parser=0xb7c82d00)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:2083
#2 0x080f7a95 in cp_parser_simple_declaration (parser=0xb7c82d00,
function_definition_allowed_p=0 '\0')
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:6978
#3 0x080e94fa in cp_parser_block_declaration (parser=0xb7c82d00, statement_p=1 '\001')
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:6916
#4 0x080ea15f in cp_parser_statement (parser=0xb7c82d00, in_statement_expr=0x0)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:6618
#5 0x080eab01 in cp_parser_statement_seq_opt (parser=0xb7c82d00, in_statement_expr=0x0)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:6153
#6 0x080eac05 in cp_parser_compound_statement (parser=0xb7c82d00, in_statement_expr=0x0,
in_try=Variable "in_try" is not available.
)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:6126
#7 0x080eacaa in cp_parser_ctor_initializer_opt_and_function_body (parser=0xb7c82d00)
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:12002
#8 0x080eb237 in cp_parser_function_definition_after_declarator (parser=0xb7c82d00, inline_p=0
'\0')
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:14868
#9 0x080f7645 in cp_parser_init_declarator (parser=0xb7c82d00, decl_specifiers=0xbfe5f0a8,
function_definition_allowed_p=1 '\001',
member_p=0 '\0', declares_class_or_enum=Variable "declares_class_or_enum" is not available.
) at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:14813
#10 0x080f7fea in cp_parser_single_declaration (parser=0xb7c82d00, member_p=0 '\0',
friend_p=0xbfe5f13b "")
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:15056
#11 0x080f8330 in cp_parser_template_declaration_after_export (parser=0xb7c82d00, member_p=0
'\0')
at /home/peshtigo/pinskia/src/gnu/gcc/src/gcc/cp/parser.c:14936
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-03-13 22:16:41
date| |
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/20463] [4.0/4.1 regression] ICE on using undefined type
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
2005-03-13 22:16 ` [Bug c++/20463] " pinskia at gcc dot gnu dot org
@ 2005-03-18 12:05 ` pcarlini at suse dot de
2005-03-18 13:48 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2005-03-18 12:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pcarlini at suse dot de 2005-03-18 12:04 -------
Looking into it.
--
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=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/20463] [4.0/4.1 regression] ICE on using undefined type
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
2005-03-13 22:16 ` [Bug c++/20463] " pinskia at gcc dot gnu dot org
2005-03-18 12:05 ` pcarlini at suse dot de
@ 2005-03-18 13:48 ` pinskia at gcc dot gnu dot org
2005-03-18 17:17 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-18 13:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-18 13:48 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-03/msg01757.html>.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/20463] [4.0/4.1 regression] ICE on using undefined type
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
` (2 preceding siblings ...)
2005-03-18 13:48 ` pinskia at gcc dot gnu dot org
@ 2005-03-18 17:17 ` cvs-commit at gcc dot gnu dot org
2005-03-18 17:20 ` cvs-commit at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-18 17:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-18 17:16 -------
Subject: Bug 20463
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2005-03-18 17:16:24
Modified files:
gcc/cp : ChangeLog parser.c
Log message:
2005-03-18 Paolo Carlini <pcarlini@suse.de>
PR c++/20463
* parser.c (cp_parser_diagnose_invalid_type_name):
Check TYPE_BINFO (current_class_type) before attempting
to emit inform messages.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4665&r2=1.4666
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.321&r2=1.322
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/20463] [4.0/4.1 regression] ICE on using undefined type
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
` (3 preceding siblings ...)
2005-03-18 17:17 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-18 17:20 ` cvs-commit at gcc dot gnu dot org
2005-03-22 9:12 ` [Bug c++/20463] [4.0 " cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-18 17:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-18 17:19 -------
Subject: Bug 20463
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2005-03-18 17:19:42
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: crash35.C
Log message:
2005-03-18 Paolo Carlini <pcarlini@suse.de>
PR c++/20463
* g++.dg/template/crash35.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5180&r2=1.5181
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash35.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/20463] [4.0 regression] ICE on using undefined type
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
` (4 preceding siblings ...)
2005-03-18 17:20 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-22 9:12 ` cvs-commit at gcc dot gnu dot org
2005-03-22 9:29 ` cvs-commit at gcc dot gnu dot org
2005-03-22 9:30 ` pcarlini at suse dot de
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-22 9:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-22 09:11 -------
Subject: Bug 20463
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: paolo@gcc.gnu.org 2005-03-22 09:11:03
Modified files:
gcc/cp : ChangeLog init.c parser.c
Log message:
2005-03-22 Paolo Carlini <pcarlini@suse.de>
PR c++/20461
PR c++/20536
* init.c (emit_mem_initializers): Don't crash on undefined
types.
2005-03-22 Paolo Carlini <pcarlini@suse.de>
PR c++/20463
* parser.c (cp_parser_diagnose_invalid_type_name):
Check TYPE_BINFO (current_class_type) before attempting
to emit inform messages.
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.13&r2=1.4648.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.412.2.2&r2=1.412.2.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.319.2.1&r2=1.319.2.2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/20463] [4.0 regression] ICE on using undefined type
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
` (5 preceding siblings ...)
2005-03-22 9:12 ` [Bug c++/20463] [4.0 " cvs-commit at gcc dot gnu dot org
@ 2005-03-22 9:29 ` cvs-commit at gcc dot gnu dot org
2005-03-22 9:30 ` pcarlini at suse dot de
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-22 9:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-22 09:28 -------
Subject: Bug 20463
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: paolo@gcc.gnu.org 2005-03-22 09:28:26
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/parse: crash24.C crash25.C
gcc/testsuite/g++.dg/template: crash35.C
Log message:
2005-03-22 Paolo Carlini <pcarlini@suse.de>
PR c++/20461
* g++.dg/parse/crash24.C: New test.
PR c++/20536
* g++.dg/parse/crash25.C: New test.
2005-03-22 Paolo Carlini <pcarlini@suse.de>
PR c++/20463
* g++.dg/template/crash35.C: New test.
Patches:
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.57&r2=1.5084.2.58
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash24.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash25.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.2.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash35.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.4.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/20463] [4.0 regression] ICE on using undefined type
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
` (6 preceding siblings ...)
2005-03-22 9:29 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-22 9:30 ` pcarlini at suse dot de
7 siblings, 0 replies; 9+ messages in thread
From: pcarlini at suse dot de @ 2005-03-22 9:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pcarlini at suse dot de 2005-03-22 09:29 -------
Fixed for 4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20463
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-03-22 9:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-13 22:12 [Bug c++/20463] New: [4.0/4.1 regression] ICE on using undefined type belyshev at depni dot sinp dot msu dot ru
2005-03-13 22:16 ` [Bug c++/20463] " pinskia at gcc dot gnu dot org
2005-03-18 12:05 ` pcarlini at suse dot de
2005-03-18 13:48 ` pinskia at gcc dot gnu dot org
2005-03-18 17:17 ` cvs-commit at gcc dot gnu dot org
2005-03-18 17:20 ` cvs-commit at gcc dot gnu dot org
2005-03-22 9:12 ` [Bug c++/20463] [4.0 " cvs-commit at gcc dot gnu dot org
2005-03-22 9:29 ` cvs-commit at gcc dot gnu dot org
2005-03-22 9:30 ` pcarlini at suse dot de
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).