https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103121

--- Comment #16 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---

> $3 = void
> (gdb) n    
> 326         max = wi::to_wide (vr.max ());
> (gdb) p range_type
> $4 = VR_RANGE
> (gdb) p debug_tree(vr.min())
>  <integer_cst 0x7ffff6da91e0 type <integer_type 0x7ffff78b69d8 size_t>
> constant 1>
> $5 = void
> (gdb) p debug_tree(vr.max())
>  <integer_cst 0x7ffff6da91e0 type <integer_type 0x7ffff78b69d8 size_t>
> constant 1>
> $6 = void

Do not look at min/max.  These have been deprecated for almost a year and a
half.  I've mention this before.  Similarly for range_type.  All these methods
are deprecated:

  // Deprecated legacy public methods.
  enum value_range_kind kind () const;          // DEPRECATED
  tree min () const;                            // DEPRECATED
  tree max () const;                            // DEPRECATED
  bool symbolic_p () const;                     // DEPRECATED
  bool constant_p () const;                     // DEPRECATED
  void normalize_symbolics ();                  // DEPRECATED
  void normalize_addresses ();                  // DEPRECATED
  bool may_contain_p (tree) const;              // DEPRECATED
  void set (tree);                              // DEPRECATED
  bool equal_p (const irange &) const;          // DEPRECATED
  void union_ (const class irange *);           // DEPRECATED
  void intersect (const irange *);              // DEPRECATED

To dump a range you can do:

(gdb) p debug(vr)

And really, you shouldn't be using value_range, but int_range<NN>.  You should
really convert your code to multi-ranges.  Using value_range is asking for
trouble.

Reply via email to