RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1356346 - cannot compile RADS programs
Summary: cannot compile RADS programs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc
Version: 6.8
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: Michael Petlan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-14 01:02 UTC by akhjpl
Modified: 2017-03-21 11:05 UTC (History)
4 users (show)

Fixed In Version: gcc-4.4.7-18.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-21 11:05:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
tar file with the RADS software and makefile to compile programs (1.38 MB, application/x-gzip)
2016-07-14 01:02 UTC, akhjpl
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 43362 0 None None None 2016-10-03 16:38:13 UTC
Red Hat Product Errata RHBA-2017:0708 0 normal SHIPPED_LIVE gcc bug fix update 2017-03-21 12:40:40 UTC

Description akhjpl 2016-07-14 01:02:07 UTC
Created attachment 1179545 [details]
tar file with the RADS software and makefile to compile programs

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. ./configure  --with-netcdf-inc=/usr/lib64/gfortran/modules --with-netcdf-lib=/usr/lib64
2. make all
3.

Actual results:
make  -C src all
make[1]: Entering directory `/u/caret2/akhayash/rads/rads-4.2.2/src'
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_time.o rads_time.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_misc.o rads_misc.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_grid.o rads_grid.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_geo.o rads_geo.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_math.o rads_math.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_netcdf.o rads_netcdf.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o xmlparse.o xmlparse.f90
printf "character(len=rads_naml), parameter :: radsdataroot = '%s'\n" /home/akhayash/rads/rads-4.2.2/share > config.f90
printf "logical, parameter :: little_endian = .%s.\n" true >> config.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads.o rads.f90
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[1]: *** [rads.o] Error 1
make[1]: Leaving directory `/u/caret2/akhayash/rads/rads-4.2.2/src'
make: *** [src] Error 2


Expected results:
Makefile:28: config.mk: No such file or directory
Running ... ./configure --with-netcdf-inc=/usr/lib64/gfortran/modules --with-netcdf-lib=/usr/lib64
configure: RADS, version 4.2.1
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
configure: checking user options
checking whether debugging is desired... no
checking whether developer tools are desired... no
checking whether this is a git repository... no
checking for nf-config... no
checking for Fortran 90 compiler... 
configure: finding Fortran 90 compiler
checking for xlf90... no
checking for fort... no
checking for xlf95... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... gfortran
checking whether the Fortran compiler works... yes
checking for Fortran compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU Fortran compiler... yes
checking whether gfortran accepts -g... (cached) no
configure: setting up Fortran 90
checking for Fortran flag to compile .f90 files... none
checking for Fortran flag needed to accept free-form source... none
checking for Fortran flag needed to accept 132 column source lines... none
checking Fortran 90 module inclusion flag... -I
checking how to get verbose linking output from gfortran... -v
checking for Fortran libraries of gfortran...  -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../.. -lgfortranbegin -lgfortran -lm
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... (cached) no
checking for gcc option to accept ISO C89... none needed
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
checking if gfortran can handle Fortran 90... yes
checking for additional compiler flags (for developers)... 
checking for netCDF includes... -I/usr/lib64/gfortran/modules
checking for netCDF libraries... find: `/usr/lib64/audit': Permission denied
-L/usr/lib64 -lnetcdff -lnetcdf
checking if gfortran can compile a netCDF program... yes
Succeeded to compile Fortran 90 code with NetCDF version 4.1.1 of Jan 30 2014 05:31:22 $                                                 
checking for lapack options (for developers)... 
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
configure: finding other utilities
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating config.mk
config.status: creating src/rads-config
config.status: creating doc/manuals/rads_config.tex
make  -C src all
make[1]: Entering directory `/u/caret2/akhayash/rads/rads-4.2.1/src'
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_netcdf.o rads_netcdf.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_time.o rads_time.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_misc.o rads_misc.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_grid.o rads_grid.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_geo.o rads_geo.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads_math.o rads_math.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o xmlparse.o xmlparse.f90
printf "character(len=rads_naml), parameter :: radsdataroot = '%s'\n" /home/akhayash/rads/rads-4.2.1/share > config.f90
printf "logical, parameter :: little_endian = .%s.\n" true >> config.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads.o rads.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o rads3.o rads3.f90
ar rv librads.a rads_netcdf.o rads_time.o rads_misc.o rads_grid.o rads_geo.o rads_math.o xmlparse.o rads.o rads3.o 
ar: creating librads.a
a - rads_netcdf.o
a - rads_time.o
a - rads_misc.o
a - rads_grid.o
a - rads_geo.o
a - rads_math.o
a - xmlparse.o
a - rads.o
a - rads3.o
ranlib librads.a
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   rads2asc.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o rads2asc
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   rads2adr.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o rads2adr
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   rads2nc.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o rads2nc
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   rads2grd.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o rads2grd
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   radsstat.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o radsstat
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   radscolin.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o radscolin
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules  -c -o spline.o spline.f90
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   radsxogen.f90 librads.a spline.o  -L/usr/lib64 -lnetcdff -lnetcdf -o radsxogen
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   radsxoconv.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o radsxoconv
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   radsxolist.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o radsxolist
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   rads_test.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o rads_test
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   radsreconfig.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o radsreconfig
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   rads_sample.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o rads_sample
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   rads3test.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o rads3test
gfortran -O2 -I../src/include -I../src -I/usr/lib64/gfortran/modules   radsvar.f90 librads.a  -L/usr/lib64 -lnetcdff -lnetcdf -o radsvar
make[1]: Leaving directory `/u/caret2/akhayash/rads/rads-4.2.1/src'
make  -C conf all
make[1]: Entering directory `/u/caret2/akhayash/rads/rads-4.2.1/conf'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/u/caret2/akhayash/rads/rads-4.2.1/conf'


Additional info:
Expected results were from the earlier version 4.2.1 of the RADS software

Comment 2 Jakub Jelinek 2016-10-03 16:38:14 UTC
It seems like the RADS developer ignored their own comment:
pure subroutine rads_init_sat_struct (S)
type(rads_sat), intent(inout) :: S
!
! PURPOSE
! This routine initializes the <S> struct with the bare minimum.
! It is later updated in rads_init_sat_0d.
!
! ARGUMENTS
! S        : Satellite/mission dependent structure
!****-------------------------------------------------------------------
! gfortran 4.4.1 segfaults on the next line if this routine is made pure or elemental,
! so please leave it as a normal routine.
S = rads_sat ('', '', '', '', '', null(), '', 1d0, (/13.8d0, nan/), 90d0, nan, nan, nan, 1, 1, rads_noerr, &
        0, 0, 0, 0, 0, .false., '', 0, null(), null(), null(), null(), null(), null(), null(), null())   
end subroutine rads_init_sat_struct
and made the routine pure again.

Anyway, reduced testcase is:

module rh1356346
  type :: T
    character(len=160), pointer :: f(:)
  end type
contains
  pure subroutine foo (x)
    type(T), intent(inout) :: x
    x = T (null())
  end subroutine foo
end

which has been fixed upstream for GCC 4.5 in PR43362.

I think at this point it would be safer to backport just the (resolve_ordinary_assign): Add check to avoid segfault.
change and corresponding part of the testcase (i.e. remove the 
z = t3(x) ! { dg-error "Invalid expression in the derived type constructor" }
part of the test), i.e. just avoid the ICE and not impose additional restrictions.

Comment 5 Michael Petlan 2016-12-16 17:53:22 UTC
Successfully reproduced with gcc-4.4.7-17.el6.
VERIFIED for gcc-4.4.7-18.el6.

Comment 7 errata-xmlrpc 2017-03-21 11:05:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0708.html


Note You need to log in before you can comment on or make changes to this bug.