ChangeLog: * src/mcs51/peeph.def (257.b): Do not apply this rule inside jump tables. * support/regression/tests/bug-4066.c: New regression test.
Thanks, the analysis was very helpful. I submitted [patches:#515] for review. It marks the function pointer itself as volatile instead of the function return type, and adds a regression test based on this ticket. This should also fix [bugs:#4041]. Please let me know if this makes sense.
Fix warning 361 for absolute function pointers
I have added the regression test in [patches:#514]. It is based on the same switch statements from gcc-torture-execute-20011109-1.c, with #pragma opt_code_speed #pragma nosidechannels I tested it without the notInJumpTable() change, and the test failed. With the fix applied, the test passed. Thanks!
Updated: bug-4066-v2.patch The actual code change is unchanged. I only added a regression test based on the original failing gcc-torture-execute-20011109-1.c testcase. Please use this version instead of the previous one!
Updated: bug-4066-v2.patch The actual code change is unchanged. I only added a regression test based on the original failing gcc-torture-execute-20011109-1.c testcase. Please use this version instead of the previous one!
Thanks, I will add a regression test using #pragma nosidechannels.
Thanks, I’ll use [patches:#nnn] next time. I also just noticed that you had already fixed the format for me on my previous patch. Sorry I didn’t notice that earlier, and thank you!