[Bug fortran/120286] [13/14/15/16 regression] [OpenMP] Double free detected when using openmp
albert at tugraz dot at
gcc-bugzilla@gcc.gnu.org
Tue Mar 10 22:27:24 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120286
--- Comment #3 from Christopher Albert <albert at tugraz dot at> ---
Created attachment 63880
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63880&action=edit
Proposed patch: preserve scalar class pointers in OpenMP privatization
OpenMP private/firstprivate on scalar class pointers incorrectly finalized and
freed the shared target on worker cleanup. This patch recognizes class-pointer
containers in the copy_ctor and dtor hooks so they preserve only pointer
association. Regtested on x86_64-pc-linux-gnu.
More information about the Gcc-bugs
mailing list