This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11503] New: segfault when instantiating template with ADDR_EXPR
- From: "zlomek at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Jul 2003 19:13:14 -0000
- Subject: [Bug c++/11503] New: segfault when instantiating template with ADDR_EXPR
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11503
Summary: segfault when instantiating template with ADDR_EXPR
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zlomek at gcc dot gnu dot org
CC: aj at suse dot de,gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-linux-gnu
GCC host triplet: i686-linux-gnu
GCC target triplet: i686-linux-gnu
class x
{
public:
void foo ()
{}
};
template <class T>
class vector
{
public:
T& operator[](unsigned int n)
{}
};
template <class T>
class y
{
public:
typedef struct
{
T t;
} s;
vector<s> array;
void foo ()
{
array[0].t.foo();
}
};
typedef y<x> z;
inline void test (z &zz)
{
zz.foo ();
}
#0 0x080d9943 in lookup_base (t=0x401c8b60, base=0x401c8b60, access=ba_check,
kind_ptr=0x0) at ../../gcc/cp/search.c:376
#1 0x080c7393 in build_unary_op (code=ADDR_EXPR, xarg=0x401d14c0, noconvert=0)
at ../../gcc/cp/typeck.c:4332
#2 0x0804e156 in build_this (obj=0x401d14c0) at ../../gcc/cp/call.c:2475
#3 0x08053917 in build_new_method_call (instance=0x401d14c0, fns=0x401d14e0,
args=0x0, conversion_path=0x0, flags=3) at ../../gcc/cp/call.c:4939
#4 0x0804a7d4 in build_method_call (instance=0x401d14c0, name=0x401c1800,
parms=0x0, basetype_path=0x0, flags=3) at ../../gcc/cp/call.c:587
#5 0x080a011d in build_expr_from_tree (t=0x401d1180) at ../../gcc/cp/decl2.c:3357
#6 0x080839bd in tsubst_expr (t=0x40189e00, args=0x401c7c58, complain=3,
in_decl=0x401c82a0) at ../../gcc/cp/pt.c:7581
#7 0x08083ada in tsubst_expr (t=0x401c71f4, args=0x401c7c58, complain=3,
in_decl=0x401c82a0) at ../../gcc/cp/pt.c:7606
#8 0x08084068 in tsubst_expr (t=0x401c71e0, args=0x401c7c58, complain=3,
in_decl=0x401c82a0) at ../../gcc/cp/pt.c:7753
#9 0x08084068 in tsubst_expr (t=0x401c71cc, args=0x401c7c58, complain=3,
in_decl=0x401c82a0) at ../../gcc/cp/pt.c:7753
#10 0x080885c8 in instantiate_decl (d=0x401ce230, defer_ok=0) at
../../gcc/cp/pt.c:10466
#11 0x080a32ce in mark_used (decl=0x401ce230) at ../../gcc/cp/decl2.c:4884
#12 0x08052e82 in build_over_call (cand=0x401c6604, args=0x401c7fb4, flags=3) at
../../gcc/cp/call.c:4658
#13 0x08053ed6 in build_new_method_call (instance=0x401c73fc, fns=0x401ce230,
args=0x0, conversion_path=0x401c9000, flags=3) at ../../gcc/cp/call.c:5087
#14 0x0804a7d4 in build_method_call (instance=0x401c73fc, name=0x401c1800,
parms=0x0, basetype_path=0x0, flags=3) at ../../gcc/cp/call.c:587
#15 0x080e0faa in finish_object_call_expr (fn=0x401c1800, object=0x401c73fc,
args=0x0) at ../../gcc/cp/semantics.c:1386
#16 0x080b1774 in yyparse () at parse.y:1725
#17 0x0810b2d3 in c_common_parse_file (set_yydebug=0) at ../../gcc/c-lex.c:159
#18 0x083b3217 in compile_file () at ../../gcc/toplev.c:2198
#19 0x083b98ab in do_compile () at ../../gcc/toplev.c:5614
#20 0x083b9918 in toplev_main (argc=2, argv=0xbffff6c4) at ../../gcc/toplev.c:5644
#21 0x08113136 in main (argc=2, argv=0xbffff6c4) at ../../gcc/main.c:35
#22 0x400439ed in __libc_start_main () from /lib/libc.so.6