next command generates ICE (-O2 and -O3 also generates ICE). $ m6811-elf-gcc -O1 -m68hc12 -o a.o -c a.cpp Here is a compiler message: a.cpp: In member function `void Ca::a(void*, unsigned int)': a.cpp:16: internal compiler error: in change_address_1, at emit-rtl.c:1886 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. And here is a source: class Ca { public: void a(void *, unsigned int); private: void **m_l; }; void Ca::a(void *base, unsigned int num) { unsigned int i; for (i = 0; i < num; ++i) base = (void *) ((unsigned char *) base + 1); *m_l = 0; } Environment: System: Linux namsh 2.6.5-rc1 #67 Wed Mar 17 12:40:07 KST 2004 i686 athlon i386 GNU/Linux Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: m6811-unknown-none configured with: ../configure --disable-nls --target=m6811-elf --prefix=/usr/GNUHCS --program-prefix=m6811-elf- --with-gnu-ld --with-gnu-as --disable-shared --enable-languages=c,c++ --without-headers --with-newlib How-To-Repeat: compile the source with '-O1 -m68hc12'.
Fix: 1. use -O0 option. 2. remove '-m68hc12' option.
Confirmed.
going to check
The problem is similar to bug 14457 and is caused by an invalid (mem:HI (mem:HI reg)) rtx that we have to split to access the low byte and the high byte (this is not splitable as there is no (mem:HI (plus (mem HI reg) 1))) *** This bug has been marked as a duplicate of 14457 ***