Hi,
this is updated version of the patch. As discussed on IRC, C++ has two
different types of references (rvalue and normal). They have different
canonical type, but this does not affect outcome of get_alias_set
because it rebuilds the pointer/reference types from scratch.
The effect of this patch
On November 5, 2018 5:11:09 PM GMT+01:00, Jan Hubicka wrote:
>> Hi,
>> this is patch I ended up testing. It ensures that canonical types of
>> copies I create are same as of originals C++ FE has its own refernece
>piece of mail got lost rendering the paragraph unreadable. I wanted to
>say:
>
>Th
> Hi,
> this is patch I ended up testing. It ensures that canonical types of
> copies I create are same as of originals C++ FE has its own refernece
piece of mail got lost rendering the paragraph unreadable. I wanted to say:
This is patch I ended up testing. It ensures that canonical types of
c
Hi,
this is patch I ended up testing. It ensures that canonical types of
copies I create are same as of originals C++ FE has its own refernece
type construction (cp_build_reference_type) and it creates additional
pointer types with TYPE_REF_IS_RVALUE set and it has different
TYPE_CANONICAL.
Obvio
> > + gcc_assert (TYPE_CANONICAL (t2) != t2
> > + && TYPE_CANONICAL (t2) == TYPE_CANONICAL (TREE_TYPE (t)));
> > + TYPE_CANONICAL (first) = TYPE_CANONICAL (TYPE_MAIN_VARIANT (t));
>
> as said the TYPE_CANONICAL assign should be already done exactly this
> way in build_{poit
On Mon, 5 Nov 2018, Jan Hubicka wrote:
> > Hmm, this _should_ be a no-op. Can you, before that line, add
> >
> > gcc_assert (TYPE_CANONICAL (t2) != t2
> > && TYPE_CANONICAL (t2) == TYPE_CANONICAL (TREE_TYPE (t)));
> >
> > ? That is, the incomplete variant should share TYPE_CANO
> Hmm, this _should_ be a no-op. Can you, before that line, add
>
> gcc_assert (TYPE_CANONICAL (t2) != t2
> && TYPE_CANONICAL (t2) == TYPE_CANONICAL (TREE_TYPE (t)));
>
> ? That is, the incomplete variant should share TYPE_CANONICAL with
> the pointed-to type and be _not_ the ca
On Mon, 5 Nov 2018, Jan Hubicka wrote:
> Hi,
> this patch fixes the miscompare I introduced to spec2006 GCC benchmark
> when build with LTO.
> The problem is that fld_incomplete_type_of builds new pointer type to
> incomplete type rather than complete but it ends up giving wrong type
> canonical.