This very simple program comes from the gcc testsuite in the gcc.c-torture folder. When I compile it I get an error: unable to generate reloads. This error is contingent on the -O.
-----------------
unsigned sat_add (unsigned i)
{
unsigned ret = i + 1;
if (ret < i)
ret = i;
return ret;
}
int main(void){;}
---------------
$ m6811-elf-gcc.exe -O -minmax -mshort -m68hcs12 arith1.c
arith1.c: In function `sat_add':
arith1.c:7: error: unable to generate reloads for:
(insn 35 9 23 0 7972d0 (set (reg/v:HI 0 x [55])
(umax:HI (reg/v:HI 0 x [55])
(reg/v:HI 2 y [54]))) 45 {umaxhi3} (insn_list 9 (nil))
(expr_list:REG_DEAD (reg/v:HI 2 y [54])
(nil)))
arith1.c:7: internal compiler error: in find_reloads, at reload.c:3694
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
If you have any suggestions please let me know. Thank you for your time!
-Ben
-----------------
unsigned sat_add (unsigned i)
{
unsigned ret = i + 1;
if (ret < i)
ret = i;
return ret;
}
int main(void){;}
---------------
$ m6811-elf-gcc.exe -O -minmax -mshort -m68hcs12 arith1.c
arith1.c: In function `sat_add':
arith1.c:7: error: unable to generate reloads for:
(insn 35 9 23 0 7972d0 (set (reg/v:HI 0 x [55])
(umax:HI (reg/v:HI 0 x [55])
(reg/v:HI 2 y [54]))) 45 {umaxhi3} (insn_list 9 (nil))
(expr_list:REG_DEAD (reg/v:HI 2 y [54])
(nil)))
arith1.c:7: internal compiler error: in find_reloads, at reload.c:3694
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
If you have any suggestions please let me know. Thank you for your time!
-Ben