diff options
Diffstat (limited to 'gcc/fortran/trans-const.c')
-rw-r--r-- | gcc/fortran/trans-const.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c index 432d12b..7ce0263 100644 --- a/gcc/fortran/trans-const.c +++ b/gcc/fortran/trans-const.c @@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see #include "coretypes.h" #include "tree.h" #include "gfortran.h" +#include "options.h" #include "trans.h" #include "fold-const.h" #include "stor-layout.h" @@ -331,8 +332,9 @@ gfc_conv_constant_to_tree (gfc_expr * expr) gfc_build_string_const (expr->representation.length, expr->representation.string)); if (!integer_zerop (tmp) && !integer_onep (tmp)) - gfc_warning (0, "Assigning value other than 0 or 1 to LOGICAL" - " has undefined result at %L", &expr->where); + gfc_warning (flag_dec_char_conversions ? OPT_Wsurprising : 0, + "Assigning value other than 0 or 1 to LOGICAL has " + "undefined result at %L", &expr->where); return fold_convert (gfc_get_logical_type (expr->ts.kind), tmp); } else |