On Mon, Aug 12, 2019 at 8:21 PM Xiangdong JI <xiangdong...@arm.com> wrote:
>
> The .go files generated during building gccgo seem to have a few constants 
> with weird values, for example:
>
> // sysinfo.go (on x86-64, latest gcc-9 trunk)
>
> const ___FLT128_MAX__ = 1.1
> const ___FLT32X_DENORM_MIN__ = 1.1
>
> as a comparison, gollvm generates expected values.
> Could it be caused by incorrect building setting?

Per later discussion, this problem is fixed by this patch.
Bootstrapped and ran full testsuite on x86_64-pc-linux-gnu.

OK for mainline?

Ian


2019-08-20  Ian Lance Taylor  <i...@golang.org>

* c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
when using -fgo-dump-spec.
Index: c-family/c-cppbuiltin.c
===================================================================
--- c-family/c-cppbuiltin.c     (revision 274749)
+++ c-family/c-cppbuiltin.c     (working copy)
@@ -1643,6 +1643,7 @@ builtin_define_with_hex_fp_value (const
   /* This is very expensive, so if possible expand them lazily.  */
   if (lazy_hex_fp_value_count < LAZY_HEX_FP_VALUES_CNT
       && flag_dump_macros == 0
+      && flag_dump_go_spec == NULL
       && !cpp_get_options (parse_in)->traditional)
     {
       if (lazy_hex_fp_value_count == 0)

Reply via email to