------- Comment #44 from olga at il dot ibm dot com 2008-01-21 20:16 ------- (In reply to comment #43) > >> They failed with -fprofile-generate (BTW they fail without -fprofile-*). > ^^^^ without! sorry > > If I understand you correctly, the executable of w_prof_global_var.c, > > compiled > > with -O3 -fipa-type-escape -fwhole-program -combine -fdump-ipa-all, fails on > > your system? > No, w_prof_global_var.c and friends pass without '-fipa-type-escape', but they > fail with > -O3 -fipa-struct-reorg -fwhole-program -combine -fipa-type-escape -m64 > due to a segfault (note that I don't know if '-fipa-struct-reorg > -fwhole-program -combine' makes sense without '-fipa-type-escape'). AFAICT > '-fdump-ipa-all' does not change the outcome: pass without > '-fipa-type-escape', > fail otherwise.
The -fipa-type-escape flag activates the analysis pass, that does not optimize the code itself. The -fipa-struct-reorg relies on this analysis, and does nothing when it is not activated. Therefore the tests pass without ipa-type-escape. Sorry pursuing this issue, but let me completely understand it: when you run *with* profiling, there are two compilations and two executions. If you compile first with: -O3 -fipa-type-escape -fwhole-program -combine -fprofile-generate w_prof_global_var.c and run the generated executable, is it fail or not? > Could this problem be related to PR34621? I do not know. It can be checked by reverting the patch mentioned in comment #5 of this PR. Thank you, Olga -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34483