public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9172: SEGV in make_typename_type
@ 2003-01-04 17:25 paolo
0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2003-01-04 17:25 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, nobody, ritzert
Synopsis: SEGV in make_typename_type
State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Sat Jan 4 09:25:31 2003
State-Changed-Why:
This is an ICE on *illegal* code (no regression)
You typed:
typedef typename baz::typename rebind<int> foo;
^^^^^^^^
instead of
typedef typename baz::template rebind<int> foo;
;-)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9172
^ permalink raw reply [flat|nested] 2+ messages in thread
* c++/9172: SEGV in make_typename_type
@ 2003-01-04 16:36 ritzert
0 siblings, 0 replies; 2+ messages in thread
From: ritzert @ 2003-01-04 16:36 UTC (permalink / raw)
To: gcc-gnats
>Number: 9172
>Category: c++
>Synopsis: SEGV in make_typename_type
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Sat Jan 04 08:36:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: Michael Ritzert
>Release: gcc version 3.4 20030103
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The corrected testcase of c++/9098 now really crashes the compiler...
template <class baz>
struct bar
{
typedef typename baz::typename rebind<int> foo;
};
gives
Program received signal SIGSEGV, Segmentation fault.
0x08069068 in make_typename_type (context=0x0, name=0x401ba8c0,
complain=tf_error) at /opt/gcc3/gcc/gcc/cp/decl.c:5648
5648 if (TREE_CODE (context) == NAMESPACE_DECL)
(gdb) bt
#0 0x08069068 in make_typename_type (context=0x0, name=0x401ba8c0,
complain=tf_error) at /opt/gcc3/gcc/gcc/cp/decl.c:5648
#1 0x080ef53b in cp_parser_type_specifier (parser=0x401ba6c0, flags=3,
is_friend=false, is_declaration=true, declares_class_or_enum=0xbfffefca,
is_cv_qualifier=0xbfffefcb) at /opt/gcc3/gcc/gcc/cp/parser.c:8670
#2 0x080edb6d in cp_parser_decl_specifier_seq (parser=0x401ba6c0,
flags=3221221323, attributes=0xbffff010, declares_class_or_enum=0xbffff017)
at /opt/gcc3/gcc/gcc/cp/parser.c:6975
#3 0x080f2e80 in cp_parser_member_declaration (parser=0x401ba6c0)
at /opt/gcc3/gcc/gcc/cp/parser.c:12150
I don't know if this is a regression or not - 2.95.3 and 3.2.2 do not accept the code, either (parse error before `typename').
>How-To-Repeat:
cat << EOF > x.cpp
template <class baz>
struct bar
{
typedef typename baz::typename rebind<int> foo;
};
EOF
gcc -c x.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-04 17:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-04 17:25 c++/9172: SEGV in make_typename_type paolo
-- strict thread matches above, loose matches on Subject: below --
2003-01-04 16:36 ritzert
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).