diff options
Diffstat (limited to 'libgfortran/config/fpu-aix.h')
| -rw-r--r-- | libgfortran/config/fpu-aix.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libgfortran/config/fpu-aix.h b/libgfortran/config/fpu-aix.h index c1079fc..c297045 100644 --- a/libgfortran/config/fpu-aix.h +++ b/libgfortran/config/fpu-aix.h @@ -38,6 +38,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #endif +/* Check we can actually store the FPU state in the allocated size. */ +_Static_assert (sizeof(fenv_t) <= (size_t) GFC_FPE_STATE_BUFFER_SIZE, + "GFC_FPE_STATE_BUFFER_SIZE is too small"); + + void set_fpu_trap_exceptions (int trap, int notrap) { @@ -403,18 +408,12 @@ support_fpu_rounding_mode (int mode) void get_fpu_state (void *state) { - /* Check we can actually store the FPU state in the allocated size. */ - assert (sizeof(fenv_t) <= GFC_FPE_STATE_BUFFER_SIZE); - fegetenv (state); } void set_fpu_state (void *state) { - /* Check we can actually store the FPU state in the allocated size. */ - assert (sizeof(fenv_t) <= GFC_FPE_STATE_BUFFER_SIZE); - fesetenv (state); } |
