From 54d7cdbbe0a7f079178eef504537eef3edfe6ed6 Mon Sep 17 00:00:00 2001 From: Jean Perier Date: Mon, 25 Feb 2019 09:32:16 -0800 Subject: [PATCH] [flang] answer comments on host/f18 type mappings Original-commit: flang-compiler/f18@96bce5c4d9348a325a6da30d08c78c56b5a906d3 Tree-same-pre-rewrite: false --- flang/lib/evaluate/host.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/flang/lib/evaluate/host.h b/flang/lib/evaluate/host.h index 7f03068..5bd7e25 100644 --- a/flang/lib/evaluate/host.h +++ b/flang/lib/evaluate/host.h @@ -112,9 +112,16 @@ template<> struct HostTypeHelper> { using Type = std::int64_t; }; -// no int 128bit +template<> struct HostTypeHelper> { +#if (defined(__GNUC__) || defined(__clang__)) && defined(__SIZEOF_INT128__) + using Type = __int128_t; +#else + using Type = UnsupportedType; +#endif +}; -// no float 16bits +// TODO no mapping to host types are defined currently for 16bits float +// It should be defined when gcc/clang have a better support for it. template<> struct HostTypeHelper> { // IEE 754 64bits -- 2.7.4