Summary: | [4.2 regression] ICE in reload_cse_simplify_operands, at postreload.c:393 on m68k | ||
---|---|---|---|
Product: | gcc | Reporter: | Martin Michlmayr <tbm> |
Component: | target | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ccc94453, debian-gcc, gcc-bugs, pinskia, rsandifo, schwab, wouter |
Priority: | P5 | Keywords: | ice-on-valid-code |
Version: | 4.1.1 | ||
Target Milestone: | 4.3.0 | ||
Host: | Target: | m68k-linux-gnu | |
Build: | m68k-linux-gnu | Known to work: | 3.4.6 4.3.0 |
Known to fail: | 4.0.4 4.1.1 4.2.0 4.2.5 | Last reconfirmed: | |
Attachments: |
test case for 4.2
preprocessed source preprocessed source test case testcase Partial patch |
Description
Martin Michlmayr
2006-06-27 20:13:30 UTC
Update: 4.0 shows the same problem. 3.4.6 works crest% gcc-4.0 -c -O2 scansbr.i scansbr.c: In function 'scan': scansbr.c:154: warning: pointer targets in passing argument 2 of 'm_getfld' differ in signedness scansbr.c:154: warning: pointer targets in passing argument 3 of 'm_getfld' differ in signedness scansbr.c:189: warning: pointer targets in passing argument 2 of 'm_getfld' differ in signedness scansbr.c:189: warning: pointer targets in passing argument 3 of 'm_getfld' differ in signedness scansbr.c:225: warning: pointer targets in passing argument 2 of 'm_getfld' differ in signedness scansbr.c:225: warning: pointer targets in passing argument 3 of 'm_getfld' differ in signedness scansbr.c:262: warning: pointer targets in passing argument 2 of 'm_getfld' differ in signedness scansbr.c:262: warning: pointer targets in passing argument 3 of 'm_getfld' differ in signedness scansbr.c:369: error: insn does not satisfy its constraints: (insn 1692 701 1693 82 (set (reg:QI 8 %a0) (mem/s:QI (plus:SI (reg/f:SI 14 %a6) (const_int -212 [0xffffff2c])) [0 name+0 S1 A16])) 33 {*m68k.md:746} (nil) (nil)) scansbr.c:369: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. For Debian GNU/Linux specific bug reporting instructions, see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>. Created attachment 11762 [details]
test case for 4.2
reduced testcase, shows the problem with 4.2 only
Created attachment 11763 [details]
preprocessed source
Original preprocessed source, shows the problem with 4.0, 4.1 and 4.2. Works with 3.4.6.
Created attachment 11764 [details]
preprocessed source
Original preprocessed source, shows the problem with 4.0, 4.1 and 4.2. Works with 3.4.6.
Created attachment 11765 [details]
test case
This one fails with gcc 4.1 and 4.2.
The bug is much older, I was able to get it fail using the sources at the 3.4 branch point. That 3.4.6 does not fail is probably just coincidence. m68k is not a primary or secondary platform. Created attachment 12436 [details]
testcase
another testcase
Created attachment 12785 [details] Partial patch Please try this patch. It removes the ICE, but the code may not run on 68000 and 68010 CPUs because there is also an alignment problem. Please see <URL:http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00766.html> for details. Won't fix in GCC-4.0.x. Adjusting milestone. Subject: Bug 28181 Author: rsandifo Date: Tue Mar 6 09:01:07 2007 New Revision: 122609 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=122609 Log: gcc/ PR target/28181 * config/m68k/m68k-protos.h (m68k_secondary_reload_class): Declare. (m68k_preferred_reload_class): Likewise. * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Remove duplicated comment. (SECONDARY_RELOAD_CLASS): Define. (PREFERRED_RELOAD_CLASS): Use m68k_preferred_reload_class. (LIMIT_RELOAD_CLASS): Delete. * config/m68k/m68k.c (m68k_regno_mode_ok): Don't prevent address registers from storing bytes. (m68k_secondary_reload_class): New function. (m68k_preferred_reload_class): Likewise. gcc/testsuite/ * gcc.c-torture/compile/m68k-byte-addr.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/m68k-byte-addr.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/m68k/m68k-protos.h trunk/gcc/config/m68k/m68k.c trunk/gcc/config/m68k/m68k.h trunk/gcc/testsuite/ChangeLog Now fixed in trunk. The patch may be too invasive to backport; I'm not sure. Closing 4.1 branch. Closing 4.2 branch, fixed in 4.3. |