]> git.ipfire.org Git - thirdparty/gcc.git/commit
fortran: Remove reference count update [PR108957]
authorMikael Morin <mikael@gcc.gnu.org>
Fri, 15 Sep 2023 11:40:08 +0000 (13:40 +0200)
committerMikael Morin <mikael@gcc.gnu.org>
Fri, 15 Sep 2023 11:43:43 +0000 (13:43 +0200)
commite6dba708c8627080f4ca776590a191683b38336c
treeebfba85db2b31786c2bd21a3500a3fd177369c73
parentb259284ee135a432e0097d923d0908350f74f468
fortran: Remove reference count update [PR108957]

Remove one reference count incrementation following the assignment of a
symbol pointer to a local variable.  Most symbol pointers are "weak" pointer
and don't need any reference count update when they are assigned, and it is
especially the case of local variables.

This fixes a memory leak with the testcase from the PR (not included).

PR fortran/108957

gcc/fortran/ChangeLog:

* gfortran.h (gfc_symbol): Add comment documenting reference counting.
* parse.cc (parse_interface): Remove reference count incrementation.
gcc/fortran/gfortran.h
gcc/fortran/parse.cc