Hi Tobias, I am puzzled by the subject: the test gfortran.dg/c_f_pointer_shape_tests_5.f90 does not need the patch to succeed (at least after 4.5.3, it fails only for 4.4.6). Note that the similar test in
http://gcc.gnu.org/ml/fortran/2012-04/msg00115.html fails because c_f_pointer(x, ptr, shape=myshape(::2)) try to set the shape [1,3,5] to a rank 2 pointer (note that this is not detected even with -fcheck=all, should I open a PR for it?). Otherwise I have regstraped trunk and fortran-dev with the patch without regression on trunk. On fortran-dev, as noticed, c_f_pointer_tests_3.f90 has to be adjusted and all the c_f_pointer_* failures are fixed, but c_f_pointer_tests.f90 (i.e., 4 failures out of 5, 15 to go). Cheers, Dominique