Re: [PATCH] [ranger] Force buffer alignment in Value_Range [PR114912]

2024-05-08 Thread Aldy Hernandez
Pushed to trunk to unblock sparc. On Fri, May 3, 2024 at 4:24 PM Aldy Hernandez wrote: > > Ahh, that is indeed cleaner, and there's no longer a need to assert > the sizeof of individual ranges. > > It looks like a default constructor is needed for the buffer now, but > only for the default

Re: [PATCH] [ranger] Force buffer alignment in Value_Range [PR114912]

2024-05-03 Thread Aldy Hernandez
ge = new (_buffer) int_range_max (as_a (r)); > >else if (is_a (r)) > > -m_vrange = new (_buffer) frange (as_a (r)); > > + m_vrange = new (_buffer) frange (as_a (r)); > >else > > -m_vrange = new (_buffer) unsupported_range (as_a > > (r)

Re: [PATCH] [ranger] Force buffer alignment in Value_Range [PR114912]

2024-05-03 Thread Andrew Pinski
On Fri, May 3, 2024 at 2:24 AM Aldy Hernandez wrote: > > Sparc requires strict alignment and is choking on the byte vector in > Value_Range. Is this the right approach, or is there a more canonical > way of forcing alignment? I think the suggestion was to change over to use an union and use the

[PATCH] [ranger] Force buffer alignment in Value_Range [PR114912]

2024-05-03 Thread Aldy Hernandez
Sparc requires strict alignment and is choking on the byte vector in Value_Range. Is this the right approach, or is there a more canonical way of forcing alignment? If this is correct, OK for trunk? gcc/ChangeLog: * value-range.h (class Value_Range): Use a union. --- gcc/value-range.h