diff options
author | Asher Langton <langton2@llnl.gov> | 2007-09-21 02:34:14 +0000 |
---|---|---|
committer | Asher Langton <langton@gcc.gnu.org> | 2007-09-21 02:34:14 +0000 |
commit | 51b09ce3d9f6c39d2fd89f5351b064ca1f356a1b (patch) | |
tree | 6f87e3fe355a7263be01fcc31cadd9d2cbcca2ac /gcc/fortran/gfortran.h | |
parent | 819fec00238bbbc881d99c945c55d648d62702c2 (diff) | |
download | gcc-51b09ce3d9f6c39d2fd89f5351b064ca1f356a1b.zip gcc-51b09ce3d9f6c39d2fd89f5351b064ca1f356a1b.tar.gz gcc-51b09ce3d9f6c39d2fd89f5351b064ca1f356a1b.tar.bz2 |
re PR fortran/20441 (-finit-local-zero is missing from gfortran)
PR fortran/20441
* gfortran.h : Add init_local_* enums and init_flag_* flags to
gfc_option_t.
* lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
-finit-character, and -finit-logical flags.
* invoke.texi: Document new options.
* resolve.c (build_init_assign): New function.
(apply_init_assign): Move part of function into build_init_assign.
(build_default_init_expr): Build local initializer (-finit-*).
(apply_default_init_local): Apply local initializer (-finit-*).
(resolve_fl_variable): Try to add local initializer (-finit-*).
* options.c (gfc_init_options, gfc_handle_option,
gfc_post_options): Handle -finit-local-zero, -finit-real,
-finit-integer, -finit-character, and -finit-logical flags.
PR fortran/20441
* gfortran.dg/init_flag_1.f90: New.
* gfortran.dg/init_flag_2.f90: New.
* gfortran.dg/init_flag_3.f90: New.
* gfortran.dg/init_flag_4.f90: New.
* gfortran.dg/init_flag_5.f90: New.
* gfortran.dg/init_flag_6.f90: New.
* gfortran.dg/init_flag_7.f90: New.
From-SVN: r128643
Diffstat (limited to 'gcc/fortran/gfortran.h')
-rw-r--r-- | gcc/fortran/gfortran.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 32b1561..42002ce 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -510,6 +510,38 @@ enum gfc_isym_id typedef enum gfc_isym_id gfc_isym_id; +typedef enum +{ + GFC_INIT_REAL_OFF = 0, + GFC_INIT_REAL_ZERO, + GFC_INIT_REAL_NAN, + GFC_INIT_REAL_INF, + GFC_INIT_REAL_NEG_INF +} +init_local_real; + +typedef enum +{ + GFC_INIT_LOGICAL_OFF = 0, + GFC_INIT_LOGICAL_FALSE, + GFC_INIT_LOGICAL_TRUE +} +init_local_logical; + +typedef enum +{ + GFC_INIT_CHARACTER_OFF = 0, + GFC_INIT_CHARACTER_ON +} +init_local_character; + +typedef enum +{ + GFC_INIT_INTEGER_OFF = 0, + GFC_INIT_INTEGER_ON +} +init_local_integer; + /************************* Structures *****************************/ /* Used for keeping things in balanced binary trees. */ @@ -1823,6 +1855,13 @@ typedef struct int flag_sign_zero; int flag_module_private; int flag_recursive; + int flag_init_local_zero; + int flag_init_integer; + int flag_init_integer_value; + int flag_init_real; + int flag_init_logical; + int flag_init_character; + char flag_init_character_value; int fpe; |