OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20020430-1.c] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* PR opt/6516 */
/* PR opt/6516 */
/* On x86, something about the structure of this function prevented
/* On x86, something about the structure of this function prevented
   cross-jumping from combining the three arms of the switch statement
   cross-jumping from combining the three arms of the switch statement
   until the last moment.  After which we did not delete dead code,
   until the last moment.  After which we did not delete dead code,
   which left a reference to the deleted ADDR_VEC.  */
   which left a reference to the deleted ADDR_VEC.  */
 
 
/* { dg-do compile { target fpic } } */
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -frename-registers -fpic" } */
/* { dg-options "-O2 -frename-registers -fpic" } */
 
 
typedef unsigned long XID;
typedef unsigned long XID;
typedef XID Window;
typedef XID Window;
typedef void Display;
typedef void Display;
typedef unsigned long Time;
typedef unsigned long Time;
 
 
typedef struct {
typedef struct {
        int type;
        int type;
        unsigned long serial;
        unsigned long serial;
        int send_event;
        int send_event;
        Display *display;
        Display *display;
        Window window;
        Window window;
        Window root;
        Window root;
        Window subwindow;
        Window subwindow;
        Time time;
        Time time;
        int x, y;
        int x, y;
        int x_root, y_root;
        int x_root, y_root;
        unsigned int state;
        unsigned int state;
        unsigned int button;
        unsigned int button;
        int same_screen;
        int same_screen;
} XButtonEvent;
} XButtonEvent;
typedef struct {
typedef struct {
        int type;
        int type;
        unsigned long serial;
        unsigned long serial;
        int send_event;
        int send_event;
        Display *display;
        Display *display;
        Window window;
        Window window;
        Window root;
        Window root;
        Window subwindow;
        Window subwindow;
        Time time;
        Time time;
        int x, y;
        int x, y;
        int x_root, y_root;
        int x_root, y_root;
        unsigned int state;
        unsigned int state;
        char is_hint;
        char is_hint;
        int same_screen;
        int same_screen;
} XMotionEvent;
} XMotionEvent;
typedef struct {
typedef struct {
        int type;
        int type;
        unsigned long serial;
        unsigned long serial;
        int send_event;
        int send_event;
        Display *display;
        Display *display;
        Window window;
        Window window;
        Window root;
        Window root;
        Window subwindow;
        Window subwindow;
        Time time;
        Time time;
        int x, y;
        int x, y;
        int x_root, y_root;
        int x_root, y_root;
        int mode;
        int mode;
        int detail;
        int detail;
        int same_screen;
        int same_screen;
        int focus;
        int focus;
        unsigned int state;
        unsigned int state;
} XCrossingEvent;
} XCrossingEvent;
typedef union _XEvent {
typedef union _XEvent {
        int type;
        int type;
        XButtonEvent xbutton;
        XButtonEvent xbutton;
        XMotionEvent xmotion;
        XMotionEvent xmotion;
        XCrossingEvent xcrossing;
        XCrossingEvent xcrossing;
} XEvent;
} XEvent;
 
 
typedef struct {
typedef struct {
        int width, height;
        int width, height;
        Display *display;
        Display *display;
} Screen;
} Screen;
typedef struct _CorePart {
typedef struct _CorePart {
    Screen *screen;
    Screen *screen;
} CorePart;
} CorePart;
typedef struct _WidgetRec {
typedef struct _WidgetRec {
    CorePart core;
    CorePart core;
} WidgetRec;
} WidgetRec;
typedef struct _WidgetRec *Widget;
typedef struct _WidgetRec *Widget;
 
 
typedef struct _SmeRec *SmeObject;
typedef struct _SmeRec *SmeObject;
typedef struct _SimpleMenuPart {
typedef struct _SimpleMenuPart {
    SmeObject entry_set;
    SmeObject entry_set;
} SimpleMenuPart;
} SimpleMenuPart;
typedef struct _SimpleMenuRec {
typedef struct _SimpleMenuRec {
    SimpleMenuPart simple_menu;
    SimpleMenuPart simple_menu;
} SimpleMenuRec;
} SimpleMenuRec;
typedef struct _SimpleMenuRec* SimpleMenuWidget;
typedef struct _SimpleMenuRec* SimpleMenuWidget;
 
 
typedef short Position;
typedef short Position;
typedef unsigned short Dimension;
typedef unsigned short Dimension;
typedef char Boolean;
typedef char Boolean;
 
 
typedef struct _RectObjPart {
typedef struct _RectObjPart {
    Position x, y;
    Position x, y;
    Dimension width, height;
    Dimension width, height;
    Dimension border_width;
    Dimension border_width;
    Boolean managed;
    Boolean managed;
    Boolean sensitive;
    Boolean sensitive;
    Boolean ancestor_sensitive;
    Boolean ancestor_sensitive;
}RectObjPart;
}RectObjPart;
typedef struct _RectObjRec {
typedef struct _RectObjRec {
    RectObjPart rectangle;
    RectObjPart rectangle;
} RectObjRec;
} RectObjRec;
typedef struct _RectObjRec *RectObj;
typedef struct _RectObjRec *RectObj;
 
 
SmeObject DoGetEventEntry();
SmeObject DoGetEventEntry();
 
 
SmeObject
SmeObject
GetEventEntry(Widget w, XEvent *event)
GetEventEntry(Widget w, XEvent *event)
{
{
    int x_loc, y_loc, x_root;
    int x_loc, y_loc, x_root;
    SimpleMenuWidget smw = (SimpleMenuWidget)w;
    SimpleMenuWidget smw = (SimpleMenuWidget)w;
    SmeObject entry;
    SmeObject entry;
    int warp, move;
    int warp, move;
    switch (event->type) {
    switch (event->type) {
        case 6:
        case 6:
            x_loc = event->xmotion.x;
            x_loc = event->xmotion.x;
            y_loc = event->xmotion.y;
            y_loc = event->xmotion.y;
            x_root = event->xmotion.x_root;
            x_root = event->xmotion.x_root;
            break;
            break;
        case 7:
        case 7:
        case 8:
        case 8:
            x_loc = event->xcrossing.x;
            x_loc = event->xcrossing.x;
            y_loc = event->xcrossing.y;
            y_loc = event->xcrossing.y;
            x_root = event->xcrossing.x_root;
            x_root = event->xcrossing.x_root;
            break;
            break;
        case 4:
        case 4:
        case 5:
        case 5:
            x_loc = event->xbutton.x;
            x_loc = event->xbutton.x;
            y_loc = event->xbutton.y;
            y_loc = event->xbutton.y;
            x_root = event->xbutton.x_root;
            x_root = event->xbutton.x_root;
            break;
            break;
        default:
        default:
            XtAppError(XtWidgetToApplicationContext(w),
            XtAppError(XtWidgetToApplicationContext(w),
                       "Unknown event type in GetEventEntry().");
                       "Unknown event type in GetEventEntry().");
            return (((void *)0));
            return (((void *)0));
    }
    }
    if (x_loc < 0 || x_loc >= (((RectObj)smw)->rectangle.width) ||
    if (x_loc < 0 || x_loc >= (((RectObj)smw)->rectangle.width) ||
        y_loc < 0 || y_loc >= (((RectObj)smw)->rectangle.height))
        y_loc < 0 || y_loc >= (((RectObj)smw)->rectangle.height))
        return (((void *)0));
        return (((void *)0));
    if (x_root == ((((w)->core.screen))->width) - 1 &&
    if (x_root == ((((w)->core.screen))->width) - 1 &&
        (((RectObj)w)->rectangle.x) + (((RectObj)w)->rectangle.width) + ((((RectObj)w)->rectangle.border_width)) > x_root) {
        (((RectObj)w)->rectangle.x) + (((RectObj)w)->rectangle.width) + ((((RectObj)w)->rectangle.border_width)) > x_root) {
        warp = -8;
        warp = -8;
        if (smw->simple_menu.entry_set) {
        if (smw->simple_menu.entry_set) {
            entry = DoGetEventEntry(w,
            entry = DoGetEventEntry(w,
                                    (((RectObj)smw->simple_menu.entry_set)->rectangle.x)
                                    (((RectObj)smw->simple_menu.entry_set)->rectangle.x)
                                    + (((RectObj)smw->simple_menu.entry_set)->rectangle.width) + 1,
                                    + (((RectObj)smw->simple_menu.entry_set)->rectangle.width) + 1,
                                    y_loc);
                                    y_loc);
            Unhighlight(w, event, ((void *)0), ((void *)0));
            Unhighlight(w, event, ((void *)0), ((void *)0));
            if (entry) {
            if (entry) {
                warp = -(int)(((RectObj)entry)->rectangle.width) >> 1;
                warp = -(int)(((RectObj)entry)->rectangle.width) >> 1;
                move = x_loc - (((RectObj)entry)->rectangle.width) - (((RectObj)entry)->rectangle.x) + (((RectObj)w)->rectangle.border_width);
                move = x_loc - (((RectObj)entry)->rectangle.width) - (((RectObj)entry)->rectangle.x) + (((RectObj)w)->rectangle.border_width);
            }
            }
            else {
            else {
                warp = 0;
                warp = 0;
                move = ((((w)->core.screen))->width) -
                move = ((((w)->core.screen))->width) -
                       ((((RectObj)w)->rectangle.x) + (((RectObj)w)->rectangle.width) + ((((RectObj)w)->rectangle.border_width) << 1));
                       ((((RectObj)w)->rectangle.x) + (((RectObj)w)->rectangle.width) + ((((RectObj)w)->rectangle.border_width) << 1));
            }
            }
        }
        }
        else {
        else {
            warp = 0;
            warp = 0;
            move = ((((w)->core.screen))->width) -
            move = ((((w)->core.screen))->width) -
                   ((((RectObj)w)->rectangle.x) + (((RectObj)w)->rectangle.width) + ((((RectObj)w)->rectangle.border_width) << 1));
                   ((((RectObj)w)->rectangle.x) + (((RectObj)w)->rectangle.width) + ((((RectObj)w)->rectangle.border_width) << 1));
        }
        }
    }
    }
    else if (x_root == 0 && (((RectObj)w)->rectangle.x) < 0) {
    else if (x_root == 0 && (((RectObj)w)->rectangle.x) < 0) {
        warp = 8;
        warp = 8;
        if (smw->simple_menu.entry_set) {
        if (smw->simple_menu.entry_set) {
            entry = DoGetEventEntry(w, (((RectObj)smw->simple_menu.entry_set)->rectangle.x) - 1,
            entry = DoGetEventEntry(w, (((RectObj)smw->simple_menu.entry_set)->rectangle.x) - 1,
                                    y_loc);
                                    y_loc);
            Unhighlight(w, event, ((void *)0), ((void *)0));
            Unhighlight(w, event, ((void *)0), ((void *)0));
            if (entry) {
            if (entry) {
                warp = (((RectObj)entry)->rectangle.width) >> 1;
                warp = (((RectObj)entry)->rectangle.width) >> 1;
                move = x_loc - (((RectObj)entry)->rectangle.x);
                move = x_loc - (((RectObj)entry)->rectangle.x);
            }
            }
            else
            else
                move = x_loc + (((RectObj)w)->rectangle.border_width);
                move = x_loc + (((RectObj)w)->rectangle.border_width);
        }
        }
        else
        else
            move = x_loc + (((RectObj)w)->rectangle.border_width);
            move = x_loc + (((RectObj)w)->rectangle.border_width);
    }
    }
    else
    else
        move = warp = 0;
        move = warp = 0;
    if (move)
    if (move)
        XtMoveWidget(w, (((RectObj)w)->rectangle.x) + move, (((RectObj)w)->rectangle.y));
        XtMoveWidget(w, (((RectObj)w)->rectangle.x) + move, (((RectObj)w)->rectangle.y));
    if (warp)
    if (warp)
        XWarpPointer((((w)->core.screen)->display), 0L, 0L, 0, 0, 0, 0, warp, 0);
        XWarpPointer((((w)->core.screen)->display), 0L, 0L, 0, 0, 0, 0, warp, 0);
    return (DoGetEventEntry(w, x_loc, y_loc));
    return (DoGetEventEntry(w, x_loc, y_loc));
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.