Commit bfaba7a9 by Andrew Pinski Committed by Andrew Pinski

re PR c++/12709 (ICE with __FUNCTION__ and function-try-block)

2004-01-13  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/12709
        * c-common.c (finish_fname_decls): Use the chain only if the
        tree is an expr_stmt.

2004-01-13  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/12709
        * g++.dg/parse/try-catch-1.C: New test.

From-SVN: r75814
parent 81c740ba
2004-01-13 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/12709
* c-common.c (finish_fname_decls): Use the chain only if the
tree is an expr_stmt.
2004-01-13 Vladimir Makarov <vmakarov@redhat.com>
* rtl.def: Add comment about new option in automata_option.
......
......@@ -1053,7 +1053,13 @@ finish_fname_decls (void)
tree *p = &DECL_SAVED_TREE (current_function_decl);
/* Skip the dummy EXPR_STMT and any EH_SPEC_BLOCK. */
while (TREE_CODE (*p) != COMPOUND_STMT)
p = &TREE_CHAIN (*p);
{
if (TREE_CODE (*p) == EXPR_STMT)
p = &TREE_CHAIN (*p);
else
p = &TREE_OPERAND(*p, 0);
}
p = &COMPOUND_BODY (*p);
if (TREE_CODE (*p) == SCOPE_STMT)
p = &TREE_CHAIN (*p);
......
2004-01-13 Andrew Pinski <pinskia@physics.uc.edu>
PR c++/12709
* g++.dg/parse/try-catch-1.C: New test.
2004-01-13 Arnaud Charlet <charlet@act-europe.fr>
* ada/acats/run_all.sh: Add more verbose output in acats.log
......
// Test case from: <ncm-nospam@cantrip.org>
// Reduced by <bangerth@dealii.org>
// The problem was that g++ was ICE because
// it was deferring an NULL pointer because
// it should have been taking the operand 1
// instead of the chain in finish_fname_decls.
void fun()
try
{
__FUNCTION__;
}
catch (...) {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment