Summary: | Bind(C): c_f_pointer: type/rank mismatch error with integer(8) SHAPE | ||
---|---|---|---|
Product: | gcc | Reporter: | Tobias Burnus <burnus> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | crickett, gcc-bugs |
Priority: | P3 | ||
Version: | 4.3.0 | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2007-08-09 23:04:19 | |
Bug Depends on: | |||
Bug Blocks: | 32630 |
Description
Tobias Burnus
2007-08-08 06:50:16 UTC
Some further testing shows: NAG f95 always wants to have a default kind for SHAPE in c_f_pointer though the standard allows all kinds. If I change integer(fgsl_size_t) (fgsl_size_t = c_site_t = 8) into integer(4), the program works with gfortran while integer(8) shows the type/rank mismatch. Why it works if I create a minimal test case, but not in the full-blown program, I do not understand. Subject: Bug number PR 33020 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00604.html Subject: Bug 33020 Author: burnus Date: Wed Aug 22 21:28:08 2007 New Revision: 127719 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127719 Log: 2007-08-22 Christopher D. Rickett <crickett@lanl.gov> PR fortran/33020 * resolve.c (gfc_iso_c_sub_interface): Remove setting of type and kind for optional SHAPE parameter of C_F_POINTER. 2007-08-22 Christopher D. Rickett <crickett@lanl.gov> PR fortran/33020 * gfortran.dg/c_f_pointer_shape_tests_2.f03: Update test to include multiple kinds for SHAPE parameter within a single namespace. * gfortran.dg/c_f_pointer_shape_tests_2_driver.c: Ditto. * gfortran.dg/c_f_pointer_shape_tests_3.f03: New test case. Added: trunk/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_3.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03 trunk/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2_driver.c FIXED on the trunk. |