> In r207132, I have now committed a merge of trunk r206958 (2014-01-23). > Compared to a pristine trunk r206958 build, there is one regression: > > FAIL: g++.dg/gomp/declare-simd-1.C -std=c++98 (internal compiler error) > FAIL: g++.dg/gomp/declare-simd-1.C -std=c++11 (internal compiler error) > > [...]/build/gcc/testsuite/g++/../../xg++ > -B[...]/build/gcc/testsuite/g++/../../ > [...]/source/gcc/testsuite/g++.dg/gomp/declare-simd-1.C > -fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++ > -I[...]/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu > -I[...]/build/x86_64-unknown-linux-gnu/libstdc++-v3/include > -I[...]/source/libstdc++-v3/libsupc++ > -I[...]/source/libstdc++-v3/include/backward > -I[...]/source/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++98 > -fopenmp -S -o declare-simd-1.s > [...]/source/gcc/testsuite/g++.dg/gomp/declare-simd-1.C:243:1: internal > compiler error: in estimate_function_body_sizes, at ipa-inline-analysis.c:2403 > 0xa19664 estimate_function_body_sizes > ../../source/gcc/ipa-inline-analysis.c:2403 > 0xa19ef1 compute_inline_parameters(cgraph_node*, bool) > ../../source/gcc/ipa-inline-analysis.c:2797 > 0xa1a200 inline_analyze_function > ../../source/gcc/ipa-inline-analysis.c:3790 > 0x865a10 cgraph_call_function_insertion_hooks(cgraph_node*) > ../../source/gcc/cgraph.c:405 > 0xacc652 simd_clone_create > ../../source/gcc/omp-low.c:11600 > 0xacc652 expand_simd_clones > ../../source/gcc/omp-low.c:12370 > 0xacc652 ipa_omp_simd_clone > ../../source/gcc/omp-low.c:12410 > 0xacc652 execute > ../../source/gcc/omp-low.c:12443 > > In my understanding, the only gomp-4_0-branch-specific change that is a > candidate to cause this is r205214 (Ilya Tocar, commited by Kirill > Yukhin) for "LTO" streaming. As I couldn't easily tell what's wrong (all > changes from r205214 are still present; there were no obvious conflicts), > could you guys please have a look at that one? >
Hi, Sorry for the delay, i was busy with AVX512. I finally had time to look into this bug. The problem in r205214 was in adding add_new_function hook in inline_generate_summary with -O0 -fopenmp and not removing it, before running expand_simd_clones. I've changed inline_free_summary to always remove hooks. Patch bellow. It bootstraps, passes make check, fixes declare-simd-1.C. Ok for gomp4 branch? --- gcc/ipa-inline-analysis.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index d4abd90..440ae79 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -4143,11 +4143,6 @@ void inline_free_summary (void) { struct cgraph_node *node; - if (!inline_edge_summary_vec.exists ()) - return; - FOR_EACH_DEFINED_FUNCTION (node) - if (!node->alias) - reset_inline_summary (node); if (function_insertion_hook_holder) cgraph_remove_function_insertion_hook (function_insertion_hook_holder); function_insertion_hook_holder = NULL; @@ -4162,6 +4157,11 @@ inline_free_summary (void) node_duplication_hook_holder = NULL; if (edge_duplication_hook_holder) cgraph_remove_edge_duplication_hook (edge_duplication_hook_holder); + if (!inline_edge_summary_vec.exists ()) + return; + FOR_EACH_DEFINED_FUNCTION (node) + if (!node->alias) + reset_inline_summary (node); edge_duplication_hook_holder = NULL; vec_free (inline_summary_vec); inline_edge_summary_vec.release (); -- 1.8.3.1