aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/ieee
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2023-07-21 02:26:09 +0000
committerAndrew Pinski <apinski@marvell.com>2023-07-21 05:30:28 +0000
commitf32518726ee8e836d12d49aec8432679fcc42503 (patch)
treeccc80ee9dcc044c76fa88504c4d2a15b729808e5 /libgfortran/ieee
parenta6654c08fde11890d621fa7831180d410054568a (diff)
downloadgcc-f32518726ee8e836d12d49aec8432679fcc42503.zip
gcc-f32518726ee8e836d12d49aec8432679fcc42503.tar.gz
gcc-f32518726ee8e836d12d49aec8432679fcc42503.tar.bz2
libfortran: Fix build for targets that don't have 10byte or 16 byte floating point
So the problem here is EXPAND_INTER_MACRO_16 expands to nothing if 16 byte FP does not exist but we still add a comma after it and that causes a build failure. The same is true for EXPAND_INTER_MACRO_10 too. Committed as obvious after a bootstrap and test on x86_64-linux-gnu and aarch64-linux-gnu. libgfortran/ChangeLog: PR libfortran/110759 * ieee/ieee_arithmetic.F90 (COMP_INTERFACE): Remove the comma after EXPAND_INTER_MACRO_16 and EXPAND_INTER_MACRO_10. (EXPAND_INTER_MACRO_16): Add comma here if 16 byte fp exist. (EXPAND_INTER_MACRO_10): Likewise.
Diffstat (limited to 'libgfortran/ieee')
-rw-r--r--libgfortran/ieee/ieee_arithmetic.F908
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/ieee/ieee_arithmetic.F90 b/libgfortran/ieee/ieee_arithmetic.F90
index aa897ab..debe404 100644
--- a/libgfortran/ieee/ieee_arithmetic.F90
+++ b/libgfortran/ieee/ieee_arithmetic.F90
@@ -535,13 +535,13 @@ UNORDERED_MACRO(4,4)
end interface
#ifdef HAVE_GFC_REAL_16
-# define EXPAND_INTER_MACRO_16(TYPE,OP) _gfortran_ieee_/**/TYPE/**/_/**/OP/**/_16
+# define EXPAND_INTER_MACRO_16(TYPE,OP) _gfortran_ieee_/**/TYPE/**/_/**/OP/**/_16 ,
#else
# define EXPAND_INTER_MACRO_16(TYPE,OP)
#endif
#ifdef HAVE_GFC_REAL_10
-# define EXPAND_INTER_MACRO_10(TYPE,OP) _gfortran_ieee_/**/TYPE/**/_/**/OP/**/_10
+# define EXPAND_INTER_MACRO_10(TYPE,OP) _gfortran_ieee_/**/TYPE/**/_/**/OP/**/_10 ,
#else
# define EXPAND_INTER_MACRO_10(TYPE,OP)
#endif
@@ -549,8 +549,8 @@ UNORDERED_MACRO(4,4)
#define COMP_INTERFACE(TYPE,OP) \
interface IEEE_/**/TYPE/**/_/**/OP ; \
procedure \
- EXPAND_INTER_MACRO_16(TYPE,OP) , \
- EXPAND_INTER_MACRO_10(TYPE,OP) , \
+ EXPAND_INTER_MACRO_16(TYPE,OP) \
+ EXPAND_INTER_MACRO_10(TYPE,OP) \
_gfortran_ieee_/**/TYPE/**/_/**/OP/**/_8 , \
_gfortran_ieee_/**/TYPE/**/_/**/OP/**/_4 ; \
end interface ; \