aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2019-08-27 19:16:33 +0000
committerHarald Anlauf <anlauf@gcc.gnu.org>2019-08-27 19:16:33 +0000
commit2bd86b95f76315f102c52a81453ef375c97e8f1b (patch)
treeb7b05454a14ad73627667f20119d26edd65542b7 /gcc/testsuite
parent340d34bf76dd9455ab07ea849168bf2503d5edef (diff)
downloadgcc-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/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/pr91496.f9038
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" } }