+2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/83705
+ * simplify.c (gfc_simplify_repeat): Increase limit for deferring
+ to runtime, print a warning message.
+
2018-01-31 Jakub Jelinek <jakub@redhat.com>
PR fortran/84116
len = e->value.character.length;
gfc_charlen_t nlen = ncop * len;
- /* Here's a semi-arbitrary limit. If the string is longer than 32 MB
- (8 * 2**20 elements * 4 bytes (wide chars) per element) defer to
+ /* Here's a semi-arbitrary limit. If the string is longer than 1 GB
+ (2**28 elements * 4 bytes (wide chars) per element) defer to
runtime instead of consuming (unbounded) memory and CPU at
compile time. */
- if (nlen > 8388608)
- return NULL;
+ if (nlen > 268435456)
+ {
+ gfc_warning_now (0, "Evaluation of string longer than 2**28 at %L"
+ " deferred to runtime, expect bugs", &e->where);
+ return NULL;
+ }
result = gfc_get_character_expr (e->ts.kind, &e->where, NULL, nlen);
for (size_t i = 0; i < (size_t) ncop; i++)
+2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/83705
+ * gfortran.dg/repeat_7.f90: Catch warning message.
+
2018-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/target-supports.exp (check_effective_target_comdat_group):
! compile time.
program p
character, parameter :: z = 'z'
- print *, repeat(z, huge(1_4))
+ print *, repeat(z, huge(1_4)) ! { dg-warning "Evaluation of string" }
end program p