[Bug fortran/98454] Apparent wrong initialization in function result

anlauf at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Dec 27 21:44:34 GMT 2020


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

--- Comment #3 from anlauf at gcc dot gnu.org ---
According to the tree-dump, adding a

  print *, res% unit

to the function body invokes the implicit initializer, while the line

  res = t()

actually invokes the initializer effectively twice!


More information about the Gcc-bugs mailing list