public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/14629] New: ICE on c++ source
@ 2004-03-18 11:49 gcc-bugzilla at gcc dot gnu dot org
2004-03-18 12:37 ` [Bug target/14629] " namsh at kldp dot org
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: gcc-bugzilla at gcc dot gnu dot org @ 2004-03-18 11:49 UTC (permalink / raw)
To: gcc-bugs
ICE occurs if I do
===================
$ m6811-elf-gcc -c -o a.o a.cpp -m68hc12 -mshort -fomit-frame-pointer -O1
or
$ m6811-elf-gcc -c -o a.o a.cpp -m68hc12 -mshort -fomit-frame-pointer -O2 -msoft-reg-count=32
Here is a ICE msg:
===================
a.cpp: In member function `unsigned char CFrame::OnRxChar(unsigned char)':
a.cpp:47: error: unable to find a register to spill in class `A_OR_SP_REGS'
a.cpp:47: error: this is the insn:
(insn:HI 98 96 99 11 a.cpp:40 (set (reg/f:HI 68)
(plus:HI (mem/s:HI (reg/v/u/f:HI 54 [ this ]) [4 <variable>.m_rxBuf+0 S2 A8])
(reg:HI 1 d [orig:65 <variable>.m_rxCnt ] [65]))) 50 {*addhi3_68hc12} (insn_list 93 (nil))
(nil))
a.cpp:47: confused by earlier errors, bailing out
Here is a 'a.cpp':
===================
extern void Hex2Ascii(unsigned char,unsigned char*);
extern void cputch(char);
class CFrame {
protected:
unsigned char *m_rxBuf;
unsigned int m_frameLen;
unsigned char OnRxChar(unsigned char __c);
private:
unsigned int m_rxCnt;
unsigned char m_state;
};
unsigned char
CFrame::OnRxChar(unsigned char c)
{
switch (m_state)
{
case 0:
m_rxCnt = 0;
m_state = 1;
case 1:
if (c == 0x5a)
{
++m_rxCnt;
if (m_rxCnt == 2)
m_state = 2;
}
else
{
char buf[2];
Hex2Ascii(c, (unsigned char*)buf);
cputch(buf[0]);
cputch(buf[1]);
m_rxCnt = 0;
}
break;
case 2:
m_rxBuf[m_rxCnt++] = c;
if (m_rxCnt == (unsigned int) 7)
m_frameLen = *(unsigned short*)(&m_rxBuf[4]);
break;
}
return 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 a.cpp with given compiler option.
------- Additional Comments From namsh at kldp dot org 2004-03-18 11:48 -------
Fix:
Change the compiler option. for example,
1. Use -O0
2. Do not use -fomit-frame-pointer
--
Summary: ICE on c++ source
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: namsh at kldp dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m6811-unknown-none
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14629
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/14629] ICE on c++ source
2004-03-18 11:49 [Bug target/14629] New: ICE on c++ source gcc-bugzilla at gcc dot gnu dot org
@ 2004-03-18 12:37 ` namsh at kldp dot org
2004-03-19 6:45 ` kazu at cs dot umass dot edu
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: namsh at kldp dot org @ 2004-03-18 12:37 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From namsh at kldp dot org 2004-03-18 12:37 -------
Sorry! It was not ICE. But compiler error.
Now, I upgrade gcc to gcc-3.4.0 20040318 (CVS).
The gcc-3.4.0-20040309 generates compile error with -O1, -O2, -O3.
Compile success with -O0.
m6811-elf-gcc -c -o a.o a.cpp -g0 -m68hc12 -mshort -fomit-frame-pointer -O1
The new gcc-3.4.0-20040318 generates compile error only with -O1.
It successfully compile the a.cpp with -O0, -O2 and -O3.
And it even compiles fine with "-O1 -msoft-reg-count=32".
--
What |Removed |Added
----------------------------------------------------------------------------
Version|3.4 |2.95
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14629
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/14629] ICE on c++ source
2004-03-18 11:49 [Bug target/14629] New: ICE on c++ source gcc-bugzilla at gcc dot gnu dot org
2004-03-18 12:37 ` [Bug target/14629] " namsh at kldp dot org
@ 2004-03-19 6:45 ` kazu at cs dot umass dot edu
2004-03-19 6:56 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-19 6:45 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ciceron at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14629
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/14629] ICE on c++ source
2004-03-18 11:49 [Bug target/14629] New: ICE on c++ source gcc-bugzilla at gcc dot gnu dot org
2004-03-18 12:37 ` [Bug target/14629] " namsh at kldp dot org
2004-03-19 6:45 ` kazu at cs dot umass dot edu
@ 2004-03-19 6:56 ` pinskia at gcc dot gnu dot org
2004-06-06 9:51 ` ciceron at gcc dot gnu dot org
2004-12-22 13:31 ` namsh at kldp dot org
4 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-19 6:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-19 06:56 -------
The ICE now even occurs just -O0:
pr14629.cc:47: error: unrecognizable insn:
(insn 251 46 47 13 pr14629.cc:26 (set (reg:HI 0 x)
(mem/s/j:HI (plus:HI (mem:HI (plus:HI (reg/f:HI 9 *_.frame)
(const_int 5 [0x5])) [0 S2 A8])
(const_int 6 [0x6])) [0 S2 A8])) -1 (nil)
(nil))
pr14629.cc:47: internal compiler error: in extract_insn, at recog.c:2074
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Confirmed:
unsigned char CFrame::OnRxChar(unsigned char)
pr14629.cc:47: error: unable to find a register to spill in class `A_OR_SP_REGS'
pr14629.cc:47: error: this is the insn:
(insn 97 95 94 11 pr14629.cc:40 (set (reg/f:HI 67)
(plus:HI (mem/s/j:HI (reg/v/u/f:HI 54 [ this ]) [0 <variable>.m_rxBuf+0 S2 A8])
(reg:HI 1 d [orig:64 <variable>.m_rxCnt ] [64]))) 50 {*addhi3_68hc12} (insn_list 92 (nil))
(nil))
pr14629.cc:47: internal compiler error: in spill_failure, at reload1.c:1887
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-03-19 06:56:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14629
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/14629] ICE on c++ source
2004-03-18 11:49 [Bug target/14629] New: ICE on c++ source gcc-bugzilla at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-03-19 6:56 ` pinskia at gcc dot gnu dot org
@ 2004-06-06 9:51 ` ciceron at gcc dot gnu dot org
2004-12-22 13:31 ` namsh at kldp dot org
4 siblings, 0 replies; 7+ messages in thread
From: ciceron at gcc dot gnu dot org @ 2004-06-06 9:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ciceron at gcc dot gnu dot org 2004-06-06 09:51 -------
Going to check
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ciceron at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14629
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/14629] ICE on c++ source
2004-03-18 11:49 [Bug target/14629] New: ICE on c++ source gcc-bugzilla at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-06-06 9:51 ` ciceron at gcc dot gnu dot org
@ 2004-12-22 13:31 ` namsh at kldp dot org
4 siblings, 0 replies; 7+ messages in thread
From: namsh at kldp dot org @ 2004-12-22 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From namsh at kldp dot org 2004-12-22 13:31 -------
3.4.4-20041108 generates ICE.
But, 4.0.0-20041216 No ICE.
So, it seems gcc-trunk has NO problem for this bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14629
^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <bug-14629-4@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2011-03-22 20:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-18 11:49 [Bug target/14629] New: ICE on c++ source gcc-bugzilla at gcc dot gnu dot org
2004-03-18 12:37 ` [Bug target/14629] " namsh at kldp dot org
2004-03-19 6:45 ` kazu at cs dot umass dot edu
2004-03-19 6:56 ` pinskia at gcc dot gnu dot org
2004-06-06 9:51 ` ciceron at gcc dot gnu dot org
2004-12-22 13:31 ` namsh at kldp dot org
[not found] <bug-14629-4@http.gcc.gnu.org/bugzilla/>
2011-03-22 20:31 ` jsm28 at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).