aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Schlüter <tobi@gcc.gnu.org>2004-07-11 18:52:50 +0200
committerTobias Schlüter <tobi@gcc.gnu.org>2004-07-11 18:52:50 +0200
commit7dea5a9568b6bdc363f4942c8b791fab8ac4facc (patch)
tree555df8fe042240839a7ad60d36ceb39bf7a3e7ec
parenteeb32988362bb6942c88f173c2062aa23ec7684e (diff)
downloadgcc-7dea5a9568b6bdc363f4942c8b791fab8ac4facc.zip
gcc-7dea5a9568b6bdc363f4942c8b791fab8ac4facc.tar.gz
gcc-7dea5a9568b6bdc363f4942c8b791fab8ac4facc.tar.bz2
re PR fortran/16433 (wrong hexadecimal constant warning)
PR fortran/16433 * gfortran.dg/pr16433.f: New test. From-SVN: r84519
-rw-r--r--gcc/fortran/expr.c7
-rw-r--r--gcc/fortran/lang.opt4
-rw-r--r--gcc/fortran/options.c4
3 files changed, 14 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index ad9f42a..f332b34 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 ff670d6..5989365 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 b0f9a76..a23773e 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;