[Bug libfortran/95418] Static assert going off on MinGW

2020-05-31 Thread markus.boeck02 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95418

--- Comment #2 from Markus Böck  ---
I printed the size of the struct and it yielded 36. Interestingly, using clang
instead yields 32 like on Linux

[Bug libfortran/95418] Static assert going off on MinGW

2020-05-30 Thread anlauf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95418

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2020-05-30

--- Comment #1 from anlauf at gcc dot gnu.org ---
(In reply to Markus Böck from comment #0)
> Since commit "i386: Use generic division to generate INEXACT exception"
> (d3a1459cd4f2d4997fb53e34ddef72e91a7855c1) libgfortran is not able to be
> compiled with the target x86_64-w64-mingw32. This is due to a _Static_assert
> going off in fpu-target.h. The exact error message is:
> 
> In file included from ../../../libgfortran/runtime/fpu.c:29:
> ./fpu-target.h:91:1: error: static assertion failed:
> "GFC_FPE_STATE_BUFFER_SIZE is too small"
>91 | _Static_assert (sizeof(struct fenv) <= (size_t)
> GFC_FPE_STATE_BUFFER_SIZE,
>   | ^~
> 
> Reverting the above commit makes compilation succeed.

Can you print sizeof(struct fenv)?

On Linux, this is 32, the same as defined in gcc/fortran/libgfortran.h