summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-12 10:24:29 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-12 10:24:29 +0000
commitfe8a5771fd01d830a4c7dc9aeac2069709fbbdef (patch)
tree64e6147ed11736145fc51d92097a25b23f6523f6 /libgfortran
parente8a588af71e790aeb443acfc81edaf650729455a (diff)
downloadgcc-fe8a5771fd01d830a4c7dc9aeac2069709fbbdef.tar.gz
PR libfortran/35524
* intrinsics/erfc_scaled_inc.c: Only define the long double variant of erfc_scaled if expl is available. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133138 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/intrinsics/erfc_scaled_inc.c18
2 files changed, 22 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 2ada2632c36..422475bd16e 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR libfortran/35524
+ * intrinsics/erfc_scaled_inc.c: Only define the long double
+ variant of erfc_scaled if expl is available.
+
2008-03-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR libfortran/32812
diff --git a/libgfortran/intrinsics/erfc_scaled_inc.c b/libgfortran/intrinsics/erfc_scaled_inc.c
index fab815584ca..cabdb34847b 100644
--- a/libgfortran/intrinsics/erfc_scaled_inc.c
+++ b/libgfortran/intrinsics/erfc_scaled_inc.c
@@ -35,16 +35,28 @@ Boston, MA 02110-1301, USA. */
#define KIND_SUFFIX(x,y) CONCAT(x,y)
#if (KIND == 4)
+
# define EXP(x) expf(x)
# define TRUNC(x) truncf(x)
+
#elif (KIND == 8)
+
# define EXP(x) exp(x)
# define TRUNC(x) trunc(x)
+
#else
-# define EXP(x) expl(x)
-# define TRUNC(x) truncl(x)
+
+# ifdef HAVE_EXPL
+# define EXP(x) expl(x)
+# endif
+# ifdef HAVE_TRUNCL
+# define TRUNC(x) truncl(x)
+# endif
+
#endif
+#if defined(EXP) && defined(TRUNC)
+
extern TYPE KIND_SUFFIX(erfc_scaled_r,KIND) (TYPE);
export_proto(KIND_SUFFIX(erfc_scaled_r,KIND));
@@ -167,6 +179,8 @@ finish:
return res;
}
+#endif
+
#undef EXP
#undef TRUNC