| Summary: | gfortran fails to compile stbt05.f (lapack 3.1) with -O2 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Tru Huynh <pasteur> | ||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||
| Status: | CLOSED ERRATA | QA Contact: | qe-baseos-tools-bugs | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | low | ||||||
| Version: | 6.1 | CC: | bugproxy, mpolacek, pmuller | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | gcc-4.4.6-4.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Previously GCC's Fortran frontend, when determining a type with specific precision, could return wrong type which caused an internal compiler error later. This has been fixed so now GCC uses smallest of the wider types if there are any to avoid ICEing.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-06-20 14:39:27 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
gcc44-gfortran-4.4.4-13.el5.x86_64 under RHEL 5.7 release does not show the error. http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179290 ought to fix this. See http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01418.html for more details. will that fix make it for 6.2? Thanks possible workaround for lapack builds from https://bugzilla.redhat.com/show_bug.cgi?id=520518 as listed in lapack-3.2.1-4.el6.x86_64: * Fri Sep 04 2009 Tom "spot" Callaway <tcallawa> - 3.2.1-3 - use RPM_OPT_O_FLAGS (-O0) everywhere necessary, drop RPM_OPT_SIZE_FLAGS (-Os) (bz 520518) no idea what #543948 is (not public) for what it's worth, lapack 3.4.0 also has the same issue O2 core dumps, but -O2 -Os compiles fine. ------- Comment From pavsubra.com 2012-04-27 08:13 EDT------- I have downloaded the lapack-3.3.0.tgz to my P7 machine and did the following steps on RHEL 6.3 Beta: [root@saturnfo-lp1 ~]# cd lapack-3.3.0 [root@saturnfo-lp1 lapack-3.3.0]# ls BLAS CTestConfig.cmake lapack-config.cmake.in LICENSE make.inc.example TESTING CheckTimeFunction.cmake INSTALL lapack-config-install.cmake.in Makefile README CMakeLists.txt lapack_build.cmake lapack-config-version.cmake.in make.inc SRC [root@saturnfo-lp1 lapack-3.3.0]# cp make.inc.example make.inc Then edited the make.inc file with : OPTS = -fPIC -O3 -mcpu=powerpc64 NOOPT = -g -O0 -fPIC Then uncommented the line in the Makefile: lib: blaslib variants lapacklib tmglib [root@saturnfo-lp1 lapack-3.3.0]# make all The make all is successful and not giving any errors. Also I copied the fortran file stpt05.f into the machine and compiled the same as follows: [root@saturnfo-lp1 ~]# gfortran -O1 -c stpt05.f It is successful and creating the stpt05.o file
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Previously GCC's Fortran frontend, when determining a type with specific precision, could return wrong type which caused an internal compiler error later. This has been fixed so now GCC uses smallest of the wider types if there are any to avoid ICEing.
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. http://rhn.redhat.com/errata/RHBA-2012-0941.html |
Created attachment 532048 [details] stbt05.f from lapack 3.1 Description of problem: gfortran fails to compile stbt05.f (lapack 3.1) with -O2/-O1 flags. Version-Release number of selected component (if applicable): gcc-gfortran-4.4.5-6.el6.x86_64 How reproducible: always Steps to Reproduce: 1. gfortran -O2 -fPIC -c stbt05.f -o stbt05.o Actual results: comilation failure with: stbt05.f: In function ‘stbt05’: stbt05.f:1: internal compiler error: Segmentation fault Expected results: no errors Additional info: -O2 fails also -O0 succeed