From 4c35d09956290adf5eb10a7f65351c192d869352 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Thu, 10 May 2018 18:33:22 +0000 Subject: [PATCH] re PR fortran/85735 (f951 crashes on empty input) PR fortran/85735 * options.c (gfc_post_options): Set main_input_filename. From-SVN: r260120 --- gcc/fortran/ChangeLog | 5 +++++ gcc/fortran/options.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 474cd7036b5..c41804ea4c7 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2018-05-10 Marek Polacek + + PR fortran/85735 + * options.c (gfc_post_options): Set main_input_filename. + 2018-05-10 Thomas Koenig PR fortran/54613 diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 1405f1cf008..3c17a583f62 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -313,6 +313,7 @@ gfc_post_options (const char **pfilename) if (gfc_current_form == FORM_UNKNOWN) { gfc_current_form = FORM_FREE; + main_input_filename = filename; gfc_warning_now (0, "Reading file %qs as free form", (filename[0] == '\0') ? "" : filename); } -- 2.30.2