restrict-2.c: New testcase.
2013-10-29 Richard Biener <rguenther@suse.de> * gcc.dg/torture/restrict-2.c: New testcase. * gcc.dg/torture/restrict-3.c: Likewise. * gcc.dg/torture/restrict-4.c: Likewise. * gcc.dg/torture/restrict-5.c: Likewise. From-SVN: r204162
This commit is contained in:
parent
4879f42a07
commit
72a6cdded1
5 changed files with 111 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2013-10-29 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* gcc.dg/torture/restrict-2.c: New testcase.
|
||||
* gcc.dg/torture/restrict-3.c: Likewise.
|
||||
* gcc.dg/torture/restrict-4.c: Likewise.
|
||||
* gcc.dg/torture/restrict-5.c: Likewise.
|
||||
|
||||
2013-10-29 Marc Glisse <marc.glisse@inria.fr>
|
||||
|
||||
PR tree-optimization/19831
|
||||
|
|
27
gcc/testsuite/gcc.dg/torture/restrict-2.c
Normal file
27
gcc/testsuite/gcc.dg/torture/restrict-2.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* { dg-do run } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
static inline void
|
||||
foo (int * p)
|
||||
{
|
||||
int * __restrict pr = p;
|
||||
*pr = 1;
|
||||
}
|
||||
|
||||
int __attribute__((noinline,noclone))
|
||||
bar (int *q)
|
||||
{
|
||||
int * __restrict qr = q;
|
||||
*qr = 0;
|
||||
foo (qr);
|
||||
return *qr;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int i;
|
||||
if (bar (&i) != 1)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
26
gcc/testsuite/gcc.dg/torture/restrict-3.c
Normal file
26
gcc/testsuite/gcc.dg/torture/restrict-3.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* { dg-do run } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
static inline void
|
||||
foo (int * __restrict pr)
|
||||
{
|
||||
*pr = 1;
|
||||
}
|
||||
|
||||
int __attribute__((noinline,noclone))
|
||||
bar (int *q)
|
||||
{
|
||||
int * __restrict qr = q;
|
||||
*qr = 0;
|
||||
foo (qr);
|
||||
return *qr;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int i;
|
||||
if (bar (&i) != 1)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
26
gcc/testsuite/gcc.dg/torture/restrict-4.c
Normal file
26
gcc/testsuite/gcc.dg/torture/restrict-4.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* { dg-do run } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
static inline void
|
||||
foo (int * p)
|
||||
{
|
||||
int * __restrict pr = p;
|
||||
*pr = 1;
|
||||
}
|
||||
|
||||
int __attribute__((noinline,noclone))
|
||||
bar (int * __restrict qr)
|
||||
{
|
||||
*qr = 0;
|
||||
foo (qr);
|
||||
return *qr;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int i;
|
||||
if (bar (&i) != 1)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
25
gcc/testsuite/gcc.dg/torture/restrict-5.c
Normal file
25
gcc/testsuite/gcc.dg/torture/restrict-5.c
Normal file
|
@ -0,0 +1,25 @@
|
|||
/* { dg-do run } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
static inline void
|
||||
foo (int * __restrict pr)
|
||||
{
|
||||
*pr = 1;
|
||||
}
|
||||
|
||||
int __attribute__((noinline,noclone))
|
||||
bar (int * __restrict qr)
|
||||
{
|
||||
*qr = 0;
|
||||
foo (qr);
|
||||
return *qr;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int i;
|
||||
if (bar (&i) != 1)
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue