gfortran 4.8.2-19ubuntu: Erroneous "end of file" with internal read

Bug #1330099 reported by Miguel Martinez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-defaults
Unknown
Unknown
gcc-defaults (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

The current gfortran-4.8 package in Trusty (4.8.2-19ubuntu1 as of today) miscompiles CASTEP to a useless state, regardless of compile flags. Even -O0 will result in a useless binary. The main problem is the binary misreads values stored in between blocks, such as

%block lattice_cart
2.6954645 2.6954645 0.0
2.6954645 0.0 2.6954645
0.0 2.6954645 2.6954645
%endblock lattice_cart

This regression is apparently caused by a patch in GCC 4.9 backported into Debian/Ubuntu. It certainly does not affect Macports' gfortran 4.8.2, nor in the gfortran 4.8.x compilation at archer.ac.uk. I'll try to find out if a gcc regression has been filed about this, and post it later, so it is easier to revert the patch or otherwise fix the issue.

In any case, CASTEP is proprietary source code, and won't be able to share the source in order to further diagnose the issue.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gfortran 4:4.8.2-1ubuntu6
ProcVersionSignature: Ubuntu 3.13.0-29.53-generic 3.13.11.2
Uname: Linux 3.13.0-29-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: GNOME
Date: Sat Jun 14 17:29:19 2014
InstallationDate: Installed on 2011-12-21 (906 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to trusty on 2014-04-17 (58 days ago)

Revision history for this message
Miguel Martinez (el-quark) wrote :
Revision history for this message
Miguel Martinez (el-quark) wrote :

The relevant GCC bugzilla report is pr61173:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61173

Compiling the test case fails when using gfortran-4.8 in the two ubuntu 14.04 machines I have access to.

summary: - gfortran 4.8.2-19ubuntu1 miscompiles CASTEP
+ gfortran 4.8.2-19ubuntu: Erroneous "end of file" with internal read
Revision history for this message
Miguel Martinez (el-quark) wrote :

I have updated the title of the bug, as well as added a link to the upstream bug. The upstream bug report as a testcase and a bugfix. Can anybody that's also subscribed to this bug check wheter the testcase also fails in their system? I've seen it in two different computers with amd64 Ubuntu 14.04 installed. It would be nice if *anybody* could confirm this.

Additionally, given that this bug only exists in Ubuntu's gcc 4.8.2 due to an Ubuntu/Debian patch, it would be nice to have it fixed before the next LTS was released.

Revision history for this message
Miguel Martinez (el-quark) wrote :

Just as an update, the latest libgcc update doesn't fix this. It's three months later and nobody has even bothered replying.

Revision history for this message
Adam (idonthavemsn) wrote :

Hi,
This problem also affected me - I'm trying to compile CASTEP on Ubuntu 14.04, and it has failed to compile properly. Any more attention on this matter would be brilliant, thanks!
Thanks,
Adam

Revision history for this message
Miguel Martinez (el-quark) wrote :

One year and two ubuntu releases later, this bug is still unfixed. Are there any plans to actually fix it? Perhaps the official position is *not* to fix this bug. What would be the reason for that?

Revision history for this message
Matthias Klose (doko) wrote :

yes, closing this as won't fix. This is fixed in GCC 5 and above, at least in 16.04 LTS, 18.04 LTS and 20.04 LTS

Changed in gcc-defaults (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.