[Bug middle-end/57904] [4.9 Regression] Bogus(?) "invokes undefined behavior" warning with Fortran's finalization wrapper (gfortran.dg/class_48.f90)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 20 08:36:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57904

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #11)
> With the patch in comment 9, gfortran.dg/class_48.f90 no longer fails and I
> don't see any regression. The warning for the test in pr58746 comment 2 is
> also fixed.

But you can always create testcases (in C/C++ etc.) that will hit this warning,
so while the FE change is possible, we need to do something either about the
optimization passes in between IPA and cunrolli (copyprop change Jeff talks
about, perhaps only done for that single pass instance and not others, or all?,
guess depending on how expensive it is) or scheduling there another instance of
some other cleanup pass, or deferring the warning reporting until some cleanup.

For the FE change, I guess most important are benchmark results, doesn't it
slow down important benchmarks?



More information about the Gcc-bugs mailing list