https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124484
--- Comment #7 from Andre Vehreschild <vehre at gcc dot gnu.org> ---
So, would this then be more the fix:
if { [istarget *-*-freebsd*] } {
dg-test $test "-fcoarray=lib -pthread $flags -lcaf_shmem" {}
} else {
if { [istarget *-linux*] } {
dg-test $test "-fcoarray=lib -pthread -lrt $flags
-lcaf_shmem" {}
} else {
dg-test $test "-fcoarray=lib $flags -lcaf_shmem" {}
}
}
I.e. always add -pthread -lrt when running on Linux?
