2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/65903
* io.c (format_lex): Change to NONSTRING when checking for
possible doubled quote.
* scanner.c (gfc_next_char_literal): Revert change from 64506
and add a check for quotes and return.
From-SVN: r223248
+2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/65903
+ * io.c (format_lex): Change to NONSTRING when checking for
+ possible doubled quote.
+ * scanner.c (gfc_next_char_literal): Revert change from 64506
+ and add a check for quotes and return.
+
2015-05-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66113
if (c == delim)
{
- c = next_char (INSTRING_NOWARN);
+ c = next_char (NONSTRING);
if (c == '\0')
{
are still in a string and we are looking for a possible
doubled quote and we end up here. See PR64506. */
- if (in_string)
+ if (in_string && c != '\n')
{
gfc_current_locus = old_loc;
-
- if (c == '!')
- {
- skip_comment_line ();
- goto restart;
- }
-
- if (c != '\n')
- {
- c = '&';
- goto done;
- }
+ c = '&';
+ goto done;
}
if (c != '!' && c != '\n')
"Missing %<&%> in continued character "
"constant at %C");
}
+ else if (!in_string && (c == '\'' || c == '"'))
+ goto done;
/* Both !$omp and !$ -fopenmp continuation lines have & on the
continuation line only optionally. */
else if (openmp_flag || openacc_flag || openmp_cond_flag)