https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71269
--- Comment #7 from Roger Orr <rogero at howzatt dot demon.co.uk> --- I've got a very similar problem, building valgrind with trunk revision 236644: m_mallocfree.c: In function 'sanity_check_malloc_arena': m_mallocfree.c:1055:13: internal compiler error: Segmentation fault static void sanity_check_malloc_arena ( ArenaId aid ) ^~~~~~~~~~~~~~~~~~~~~~~~~ 0xbac3df crash_signal ../../gcc/toplev.c:333 0xd46249 sort_by_operand_rank ../../gcc/tree-ssa-reassoc.c:530 0xd52d83 reassociate_bb ../../gcc/tree-ssa-reassoc.c:5268 0xd51027 reassociate_bb ../../gcc/tree-ssa-reassoc.c:5389 0xd53f7a do_reassoc ../../gcc/tree-ssa-reassoc.c:5503 0xd53f7a execute_reassoc ../../gcc/tree-ssa-reassoc.c:5590 0xd53f7a execute ../../gcc/tree-ssa-reassoc.c:5629 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. I've uploaded the preprocessed input and compiler output.