This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug in egcs-1.1 (reduced testcase included)(PPC)


Hi,

on powerpc-unknown-linux-gnu I got the following error with egcs-2.91.53
19980809:

dialog.i: In function `AddButtons':
dialog.i:65: internal error--insn does not satisfy its constraints:
(insn 324 97 325 (set (reg:SI 0 r0)
        (high:SI (symbol_ref:SI ("*.LC2")))) 395 {elf_high} (nil)
    (nil))
../../../egcs/gcc/toplev.c:1360: Internal compiler error in function
fatal_insn

while compiling the attached code with -O2. -fpic, -fPIC, -O1 or
-funroll-all-loops make the error go away.

Franz.



/* this code is not compilable with -O2 on powerpc-unknown-linux-gnu */

typedef unsigned int size_t;
typedef void *XtPointer;

typedef struct _WidgetRec *Widget;
typedef struct _WidgetClassRec *WidgetClass;

extern WidgetClass commandWidgetClass;

typedef void (*XtCallbackProc)(
    Widget 		 ,
    XtPointer 		 ,	 
    XtPointer 		 	 
);

extern void XtAddCallback(
    Widget 		 ,
    const  char*  	 ,
    XtCallbackProc 	 ,
    XtPointer 		 
);

extern Widget XtVaCreateManagedWidget(
    const  char* 	 ,
    WidgetClass		 ,
    Widget		 ,
    ...
);

extern const  char XtStrings[];


typedef struct						 
{
	char			*Name,			 
				*Label;			 
	XtCallbackProc		Callback;		 
	XtPointer		ClientData;		 
	Widget			W;				 
} DialogButtonType, *DialogButtonTypePtr;

 
Widget AddButtons(Widget Parent, Widget Top,
	DialogButtonTypePtr Buttons, size_t Count)
{
	int		i;

	for (i = 0; i < Count; i++)
	{
		if (!Buttons[i].Label)
			continue;
		Buttons[i].W  = XtVaCreateManagedWidget(Buttons[i].Name,
			commandWidgetClass,
			Parent,
			((char*)&XtStrings[429]) , Buttons[i].Label,
			"fromHoriz" , i ? Buttons[i-1].W : ((void *)0) ,
			"fromVert" , Top,
			"resizable" , 1 ,
			((void *)0) );

		XtAddCallback(Buttons[i].W,
			((char*)&XtStrings[136]) , Buttons[i].Callback, Buttons[i].ClientData);
	}
	return(Buttons[Count-1].W);
}



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]