Bug 31482 - error: could not split insn, internal compiler error: in final_scan_insn
Summary: error: could not split insn, internal compiler error: in final_scan_insn
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-05 06:52 UTC by Bengt Wirgart
Modified: 2007-09-25 01:46 UTC (History)
2 users (show)

See Also:
Host: Mac OSX 10.4.9
Target: m32c-elf 4.2.0
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bengt Wirgart 2007-04-05 06:52:46 UTC
M32C C-compiler 4.2.0 stop with this error:

ctest.c: In function 'Modbus_Frekvens_Init':
ctest.c:44: error: could not split insn
(insn 50 49 59 (set (mem/c:QI (plus:PSI (reg/f:PSI 7 fb)
                (const_int -2 [0xfffffffe])) [0 card+0 S1 A8])
        (if_then_else:QI (ne:QI (reg:HI 0 r0 [27])
                (const_int 0 [0x0]))
            (const_int 2 [0x2])
            (const_int 1 [0x1]))) 151 {movqicc_ne_hi} (insn_list:REG_DEP_TRUE 11 (nil))
    (expr_list:REG_DEAD (reg:HI 0 r0 [27])
        (nil)))
ctest.c:44: internal compiler error: in final_scan_insn, at final.c:2449
Please submit a full bug report,
with preprocessed source if appropriate.

   Have tried same code with 4.1.1 m32c and h8300 target no problem.

Gcc version:
m32c-4.2.0/m32c-elf/bin/gcc -v
Using built-in specs.
Target: m32c-elf
Configured with: ../configure --prefix=/Users/bengtwir/GNU/m32c-4.2.0 --target=m32c-elf --program-prefix=m32c-elf- --enable-languages=c --with-gnu-as --with-gnu-ld --disable-nls --with-newlib
Thread model: single

Source code: ctest.c


/*

	 fail 
m32c-4.2.0/m32c-elf/bin/gcc -O -mcpu=m32c ctest.c
m32c-4.2.0/m32c-elf/bin/gcc -O -mcpu=m16c ctest.c

	 OK 
m32c-4.1.1/m32c-elf/bin/gcc -O -mcpu=m32c ctest.c
h8300-4.1.1/h8300-hms/bin/gcc -O ctest.c

*/

typedef unsigned char Byte;
typedef unsigned short UInt16;


typedef struct rec {
UInt16	size;
UInt16	text;
}rec;


void Modbus_Frekvens_Init(void);


Byte	b;
UInt16	i;
rec	*rr;

void Modbus_Frekvens_Init(void)
{
Byte	card;


	if (rr->size & 2)
		card = 0x02;
	else
		card = 0x01; 
	
	if (rr->text == 2)
		{
		b = 2;
		}

	i = card*0x100 + 0x01; 
}
Comment 1 dj@gcc.gnu.org 2007-09-25 01:42:44 UTC
Subject: Bug 31482

Author: dj
Date: Tue Sep 25 01:42:34 2007
New Revision: 128742

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128742
Log:
PR target/31482
* config/m32c/cond.md (stzx_reversed_<mode>): Add an output
constraint.
(movqicc_<code>_<mode>): Likewise.
(movhicc_<code>_<mode>): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/m32c/cond.md

Comment 2 DJ Delorie 2007-09-25 01:46:01 UTC
Patch applied.