public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/34136] Add entry point and symbol for linker [not found] <bug-34136-4@http.gcc.gnu.org/bugzilla/> @ 2014-01-13 13:50 ` dominiq at lps dot ens.fr 0 siblings, 0 replies; 5+ messages in thread From: dominiq at lps dot ens.fr @ 2014-01-13 13:50 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34136 Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #21 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > This issue was radr://5613343 and has been fixed for darwin10 and later. Confirmed and it seems that it is also fixed by the latest version of Xcode for darwin9. So I am closing this PR as FIXED leaving pr42568 open (WAITING) for CYGWIN. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/34136] New: [g77 regression] Add entry point and symbol for linker @ 2007-11-17 14:38 burnus at gcc dot gnu dot org 2008-11-01 12:22 ` [Bug fortran/34136] " jvdelisle at gcc dot gnu dot org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: burnus at gcc dot gnu dot org @ 2007-11-17 14:38 UTC (permalink / raw) To: gcc-bugs As reported by Jack Howarth http://gcc.gnu.org/ml/fortran/2007-11/msg00122.html Analysis by Walter Spector: a) http://gcc.gnu.org/ml/fortran/2007-11/msg00131.html Ah - the old "put block data in a library, and use EXTERNAL to make sure it gets linked in" trick. Many compilers have gotten this wrong over the years, because it is kinda on the edge of being required by the Standard (any of them). On my cygwin system, g77 and g95 get it right and gfortran gets it wrong. See below. While F90 modules fixed this problem by obsoleting BLOCK DATA and COMMON, quite a number of older library packages depend on this working. Walter $ cat testsub.f SUBROUTINE TESTSUB EXTERNAL BDTEST COMMON/TEST/WK INTEGER WK PRINT *,'TESTSUB: WK = ',WK, '...it should be 20' RETURN END $ g77 -c testsub.f $ nm testsub.o 00000000 b .bss 00000000 d .data 00000000 r .rdata 00000000 t .text 00000004 d ___g77_cilist_0.1 00000000 d ___g77_forceload_0.0 U _bdtest_ <<<< This references the BLOCK DATA U _do_lio U _e_wsle U _s_wsle 00000010 C _test_ 00000000 T _testsub_ $ gfortran -c testsub.f $ nm testsub.o 00000000 b .bss 00000000 d .data 00000000 r .rdata 00000000 t .text <<<< Missing a reference to _bdtest_ here U __gfortran_st_write U __gfortran_st_write_done U __gfortran_transfer_character U __gfortran_transfer_integer 00000010 C _test_ 00000000 T _testsub_ ***************************************************************++ b) http://gcc.gnu.org/ml/fortran/2007-11/msg00132.html The other half of this issue is on the BLOCK DATA side. There has to be an entry point that the linker can find: $ cat testbd.f BLOCKDATA BDTEST COMMON/TEST/WK INTEGER WK DATA WK/20/ END $ gfortran testbd.f -c $ nm testbd.o 00000000 b .bss 00000000 d .data 00000000 t .text 00000000 B _bdtest_ <<<< gfortran creates a BSS section 00000000 D _test_ $ g77 -c testbd.f $ nm testbd.o 00000000 b .bss 00000000 d .data 00000000 t .text 00000000 T _bdtest_ <<<< g77 creates a TEXT entry (even though no code exists) 00000000 D _test_ $ Again, while there used to be debates about whether the Standard required this to work, many older packages depend on it. -- Summary: [g77 regression] Add entry point and symbol for linker Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34136 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/34136] Add entry point and symbol for linker 2007-11-17 14:38 [Bug fortran/34136] New: [g77 regression] " burnus at gcc dot gnu dot org @ 2008-11-01 12:22 ` jvdelisle at gcc dot gnu dot org 2008-11-01 12:34 ` dominiq at lps dot ens dot fr ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: jvdelisle at gcc dot gnu dot org @ 2008-11-01 12:22 UTC (permalink / raw) To: gcc-bugs ------- Comment #17 from jvdelisle at gcc dot gnu dot org 2008-11-01 12:21 ------- Jack, did this problem go away on Darwin? -- jvdelisle at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |howarth at nitro dot med dot | |uc dot edu Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-11-01 12:21:11 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34136 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/34136] Add entry point and symbol for linker 2007-11-17 14:38 [Bug fortran/34136] New: [g77 regression] " burnus at gcc dot gnu dot org 2008-11-01 12:22 ` [Bug fortran/34136] " jvdelisle at gcc dot gnu dot org @ 2008-11-01 12:34 ` dominiq at lps dot ens dot fr 2010-01-05 18:15 ` dominiq at lps dot ens dot fr 2010-01-05 18:27 ` howarth at nitro dot med dot uc dot edu 3 siblings, 0 replies; 5+ messages in thread From: dominiq at lps dot ens dot fr @ 2008-11-01 12:34 UTC (permalink / raw) To: gcc-bugs ------- Comment #18 from dominiq at lps dot ens dot fr 2008-11-01 12:32 ------- I have run the tests in comment #1 and main.bad main.init still fail on i686-apple-darwin9. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34136 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/34136] Add entry point and symbol for linker 2007-11-17 14:38 [Bug fortran/34136] New: [g77 regression] " burnus at gcc dot gnu dot org 2008-11-01 12:22 ` [Bug fortran/34136] " jvdelisle at gcc dot gnu dot org 2008-11-01 12:34 ` dominiq at lps dot ens dot fr @ 2010-01-05 18:15 ` dominiq at lps dot ens dot fr 2010-01-05 18:27 ` howarth at nitro dot med dot uc dot edu 3 siblings, 0 replies; 5+ messages in thread From: dominiq at lps dot ens dot fr @ 2010-01-05 18:15 UTC (permalink / raw) To: gcc-bugs ------- Comment #19 from dominiq at lps dot ens dot fr 2010-01-05 18:15 ------- pr42568 looks like a duplicate of this one. Note that the issue seems fixed on darwin10. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34136 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/34136] Add entry point and symbol for linker 2007-11-17 14:38 [Bug fortran/34136] New: [g77 regression] " burnus at gcc dot gnu dot org ` (2 preceding siblings ...) 2010-01-05 18:15 ` dominiq at lps dot ens dot fr @ 2010-01-05 18:27 ` howarth at nitro dot med dot uc dot edu 3 siblings, 0 replies; 5+ messages in thread From: howarth at nitro dot med dot uc dot edu @ 2010-01-05 18:27 UTC (permalink / raw) To: gcc-bugs ------- Comment #20 from howarth at nitro dot med dot uc dot edu 2010-01-05 18:27 ------- (In reply to comment #19) > pr42568 looks like a duplicate of this one. > > Note that the issue seems fixed on darwin10. > This issue was radr://5613343 and has been fixed for darwin10 and later. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34136 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-01-13 13:50 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-34136-4@http.gcc.gnu.org/bugzilla/> 2014-01-13 13:50 ` [Bug fortran/34136] Add entry point and symbol for linker dominiq at lps dot ens.fr 2007-11-17 14:38 [Bug fortran/34136] New: [g77 regression] " burnus at gcc dot gnu dot org 2008-11-01 12:22 ` [Bug fortran/34136] " jvdelisle at gcc dot gnu dot org 2008-11-01 12:34 ` dominiq at lps dot ens dot fr 2010-01-05 18:15 ` dominiq at lps dot ens dot fr 2010-01-05 18:27 ` howarth at nitro dot med dot uc dot edu
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).