Internal Compiler Error In Reload_cse_simplify_operands
[x] User account creation filtered due to spam. Bug48250 - ICE in reload_cse_simplify_operands, at postreload.c:403 Summary: ICE in reload_cse_simplify_operands, at postreload.c:403 Status: RESOLVED FIXED Alias: None Product: gcc Classification: Unclassified Component: target (show other bugs) Version: 4.7.0 Importance: P3 normal Target Milestone: 4.7.0 Assignee: Ramana Radhakrishnan URL: Keywords: ice-on-valid-code Depends on: Blocks: Reported: 2011-03-23 11:06 UTC by Andrew Stubbs Modified: 2013-08-05 20:42 UTC (History) CC List: 3 users (show) cltang ibolton ramana See Also: Host: Target: arm-linux-gnueabi Build: Known to work: 4.5.3 Known to fail: 4.6.0, 4.7.0 Last reconfirmed: 2011-03-24 14:34:13 Attachments Reduced testcase. (223 bytes, application/octet-stream) 2011-03-23 11:06 UTC, Andrew Stubbs Details View All Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description Andrew Stubbs 2011-03-23 11:06:27 UTC Created attachment 23755 [details] Reduced testcase. Using a trunk (svn 171251) compiler, configured for ARMv7-a, I get the following ICE: gcc -marm -mfpu=neon -O2 -c lp723185.i lp723185.i: In function 'foo': lp723185.i:29:1: error: insn does not satisfy its constraints: (insn 30 79 31 5 (set (mem/s:DI (plus:SI (reg:SI 3 r3) (const_int -3 [0xfffffffffffffffd])) [4 unaligned_S_6->u64+0 S8 A64]) (reg:DI 4 r4 [146])) lp723185.i:25 626 {*arm_movdi_vfp} (nil)) lp723185.i:29:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 Please submit a full bug report, with preprocessed source if appropriate. See
compile with any optimization other than -O0. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48250 The output is " error: insn does not satisfy its constraints:" and "internal compiler error: in reload_cse_simplify_operands, at postreload.c:411". Setting to https://answers.launchpad.net/gcc-arm-embedded/+question/278918 -O3 causes the error. Should I file this as a bug? -------------------------------------------------------------- The output of `arm-none-eabi-g++ -v` is : Using built-in specs. COLLECT_GCC=arm-none-eabi-g++ COLLECT_LTO_WRAPPER=/usr/local/gcc-arm-none-eabi-4_9-2015q3/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper Target: arm-none-eabi Configured with: /home/build/work/GCC-4-9-build/src/gcc/configure --target=arm-none-eabi --prefix=/home/build/work/GCC-4-9-build/install-native --libexecdir=/home/build/work/GCC-4-9-build/install-native/lib --infodir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-9-build/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-9-build/install-native/arm-none-eabi --build=i686-linux-gnu --host=i686-linux-gnu --with-gmp=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-mpfr=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-mpc=/home/build/work/GCC-4-9-build/build-native/host-libs/usr --with-
65705: internal compiler error: in note_invalid_constants when trying to access asm("PC") 2 people starred this issue and may https://code.google.com/p/android/issues/detail?id=65705 be notified of changes. Back to list Status: Assigned Owner: x...@google.com Cc: bcch...@google.com, nara...@google.com, e...@google.com, andrewhs...@google.com, cfer...@google.com, danalb...@google.com, dimi...@google.com, jm...@google.com, yab...@google.com, ks...@google.com Type-Defect Priority-Medium ReportedBy-Developer Subcomponent-Tools-ndk Triaged-yes Sign in to add a comment Reported by filippo....@gmail.com, Feb 7, 2014 I cannot access the register internal compiler "pc" from code, as when it is passed to another stack it causes an internal compiler error. The issue is happening with gcc-4.8 toolchain released in NDKr9c and NDKr9b for both gcc and g++ front-ends, at all the API level. It does not happen with gcc-4.6 and gcc-4.7 released in NDKr9c or previous NDKs. Other register address like: fp, internal compiler error lr or sp are instead always working fine. I boiled down a very small example of the problem: Let's say we have a file 'test_pc.c' as follow -------------------------------------------- void func_2(const unsigned long aPC) { } int func_1() { register unsigned long pc asm ("pc"); func_2(pc); return 0; } {code} -------------------------------------------- Let's consider ANDROID_NDK_HOME as root of the android-ndk-r9c directory. When I compile with gcc-4.8 I get the following: -------------------------------------------- $ $ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc -O0 -g -Wall -o test_pc.o -c test_pc.c test_pc.c: In function 'func_1': test_pc.c:10:1: error: insn does not satisfy its constraints: } ^ (insn 5 2 6 (set (reg:SI 3 r3 [orig:110 pc.0 ] [110]) (reg/v:SI 15 pc [ pc ])) test_pc.c:8 186 {*arm_movsi_insn} (nil)) test_pc.c:10:1: internal compiler error: in note_invalid_constants, at config/arm/arm.c:13684 Please submit a full bug report, with preprocessed source if appropriate. See