aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2009-03-27 22:55:13 +0100
committerTobias Burnus <burnus@gcc.gnu.org>2009-03-27 22:55:13 +0100
commit346a77d1d814bc194c825ee48e75604646070bf6 (patch)
treebeaf8e8d8e61c21748269df6c2b92982034929d0 /gcc/fortran/resolve.c
parent68599f330b29e9f1b0fd5bb1578741a5e663688d (diff)
downloadgcc-346a77d1d814bc194c825ee48e75604646070bf6.zip
gcc-346a77d1d814bc194c825ee48e75604646070bf6.tar.gz
gcc-346a77d1d814bc194c825ee48e75604646070bf6.tar.bz2
gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
2009-03-27 Tobias Burnus <burnus@net-b.de> * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN. (gfc_expr): Add is_snan. * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN. (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree. * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype. * resolve.c (build_default_init_expr): Update call. * target-memory.c (encode_float): Ditto. * trans-intrinsic.c * (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod, From-SVN: r145129
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 433f380..e887fb13 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -7357,6 +7357,9 @@ build_default_init_expr (gfc_symbol *sym)
mpfr_init (init_expr->value.real);
switch (gfc_option.flag_init_real)
{
+ case GFC_INIT_REAL_SNAN:
+ init_expr->is_snan = 1;
+ /* Fall through. */
case GFC_INIT_REAL_NAN:
mpfr_set_nan (init_expr->value.real);
break;
@@ -7385,6 +7388,9 @@ build_default_init_expr (gfc_symbol *sym)
mpfr_init (init_expr->value.complex.i);
switch (gfc_option.flag_init_real)
{
+ case GFC_INIT_REAL_SNAN:
+ init_expr->is_snan = 1;
+ /* Fall through. */
case GFC_INIT_REAL_NAN:
mpfr_set_nan (init_expr->value.complex.r);
mpfr_set_nan (init_expr->value.complex.i);