Skip to content
Snippets Groups Projects
Commit 27ff8049 authored by Paul Thomas's avatar Paul Thomas
Browse files

Fortran: Fix segmentation fault in defined assignment [PR109066]

2024-11-16  Paul Thomas  <pault@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.
parent 4a4bd60f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment