diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/elemental_pointer_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/elemental_pointer_1.f90 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90 b/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90 new file mode 100644 index 000000000..ae1826243 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +! Tests the fix for pr20875. +! Note 12.7.1 "For a function, the result shall be scalar and shall not have the POINTER attribute." +MODULE Test +CONTAINS + ELEMENTAL FUNCTION LL(I) + INTEGER, INTENT(IN) :: I + INTEGER :: LL + POINTER :: LL ! { dg-error " POINTER attribute conflicts with ELEMENTAL attribute" } + END FUNCTION LL +END MODULE Test + +! { dg-final { cleanup-modules "Test" } } |