Bug 508707 - gfortran - internal compiler error
gfortran - internal compiler error
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-29 10:52 EDT by Philip Blakely
Modified: 2009-07-08 04:49 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-08 04:49:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Minimal test-case (247 bytes, text/x-fortran)
2009-06-29 10:53 EDT, Philip Blakely
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 40587 None None None Never

  None (edit)
Description Philip Blakely 2009-06-29 10:52:21 EDT
By mistake, I've already submitted this direct to gcc.gnu.org/bugzilla as http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40587, and then realised I should have submitted it here instead. Sorry if this causes any problems.

Problem:
gfortran emits an internal compiler error (ICE) for a simple test-case.

See attached test-case, test.f:

> gfortran -c test.f -O1
Compiles OK

> gfortran -c test.f -O2
test.f: In function "test":
test.f:13: internal compiler error: in emit_swap_insn, at reg-stack.c:827

Expected result: Compiles without error.

Version information:

> gfortran -v
Using built-in specs.
Target: i586-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --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.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i586 --build=i586-redhat-linux
Thread model: posix
gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC) 

> uname -a
Linux pmblakely 2.6.29.5-191.fc11.i686.PAE #1 SMP Tue Jun 16 23:19:53 EDT 2009 i686 i686 i386 GNU/Linux

Notes:

This looks similar to the test-case for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39607 (fixed), in that the ICE occurs when returned/class variables are only updated if a certain condition holds, and otherwise a separate function is called.

Note that the test-case for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39607 compiles correctly (i.e. no ICE) for this version of gcc.
Comment 1 Philip Blakely 2009-06-29 10:53:07 EDT
Created attachment 349791 [details]
Minimal test-case
Comment 2 Jakub Jelinek 2009-07-08 04:49:06 EDT
It is fixed on the 4.4 branch upstream, so it is already fixed in rawhide gcc as well and will be fixed in F11 whenever gcc updates are built.

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