public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35662] New: [4.3 regression] gfortran interfaces badly with glibc sincosf() causing breakage
@ 2008-03-21 23:57 kmccarty at debian dot org
2008-03-22 13:18 ` [Bug target/35662] [4.3/4.4 " rguenth at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: kmccarty at debian dot org @ 2008-03-21 23:57 UTC (permalink / raw)
To: gcc-bugs
Hi,
On Debian's mips and mipsel ports, gfortran 4.3 at -O1 or higher generates
object code that calls the sincosf() function in glibc's libm. Unfortunately
the function call does not produce the correct result: it returns 0 for the
sine and 1 for the cosine. Since an equivalent C program that uses sincosf()
does yield the right results, I conclude that it is gfortran and not libm where
the bug occurs -- somehow the call to sincosf() in the generated object code is
wrong. (Not being too knowledgeable on either MIPS or assembly, I
unfortunately can't tell you why. An erroneous assumption about the byte size
of the sine and cosine values returned by sincosf(), perhaps?)
This is a regression from gfortran 4.2.3, but the reason is apparently that
previous gfortran versions do not generate calls to sincosf().
Version information:
(sid)kmccarty@larsa:~$ gfortran-4.3 -v
Using built-in specs.
Target: mips-linux-gnu
Configured with: ../src/configure linux gnu
Thread model: posix
gcc version 4.3.1 20080309 (prerelease) (Debian 4.3.0-1)
Test case is at
http://people.debian.org/~kmccarty/gfortran-sincos-err-mips.tar.gz
The FORTRAN code is "sincos.F", and equivalent C code (I translated the FORTRAN
to C by hand) that explicitly uses sincosf() is "sincos.c".
The bad object code is located in subdirectories obj-fail/-O1 and obj-fail/-O2
of the tarball. Correct object code generated at -O0 is in obj-success/-O0,
but may not be that useful for comparison, as the generated assembly with no
optimization calls the sinf() and cosf() functions individually. Output of the
FORTRAN and C programs are in "output.txt" and "coutput.txt", respectively, in
each subdirectory.
You can quickly regenerate these files with "make output".
best regards,
Kevin McCarty
--
Summary: [4.3 regression] gfortran interfaces badly with glibc
sincosf() causing breakage
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kmccarty at debian dot org
GCC build triplet: mips-linux-gnu
GCC host triplet: mips-linux-gnu
GCC target triplet: mips-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35662
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/35662] [4.3/4.4 regression] gfortran interfaces badly with glibc sincosf() causing breakage
2008-03-21 23:57 [Bug fortran/35662] New: [4.3 regression] gfortran interfaces badly with glibc sincosf() causing breakage kmccarty at debian dot org
@ 2008-03-22 13:18 ` rguenth at gcc dot gnu dot org
2008-04-15 11:20 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-22 13:18 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|fortran |target
Keywords| |wrong-code
Summary|[4.3 regression] gfortran |[4.3/4.4 regression]
|interfaces badly with glibc |gfortran interfaces badly
|sincosf() causing breakage |with glibc sincosf() causing
| |breakage
Target Milestone|--- |4.3.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35662
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/35662] [4.3/4.4 regression] gfortran interfaces badly with glibc sincosf() causing breakage
2008-03-21 23:57 [Bug fortran/35662] New: [4.3 regression] gfortran interfaces badly with glibc sincosf() causing breakage kmccarty at debian dot org
2008-03-22 13:18 ` [Bug target/35662] [4.3/4.4 " rguenth at gcc dot gnu dot org
@ 2008-04-15 11:20 ` jakub at gcc dot gnu dot org
2008-04-15 11:21 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-15 11:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2008-04-15 11:20 -------
This is a fortran FE bug.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Priority|P3 |P2
Last reconfirmed|0000-00-00 00:00:00 |2008-04-15 11:20:07
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35662
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/35662] [4.3/4.4 regression] gfortran interfaces badly with glibc sincosf() causing breakage
2008-03-21 23:57 [Bug fortran/35662] New: [4.3 regression] gfortran interfaces badly with glibc sincosf() causing breakage kmccarty at debian dot org
2008-03-22 13:18 ` [Bug target/35662] [4.3/4.4 " rguenth at gcc dot gnu dot org
2008-04-15 11:20 ` jakub at gcc dot gnu dot org
@ 2008-04-15 11:21 ` jakub at gcc dot gnu dot org
2008-04-16 15:58 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-15 11:21 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35662
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/35662] [4.3/4.4 regression] gfortran interfaces badly with glibc sincosf() causing breakage
2008-03-21 23:57 [Bug fortran/35662] New: [4.3 regression] gfortran interfaces badly with glibc sincosf() causing breakage kmccarty at debian dot org
` (2 preceding siblings ...)
2008-04-15 11:21 ` jakub at gcc dot gnu dot org
@ 2008-04-16 15:58 ` jakub at gcc dot gnu dot org
2008-04-16 16:07 ` jakub at gcc dot gnu dot org
2008-04-16 16:11 ` jakub at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-16 15:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2008-04-16 15:57 -------
Subject: Bug 35662
Author: jakub
Date: Wed Apr 16 15:56:58 2008
New Revision: 134349
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134349
Log:
PR target/35662
* f95-lang.c (gfc_init_builtin_functions): Make sure
BUILT_IN_SINCOS{,F,L} types aren't varargs.
* gfortran.dg/pr35662.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/pr35662.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/f95-lang.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35662
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/35662] [4.3/4.4 regression] gfortran interfaces badly with glibc sincosf() causing breakage
2008-03-21 23:57 [Bug fortran/35662] New: [4.3 regression] gfortran interfaces badly with glibc sincosf() causing breakage kmccarty at debian dot org
` (3 preceding siblings ...)
2008-04-16 15:58 ` jakub at gcc dot gnu dot org
@ 2008-04-16 16:07 ` jakub at gcc dot gnu dot org
2008-04-16 16:11 ` jakub at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-16 16:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2008-04-16 16:06 -------
Subject: Bug 35662
Author: jakub
Date: Wed Apr 16 16:05:51 2008
New Revision: 134352
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134352
Log:
PR target/35662
* f95-lang.c (gfc_init_builtin_functions): Make sure
BUILT_IN_SINCOS{,F,L} types aren't varargs.
* gfortran.dg/pr35662.f90: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gfortran.dg/pr35662.f90
Modified:
branches/gcc-4_3-branch/gcc/fortran/ChangeLog
branches/gcc-4_3-branch/gcc/fortran/f95-lang.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35662
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/35662] [4.3/4.4 regression] gfortran interfaces badly with glibc sincosf() causing breakage
2008-03-21 23:57 [Bug fortran/35662] New: [4.3 regression] gfortran interfaces badly with glibc sincosf() causing breakage kmccarty at debian dot org
` (4 preceding siblings ...)
2008-04-16 16:07 ` jakub at gcc dot gnu dot org
@ 2008-04-16 16:11 ` jakub at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-04-16 16:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2008-04-16 16:11 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35662
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-04-16 16:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-21 23:57 [Bug fortran/35662] New: [4.3 regression] gfortran interfaces badly with glibc sincosf() causing breakage kmccarty at debian dot org
2008-03-22 13:18 ` [Bug target/35662] [4.3/4.4 " rguenth at gcc dot gnu dot org
2008-04-15 11:20 ` jakub at gcc dot gnu dot org
2008-04-15 11:21 ` jakub at gcc dot gnu dot org
2008-04-16 15:58 ` jakub at gcc dot gnu dot org
2008-04-16 16:07 ` jakub at gcc dot gnu dot org
2008-04-16 16:11 ` jakub 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).