https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109066
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Paul Thomas <pa...@gcc.gnu.org>: https://gcc.gnu.org/g:27ff8049bbdb0a001ba46835cd6a334c4ac76573 commit r15-5347-g27ff8049bbdb0a001ba46835cd6a334c4ac76573 Author: Paul Thomas <pa...@gcc.gnu.org> Date: Sat Nov 16 15:56:10 2024 +0000 Fortran: Fix segmentation fault in defined assignment [PR109066] 2024-11-16 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/109066 * resolve.cc (generate_component_assignments): If the temporary for 'var' is a pointer and 'expr' is neither a constant or a variable, change its attribute from pointer to allocatable. This avoids assignment to a temporary point that has neither been allocated or associated. gcc/testsuite/ PR fortran/109066 * gfortran.dg/defined_assignment_12.f90: New test.