[Bug fortran/89174] [8/9 Regression] Allocation segfault with CLASS(*) MOLD
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Feb 24 10:00:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89174
--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
And on my AMD system, it does indeed pass with r265170. OK.
Looking at the diff of the tree dumps between the two versions,
the difference is
--- a.r265170 2019-02-24 10:56:39.138713129 +0100
+++ a.r265171 2019-02-24 10:56:59.598888069 +0100
@@ -229,10 +229,7 @@
}
(struct __vtype__STAR *) this->_data->mold._vptr = (struct __vtype__STAR *)
((struct __class__STAR_t *) value)->_vptr;
this->_data->mold._len = ((struct __class__STAR_t *) value)->_len;
- if (this->_data->mold._vptr->_def_init != 0B)
- {
- (void) __builtin_memcpy (this->_data->mold._data, (void *)
this->_data->mold._vptr->_def_init, (unsigned long)
this->_data->mold._vptr->_size);
- }
+ (void) __builtin_memcpy (this->_data->mold._data, (void *)
this->_data->mold._vptr->_def_init, (unsigned long)
this->_data->mold._vptr->_size);
}
so there is a NULL pointer check missing from the code compiled with
r265171.
More information about the Gcc-bugs
mailing list