[PR 44626, armel] ICE: output_operand: invalid expression as operand

Bug #564492 reported by Achim Bohnet
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc
Fix Released
Medium
gcc-4.4 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

It builds fine in sid (gcc-4.4_4.4.3-3) but not in lucid (gcc-4.4_4.4.3-4ubuntu5):

gcc -fno-strict-aliasing -I. -I.. -I../nfs -I/build/buildd/openafs-1.4.12+dfsg/src -I/build/buildd/openafs-1.4.12+dfsg/src/afs -I/build/buildd/openafs-1.4.12+dfsg/src/afs/UKERNEL -I/build/buildd/openafs-1.4.12+dfsg/src/config -I/build/buildd/openafs-1.4.12+dfsg/src/rx -I/build/buildd/openafs-1.4.12+dfsg/src/rx/UKERNEL -I/build/buildd/openafs-1.4.12+dfsg/src/rxkad -I/build/buildd/openafs-1.4.12+dfsg/src/rxkad/domestic -I/build/buildd/openafs-1.4.12+dfsg/src/util -I/build/buildd/openafs-1.4.12+dfsg/src -I/build/buildd/openafs-1.4.12+dfsg/src/afs/UKERNEL -I/build/buildd/openafs-1.4.12+dfsg/src/afs -I/build/buildd/openafs-1.4.12+dfsg/src/util -I/build/buildd/openafs-1.4.12+dfsg/src/rxkad -I/build/buildd/openafs-1.4.12+dfsg/src/config -I/build/buildd/openafs-1.4.12+dfsg/src/fsint -I/build/buildd/openafs-1.4.12+dfsg/src/vlserver -I/build/buildd/openafs-1.4.12+dfsg/src/libuafs -I/build/buildd/openafs-1.4.12+dfsg/include -I/build/buildd/openafs-1.4.12+dfsg/include/afs -O -DKERNEL -DAFS_WEB_ENHANCEMENTS -I. -I.. -I/build/buildd/openafs-1.4.12+dfsg/src/config -D_REENTRANT -DKERNEL -DUKERNEL -g -c /build/buildd/openafs-1.4.12+dfsg/src/afs/VNOPS/afs_vnop_link.c
/build/buildd/openafs-1.4.12+dfsg/src/afs/VNOPS/afs_vnop_link.c: In function 'afs_link':
/build/buildd/openafs-1.4.12+dfsg/src/afs/VNOPS/afs_vnop_link.c:164: internal compiler error: output_operand: invalid expression as operand

 * Source Package: openafs
 * Version: 1.4.12+dfsg-3
 * Architecture: armel
 * Archive: ubuntu primary archive
 * Component: universe
 * State: Failed to build
 * Duration: 38 minutes
 * Build Log: https://launchpad.net/ubuntu/+source/openafs/1.4.12+dfsg-3/+build/1687478/+files/buildlog_ubuntu-lucid-armel.openafs_1.4.12+dfsg-3_FAILEDTOBUILD.txt.gz
 * Builder: https://launchpad.net/builders/cushaw
 * Source: https://launchpad.net/ubuntu/+source/openafs/1.4.12+dfsg-3

1.4.12+dfsg-3 sucessfully build in debian sid:

  https://buildd.debian.org/fetch.cgi?pkg=openafs;ver=1.4.12%2Bdfsg-3;arch=armel;stamp=1270653508

Related branches

Revision history for this message
Russ Allbery (rra-debian) wrote :

An ICE in the compiler is a GCC bug of some sort or another. Even if the code is invalid (which I don't believe it is in this case), the compiler is not supposed to ever ICE. Adding gcc to the bug.

affects: openafs (Ubuntu) → gcc-defaults (Ubuntu)
affects: gcc-defaults (Ubuntu) → gcc-4.4 (Ubuntu)
Revision history for this message
Matthias Klose (doko) wrote :

- works with -marm -O1
- works with -O0 or -O2
- fixed in 4.5

Changed in gcc-4.4 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Matthias Klose (doko) wrote :
tags: added: armel armv7 toolchain
Revision history for this message
In , Matthias Klose (doko) wrote :

seen with 4.4 with -O1 -march=armv7-a -mthumb, works with 4.3 and 4.5, work around in 4.4 with -O0, -O2, or -O1 -marm

$ gcc-4.4 -fno-strict-aliasing -O1 -g -c afs_vnop_link.i
/home/packages/tmp/openafs-1.4.12.1+dfsg/src/afs/VNOPS/afs_vnop_link.c: In function 'afs_link':
/home/packages/tmp/openafs-1.4.12.1+dfsg/src/afs/VNOPS/afs_vnop_link.c:164: internal compiler error: output_operand: invalid expression as operand
Please submit a full bug report,
with preprocessed source if appropriate.

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

Created attachment 20975
preprocessed source

Changed in gcc:
status: Unknown → New
Revision history for this message
In , Mikpe (mikpe) wrote :

Created attachment 20982
backport Nathan Sidwell's movw fix to 4.4

This ICE was fixed for 4.5 by r148788, Nathan Sidwell's "[ARM] movw fix", see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01358.html.

The attached patch backports that fix to current 4.4, which fixes the ICE. I've had this in my 4.4 tree since July 2009, so I'm confident it's solid.

Matthias, does this patch work for you?

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

yes, the ICE is fixed with this patch

Matthias Klose (doko)
summary: - armel FTBFS: openafs 1.4.12+dfsg-3 in lucid: afs_vnop_link.c:164:
- internal compiler error: output_operand: invalid expression as operand
+ [PR 44626, armel] ICE: output_operand: invalid expression as operand
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-4.4 - 4.4.4-6ubuntu1

---------------
gcc-4.4 (4.4.4-6ubuntu1) maverick; urgency=low

  * Merge with Debian.

gcc-4.4 (4.4.4-6) unstable; urgency=low

  * Update to SVN 20100622 from the gcc-4_4-branch (r161235).
    - Fix PR bootstrap/44544, PR fortran/44536, PR target/44534,
      PR tree-optimization/44508, PR target/44261, PR target/43740,
      PR bootstrap/44426. PR c++/44627 (LP: #503668), PR target/39690.

  [ Matthias Klose ]
  * Add M68K TLS support, backport from the 4.5 branch. Closes: #586060.
  * Merge binary-libgcc.mk packaging changes into binary-libgcc-cross.mk
    (Loic Minier).
  * Fix Fortran cross-compiler build when not building the runtime library.
  * Apply proposed fix for PR target/44626 (backport from the 4.5 branch).
    LP: #564492.
  * Add maintainer scripts for cross packages.

  [ Marcin Juszkiewicz ]
  * Merge the rules.d/binary-*-cross.mk files into rules.d/binary-*.mk.
  * ARM: speed up division on Thumb-2 (backport from the trunk). LP: #589779.

gcc-4.4 (4.4.4-5) unstable; urgency=low

  [ Matthias Klose ]

  * Update to SVN 20100612 from the gcc-4_4-branch (r160657).
    - Fix PR target/44169, PR target/44481, PR target/44075, PR other/43838,
      PR libstdc++/32499, PR libgcj/44216.
  * debian/patches/libstdc++-pic.diff: Fix installation for cross builds.
  * Update libsupc++/vmi_class_type_info.cc from the 4.5 branch.
    Closes: #584308.
  * Export long double versions of "C" math library for arm-linux-gnueabi,
    m68k-linux-gnu (ColdFire), mips*-linux-gnu (o32 ABI), sh*-linux-gnu
    (not 32 bit). Merge the libstdc++-*-ldbl-compat.diff patches.
  * Remove the backport for the plugin support.

  [ Aurelien Jarno ]
  * libstdc++-mips-ldbl-compat.diff: On MIPS provide the long double
    versions of "C" math functions in libstdc++ as we need to keep the
    ABI. Closes: #584610.
 -- Matthias Klose <email address hidden> Fri, 25 Jun 2010 15:04:36 +0200

Changed in gcc-4.4 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
In , Ramana-gcc (ramana-gcc) wrote :

Can this patch be submitted to <email address hidden> after due testing ?

Revision history for this message
In , Mikpe (mikpe) wrote :

(In reply to comment #4)
> Can this patch be submitted to <email address hidden> after due testing ?

Yes. Although I've tested this many times it's always been together with many other patches. I'm now running a 4.4 bootstrap+regtest with only this one applied. Will submit the patch once that succeeds, which should be less than 24 hours from now.

Revision history for this message
In , Mikpe (mikpe) wrote :

Patch posted after successful (re)testing:
http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00331.html

Changed in gcc:
status: New → Confirmed
Changed in gcc:
importance: Unknown → Medium
Revision history for this message
In , Jakub-gcc (jakub-gcc) wrote :

Fixed in 4.5+, 4.4 is no longer supported.

Changed in gcc:
status: Confirmed → Fix Released
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.