OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-src/gcc-4.2.2/gcc/testsuite/g++.dg/tree-ssa
    from Rev 149 to Rev 154
    Reverse comparison

Rev 149 → Rev 154

/nothrow-1.C
0,0 → 1,21
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-cfg" } */
/* { dg-skip-if "" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
double a;
void t()
{
a=1;
}
void t1(void);
void abort(void);
 
void q()
{
try {
t();
}
catch (...) {abort();}
}
/* We shouldnotice nothrow attribute. */
/* { dg-final { scan-tree-dump-times "exception" 0 "cfg"} } */
/* { dg-final { cleanup-tree-dump "cfg" } } */
nothrow-1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ssa-cast-1.C =================================================================== --- ssa-cast-1.C (nonexistent) +++ ssa-cast-1.C (revision 154) @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fdump-tree-optimized" } */ + +int &f(int *a) +{ + return *a; +} + +/* There should be no cast as pointer and references are + considered the same type. */ +/* { dg-final { scan-tree-dump-times "\\(int &\\)" 0 "optimized"} } */ +/* { dg-final { cleanup-tree-dump "optimized" } } */
ssa-cast-1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: pr22404.C =================================================================== --- pr22404.C (nonexistent) +++ pr22404.C (revision 154) @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +/* We were not getting the offset of a in B and a in C::B correct, + causing an abort. */ +struct A { A(); }; + +struct B : A +{ + A a; +}; + +struct C : B { }; + +C c;
pr22404.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: pr20920.C =================================================================== --- pr20920.C (nonexistent) +++ pr20920.C (revision 154) @@ -0,0 +1,26 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +/* This was causing a failure in the out of SSA pass because VRP was + trying to insert assertions for SSA names that flow through + abnormal edges. */ +void f(int) __attribute__((__noreturn__)); +int d(const char *); +char * j (); + +char * +foo (int x) +{ + char *path = __null; + try + { + path = j (); + if (path != __null) + if (d (path) != 0) + f (127); + f (127); + } + catch (...) { } + + return path; +}
pr20920.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: pr26140.C =================================================================== --- pr26140.C (nonexistent) +++ pr26140.C (revision 154) @@ -0,0 +1,15 @@ +/* { dg-do compile } */ + +struct Pitch +{ + int notename_; +}; +struct Audio_note +{ + Audio_note (Pitch p); +}; +void create_audio_elements () +{ + Pitch *pit; + new Audio_note (*pit); +}
pr26140.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: pr28003.C =================================================================== --- pr28003.C (nonexistent) +++ pr28003.C (revision 154) @@ -0,0 +1,31 @@ +// PR tree-optimization/28003 +// Alias grouping needs to be computed after call clobbering, because it +// changes around the tags and variables in a way that makes our +// call clobbering computation incorrect. +// { dg-do run } +// { dg-options "-O2" } +extern "C" void abort(void); +struct A +{ + int i, j[9]; + A() : i(1) { j[0]=j[1]=j[2]=j[3]=j[4]=j[5]=j[6]=j[7]=j[8]=0; } +}; + +struct B +{ + A a; +}; + +B b[] = +{ + {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, + {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, + {}, {}, {}, {}, {} +}; + +int main() +{ + if (1 - b[sizeof(b)/sizeof(B) - 1].a.i != 0) + abort(); + return 0; +}
pr28003.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: pr32327-1.C =================================================================== --- pr32327-1.C (nonexistent) +++ pr32327-1.C (revision 154) @@ -0,0 +1,70 @@ +// { dg-do run { target { { i?86-*-* x86_64-*-* } && ilp32 } } } +// { dg-options "-O2" } + +// Endian sensitive. This is a little-endian redux. + +typedef long long int64; +typedef unsigned long long uint64; +typedef __SIZE_TYPE__ size_t; + +extern "C" { +extern void *memcpy (void *__restrict __dest, + __const void *__restrict __src, size_t __n) /*throw ()*/; +extern void abort (void); +} + +inline uint64 Swap64(uint64 ull) { + uint64 b0 = (ull >> 0) & 0xff; + uint64 b1 = (ull >> 8) & 0xff; + uint64 b2 = (ull >> 16) & 0xff; + uint64 b3 = (ull >> 24) & 0xff; + uint64 b4 = (ull >> 32) & 0xff; + uint64 b5 = (ull >> 40) & 0xff; + uint64 b6 = (ull >> 48) & 0xff; + uint64 b7 = (ull >> 56) & 0xff; + return (b0 << 56) | (b1 << 48) | (b2 << 40) | (b3 << 32) | + (b4 << 24) | (b5 << 16) | (b6 << 8) | (b7 << 0); +} + +inline void KeyFromUint64(uint64 ull, unsigned char* key) { + uint64 ull_swap = Swap64(ull); + memcpy(key, &ull_swap, sizeof(uint64)); +} + +inline int64 int64_from_double(const double& source) { + int64 dest; + memcpy(&dest, &source, sizeof(dest)); + return dest; +} + +void KeyFromDouble(double x, unsigned char* key) __attribute__ ((noinline)); +void KeyFromDouble(double x, unsigned char* key) { + int64 n = int64_from_double(x); + if (n >= 0) { + n += 1ull << 63; + } else { + n = -n; + } + KeyFromUint64(n, key); +} + + +void TestKeyFromDouble(uint64 ull) { + double d; + memcpy(&d, &ull, sizeof(d)); + + unsigned char key[sizeof(uint64)]; + unsigned char expected_key[sizeof(uint64)] = { 0x81, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef }; + + KeyFromDouble(d, key); + + for (size_t i = 0; i < sizeof(key); ++i) { + if ((key[i] & 0xff) != expected_key[i]) + abort (); + } +} + +int main() { + TestKeyFromDouble(0x0123456789abcdefull); + return 0; +}
pr32327-1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: pr22444.C =================================================================== --- pr22444.C (nonexistent) +++ pr22444.C (revision 154) @@ -0,0 +1,141 @@ +// PR tree-optimization/22444 +// When creating SFT's, we shouldn't add the original variable +// to the addressable vars list, because this may cause false aliasing +// with the subvars leading to the subvars not being renamed when they should +// { dg-do compile } +// { dg-options "-O2" } +typedef int ptrdiff_t; +typedef unsigned int size_t; +namespace std +{ + template struct pair + { + _T1 first; + _T2 second; + pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } + }; +} +namespace __gnu_internal +{ + typedef char __one; + template __one __test_type(int _Tp::*); +} +namespace std +{ + template struct __is_pod + { + enum { __value = (sizeof(__gnu_internal::__test_type<_Tp>(0))!= sizeof(__gnu_internal::__one)) }; + }; + template struct iterator + { }; + template struct iterator_traits + { + typedef typename _Iterator::difference_type difference_type; + }; + template class reverse_iterator : public iterator::iterator_category, typename iterator_traits<_Iterator>::value_type, typename iterator_traits<_Iterator>::difference_type, typename iterator_traits<_Iterator>::pointer, typename iterator_traits<_Iterator>::reference> + { + typedef _Iterator iterator_type; + typedef typename iterator_traits<_Iterator>::difference_type difference_type; + typedef typename iterator_traits<_Iterator>::reference reference; + reverse_iterator operator+(difference_type __n) const {} + reverse_iterator& operator+=(difference_type __n) { } + reference operator[](difference_type __n) const { } + }; +} +namespace __gnu_cxx +{ + template class __pool; + template