https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115345
--- Comment #10 from Djordje Baljozovic <djordje.baljozovic at ac dot rwth-aachen.de> --- (In reply to Jakub Jelinek from comment #8) > Also, if building with GCC 11 works and with GCC 12 doesn't, can you build > two trees, one with either compiler and then bisect first among the shared > libraries or binaries (find out which shared library or binary is affected), > among the static libraries (GCC 11 and 12 ought to be ABI compatible, so try > linking some *.a libraries from one build and other from another build, > among the object files (start with linking half of the objects built by one > compiler and another half by another compiler and depending on if it works > as expected or not change the set of objects to link). > If you get to one object file which when compiled with GCC 11 works even > when everything else has been compiled with GCC 12 or vice versa, you can > then try different options on that one (e.g. the -fno-strict-aliasing Andrew > mentioned, -O0 etc.), and/or > bisect inside of the source using #pragma GCC optimize(0) etc. > Anyway, if there is a single translation unit like that and ideally if you > find out which function is problematic, trying to stub functions it calls > and add a caller which calls that single function with the right arguments > turns it into a self-contained reproducer. Good idea(s). Let me try all Andrew's options firstly, and get back to you. Thanks, George