https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96482
--- Comment #6 from Yevhenii Kolesnikov <yevh.kolesnikov at gmail dot com> --- (In reply to Jan Hubicka from comment #4) > that patch makes ccp to actually use the bit info ipa-cp determines. Before > we used it only to detect pointer alignments if I remember correctly. So it > looks like propagation bug uncovered by the change. Smaller testcase or > reproduction steps would be indeed welcome. Unfortunately, I wasn't able to create a standalone reproducer yet. Even in mesa it's sometimes finicky to catch this bug. For example, simply adding an fprintf to aforementioned function addr_to_index, prevents it from inlining. As for the reproduction steps with mesa: 1. Build mesa as described in comment #5 2. LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/builds/mesa-bug/lib/ mpv any_video.mp4 3. mesa crashes. Backtrace will slightly differ depending on the driver in use. So far, I've been describing behavior on "iris" driver (default driver for Intel GPUs). I assume, similar optimisation patterns occur in several places, when building mesa.