Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Silly gcc bugs



Hi,

While trying to compile devel/pkg-config, I saw lots of problems like:

gchecksum.c: In function 'sha512_sum_init':
gchecksum.c:1122: warning: integer constant is too large for 'long' type
gchecksum.c:1123: warning: integer constant is too large for 'long' type
...

sha512_sum_init is of type Sha512sum, which is guint64, which is supposedly guaranteed to be 64 bits. However, the compiler doesn't agree. Changing:

  sha512->H[0] = 0x6a09e667f3bcc908;
to
  sha512->H[0] = 0x6a09e667f3bcc908ULL;

makes it work. gcc bug?

This, by the way, is gcc 4.1.3 on NetBSD 6.1.5 since gcc 4.8, AFAIK, is not yet producing code natively.

Even after fixing that, though, compilation fails in the same file:

gchecksum.c: In function 'sha512_transform':
gchecksum.c:1250: error: insn does not satisfy its constraints:
(insn 516 457 479 2 (set (reg:SI 0 %r0)
        (reg/f:SI 17 virtual-stack-vars)) 16 {movsi_2} (nil)
    (nil))
gchecksum.c:1250: internal compiler error: in reload_cse_simplify_operands, at postreload.c:393

Ideas?

John


Home | Main Index | Thread Index | Old Index