https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118747

--- Comment #1 from anlauf at gcc dot gnu.org ---
Not sure what kind of regression this is.  The situation is "interesting".

Replacing deferrred-length by fixed-length leads to a crash with gcc-14, too.
(e.g. when using character(len=3), allocatable :: string_)

Compiling with deferrred-length, but with optimization, hides the problem
somehow, at least with the testcase.

The tree-dump suggests that we double-free, but I have some doubt about
the code generated by gcc-14, too.  There is free'ing going on in the
elemental loop on the one side, while gcc-15 does a free of the string
when destructing the constructor.

I don't see at the moment what the right intention is with the temporary
for the constructor.

Reply via email to