]> git.ipfire.org Git - thirdparty/gcc.git/commit
fortran: Remove default initialization of local pointers's span
authorMikael Morin <morin-mikael@orange.fr>
Tue, 5 Aug 2025 12:58:00 +0000 (14:58 +0200)
committerMikael Morin <mikael@gcc.gnu.org>
Tue, 5 Aug 2025 20:35:07 +0000 (22:35 +0200)
commitacb0fa251abf55bfdd50e90b2c97ab084204ca6c
tree73dbd93e4131b754fac42530b102625b6a43f5a3
parent914b7296ebe4940abc23be419a946e491402ed67
fortran: Remove default initialization of local pointers's span

A pointer has no default initialization; it is invalid to use it before
it is associated to a target.  We can just as well leave its span field
uninitialized, and wait for the first pointer association to define a
span value.  The value of zero was an invalid span value anyway.

gcc/fortran/ChangeLog:

* trans-decl.cc (gfc_trans_deferred_vars): Don't default
initialize the span of local pointer arrays.
gcc/fortran/trans-decl.cc