[Bug c++/24996] [4.0/4.1/4.2 Regression] ICE on throw code
rakdver at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jan 2 18:34:00 GMT 2006
------- Comment #9 from rakdver at gcc dot gnu dot org 2006-01-02 18:34 -------
As the comments in gimplify_cleanup_point_expr indicate,
it only handles cases when cleanup_exprs are not within nested
constructs (with the exception of conditions).
In this PR, the code basically looks like
cleanup_point_expr
{
...
try
{
tmp = b ? target_expr (bla1, something, cleanup1) : target_expr (bla2,
something, cleanup2)
}
catch {...}
throw (tmp);
}
The target_exprs expand cleanups to cleanup_exprs, that however are not spotted
by gimplify_cleanup_point_expr, since they are within try_catch_expr.
The reason why this does not reproduce without the test for b is that then the
code
looks like
cleanup_point_expr
{
...
try
{
tmp = target_expr (bla1, something, cleanup1);
}
catch {...}
throw (tmp);
}
and there is another bug in gimplify_modify_expr_rhs that causes cleanup1
to be ignored.
Fixing this seems to need a complete rewrite of gimplify_cleanup_point_expr.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24996
More information about the Gcc-bugs
mailing list