Using gcc 4.3.4 20090205, build under FreeBSD 7.1 from the FreeBSD port system
and with no local customization, I got the following:

$ gcc43 -c -O3 -fomit-frame-pointer x.c
x.c: In function 'op_cmp':
x.c:24: error: unrecognizable insn:
(insn 24 13 25 2 x.c:20 (set (reg:DI 68)
        (zero_extract:DI (subreg:DI (reg/v:SI 61 [ opcode ]) 0)
            (const_int 3 [0x3])
            (const_int 3 [0x3]))) -1 (expr_list:REG_DEAD (reg/v:SI 61 [ opcode
])
        (nil)))
x.c:24: internal compiler error: in extract_insn, at recog.c:1990




Here are the contents of x.c:

typedef unsigned int uint;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;

typedef struct CPU CPU;
struct CPU {
        uint8_t regs[8];
        uint16_t cc;
};

void    
op_cmp(CPU *c, uint32_t opcode)
{
        uint src = opcode & 7;
        uint dst = (opcode >> 3) & 7;
        uint8_t s = c->regs[src];
        uint8_t t = c->regs[dst];
        uint16_t cc;
        asm("sub" " %3, %1\n\t.byte 0x9F\n\tseto %%al"
            : "=a,a" (cc), "=r,r" (t)
            : "1,1" ((uint8_t) (t)), "r,n" ((uint8_t) (s)));
        c->cc = cc;
}


Finally, here is the output of gcc43 -v:
$ gcc43 -v
Using built-in specs.
Target: x86_64-portbld-freebsd7.1
Configured with: ./..//gcc-4.3-20090205/configure --disable-nls
--with-system-zlib --with-libiconv-prefix=/usr/local --with-gmp=/usr/local
--program-suffix=43 --libdir=/usr/local/lib/gcc-4.3.4
--with-gxx-include-dir=/usr/local/lib/gcc-4.3.4/include/c++/ --disable-libgcj
--prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc43
--build=x86_64-portbld-freebsd7.1
Thread model: posix
gcc version 4.3.4 20090205 (prerelease) (GCC)


-- 
           Summary: internal compiler error from asm statement on AMD64
                    under FreeBSD 7.1
           Product: gcc
           Version: 4.3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mike at ducky dot net
 GCC build triplet: x86_64-portbld-freebsd7.1
  GCC host triplet: x86_64-portbld-freebsd7.1
GCC target triplet: x86_64-portbld-freebsd7.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39199

Reply via email to