Backport PRs 39754, 40007, 40233, 40238, 40252, 40254
2009-05-30 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline: 2009-05-28 Dodji Seketeli <dodji@redhat.com> PR c++/39754 * g++.dg/template/canon-type-1.C: New test. * g++.dg/template/canon-type-2.C: Likewise. * g++.dg/template/canon-type-3.C: Likewise. * g++.dg/template/canon-type-4.C: Likewise. * g++.dg/template/canon-type-5.C: Likewise. * g++.dg/template/canon-type-6.C: Likewise. * g++.dg/template/canon-type-7.C: Likewise. 2009-05-28 Ira Rosen <irar@il.ibm.com> PR tree-optimization/40254 * gcc.dg/vect/pr40254.c: New test. 2009-05-26 Richard Guenther <rguenther@suse.de> PR middle-end/40252 * gcc.c-torture/compile/pr40252.c: New testcase. 2009-05-26 Dodji Seketeli <dodji@redhat.com> PR c++/40007 * g++.dg/template/typedef18.C: New test. * g++.dg/template/typedef19.C: Likewise. * g++.dg/template/typedef20.C: Likewise. 2009-05-25 Ira Rosen <irar@il.ibm.com> PR tree-optimization/40238 * gcc.dg/vect/pr40238.c: New test. 2009-05-24 Richard Guenther <rguenther@suse.de> PR middle-end/40233 * gcc.c-torture/compile/pr40233.c: New testcase. From-SVN: r148004
This commit is contained in:
parent
1ce94772bf
commit
9577151a9b
|
@ -1,3 +1,45 @@
|
|||
2009-05-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Backport from mainline:
|
||||
|
||||
2009-05-28 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR c++/39754
|
||||
* g++.dg/template/canon-type-1.C: New test.
|
||||
* g++.dg/template/canon-type-2.C: Likewise.
|
||||
* g++.dg/template/canon-type-3.C: Likewise.
|
||||
* g++.dg/template/canon-type-4.C: Likewise.
|
||||
* g++.dg/template/canon-type-5.C: Likewise.
|
||||
* g++.dg/template/canon-type-6.C: Likewise.
|
||||
* g++.dg/template/canon-type-7.C: Likewise.
|
||||
|
||||
2009-05-28 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/40254
|
||||
* gcc.dg/vect/pr40254.c: New test.
|
||||
|
||||
2009-05-26 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/40252
|
||||
* gcc.c-torture/compile/pr40252.c: New testcase.
|
||||
|
||||
2009-05-26 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR c++/40007
|
||||
* g++.dg/template/typedef18.C: New test.
|
||||
* g++.dg/template/typedef19.C: Likewise.
|
||||
* g++.dg/template/typedef20.C: Likewise.
|
||||
|
||||
2009-05-25 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/40238
|
||||
* gcc.dg/vect/pr40238.c: New test.
|
||||
|
||||
2009-05-24 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/40233
|
||||
* gcc.c-torture/compile/pr40233.c: New testcase.
|
||||
|
||||
2009-05-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/40291
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/39754
|
||||
// { dg-do "compile" }
|
||||
|
||||
template < typename > struct A ;
|
||||
template < typename T , typename = A < T > > struct B { } ;
|
||||
template < class W , class > struct D
|
||||
{
|
||||
typedef W X ;
|
||||
A<X*> a ;
|
||||
};
|
||||
|
||||
template < class Y > struct E
|
||||
{
|
||||
B<Y*> b ;
|
||||
} ;
|
||||
E<int> e ;
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/39754
|
||||
// { dg-do "compile" }
|
||||
|
||||
template < typename > struct A ;
|
||||
template < typename T , typename = A < T > > struct B { } ;
|
||||
template < class W , class > struct D
|
||||
{
|
||||
typedef W X ;
|
||||
A< X()> a ;
|
||||
};
|
||||
|
||||
template < class Y > struct E
|
||||
{
|
||||
B< Y()> b ;
|
||||
};
|
||||
E<int> e ;
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/39754
|
||||
// { dg-do "compile" }
|
||||
|
||||
template<typename> struct A ;
|
||||
template<typename T , typename = A<T> > struct B { } ;
|
||||
template<class W , class > struct D
|
||||
{
|
||||
typedef W X ;
|
||||
typedef X (FP) ();
|
||||
A<FP&> a ;
|
||||
} ;
|
||||
|
||||
template < class Y > struct E
|
||||
{
|
||||
typedef Y (FP) ();
|
||||
B<FP&> b ;
|
||||
} ;
|
||||
E < int > e ;
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/39754
|
||||
// { dg-do "compile" }
|
||||
|
||||
template<typename> struct A ;
|
||||
template<typename T ,typename = A<T> > struct B { } ;
|
||||
|
||||
template<class W, class>
|
||||
struct D
|
||||
{
|
||||
typedef W X;
|
||||
A<X[2]> a;
|
||||
} ;
|
||||
|
||||
template<class Y>
|
||||
struct E
|
||||
{
|
||||
B<Y[2]> b;
|
||||
};
|
||||
|
||||
E < int > e;
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/39754
|
||||
// { dg-do "compile" }
|
||||
|
||||
struct Foo {};
|
||||
template<typename> struct A ;
|
||||
template<typename T ,typename = A<T> > struct B { } ;
|
||||
|
||||
template<class W, class>
|
||||
struct D
|
||||
{
|
||||
typedef W X ;
|
||||
A<X Foo::*> a ;
|
||||
} ;
|
||||
|
||||
template<class Y>
|
||||
struct E
|
||||
{
|
||||
B<Y Foo::*> b ;
|
||||
} ;
|
||||
E < int > e ;
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/39754
|
||||
// { dg-do "compile" }
|
||||
|
||||
struct Foo {};
|
||||
template<typename> struct A ;
|
||||
template<typename T ,typename = A<T> > struct B { } ;
|
||||
|
||||
template<class W, class>
|
||||
struct D
|
||||
{
|
||||
typedef W X;
|
||||
A<void (Foo::*) (X)> a;
|
||||
} ;
|
||||
|
||||
template<class Y>
|
||||
struct E
|
||||
{
|
||||
B<void (Foo::*) (Y)> b;
|
||||
};
|
||||
E < int > e ;
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/39754
|
||||
// { dg-do "compile" }
|
||||
|
||||
struct Foo {};
|
||||
template<typename> struct A ;
|
||||
template<typename T ,typename = A<T> > struct B { } ;
|
||||
|
||||
template<class W, class>
|
||||
struct D
|
||||
{
|
||||
typedef W X;
|
||||
A<X (Foo::*) (X)> a ;
|
||||
};
|
||||
|
||||
template<class Y>
|
||||
struct E
|
||||
{
|
||||
B<Y (Foo::*) (Y)> b ;
|
||||
};
|
||||
E<int> e ;
|
|
@ -0,0 +1,24 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/40007
|
||||
// { dg-do compile }
|
||||
|
||||
template<typename T>
|
||||
struct x
|
||||
{
|
||||
protected:
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct y : public x<T>
|
||||
{
|
||||
typename x<T>::type z;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct y<void> : public x<void>
|
||||
{
|
||||
typedef x<void>::type z;
|
||||
};
|
||||
|
||||
template class y<int>;
|
|
@ -0,0 +1,21 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/40007
|
||||
// { dg-do compile }
|
||||
|
||||
class A
|
||||
{
|
||||
typedef int mytype; // { dg-error "'typedef int A::mytype' is private" }
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class B : public A
|
||||
{
|
||||
};
|
||||
|
||||
template<class T>
|
||||
class B<T*> : public A
|
||||
{ // { dg-error "within this context" }
|
||||
mytype mem;
|
||||
};
|
||||
|
||||
B<int*> b;
|
|
@ -0,0 +1,27 @@
|
|||
// Contributed by Dodji Seketeli <dodji@redhat.com>
|
||||
// Origin PR c++/40007
|
||||
// { dg-do compile }
|
||||
|
||||
class x
|
||||
{
|
||||
typedef int privtype; // { dg-error "is private" }
|
||||
|
||||
protected:
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct y : public x
|
||||
{
|
||||
typename x::type z;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct y<T*> : public x
|
||||
{ // { dg-error "within this context" }
|
||||
typedef x::type good;
|
||||
typedef x::privtype bad;
|
||||
};
|
||||
|
||||
template class y<int>;
|
||||
template class y<int*>;
|
|
@ -0,0 +1,10 @@
|
|||
typedef int aligned __attribute__((aligned(64)));
|
||||
struct Frame {
|
||||
aligned i;
|
||||
};
|
||||
|
||||
void foo(struct Frame *p)
|
||||
{
|
||||
aligned *q = &p->i;
|
||||
*q = 0;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
typedef unsigned int uint32_t;
|
||||
static void IP(uint32_t v[2])
|
||||
{
|
||||
v[0] = ((v[0] << 1) | ((v[0] >> 31) & 1L)) & 0xffffffffL;
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
/* { dg-do compile } */
|
||||
|
||||
extern int xdo_rb_ctr_row( int *pos_code);
|
||||
|
||||
int xgp_ahd_interpolate (int tile)
|
||||
{
|
||||
int p[4];
|
||||
|
||||
switch (tile) {
|
||||
default:
|
||||
case 0:
|
||||
case 1:
|
||||
p[0] = 0; p[1] = 1; p[2] = 2; p[3] = 3;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
p[0] = 1; p[1] = 0; p[2] = 3; p[3] = 2;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
p[0] = 3; p[1] = 2; p[2] = 1; p[3] = 0;
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
p[0] = 2; p[1] = 3; p[2] = 0; p[3] = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
xdo_rb_ctr_row(p);
|
||||
xdo_rb_ctr_row(p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { cleanup-tree-dump "vect" } } */
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include "tree-vect.h"
|
||||
|
||||
struct s
|
||||
{
|
||||
int *x;
|
||||
int x1;
|
||||
int x2;
|
||||
int x3;
|
||||
int *y;
|
||||
};
|
||||
|
||||
struct s arr[64] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
|
||||
|
||||
__attribute__ ((noinline)) void
|
||||
foo (int i, int *in_x, int *in_y)
|
||||
{
|
||||
arr[i].x = in_x;
|
||||
arr[i].y = in_y;
|
||||
}
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
int a, b;
|
||||
|
||||
check_vect ();
|
||||
|
||||
foo (5, &a, &b);
|
||||
|
||||
if (arr[5].x != &a || arr[5].y != &b)
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { cleanup-tree-dump "vect" } } */
|
||||
|
Loading…
Reference in New Issue