PR fortran/32600
* trans-expr.c (gfc_conv_function_call): Inline C_LOC.
2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32600
* libgfortran/intrinsics/iso_c_binding.c: Remove C_LOC.
* libgfortran/intrinsics/iso_c_binding.h: Ditto.
* libgfortran/gfortran.map: Ditto.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126744
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
+
+ PR fortran/32600
+ * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
+
2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
PR fortran/32801
var = NULL_TREE;
len = NULL_TREE;
+ if (sym->from_intmod == INTMOD_ISO_C_BINDING
+ && sym->intmod_sym_id == ISOCBINDING_LOC)
+ {
+ if (arg->expr->rank == 0)
+ {
+ gfc_conv_expr_reference (se, arg->expr);
+ }
+ else
+ {
+ int f;
+ /* This is really the actual arg because no formal arglist is
+ created for C_LOC. */
+ fsym = arg->expr->symtree->n.sym;
+
+ /* We should want it to do g77 calling convention. */
+ f = (fsym != NULL)
+ && !(fsym->attr.pointer || fsym->attr.allocatable)
+ && fsym->as->type != AS_ASSUMED_SHAPE;
+ f = f || !sym->attr.always_explicit;
+
+ argss = gfc_walk_expr (arg->expr);
+ gfc_conv_array_parameter (se, arg->expr, argss, f);
+ }
+
+ return 0;
+ }
+
if (se->ss != NULL)
{
if (!sym->attr.elemental)
+2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
+
+ PR fortran/32600
+ * libgfortran/intrinsics/iso_c_binding.c: Remove C_LOC.
+ * libgfortran/intrinsics/iso_c_binding.h: Ditto.
+ * libgfortran/gfortran.map: Ditto.
+
2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
__iso_c_binding_c_f_pointer_u0;
__iso_c_binding_c_f_procpointer;
__iso_c_binding_c_funloc;
- __iso_c_binding_c_loc;
local:
*;
};
}
-/* Return the C address of the given Fortran allocatable object. */
-
-void *
-ISO_C_BINDING_PREFIX (c_loc) (void *f90_obj)
-{
- if (f90_obj == NULL)
- {
- runtime_error ("C_LOC: Attempt to get C address for Fortran object"
- " that has not been allocated or associated");
- abort ();
- }
-
- /* The "C" address should be the address of the object in Fortran. */
- return f90_obj;
-}
-
-
/* Return the C address of the given Fortran procedure. This
routine is expected to return a derived type of type C_FUNPTR,
which represents the C address of the given Fortran object. */
void ISO_C_BINDING_PREFIX(c_f_pointer_d0) (void *, gfc_array_void *,
const array_t *);
-void *ISO_C_BINDING_PREFIX(c_loc) (void *);
void *ISO_C_BINDING_PREFIX(c_funloc) (void *);
#endif