This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Testcase for old bug



This is a testcase for a bug we fixed some time ago (merge_blocks_nomove
buglets from Aug 2000).

I recently had to backport a fix from Aug 2000 to an old rev of the
compiler (Richard's merge_blocks_nomove changes).   One of the tests
I ran involved running the current c-torture suite through that old
compiler before/after my change.  I was somewhat surprised that no
test in our testsuite actually tests the bug in question.

So I figured I might as well contribute a testcase for Richard's changes :-)

Installed on the mainline as c-torture/compile/20020314-1.c


typedef struct tux_req_struct tux_req_t;
struct tux_req_struct
{
        struct socket *sock;
        char usermode;
        char *userbuf;
        unsigned int userlen;
        char error;
        void *private;
};
void user_send_buffer (tux_req_t *req, int cachemiss)
{
        int ret;
repeat:
        switch (ret) {
                case -11:
                        if (add_output_space_event(req, req->sock)) {
                                del_tux_atom(req);
                                goto repeat;
                        }
                        do { } while (0);
                        break;
                default:
                        add_req_to_workqueue(req);
        }
}




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