![](https://seccdn.libravatar.org/avatar/a895f78a81a109471893519443e4d933.jpg?s=120&d=mm&r=g)
https://bugzilla.suse.com/show_bug.cgi?id=1224402 https://bugzilla.suse.com/show_bug.cgi?id=1224402#c11 --- Comment #11 from Martin Jambor <mjambor@suse.com> --- I will look into why the variable was not promoted to const automagically in this case because that seems to be somewhat lame (but maybe some real reason escaped me). However, failing that, GCC cannot reliably identify every piece of unreachable code. If, for example, the address of the non-const array escaped the compilation unit, then GCC simply might not do anything better than what it does. (Well, GCC 13 has a new option -funreachable-traps which puts a trap before the "fall-through" but we have just discovered its current documentation is not correct and since ATM I cannot really estimate its costs, I cannot really recommend using it or even evaluating it.) -- You are receiving this mail because: You are on the CC list for the bug.