diff options
author | Harald Anlauf <anlauf@gmx.de> | 2019-08-27 19:16:33 +0000 |
---|---|---|
committer | Harald Anlauf <anlauf@gcc.gnu.org> | 2019-08-27 19:16:33 +0000 |
commit | 2bd86b95f76315f102c52a81453ef375c97e8f1b (patch) | |
tree | b7b05454a14ad73627667f20119d26edd65542b7 /gcc/testsuite | |
parent | 340d34bf76dd9455ab07ea849168bf2503d5edef (diff) | |
download | gcc-2bd86b95f76315f102c52a81453ef375c97e8f1b.zip gcc-2bd86b95f76315f102c52a81453ef375c97e8f1b.tar.gz gcc-2bd86b95f76315f102c52a81453ef375c97e8f1b.tar.bz2 |
re PR fortran/91496 (!GCC$ directives error if mistyped or unknown)
2019-08-27 Harald Anlauf <anlauf@gmx.de>
PR fortran/91496
* gfortran.h: Extend struct gfc_iterator for loop annotations.
* array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
VECTOR, and NOVECTOR pragmas.
* decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
(gfc_match_gcc_novector): New matcher functions handling IVDEP,
VECTOR, and NOVECTOR pragmas.
* match.h: Declare prototypes of matcher functions handling IVDEP,
VECTOR, and NOVECTOR pragmas.
* parse.c (decode_gcc_attribute, parse_do_block)
(parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
emit warning for unrecognized pragmas instead of error.
* trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
* gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.
PR fortran/91496
* gfortran.dg/pr91496.f90: New testcase.
From-SVN: r274966
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr91496.f90 | 38 |
2 files changed, 43 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a8149f7..37133de 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-08-27 Harald Anlauf <anlauf@gmx.de> + + PR fortran/91496 + * gfortran.dg/pr91496.f90: New testcase. + 2019-08-27 Uroš Bizjak <ubizjak@gmail.com> * gcc.target/i386/sse4_1-round-roundeven-1.c (dg-options): diff --git a/gcc/testsuite/gfortran.dg/pr91496.f90 b/gcc/testsuite/gfortran.dg/pr91496.f90 new file mode 100644 index 0000000..cb31674 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr91496.f90 @@ -0,0 +1,38 @@ +! { dg-do compile } +! { dg-options "-fdump-tree-original" } +! +subroutine foo (a, b, c, n) + implicit none + real a(*), b(*), c(*) + integer :: i, n + external bar +!DIR$ unroll (4) +!GCC$ unroll 4 + do i = 1, n + a(i) = b(i) + c(i) + end do +!DIR$ ivdep +!GCC$ ivdep + do i = 1, n + a(i) = b(i) + c(i) + end do +!DIR$ vector +!GCC$ vector + do i = 1, n + a(i) = b(i) + c(i) + end do +!DIR$ novector +!GCC$ novector + do i = 1, n + a(i) = b(i) + c(i) + end do +!GCC$ ivdep +!GCC$ vector + do i = 1, n + a(i) = b(i) + c(i) + end do +!DIR$ noinline +!GCC$ noinline ! { dg-warning "Unclassifiable GCC directive" } + call bar (a) +end subroutine foo +! { dg-final { scan-tree-dump-times "ANNOTATE_EXPR" 6 "original" } } |