https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54262
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Regtested cleanly with the patch in comment 4. If I remove the lines se->expr = convert (pvoid_type_node, se->expr); se->expr = gfc_evaluate_now (se->expr, &se->pre); in conv_isocbinding_function, on darwin I get a warning at link time with the tests in f03gl: ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in lC0 from /var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//ccjizw7H.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie However all the tests I have tried succeed. I also see FAIL: gfortran.dg/c_loc_test_22.f90 -O scan-tree-dump-times original "D.[0-9]+ = parm.[0-9]+.data;[^;]+ptr[1-4] = D.[0-9]+;" 4 (found 0 times) the D.* = parm.*.data; ptr* = D.*; are replaced with ptr* = parm.*.data; If I remove the lines temp_var = gfc_create_var (gfc_get_int_type (gfc_index_integer_kind), NULL); gfc_add_modify (&se->pre, temp_var, se->expr); se->expr = temp_var; in gfc_conv_intrinsic_loc, I see FAIL: gfortran.dg/loc_1.f90 -O* (test for excess errors) due to % gfc /opt/gcc/_clean/gcc/testsuite/gfortran.dg/loc_1.f90 Undefined symbols for architecture x86_64: "_targ.3866", referenced from: lC0 in ccakGHjX.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status