[Fortran, OpenACC] Reject vars of different scope in $acc declare (PR94120)
authorTobias Burnus <tobias@codesourcery.com>
Thu, 12 Mar 2020 09:57:56 +0000 (10:57 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Thu, 12 Mar 2020 09:57:56 +0000 (10:57 +0100)
commit98aeb1ef510204bf90e94b6cc85e5ba68df93d00
treef675ed9667ba2f57a66de5d29906bc84fe26a6d7
parentb73f69020f08208d2d969fcf8879bd294a6e3596
[Fortran, OpenACC] Reject vars of different scope in $acc declare (PR94120)

2020-03-12  Tobias Burnus  <tobias@codesourcery.com>

        PR middle-end/94120
        * openmp.c (gfc_match_oacc_declare): Accept function-result
        variables; reject variables declared in a different scoping unit.

2020-03-12  Tobias Burnus  <tobias@codesourcery.com>

        PR middle-end/94120
        * gfortran.dg/goacc/pr78260-2.f90: Correct scan-tree-dump-times.
        Extend test case to result variables.
        * gfortran.dg/goacc/declare-2.f95: Actually check module-declaration
        restriction of OpenACC.
        * gfortran.dg/goacc/declare-3.f95: Remove case where this
        restriction is violated.
        * gfortran.dg/goacc/pr94120-1.f90: New.
        * gfortran.dg/goacc/pr94120-2.f90: New.
        * gfortran.dg/goacc/pr94120-3.f90: New.
gcc/fortran/ChangeLog
gcc/fortran/openmp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/declare-2.f95
gcc/testsuite/gfortran.dg/goacc/declare-3.f95
gcc/testsuite/gfortran.dg/goacc/pr78260-2.f90
gcc/testsuite/gfortran.dg/goacc/pr94120-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/pr94120-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/pr94120-3.f90 [new file with mode: 0644]