[Bug fortran/41627] mixing common and modules elicits seg fault
--- Comment #7 from dh458 at oakapple dot net 2009-10-08 13:23 --- Subject: Re: mixing common and modules elicits seg fault > The use of common in the context of this PR badly hurts my understanding of commons: storage arrays computed at compile time. For better or worse, the Sun Studio 12 Update 1 compiler compiles the reduced test case without comment and executes it without complaint. Whether this particular code would ever actually be good for anything is another matter. While hacking blindly I got gfortran to core dump on it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41627
[Bug fortran/41627] mixing common and modules elicits seg fault
--- Comment #4 from dh458 at oakapple dot net 2009-10-08 00:19 --- Subject: Re: mixing common and modules elicits seg fault > Note that if I comment the line " common/arrays/Ro" I get the following link error: Undefined symbols: "_span.0", referenced from: _span.0$non_lazy_ptr in ccut3FpU.o That's another bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40737 with a patch in the comments. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41627
[Bug fortran/41627] mixing common and modules elicits seg fault
--- Comment #1 from dh458 at oakapple dot net 2009-10-07 22:54 --- Created an attachment (id=18747) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18747&action=view) example file tor segmentation violation with gfortran 4.4.1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41627
[Bug fortran/41627] New: mixing common and modules elicits seg fault
Using a (patched) 4.4.1 gofortran on linux/x86, try to compile the attached tcommon.f90 I get gfortran /tmp/tcommon.f90 /tmp/tcommon.f90: In function 'tf_ad_splitting_driver_plane': /tmp/tcommon.f90:109: internal compiler error: Segmentation fault This was incidentally uncovered while trying to work around bug 40737. Mixing common and modules is not good practice, but it shouldn't core dump. -- Summary: mixing common and modules elicits seg fault Product: gcc Version: 4.4.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dh458 at oakapple dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41627
[Bug fortran/40737] Pointer references sometimes fail to define "span" symbols
--- Comment #11 from dh458 at oakapple dot net 2009-10-07 22:42 --- (In reply to comment #10) > > Here is a patch from Adhemerval Zanella from our IBM LTC Performance team, > > that "fixes" the problem for me and bootstraps (powerpc64-linux) and > > regtests with no regressions. Can someone else give this a try on their > > system? I can compile now the original source SPECmpi 129.tera_tf but I still don't execute correctly.The variables Ro and Ets get undefined somehow. Has anybody used any version of gfortran successfully to compile and correctly execute all of SPECmpi ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40737
[Bug target/40832] gfortran 4.4.0 generates invalid .s file on solaris-x86 using -march=k8 for 130.socorro
--- Comment #4 from dh458 at oakapple dot net 2009-07-23 06:23 --- (In reply to comment #3) > What happens if you drop the -march=k8 option? Works fine. > What happens if you use the -march=native option? Fails on k8 system - this is how I found the bug originally. > What happens if you use gas instead of Sun's assembler? $HOME/gnu-x86/local/bin/gfortran -c site.f90 -march=k8 -m32 -S gas --32 site.s site.s:652: Error: invalid character '.' in mnemonic cmovl.ns%eax, %ebx $HOME/gnu-x86/local/bin/gfortran -c site.f90 -march=k8 -m64 -O1 -S gas --64 site.s site.s:136: Error: invalid character '.' in mnemonic cmovq.e %rax, %r13 Solaris s10u7 gas version is GNU assembler version 2.15 (i386-pc-solaris2.10) using BFD version 2.15 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40832
[Bug fortran/40832] gfortran 4.4.0 generates invalid .s file on solaris-x86 using -march=k8 for 130.socorro
--- Comment #2 from dh458 at oakapple dot net 2009-07-23 00:06 --- gfortran --verbose: /home/dgh/gnu-x86/local/bin/gfortran -c site.f90 -march=k8 --verbose Using built-in specs. Target: i386-pc-solaris2.10 Configured with: ../gcc-4.4.0/configure --prefix=//net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-x86/local --with-local-prefix=//net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-x86/local/include --enable-languages=c++,fortran --with-gmp=//net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-x86/local --with-mpfr=//net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-x86/local Thread model: posix gcc version 4.4.0 (GCC) COLLECT_GCC_OPTIONS='-c' '-march=k8' '-v' /home/dgh/gnu-x86/local/bin/../libexec/gcc/i386-pc-solaris2.10/4.4.0/f951 site.f90 -quiet -dumpbase site.f90 -march=k8 -auxbase site -version -fintrinsic-modules-path /home/dgh/gnu-x86/local/bin/../lib/gcc/i386-pc-solaris2.10/4.4.0/finclude -o /tmp/dgh/ccaFX7lN.s GNU Fortran (GCC) version 4.4.0 (i386-pc-solaris2.10) compiled by GNU C version 4.4.0, GMP version 4.3.1, MPFR version 2.4.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 COLLECT_GCC_OPTIONS='-c' '-march=k8' '-v' /usr/ccs/bin/as -V -Qy -s -o site.o /tmp/dgh/ccaFX7lN.s as: Sun Compiler Common 10 Patch 06/05/2008 Assembler: site.f90 "/tmp/dgh/ccaFX7lN.s", line 738 : Illegal mnemonic Near line: ".word 0xc0df" "/tmp/dgh/ccaFX7lN.s", line 738 : Syntax error Near line: ".word 0xc0df" -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40832
[Bug fortran/40832] gfortran 4.4.0 generates invalid .s file on solaris-x86 using -march=k8 for 130.socorro
--- Comment #1 from dh458 at oakapple dot net 2009-07-23 00:04 --- Created an attachment (id=18240) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18240&action=view) site.f90 test case for bug 40832 condensed from SPECmpi 130.socorro -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40832
[Bug fortran/40832] New: gfortran 4.4.0 generates invalid .s file on solaris-x86 using -march=k8 for 130.socorro
The attached file site.f90 miscompiles on solaris-x86 with gfortran 4.4.0: gfortran -c site.f90 -march=k8 Assembler: site.f90 "/tmp/dgh/cc7kDaaz.s", line 738 : Illegal mnemonic Near line: ".word 0xc0df" "/tmp/dgh/cc7kDaaz.s", line 738 : Syntax error Near line: ".word 0xc0df" linux-x86 seems to be OK.Haven't tried 4.4.1 yet. site.f90 is a drastically reduced test case from SPECmpi 130.socorro -- Summary: gfortran 4.4.0 generates invalid .s file on solaris-x86 using -march=k8 for 130.socorro Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dh458 at oakapple dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40832
[Bug fortran/40737] Pointer references sometimes fail to define "span" symbols
--- Comment #4 from dh458 at oakapple dot net 2009-07-21 15:19 --- (In reply to comment #0) In the original SPECmpi source code, I was able to make the compile-time bug go away with this source workaround: change e.g. Ro => Hydro_vars( first_cell:last_cell, j, k)%cell_var( ro_var) to tRo => Hydro_vars( first_cell:last_cell, j, k)%cell_var( ro_var) call copy_pointer(Ro, tRo) with earlier declarations for tRo and copy_pointer < subroutine copy_pointer(p, q) < < use TF_NUMBER_KIND < < implicit none < real(r8), pointer, dimension( :) :: p, q < < p => q < return < < end subroutine <use TF_NUMBER_KIND < <implicit none < <real(r8), pointer, dimension( :),save ::tRo However execution was unsuccessful, though not necessarily due to a problem in this part of the code. Compilation and execution of this modified code were successful on the same linux system using Sun Studio 12u1, but not using gfortran 4.4.0 on a sparc solaris system... so the root cause of failure is unknown. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40737
[Bug c/40792] internal error in com_mpi.c at -O3 for gcc 4.4.0
--- Comment #1 from dh458 at oakapple dot net 2009-07-17 21:11 --- Created an attachment (id=18215) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18215&action=view) preprocessed source file com_mpi.c to display bug -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40792
[Bug c/40792] New: internal error in com_mpi.c at -O3 for gcc 4.4.0
Use attached preprocessed file com_mpi.c, which is extracted from SPEC mpi 2007. Then with gcc 4.4.0: gcc -c com_mpi.c -O3 com_mpi.c:1215: warning: conflicting types for built-in function âcexpâ com_mpi.c:1216: warning: conflicting types for built-in function âclogâ com_mpi.c:1217: warning: conflicting types for built-in function âcsqrtâ com_mpi.c:4906: internal compiler error: in build_function_type_skip_args, at tree.c:5954 Please submit a full bug report, with preprocessed source if appropriate. -O2 is fine. gcc 4.1.2 -O3 is fine. Verbose: Target: x86_64-unknown-linux-gnu Configured with: /net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/gcc-4.4.0/configure --prefix=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local --exec-prefix=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local --enable-languages=c++,fortran --with-gmp-include=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/include --with-mpfr-include=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/include --with-gmp-lib=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/lib64 --with-mpfr-lib=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/lib64 Thread model: posix gcc version 4.4.0 (GCC) COLLECT_GCC_OPTIONS='-c' '-O3' '-v' '-mtune=generic' /home/dgh/gnu-linux/local/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/cc1 -quiet -v -iprefix /home/dgh/gnu-linux/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/ com_mpi.c -quiet -dumpbase com_mpi.c -mtune=generic -auxbase com_mpi -O3 -version -o /tmp/ccYOwHWM.s ignoring nonexistent directory "/home/dgh/gnu-linux/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../x86_64-unknown-linux-gnu/include" ignoring duplicate directory "/home/dgh/gnu-linux/local/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include" ignoring duplicate directory "/home/dgh/gnu-linux/local/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include-fixed" ignoring nonexistent directory "/home/dgh/gnu-linux/local/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/dgh/gnu-linux/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include /home/dgh/gnu-linux/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.4.0/include-fixed /usr/local/include /home/dgh/gnu-linux/local/bin/../lib/gcc/../../include /usr/include End of search list. GNU C (GCC) version 4.4.0 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.0, GMP version 4.3.1, MPFR version 2.4.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 3d0e0887103ac420bddd7fc530a7193e com_mpi.c:1215: warning: conflicting types for built-in function âcexpâ com_mpi.c:1216: warning: conflicting types for built-in function âclogâ com_mpi.c:1217: warning: conflicting types for built-in function âcsqrtâ com_mpi.c:4906: internal compiler error: in build_function_type_skip_args, at tree.c:5954 Please submit a full bug report, with preprocessed source if appropriate. gcc 4.1.2 --verbose: Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix gcc version 4.1.2 20071124 (Red Hat 4.1.2-42) -- Summary: internal error in com_mpi.c at -O3 for gcc 4.4.0 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dh458 at oakapple dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40792
[Bug fortran/40773] gfortran 4.4.0 -O3 exhausts memory in 127.wrf2
--- Comment #4 from dh458 at oakapple dot net 2009-07-16 18:24 --- Compiles OK at -O2, but more slowly than with 4.1.2: 4.1.2 4.4.0 -O2: real1m19.827s real2m58.945s -O3: real1m30.645s real 10m5.166s Even if -O3 ultimately generates correct code in some suitably large configuration, it may be that some optimizer algorithms could stand tuning to avoid time-consuming but ultimately unprofitable blind alleys. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40773
[Bug fortran/40773] gfortran 4.4.0 -O3 exhausts memory in 127.wrf2
--- Comment #2 from dh458 at oakapple dot net 2009-07-16 16:17 --- Created an attachment (id=18208) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18208&action=view) failing source file that uses modules in bigmod.f90 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40773
[Bug fortran/40773] gfortran 4.4.0 -O3 exhausts memory in 127.wrf2
--- Comment #1 from dh458 at oakapple dot net 2009-07-16 16:16 --- Created an attachment (id=18207) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18207&action=view) modules definition file, bzip2'd cat bigmod.f90.bz2 | bunzip2 > bigmod.f90 compressed to avoid bugzilla size limitations -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40773
[Bug fortran/40773] New: gfortran 4.4.0 -O3 exhausts memory in 127.wrf2
On linux x86, with -m32 or -m64, gfortran 4.4.0 exhausts over 2GB of swap space compiling the attached source file at -O3.In contrast 4.1.2 compiles unexceptionally. This might be expected behavior of 4.4.0 due to some new laborious optimization, which would terminate eventually with enough RAM/swap, or it might just be spinning its wheels pointlessly. To reproduce from attached files, substantially condensed from SPEC MPI 2007 127.wrf2: /bin/rm -f *.o *.mod gfortran -c bigmod.f90 gfortran -c shift_domain_em.f90 -O3 f951: out of memory allocating 239668920 bytes after a total of 3520262144 bytes Compile times: 4.1.2 4.4.0 -O2: real1m19.827s real2m58.945s user1m14.541s user2m44.450s sys 0m1.668ssys 0m3.140s -O3: real1m30.645s real 10m5.166s user1m25.613s user 8m39.388s sys 0m1.492ssys 0m7.632s Verbose expansion of failing compile: /net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/bin/gfortran --verbose -c shift_domain_em.f90 -O3 Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: /net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/gcc-4.4.0/configure --prefix=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local --exec-prefix=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local --enable-languages=c++,fortran --with-gmp-include=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/include --with-mpfr-include=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/include --with-gmp-lib=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/lib64 --with-mpfr-lib=/net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/lib64 Thread model: posix gcc version 4.4.0 (GCC) COLLECT_GCC_OPTIONS='-v' '-c' '-O3' '-mtune=generic' /net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/f951 shift_domain_em.f90 -quiet -dumpbase shift_domain_em.f90 -mtune=generic -auxbase shift_domain_em -O3 -version -fintrinsic-modules-path /net/hs-usca-01.sfbay/export/home1/12/dgh/gnu-linux/local/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude -o /tmp/ccBfbVaD.s GNU Fortran (GCC) version 4.4.0 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.0, GMP version 4.3.1, MPFR version 2.4.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 f951: out of memory allocating 239668920 bytes after a total of 3520262144 bytes Verbose expansion of correspond successful compile: /usr/bin/gfortran --verbose -c shift_domain_em.f90 -O3 Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux Thread model: posix gcc version 4.1.2 20070626 (Red Hat 4.1.2-14) /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/f951 shift_domain_em.f90 -quiet -dumpbase shift_domain_em.f90 -mtune=generic -auxbase shift_domain_em -O3 -version -I /usr/lib/gcc/x86_64-redhat-linux/4.1.2/finclude -o /tmp/cc0MGeZy.s GNU F95 version 4.1.2 20070626 (Red Hat 4.1.2-14) (x86_64-redhat-linux) compiled by GNU C version 4.1.2 20070626 (Red Hat 4.1.2-14). GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 as -V -Qy -o shift_domain_em.o /tmp/cc0MGeZy.s GNU assembler version 2.17.50.0.6-5.el5 (x86_64-redhat-linux) using BFD version 2.17.50.0.6-5.el5 20061020 -- Summary: gfortran 4.4.0 -O3 exhausts memory in 127.wrf2 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dh458 at oakapple dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40773
[Bug fortran/40737] Pointer references sometimes fail to define "span" symbols
--- Comment #2 from dh458 at oakapple dot net 2009-07-13 21:40 --- Created an attachment (id=18190) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18190&action=view) module use file for bug report Compile this module use with the other attachment module definition -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40737
[Bug fortran/40737] Pointer references sometimes fail to define "span" symbols
--- Comment #1 from dh458 at oakapple dot net 2009-07-13 21:39 --- Created an attachment (id=18189) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18189&action=view) module definition This is the module definition file for the bug report. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40737
[Bug fortran/40737] New: Pointer references sometimes fail to define "span" symbols
This bug appears in gfortran 4.4.0 on sparc-solaris, x86-solaris, and x86-linux. The attached test case is extracted from SPECmpi 2007 129.tera_tf The two test files testmod.F90 and testuse.F90 define and use pointer types. With -DBIGMOD certain variables are defined in the module; with -UBIGMOD, in the user. Correct results are obtained with the latter; the code generated for the lines Ro => Hydro_vars( first_cell:last_cell, j, k)%cell_var( ro_var) Ets => Hydro_vars( first_cell:last_cell, j, k)%cell_var( ets_var) Um => Hydro_vars( first_cell:last_cell, j, k)%cell_var( u_var) Um_p1 => Hydro_vars( first_cell:last_cell, j, k)%cell_var( up1_var) Um_p2 => Hydro_vars( first_cell:last_cell, j, k)%cell_var( up2_var) both uses and defines various symbols like testuse.s: sethi %h44(span.1.696), %g1 testuse.s: or %g1, %m44(span.1.696), %g1 testuse.s: or %g1, %l44(span.1.696), %g1 testuse.s: .local span.1.696 testuse.s: .common span.1.696,8,8 but with -UBIGMOD, the symbols are referred to but nowhere defined. Compile e.g. gfortran -S testmod.F90 testuse.F90 -UBIGMOD -m64 or gfortran -S testmod.F90 testuse.F90 -DBIGMOD -m64 Same results for -m32 -- Summary: Pointer references sometimes fail to define "span" symbols Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dh458 at oakapple dot net GCC host triplet: sparc-sun-solaris2.10 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40737