Backport regression testcases from mainline.
2010-03-25 H.J. Lu <hongjiu.lu@intel.com> Backport from mainline: 2010-03-22 Jason Merrill <jason@redhat.com> PR c++/43333 * g++.dg/ext/is_pod_98.C: New. 2010-03-22 Michael Matz <matz@suse.de> PR middle-end/43475 * gfortran.dg/pr43475.f90: New testcase. 2010-03-22 Richard Guenther <rguenther@suse.de> PR tree-optimization/43390 * gfortran.fortran-torture/execute/pr43390.f90: New testcase. 2010-03-20 Dodji Seketeli <dodji@redhat.com> PR c++/43375 * g++.dg/abi/mangle42.C: New test. 2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com> PR C/43211 * gcc.dg/pr43211.c: New test. 2010-03-18 Martin Jambor <mjambor@suse.cz> PR middle-end/42450 * g++.dg/torture/pr42450.C: New test. 2010-03-18 Michael Matz <matz@suse.de> PR tree-optimization/43402 * gcc.dg/pr43402.c: New testcase. 2010-03-17 Peter Bergner <bergner@vnet.ibm.com> PR target/42427 * gcc.dg/pr42427.c: New test. 2010-03-16 Richard Guenther <rguenther@suse.de> PR middle-end/43379 * gcc.dg/pr43379.c: New testcase. 2010-03-15 Michael Matz <matz@suse.de> PR middle-end/43300 * gcc.dg/pr43300.c: New testcase. 2010-03-15 Richard Guenther <rguenther@suse.de> PR tree-optimization/43367 * gcc.c-torture/compile/pr43367.c: New testcase. From-SVN: r157726
This commit is contained in:
parent
052d293cb7
commit
e46d28ef80
|
@ -1,3 +1,61 @@
|
|||
2010-03-25 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
Backport from mainline:
|
||||
2010-03-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/43333
|
||||
* g++.dg/ext/is_pod_98.C: New.
|
||||
|
||||
2010-03-22 Michael Matz <matz@suse.de>
|
||||
|
||||
PR middle-end/43475
|
||||
* gfortran.dg/pr43475.f90: New testcase.
|
||||
|
||||
2010-03-22 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/43390
|
||||
* gfortran.fortran-torture/execute/pr43390.f90: New testcase.
|
||||
|
||||
2010-03-20 Dodji Seketeli <dodji@redhat.com>
|
||||
|
||||
PR c++/43375
|
||||
* g++.dg/abi/mangle42.C: New test.
|
||||
|
||||
2010-03-19 Andrew Pinski <andrew_pinski@caviumnetworks.com>
|
||||
|
||||
PR C/43211
|
||||
* gcc.dg/pr43211.c: New test.
|
||||
|
||||
2010-03-18 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
PR middle-end/42450
|
||||
* g++.dg/torture/pr42450.C: New test.
|
||||
|
||||
2010-03-18 Michael Matz <matz@suse.de>
|
||||
|
||||
PR tree-optimization/43402
|
||||
* gcc.dg/pr43402.c: New testcase.
|
||||
|
||||
2010-03-17 Peter Bergner <bergner@vnet.ibm.com>
|
||||
|
||||
PR target/42427
|
||||
* gcc.dg/pr42427.c: New test.
|
||||
|
||||
2010-03-16 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/43379
|
||||
* gcc.dg/pr43379.c: New testcase.
|
||||
|
||||
2010-03-15 Michael Matz <matz@suse.de>
|
||||
|
||||
PR middle-end/43300
|
||||
* gcc.dg/pr43300.c: New testcase.
|
||||
|
||||
2010-03-15 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/43367
|
||||
* gcc.c-torture/compile/pr43367.c: New testcase.
|
||||
|
||||
2010-03-25 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/43385
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
// Origin: PR c++/43375
|
||||
// { dg-do compile { target i?86-*-* x86_64-*-* } }
|
||||
// { dg-options "-msse2 -std=gnu++0x" }
|
||||
|
||||
typedef float __v4sf __attribute__ ((__vector_size__ (16)));
|
||||
typedef int __v4si __attribute__ ((__vector_size__ (16)));
|
||||
__v4sf my_asin(__v4sf x)
|
||||
{
|
||||
static const __v4si g_Mask{0x7fffffff,
|
||||
0x00000000,
|
||||
0x7fffffff,
|
||||
0x7fffffff };
|
||||
return __builtin_ia32_andnps ((__v4sf) g_Mask, x);
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
// PR c++/43333
|
||||
// { dg-options "-std=c++98" }
|
||||
// { dg-do run }
|
||||
|
||||
struct strPOD
|
||||
{
|
||||
const char *const foo;
|
||||
const char *const bar;
|
||||
};
|
||||
extern "C" void abort (void);
|
||||
int main ()
|
||||
{
|
||||
if (!__is_pod (strPOD))
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
/* { dg-do compile } */
|
||||
|
||||
template < typename > class basic_stringstream;
|
||||
|
||||
struct basic_string {
|
||||
basic_string();
|
||||
};
|
||||
|
||||
struct ios_base {
|
||||
virtual ~ios_base();
|
||||
};
|
||||
|
||||
class ostream:ios_base {};
|
||||
class istream:virtual ios_base {};
|
||||
|
||||
template < typename > struct basic_iostream:public istream, ostream {
|
||||
~basic_iostream () {}
|
||||
};
|
||||
extern template class basic_iostream < char >;
|
||||
|
||||
template < typename > struct basic_stringstream:public basic_iostream < char > {
|
||||
basic_string _M_stringbuf;
|
||||
~basic_stringstream () {}
|
||||
};
|
||||
extern template class basic_stringstream < char >;
|
||||
|
||||
template < typename > struct AnyMatrixBase;
|
||||
template < typename, int _Rows, int _Cols, int = _Rows, int = _Cols > class Matrix;
|
||||
template < typename > class CwiseNullaryOp;
|
||||
|
||||
template < typename Derived > struct MatrixBase:public AnyMatrixBase < Derived > {
|
||||
typedef CwiseNullaryOp < Derived > ConstantReturnType;
|
||||
ConstantReturnType Constant ();
|
||||
template < typename > Derived cast ();
|
||||
static CwiseNullaryOp < Derived > Random (int);
|
||||
};
|
||||
|
||||
template < typename Derived > struct AnyMatrixBase {
|
||||
Derived derived () {}
|
||||
Derived & derived () const {}
|
||||
};
|
||||
|
||||
template < typename, int > struct ei_matrix_storage {};
|
||||
|
||||
template < typename _Scalar, int, int, int _MaxRows, int _MaxCols > struct Matrix:MatrixBase < Matrix < _Scalar, _MaxRows, _MaxCols > > {
|
||||
typedef MatrixBase < Matrix > Base;
|
||||
ei_matrix_storage < int, _MaxCols > m_storage;
|
||||
Matrix operator= (const Matrix other) {
|
||||
_resize_to_match (other);
|
||||
lazyAssign (other.derived ());
|
||||
}
|
||||
template < typename OtherDerived > Matrix lazyAssign (MatrixBase < OtherDerived > other) {
|
||||
_resize_to_match (other);
|
||||
return Base (other.derived ());
|
||||
}
|
||||
Matrix ();
|
||||
template < typename OtherDerived > Matrix (const MatrixBase < OtherDerived > &other) {
|
||||
*this = other;
|
||||
}
|
||||
template < typename OtherDerived > void _resize_to_match (const MatrixBase < OtherDerived > &) {
|
||||
throw 1;
|
||||
}
|
||||
};
|
||||
|
||||
template < typename MatrixType > class CwiseNullaryOp:
|
||||
public MatrixBase < CwiseNullaryOp < MatrixType > > {};
|
||||
|
||||
int f()
|
||||
{
|
||||
bool align_cols;
|
||||
if (align_cols) {
|
||||
basic_stringstream<char> sstr;
|
||||
f();
|
||||
}
|
||||
}
|
||||
|
||||
template < typename > struct AutoDiffScalar;
|
||||
template < typename Functor > struct AutoDiffJacobian:Functor {
|
||||
AutoDiffJacobian (Functor);
|
||||
typedef typename Functor::InputType InputType;
|
||||
typedef typename Functor::ValueType ValueType;
|
||||
typedef Matrix < int, Functor::InputsAtCompileTime, 1 > DerivativeType;
|
||||
typedef AutoDiffScalar < DerivativeType > ActiveScalar;
|
||||
typedef Matrix < ActiveScalar, Functor::InputsAtCompileTime, 1 > ActiveInput;
|
||||
void operator () (InputType x, ValueType *) {
|
||||
ActiveInput ax = x.template cast < ActiveScalar > ();
|
||||
}
|
||||
};
|
||||
|
||||
template < int NX, int NY > struct TestFunc1 {
|
||||
enum {
|
||||
InputsAtCompileTime = NX
|
||||
};
|
||||
typedef Matrix < float, NX, 1 > InputType;
|
||||
typedef Matrix < float, NY, 1 > ValueType;
|
||||
typedef Matrix < float, NY, NX > JacobianType;
|
||||
int inputs ();
|
||||
};
|
||||
|
||||
template < typename Func > void forward_jacobian (Func f) {
|
||||
typename Func::InputType x = Func::InputType::Random (f.inputs ());
|
||||
typename Func::ValueType y;
|
||||
typename Func::JacobianType jref = jref.Constant ();
|
||||
AutoDiffJacobian < Func > autoj (f);
|
||||
autoj (x, &y);
|
||||
}
|
||||
|
||||
void test_autodiff_scalar ()
|
||||
{
|
||||
forward_jacobian (TestFunc1 < 2, 2 > ());
|
||||
forward_jacobian (TestFunc1 < 3, 2 > ());
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
unsigned char g_17;
|
||||
|
||||
const unsigned char func_39 (unsigned char p_40, unsigned char * p_41)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void int327 (const unsigned char p_48, unsigned char p_49)
|
||||
{
|
||||
unsigned l_52;
|
||||
unsigned char l_58[2];
|
||||
int i, j;
|
||||
if (func_39 (l_52, &p_49), p_48) {
|
||||
unsigned char *l_60;
|
||||
unsigned char *l = &l_58[1];
|
||||
for (j; j; j++) {
|
||||
lbl_59:
|
||||
break;
|
||||
}
|
||||
for (l = 0; 1; l += 1) {
|
||||
for (p_49 = 1; p_49; p_49 += 0) {
|
||||
unsigned char **l_61[1][6];
|
||||
for (j = 0; j < 1; j++)
|
||||
l_61[i][j] = &l_60;
|
||||
goto lbl_59;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/* { dg-do assemble } */
|
||||
/* { dg-options "-O2 -fexceptions -fnon-call-exceptions -fpeel-loops" } */
|
||||
/* { dg-require-effective-target ilp32 } */
|
||||
|
||||
#include <complex.h>
|
||||
|
||||
extern double myabs (complex double);
|
||||
|
||||
void
|
||||
test (double *help, complex double *wm, long nz)
|
||||
{
|
||||
long k;
|
||||
double znew;
|
||||
double zold;
|
||||
for (k = 0; k < nz; k++)
|
||||
{
|
||||
znew = myabs (wm[k]);
|
||||
zold = help[k];
|
||||
help[k] = znew;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
/* { dg-do compile } */
|
||||
|
||||
struct T;
|
||||
|
||||
struct S {
|
||||
void (*bar)(struct S);
|
||||
};
|
||||
|
||||
void bar(struct T t) {} /* { dg-error "" } */
|
||||
|
||||
void foo(struct S *s)
|
||||
{
|
||||
s->bar = bar;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-Os -w" } */
|
||||
typedef float V2SF __attribute__ ((vector_size (128)));
|
||||
|
||||
V2SF
|
||||
foo (int x, V2SF a)
|
||||
{
|
||||
V2SF b;
|
||||
if (x & 42)
|
||||
b = a;
|
||||
else
|
||||
b = a + (V2SF) {1.0f/0.0f - 1.0f/0.0f, 1.0f/0.0f - 1.0f/0.0f};
|
||||
while (x--)
|
||||
a += b;
|
||||
|
||||
return a;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -ftracer -w" } */
|
||||
|
||||
void *foo(int i, int *p)
|
||||
{
|
||||
lab:
|
||||
if (p) *p = i;
|
||||
goto *p;
|
||||
return &&lab;
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/* { dg-do run } */
|
||||
/* { dg-options "-O1 -fno-inline" } */
|
||||
extern void abort (void);
|
||||
|
||||
static int something;
|
||||
|
||||
static int * converterData[2]={
|
||||
&something, &something,
|
||||
};
|
||||
|
||||
static struct {
|
||||
const char *name;
|
||||
int type;
|
||||
} const cnvNameType[] = {
|
||||
{ "bocu1", 1 },
|
||||
{ "utf7", 1 },
|
||||
{ "utf8", 1 }
|
||||
};
|
||||
|
||||
|
||||
const int * getAlgorithmicTypeFromName(const char *realName);
|
||||
const int *
|
||||
getAlgorithmicTypeFromName(const char *realName)
|
||||
{
|
||||
unsigned mid, start, limit;
|
||||
unsigned lastMid;
|
||||
int result;
|
||||
start = 0;
|
||||
limit = sizeof(cnvNameType)/sizeof(cnvNameType[0]);
|
||||
mid = limit;
|
||||
lastMid = 0xffffffff;
|
||||
|
||||
for (;;) {
|
||||
mid = (start + limit) / 2;
|
||||
if (lastMid == mid) { /* Have we moved? */
|
||||
break; /* We haven't moved, and it wasn't found. */
|
||||
}
|
||||
lastMid = mid;
|
||||
result = __builtin_strcmp(realName, cnvNameType[mid].name);
|
||||
|
||||
if (result < 0) {
|
||||
limit = mid;
|
||||
} else if (result > 0) {
|
||||
start = mid;
|
||||
} else {
|
||||
return converterData[cnvNameType[mid].type];
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main (void)
|
||||
{
|
||||
if (!getAlgorithmicTypeFromName ("utf8"))
|
||||
abort ();
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
! PR middle-end/43475
|
||||
! { dg-do compile }
|
||||
! { dg-options "-O2" }
|
||||
subroutine ss(w)
|
||||
implicit none
|
||||
integer :: w(:)
|
||||
integer :: b,c,d
|
||||
b = w(8)
|
||||
c = 5
|
||||
d = 3
|
||||
call s1(c)
|
||||
call s2(b+c)
|
||||
call s3(w(b))
|
||||
end subroutine ss
|
|
@ -0,0 +1,9 @@
|
|||
logical :: l1(4)
|
||||
logical :: l2(4)
|
||||
l1 = (/.TRUE.,.FALSE.,.TRUE.,.FALSE./)
|
||||
l2 = (/.FALSE.,.TRUE.,.FALSE.,.TRUE./)
|
||||
if (dot_product (l1, l2)) call abort ()
|
||||
l2 = .TRUE.
|
||||
if (.not.dot_product (l1, l2)) call abort ()
|
||||
end
|
||||
|
Loading…
Reference in New Issue