Bug 32656 - [4.3 regression] m32c: ICE in smallest_mode_for_size, at stor-layout.c:220
Summary: [4.3 regression] m32c: ICE in smallest_mode_for_size, at stor-layout.c:220
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
: 32659 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-06 20:48 UTC by Rask Ingemann Lambertsen
Modified: 2007-09-25 12:05 UTC (History)
3 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: m32c-unknown-elf
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2007-07-07 00:07:50


Attachments
test case (8.18 KB, text/plain)
2007-07-06 20:50 UTC, Rask Ingemann Lambertsen
Details
Minimized test case (255 bytes, text/plain)
2007-07-07 00:06 UTC, Zack Weinberg
Details
Even smaller test case (226 bytes, text/plain)
2007-07-07 00:15 UTC, Zack Weinberg
Details
and smaller still (212 bytes, text/plain)
2007-07-07 00:20 UTC, Zack Weinberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rask Ingemann Lambertsen 2007-07-06 20:48:52 UTC
I get this failure building libstdc++:
/home/rask/build/gcc-m32c-unknown-elf/m32c-unknown-elf/m32cm/libstdc++-v3/include/ext/bitmap_allocator.h: In member function 'void __gnu_cxx::bitmap_allocator<_Tp>::_M_deallocate_single_object(_Tp*) [with _Tp = wchar_t]':
/home/rask/build/gcc-m32c-unknown-elf/m32c-unknown-elf/m32cm/libstdc++-v3/include/ext/bitmap_allocator.h:1027: internal compiler error: in smallest_mode_for_size, at stor-layout.c:220

Can be reproduced with this command line and the attached preprocessed source:
./xgcc -B./ -O2 -mcpu=m32cm ~/bitmap-allocator.cc -S -o /dev/null

These are the flags I configured gcc with:

--target m32c-unknown-elf --with-newlib --enable-sim --disable-gdb --disable-nls --enable-languages=c,c++ --enable-cxx-flags=-O2
Comment 1 Rask Ingemann Lambertsen 2007-07-06 20:50:06 UTC
Created attachment 13856 [details]
test case
Comment 2 Zack Weinberg 2007-07-07 00:05:05 UTC
*** Bug 32659 has been marked as a duplicate of this bug. ***
Comment 3 Zack Weinberg 2007-07-07 00:06:45 UTC
Created attachment 13859 [details]
Minimized test case

Here's a minimal test case (from my duplicate report of this, #32659).  I analyzed it a bit there - the important thing to know is that reload wants a MODE_PARTIAL_INT with 64 bits; as the target has no such mode, we abort.  I think reload wants this in order to deal with a (subreg:PSI (reg:DI)) construct.
Comment 4 Zack Weinberg 2007-07-07 00:07:49 UTC
Adding DJ to cc: list, confirming.
Comment 5 Zack Weinberg 2007-07-07 00:15:59 UTC
Created attachment 13860 [details]
Even smaller test case
Comment 6 Zack Weinberg 2007-07-07 00:20:03 UTC
Created attachment 13861 [details]
and smaller still

I can't believe I didn't think of these reductions three hours ago...
Comment 7 DJ Delorie 2007-09-25 02:15:40 UTC
Seems to work for me now; could you recheck it with the patches I just committed?
Comment 8 Rask Ingemann Lambertsen 2007-09-25 12:05:22 UTC
It works for me too at revision 128761.