summaryrefslogtreecommitdiff
path: root/gcc/fortran/iso-c-binding.def
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-26 22:30:48 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-26 22:30:48 +0000
commit75471ad0cee99daf763e3ea344196beece873be3 (patch)
treef28e0b9963e89079003a4eeca7f1c08e9b8a5a35 /gcc/fortran/iso-c-binding.def
parent62aa667d6ec96cbf1b0f72c8774c5c8f227bbdee (diff)
downloadgcc-75471ad0cee99daf763e3ea344196beece873be3.tar.gz
2010-09-27 Tobias Burnus <burnus@net-b.de>
PR fortran/40569 PR fortran/40568 * intrinsic.h (gfc_simplify_compiler_options, gfc_simplify_compiler_version): New prototypes. * intrinsic.c (gfc_intrinsic_function_by_id, make_from_module): New functions. (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic, gfc_specific_intrinsic): Don't return module intrinsics. (add_functions): Add compiler_options, compiler_version. (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID. * symbol.c (std_for_isocbinding_symbol): Add version check for NAMED_FUNCTIONS. * iso-fortran-env.def: Add compiler_options, compiler_version. * iso-c-binding.def: Add c_sizeof. * gfortran.h (gfc_intrinsic_sym): Add from_module:1. (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS. (gfc_intrinsic_function_by_id): New prototype. * module.c (create_intrinsic_function): New function. (import_iso_c_binding_module, use_iso_fortran_env_module): Use it. * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS. * resolve.c (resolve_intrinsic): Try also to resolve intrinsics by ISYM ID. * simplify.c (gfc_simplify_compiler_options, gfc_simplify_compiler_version): New functions. 2010-09-27 Tobias Burnus <burnus@net-b.de> PR fortran/40569 PR fortran/40568 * gfortran.dg/storage_size_2.f08: Fix test. * gfortran.dg/c_sizeof_1.f90: Fix test. * gfortran.dg/c_sizeof_2.f90: Update dg-error. * gfortran.dg/c_sizeof_3.f90: New. * gfortran.dg/c_sizeof_4.f90: New. * gfortran.dg/iso_c_binding_compiler_1.f90: New. * gfortran.dg/iso_c_binding_compiler_2.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164639 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/iso-c-binding.def')
-rw-r--r--gcc/fortran/iso-c-binding.def14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/fortran/iso-c-binding.def b/gcc/fortran/iso-c-binding.def
index a529368765c..4cb7c2333d9 100644
--- a/gcc/fortran/iso-c-binding.def
+++ b/gcc/fortran/iso-c-binding.def
@@ -39,6 +39,10 @@ along with GCC; see the file COPYING3. If not see
# define NAMED_CHARKNDCST(a,b,c)
#endif
+#ifndef NAMED_FUNCTION
+# define NAMED_FUNCTION(a,b,c,d)
+#endif
+
/* The arguments to NAMED_*CST are:
-- an internal name
-- the symbol name in the module, as seen by Fortran code
@@ -162,6 +166,15 @@ PROCEDURE (ISOCBINDING_LOC, "c_loc")
PROCEDURE (ISOCBINDING_FUNLOC, "c_funloc")
PROCEDURE (ISOCBINDING_F_PROCPOINTER, "c_f_procpointer")
+/* The arguments to NAMED_FUNCTIONS are:
+ -- the ISYM
+ -- the symbol name in the module, as seen by Fortran code
+ -- the Fortran standard */
+
+NAMED_FUNCTION (ISOCBINDING_C_SIZEOF, "c_sizeof", \
+ GFC_ISYM_C_SIZEOF, GFC_STD_F2008)
+
+
#undef NAMED_INTCST
#undef NAMED_REALCST
#undef NAMED_CMPXCST
@@ -170,3 +183,4 @@ PROCEDURE (ISOCBINDING_F_PROCPOINTER, "c_f_procpointer")
#undef NAMED_CHARKNDCST
#undef DERIVED_TYPE
#undef PROCEDURE
+#undef NAMED_FUNCTION