summaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/c99_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/intrinsics/c99_functions.c')
-rw-r--r--libgfortran/intrinsics/c99_functions.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c
index 0e4589ae30..7bfd16ab0d 100644
--- a/libgfortran/intrinsics/c99_functions.c
+++ b/libgfortran/intrinsics/c99_functions.c
@@ -1,5 +1,5 @@
/* Implementation of various C99 functions
- Copyright (C) 2004-2014 Free Software Foundation, Inc.
+ Copyright (C) 2004-2015 Free Software Foundation, Inc.
This file is part of the GNU Fortran 95 runtime library (libgfortran).
@@ -39,6 +39,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
# endif
#endif
+/* Macros to get real and imaginary parts of a complex, and set
+ a complex value. */
+#define REALPART(z) (__real__(z))
+#define IMAGPART(z) (__imag__(z))
+#define COMPLEX_ASSIGN(z_, r_, i_) {__real__(z_) = (r_); __imag__(z_) = (i_);}
+
+
/* Prototypes are included to silence -Wstrict-prototypes
-Wmissing-prototypes. */