+2006-09-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/29097
+ * scanner.c (include_line): Handle conditional include.
+
2006-09-25 Tobias Schluter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/21203
include_line (char *line)
{
char quote, *c, *begin, *stop;
-
+
c = line;
+
+ if (gfc_option.flag_openmp)
+ {
+ if (gfc_current_form == FORM_FREE)
+ {
+ while (*c == ' ' || *c == '\t')
+ c++;
+ if (*c == '!' && c[1] == '$' && (c[2] == ' ' || c[2] == '\t'))
+ c += 3;
+ }
+ else
+ {
+ if ((*c == '!' || *c == 'c' || *c == 'C' || *c == '*')
+ && c[1] == '$' && (c[2] == ' ' || c[2] == '\t'))
+ c += 3;
+ }
+ }
+
while (*c == ' ' || *c == '\t')
c++;
+2006-09-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/29097
+ * testsuite/libgomp.fortran/condinc1.f: New test.
+ * testsuite/libgomp.fortran/condinc2.f: New test.
+ * testsuite/libgomp.fortran/condinc3.f90: New test.
+ * testsuite/libgomp.fortran/condinc4.f90: New test.
+ * testsuite/libgomp.fortran/condinc1.inc: New file.
+
2006-09-18 Tom Tromey <tromey@redhat.com>
* configure: Rebuilt.
--- /dev/null
+! { dg-options "-fopenmp" }
+ program condinc1
+ logical l
+ l = .false.
+!$ include 'condinc1.inc'
+ stop 2
+ end
--- /dev/null
+ if (l) stop 3
+ return
--- /dev/null
+! { dg-options "-fno-openmp" }
+ program condinc2
+ logical l
+ l = .true.
+C$ include 'condinc1.inc'
+ return
+ end
--- /dev/null
+ ! { dg-options "-fopenmp" }
+program condinc3
+ logical l
+ l = .false.
+ !$ include 'condinc1.inc'
+ stop 2
+end
--- /dev/null
+! { dg-options "-fno-openmp" }
+ program condinc4
+ logical l
+ l = .true.
+!$ include 'condinc1.inc'
+ return
+ end