https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113797
Bug ID: 113797
Summary: Deferred length character concatenation in openmp
region has wrong length
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: mscfd at gmx dot net
Target Milestone: ---
Created attachment 57349
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57349&action=edit
concat.f90
The code compiled with -fopenmp and run with at least 2 threads fails.
Usually "out" contains the expected string, but occasionally "out" is just "abc
", the leading concat_f(..) part is missing. I have added the
"// 'abc'" part to make this more visible. Without this additional
concatenation "out" would be empty. Looks like the length of the concat_f
result is wrong sometimes.
I do not see any errors with valgrind/helgrind or sanitizers.
The problem is already present in gfortran-13.
There are some related bugs, like bug 97977. But here all the involved
variables are local variables in subroutines or functions and thus on thread
private stack. So this feels different.