[Bug target/85026] New: [7 Regression] Error: branch out of range on arm-linux-gnueabihf
doko at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 22 04:29:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85026
Bug ID: 85026
Summary: [7 Regression] Error: branch out of range on
arm-linux-gnueabihf
Product: gcc
Version: 7.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: doko at gcc dot gnu.org
Target Milestone: ---
[seen when building the simutrans package on Debian/Ubuntu armhf], can be
worked around building with -O1. works with the gcc-6-branch and current trunk.
successfully built with GCC 7.1 as well.
$cat wegbauer.ii
template <class> class a;
class b;
struct c {
typedef a<b> &g;
};
template <typename d> struct e { typedef typename d::f iter; };
class h {
public:
void __attribute__((noreturn)) i();
} ab;
template <class> class a {
public:
typedef b *f;
b &operator[](unsigned m) {
if (ac)
ab.i();
return ad[m];
}
f n() { return ad; }
f m_fn3();
b *ad;
unsigned ac;
};
class b {
public:
short j;
short k;
signed l;
} __attribute__((__packed__));
void o(a<b> &m, b &p2, b &p) {
p2 = p = m[0];
if (bool at = false)
;
else
for (c::g au(m);; at = true)
if (bool av = false)
;
else
for (e<a<int>>::iter aw = au.n(), ax = au.m_fn3(); ax;
av ? (void)0 : (void)0)
if (bool ay = 0)
;
else
for (b az = *aw; !ay; ay = true) {
if (p2.j)
p2.j = az.j;
else if (p.j)
p.j = az.j;
if (p2.k)
p2.k = az.k;
else if (az.k > p.k)
p.k = az.k;
if (az.l < p2.l)
if (az.l > p.l)
p.l = az.l;
}
}
$ g++-7 -std=gnu++11 -Wall -O2 -fstack-protector-strong -c wegbauer.ii
/tmp/ccqJ02vk.s: Assembler messages:
/tmp/ccqJ02vk.s:30: Error: branch out of range
GCC configured with
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-7
--program-prefix=arm-linux-gnueabihf- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--enable-default-pie --with-system-zlib --with-target-system-zlib
--enable-objc-gc=auto --enable-multiarch --enable-multilib
--disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16
--with-float=hard --with-mode=thumb --disable-werror --enable-multilib
--enable-checking=release --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
More information about the Gcc-bugs
mailing list