$ /usr/bin/gcc-3.3  -I../../tpd-include  -E -DKERNEL_26 emlib.c -o emlib.i
cc1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-3.3/README.Bugs>.


Sending the output to stdout instead, I get this:

static char const *
pfail_evt_type_desc_to_str(tpd_u32 evt_type)
{
    switch (evt_type) {
        case 0x400:
           ||<<<end of output

The source looks like this, clearly with some incompleted editing.
Also, when cut down like this, it does not fault.  I'm guessing that
when I fix up the source it won't fault either.

typedef unsigned int tpd_u32;

#define PFAIL_EVENT 0x1
#define PFAIL_RD_DONE_EVENT 0x2
#define PFAIL_RD_FIRST_PH_DONE_EVENT 0x4
#define PFAIL_RD_SECOND_PH_DONE_EVENT 0x8
#define PFAIL_RD_THIRD_PH_DONE_EVENT 0x10
#define PFAIL_RD_FOURTH_PH_DONE_EVENT 0x20
#define PFAIL_LDCK_VV   0x40
#define PFAIL_LDCK_LD   0x80
#define PFAIL_CHPIN_FAIL 0x100
#define PFAIL_TOC_QUORUM 0x200
#define PFAIL_LOAD_CRDT_DONE_EVENT 0x400

static char const *
pfail_evt_type_desc_to_str(tpd_u32 evt_type)
{
    switch (evt_type) {
        case PFAIL_LOAD_CRDT_DONE_EVENT:
            evt_debug("Load credit info complete from node %d\n",
        case PFAIL_RD_FIRST_PH_DONE_EVENT:
            evt_debug("First phase of rd complete from node %d\n",
        case PFAIL_RD_SECOND_PH_DONE_EVENT:
            evt_debug("Second phase of rd complete from node %d\n",
        case PFAIL_RD_THIRD_PH_DONE_EVENT:
            evt_debug("Third phase of rd complete from node %d\n",
        case PFAIL_RD_FOURTH_PH_DONE_EVENT:
            evt_debug("Fourth phase of rd complete from node %d\n",
        case PFAIL_RD_DONE_EVENT:
            evt_debug("Rd done event from node %d\n",
        case PFAIL_EVENT:
            evt_debug("pfail event from node %d\n",
        case PFAIL_LDCK_VV:
            evt_debug("ide recovery says that vv %d needs checkld\n",
        case PFAIL_LDCK_LD:
            evt_debug("ide recovery says that ld %d needs checkld\n",
        case PFAIL_CHPIN_FAIL:
            evt_debug("chpin fail event from node %d\n",
        case PFAIL_TOC_QUORUM:
            evt_debug("tocsvr requested pfail start\n");
        default:
            tpd_panic("Unknown event 0x%x received from node %d",
                      }
}

Reply via email to