re PR fortran/29097 (!$ include 'omp_lib.h' does not work)
PR fortran/29097 * scanner.c (include_line): Handle conditional include. * 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. From-SVN: r117234
This commit is contained in:
parent
ec14aed23b
commit
9b9e4cd6a9
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -1212,8 +1212,26 @@ static bool
|
|||
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++;
|
||||
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
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.
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
! { dg-options "-fopenmp" }
|
||||
program condinc1
|
||||
logical l
|
||||
l = .false.
|
||||
!$ include 'condinc1.inc'
|
||||
stop 2
|
||||
end
|
|
@ -0,0 +1,2 @@
|
|||
if (l) stop 3
|
||||
return
|
|
@ -0,0 +1,7 @@
|
|||
! { dg-options "-fno-openmp" }
|
||||
program condinc2
|
||||
logical l
|
||||
l = .true.
|
||||
C$ include 'condinc1.inc'
|
||||
return
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
! { dg-options "-fopenmp" }
|
||||
program condinc3
|
||||
logical l
|
||||
l = .false.
|
||||
!$ include 'condinc1.inc'
|
||||
stop 2
|
||||
end
|
|
@ -0,0 +1,7 @@
|
|||
! { dg-options "-fno-openmp" }
|
||||
program condinc4
|
||||
logical l
|
||||
l = .true.
|
||||
!$ include 'condinc1.inc'
|
||||
return
|
||||
end
|
Loading…
Reference in New Issue