This is the mail archive of the gcc-bugs@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]

[Bug c++/31183] ICE in int_cst_value, at tree.c:7684 with -O3 -ftree-loop-linear



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-03-15 13:44 -------
Uh:

static void
gather_interchange_stats (VEC (ddr_p, heap) *dependence_relations,
                          VEC (data_reference_p, heap) *datarefs,
                          struct loop *loop,
                          struct loop *first_loop,
                          unsigned int *dependence_steps,
                          unsigned int *nb_deps_not_carried_by_loop,
                          unsigned int *access_strides)
{
...
         (*access_strides) +=
            int_cst_value (array_size) * int_cst_value (tstride);

nonono, int_cst_value returns a HOST_WIDE_INT, you cannot store that into
an unsigned int.  Also int_cst_value does ICE if array_size's type doesn't
fit a HOST_WIDE_INT.  There is host_integerp () to verify if a tree int
fits HOST_WIDE_INT.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sebastian dot pop at cri dot
                   |                            |ensmp dot fr


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


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