See https://bugzilla.redhat.com/show_bug.cgi?id=1064090 for test details using gtkwave. -O2 by default: crash -O0: no crash -O1: crash -O1 --fno-*: crash -O1 --fno-* (from gcc -Q -O1) -fno-omit-frame-pointer: no crash -O2 --fno-* (from gcc -Q -O1) -fno-omit-frame-pointer: crash -O2 --fno-* (from gcc -Q -O2) -fno-omit-frame-pointer: no crash -O2 --fno-* (from gcc -Q -O2): no crash as above with with -O2 tree options enabled: crash -O2 --fno-* (from gcc -Q -O2) with -fmerge-constants: no crash as above but with reorder options enabled: no crash as above but with align options enabled: no crash as above but with if-conversion options enabled: no crash as above but with inline-function options enabled: no crash as above but with -ftree-vrp option enabled: JUDYMEM errors and lockup as above but with -fno-tree-vrp and -ftree-tail-merge options enabled: no crash as above but with O2 tree options except -fno-tree-vrp enabled: no crash DECISION: -fno-tree-vrp required as above but with O1 tree options enabled: crash as previous but with -ftree-ter option enabled: no crash as above but with -ftree-sra option enabled: no crash as above but with -ftree-slsr option enabled: no crash as above but with -ftree-sink option enabled: no crash as above but with -ftree-fre option enabled: no crash as above but with -ftree-copyrename and -ftree-dominator-opts options enabled: crash as above but with just -ftree-dominator-opts option enabled: crash DECISION: -fno-tree-dominator-opts required as previous but with just -ftree-copyrename option enabled: no crash as above but with -ftree-dce and -ftree-dse options enabled: no crash as above but with -ftree-bit-ccp -ftree-ccp -ftree-ch -ftree-copy-prop options enabled: crash as above but with -fno-tree-bit-ccp -fno-tree-ccp options enabled: crash as previous but with -fno-tree-ch -fno-tree-copy-prop options enabled: crash as above but with -fno-tree-bit-ccp option enabled: crash as above but with -fno-tree-ccp and -ftree-bit-ccp options enabled: no crash DECISION: -fno-tree-ccp required as above but with -ftree-copy-prop option enabled: crash DECISION: -fno-tree-copy-prop required as previous but with -ftree-ch option enabled: no crash as above but with -foptimize-register-move -foptimize-sibling-calls -foptimize-strlen options enabled: no crash as above but with -fpeephole2 -fregmove -frerun-cse-after-loop options enabled: no crash as above but with -fschedule-insns2 -fthread-jumps options enabled: no crash as above but with -fipa-cp -fipa-sra options enabled: no crash as above but with -fipa-profile -fipa-pure-const -fipa-reference options enabled: no crash as above but with -fgcse -fhoist-adjacent-loads options enabled: no crash as above but with -fcombine-stack-adjustments -fcompare-elim -fcprop-registers options enabled: no crash as above but with -fdefer-pop -fforward-propagate -fguess-branch-probability options enabled: no crash as above but with -fshrink-wrap -fsplit-wide-types options enabled: no crash as above but with -fcaller-saves -fcrossjumping -fcse-follow-jumps options enabled: no crash as above but with -fdevirtualize -fexpensive-optimizations enabled: no crash CONCLUSION: need -fno-strict-aliasing -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dominator-opts -fno-tree-vrp