summaryrefslogtreecommitdiff
path: root/libgfortran/intrinsics/cpu_time.c
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-09 12:56:35 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2010-06-09 12:56:35 +0000
commite099d7cd912ec9f9aea2f3c6539fa236a6a1d829 (patch)
treef236884d1821a2340e632d7e6e3a973a81059b85 /libgfortran/intrinsics/cpu_time.c
parentf01c037fefba94e6bb747a220a747cc24d6ae43c (diff)
downloadgcc-e099d7cd912ec9f9aea2f3c6539fa236a6a1d829.tar.gz
* mk-kinds-h.sh: Define GFC_REAL_*_LITERAL_SUFFIX and
GFC_REAL_*_LITERAL macros for each kind. * intrinsics/cpu_time.c (cpu_time_4, cpu_time_8, cpu_time_10, cpu_time_16): Use them. * intrinsics/random.c (rnumber_4, rnumber_8, rnumber_10, rnumber_16): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/intrinsics/cpu_time.c')
-rw-r--r--libgfortran/intrinsics/cpu_time.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/intrinsics/cpu_time.c b/libgfortran/intrinsics/cpu_time.c
index 0ac502340ac..3580bba0928 100644
--- a/libgfortran/intrinsics/cpu_time.c
+++ b/libgfortran/intrinsics/cpu_time.c
@@ -78,7 +78,7 @@ void cpu_time_4 (GFC_REAL_4 *time)
{
long sec, usec;
__cpu_time_1 (&sec, &usec);
- *time = sec + usec * (GFC_REAL_4)1.e-6;
+ *time = sec + usec * GFC_REAL_4_LITERAL(1.e-6);
}
iexport(cpu_time_4);
@@ -89,7 +89,7 @@ void cpu_time_8 (GFC_REAL_8 *time)
{
long sec, usec;
__cpu_time_1 (&sec, &usec);
- *time = sec + usec * (GFC_REAL_8)1.e-6;
+ *time = sec + usec * GFC_REAL_8_LITERAL(1.e-6);
}
#ifdef HAVE_GFC_REAL_10
@@ -100,7 +100,7 @@ void cpu_time_10 (GFC_REAL_10 *time)
{
long sec, usec;
__cpu_time_1 (&sec, &usec);
- *time = sec + usec * (GFC_REAL_10)1.e-6;
+ *time = sec + usec * GFC_REAL_10_LITERAL(1.e-6);
}
#endif
@@ -112,7 +112,7 @@ void cpu_time_16 (GFC_REAL_16 *time)
{
long sec, usec;
__cpu_time_1 (&sec, &usec);
- *time = sec + usec * (GFC_REAL_16)1.e-6;
+ *time = sec + usec * GFC_REAL_16_LITERAL(1.e-6);
}
#endif