iso-fortran-env.def 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /* Copyright (C) 2006-2015 Free Software Foundation, Inc.
  2. This file is part of GCC.
  3. GCC is free software; you can redistribute it and/or modify it under
  4. the terms of the GNU General Public License as published by the Free
  5. Software Foundation; either version 3, or (at your option) any later
  6. version.
  7. GCC is distributed in the hope that it will be useful, but WITHOUT ANY
  8. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  9. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  10. for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with GCC; see the file COPYING3. If not see
  13. <http://www.gnu.org/licenses/>. */
  14. /* This file contains the definition of the named integer constants provided
  15. by the Fortran 2003 ISO_FORTRAN_ENV intrinsic module. */
  16. #ifndef NAMED_INTCST
  17. # define NAMED_INTCST(a,b,c,d)
  18. #endif
  19. #ifndef NAMED_KINDARRAY
  20. # define NAMED_KINDARRAY(a,b,c,d)
  21. #endif
  22. #ifndef NAMED_SUBROUTINE
  23. # define NAMED_SUBROUTINE(a,b,c,d)
  24. #endif
  25. #ifndef NAMED_FUNCTION
  26. # define NAMED_FUNCTION(a,b,c,d)
  27. #endif
  28. /* The arguments to NAMED_INTCST are:
  29. -- an internal name
  30. -- the symbol name in the module, as seen by Fortran code
  31. -- the value it has
  32. -- the standard that supports this type */
  33. NAMED_INTCST (ISOFORTRANENV_FILE_ATOMIC_INT_KIND, "atomic_int_kind", \
  34. gfc_atomic_int_kind, GFC_STD_F2008)
  35. NAMED_INTCST (ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND, "atomic_logical_kind", \
  36. gfc_atomic_logical_kind, GFC_STD_F2008)
  37. NAMED_INTCST (ISOFORTRANENV_CHARACTER_STORAGE_SIZE, "character_storage_size", \
  38. gfc_character_storage_size, GFC_STD_F2003)
  39. NAMED_INTCST (ISOFORTRANENV_ERROR_UNIT, "error_unit", GFC_STDERR_UNIT_NUMBER, \
  40. GFC_STD_F2003)
  41. NAMED_INTCST (ISOFORTRANENV_FILE_STORAGE_SIZE, "file_storage_size", 8, \
  42. GFC_STD_F2003)
  43. NAMED_INTCST (ISOFORTRANENV_INPUT_UNIT, "input_unit", GFC_STDIN_UNIT_NUMBER, \
  44. GFC_STD_F2003)
  45. NAMED_INTCST (ISOFORTRANENV_INT8, "int8", \
  46. gfc_get_int_kind_from_width_isofortranenv (8), GFC_STD_F2008)
  47. NAMED_INTCST (ISOFORTRANENV_INT16, "int16", \
  48. gfc_get_int_kind_from_width_isofortranenv (16), GFC_STD_F2008)
  49. NAMED_INTCST (ISOFORTRANENV_INT32, "int32", \
  50. gfc_get_int_kind_from_width_isofortranenv (32), GFC_STD_F2008)
  51. NAMED_INTCST (ISOFORTRANENV_INT64, "int64", \
  52. gfc_get_int_kind_from_width_isofortranenv (64), GFC_STD_F2008)
  53. NAMED_INTCST (ISOFORTRANENV_IOSTAT_END, "iostat_end", LIBERROR_END, \
  54. GFC_STD_F2003)
  55. NAMED_INTCST (ISOFORTRANENV_IOSTAT_EOR, "iostat_eor", LIBERROR_EOR, \
  56. GFC_STD_F2003)
  57. NAMED_INTCST (ISOFORTRANENV_IOSTAT_INQUIRE_INTERNAL_UNIT, \
  58. "iostat_inquire_internal_unit", LIBERROR_INQUIRE_INTERNAL_UNIT, \
  59. GFC_STD_F2008)
  60. NAMED_INTCST (ISOFORTRANENV_NUMERIC_STORAGE_SIZE, "numeric_storage_size", \
  61. gfc_numeric_storage_size, GFC_STD_F2003)
  62. NAMED_INTCST (ISOFORTRANENV_OUTPUT_UNIT, "output_unit", GFC_STDOUT_UNIT_NUMBER, \
  63. GFC_STD_F2003)
  64. NAMED_INTCST (ISOFORTRANENV_REAL32, "real32", \
  65. gfc_get_real_kind_from_width_isofortranenv (32), GFC_STD_F2008)
  66. NAMED_INTCST (ISOFORTRANENV_REAL64, "real64", \
  67. gfc_get_real_kind_from_width_isofortranenv (64), GFC_STD_F2008)
  68. NAMED_INTCST (ISOFORTRANENV_REAL128, "real128", \
  69. gfc_get_real_kind_from_width_isofortranenv (128), GFC_STD_F2008)
  70. NAMED_INTCST (ISOFORTRANENV_FILE_STAT_LOCKED, "stat_locked", \
  71. GFC_STAT_LOCKED, GFC_STD_F2008)
  72. NAMED_INTCST (ISOFORTRANENV_FILE_STAT_LOCKED_OTHER_IMAGE, \
  73. "stat_locked_other_image", \
  74. GFC_STAT_LOCKED_OTHER_IMAGE, GFC_STD_F2008)
  75. NAMED_INTCST (ISOFORTRANENV_FILE_STAT_STOPPED_IMAGE, "stat_stopped_image", \
  76. GFC_STAT_STOPPED_IMAGE, GFC_STD_F2008)
  77. NAMED_INTCST (ISOFORTRANENV_FILE_STAT_FAILED_IMAGE, "stat_failed_image", \
  78. GFC_STAT_FAILED_IMAGE, GFC_STD_F2008_TS)
  79. NAMED_INTCST (ISOFORTRANENV_FILE_STAT_UNLOCKED, "stat_unlocked", \
  80. GFC_STAT_UNLOCKED, GFC_STD_F2008)
  81. /* The arguments to NAMED_KINDARRAY are:
  82. -- an internal name
  83. -- the symbol name in the module, as seen by Fortran code
  84. -- the gfortran variable containing the information
  85. -- the Fortran standard */
  86. NAMED_KINDARRAY (ISOFORTRAN_CHARACTER_KINDS, "character_kinds", \
  87. gfc_character_kinds, GFC_STD_F2008)
  88. NAMED_KINDARRAY (ISOFORTRAN_INTEGER_KINDS, "integer_kinds", \
  89. gfc_integer_kinds, GFC_STD_F2008)
  90. NAMED_KINDARRAY (ISOFORTRAN_LOGICAL_KINDS, "logical_kinds", \
  91. gfc_logical_kinds, GFC_STD_F2008)
  92. NAMED_KINDARRAY (ISOFORTRAN_REAL_KINDS, "real_kinds", \
  93. gfc_real_kinds, GFC_STD_F2008)
  94. /* The arguments to NAMED_FUNCTIONS are:
  95. -- the ISYM
  96. -- the symbol name in the module, as seen by Fortran code
  97. -- the Fortran standard */
  98. NAMED_FUNCTION (ISOFORTRAN_COMPILER_OPTIONS, "compiler_options", \
  99. GFC_ISYM_COMPILER_OPTIONS, GFC_STD_F2008)
  100. NAMED_FUNCTION (ISOFORTRAN_COMPILER_VERSION, "compiler_version", \
  101. GFC_ISYM_COMPILER_VERSION, GFC_STD_F2008)
  102. #ifndef NAMED_DERIVED_TYPE
  103. # define NAMED_DERIVED_TYPE(a,b,c,d)
  104. #endif
  105. NAMED_DERIVED_TYPE (ISOFORTRAN_LOCK_TYPE, "lock_type", \
  106. get_int_kind_from_node (ptr_type_node), GFC_STD_F2008)
  107. #undef NAMED_INTCST
  108. #undef NAMED_KINDARRAY
  109. #undef NAMED_FUNCTION
  110. #undef NAMED_SUBROUTINE
  111. #undef NAMED_DERIVED_TYPE