aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index f4a4b589..d0c99e3 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -1789,11 +1789,12 @@ gfc_check_assign (gfc_expr * lvalue, gfc_expr * rvalue, int conform)
return FAILURE;
}
- /* This is a guaranteed segfault and possibly a typo: p = NULL()
- instead of p => NULL() */
- if (rvalue->expr_type == EXPR_NULL)
- gfc_warning ("NULL appears on right-hand side in assignment at %L",
- &rvalue->where);
+ if (rvalue->expr_type == EXPR_NULL)
+ {
+ gfc_error ("NULL appears on right-hand side in assignment at %L",
+ &rvalue->where);
+ return FAILURE;
+ }
/* This is possibly a typo: x = f() instead of x => f() */
if (gfc_option.warn_surprising