https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113357
--- Comment #13 from Mikael Pettersson <mikpelinux at gmail dot com> --- (In reply to Mikael Pettersson from comment #9) > (In reply to Manolis Tsamis from comment #8) > > Created attachment 58335 [details] > > Do not modify live_out registers > > > > After looking again at the dumps from PR112415, which I believe is closely > > related to the issue here, I saw that while f-m-o was checking the uses of > > the folded registers, it was still modifying registers that were at the BB's > > live_out set. > > > > I have attached a patch that I'm testing for addressing this. Could you > > please check if this fixes this issue? > > I'm starting a bootstrap on m68k-linux-gnu with this now, should know by > Friday if it resolves the issue or not. (It's running in full-system > emulation mode on Aranym, so it's slow.) Failed with a compile-warning-turned-error, haven't had time to investigate. In file included from /mnt/scratch/gcc-15-20240602/gcc/system.h:726, from /mnt/scratch/gcc-15-20240602/gcc/gimple-range-edge.cc:24: In member function 'wide_int_storage& wide_int_storage::operator=(const T&) [with T = wi::hwi_with_prec]', inlined from 'generic_wide_int<storage>& generic_wide_int<T>::operator=(const T&) [with T = wi::hwi_with_prec; storage = wide_int_storage]' at /mnt/scratch/gcc-15-20240602/gcc/wide-int.h:1002:23, inlined from 'void irange_bitmask::set_unknown(unsigned int)' at /mnt/scratch/gcc-15-20240602/gcc/value-range.h:165:27, inlined from 'virtual void irange::set_varying(tree)' at /mnt/scratch/gcc-15-20240602/gcc/value-range.h:1140:25, inlined from 'int_range<N, RESIZABLE>::int_range(tree) [with unsigned int N = 3; bool RESIZABLE = true]' at /mnt/scratch/gcc-15-20240602/gcc/value-range.h:1102:15, inlined from 'void gimple_outgoing_range::calc_switch_ranges(gswitch*)' at /mnt/scratch/gcc-15-20240602/gcc/gimple-range-edge.cc:140:36: /mnt/scratch/gcc-15-20240602/gcc/wide-int.h:1241:23: error: 'default_range.int_range<3, true>::<unnamed>.irange::m_bitmask.irange_bitmask::m_value.generic_wide_int<wide_int_storage>::<unnamed>.wide_int_storage::u.wide_int_storage::<unnamed union>::valp' may be used uninitialized [-Werror=maybe-uninitialized] 1241 | XDELETEVEC (u.valp); /mnt/scratch/gcc-15-20240602/gcc/../include/libiberty.h:370:48: note: in definition of macro 'XDELETEVEC' 370 | #define XDELETEVEC(P) free ((void*) (P)) | ^ /mnt/scratch/gcc-15-20240602/gcc/gimple-range-edge.cc: In member function 'void gimple_outgoing_range::calc_switch_ranges(gswitch*)': /mnt/scratch/gcc-15-20240602/gcc/gimple-range-edge.cc:140:17: note: 'default_range' declared here 140 | int_range_max default_range (type); | ^~~~~~~~~~~~~ cc1plus: all warnings being treated as errors make[3]: *** [Makefile:1197: gimple-range-edge.o] Error 1