public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions
@ 2010-11-23 18:41 burnus at gcc dot gnu.org
  2010-12-01 12:47 ` [Bug fortran/46625] " burnus at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-11-23 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: libquadmath: Mangle internal symbols; rename
                    __float128 <-> string functions
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


For libquadmath.a it makes sense to mangle non-exported symbols, e.g. by
prefixing them with __quadmath_

quadmath_strtopQ and quadmath_dtoaq look ugly, Jakub suggests:
   quadmath_strtoq and quadmath_qtostr


C example (to have one somewhere):

/* Compile with  gcc test.c -lquadmath -lm  shows:
:+1.41421356237309504880e+00:
:+1.2345678000e-05:
*/

#include <quadmath.h>
#include <stdio.h>

int main()
{
  __float128 r;
  char str[200];

  r = 2.0q;
  r = sqrtq(r);
  quadmath_dtoaq (str, 200, 20, r);
  printf(":%s:\n", str);

  quadmath_strtopQ ("1.2345678", NULL, &r);
  r = r/100000.0q;
  quadmath_dtoaq (str, 200, 10, r);
  printf(":%s:\n", str);

  return 0;
}


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

* [Bug fortran/46625] libquadmath: Mangle internal symbols; rename __float128 <-> string functions
  2010-11-23 18:41 [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions burnus at gcc dot gnu.org
@ 2010-12-01 12:47 ` burnus at gcc dot gnu.org
  2010-12-03  8:44 ` burnus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-01 12:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-01 12:47:13 UTC ---
Regarding the mangled symbols: As
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/11b3845e961393bc
shows there is a real-world issue with MinGW64 and static linking as MinGW64
also uses gdtoa.

MinGW64 now mangles the symbols using gdtoaimp.h by using
  #define <symbol_D2A> <prefix>_<symbol_D2A>
with a suitable __prefix.


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

* [Bug fortran/46625] libquadmath: Mangle internal symbols; rename __float128 <-> string functions
  2010-11-23 18:41 [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions burnus at gcc dot gnu.org
  2010-12-01 12:47 ` [Bug fortran/46625] " burnus at gcc dot gnu.org
@ 2010-12-03  8:44 ` burnus at gcc dot gnu.org
  2010-12-08 22:43 ` burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-03  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-03 08:44:26 UTC ---
While MinGW64 now mangles the symbols, I think MinGW.org does not. As I was
told, the issue also affects the 32bit MinGW.


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

* [Bug fortran/46625] libquadmath: Mangle internal symbols; rename __float128 <-> string functions
  2010-11-23 18:41 [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions burnus at gcc dot gnu.org
  2010-12-01 12:47 ` [Bug fortran/46625] " burnus at gcc dot gnu.org
  2010-12-03  8:44 ` burnus at gcc dot gnu.org
@ 2010-12-08 22:43 ` burnus at gcc dot gnu.org
  2010-12-11 17:48 ` burnus at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-08 22:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-08 22:43:44 UTC ---
Created attachment 22688
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22688
Draft patch


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

* [Bug fortran/46625] libquadmath: Mangle internal symbols; rename __float128 <-> string functions
  2010-11-23 18:41 [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2010-12-08 22:43 ` burnus at gcc dot gnu.org
@ 2010-12-11 17:48 ` burnus at gcc dot gnu.org
  2010-12-13 19:45 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-11 17:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-11 17:48:16 UTC ---
Submitted patch: http://gcc.gnu.org/ml/gcc-patches/2010-12/msg00929.html


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

* [Bug fortran/46625] libquadmath: Mangle internal symbols; rename __float128 <-> string functions
  2010-11-23 18:41 [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2010-12-11 17:48 ` burnus at gcc dot gnu.org
@ 2010-12-13 19:45 ` burnus at gcc dot gnu.org
  2010-12-13 19:59 ` burnus at gcc dot gnu.org
  2011-01-16 17:16 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-13 19:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-13 19:44:51 UTC ---
Author: burnus
Date: Mon Dec 13 19:44:38 2010
New Revision: 167768

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167768
Log:
2010-12-13  Tobias Burnus  <burnus@net-b.de>

        PR fortran/46625
        * gdtoa/gdtoaimp.h: Mangle internal functions by
        prefixing them with __quadmath. Don't use gdtoa's strcp(y).
        * gdtoa/g_Qfmt.c (g_Qfmt): Use strcpy instead of strcp.
        * gdtoa/misc.c (strcpy): Renamed from strcp and only use
        if NO_STRING_H is set.
        * quadmath-imp.h (__quadmath_rem_pio2q,
        * __quadmath_kernel_sincosq
        __quadmath_kernel_sinq, __quadmath_kernel_cosq): Added
        __quadmath prefix to internal functions.
        * math/cosq.c (cosq): Ditto.
        * math/sinq.c (cosq): Ditto.
        * math/tanq.c (tanq,__quadmath_kernel_tanq): Ditto.
        * math/rem_pio2q.c (rem_pio2, __quadmath_kernel_rem_pio2):
        * Ditto.
        * math/sinq_kernel.c (__quadmath_kernel_sinq): Ditto.
        * math/cosq_kernel.c (__quadmath_kernel_cosq): Ditto.


Modified:
    trunk/libquadmath/ChangeLog
    trunk/libquadmath/gdtoa/g_Qfmt.c
    trunk/libquadmath/gdtoa/gdtoaimp.h
    trunk/libquadmath/gdtoa/misc.c
    trunk/libquadmath/math/cosq.c
    trunk/libquadmath/math/cosq_kernel.c
    trunk/libquadmath/math/rem_pio2q.c
    trunk/libquadmath/math/sincosq.c
    trunk/libquadmath/math/sincosq_kernel.c
    trunk/libquadmath/math/sinq.c
    trunk/libquadmath/math/sinq_kernel.c
    trunk/libquadmath/math/tanq.c
    trunk/libquadmath/quadmath-imp.h


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

* [Bug fortran/46625] libquadmath: Mangle internal symbols; rename __float128 <-> string functions
  2010-11-23 18:41 [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2010-12-13 19:45 ` burnus at gcc dot gnu.org
@ 2010-12-13 19:59 ` burnus at gcc dot gnu.org
  2011-01-16 17:16 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-13 19:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-13 19:58:49 UTC ---
FIXED on the trunk (4.6)


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

* [Bug fortran/46625] libquadmath: Mangle internal symbols; rename __float128 <-> string functions
  2010-11-23 18:41 [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2010-12-13 19:59 ` burnus at gcc dot gnu.org
@ 2011-01-16 17:16 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-16 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-16 16:55:30 UTC ---
Author: jakub
Date: Sun Jan 16 16:55:27 2011
New Revision: 168856

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168856
Log:
    PR fortran/46625
    * quadmath.map (QUADMATH_1.0): Remove quadmath_strtopQ
    and quadmath_dtoaq.  Add strtoflt128 and quadmath_flt128tostr.
    * quadmath_weak.h (quadmath_strtopQ, quadmath_dtoaq): Remove.
    (strtoflt128, quadmath_flt128tostr): Add.
    * gdtoa/strtopQ.c (quadmath_strtopQ): Rename to...
    (strtoflt128): ... this.  Return __float128, instead of writing
    to memory pointed by last argument.
    * quadmath.h: Use C style comments instead of C++ style.
    (quadmath_strtopQ, quadmath_dtoaq): Remove prototypes.
    (strtoflt128, quadmath_flt128tostr): Add prototypes.
    * libquadmath.texi (quadmath_dtoaq): Rename to quadmath_flt128tostr.
    (quadmath_strtopQ): Rename to strtoflt128.  Adjust prototype,
    adjust examples.
    * quadmath_io.c (quadmath_dtoaq): Rename to...
    (quadmath_flt128tostr): ... this.
libgfortran/
    * io/write_float.def (DTOAQ): Use quadmath_flt128tostr
    instead of quadmath_dtoa.
    * io/transfer128.c (tmp1, tmp2): New variables, bring in
    strtoflt128 and quadmath_flt128tostr.
    (transfer_real128, transfer_real128_write, transfer_complex128,
    transfer_complex128_write): Remove tmp1/tmp2 variables.
    * io/read.c (convert_real): Use strtoflt128 instead of
    quadmath_strtopQ, adjust for the changed arguments and return
    value.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/read.c
    trunk/libgfortran/io/transfer128.c
    trunk/libgfortran/io/write_float.def
    trunk/libquadmath/ChangeLog
    trunk/libquadmath/gdtoa/strtopQ.c
    trunk/libquadmath/libquadmath.texi
    trunk/libquadmath/quadmath.h
    trunk/libquadmath/quadmath.map
    trunk/libquadmath/quadmath_io.c
    trunk/libquadmath/quadmath_weak.h


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

end of thread, other threads:[~2011-01-16 16:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23 18:41 [Bug fortran/46625] New: libquadmath: Mangle internal symbols; rename __float128 <-> string functions burnus at gcc dot gnu.org
2010-12-01 12:47 ` [Bug fortran/46625] " burnus at gcc dot gnu.org
2010-12-03  8:44 ` burnus at gcc dot gnu.org
2010-12-08 22:43 ` burnus at gcc dot gnu.org
2010-12-11 17:48 ` burnus at gcc dot gnu.org
2010-12-13 19:45 ` burnus at gcc dot gnu.org
2010-12-13 19:59 ` burnus at gcc dot gnu.org
2011-01-16 17:16 ` 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).