------- Comment #2 from rguenth at gcc dot gnu dot org  2007-01-09 23:20 -------
Maybe fold_convert_const_int_from_int should not set TREE_OVERFLOW on
conversions
that conform to implementation defined behavior.  Dunno.  Or I should not
assert here.  Or we should clear those flags at some point.

The following creates an overflowed constant already from the frontend
(reduced from alias.c):

typedef struct VEC_alias_set_entry_base {
  unsigned num;
} VEC_alias_set_entry_base;
typedef struct VEC_alias_set_entry_gc {
  VEC_alias_set_entry_base base;
} VEC_alias_set_entry_gc;
static VEC_alias_set_entry_gc *alias_sets;
long new_alias_set (void)
{
  VEC_alias_set_entry_base *vec_ = (alias_sets ? &alias_sets->base : 0);
  return (vec_ ? vec_->num : 0) - 1;
}


-- 


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

Reply via email to