https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77648
--- Comment #2 from Raymond Fontenot <raynman4451 at tamu dot edu> --- Created attachment 39650 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39650&action=edit Test Case for Bug I've attached a test case for this. The code will produce the incorrect polynomial function p at the end of the routine for the given parameters. The code will generate the following polynomial (a 1D Wendland function): -0.352E-01 0.000E+00 x 0.446E-01 x^ 2 0.000E+00 x^ 3 -0.298E-02 x^ 4 0.000E+00 x^ 5 0.208E-01 x^ 6 -0.476E-01 x^ 7 0.521E-01 x^ 8 -0.317E-01 x^ 9 0.000E+00 x^10 0.000E+00 x^11 The correct output from the code should be: -0.451E-04 0.000E+00 x 0.496E-03 x^ 2 0.000E+00 x^ 3 -0.298E-02 x^ 4 0.000E+00 x^ 5 0.208E-01 x^ 6 -0.476E-01 x^ 7 0.521E-01 x^ 8 -0.317E-01 x^ 9 0.104E-01 x^10 -0.144E-02 x^11 The bug in question happens in the function (in poly_module.f90) integrate_poly_indefinite, called in generate_wendland.f90.