gfc_set_backend_locus (locus * loc)
{
gfc_current_backend_file = loc->lb->file;
- input_location = loc->lb->location;
+ input_location = gfc_get_location (loc);
}
void
gfc_restore_backend_locus (locus * loc)
{
- gfc_set_backend_locus (loc);
+ /* This only restores the information captured by gfc_save_backend_locus,
+ intentionally does not use gfc_get_location. */
+ input_location = loc->lb->location;
+ gfc_current_backend_file = loc->lb->file;
free (loc->lb);
}
integer :: i, j, sum, diff
!$acc parallel &
- !$acc & & ! Fortran location information points to the last line of the directive, and there is no column location information.
-!$acc && ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:18:0\\\] #pragma acc parallel" 1 "original" } }
- !$acc & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:18:0\\\] #pragma omp target oacc_parallel" 1 "gimple" } }
+ !$acc & & ! Fortran location information points to the last line, and last character of the directive.
+!$acc && ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:18:123\\\] #pragma acc parallel" 1 "original" } }
+ !$acc & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:18:123\\\] #pragma omp target oacc_parallel" 1 "gimple" } }
!$acc loop &
- !$acc & & ! Fortran location information points to the last line of the directive, and there is no column location information.
- !$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:26:0\\\] #pragma acc loop" 1 "original" } }
- !$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:26:0\\\] #pragma acc loop" 1 "gimple" } }
+ !$acc & & ! Fortran location information points to the last line, and last character of the directive.
+ !$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:26:22\\\] #pragma acc loop" 1 "original" } }
+ !$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:26:22\\\] #pragma acc loop" 1 "gimple" } }
!$acc& reduction ( + : sum ) & ! { dg-line sum1 }
!$acc && ! Fortran location information points to the ':' in 'reduction(+:sum)'.
!$acc & & ! { dg-message "36: location of the previous reduction for 'sum'" "" { target *-*-* } sum1 }
!$acc& independent
do i = 1, 10
!$acc loop &
-!$acc & & ! Fortran location information points to the last line of the directive, and there is no column location information.
- !$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:36:0\\\] #pragma acc loop" 1 "original" } }
- !$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:36:0\\\] #pragma acc loop" 1 "gimple" } }
+!$acc & & ! Fortran location information points to the last line, and last character of the directive.
+ !$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:36:34\\\] #pragma acc loop" 1 "original" } }
+ !$acc & & ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:36:34\\\] #pragma acc loop" 1 "gimple" } }
!$acc & reduction(-: diff ) &
!$acc&reduction(- : sum) & ! { dg-line sum2 }
!$acc & & ! Fortran location information points to the ':' in 'reduction(-:sum)'.
sum &
& = &
& 1
- ! Fortran location information points to the last line of the statement, and there is no column location information.
- ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:40:0\\\] sum = 1" 1 "original" } }
- ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:40:0\\\] sum = 1" 1 "gimple" } }
+ ! Fortran location information points to the last line, and last character of the statement.
+ ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:40:9\\\] sum = 1" 1 "original" } }
+ ! { dg-final { scan-tree-dump-times "pr92793-1\\\.f90:40:9\\\] sum = 1" 1 "gimple" } }
end do
end do
!$acc end parallel