Created attachment 25022 [details] preprocessed sources (ust-0.15/snprintf/vfprintf.c) $ arm-linux-gnueabi-gcc -march=armv7-a /tmp/x2.c -c -O1 /tmp/x2.c: In function ‘ust_safe_vfprintf’: /tmp/x2.c:4533:1: error: unrecognizable insn: (insn 3114 3113 3115 139 (set (subreg:SI (reg/v:DI 153 [ _umax ]) 0) (sign_extend:SI (mem:QI (plus:SI (mult:SI (reg/v:SI 159 [ nextarg ]) (const_int 8 [0x8])) (reg/f:SI 347 [ argtable.7 ])) [0 *D.5277_569+0 S1 A32]))) /tmp/x2.c:4325 -1 (nil)) /tmp/x2.c:4533:1: internal compiler error: in extract_insn, at recog.c:2113 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. $ arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=$P/sysroots/x86_64-oe-linux/usr/libexec/armv5te-linux-gnueabi/gcc/arm-linux-gnueabi/4.6.1/lto-wrapper Target: arm-linux-gnueabi Configured with: $P/work-shared/gcc-4.6.1+svnr175454/gcc-4_6-branch/configure --build=x86_64-oe-linux --host=x86_64-oe-linux --target=arm-linux-gnueabi --prefix=$P/sysroots/x86_64-oe-linux/usr --exec_prefix=$P/sysroots/x86_64-oe-linux/usr --bindir=$P/sysroots/x86_64-oe-linux/usr/bin/armv5te-linux-gnueabi --sbindir=$P/sysroots/x86_64-oe-linux/usr/bin/armv5te-linux-gnueabi --libexecdir=$P/sysroots/x86_64-oe-linux/usr/libexec/armv5te-linux-gnueabi --datadir=$P/sysroots/x86_64-oe-linux/usr/share --sysconfdir=$P/sysroots/x86_64-oe-linux/etc --sharedstatedir=$P/sysroots/x86_64-oe-linux/com --localstatedir=$P/sysroots/x86_64-oe-linux/var --libdir=$P/sysroots/x86_64-oe-linux/usr/lib/armv5te-linux-gnueabi --includedir=$P/sysroots/x86_64-oe-linux/usr/include --oldincludedir=$P/sysroots/x86_64-oe-linux/usr/include --infodir=$P/sysroots/x86_64-oe-linux/usr/share/info --mandir=$P/sysroots/x86_64-oe-linux/usr/share/man --disable-silent-rules --with-libtool-sysroot=$P/sysroots/x86_64-oe-linux --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --disable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-linux-gnueabi- --enable-target-optspace --enable-lto --enable-libssp --disable-bootstrap --disable-libgomp --disable-libmudflap --enable-cheaders=c_global --with-abi=aapcs-linux --with-float=soft --with-local-prefix=$P/sysroots/toradex-colibri320/usr --with-gxx-include-dir=/usr/include/c++ --with-sysroot=$P/sysroots/toradex-colibri320 --with-build-sysroot=$P/sysroots/toradex-colibri320 --enable-poison-system-directories --with-headers=$P/sysroots/toradex-colibri320/usr/include --disable-libunwind-exceptions --with-mpfr=$P/sysroots/x86_64-oe-linux/usr --with-system-zlib --enable-nls --enable-__cxa_atexit --enable-__cxa_atexit Thread model: posix gcc version 4.6.1 20110627 (prerelease) (GCC) (it is the gcc-4.6 from OpenEmbedded Core)
I can reproduce the ICE with 4.7-20110813 and 4.6-20110812, but not with 4.5-20110804, 4.4-20110719, or 4.3.5.
It's caused by r163935: Author: bernds Date: Mon Sep 6 22:32:26 2010 New Revision: 163935 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163935 Log: PR target/43137 * config/arm/iterators.md (qhs_zextenddi_cond, qhs_sextenddi_cond): New define_mode_attrs. * config/arm/arm.md (zero_extendsidi2, arm_zero_extendsidi2, arm_exxtendsidi2, arm_extendsidi2): Delete patterns. (zero_extend<mode>di2, extend<mode>di2 and related splits): New. (thumb1_zero_extendhisi2): Remove code to handle LABEL_REFs. Remove pool_range attribute. (arm_zero_extendhisi2, arm_zero_extendhisi2_v6, arm_zero_extendqisi2, arm_zero_extendqisi2_v6, thumb1_zero_extendqisi2_v6): Remove pool_range and neg_pool_range attributes. * config/arm/thumb2.md (thumb2_zero_extendsidi2, thumb2_zero_extendhidi2, thumb2_zero_extendqidi2, thumb2_extendsidi2, thumb2_extendhidi2, thumb2_extendqidi2): Delete.
*** Bug 50104 has been marked as a duplicate of this bug. ***
Created attachment 25031 [details] reduced test case
I can reproduce it with GCC 4.7 r177601 with -marm but not with -mthumb. Here a smaller test case that seems related. > cat tst2.c typedef signed char int8_t ; typedef signed short int16_t; typedef signed long int32_t; typedef signed long long int64_t; // doesn't ice if arg is unsigned // doesn't ice if return is int32_t instead of int64_t int64_t foo(int8_t * arg) { //int64_t temp_1; int64_t temp_1; temp_1 = arg[256]; // index must be > 255 to ice! return temp_1; } > arm-none-eabi-gcc -O1 tst2.c tst2.c: In function 'foo': tst2.c:15:1: error: unrecognizable insn: (insn 22 21 23 2 (set (subreg:SI (reg:DI 138 [ MEM[(int8_t *)arg_1(D) + 256B] ]) 0) (sign_extend:SI (mem:QI (plus:SI (reg:SI 0 r0 [ arg ]) (const_int 256 [0x100])) [0 MEM[(int8_t *)arg_1(D) + 256B]+0 S1 A8]))) tst2.c:13 -1 (nil)) tst2.c:15:1: internal compiler error: in extract_insn, at recog.c:2115 -- Greta
Seen also when building perl with -marm: https://bugs.launchpad.net/ubuntu/+source/gcc-4.6/+bug/838994 Exists in 4.6.1 and trunk r178025. Does not exist in 4.5.3.
arm_legitimate_index_p() seems to be wrong. Near the end it has: /* For ARM v4 we may be doing a sign-extend operation during the load. */ if (arm_arch4) { if (mode == HImode || mode == HFmode || (outer == SIGN_EXTEND && mode == QImode)) range = 256; else range = 4096; } else range = (mode == HImode || mode == HFmode) ? 4095 : 4096; The final 4096 range is incorrect for ARM mode sign extends. The arm_arch4 path looks good.
Created attachment 25202 [details] Candidate patch
Oh fun - I posted a patch about 2 hours after you put yours here :) Ramana
Author: ramana Date: Fri Sep 30 09:36:43 2011 New Revision: 179378 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179378 Log: Fix PR target/50099 Added: trunk/gcc/testsuite/gcc.target/arm/pr50099.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.md trunk/gcc/config/arm/iterators.md trunk/gcc/config/arm/predicates.md trunk/gcc/testsuite/ChangeLog
*** Bug 52855 has been marked as a duplicate of this bug. ***
*** Bug 54473 has been marked as a duplicate of this bug. ***
*** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla.
greta.yorsh no longer works for ARM. Your email will be forwarded to their line manager. Please do not reply to this email. If you need more information, please email real-postmaster@arm.com Thank you.
I think this was fixed by Ramana's patch.