public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35524]  New: EXP library function not found in March 7 snapshot under FreeBSD
@ 2008-03-10 14:06 michael dot a dot richmond at nasa dot gov
  2008-03-11  2:22 ` [Bug fortran/35524] [4.3/4.2 regression] " kargl at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2008-03-10 14:06 UTC (permalink / raw)
  To: gcc-bugs

The following applies to the March 7 snapshot under FreeBSD. I haven't tested
it on other platforms. When I compile and link the following program:

PROGRAM test_exp
x = exp(1.0)
END PROGRAM test_exp

I get the message:

/usr/home/mrichmond/irun/bin/../lib/gcc/i386-unknown-freebsd7.0/4.4.0/../../../libgfortran.so:
undefined reference to `expl'
collect2: ld returned 1 exit status


-- 
           Summary: EXP library function not found in March 7 snapshot under
                    FreeBSD
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michael dot a dot richmond at nasa dot gov


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


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

* [Bug fortran/35524] [4.3/4.2 regression] EXP library function not found in March 7 snapshot under FreeBSD
  2008-03-10 14:06 [Bug fortran/35524] New: EXP library function not found in March 7 snapshot under FreeBSD michael dot a dot richmond at nasa dot gov
@ 2008-03-11  2:22 ` kargl at gcc dot gnu dot org
  2008-03-11  7:53 ` [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran fxcoudert at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-03-11  2:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2008-03-11 02:22 -------
This is caused by the recent addition of erfc and erf intrinsics.  You'll
need to ask FX to fix the problem.  The guilty diff is
http://gcc.gnu.org/ml/fortran/2008-02/msg00318/2008-libgfortran.diff
which unilateral defined EXP(x) as expl().


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.4.0
      Known to work|                            |4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2008-03-11 02:22:03
               date|                            |
            Summary|EXP library function not    |[4.3/4.2 regression] EXP
                   |found in March 7 snapshot   |library function not found
                   |under FreeBSD               |in March 7 snapshot under
                   |                            |FreeBSD


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


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

* [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran
  2008-03-10 14:06 [Bug fortran/35524] New: EXP library function not found in March 7 snapshot under FreeBSD michael dot a dot richmond at nasa dot gov
  2008-03-11  2:22 ` [Bug fortran/35524] [4.3/4.2 regression] " kargl at gcc dot gnu dot org
@ 2008-03-11  7:53 ` fxcoudert at gcc dot gnu dot org
  2008-03-11 19:49 ` michael dot a dot richmond at nasa dot gov
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-11  7:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from fxcoudert at gcc dot gnu dot org  2008-03-11 07:52 -------
There's one good thing in FreeBSD: it sure helps finding any reference to a C99
long double function that is not protected by a autoconf macro :)

Can you please try the following patch and tell me whether it helps?

Index: libgfortran/intrinsics/erfc_scaled_inc.c
===================================================================
--- libgfortran/intrinsics/erfc_scaled_inc.c    (revision 133101)
+++ libgfortran/intrinsics/erfc_scaled_inc.c    (working copy)
@@ -35,16 +35,28 @@
 #define KIND_SUFFIX(x,y) CONCAT(x,y)

 #if (KIND == 4)
+
 # define EXP(x) expf(x)
 # define TRUNC(x) truncf(x)
+
 #elif (KIND == 8)
+
 # define EXP(x) exp(x)
 # define TRUNC(x) trunc(x)
+
 #else
-# define EXP(x) expl(x)
-# define TRUNC(x) truncl(x)
+
+# ifdef HAVE_EXPL
+#  define EXP(x) expl(x)
+# endif
+# ifdef HAVE_TRUNCL
+#  define TRUNC(x) truncl(x)
+# endif
+
 #endif

+#if defined(EXP) && defined(TRUNC)
+
 extern TYPE KIND_SUFFIX(erfc_scaled_r,KIND) (TYPE);
 export_proto(KIND_SUFFIX(erfc_scaled_r,KIND));

@@ -167,6 +179,8 @@
   return res;
 }

+#endif
+
 #undef EXP
 #undef TRUNC



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
          Component|fortran                     |libfortran
 GCC target triplet|                            |i386-unknown-freebsd7.0
           Keywords|                            |patch
   Last reconfirmed|2008-03-11 02:22:03         |2008-03-11 07:52:37
               date|                            |
            Summary|[4.3/4.2 regression] EXP    |[4.4 regression]
                   |library function not found  |Unconditional use of expl()
                   |in March 7 snapshot under   |in libgfortran
                   |FreeBSD                     |
   Target Milestone|---                         |4.4.0


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


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

* [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran
  2008-03-10 14:06 [Bug fortran/35524] New: EXP library function not found in March 7 snapshot under FreeBSD michael dot a dot richmond at nasa dot gov
  2008-03-11  2:22 ` [Bug fortran/35524] [4.3/4.2 regression] " kargl at gcc dot gnu dot org
  2008-03-11  7:53 ` [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran fxcoudert at gcc dot gnu dot org
@ 2008-03-11 19:49 ` michael dot a dot richmond at nasa dot gov
  2008-03-12 10:26 ` fxcoudert at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2008-03-11 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from michael dot a dot richmond at nasa dot gov  2008-03-11 19:49 -------
(In reply to comment #2)
> Can you please try the following patch and tell me whether it helps?

It fixed the problem. Thank you.


-- 


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


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

* [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran
  2008-03-10 14:06 [Bug fortran/35524] New: EXP library function not found in March 7 snapshot under FreeBSD michael dot a dot richmond at nasa dot gov
                   ` (2 preceding siblings ...)
  2008-03-11 19:49 ` michael dot a dot richmond at nasa dot gov
@ 2008-03-12 10:26 ` fxcoudert at gcc dot gnu dot org
  2008-03-12 10:30 ` fxcoudert at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-12 10:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2008-03-12 10:25 -------
Subject: Bug 35524

Author: fxcoudert
Date: Wed Mar 12 10:24:29 2008
New Revision: 133138

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133138
Log:
        PR libfortran/35524
        * intrinsics/erfc_scaled_inc.c: Only define the long double
        variant of erfc_scaled if expl is available.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/intrinsics/erfc_scaled_inc.c


-- 


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


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

* [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran
  2008-03-10 14:06 [Bug fortran/35524] New: EXP library function not found in March 7 snapshot under FreeBSD michael dot a dot richmond at nasa dot gov
                   ` (3 preceding siblings ...)
  2008-03-12 10:26 ` fxcoudert at gcc dot gnu dot org
@ 2008-03-12 10:30 ` fxcoudert at gcc dot gnu dot org
  2008-03-12 15:35 ` dfranke at gcc dot gnu dot org
  2008-03-15  7:39 ` jvdelisle at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-12 10:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2008-03-12 10:29 -------
Fixed, thanks for your report.


-- 

fxcoudert at gcc dot gnu dot org changed:

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


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


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

* [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran
  2008-03-10 14:06 [Bug fortran/35524] New: EXP library function not found in March 7 snapshot under FreeBSD michael dot a dot richmond at nasa dot gov
                   ` (4 preceding siblings ...)
  2008-03-12 10:30 ` fxcoudert at gcc dot gnu dot org
@ 2008-03-12 15:35 ` dfranke at gcc dot gnu dot org
  2008-03-15  7:39 ` jvdelisle at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-03-12 15:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dfranke at gcc dot gnu dot org  2008-03-12 15:34 -------
*** Bug 35554 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran
  2008-03-10 14:06 [Bug fortran/35524] New: EXP library function not found in March 7 snapshot under FreeBSD michael dot a dot richmond at nasa dot gov
                   ` (5 preceding siblings ...)
  2008-03-12 15:35 ` dfranke at gcc dot gnu dot org
@ 2008-03-15  7:39 ` jvdelisle at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-03-15  7:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jvdelisle at gcc dot gnu dot org  2008-03-15 07:39 -------
*** Bug 35563 has been marked as a duplicate of this bug. ***


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danglin at gcc dot gnu dot
                   |                            |org


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


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

end of thread, other threads:[~2008-03-15  7:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-10 14:06 [Bug fortran/35524] New: EXP library function not found in March 7 snapshot under FreeBSD michael dot a dot richmond at nasa dot gov
2008-03-11  2:22 ` [Bug fortran/35524] [4.3/4.2 regression] " kargl at gcc dot gnu dot org
2008-03-11  7:53 ` [Bug libfortran/35524] [4.4 regression] Unconditional use of expl() in libgfortran fxcoudert at gcc dot gnu dot org
2008-03-11 19:49 ` michael dot a dot richmond at nasa dot gov
2008-03-12 10:26 ` fxcoudert at gcc dot gnu dot org
2008-03-12 10:30 ` fxcoudert at gcc dot gnu dot org
2008-03-12 15:35 ` dfranke at gcc dot gnu dot org
2008-03-15  7:39 ` jvdelisle at gcc dot gnu dot 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).