public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/99219] New: Possible wrong code for finalizator call with class via trans_scalar_class_assign ?
@ 2021-02-23 15:20 burnus at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: burnus at gcc dot gnu.org @ 2021-02-23 15:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99219
           Summary: Possible wrong code for finalizator call with class
                    via trans_scalar_class_assign ?
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: pault at gcc dot gnu.org
  Target Milestone: ---

[Disclaimer: Not properly checked – but just observed when looking for
something else in the code.]


class.c has for generate_finalization_wrapper:

   The generated function has the form
     _final(assumed-rank array, stride, skip_corarray)


But the call in trans-expr.c has in trans_scalar_class_assign:

  fcn = gfc_vptr_final_get (gfc_class_vptr_get (rse_expr));
...
  tmp = build_call_expr_loc (input_location, fcn, 1, class_data);


I have not checked more deeply, but it looks as if the second and third
arguments are missing?

By contrast, trans.c's gfc_add_finalizer_call has:

  tmp = build_call_expr_loc (input_location,
                             final_fndecl, 3, array,
                             size, fini_coarray ? boolean_true_node
                                                : boolean_false_node);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-23 15:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-23 15:20 [Bug fortran/99219] New: Possible wrong code for finalizator call with class via trans_scalar_class_assign ? burnus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).