Hi, While debugging a GCC failure on ARM when compiling with -fprofile-use, I came across a case where if_convert merges 2 blocks which belong to different partitions (hot/cold).
In turn merge_blocks() (in cfghooks.c) merges the BB flags by ORing them, resulting in a block belonging to both cold and hot partitions, which seems to confuse the compiler: for instance in bb-reorder.c:connect_traces(), the code expects only one partition flag to be set. I think merge_blocks() should be modified to handle such cases; I experimented a little and forcing the merged BB's partition to be the hot one in such a case is not sufficient: some edges have been marked as crossing ones, and this would be no longer true. Is there a simple way to clean that? Thanks, Christophe.