diff options
Diffstat (limited to 'gcc/fortran/trans-types.c')
-rw-r--r-- | gcc/fortran/trans-types.c | 45 |
1 files changed, 38 insertions, 7 deletions
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 7bd0011ce8a..68262d6d161 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -81,6 +81,7 @@ int gfc_index_integer_kind; /* The default kinds of the various types. */ int gfc_default_integer_kind; +int gfc_max_integer_kind; int gfc_default_real_kind; int gfc_default_double_kind; int gfc_default_character_kind; @@ -135,6 +136,9 @@ gfc_init_kinds (void) i_index += 1; } + /* Set the maximum integer kind. Used with at least BOZ constants. */ + gfc_max_integer_kind = gfc_integer_kinds[i_index - 1].kind; + for (r_index = 0, mode = MIN_MODE_FLOAT; mode <= MAX_MODE_FLOAT; mode++) { const struct real_format *fmt = REAL_MODE_FORMAT (mode); @@ -183,10 +187,10 @@ gfc_init_kinds (void) /* Choose the default integer kind. We choose 4 unless the user directs us otherwise. */ - if (gfc_option.i8) + if (gfc_option.flag_default_integer) { if (!saw_i8) - fatal_error ("integer kind=8 not available for -i8 option"); + fatal_error ("integer kind=8 not available for -fdefault-integer-8 option"); gfc_default_integer_kind = 8; } else if (saw_i4) @@ -195,10 +199,10 @@ gfc_init_kinds (void) gfc_default_integer_kind = gfc_integer_kinds[i_index - 1].kind; /* Choose the default real kind. Again, we choose 4 when possible. */ - if (gfc_option.r8) + if (gfc_option.flag_default_real) { if (!saw_r8) - fatal_error ("real kind=8 not available for -r8 option"); + fatal_error ("real kind=8 not available for -fdefault-real-8 option"); gfc_default_real_kind = 8; } else if (saw_r4) @@ -206,9 +210,16 @@ gfc_init_kinds (void) else gfc_default_real_kind = gfc_real_kinds[0].kind; - /* Choose the default double kind. If -r8 is specified, we use kind=16, - if it's available, otherwise we do not change anything. */ - if (gfc_option.r8 && saw_r16) + /* Choose the default double kind. If -fdefault-real and -fdefault-double + are specified, we use kind=8, if it's available. If -fdefault-real is + specified without -fdefault-double, we use kind=16, if it's available. + Otherwise we do not change anything. */ + if (gfc_option.flag_default_double && !gfc_option.flag_default_real) + fatal_error ("Use of -fdefault-double-8 requires -fdefault-real-8"); + + if (gfc_option.flag_default_real && gfc_option.flag_default_double && saw_r8) + gfc_default_double_kind = 8; + else if (gfc_option.flag_default_real && saw_r16) gfc_default_double_kind = 16; else if (saw_r4 && saw_r8) gfc_default_double_kind = 8; @@ -1667,4 +1678,24 @@ gfc_signed_type (tree type) return gfc_signed_or_unsigned_type (0, type); } +/* APPLE LOCAL kext */ +int flag_weak = 0; + +/* APPLE LOCAL constant cfstrings */ +struct cpp_reader* parse_in; + +/* APPLE LOCAL begin AltiVec */ +tree +build_stmt (enum tree_code code ATTRIBUTE_UNUSED, ...) +{ + gcc_assert(0); +} + +void +store_init_value (tree decl ATTRIBUTE_UNUSED, tree init ATTRIBUTE_UNUSED) +{ + gcc_assert(0); +} +/* APPLE LOCAL end AltiVec */ + #include "gt-fortran-trans-types.h" |