[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 --- Comment #9 from sudi at gcc dot gnu.org --- Yes I at least 6 and 7 need backports. Haven't gone beyond that yet.
[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 ktkachov at gcc dot gnu.org changed: What|Removed |Added CC||ktkachov at gcc dot gnu.org --- Comment #8 from ktkachov at gcc dot gnu.org --- Does this ICE reproduce with older compilers? We may need to backport the fix if so
[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 --- Comment #7 from sudi at gcc dot gnu.org --- Author: sudi Date: Thu Jan 11 10:46:59 2018 New Revision: 256526 URL: https://gcc.gnu.org/viewcvs?rev=256526=gcc=rev Log: [PR82096] Fix ICE in int_mode_for_mode with arm-linux-gnueabi The bug reported a particular test di-longlong64-sync-1.c failing when run on arm-linux-gnueabi with options -mthumb -march=armv5t -O[g,1,2,3] and -mthumb -march=armv6 -O[g,1,2,3]. The crash was caused because of the explicit VOIDmode argument that is sent to emit_store_flag_force () and that the emit_store_flag_force () was not handling the VOIDmode adequately. This patch fixes that. ChangeLog entries: *** gcc/ChangeLog *** 2017-01-11 Sudakshina DasPR target/82096 * expmed.c (emit_store_flag_force): Swap if const op0 and change VOIDmode to mode of op0. *** gcc/testsuite/ChangeLog *** 2017-01-11 Sudakshina Das PR target/82096 * gcc.c-torture/compile/pr82096.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr82096.c Modified: trunk/gcc/ChangeLog trunk/gcc/expmed.c trunk/gcc/testsuite/ChangeLog
[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 sudi at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|2017-12-19 00:00:00 |2018-01-04 Ever confirmed|0 |1 --- Comment #6 from sudi at gcc dot gnu.org --- Patch submitted https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00219.html
[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 --- Comment #5 from sudi at gcc dot gnu.org --- As far as I can see, the function expand_atomic_compare_and_swap() calls emit_store_flag_force() with a explicit VOIDmode and because of this, do_compare_rtx_and_jump() fails to split the instruction using any do_jump_by_parts_* (which needs an int_mode). This then moves deep and causes the forced move instructions with a VOIDmode and causes the ICE. The attached patch fixes this but I am not sure why the explicit VOIDmode was used on the first place or if the proposed patch is the right approach here? Anyone got any ideas? Sudi diff --git a/gcc/optabs.c b/gcc/optabs.c index 3354e40..efc95f7 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -6312,7 +6312,7 @@ expand_atomic_compare_and_swap (rtx *ptarget_bool, rtx *ptarget_oval, success_bool_from_val: target_bool = emit_store_flag_force (target_bool, EQ, target_oval, - expected, VOIDmode, 1, 1); + expected, mode, 1, 1); success: /* Make sure that the oval output winds up where the caller asked. */ if (ptarget_oval)
[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 --- Comment #4 from sudi at gcc dot gnu.org --- I can see this failing with: $./arm-none-linux-gnueabi-gcc ./src/gcc/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c -mthumb -march=armv5t -O[g,1,2,3] and $./arm-none-linux-gnueabi-gcc ./src/gcc/gcc/testsuite/gcc.dg/di-longlong64-sync-1.c -mthumb -march=armv6 -O[g,1,2,3]
[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 --- Comment #3 from sudi at gcc dot gnu.org --- (In reply to Martin Liška from comment #2) > I can with: > > commit 23298f15ba71145bae317e9c07f7078663dbd923 (HEAD, parent/trunk, > parent/master) > Author: rguenth> Date: Mon Dec 18 08:35:23 2017 + > > 2017-12-18 Richard Biener > > PR tree-optimization/81877 > * tree-ssa-loop-im.c (ref_indep_loop_p): Remove safelen > parameters. > (outermost_indep_loop): Adjust. > (ref_indep_loop_p_1): Likewise. Remove safelen handling again. > (can_sm_ref_p): Adjust. > > * g++.dg/torture/pr81877.C: New testcase. > * g++.dg/vect/pr70729.cc: XFAIL. > * g++.dg/vect/pr70729-nest.cc: XFAIL. > > > git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255776 > 138bc75d-0d04-0410-961f-82ee72b054a4 > > $ ./xgcc -v > Using built-in specs. > COLLECT_GCC=./xgcc > Target: arm-unknown-linux-gnueabi > Configured with: ../configure --enable-languages=c,c++ --disable-multilib > --disable-bootstrap --target=arm-unknown-linux-gnueabi > Thread model: posix > gcc version 8.0.0 20171218 (experimental) (GCC) > > $ ./cc1 -fpreprocessed di-longlong64-sync-1.i -mflip-thumb -mcpu=arm10tdmi > -mtls-dialect=gnu -marm -march=armv5t -Og I can reproduce it with this.
[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 --- Comment #2 from Martin Liška --- I can with: commit 23298f15ba71145bae317e9c07f7078663dbd923 (HEAD, parent/trunk, parent/master) Author: rguenthDate: Mon Dec 18 08:35:23 2017 + 2017-12-18 Richard Biener PR tree-optimization/81877 * tree-ssa-loop-im.c (ref_indep_loop_p): Remove safelen parameters. (outermost_indep_loop): Adjust. (ref_indep_loop_p_1): Likewise. Remove safelen handling again. (can_sm_ref_p): Adjust. * g++.dg/torture/pr81877.C: New testcase. * g++.dg/vect/pr70729.cc: XFAIL. * g++.dg/vect/pr70729-nest.cc: XFAIL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255776 138bc75d-0d04-0410-961f-82ee72b054a4 $ ./xgcc -v Using built-in specs. COLLECT_GCC=./xgcc Target: arm-unknown-linux-gnueabi Configured with: ../configure --enable-languages=c,c++ --disable-multilib --disable-bootstrap --target=arm-unknown-linux-gnueabi Thread model: posix gcc version 8.0.0 20171218 (experimental) (GCC) $ ./cc1 -fpreprocessed di-longlong64-sync-1.i -mflip-thumb -mcpu=arm10tdmi -mtls-dialect=gnu -marm -march=armv5t -Og
[Bug target/82096] ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82096 Vidya Praveen changed: What|Removed |Added CC||vp at gcc dot gnu.org --- Comment #1 from Vidya Praveen --- I can't reproduce this on GCC 8.