https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86655
--- Comment #4 from emsr at gcc dot gnu.org --- Created attachment 45414 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45414&action=edit This is a patch on both std and tr1, both sph_legendre and assoc_legendre. 2018-01-11 Edward Smith-Rowland <3dw...@verizon.net> PR libstdc++/86655 - std::assoc_legendre should not constrain the value of m * include/tr1/legendre_function.tcc (__assoc_legendre_p, __sph_legendre): If degree > order Don't throw, return 0. * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test. * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test. * testsuite/tr1/5_numerical_facilities/special_functions/ 02_assoc_legendre/pr86655.cc: New test. * testsuite/tr1/5_numerical_facilities/special_functions/ 22_sph_legendre/pr86655.cc: New test.