From 7dea5a9568b6bdc363f4942c8b791fab8ac4facc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Schl=C3=BCter?= Date: Sun, 11 Jul 2004 18:52:50 +0200 Subject: [PATCH] re PR fortran/16433 (wrong hexadecimal constant warning) PR fortran/16433 * gfortran.dg/pr16433.f: New test. From-SVN: r84519 --- gcc/fortran/expr.c | 7 ++++++- gcc/fortran/lang.opt | 4 ++++ gcc/fortran/options.c | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index ad9f42a3f7c..f332b3415d5 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -1736,7 +1736,8 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform) if (rvalue->rank != 0 && lvalue->rank != rvalue->rank) { - gfc_error ("Incompatible ranks in assignment at %L", &lvalue->where); + gfc_error ("Incompatible ranks %d and %d in assignment at %L", + lvalue->rank, rvalue->rank, &lvalue->where); return FAILURE; } @@ -1747,6 +1748,10 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform) return FAILURE; } + if (rvalue->expr_type == EXPR_NULL) + gfc_warning ("NULL appears on right-hand side in assignment at %L", + &rvalue->where); + /* Check size of array assignments. */ if (lvalue->rank != 0 && rvalue->rank != 0 && gfc_check_conformance ("Array assignment", lvalue, rvalue) != SUCCESS) diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt index ff670d66f2b..598936547f1 100644 --- a/gcc/fortran/lang.opt +++ b/gcc/fortran/lang.opt @@ -97,6 +97,10 @@ fimplicit-none F95 Specify that no implicit typing is allowed, unless overridden by explicit IMPLICIT statements +ffixed-line-length-72 +F95 RejectNegative +Use 72 character line width in fixed mode + ffixed-line-length-80 F95 RejectNegative Use 80 character line width in fixed mode diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index b0f9a76e5f2..a23773ef839 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -260,6 +260,10 @@ gfc_handle_option (size_t scode, const char *arg, int value) gfc_option.flag_repack_arrays = value; break; + case OPT_ffixed_line_length_72: + gfc_option.fixed_line_length = 72; + break; + case OPT_ffixed_line_length_80: gfc_option.fixed_line_length = 80; break; -- 2.30.2