diff mbox series

Export forgotten _gfortran_{,m,s}findloc0_i2 (PR fortran/54613)

Message ID 20190517114525.GI19695@tucnak
State New
Headers show
Series Export forgotten _gfortran_{,m,s}findloc0_i2 (PR fortran/54613) | expand

Commit Message

Jakub Jelinek May 17, 2019, 11:45 a.m. UTC
Hi!

I've found that gfortran.map doesn't export these 3 symbols (while it does
export other variants, with i1, i4, i8, i16, etc.).
Do we want to export them from both GCC 9.2 and 10 the following way, or
just on the trunk using GFORTRAN_10?

Tested on x86_64-linux.

Another thing is, but that one isn't just about exported symbols, but also
about not even generating such files and listing them in Makefile.am,
there are no findloc r10 entrypoints.  Is that intentional?

BTW, this shows that there is no testsuite coverage for findloc (but
apparently not for minloc, maxloc etc.) that would actually try all the
supported kinds and have at least one test for each supported kind, that
is something that would have caught this.

2019-05-17  Jakub Jelinek  <jakub@redhat.com>

	PR fortran/54613
	* gfortran.map (GFORTRAN_9.2): New symbol version, export
	_gfortran_{,m,s}findloc0_i2 in it.


	Jakub

Comments

Thomas Koenig May 17, 2019, 5:12 p.m. UTC | #1
Hi Jakub,

> I've found that gfortran.map doesn't export these 3 symbols (while it does
> export other variants, with i1, i4, i8, i16, etc.).
> Do we want to export them from both GCC 9.2 and 10 the following way, or
> just on the trunk using GFORTRAN_10?

Both, please.

> Tested on x86_64-linux.
> 
> Another thing is, but that one isn't just about exported symbols, but also
> about not even generating such files and listing them in Makefile.am,
> there are no findloc r10 entrypoints.  Is that intentional?

No, it is not.

> BTW, this shows that there is no testsuite coverage for findloc (but
> apparently not for minloc, maxloc etc.) that would actually try all the
> supported kinds and have at least one test for each supported kind, that
> is something that would have caught this.

It is not only the supported kinds, it is also the version of findloc
that is called. There are five findloc*.m4 files, three of them for
character and two for numeric types. Each of of the m4 files
contains several functions, and the correct one is chosen from
the presence or absence (and rank and ...) of certain arguments.

(At least we got rid of the combinatorial explosion with the different
return kinds with minloc/maxloc.  I would not be surprised if some of
these are missing, too...)

So, OK for the patch (and the other one with the _r10 files), and
thanks!

Regards

	Thomas
diff mbox series

Patch

--- libgfortran/gfortran.map.jj	2019-01-14 22:13:47.503717103 +0100
+++ libgfortran/gfortran.map	2019-05-17 12:53:34.614042579 +0200
@@ -1590,3 +1590,9 @@  GFORTRAN_9 {
   __ieee_arithmetic_MOD_ieee_support_subnormal_8;
   __ieee_arithmetic_MOD_ieee_support_subnormal_noarg;
 } GFORTRAN_8;
+
+GFORTRAN_9.2 {
+  _gfortran_findloc0_i2;
+  _gfortran_mfindloc0_i2;
+  _gfortran_sfindloc0_i2;
+} GFORTRAN_9;