aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-05-29 19:01:50 +0200
committerJakub Jelinek <jakub@redhat.com>2020-05-29 19:01:50 +0200
commit316fe6b40165c26b30375f8ad85384379133f89b (patch)
treea3fa58aaccae1522834b6f52573366c5d440213f /gcc
parent1f32d5294f51614f5637d81c522fccacc124f141 (diff)
downloadgcc-316fe6b40165c26b30375f8ad85384379133f89b.zip
gcc-316fe6b40165c26b30375f8ad85384379133f89b.tar.gz
gcc-316fe6b40165c26b30375f8ad85384379133f89b.tar.bz2
libgfortran: Export forgotten _gfortran_{,m,s}findloc{0,1}_c10 [PR95390]
I have noticed we don't export these 6 symbols and thus the testcase below fails to link. 2020-05-29 Jakub Jelinek <jakub@redhat.com> PR libfortran/95390 * gfortran.dg/findloc_8.f90: New test. * Makefile.am (i_findloc0_c): Add findloc0_i10.c. (i_findloc1_c): Add findloc1_i10.c. * gfortran.map (GFORTRAN_10.2): New symbol version, export _gfortran_{,m,s}findloc{0,1}_c10 symbols. * Makefile.in: Regenerated. * generated/findloc0_c10.c: Generated. * generated/findloc1_c10.c: Generated.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gfortran.dg/findloc_8.f9029
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/findloc_8.f90 b/gcc/testsuite/gfortran.dg/findloc_8.f90
new file mode 100644
index 0000000..dffb36d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/findloc_8.f90
@@ -0,0 +1,29 @@
+! PR libfortran/95390
+! { dg-do run { target fortran_real_10 } }
+
+ complex(kind=10) :: a(6), b, d(2,2)
+ logical :: m(6), n, o(2,2)
+ integer :: c(1), e(2)
+ a = (/ 1., 2., 17., 2., 2., 6. /)
+ b = 17.
+ c = findloc (a, b)
+ if (c(1) /= 3) stop 1
+ m = (/ .true., .false., .true., .true., .true., .true. /)
+ n = .true.
+ b = 2.
+ c = findloc (a, b, m)
+ if (c(1) /= 4) stop 2
+ c = findloc (a, b, n)
+ if (c(1) /= 2) stop 3
+ d = reshape((/ 1., 2., 2., 3. /), (/ 2, 2 /))
+ e = findloc (d, b, 1)
+ if (e(1) /= 2 .or. e(2) /= 1) stop 4
+ o = reshape((/ .true., .false., .true., .true. /), (/ 2, 2 /))
+ e = findloc (d, b, 1, o)
+ if (e(1) /= 0 .or. e(2) /= 1) stop 5
+ e = findloc (d, b, 1, n)
+ if (e(1) /= 2 .or. e(2) /= 1) stop 6
+ n = .false.
+ e = findloc (d, b, 1, n)
+ if (e(1) /= 0 .or. e(2) /= 0) stop 7
+end