This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lno] ICE with large unsigned loop bound


Hello,

> on Alpha (when adding #define UNITS_PER_WORD 8) I get an ICE with gcc
> -O -ftree-vectorize for this code:
> 
> extern char call_used_regs[64];
> void dw2_build_landing_pads(void)
> {
>     unsigned int j;
>     for (j = 0; j < 0xffff0000; ++j) {
> 	if (call_used_regs[j]) { }
>     }
> }
> 
> test.c: In function `dw2_build_landing_pads':
> test.c:4: internal compiler error: in tree_low_cst, at tree.c:3559
> 
> (the -ftree-vectorize and "if" seems to be just needed to get the loop
> analyzer interested in the loop)
> 
> The problem seems to be that the number of iterations (niter) in
> canonicalize_loop_induction_variables is "overflow -65536". This
> eventually comes from first_iteration_non_satisfying_ev_noev calling
> fold with integer_type_node, which seems wrong. Shouldn't it rather be
> size_type_node or the actual type of the iv?

it definitely should be the type of the induction variable (better said,
its unsigned variant).  Unfortunately there are quite a few such type
wrong relicts from the earlier versions of the scev analysis :-(.
Sebastian, could you please fix this one (and other related you come
over)?

Thanks,

Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]