Commit 7dea5a95 by Tobias Schlüter

re PR fortran/16433 (wrong hexadecimal constant warning)

PR fortran/16433
* gfortran.dg/pr16433.f: New test.

From-SVN: r84519
parent eeb32988
...@@ -1736,7 +1736,8 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform) ...@@ -1736,7 +1736,8 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform)
if (rvalue->rank != 0 && lvalue->rank != rvalue->rank) 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; return FAILURE;
} }
...@@ -1747,6 +1748,10 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform) ...@@ -1747,6 +1748,10 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform)
return FAILURE; 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. */ /* Check size of array assignments. */
if (lvalue->rank != 0 && rvalue->rank != 0 if (lvalue->rank != 0 && rvalue->rank != 0
&& gfc_check_conformance ("Array assignment", lvalue, rvalue) != SUCCESS) && gfc_check_conformance ("Array assignment", lvalue, rvalue) != SUCCESS)
......
...@@ -97,6 +97,10 @@ fimplicit-none ...@@ -97,6 +97,10 @@ fimplicit-none
F95 F95
Specify that no implicit typing is allowed, unless overridden by explicit IMPLICIT statements 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 ffixed-line-length-80
F95 RejectNegative F95 RejectNegative
Use 80 character line width in fixed mode Use 80 character line width in fixed mode
......
...@@ -260,6 +260,10 @@ gfc_handle_option (size_t scode, const char *arg, int value) ...@@ -260,6 +260,10 @@ gfc_handle_option (size_t scode, const char *arg, int value)
gfc_option.flag_repack_arrays = value; gfc_option.flag_repack_arrays = value;
break; break;
case OPT_ffixed_line_length_72:
gfc_option.fixed_line_length = 72;
break;
case OPT_ffixed_line_length_80: case OPT_ffixed_line_length_80:
gfc_option.fixed_line_length = 80; gfc_option.fixed_line_length = 80;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment