egcs-19980502 sparc.md cmpdi_v8plus falls off end of non-void func
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Tue May 5 14:02:00 GMT 1998
From sparc.md, cmpdi_v8plus generates code for a function in
insn-output.c which looks like this:
> static char *
> output_7 (operands, insn)
> rtx *operands ATTRIBUTE_UNUSED;
> rtx insn ATTRIBUTE_UNUSED;
> {
>
> {
> /* The srl can be omitted if the value in the %L0 or %L1 is already
> zero extended. */
>
> output_asm_insn ("sllx %H0,32,%2", operands);
>
> if (sparc_check_64 (operands[0], insn) <= 0)
> output_asm_insn ("srl %L0,0,%L0", operands);
>
> switch (which_alternative)
> {
> case 0:
> return "orcc %L0,%2,%%g0";
> case 1:
> return "or %L0,%2,%2\n\tcmp %2,%1";
> case 2:
> if (sparc_check_64 (operands[1], insn) <= 0)
> output_asm_insn ("srl %L1,0,%L1", operands);
> return "sllx %H1,32,%3\n\tor %L0,%2,%2\n\tor %L1,%3,%3\n\tcmp %2,%3";
> }
> }
> }
Gcc warns about this:
> insn-output.c: In function `output_7':
> insn-output.c:50: warning: control reaches end of non-void function
So I think a default: case for the switch should be added to
either abort or return a valid default value.
--Kaveh
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu Icon CMT Corp.
More information about the Gcc-bugs
mailing list