public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "urbanjost at comcast dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/42568] New: BLOCKDATA referenced in EXTERNAL not loading from library Date: Thu, 31 Dec 2009 23:06:00 -0000 [thread overview] Message-ID: <bug-42568-18131@http.gcc.gnu.org/bugzilla/> (raw) Even though the BLOCKDATA is referenced with an EXTERNAL statement, it is not initializing the COMMON; this worked in previous versions of gfortran, and g95, g77, ifort, and vendor compilers (Cray, HP-UX, IRIX64, SunOS, Solaris, ...) as long as the EXTERNAL statement was present. #!/bin/sh echo trouble loading a blockdata from a library set -x cat >missingBlockData.f <<\EOF program missingBlockData external juinit2 character chars(5)*(20) common /qindex2/chars save /qindex2/ write(*,*)'chars=',chars if(chars(5).ne.'abcdefghijklmnopqrst')then write(*,*)'*missingBlockData* E-R-R-O-R: bad load' else write(*,*)'*missingBlockData* loaded common block' endif end EOF cat >juinit2.f <<\EOF !______________________________________________________________________- blockdata juinit2 character chars(5)*(20) common /qindex2/chars save /qindex2/ data chars/5*'abcdefghijklmnopqrst'/ end !______________________________________________________________________- EOF ( exec 2>&1 set -x : __________________________________________________________ export F90 F90='gfortran -Wall' : "compile with $F90" : __________________________________________________________ : Make libex.a library $F90 -c juinit2.f nm juinit2.o : I thought JUINIT2 would be a T, not a B ?? ar rv libex.a juinit2.o rm juinit2.o : __________________________________________________________ : run loading from library rm -f missingBlockData $F90 missingBlockData.f -L. -lex -o missingBlockData ./missingBlockData : __________________________________________________________ : run not loading from library rm -f missingBlockData $F90 missingBlockData.f juinit2.f -o missingBlockData ./missingBlockData : __________________________________________________________ : version date uname -a $F90 -v missingBlockData.f juinit2.f -o missingBlockData : __________________________________________________________ : cleanup rm -f missingBlockData libex.a juinit2.f missingBlockData.f ) >> $0 exit *************** *************** RESULTS OF RUN: *************** *************** + set -x + : __________________________________________________________ + export F90 + F90=gfortran -Wall + : compile with gfortran -Wall + : __________________________________________________________ + : Make libex.a library + gfortran -Wall -c juinit2.f + nm juinit2.o 00000000 b .bss 00000000 d .data 00000000 t .text 00000000 B _juinit2_ 00000000 D _qindex2_ + : I thought JUINIT2 would be a T, not a B ?? + ar rv libex.a juinit2.o ar: creating libex.a a - juinit2.o + rm juinit2.o + : __________________________________________________________ + : run loading from library + rm -f missingBlockData + gfortran -Wall missingBlockData.f -L. -lex -o missingBlockData + ./missingBlockData chars= missingBlockData* E-R-R-O-R: bad load + : __________________________________________________________ + : run not loading from library + rm -f missingBlockData + gfortran -Wall missingBlockData.f juinit2.f -o missingBlockData + ./missingBlockData chars=abcdefghijklmnopqrstabcdefghijklmnopqrstabcdefghijklmnopqrstabcdefghijklmnopqrstabcdefghijklmnopqrst *missingBlockData* loaded common block + : __________________________________________________________ + : version + date Thu Dec 31 17:39:18 EST 2009 + uname -a CYGWIN_NT-6.0 urbanjs-PC 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin + gfortran -Wall -v missingBlockData.f juinit2.f -o missingBlockData Driving: gfortran -Wall -v missingBlockData.f juinit2.f -o missingBlockData -lgfortran Using built-in specs. COLLECT_GCC=gfortran COLLECT_LTO_WRAPPER=/cygdrive/c/cygwin_install_files/gfortran/bin/../libexec/gcc/i686-pc-cygwin/4.5.0/lto-wrapper.exe Target: i686-pc-cygwin Configured with: ../trunk/configure --prefix=/usr/local/gfortran --enable-languages=c,c++,fortran --disable-bootstrap --enable-threads=posix --enable-sjlj-exceptions --enable-version-specific-runtime-libs --enable-nls --disable-libmudflap --disable-shared --disable-win32-registry --with-system-zlib --enable-checking=release --enable-werror --without-included-gettext --without-x --enable-libgomp Thread model: posix gcc version 4.5.0 20091119 (experimental) [trunk revision 152402] (GCC) COLLECT_GCC_OPTIONS='-Wall' '-v' '-o' 'missingBlockData.exe' '-mtune=generic' /cygdrive/c/cygwin_install_files/gfortran/bin/../libexec/gcc/i686-pc-cygwin/4.5.0/f951.exe missingBlockData.f -ffixed-form -quiet -dumpbase missingBlockData.f -mtune=generic -auxbase missingBlockData -Wall -version -fintrinsic-modules-path /cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.5.0/finclude -o /cygdrive/c/Users/urbanjs/AppData/Local/Temp/ccWoGlsE.s GNU Fortran (GCC) version 4.5.0 20091119 (experimental) [trunk revision 152402] (i686-pc-cygwin) compiled by GNU C version 4.3.4 20090804 (release) 1, GMP version 4.3.1, MPFR version 2.4.1-p5, MPC version 0.8 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU Fortran (GCC) version 4.5.0 20091119 (experimental) [trunk revision 152402] (i686-pc-cygwin) compiled by GNU C version 4.3.4 20090804 (release) 1, GMP version 4.3.1, MPFR version 2.4.1-p5, MPC version 0.8 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 COLLECT_GCC_OPTIONS='-Wall' '-v' '-o' 'missingBlockData.exe' '-mtune=generic' as -o /cygdrive/c/Users/urbanjs/AppData/Local/Temp/cc83xpoo.o /cygdrive/c/Users/urbanjs/AppData/Local/Temp/ccWoGlsE.s COLLECT_GCC_OPTIONS='-Wall' '-v' '-o' 'missingBlockData.exe' '-mtune=generic' /cygdrive/c/cygwin_install_files/gfortran/bin/../libexec/gcc/i686-pc-cygwin/4.5.0/f951.exe juinit2.f -ffixed-form -quiet -dumpbase juinit2.f -mtune=generic -auxbase juinit2 -Wall -version -fintrinsic-modules-path /cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.5.0/finclude -o /cygdrive/c/Users/urbanjs/AppData/Local/Temp/ccWoGlsE.s GNU Fortran (GCC) version 4.5.0 20091119 (experimental) [trunk revision 152402] (i686-pc-cygwin) compiled by GNU C version 4.3.4 20090804 (release) 1, GMP version 4.3.1, MPFR version 2.4.1-p5, MPC version 0.8 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU Fortran (GCC) version 4.5.0 20091119 (experimental) [trunk revision 152402] (i686-pc-cygwin) compiled by GNU C version 4.3.4 20090804 (release) 1, GMP version 4.3.1, MPFR version 2.4.1-p5, MPC version 0.8 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 COLLECT_GCC_OPTIONS='-Wall' '-v' '-o' 'missingBlockData.exe' '-mtune=generic' as -o /cygdrive/c/Users/urbanjs/AppData/Local/Temp/cc06kxQY.o /cygdrive/c/Users/urbanjs/AppData/Local/Temp/ccWoGlsE.s COMPILER_PATH=/cygdrive/c/cygwin_install_files/gfortran/bin/../libexec/gcc/i686-pc-cygwin/4.5.0/:/cygdrive/c/cygwin_install_files/gfortran/bin/../libexec/gcc/ LIBRARY_PATH=/cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.5.0/:/cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/:/cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.5.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-Wall' '-v' '-o' 'missingBlockData.exe' '-mtune=generic' /cygdrive/c/cygwin_install_files/gfortran/bin/../libexec/gcc/i686-pc-cygwin/4.5.0/collect2.exe -Bdynamic --dll-search-prefix=cyg -tsaware -o missingBlockData.exe /lib/crt0.o /cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.5.0/crtbegin.o -L/cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.5.0 -L/cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc -L/cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.5.0/../../.. /cygdrive/c/Users/urbanjs/AppData/Local/Temp/cc83xpoo.o /cygdrive/c/Users/urbanjs/AppData/Local/Temp/cc06kxQY.o -lgfortran -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc /cygdrive/c/cygwin_install_files/gfortran/bin/../lib/gcc/i686-pc-cygwin/4.5.0/crtend.o + : __________________________________________________________ + : cleanup + rm -f missingBlockData libex.a juinit2.f missingBlockData.f -- Summary: BLOCKDATA referenced in EXTERNAL not loading from library Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: urbanjost at comcast dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42568
next reply other threads:[~2009-12-31 23:06 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-12-31 23:06 urbanjost at comcast dot net [this message] 2010-01-01 0:46 ` [Bug fortran/42568] " kargl at gcc dot gnu dot org 2010-01-01 1:57 ` urbanjost at comcast dot net 2010-01-01 2:50 ` kargl at gcc dot gnu dot org 2010-01-01 6:23 ` jvdelisle at gcc dot gnu dot org 2010-01-01 6:36 ` jvdelisle at gcc dot gnu dot org 2010-01-02 7:50 ` urbanjost at comcast dot net 2010-01-04 3:25 ` jvdelisle at gcc dot gnu dot org 2010-01-04 3:40 ` jvdelisle at gcc dot gnu dot org 2010-01-04 3:52 ` jvdelisle at gcc dot gnu dot org 2010-01-04 9:44 ` [Bug fortran/42568] [Cygwin] " burnus at gcc dot gnu dot org 2010-01-04 15:43 ` davek at gcc dot gnu dot org 2010-01-04 16:06 ` dominiq at lps dot ens dot fr 2010-01-04 16:13 ` kargl at gcc dot gnu dot org 2010-01-04 16:36 ` davek at gcc dot gnu dot org 2010-01-04 17:14 ` kargl at gcc dot gnu dot org 2010-01-04 18:05 ` davek at gcc dot gnu dot org 2010-01-04 18:06 ` davek at gcc dot gnu dot org 2010-01-04 18:57 ` kargl at gcc dot gnu dot org 2010-01-05 3:01 ` jvdelisle at gcc dot gnu dot org 2010-01-05 14:46 ` burnus at gcc dot gnu dot org 2010-01-05 16:10 ` ian at airs dot com 2010-01-05 18:13 ` dominiq at lps dot ens dot fr 2010-01-16 23:18 ` kargl at gcc dot gnu dot org 2010-01-16 23:47 ` kargl at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-42568-18131@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).