Bug 197650

Summary: gfortran: internal compiler error
Product: [Fedora] Fedora Reporter: Stefan Roglev <strog>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-17 14:32:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
log file
none
source file
none
new log file none

Description Stefan Roglev 2006-07-05 10:07:28 UTC
Created attachment 131916 [details]
log file

Comment 1 Stefan Roglev 2006-07-05 10:07:28 UTC
Description of problem:
gfortran: internal compiler error

Version-Release number of selected component (if applicable):
]$ gfortran -v
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 --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.0 20060304 (Red Hat 4.1.0-3)


How reproducible:
Attempt to compile wrfsi, part of the Weather Research & Forecasting Model (WRF). 

Steps to Reproduce:
1.cd $SOURCE_ROOT
2.perl install_wrfsi.pl --fc=g95
3.
  
Actual results:
....................
module_diagnostic_vars.F: In function âcompute_virtual_tempâ:
module_diagnostic_vars.F:130: internal compiler error: in emit_move_insn, at
expr.c:3158
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
make[1]: *** [module_diagnostic_vars.o] Error 1

Expected results:


Additional info:
I append module_diagnostic_vars.F to attached log file.

Comment 2 Jakub Jelinek 2006-07-05 13:10:23 UTC
4.1.0-3 is not the current FC5 gcc.
Please try again with gcc-4.1.1-1.fc5.

Comment 3 Stefan Roglev 2006-07-05 13:40:24 UTC
Created attachment 131921 [details]
source file

Comment 4 Stefan Roglev 2006-07-05 13:58:52 UTC
My Package Manager say:
gcc-4.1.0-3.x86_64 and
gcc-gfortran-4.1.0-3.x86_64 are the last available.

Comment 5 Jakub Jelinek 2006-07-05 14:28:05 UTC
Then you don't have fc5 updates repository enabled.

Comment 6 Stefan Roglev 2006-07-05 15:11:55 UTC
In Package Manager have not repositories.
When I try
]# yum install gcc-gfortran
==>Transaction Check Error:   file /usr/share/man/man1/fastjar.1.gz from install
of  libgcj-4.1.1-1.fc5 conflicts with file from package libgcj-4.1.0-3
...
]# yum remove libgcj
==>Remove      93 Package(s)
Is this ok [y/N]: this is NOT ok

Comment 7 Jakub Jelinek 2006-07-06 12:16:57 UTC
You of course need to do
yum upgrade
or
yum upgrade gcc* libgcj* libgomp* libmudflap* libstdc* libobjc* libgnat* \
  libgcc*  libgfortran* cpp*
(as all gcc subpackages have to be updated together).


Comment 8 Stefan Roglev 2006-07-07 12:17:49 UTC
Created attachment 132047 [details]
new log file

Comment 9 Stefan Roglev 2006-07-07 12:22:43 UTC
Thanks, I successfully upgrade gcc!
]$ gcc -v
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 --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.1 20060525 (Red Hat 4.1.1-1)

But, the same result.

Comment 10 Jakub Jelinek 2006-07-17 14:32:50 UTC
I missed the -ff2c on your command line.  Don't use it.
You haven't included physical_constants.f90 or physical_constants.mod,
so I can't verify myself, but it is quite clear this is the well known
upstream PR25392.

Comment 11 Stefan Roglev 2006-07-18 13:01:43 UTC
Sorry, but I don't understand what "well known upstream PR25392" means.
The following thing happens without -ff2c
........................
gfortran -I../../src/include -I/usr/include/netcdf-3 -I../../src/mod
-I../../src/io_netcdf -O2 -Di686 -DDEC -DBIT32 -DF90 -DFORTRANUNDERSCORE
-DUSE_TRIGD -fno-second-underscore -ffree-form        -c proc_output_variable.F
-o proc_output_variable.o
rm -f  proc_store_global_metadata.o
gfortran -I../../src/include -I/usr/include/netcdf-3 -I../../src/mod
-I../../src/io_netcdf -O2 -Di686 -DDEC -DBIT32 -DF90 -DFORTRANUNDERSCORE
-DUSE_TRIGD -fno-second-underscore -ffree-form        -c
proc_store_global_metadata.F -o proc_store_global_metadata.o
gfortran -o hinterp.exe -I../../src/include -I/usr/include/netcdf-3
-I../../src/mod -I../../src/io_netcdf -O2 -Di686 -DDEC -DBIT32 -DF90
-DFORTRANUNDERSCORE -DUSE_TRIGD -fno-second-underscore -L/usr/lib64 -lgfortran
hinterp.o module_domain_info.o module_gridded_data.o module_hinterp_setup.o
module_hinterp_gribprep.o proc_make_variable_metadata.o proc_output_variable.o
proc_store_global_metadata.o wrf_debug.o -L../../src/mod -lwrfmodules
-L../../src/io_netcdf -lwrfio_nf -L/usr/lib64/netcdf-3 -lnetcdf   \
	-L../../src/lib -llaps
../../src/lib/liblaps.a(static_routines.o): In function
`cdf_update_stat_':static_routines.c:(.text+0x35): undefined reference to `ncopts'
:static_routines.c:(.text+0x111): undefined reference to `ncvarid'
:static_routines.c:(.text+0x149): undefined reference to `ncvarput'
:static_routines.c:(.text+0x181): undefined reference to `ncvarput'
../../src/lib/liblaps.a(static_routines.o): In function
`cdf_wrt_hdr_stat_':static_routines.c:(.text+0x276): undefined reference to
`ncvarid'
......................
When I do 
 cd /usr/lib64/netcdf-3
[stefan@tesla netcdf-3]$ nm -s libnetcdf.a >~/netcdf.out
in file netcdf.out I have 'ncopts', 'ncvarid' and so on.

These variables are, for some reason, invisible during linking, that is why I
added -ff2c. This is perhaps an illegal operation, but nowhere in the manpage it
was stated that I don't have the right to do it.