public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/33583]  New: FAIL: gfortran.dg/gamma_1.f90
@ 2007-09-28 23:13 danglin at gcc dot gnu dot org
  2007-09-29 12:45 ` [Bug libfortran/33583] " rguenth at gcc dot gnu dot org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-09-28 23:13 UTC (permalink / raw)
  To: gcc-bugs

Executing on host: /xxx/gnu/gcc/objdir/gcc/testsuite/gfortran/../../gfortran
-B/
xxx/gnu/gcc/objdir/gcc/testsuite/gfortran/../../
/xxx/gnu/gcc/gcc/gcc/testsuite/
gfortran.dg/gamma_1.f90   -O0   -pedantic-errors 
-L/xxx/gnu/gcc/objdir/hppa1.1-
hp-hpux10.20/./libgfortran/.libs
-L/xxx/gnu/gcc/objdir/hppa1.1-hp-hpux10.20/./li
bgfortran/.libs -L/xxx/gnu/gcc/objdir/hppa1.1-hp-hpux10.20/./libiberty  -lm  
-o
 ./gamma_1.exe    (timeout = 600)
/usr/ccs/bin/ld: Unsatisfied symbols:
   lgammaf (code)
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/ccs/bin/ld: Unsatisfied symbols:
   lgammaf (code)
collect2: ld returned 1 exit status

FAIL: gfortran.dg/gamma_1.f90  -O0  (test for excess errors)

MAIN__:
        .PROC
        .CALLINFO FRAME=64,CALLS,SAVE_RP,SAVE_SP,ENTRY_GR=3
        .ENTRY
        stw %r2,-20(%r30)
        copy %r3,%r1
        copy %r30,%r3
        stwm %r1,64(%r30)
        stw %r3,-4(%r30)
        ldi 7,%r26
        ldil LR'options___0___517,%r28
        ldo RR'options___0___517(%r28),%r25
        .CALL ARGW0=GR,ARGW1=GR
        bl _gfortran_set_options,%r2
        nop
        ldil LR'L$C0000,%r28
        ldo RR'L$C0000(%r28),%r28
        fldws 0(%r28),%fr22L
        fcpy,sgl %fr22L,%fr4L
        .CALL ARGW0=FR
        bl lgammaf,%r2
        nop

Don't see any checks for lgamma or lgammaf in build log.


-- 
           Summary: FAIL: gfortran.dg/gamma_1.f90
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa1.1-hp-hpux10.20
  GCC host triplet: hppa1.1-hp-hpux10.20
GCC target triplet: hppa1.1-hp-hpux10.20


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
@ 2007-09-29 12:45 ` rguenth at gcc dot gnu dot org
  2007-09-29 16:15 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-09-29 12:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2007-09-29 12:45 -------
libgfortran in general assumes that a full C99 runtime is available.


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
  2007-09-29 12:45 ` [Bug libfortran/33583] " rguenth at gcc dot gnu dot org
@ 2007-09-29 16:15 ` dave at hiauly1 dot hia dot nrc dot ca
  2007-09-29 16:47 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2007-09-29 16:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dave at hiauly1 dot hia dot nrc dot ca  2007-09-29 16:15 -------
Subject: Re:  FAIL: gfortran.dg/gamma_1.f90

> libgfortran in general assumes that a full C99 runtime is available.

lgamma and lgamma_r are available, so it should be possible to fudge
a f version.  This is done for some other functions.

I suspect that this has something to do with mpfr as HP-UX 11 doesn't
have lgammaf and I'm not seeing the fail there.  I updated mpfr from
2.2.1 to 2.3.0 last night, and started a new build.

Dave


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
  2007-09-29 12:45 ` [Bug libfortran/33583] " rguenth at gcc dot gnu dot org
  2007-09-29 16:15 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2007-09-29 16:47 ` dave at hiauly1 dot hia dot nrc dot ca
  2007-09-30 22:28 ` fxcoudert at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2007-09-29 16:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2007-09-29 16:47 -------
Subject: Re:  FAIL: gfortran.dg/gamma_1.f90

> Subject: Re:  FAIL: gfortran.dg/gamma_1.f90
> 
> > libgfortran in general assumes that a full C99 runtime is available.

It was the fortran frontend that generated the call to lgammaf.

Dave


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-09-29 16:47 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2007-09-30 22:28 ` fxcoudert at gcc dot gnu dot org
  2007-09-30 22:31 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-30 22:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from fxcoudert at gcc dot gnu dot org  2007-09-30 22:28 -------
The patch below should provide fallback functions (build in maintainer mode or
use autoreconf in libgfortran), does it work?


Index: intrinsics/c99_functions.c
===================================================================
--- intrinsics/c99_functions.c  (revision 128673)
+++ intrinsics/c99_functions.c  (working copy)
@@ -168,6 +168,31 @@ erfcf (float x)
 #endif


+/* Wrappers for systems without the C99 gammaf() and lgammaf() functions.  */
+
+#if defined(HAVE_GAMMA) && !defined(HAVE_GAMMAF)
+#define HAVE_GAMMAF 1
+extern float gammaf (float);
+
+float
+gammaf (float x)
+{
+  return (float) gamma ((double) x);
+}
+#endif
+
+#if defined(HAVE_LGAMMA) && !defined(HAVE_LGAMMAF)
+#define HAVE_LGAMMAF 1
+extern float lgammaf (float);
+
+float
+lgammaf (float x)
+{
+  return (float) lgamma ((double) x);
+}
+#endif
+
+
 #ifndef HAVE_ACOSF
 #define HAVE_ACOSF 1
 float
Index: c99_protos.h
===================================================================
--- c99_protos.h        (revision 128673)
+++ c99_protos.h        (working copy)
@@ -284,6 +284,19 @@ extern float erfcf (float);
 #endif


+/* Wrappers for systems without the C99 gammaf() and lgammaf() functions.  */
+
+#if defined(HAVE_GAMMA) && !defined(HAVE_GAMMAF)
+#define HAVE_GAMMAF 1
+extern float gammaf (float);
+#endif
+
+#if defined(HAVE_LGAMMA) && !defined(HAVE_LGAMMAF)
+#define HAVE_LGAMMAF 1
+extern float lgammaf (float);
+#endif
+
+

 /* log10l is needed on all platforms for decimal I/O */
 #ifndef HAVE_LOG10L
Index: configure.ac
===================================================================
--- configure.ac        (revision 128673)
+++ configure.ac        (working copy)
@@ -379,6 +379,10 @@ AC_CHECK_LIB([m],[y1l],[AC_DEFINE([HAVE_
 AC_CHECK_LIB([m],[ynf],[AC_DEFINE([HAVE_YNF],[1],[libm includes ynf])])
 AC_CHECK_LIB([m],[yn],[AC_DEFINE([HAVE_YN],[1],[libm includes yn])])
 AC_CHECK_LIB([m],[ynl],[AC_DEFINE([HAVE_YNL],[1],[libm includes ynl])])
+AC_CHECK_LIB([m],[gamma],[AC_DEFINE([HAVE_GAMMA],[1],[libm includes gamma])])
+AC_CHECK_LIB([m],[gammaf],[AC_DEFINE([HAVE_GAMMAF],[1],[libm includes
gammaf])]
)
+AC_CHECK_LIB([m],[lgamma],[AC_DEFINE([HAVE_LGAMMA],[1],[libm includes
lgamma])]
)
+AC_CHECK_LIB([m],[lgammaf],[AC_DEFINE([HAVE_LGAMMAF],[1],[libm includes
lgammaf
])])

 # On AIX, clog is present in libm as __clog
 AC_CHECK_LIB([m],[__clog],[AC_DEFINE([HAVE_CLOG],[1],[libm includes clog])])


-- 

fxcoudert at gcc dot gnu dot org changed:

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


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-09-30 22:28 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-30 22:31 ` dave at hiauly1 dot hia dot nrc dot ca
  2007-10-24 19:30 ` tkoenig at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2007-09-30 22:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2007-09-30 22:31 -------
Subject: Re:  FAIL: gfortran.dg/gamma_1.f90

> The patch below should provide fallback functions (build in maintainer mode or
> use autoreconf in libgfortran), does it work?

I'll give this a whirl after the current build and check completes...

Dave


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-09-30 22:31 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2007-10-24 19:30 ` tkoenig at gcc dot gnu dot org
  2007-10-30 10:36 ` fxcoudert at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2007-10-24 19:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tkoenig at gcc dot gnu dot org  2007-10-24 19:30 -------
I'll do this together with PR 33698.


-- 

tkoenig at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |33698
         AssignedTo|unassigned at gcc dot gnu   |tkoenig at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-10-24 19:30:32
               date|                            |


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-10-24 19:30 ` tkoenig at gcc dot gnu dot org
@ 2007-10-30 10:36 ` fxcoudert at gcc dot gnu dot org
  2007-11-16 22:32 ` fxcoudert at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-10-30 10:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from fxcoudert at gcc dot gnu dot org  2007-10-30 10:36 -------
*** Bug 33942 has been marked as a duplicate of this bug. ***


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michael dot a dot richmond
                   |                            |at nasa dot gov


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-10-30 10:36 ` fxcoudert at gcc dot gnu dot org
@ 2007-11-16 22:32 ` fxcoudert at gcc dot gnu dot org
  2007-11-16 22:46 ` fxcoudert at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-16 22:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from fxcoudert at gcc dot gnu dot org  2007-11-16 22:31 -------
Subject: Bug 33583

Author: fxcoudert
Date: Fri Nov 16 22:31:28 2007
New Revision: 130245

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130245
Log:
        PR libfortran/33583
        PR libfortran/33698

        * intrinsics/c99_functions.c (tgamma, tgammaf, lgamma, lgammaf):
        New fallback functions.
        * c99_protos.h (tgamma, tgammaf, lgamma, lgammaf): New prototypes.
        * configure.ac: Add checks for tgamma, tgammaf, tgammal, lgamma,
        lgammaf and lgammal.
        * config.h.in: Regenerate.
        * configure: Regenerate.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/c99_protos.h
    trunk/libgfortran/config.h.in
    trunk/libgfortran/configure
    trunk/libgfortran/configure.ac
    trunk/libgfortran/intrinsics/c99_functions.c


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-11-16 22:32 ` fxcoudert at gcc dot gnu dot org
@ 2007-11-16 22:46 ` fxcoudert at gcc dot gnu dot org
  2007-11-16 22:46 ` fxcoudert at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-16 22:46 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-11-16 22:46 ` fxcoudert at gcc dot gnu dot org
@ 2007-11-16 22:46 ` fxcoudert at gcc dot gnu dot org
  2007-11-26 17:18 ` michael dot a dot richmond at nasa dot gov
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-16 22:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from fxcoudert at gcc dot gnu dot org  2007-11-16 22:46 -------
I hope it's now fixed. If there is something more to it, please reopen the PR
or file a new one.


-- 

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=33583


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2007-11-16 22:46 ` fxcoudert at gcc dot gnu dot org
@ 2007-11-26 17:18 ` michael dot a dot richmond at nasa dot gov
  2007-11-26 17:42 ` burnus at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2007-11-26 17:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from michael dot a dot richmond at nasa dot gov  2007-11-26 17:18 -------
Bug 33942 was marked as a duplicate of this one, but it is not fixed


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2007-11-26 17:18 ` michael dot a dot richmond at nasa dot gov
@ 2007-11-26 17:42 ` burnus at gcc dot gnu dot org
  2007-11-26 17:58 ` fxcoudert at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-11-26 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from burnus at gcc dot gnu dot org  2007-11-26 17:42 -------
(In reply to comment #10)
> Bug 33942 was marked as a duplicate of this one, but it is not fixed

Can you enlighten us what is missing? As a configure test was added, it should
have found the lgamma function of "libm" and for gamma it should use the one
provided by libgfortran.

Do you get linker errors? Or what exactly is the error message/problem?


-- 

burnus at gcc dot gnu dot org changed:

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


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2007-11-26 17:42 ` burnus at gcc dot gnu dot org
@ 2007-11-26 17:58 ` fxcoudert at gcc dot gnu dot org
  2007-11-26 18:16 ` michael dot a dot richmond at nasa dot gov
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-26 17:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from fxcoudert at gcc dot gnu dot org  2007-11-26 17:58 -------
(In reply to comment #10)
> Bug 33942 was marked as a duplicate of this one, but it is not fixed

PR33942 contains two different issues: first, that using GAMMA in your main
program is calling the system gamma function, and not your internal gamma
function: this one is, unfortunately, is a voluntary change in the behaviour of
gfortran to conform to other compilers and the Fortran 2008 standard (or
whatever its final name will be). You can get rid of that behaviour by adding
"EXTERNAL GAMMA" to your main program, as I stated in my comment to PR33942.
That first part is, as far as we are concerned, not a bug. It is noted in the
4.3 release notes (http://gcc.gnu.org/gcc-4.3/changes.html), along with the
fact that adding "EXTERNAL GAMMA" is the way to go.

The second half of the issue is that, on FreeBSD, there is no gammaf() in libm.
This is what this PR tracks, and this is why PR33942 was closed as a duplicate.

Sorry if that wasn't clear enough.


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2007-11-26 17:58 ` fxcoudert at gcc dot gnu dot org
@ 2007-11-26 18:16 ` michael dot a dot richmond at nasa dot gov
  2007-11-26 23:11 ` burnus at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2007-11-26 18:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from michael dot a dot richmond at nasa dot gov  2007-11-26 18:16 -------
When I compile the following program under FreeBSD using the November 23
snapshot of gfortran:

PROGRAM pgamma
y = gamma(x)
END PROGRAM pgamma

I get the message:

/var/tmp//ccuAsOud.o(.text+0x1f): In function `MAIN__':
: undefined reference to `tgammaf'
collect2: ld returned 1 exit status

Is this the intended behavior?


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2007-11-26 18:16 ` michael dot a dot richmond at nasa dot gov
@ 2007-11-26 23:11 ` burnus at gcc dot gnu dot org
  2007-11-26 23:29 ` kargl at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-11-26 23:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from burnus at gcc dot gnu dot org  2007-11-26 23:11 -------
(In reply to comment #13)
> When I compile the following program under FreeBSD using the November 23
> snapshot of gfortran:
> : undefined reference to `tgammaf'
> Is this the intended behavior?

Of cause not. The question is only why does it happen. Did you compile GCC
yourself? If yes, what do libgfortran/config.h and libgfortran/config.log
contain for lgammaf? Are you sure that the linker finds the right version of
libgfortran.so? (This feature was added 2007-11-16.)


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2007-11-26 23:11 ` burnus at gcc dot gnu dot org
@ 2007-11-26 23:29 ` kargl at gcc dot gnu dot org
  2007-11-27 13:09 ` michael dot a dot richmond at nasa dot gov
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-11-26 23:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from kargl at gcc dot gnu dot org  2007-11-26 23:29 -------
(In reply to comment #13)
> When I compile the following program under FreeBSD using the November 23
> snapshot of gfortran:
> 
> PROGRAM pgamma
> y = gamma(x)
> END PROGRAM pgamma
> 
> I get the message:
> 
> /var/tmp//ccuAsOud.o(.text+0x1f): In function `MAIN__':
> : undefined reference to `tgammaf'
> collect2: ld returned 1 exit status
> 
> Is this the intended behavior?

Works for me.

troutmask:sgk[223] gc4x -o z a.f90
troutmask:sgk[224] nm z | grep gamma
0000000000416060 T tgamma
0000000000403b10 T tgammaf
troutmask:sgk[225] gfc4x -v
Using built-in specs.
Target: x86_64-unknown-freebsd8.0
Configured with: ../gcc4x/configure --prefix=/home/sgk/work/4x
--enable-languages=c,fortran
Thread model: posix
gcc version 4.3.0 20071126 (experimental) (GCC) 


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2007-11-26 23:29 ` kargl at gcc dot gnu dot org
@ 2007-11-27 13:09 ` michael dot a dot richmond at nasa dot gov
  2007-11-27 15:00 ` kargl at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2007-11-27 13:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from michael dot a dot richmond at nasa dot gov  2007-11-27 13:08 -------
I am running the i386 version of FreeBSD 6.2. I compiled gcc myself. The only
reference to lgammaf in libgfortran/config.h is:

490:/* libm includes lgammaf */

libgfortran/config.log contains the following references to lgammaf:

configure:31736: checking for lgammaf in -lm
configure:31771: /usr/home/mrichmon/gcc-4.3-20071123/g95/./gcc/xgcc
-B/usr/home/mrichmon/gcc-4.3-20071123/g95/./gcc/
-B/home/mrichmon/irun/i386-unknown-freebsd6.2/bin/
-B/home/mrichmon/irun/i386-unknown-freebsd6.2/lib/ -isystem
/home/mrichmon/irun/i386-unknown-freebsd6.2/include -isystem
/home/mrichmon/irun/i386-unknown-freebsd6.2/sys-include -o conftest -std=gnu99
-O2 -g     conftest.c -lm   >&5
conftest.c:196: warning: conflicting types for built-in function 'lgammaf'
[snip]
ac_cv_lib_m_lgammaf=yes

The only version of libgfortran.so on my system is the one I create during the
gfortran build.


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2007-11-27 13:09 ` michael dot a dot richmond at nasa dot gov
@ 2007-11-27 15:00 ` kargl at gcc dot gnu dot org
  2007-11-27 15:29 ` michael dot a dot richmond at nasa dot gov
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-11-27 15:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from kargl at gcc dot gnu dot org  2007-11-27 15:00 -------
(In reply to comment #16)
> I am running the i386 version of FreeBSD 6.2. I compiled gcc myself. The only
> reference to lgammaf in libgfortran/config.h is:
> 
> 490:/* libm includes lgammaf */
> 
> libgfortran/config.log contains the following references to lgammaf:
> 
> configure:31736: checking for lgammaf in -lm
> configure:31771: /usr/home/mrichmon/gcc-4.3-20071123/g95/./gcc/xgcc
> -B/usr/home/mrichmon/gcc-4.3-20071123/g95/./gcc/

g95?

How do you retrieve your source?


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2007-11-27 15:00 ` kargl at gcc dot gnu dot org
@ 2007-11-27 15:29 ` michael dot a dot richmond at nasa dot gov
  2007-11-27 19:43 ` kargl at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: michael dot a dot richmond at nasa dot gov @ 2007-11-27 15:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from michael dot a dot richmond at nasa dot gov  2007-11-27 15:28 -------
I retrieve my source with the following commands:

wget --timestamping
ftp://ftp.mirrorservice.org/sites/sources.redhat.com/pub/gcc/snapshots/4.3-20071123/gcc-core-4.3-20071123.tar.bz2
wget --timestamping
ftp://ftp.mirrorservice.org/sites/sources.redhat.com/pub/gcc/snapshots/4.3-20071123/gcc-fortran-4.3-20071123.tar.bz2

It is my understanding that I am supposed to create a separate directory under
gcc-4.3-20071123 for building gcc. I chose the name "g95" out of habit; I was
not building the g95 compiler.


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2007-11-27 15:29 ` michael dot a dot richmond at nasa dot gov
@ 2007-11-27 19:43 ` kargl at gcc dot gnu dot org
  2007-11-27 20:28 ` kargl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-11-27 19:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from kargl at gcc dot gnu dot org  2007-11-27 19:42 -------
Michael,

I found a part of the problem.  First, I grabbed the tarballs
you specified and built gcc/gfortran in a directory as you 
stated.  The reason I did not see a problem previously is
because I always add -static to my options.  A quick check
shows

troutmask:sgk[239] nm libgfortran.a | grep tgamma
                 U tgamma
0000000000000000 T tgammaf
troutmask:sgk[240] nm --dynamic libgfortran.so.3 | grep tgamma
                 U tgamma

Thus, the tgammaf symbol is missing in the shared library.  I have no
idea at the moment why it does not appear in the shared lib.  Of course,
libtools is a complete mystery to me.


-- 

kargl at gcc dot gnu dot org changed:

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


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2007-11-27 19:43 ` kargl at gcc dot gnu dot org
@ 2007-11-27 20:28 ` kargl at gcc dot gnu dot org
  2007-11-27 21:51 ` fxcoudert at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-11-27 20:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from kargl at gcc dot gnu dot org  2007-11-27 20:28 -------
OK, I've found the problem.  tgammaf has not been added to 
gfortran.map.  I suspect that there may be other symbols
missing from gfortran.map.  Unfortunately, I don't know
enough about symbol versioning to determine if tgammaf
needs to be just added or if it needs to be added on an
as needed basis.

This is probably a question for Janne?


-- 

kargl at gcc dot gnu dot org changed:

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


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (20 preceding siblings ...)
  2007-11-27 20:28 ` kargl at gcc dot gnu dot org
@ 2007-11-27 21:51 ` fxcoudert at gcc dot gnu dot org
  2007-11-30  4:14 ` jvdelisle at gcc dot gnu dot org
  2007-11-30  9:27 ` fxcoudert at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-27 21:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from fxcoudert at gcc dot gnu dot org  2007-11-27 21:51 -------
(In reply to comment #20)
> OK, I've found the problem.  tgammaf has not been added to 
> gfortran.map.

Yuck. I should have remembered that :(

> I don't know
> enough about symbol versioning to determine if tgammaf
> needs to be just added or if it needs to be added on an
> as needed basis.

It can be added unconditionnaly. (I asked Jane last time I added a fallback
function.)


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (21 preceding siblings ...)
  2007-11-27 21:51 ` fxcoudert at gcc dot gnu dot org
@ 2007-11-30  4:14 ` jvdelisle at gcc dot gnu dot org
  2007-11-30  9:27 ` fxcoudert at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-11-30  4:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from jvdelisle at gcc dot gnu dot org  2007-11-30 04:14 -------
Subject: Bug 33583

Author: jvdelisle
Date: Fri Nov 30 04:14:01 2007
New Revision: 130531

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130531
Log:
2007-11-29  Steven G. Kargl  <kargls@comcast.net>

        PR libfortran/33583
        * libgfortran/gfortran.map: Add tgammaf, tgamma, lgamma, and lgammaf.
        * gfortran.dg/gamma_5.f90: Remove xfail.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/gfortran.map


-- 


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


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

* [Bug libfortran/33583] FAIL: gfortran.dg/gamma_1.f90
  2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
                   ` (22 preceding siblings ...)
  2007-11-30  4:14 ` jvdelisle at gcc dot gnu dot org
@ 2007-11-30  9:27 ` fxcoudert at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-30  9:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from fxcoudert at gcc dot gnu dot org  2007-11-30 09:27 -------
This time it can probably be marked as fixed. Please reopen it if the problem
persists.


-- 

fxcoudert at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-11-30  9:27 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-28 23:13 [Bug libfortran/33583] New: FAIL: gfortran.dg/gamma_1.f90 danglin at gcc dot gnu dot org
2007-09-29 12:45 ` [Bug libfortran/33583] " rguenth at gcc dot gnu dot org
2007-09-29 16:15 ` dave at hiauly1 dot hia dot nrc dot ca
2007-09-29 16:47 ` dave at hiauly1 dot hia dot nrc dot ca
2007-09-30 22:28 ` fxcoudert at gcc dot gnu dot org
2007-09-30 22:31 ` dave at hiauly1 dot hia dot nrc dot ca
2007-10-24 19:30 ` tkoenig at gcc dot gnu dot org
2007-10-30 10:36 ` fxcoudert at gcc dot gnu dot org
2007-11-16 22:32 ` fxcoudert at gcc dot gnu dot org
2007-11-16 22:46 ` fxcoudert at gcc dot gnu dot org
2007-11-16 22:46 ` fxcoudert at gcc dot gnu dot org
2007-11-26 17:18 ` michael dot a dot richmond at nasa dot gov
2007-11-26 17:42 ` burnus at gcc dot gnu dot org
2007-11-26 17:58 ` fxcoudert at gcc dot gnu dot org
2007-11-26 18:16 ` michael dot a dot richmond at nasa dot gov
2007-11-26 23:11 ` burnus at gcc dot gnu dot org
2007-11-26 23:29 ` kargl at gcc dot gnu dot org
2007-11-27 13:09 ` michael dot a dot richmond at nasa dot gov
2007-11-27 15:00 ` kargl at gcc dot gnu dot org
2007-11-27 15:29 ` michael dot a dot richmond at nasa dot gov
2007-11-27 19:43 ` kargl at gcc dot gnu dot org
2007-11-27 20:28 ` kargl at gcc dot gnu dot org
2007-11-27 21:51 ` fxcoudert at gcc dot gnu dot org
2007-11-30  4:14 ` jvdelisle at gcc dot gnu dot org
2007-11-30  9:27 ` fxcoudert 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).