[Bug c++/27094] [4.0/4.1/4.2 Regression] tree check: expected tree_list, have omp_return in build_call
------- Comment #6 from jakub at gcc dot gnu dot org 2006-04-12 11:46 -------
It is a GC problem, when build_over_call calls mark_used, it certainly doesn't
expect mark_used to do a gcc_collect underneath it, as it has several tree
pointers stored in local variables. I guess build_over_call isn't the only
place that trusts mark_used doesn't do that, e.g. build_call,
build_op_delete_call, finish_eh_spec_block etc. likely suffer from the same
problem.
The call chain that leads to ggc_collect is mark_used ->
{synthetize_method,instantiate_decl} -> expand_or_defer_fn ->
cgraph_finalize_function -> ggc_collect.
So, either we change mark_used to never trigger GC from underneath us
(e.g. by function_depth++; synthetise_method (...); function_depth--; and
probably similarly for instantiate_decl), or we add an argument to mark_used
if it is ok to ggc_collect (similarly to cgraph_finalize_function's NESTED
argument), or we change all mark_used callers that might suffer from this
(either by adding function_depth++/function_depth-- around the call, or by
registering its temporaries with GC before calling mark_used).
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com,
| |mark at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
Reply to: