This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r122794 - in /branches/fortran-experiments: gcc...
- From: burnus at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Sat, 10 Mar 2007 13:11:57 -0000
- Subject: r122794 - in /branches/fortran-experiments: gcc...
Author: burnus
Date: Sat Mar 10 13:11:56 2007
New Revision: 122794
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122794
Log:
2007-03-10 Christopher D. Rickett <crickett@lanl.gov>
* gfortran.dg/c_funloc_tests_3.f03: New test case.
* gfortran.dg/c_ptr_tests_7.f03: Ditto.
* gfortran.dg/c_ptr_tests_8.f03: Ditto.
* gfortran.dg/c_ptr_tests_9.f03: Ditto.
* gfortran.dg/c_loc_tests_7.f03: Ditto.
* gfortran.dg/c_funloc_tests_3_funcs.c: C functions for new test
case c_funloc_tests_3.
* gfortran.dg/binding_label_tests_14.f03: New test case.
* gfortran.dg/c_ptr_tests_10.f03: Ditto.
* gfortran.dg/c_ptr_tests_8_funcs.c: C functions for new test case
c_ptr_tests_8.
* gfortran.dg/c_ptr_tests_7_driver.c: C Driver for c_ptr_tests_7.
* trans-expr.c (gfc_conv_initializer): Convert expressions that
use C_NULL_PTR or C_NULL_FUNPTR to constant expressions for NULL.
(gfc_conv_expr): Convert typespecs for iso_c_binding derived types
to INTEGER(kind=gfc_index_integer_kind) (size of void *).
* symbol.c (gen_special_c_interop_ptr): Create C_PTR or C_FUNPTR
if not listed by user in only clause and are needed.
(generate_isocbinding_symbol): Create C_PTR or C_FUNPTR if not
listed by user in only clause and are needed.
* decl.c (verify_c_interop_param): Report error for procedures
that are not BIND(C) but need to be a C interoperable parameter.
* trans-const.c (gfc_conv_constant): Convert expressions for
C_NULL_PTR and C_NULL_FUNPTR to constant expressions for NULL.
* trans-types.c (gfc_typenode_for_spec): Convert typespecs for
iso_c_binding derived types.
(gfc_get_derived_type): Set the backend_decl of the iso_c_binding
derived types to ptr_type_nodes (void *), of type
INTEGER(kind=gfc_index_integer_kind), and f90_type of BT_VOID.
Removed code that was used when the tree for the iso_c_binding
derived types represented derived types instead of ptr_type_node.
* resolve.c (is_scalar_expr_ptr): Allow for arrays of size 1.
(gfc_verify_binding_labels): Fixed ICE caused by NULL pointer.
(resolve_fl_procedure): Clear the is_bind_c attribute if the
symbol has an error (prevents duplicate messages).
* trans-decl.c (gfc_create_module_variable): Make sure the
typespecs for iso_c_binding derived types are converted for
ptr_type_node.
(generate_local_decl): Ditto.
* trans-io.c (transfer_expr): Convert expressions for
iso_c_binding derived types.
* iso_c_generated_procs.c (c_f_pointer_i1): Made C pointer
parameter of type (void *). Fixed whitespace and coding style.
(c_f_pointer_i2): Ditto.
(c_f_pointer_i4): Ditto.
(c_f_pointer_i8): Ditto.
(c_f_pointer_i16): Ditto.
(c_f_pointer_r4): Ditto.
(c_f_pointer_r8): Ditto.
(c_f_pointer_r10): Ditto.
(c_f_pointer_r16): Ditto.
* iso_c_binding.c (c_f_pointer): Made C pointer parameter of type
(void *). Fixed whitespace and coding style.
(c_f_pointer_u0): Ditto.
(c_f_pointer_d0): Ditto.
(c_f_procpointer): Ditto.
(c_associated_1): Ditto. Converted return type to void *.
(c_associated_2): Ditto.
(c_loc): Ditto.
(c_funloc): Ditto.
* iso_c_binding.h: Updated prototypes.
Added:
branches/fortran-experiments/gcc/testsuite/gfortran.dg/binding_label_tests_14.f03
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_funloc_tests_3.f03
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_funloc_tests_3_funcs.c
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_loc_tests_7.f03
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_ptr_tests_10.f03
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_ptr_tests_7.f03
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_ptr_tests_7_driver.c
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_ptr_tests_8.f03
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_ptr_tests_8_funcs.c
branches/fortran-experiments/gcc/testsuite/gfortran.dg/c_ptr_tests_9.f03
Modified:
branches/fortran-experiments/gcc/fortran/ChangeLog.isocbinding
branches/fortran-experiments/gcc/fortran/decl.c
branches/fortran-experiments/gcc/fortran/resolve.c
branches/fortran-experiments/gcc/fortran/symbol.c
branches/fortran-experiments/gcc/fortran/trans-const.c
branches/fortran-experiments/gcc/fortran/trans-decl.c
branches/fortran-experiments/gcc/fortran/trans-expr.c
branches/fortran-experiments/gcc/fortran/trans-io.c
branches/fortran-experiments/gcc/fortran/trans-types.c
branches/fortran-experiments/libgfortran/intrinsics/iso_c_binding.c
branches/fortran-experiments/libgfortran/intrinsics/iso_c_binding.h
branches/fortran-experiments/libgfortran/intrinsics/iso_c_generated_procs.c