summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/continuation_7.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/continuation_7.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/continuation_7.f9022
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/continuation_7.f90 b/gcc/testsuite/gfortran.dg/continuation_7.f90
new file mode 100644
index 000000000..02602e86a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/continuation_7.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-Wall -std=f95" }
+! There should only two warnings be printed.
+! PR fortran/30968
+print *, "Foo bar&
+ &Bar foo"
+print *, "Foo bar&
+ Bar foo" ! { dg-warning "Missing '&' in continued character constant" }
+print *, "Foo bar"&
+ &, "Bar foo"
+print *, "Foo bar"&
+ , "Bar foo"
+
+print '(&
+ a)', 'Hello' ! { dg-warning "Missing '&' in continued character constant" }
+print '(&
+ &a)', 'Hello'
+print '('&
+ &//'a)', 'Hello'
+print '('&
+ // "a)", 'Hello'
+end