Internal Segmentation fault with switch instruction

Liza Atkin latkin@neomagic.com
Mon Feb 14 16:13:00 GMT 2005


Hello!

In a new port while executing the next switch instruction:
 	void test(void);
	void test(void)
	{
      	 int i;
	       switch(i)
	           {
	               case 1:
      	         printf("%i",i);
            	   break;
 	           }
	}

(or any switch instruction for that matter)
I get internal Segmentation Fault:

	offsetest.c: In function `test':
	offsetest.c:8: internal compiler error: in emit_move_insn, at expr.c:2809
	Please submit a full bug report,
	with preprocessed source if appropriate.
	See <URL:http://gcc.gnu.org/bugs.html> for instructions.

It crushes apparently in the next place:
	if (mode == BLKmode || (GET_MODE (y) != mode && GET_MODE (y) != VOIDmode))
within emit_move_insn, because
the second parameter out of two parameters it gets is SImode, which is wrong
for some reason.
	I fail to find where this value comes from, why is it wrong and how to fix
it.

	I'll appreciate a lead if anyone can give me.

Regards,
	Liza Etkin



More information about the Gcc-help mailing list