public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates
@ 2006-09-16 11:55 tbm at cyrius dot com
2006-09-16 11:56 ` [Bug c++/29105] " tbm at cyrius dot com
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: tbm at cyrius dot com @ 2006-09-16 11:55 UTC (permalink / raw)
To: gcc-bugs
I get the following segfault with current mainline that I didn't get with
20060823:
(sid)312:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/g++ -c adept-tagfilter.cc
adept-tagfilter.cc: In constructor 'aptFront::TagFilter<T>::TagFilter()':
adept-tagfilter.cc:45: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
(sid)313:tbm@em64t: ~] g++ -c adept-tagfilter.cc
(sid)314:tbm@em64t: ~]
Testcase:
namespace aptFront
{
namespace cache
{
namespace component
{
class Tags;
}
class Observer
{
template < typename T > void observeComponent ();
};
}
namespace utils
{
template < typename T > struct MultiTypeBase
{
};
const int notComparable = 0;
const int equalityComparable = 1;
template < typename Self, typename Base, int comparable =
notComparable > struct MultiTypeImpl:public Base {
};
}
namespace predicate
{
template < typename T > struct Base:public utils::MultiTypeBase < Base <
T > >
{
};
template < typename T, typename Self, typename Base =
Base < T > >struct Implementation:utils::MultiTypeImpl < Self, Base,
utils::equalityComparable >
{
};
}
struct InterfacingPredicate
{
};
template < typename T > struct TagFilter:predicate::Implementation < T,
TagFilter < T > >, InterfacingPredicate, cache::Observer
{
TagFilter ()
{
observeComponent < cache::component::Tags > ();
}
};
}
--
Summary: [4.2 Regression] segfault in add_candidates
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tbm at cyrius dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
@ 2006-09-16 11:56 ` tbm at cyrius dot com
2006-09-16 16:00 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tbm at cyrius dot com @ 2006-09-16 11:56 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4258 bytes --]
------- Comment #1 from tbm at cyrius dot com 2006-09-16 11:55 -------
Program received signal SIGSEGV, Segmentation fault.
add_candidates (fns=0x2aaaadd4ba20, args=0x0, explicit_targs=0x2aaaafad4b70,
template_only=1 '\001',
conversion_path=0x0, access_path=0x0, flags=3, candidates=0x7fffffc849e8)
at gcc-4.2/gcc/cp/call.c:3615
3615 non_static_args = tree_cons (NULL_TREE,
(gdb) where
#0 add_candidates (fns=0x2aaaadd4ba20, args=0x0,
explicit_targs=0x2aaaafad4b70,
template_only=1 '\001', conversion_path=0x0, access_path=0x0, flags=3,
candidates=0x7fffffc849e8)
at gcc-4.2/gcc/cp/call.c:3615
#1 0x000000000040ebe4 in perform_overload_resolution (fn=0x2aaaadd4ba20,
args=0x0,
candidates=0x7fffffc849e8, any_viable_p=0x7fffffc849f7 "\001â⬯â*")
at gcc-4.2/gcc/cp/call.c:2765
#2 0x000000000040efe8 in build_new_function_call (fn=0x2aaaaface2d0, args=0x0,
koenig_p=<value optimized out>) at gcc-4.2/gcc/cp/call.c:2813
#3 0x00000000004d67cf in finish_call_expr (fn=0x2aaaaface2d0, args=0x0,
disallow_virtual=0 '\0',
koenig_p=112 'p') at gcc-4.2/gcc/cp/semantics.c:1843
#4 0x0000000000495573 in cp_parser_unary_expression (parser=0x2aaaaaf91be0,
address_p=<value optimized out>, cast_p=0 '\0') at
gcc-4.2/gcc/cp/parser.c:4341
#5 0x000000000049632e in cp_parser_assignment_expression
(parser=0x2aaaaaf91be0,
cast_p=<value optimized out>) at gcc-4.2/gcc/cp/parser.c:5606
#6 0x0000000000496e6b in cp_parser_expression (parser=0x2aaaaaf91be0,
cast_p=<value optimized out>)
at gcc-4.2/gcc/cp/parser.c:5898
#7 0x000000000049775a in cp_parser_expression_statement
(parser=0x2aaaaaf91be0,
in_statement_expr=0x0) at gcc-4.2/gcc/cp/parser.c:6331
#8 0x0000000000493664 in cp_parser_statement (parser=0x2aaaaaf91be0,
in_statement_expr=0x0,
in_compound=1 '\001') at gcc-4.2/gcc/cp/parser.c:6210
#9 0x00000000004943c3 in cp_parser_statement_seq_opt (parser=0x2aaaaaf91be0,
in_statement_expr=0x0)
at gcc-4.2/gcc/cp/parser.c:6398
#10 0x000000000049455c in cp_parser_compound_statement (parser=0x2aaaaaf91be0,
in_statement_expr=0x0, in_try=<value optimized out>)
at gcc-4.2/gcc/cp/parser.c:6368
#11 0x00000000004a3807 in cp_parser_ctor_initializer_opt_and_function_body
(parser=0x2aaaaaf91be0)
at gcc-4.2/gcc/cp/parser.c:12501
#12 0x00000000004a3d58 in cp_parser_function_definition_after_declarator
(parser=0x2aaaaaf91be0,
inline_p=1 '\001') at gcc-4.2/gcc/cp/parser.c:15422
#13 0x0000000000492636 in cp_parser_type_specifier (parser=0x2aaaaaf91be0,
flags=<value optimized out>, decl_specs=0x7fffffc84e70, is_declaration=1
'\001',
declares_class_or_enum=0x7fffffc84e10, is_cv_qualifier=<value optimized
out>)
at gcc-4.2/gcc/cp/parser.c:15912
#14 0x0000000000492a2d in cp_parser_decl_specifier_seq (parser=0x2aaaaaf91be0,
flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0x7fffffc84e70,
declares_class_or_enum=0x7fffffc84ec8)
at gcc-4.2/gcc/cp/parser.c:7537
#15 0x00000000004a4573 in cp_parser_single_declaration (parser=0x2aaaaaf91be0,
checks=0x0,
member_p=0 '\0', friend_p=0x7fffffc84f27 "") at
gcc-4.2/gcc/cp/parser.c:15596
#16 0x0000000000490943 in cp_parser_template_declaration_after_export
(parser=0x2aaaaaf91be0,
member_p=112 'p') at gcc-4.2/gcc/cp/parser.c:15511
#17 0x00000000004a51cd in cp_parser_declaration (parser=0x2aaaaaf91be0)
at gcc-4.2/gcc/cp/parser.c:7092
#18 0x00000000004a5826 in cp_parser_declaration_seq_opt (parser=0x2aaaaaf91be0)
at gcc-4.2/gcc/cp/parser.c:7015
#19 0x00000000004a526f in cp_parser_declaration (parser=0x2aaaaaf91be0)
at gcc-4.2/gcc/cp/parser.c:10527
#20 0x00000000004a5826 in cp_parser_declaration_seq_opt (parser=0x2aaaaaf91be0)
at gcc-4.2/gcc/cp/parser.c:7015
#21 0x00000000004a5f4a in c_parse_file () at gcc-4.2/gcc/cp/parser.c:2751
#22 0x0000000000534435 in c_common_parse_file (set_yydebug=<value optimized
out>)
at gcc-4.2/gcc/c-opts.c:1164
#23 0x0000000000874ab3 in toplev_main (argc=<value optimized out>, argv=<value
optimized out>)
at gcc-4.2/gcc/toplev.c:1033
#24 0x00002aaaaabdf4ca in __libc_start_main () from /lib/libc.so.6
#25 0x000000000040273a in _start () at ../sysdeps/x86_64/elf/start.S:113
(gdb)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
2006-09-16 11:56 ` [Bug c++/29105] " tbm at cyrius dot com
@ 2006-09-16 16:00 ` pinskia at gcc dot gnu dot org
2006-09-17 9:08 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-16 16:00 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
2006-09-16 11:56 ` [Bug c++/29105] " tbm at cyrius dot com
2006-09-16 16:00 ` pinskia at gcc dot gnu dot org
@ 2006-09-17 9:08 ` pinskia at gcc dot gnu dot org
2006-09-18 19:23 ` [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function janis at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-17 9:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-09-17 09:08 -------
Reduced testcase:
struct Observer
{
template < typename T > void observeComponent ();
};
template < typename T >
struct TagFilter : Observer
{
TagFilter ()
{
observeComponent < int > ();
}
};
------
This also can ICE on invalid code if we change struct to class for Observer
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2006-09-17 09:08:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
` (2 preceding siblings ...)
2006-09-17 9:08 ` pinskia at gcc dot gnu dot org
@ 2006-09-18 19:23 ` janis at gcc dot gnu dot org
2006-09-20 22:50 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-09-18 19:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janis at gcc dot gnu dot org 2006-09-18 19:23 -------
A regression hunt on powerpc-linux using the testcase from comment #2
identified this patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=116468
r116468 | mmitchel | 2006-08-26 16:23:33 +0000 (Sat, 26 Aug 2006)
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
` (3 preceding siblings ...)
2006-09-18 19:23 ` [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function janis at gcc dot gnu dot org
@ 2006-09-20 22:50 ` mmitchel at gcc dot gnu dot org
2006-10-02 1:28 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-09-20 22:50 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
` (4 preceding siblings ...)
2006-09-20 22:50 ` mmitchel at gcc dot gnu dot org
@ 2006-10-02 1:28 ` mmitchel at gcc dot gnu dot org
2006-10-02 4:13 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-02 1:28 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
` (5 preceding siblings ...)
2006-10-02 1:28 ` mmitchel at gcc dot gnu dot org
@ 2006-10-02 4:13 ` mmitchel at gcc dot gnu dot org
2006-10-02 4:34 ` mmitchel at gcc dot gnu dot org
2006-10-05 20:31 ` reichelt at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-02 4:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2006-10-02 04:13 -------
Subject: Bug 29105
Author: mmitchel
Date: Mon Oct 2 04:12:51 2006
New Revision: 117361
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=117361
Log:
PR c++/29105
* pt.c (tsubst_baselink): Substituteinto the qualifying scope.
* semantics.c (baselink_for_fns): Build a baselink, even when
processing a template.
PR c++/29105
* g++.dg/template/member6.C: New test.
* g++.dg/parse/typename7.C: Adjust error markers.
Added:
trunk/gcc/testsuite/g++.dg/template/member6.C
Modified:
trunk/gcc/cp/pt.c
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/g++.dg/parse/typename7.C
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
` (6 preceding siblings ...)
2006-10-02 4:13 ` mmitchel at gcc dot gnu dot org
@ 2006-10-02 4:34 ` mmitchel at gcc dot gnu dot org
2006-10-05 20:31 ` reichelt at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-02 4:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mmitchel at gcc dot gnu dot org 2006-10-02 04:34 -------
Fixed in 4.2.0.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
` (7 preceding siblings ...)
2006-10-02 4:34 ` mmitchel at gcc dot gnu dot org
@ 2006-10-05 20:31 ` reichelt at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-10-05 20:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from reichelt at gcc dot gnu dot org 2006-10-05 20:31 -------
*** Bug 29021 has been marked as a duplicate of this bug. ***
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29105
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2006-10-05 20:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-16 11:55 [Bug c++/29105] New: [4.2 Regression] segfault in add_candidates tbm at cyrius dot com
2006-09-16 11:56 ` [Bug c++/29105] " tbm at cyrius dot com
2006-09-16 16:00 ` pinskia at gcc dot gnu dot org
2006-09-17 9:08 ` pinskia at gcc dot gnu dot org
2006-09-18 19:23 ` [Bug c++/29105] [4.2 Regression] segfault in add_candidates with a non template base class and a template member function janis at gcc dot gnu dot org
2006-09-20 22:50 ` mmitchel at gcc dot gnu dot org
2006-10-02 1:28 ` mmitchel at gcc dot gnu dot org
2006-10-02 4:13 ` mmitchel at gcc dot gnu dot org
2006-10-02 4:34 ` mmitchel at gcc dot gnu dot org
2006-10-05 20:31 ` 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).