Hello, On Wed, 28 Jun 2023, Julian Waters via Gcc wrote:
> On the contrary, code compiled with gcc with or without the applied patch > operates very differently, with only gcc with the applied patch producing a > fully correctly operating program as expected. Even if the above inline > assembly blocks never worked due to other optimizations however, the > failure mode of the program would be very different from how it fails now: > It should fail noisily with an access violation exception due to > the malformed assembly, but instead all the assembly which installs an > exception handler never makes it into the final program because with > anything higher than -O1 gcc deletes all of it (I have verified this with > objdump too), Can you please provide a _full_ compilable testcase (preprocessed). What Andrew says is (supposed to be) correct: ignoring the other problems you're going to see with your asms (even if you make them volatile) GCC should not remove any of the asm statements of them. If something changes when you add 'volatile' by hand then we have another problem lurking somewhere, and adding the parser patch might not fully solve it (even if it changes behaviour for you). Ciao, Michael.