public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/47757] New: Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3
@ 2011-02-15 20:58 jakub at gcc dot gnu.org
  2011-02-15 21:59 ` [Bug libfortran/47757] " burnus at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-15 20:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47757

           Summary: Unintentionally? not exported _gfortran_* symbols in
                    libgfortran.so.3
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


On x86_64-linux
readelf -Ws libgfortran.so.3 | grep LOCAL.*_gfortran | grep -v _gfortrani | awk
'{print $8}' | sort -u
command gives:
_gfortran_cshift0_16_char4
_gfortran_eoshift0_16_char4
_gfortran_eoshift2_16_char4
_gfortran_miall_i1
_gfortran_miall_i16
_gfortran_miall_i2
_gfortran_miall_i4
_gfortran_miall_i8
_gfortran_miany_i1
_gfortran_miany_i16
_gfortran_miany_i2
_gfortran_miany_i4
_gfortran_miany_i8
_gfortran_miparity_i1
_gfortran_miparity_i16
_gfortran_miparity_i2
_gfortran_miparity_i4
_gfortran_miparity_i8
_gfortran_siall_i1
_gfortran_siall_i16
_gfortran_siall_i2
_gfortran_siall_i4
_gfortran_siall_i8
_gfortran_siany_i1
_gfortran_siany_i16
_gfortran_siany_i2
_gfortran_siany_i4
_gfortran_siany_i8
_gfortran_siparity_i1
_gfortran_siparity_i16
_gfortran_siparity_i2
_gfortran_siparity_i4
_gfortran_siparity_i8

are they not exported from libgfortran.so.3 intentionally or is it just an
omission in gfortran.map?  For *iall*/*iany*/*iparity* it seems they non-s/m
variant has been added recently, so maybe just an omission, for the *char4
symbols I have no idea.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libfortran/47757] Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3
  2011-02-15 20:58 [Bug libfortran/47757] New: Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3 jakub at gcc dot gnu.org
@ 2011-02-15 21:59 ` burnus at gcc dot gnu.org
  2011-02-16 10:49 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-02-15 21:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47757

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-15 21:58:33 UTC ---
The {m,s}i{all,any,parity}_i{1,2,4,8,16} is seemingly an my omission; they were
added as part of PR 38282. They are called via gcc/fortran/iresolve.c. For
instance: gfc_resolve_iall calls
  resolve_transformational ("iall", f, array, dim, mask);
which in turn adds an "m" or a "s" as prefix if the intrinsic is called with a
's'calar or array 'm'ask -- without a mask, the pure "_i*" symbol is used. (And
without "dim=" everything is handled in the front end.)

A failing example is, e.g.,
            INTEGER(1) :: a(2,2)
            logical  :: mask(2,2)
            mask = reshape([.true.,.true.,.false.,.true.],[2,2])
            PRINT *, IANY(a, dim=1,mask=mask)
test.f90:(.text+0x1a6): undefined reference to `_gfortran_miany_i1'

 * * *

Regarding _gfortran_cshift0_16_char4 and friends: Those are used for wide-char
operations, where the shifts are given by large-sized integers; example:
    character(kind=4):: str(3,3)
    str(1,:) = [4_'A', 4_'b', 4_'C']
    str(2,:) = [4_'A', 4_'b', 4_'C']
    str(3,:) = [4_'A', 4_'b', 4_'C']
    print *, cshift(str, shift=2_16, dim=1_16)
    end
which fails with undefined reference to `_gfortran_cshift0_16_char4'.

Ignoring issues like whether one should not cast the "2_16" to an integer(8) in
the front end, which should be also sufficient giving 64bit address space, one
should also export those symbols.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libfortran/47757] Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3
  2011-02-15 20:58 [Bug libfortran/47757] New: Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3 jakub at gcc dot gnu.org
  2011-02-15 21:59 ` [Bug libfortran/47757] " burnus at gcc dot gnu.org
@ 2011-02-16 10:49 ` jakub at gcc dot gnu.org
  2011-02-16 17:19 ` jakub at gcc dot gnu.org
  2011-02-16 17:32 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-16 10:49 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47757

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.02.16 10:05:41
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-16 10:05:41 UTC ---
Created attachment 23362
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23362
gcc46-pr47757.patch

Untested fix.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libfortran/47757] Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3
  2011-02-15 20:58 [Bug libfortran/47757] New: Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3 jakub at gcc dot gnu.org
  2011-02-15 21:59 ` [Bug libfortran/47757] " burnus at gcc dot gnu.org
  2011-02-16 10:49 ` jakub at gcc dot gnu.org
@ 2011-02-16 17:19 ` jakub at gcc dot gnu.org
  2011-02-16 17:32 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-16 17:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47757

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-16 17:18:44 UTC ---
Author: jakub
Date: Wed Feb 16 17:18:41 2011
New Revision: 170215

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170215
Log:
    PR libfortran/47757
    * gfortran.map (GFORTRAN_1.4): Export
    _gfortran_{m,s}i{all,any,parity}_i{1,2,4,8,16} and
    _gfortran_{cshift0,eoshift{0,2}}_16_char4.

    * gfortran.dg/pr47757-1.f90: New test.
    * gfortran.dg/pr47757-2.f90: New test.
    * gfortran.dg/pr47757-3.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr47757-1.f90
    trunk/gcc/testsuite/gfortran.dg/pr47757-2.f90
    trunk/gcc/testsuite/gfortran.dg/pr47757-3.f90
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/gfortran.map


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libfortran/47757] Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3
  2011-02-15 20:58 [Bug libfortran/47757] New: Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3 jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-02-16 17:19 ` jakub at gcc dot gnu.org
@ 2011-02-16 17:32 ` jakub at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-16 17:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47757

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-16 17:23:59 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-16 17:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-15 20:58 [Bug libfortran/47757] New: Unintentionally? not exported _gfortran_* symbols in libgfortran.so.3 jakub at gcc dot gnu.org
2011-02-15 21:59 ` [Bug libfortran/47757] " burnus at gcc dot gnu.org
2011-02-16 10:49 ` jakub at gcc dot gnu.org
2011-02-16 17:19 ` jakub at gcc dot gnu.org
2011-02-16 17:32 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).