[Bug c++/82405] Function not inlined for switch and suboptimal assembly is generated
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Oct 3 08:04:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82405
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
> Having a simpler test-case:
> $ cat pr82405-2.c
> enum class eShape { eSquare, eCircle, eShpere, eTetraeder };
>
> double test_switch_native(eShape shape, double r) {
> switch(shape) {
> case eShape::eSquare: return 2;
> case eShape::eCircle: return 3;
> case eShape::eShpere: return 4;
> case eShape::eTetraeder: return 5;
> }
> }
It's PR82404.
More information about the Gcc-bugs
mailing list