From a quick test, with the patch I still see the error with -m32 /var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//cc8Yz3Jr.s:18:non-relocatable subtraction expression, "__F.caf_token__global_coarrays_MOD_b" minus "L1$pb" /var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//cc8Yz3Jr.s:18:symbol: "__F.caf_token__global_coarrays_MOD_b" can't be undefined in a subtraction expression
but also the test fails at link time with -m64 [Book15] f90/bug% gfc /opt/gcc/work/gcc/testsuite/gfortran.dg/coarray/codimension_2.f90 /opt/gcc/work/gcc/testsuite/gfortran.dg/coarray/codimension_2a.f90 -fcoarray=lib -O2 -lcaf_single Undefined symbols for architecture x86_64: "__F.caf_token__global_coarrays_MOD_b", referenced from: __caf_init.0 in ccljvUii.o _MAIN__ in ccmqTPwK.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status Dominique > Le 3 janv. 2015 à 21:50, Tobias Burnus <bur...@net-b.de> a écrit : > > Dominique Dhumieres wrote: >> The test gfortran.dg/coarray/codimension_2.f90 fails on >> x86_64-apple-darwin14 with -m32 >> (see https://gcc.gnu.org/ml/gcc-testresults/2015-01/msg00185.html). The >> error is >> [...] > > Yes, there seems to be something wrong. The module has: > > U _F.caf_token__global_coarrays_MOD_b > 0000000000000000 B __global_coarrays_MOD_b > > where the token should not be "U"ndefined but "B". On the other hand, the > USEr of the module has: > > 0000000000000000 B _F.caf_token__global_coarrays_MOD_b > U __global_coarrays_MOD_b > > but it should have a "U" – with two users one even would get: "multiple > definition of `_F.caf_token__global_coarrays_MOD_b'". > > > Untested patch attached. > > Tobias > <foo.diff>