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: Wed, 20 Aug 2014 14:19:08 +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> <1408470739 dot 3370 dot 16 dot camel at bordewijk dot wildebeest dot org> <CAFiYyc3f6A14OiiO-vktBTMdL3sLbA9dR0ZQ0LL1x8QLBakoSQ at mail dot gmail dot com>
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?
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)