This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
optimization/9096: SEGV in find_and_verify_loops
- From: ritzert at t-online dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 29 Dec 2002 19:43:41 -0000
- Subject: optimization/9096: SEGV in find_and_verify_loops
- Reply-to: ritzert at t-online dot de
>Number: 9096
>Category: optimization
>Synopsis: SEGV in find_and_verify_loops
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-legal-code
>Submitter-Id: net
>Arrival-Date: Sun Dec 29 11:46:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Michael Ritzert
>Release: GNU C++ version 3.4 20021229
>Organization:
>Environment:
i686-pc-linux-gnu debian GNU/Linux
and
i386-unknown-freebsd4.5
>Description:
This code:
class String_var
{
public:
~String_var() {}
};
template<class T>
class FixSeq
{
public:
static void freebuf(T* p) { delete [] p; }
FixSeq();
~FixSeq() { freebuf(0); }
};
struct IOR
{
String_var type_id;
FixSeq< String_var > _profiles_seq;
};
class TransientORT
{
IOR _obv_the_ior_template_;
TransientORT();
};
TransientORT::TransientORT()
{
}
compiled with c++ -c -O causes GCC to crash with the following backtrace:
#0 find_and_verify_loops (f=0x401a5084, loops=0xbffff7a0)
at /home/ritzert/gcc/HEAD/gcc/gcc/loop.c:2683
#1 0x082cb25b in loop_optimize (f=0x401a5084, dumpfile=0x2f, flags=10)
at /home/ritzert/gcc/HEAD/gcc/gcc/loop.c:494
#2 0x08353ca2 in rest_of_compilation (decl=0x401b30b0)
at /home/ritzert/gcc/HEAD/gcc/gcc/toplev.c:2954
#3 0x0812e2ea in genrtl_finish_function (fn=0x4018acb0)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/semantics.c:2724
#4 0x0812db8b in expand_body (fn=0x4018acb0)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/semantics.c:2547
#5 0x08139036 in maybe_clone_body (fn=0x40189e70)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/optimize.c:265
#6 0x0812d91c in expand_body (fn=0x40189e70)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/semantics.c:2463
#7 0x080f56ba in cp_parser_function_definition_after_declarator (
parser=0x4018744c, inline_p=30)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:13966
#8 0x080f5630 in cp_parser_function_definition_from_specifiers_and_declarator
(parser=0x40177680, decl_specifiers=0x2f, attributes=0x2f,
declarator=0x2f, access_checks=0x2f)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:13903
#9 0x080f063e in cp_parser_init_declarator (parser=0x40177680,
decl_specifiers=0x0, prefix_attributes=0x0, access_checks=0x0,
function_definition_allowed_p=true, member_p=false,
function_definition_p=0xbffffa13)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:9668
#10 0x080edabc in cp_parser_simple_declaration (parser=0x40177680,
function_definition_allowed_p=true)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:6674
#11 0x080ed98f in cp_parser_block_declaration (parser=0x40177680,
statement_p=false) at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:6614
#12 0x080ed845 in cp_parser_declaration (parser=0x40177680)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:6534
#13 0x080ed778 in cp_parser_declaration_seq_opt (parser=0x40177680)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:6459
#14 0x080e96f2 in cp_parser_translation_unit (parser=0x40177680)
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:2516
#15 0x080f6828 in yyparse ()
at /home/ritzert/gcc/HEAD/gcc/gcc/cp/parser.c:14807
#16 0x0815b0c9 in c_common_parse_file (set_yydebug=47)
at /home/ritzert/gcc/HEAD/gcc/gcc/c-lex.c:161
#17 0x08351b8d in compile_file ()
at /home/ritzert/gcc/HEAD/gcc/gcc/toplev.c:2128
#18 0x083571a5 in do_compile () at /home/ritzert/gcc/HEAD/gcc/gcc/toplev.c:5352
#19 0x0835724a in toplev_main (argc=47, argv=0xbffffbd4)
at /home/ritzert/gcc/HEAD/gcc/gcc/toplev.c:538
#20 0x0816454b in main (argc=47, argv=0x2f)
at /home/ritzert/gcc/HEAD/gcc/gcc/main.c:37
GCC 3.2.1 is fine.
>How-To-Repeat:
c++ -c -O x.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: