https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51513
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=94779
--- Comment #16 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Michał Mirosław from comment #12)
> Created attachment 48236 [details]
> testcase
>
> This bug reoccurred in gcc-8. gcc-7 and gcc-9+ seem not affected.
Right. Switch lowering happened after fab in GCC 8.
It was moved before fab in GCC 9 by r9-395-geb63c01f65d475 . So that issue was
fixed for GCC 9.
Now with reverting part of "cfgcleanup" part of r8-546, if we don't lower the
switch, then unless the default is an "unreachable" block, you end up with a
jump statement that might jump to an "unreachable" block.
So I am going to fix that up in forwprop (where optimize_unreachable was moved
to in GCC 16).
Note I have to figure out what to do for GCC 16.2.0 which parts to backport.
I might only backport the revertpart even though that could introduce another
regression. Note removing unreachable blocks during cfgcleanup seems too early
anyways due to now missing range information. (PR 94779, maybe PR 94566, and PR
112687)