This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add guality [p]type test.
- From: Mark Wielaard <mjw at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>, Cary Coutant <ccoutant at google dot com>, Alexandre Oliva <aoliva at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 19 Aug 2014 19:52:19 +0200
- Subject: Re: [PATCH] Add guality [p]type test.
- Authentication-results: sourceware.org; auth=none
- References: <1403265071 dot 6147 dot 5 dot camel at bordewijk dot wildebeest dot org> <1404381209-11280-1-git-send-email-mjw at redhat dot com> <CAFiYyc2xMDLEJEK2iNbzjmt0tVsDzT1XLtt_0-vpVUzF1kHEXg at mail dot gmail dot com> <1408446359 dot 3370 dot 12 dot camel at bordewijk dot wildebeest dot org> <CAFiYyc0X-82YOWT0yv9U3fPRW9FWPEgj3ouOqxeTzg4PLf5yUg at mail dot gmail dot com> <1408450238 dot 3370 dot 14 dot camel at bordewijk dot wildebeest dot org> <CAFiYyc0tV00kt1bqN9as4DcFhrDWcaUqCyLz3TUDEbSFYSbCoQ at mail dot gmail dot com>
On Tue, 2014-08-19 at 14:16 +0200, Richard Biener wrote:
> On Tue, Aug 19, 2014 at 2:10 PM, Mark Wielaard <mjw@redhat.com> wrote:
> > gcc/testsuite/ChangeLog
> > 2014-08-19 Mark Wielaard <mjw@redhat.com>
> >
> > * gcc.dg/guality/restrict.c: Add `used' attribute to all variables.
> > (cpy): Change type of last argument to int.
> >
> > That last change is necessary to succeed with LTO. Otherwise the type of
> > the function:
> >
> > static __attribute__((noclone, noinline)) void *
> > cpy (void * restrict s1, const void * restrict s2, unsigned int n)
> >
> > comes out as:
> >
> > void *(void * restrict, const void * restrict, __unknown__)
> >
> > That seems a genuine bug. Should I commit the cpy function type change
> > to make the test PASS with LTO? Or leave it as is so it FAILs and
> > someone else can look into it?
>
> Yeah, that's a genuine bug. Not sure why it happens. If you file a bug
> I can have a look later.
Filed as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62190 "LTO DWARF
produces __unknown__ type for unsigned int function argument type".
I included a smaller testcase in the bug that can just be dropped into
gcc/testsuite/gcc.dg/guality/ to show the issue. Shall I just commit the
change to the restrict.c testcase, so at least that one always PASSes
for now?
Cheers,
Mark