Bug 14628 - ICE on c++ sources
Summary: ICE on c++ sources
Status: RESOLVED DUPLICATE of bug 14457
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 2.95
: P3 normal
Target Milestone: ---
Assignee: Stephane Carrez
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-03-18 06:27 UTC by namsh
Modified: 2004-06-06 13:24 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: m6811-unknown-none
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2004-03-19 06:47:35


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description namsh 2004-03-18 06:27:59 UTC
    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'.
Comment 1 namsh 2004-03-18 06:27:59 UTC
Fix:
	1. use -O0 option.
	2. remove '-m68hc12' option.
Comment 2 Andrew Pinski 2004-03-19 06:47:35 UTC
Confirmed.
Comment 3 Stephane Carrez 2004-06-06 09:50:09 UTC
going to check
Comment 4 Stephane Carrez 2004-06-06 13:24:52 UTC
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 ***