Message ID | 1408537148.3610.9.camel@bordewijk.wildebeest.org |
---|---|
State | New |
Headers | show |
On Wed, Aug 20, 2014 at 2:19 PM, Mark Wielaard <mjw@redhat.com> wrote: > On Wed, 2014-08-20 at 10:49 +0200, Richard Biener wrote: >> On Tue, Aug 19, 2014 at 7:52 PM, Mark Wielaard <mjw@redhat.com> wrote: >> > 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? >> >> No need - I have a fix in testing. > > Thanks, that fix works for me. But I still need to mark the variables as > used in the restrict.c test case to turn them from UNSUPPORTED to PASS > with LTO. > > 2014-08-20 Mark Wielaard <mjw@redhat.com> > > * gcc.dg/guality/restrict.c: Add `used' attribute to all variables. > > OK to push? Ok. Thanks, Richard. > Thanks, > > Mark > > diff --git a/gcc/testsuite/gcc.dg/guality/restrict.c b/gcc/testsuite/gcc.dg/guality/restrict.c > index e31224b..62d7832 100644 > --- a/gcc/testsuite/gcc.dg/guality/restrict.c > +++ b/gcc/testsuite/gcc.dg/guality/restrict.c > @@ -2,16 +2,16 @@ > /* { dg-do run } */ > /* { dg-options "-std=c99 -gdwarf-3" } */ > > -int *ip; > -const int *cip; > -int * restrict irp; > -int * const icp; > -const int * restrict cirp; > -int * const restrict icrp; > -const int * const restrict cicrp; > - > -int * const volatile restrict cvirp; > -const volatile int * restrict pcvir; > +int *ip __attribute__((used)); > +const int *cip __attribute__((used)); > +int * restrict irp __attribute__((used)); > +int * const icp __attribute__((used)); > +const int * restrict cirp __attribute__((used)); > +int * const restrict icrp __attribute__((used)); > +const int * const restrict cicrp __attribute__((used)); > + > +int * const volatile restrict cvirp __attribute__((used)); > +const volatile int * restrict pcvir __attribute__((used)); > > static __attribute__((noclone, noinline)) void * > cpy (void * restrict s1, const void * restrict s2, unsigned int n) >
diff --git a/gcc/testsuite/gcc.dg/guality/restrict.c b/gcc/testsuite/gcc.dg/guality/restrict.c index e31224b..62d7832 100644 --- a/gcc/testsuite/gcc.dg/guality/restrict.c +++ b/gcc/testsuite/gcc.dg/guality/restrict.c @@ -2,16 +2,16 @@ /* { dg-do run } */ /* { dg-options "-std=c99 -gdwarf-3" } */ -int *ip; -const int *cip; -int * restrict irp; -int * const icp; -const int * restrict cirp; -int * const restrict icrp; -const int * const restrict cicrp; - -int * const volatile restrict cvirp; -const volatile int * restrict pcvir; +int *ip __attribute__((used)); +const int *cip __attribute__((used)); +int * restrict irp __attribute__((used)); +int * const icp __attribute__((used)); +const int * restrict cirp __attribute__((used)); +int * const restrict icrp __attribute__((used)); +const int * const restrict cicrp __attribute__((used)); + +int * const volatile restrict cvirp __attribute__((used)); +const volatile int * restrict pcvir __attribute__((used)); static __attribute__((noclone, noinline)) void * cpy (void * restrict s1, const void * restrict s2, unsigned int n)