> F2003, 13.7.85, NEW_LINE, Argument:
> A shall be of type character. It may be a scalar or an array.
Additional information:
Class. Inquiry function.
Result Characteristics. Character scalar of length one with the same kind type parameter as A.
I.e. no array should be returned! This is different to the elemental functions achar, iachar etc.

(Side note: NEW_LINE is not an elemental function. It can be used with an array argument, but it's different from being elemental.)
As for the bug itself, there's no reason that the argument to NEW_LINE should be constant: the only requirement is that it's of character kind (all that is used in NEW_LINE is the character kind, which is always known at compile-time). So, the following patch fixes it, and I believe it does the right thing:
Index: simplify.c
===================================================================
--- simplify.c (revision 124415)
+++ simplify.c (working copy)
@@ -2641,13 +2641,8 @@ gfc_simplify_new_line (gfc_expr *e)
{
gfc_expr *result;
- if (e->expr_type != EXPR_CONSTANT)
- return NULL;
-
result = gfc_constant_result (BT_CHARACTER, e->ts.kind, &e->where);
-
result->value.character.string = gfc_getmem (2);
-
result->value.character.length = 1;
result->value.character.string[0] = '\n';
result->value.character.string[1] = '\0'; /* For debugger */
This patch is donated to whomever has time to confirm that it does what it should, that it conforms to the standard and that it regtests. (I'll take care of it next week if noone has time before then.) The following testcase now passes:
$ cat a.f90
character(len=10) :: a1
character(len=10) :: a2(2)
character(len=10), parameter :: a3 = "1234567890"
character(len=10), parameter :: a4(2) = "1234567890"
character(len=10), parameter :: a5(2) = repeat("1234567890",2)
print *, ichar(new_line(a1))
print *, ichar(new_line(a2))
print *, ichar(new_line(a3))
print *, ichar(new_line(a4))
print *, ichar(new_line(a5))
end
$ gfortran a.f90 && ./a.out
10
10
10
10
10