public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9452: [2003-05-03] ICE (segfault) using a dependent expression as argument for the template-id in the return type
@ 2003-05-16 17:26 Giovanni Bajo
0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Bajo @ 2003-05-16 17:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/9452; it has been noted by GNATS.
From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-prs@gcc.gnu.org>,
<bangerth@ticam.utexas.edu>,
<gcc-bugs@gcc.gnu.org>,
<gcc-gnats@gcc.gnu.org>,
<nobody@gcc.gnu.org>
Cc: "Gabriel Dos Reis" <gdr@integrable-solutions.net>
Subject: Re: c++/9452: [2003-05-03] ICE (segfault) using a dependent expression as argument for the template-id in the return type
Date: Fri, 16 May 2003 19:18:14 +0200
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9452
I think the segfault happens while trying to format the error message. GCC
is trying to issue an error about the ambiguity of the function call, but I
think it gets confused because of the math expression "Len<N>::val - 1" in
the return type. This could probably be checked by simply tracking where the
segfault happens. If someone can confirm this, I can mark this as a
diagnosis bug.
Giovanni Bajo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: c++/9452: [2003-05-03] ICE (segfault) using a dependent expression as argument for the template-id in the return type
@ 2003-05-16 20:06 Wolfgang Bangerth
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Bangerth @ 2003-05-16 20:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/9452; it has been noted by GNATS.
From: Wolfgang Bangerth <bangerth@ices.utexas.edu>
To: Giovanni Bajo <giovannibajo@libero.it>
Cc: gcc-bugs@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>,
Gabriel Dos Reis <gdr@integrable-solutions.net>
Subject: Re: c++/9452: [2003-05-03] ICE (segfault) using a dependent expression
as argument for the template-id in the return type
Date: Fri, 16 May 2003 15:02:12 -0500 (CDT)
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9452
>
> I think the segfault happens while trying to format the error message.
No, that's not the case. The error happens here (this is present mainline):
#0 convert_from_reference (val=0x40159528)
at ../../gcc-3.4-CVS/gcc/cp/cvt.c:557
#1 0x08052c35 in prep_operand (operand=0x40159528)
at ../../gcc-3.4-CVS/gcc/cp/call.c:3561
#2 0x08052f79 in build_new_op (code=MINUS_EXPR, flags=3, arg1=0x40159528,
arg2=0x401a0f28, arg3=0x0) at ../../gcc-3.4-CVS/gcc/cp/call.c:3662
#3 0x081143f6 in build_x_binary_op (code=MINUS_EXPR, arg1=0x40159528,
arg2=0x0) at ../../gcc-3.4-CVS/gcc/cp/typeck.c:2947
#4 0x0809e635 in tsubst_template_arg_vector (t=0x401a0f50, args=0x40159510,
complain=tf_none) at ../../gcc-3.4-CVS/gcc/cp/pt.c:5676
#5 0x0809ed80 in tsubst_aggr_type (t=0x401aabd0, args=0x40159510,
complain=tf_none, in_decl=0x0, entering_scope=0)
at ../../gcc-3.4-CVS/gcc/cp/pt.c:5794
#6 0x080a2d7c in tsubst (t=0x401aac3c, args=0x40159510, complain=tf_none,
in_decl=0x0) at ../../gcc-3.4-CVS/gcc/cp/pt.c:6578
#7 0x080a1f34 in tsubst_function_type (t=0x401aac3c, args=0x40159510,
complain=tf_none, in_decl=0x401aabd0) at ../../gcc-3.4-CVS/gcc/cp/pt.c:6445
#8 0x080a30e8 in tsubst (t=0x401ad000, args=0x40159510, complain=tf_none,
in_decl=0x0) at ../../gcc-3.4-CVS/gcc/cp/pt.c:6960
#9 0x080aedbd in fn_type_unification (fn=0x401ad0d8, explicit_targs=0x0,
targs=0x401ad000, args=0x401ac7bc, return_type=0x0, strict=DEDUCE_CALL,
len=-1) at ../../gcc-3.4-CVS/gcc/cp/pt.c:8649
The place in convert_reference is this:
tree
convert_from_reference (tree val)
{
tree type = TREE_TYPE (val);
if (TREE_CODE (type) == OFFSET_TYPE) -------- here
type = TREE_TYPE (type);
if (TREE_CODE (type) == REFERENCE_TYPE)
return build_indirect_ref (val, NULL);
return val;
}
and the reason is that type==0x0. Now, as to why that is happening...
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth@ices.utexas.edu
www: http://www.ices.utexas.edu/~bangerth/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-16 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-16 17:26 c++/9452: [2003-05-03] ICE (segfault) using a dependent expression as argument for the template-id in the return type Giovanni Bajo
2003-05-16 20:06 Wolfgang Bangerth
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).