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 target/79671] [7 Regression] mapnik miscompilation on armv7hl since r235622


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

--- Comment #52 from rguenther at suse dot de <rguenther at suse dot de> ---
On Mon, 27 Mar 2017, bernd.edlinger at hotmail dot de wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79671
> 
> --- Comment #51 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
> Doesn't 3.10/10 explicitly say that it is undefined to use a union to
> to move an object representation that is not a member of the union?

That was my reading...  but 3.10/10 talks about "attempts to access
the stored value of an object" and Jason says that this doesn't apply
to  d = *p but the result of the decomposition to memberwise copy
plus union special handling (where it wouldn't apply at all)

So the question (DR?) is whether 3.10/10 applies to the access as
written in the source or to it after the decomposition happened.

> "If a program attempts to access the stored value of an object through a
> glvalue of other than one of the
> following types the behavior is undefined:52
> — the dynamic type of the object,
> — a cv-qualified version of the dynamic type of the object,
> — a type similar (as defined in 4.4) to the dynamic type of the object,
> — a type that is the signed or unsigned type corresponding to the dynamic type
> of the object,
> — a type that is the signed or unsigned type corresponding to a cv-qualified
> version of the dynamic type
> of the object,
> — an aggregate or union type that includes one of the aforementioned types
> among its elements or non-
> static data members (including, recursively, an element or non-static data
> member of a subaggregate
> or contained union),
> — a type that is a (possibly cv-qualified) base class type of the dynamic type
> of the object,
> — a char or unsigned char type."

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