This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30418] IVOPTS generates comparison with overflowed constant
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jan 2007 23:20:33 -0000
- Subject: [Bug tree-optimization/30418] IVOPTS generates comparison with overflowed constant
- References: <bug-30418-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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