https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61831
--- Comment #46 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > > And I haven't looked yet at Dominique's feedback in comment #43. > > The test in comment #41 fails at run time when compiled with > -fsanitize=address. > If I take the "complement" of the reduced test posted in comment #43, > everything works fine, but for one builtin_free less. > > I did not investigated what is wrong with the test in comment #43 (will do). The problem occurs even with a clean tree. I have filed PR65792 for it. The test in comment 41 runs without error if compiled with -fsanitize=address and no valgrind error if I remove/comment the lines 58 and 62: tmpc = new_prt_spec2 (string_container_t(prt_in)) and deallocate(tmpc%comp%chars) > The patch (without the above hunk) fixes a lot of problems and makes > the code simpler. IMO it should be submitted and the few left issues > can be deferred (with new PRs). I have bootstrapper 4.9.3 with the patch and I am currently regtesting gfortran. I am planing to do that same for 5.0.1.