This is the mail archive of the gcc-patches@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]

Re: [PATCH] Do not ICE for incomplete types in ICF (PR ipa/85607).


On Mon, May 21, 2018 at 9:27 AM Martin Liška <mliska@suse.cz> wrote:

> PING^1

OK.

> On 05/11/2018 03:12 PM, Martin Liška wrote:
> > On 05/11/2018 11:35 AM, Richard Biener wrote:
> >> On Thu, May 10, 2018 at 9:58 AM, Martin Liška <mliska@suse.cz> wrote:
> >>> Hi.
> >>>
> >>> It's removal of an assert at place where we calculate hash of a type.
> >>> For incomplete types, let's skip it.
> >>>
> >>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>>
> >>> Ready to be installed?
> >>
> >> Seems to be a redundant check in the !val case as well.  Also why not
> >> at least do
> >>
> >>           hstate2.add_int (RECORD_TYPE);
> >>
> >> for incomplete types?
> >
> > Thanks, done that.
> >
> >  That said, your patch fixes the ICE but what
> >> is supposed to happen for incomplete types?  Note that with LTO
> >> we no longer "complete" types so you can see a mix of struct S;
> >> and struct S { .... }; in the IL.  It looks like comparison later just
> >> looks at types_compatible_p here.
> >
> > Yes, that should be fine. The hashing of types is only an optimization.
> >
> >>
> >> Anyway, please at least remove the other redundant assert.
> >
> > Done and tested.
> >
> > Martin
> >
> >>
> >> Thanks,
> >> Richard.
> >>
> >>> Martin
> >>>
> >>>
> >>> gcc/ChangeLog:
> >>>
> >>> 2018-05-09  Martin Liska  <mliska@suse.cz>
> >>>
> >>>         PR ipa/85607
> >>>         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete
types.
> >>>
> >>> gcc/testsuite/ChangeLog:
> >>>
> >>> 2018-05-09  Martin Liska  <mliska@suse.cz>
> >>>
> >>>         PR ipa/85607
> >>>         * g++.dg/ipa/pr85606.C: New test.
> >>> ---
> >>>  gcc/ipa-icf.c                      |  5 ++++-
> >>>  gcc/testsuite/g++.dg/ipa/pr85606.C | 14 ++++++++++++++
> >>>  2 files changed, 18 insertions(+), 1 deletion(-)
> >>>  create mode 100644 gcc/testsuite/g++.dg/ipa/pr85606.C
> >>>
> >>>
> >


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