c++/10433: [3.4 regression] SegFault in type_unknown_p with sizeof
bangerth@dealii.org
bangerth@dealii.org
Fri Apr 18 18:19:00 GMT 2003
Old Synopsis: G++ crash using array pointer and sizeof as arguments to same function in template method
New Synopsis: [3.4 regression] SegFault in type_unknown_p with sizeof
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Fri Apr 18 18:19:38 2003
State-Changed-Why:
Confirmed. This is even smaller:
----------------------
void foo(int);
template <int>
struct X {
void bar() {
char c[1];
foo(sizeof(c));
}
};
template struct X<1>;
--------------------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
x.cc: In member function `void X<<anonymous> >::bar()':
x.cc:7: internal compiler error: Segmentation fault
This is a new failure in mainline (3.4). It crashes here:
#0 0x0810c743 in type_unknown_p (exp=0x40183360)
at ../../gcc-3.4-CVS/gcc/cp/typeck.c:191
#1 0xbfffea58 in ?? ()
#2 0x080e6cbe in arg_assoc (k=0xbfffeab0, n=0x401a4154)
at ../../gcc-3.4-CVS/gcc/cp/decl2.c:4081
#3 0x080e6c45 in arg_assoc_args (k=0xbfffeab0, args=0x401a4154)
at ../../gcc-3.4-CVS/gcc/cp/decl2.c:4065
#4 0x080e7256 in lookup_arg_dependent (name=0x401a2f80, fns=0x401a04a4,
args=0x0) at ../../gcc-3.4-CVS/gcc/cp/decl2.c:4169
#5 0x080fa658 in cp_parser_postfix_expression (parser=0x401a2f40,
address_p=false) at ../../gcc-3.4-CVS/gcc/cp/parser.c:3954
#6 0x080fae10 in cp_parser_unary_expression (parser=0x401a2f40,
address_p=false) at ../../gcc-3.4-CVS/gcc/cp/parser.c:4499
In the frames with lowest number, none of the functions
seem to have been changed recently, so I can't tell which
patch caused this...
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10433
More information about the Gcc-bugs
mailing list