/* Header file to the Fortran front-end and runtime library
- Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
- Free Software Foundation, Inc.
+ Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of GCC.
Note that no features were obsoleted nor deleted in F2003.
Please remember to keep those definitions in sync with
gfortran.texi. */
+/* For now, use F2015 = GFC_STD_GNU. */
+#define GFC_STD_F2015 (1<<5) /* PLACEHOLDER for Fortran 2015. */
#define GFC_STD_F2008_TS (1<<9) /* POST-F2008 technical reports. */
#define GFC_STD_F2008_OBS (1<<8) /* Obsolescent in F2008. */
#define GFC_STD_F2008 (1<<7) /* New in F2008. */
obsolescent in later standards. */
-/* Bitmasks for the various FPE that can be enabled. */
-#define GFC_FPE_INVALID (1<<0)
-#define GFC_FPE_DENORMAL (1<<1)
-#define GFC_FPE_ZERO (1<<2)
-#define GFC_FPE_OVERFLOW (1<<3)
-#define GFC_FPE_UNDERFLOW (1<<4)
-#define GFC_FPE_INEXACT (1<<5)
+/* Bitmasks for the various FPE that can be enabled. These need to be straight integers
+ e.g., 8 instead of (1<<3), because they will be included in Fortran source. */
+#define GFC_FPE_INVALID 1
+#define GFC_FPE_DENORMAL 2
+#define GFC_FPE_ZERO 4
+#define GFC_FPE_OVERFLOW 8
+#define GFC_FPE_UNDERFLOW 16
+#define GFC_FPE_INEXACT 32
+/* Defines for floating-point rounding modes. */
+#define GFC_FPE_DOWNWARD 1
+#define GFC_FPE_TONEAREST 2
+#define GFC_FPE_TOWARDZERO 3
+#define GFC_FPE_UPWARD 4
+
+/* Size of the buffer required to store FPU state for any target.
+ In particular, this has to be larger than fenv_t on all glibc targets.
+ Currently, the winner is x86_64 with 32 bytes. */
+#define GFC_FPE_STATE_BUFFER_SIZE 32
/* Bitmasks for the various runtime checks that can be enabled. */
#define GFC_RTCHECK_BOUNDS (1<<0)
| GFC_RTCHECK_RECURSION | GFC_RTCHECK_DO \
| GFC_RTCHECK_POINTER | GFC_RTCHECK_MEM)
+/* Special unit numbers used to convey certain conditions. Numbers -3
+ thru -9 available. NEWUNIT values start at -10. */
+#define GFC_INTERNAL_UNIT -1
+#define GFC_INVALID_UNIT -2
/* Possible values for the CONVERT I/O specifier. */
+/* Keep in sync with GFC_FLAG_CONVERT_* in gcc/flags.h. */
typedef enum
{
GFC_CONVERT_NONE = -1,
GFC_STAT_UNLOCKED = 0,
GFC_STAT_LOCKED,
GFC_STAT_LOCKED_OTHER_IMAGE,
- GFC_STAT_STOPPED_IMAGE = 6000 /* See LIBERROR_INQUIRE_INTERNAL_UNIT above. */
+ GFC_STAT_STOPPED_IMAGE = 6000, /* See LIBERROR_INQUIRE_INTERNAL_UNIT above. */
+ GFC_STAT_FAILED_IMAGE
}
libgfortran_stat_codes;
+typedef enum
+{
+ GFC_CAF_ATOMIC_ADD = 1,
+ GFC_CAF_ATOMIC_AND,
+ GFC_CAF_ATOMIC_OR,
+ GFC_CAF_ATOMIC_XOR
+} libcaf_atomic_codes;
+
+
+/* For CO_REDUCE. */
+#define GFC_CAF_BYREF (1<<0)
+#define GFC_CAF_HIDDENLEN (1<<1)
+#define GFC_CAF_ARG_VALUE (1<<2)
+#define GFC_CAF_ARG_DESC (1<<3)
+
+
/* Default unit number for preconnected standard input and output. */
#define GFC_STDIN_UNIT_NUMBER 5
#define GFC_STDOUT_UNIT_NUMBER 6
used in the run-time library for IO. */
typedef enum
{ BT_UNKNOWN = 0, BT_INTEGER, BT_LOGICAL, BT_REAL, BT_COMPLEX,
- BT_DERIVED, BT_CHARACTER, BT_CLASS, BT_PROCEDURE, BT_HOLLERITH, BT_VOID
+ BT_DERIVED, BT_CHARACTER, BT_CLASS, BT_PROCEDURE, BT_HOLLERITH, BT_VOID,
+ BT_ASSUMED
}
bt;