g++.dg/opt/strength-reduce.C...
g++.dg/opt/strength-reduce.C: Replace 0x7fffffff with __INT_MAX__ so that the test can be compiled by toolchains targeted at 16-bit processors. * gcc.dg/20040625-1.c: Use long constants rather than integers when performing arithmetic that will overflow 16-bits. * gcc.dg/i386-sse-8.c: Expect this test to fail for the xstormy16. It does not support 128-bit vector operations. * gcc.dg/ultrasp4.c: Replace all occurrences of the type 'long' with the macro PTR_TYPE. Define this macro to an integer type suitable for holding a pointer. * gcc.dg/compat/struct-align-1_x.c: Use shorter integers if the target is a 16-bit processor. * gcc.dg/cpp/if-2.c: Expect a different warning message from 16-bit targets where the character constant will be too long. * g++.dg/opt/asm1.C: Expect this test to fail on the xstormy16 where the double will not be directly addressable. From-SVN: r90667
This commit is contained in:
parent
ea87f349b7
commit
f15dc49f0a
@ -1,3 +1,28 @@
|
||||
2004-11-15 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* g++.dg/opt/strength-reduce.C: Replace 0x7fffffff with
|
||||
__INT_MAX__ so that the test can be compiled by toolchains
|
||||
targeted at 16-bit processors.
|
||||
|
||||
* gcc.dg/20040625-1.c: Use long constants rather than integers
|
||||
when performing arithmetic that will overflow 16-bits.
|
||||
|
||||
* gcc.dg/i386-sse-8.c: Expect this test to fail for the
|
||||
xstormy16. It does not support 128-bit vector operations.
|
||||
|
||||
* gcc.dg/ultrasp4.c: Replace all occurrences of the type 'long'
|
||||
with the macro PTR_TYPE. Define this macro to an integer type
|
||||
suitable for holding a pointer.
|
||||
|
||||
* gcc.dg/compat/struct-align-1_x.c: Use shorter integers if
|
||||
the target is a 16-bit processor.
|
||||
|
||||
* gcc.dg/cpp/if-2.c: Expect a different warning message from
|
||||
16-bit targets where the character constant will be too long.
|
||||
|
||||
* g++.dg/opt/asm1.C: Expect this test to fail on the xstormy16
|
||||
where the double will not be directly addressable.
|
||||
|
||||
2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
|
||||
|
||||
Friend class name lookup 1/n, PR c++/18471
|
||||
|
@ -5,5 +5,5 @@
|
||||
void foo()
|
||||
{
|
||||
union { double d; char c[sizeof(double)]; } tmp;
|
||||
__asm__ ("" : "=m" (tmp.d)); // { dg-bogus "not directly addressable" }
|
||||
__asm__ ("" : "=m" (tmp.d)); // { dg-bogus "not directly addressable" "double sized union element should be addressible" { xfail xstormy16-*-* } }
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ extern "C" void abort (void);
|
||||
|
||||
struct C
|
||||
{
|
||||
int foo (char ch, int offset = 0x7fffffff) const;
|
||||
int foo (char ch, int offset = __INT_MAX__) const;
|
||||
int bar (int offset, char c) const;
|
||||
char *a;
|
||||
};
|
||||
@ -27,14 +27,14 @@ int C::foo (char ch, int offset) const
|
||||
{
|
||||
int len = __builtin_strlen (a);
|
||||
if (len == 0)
|
||||
return 0x7fffffff;
|
||||
return __INT_MAX__;
|
||||
if (offset >= len)
|
||||
offset = len - 1;
|
||||
|
||||
while (bar (offset, ch) != 0)
|
||||
{
|
||||
if (offset == 0)
|
||||
return 0x7fffffff;
|
||||
return __INT_MAX__;
|
||||
offset--;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
typedef int __attribute__((vector_size(8))) v2si;
|
||||
typedef long __attribute__((vector_size(8))) v2si;
|
||||
long long s64;
|
||||
|
||||
static inline long long
|
||||
@ -9,7 +9,7 @@ __ev_convert_s64 (v2si a)
|
||||
|
||||
int main()
|
||||
{
|
||||
union { long long ll; int i[2]; } endianness_test;
|
||||
union { long long ll; long i[2]; } endianness_test;
|
||||
endianness_test.ll = 1;
|
||||
int little_endian = endianness_test.i[0];
|
||||
s64 = __ev_convert_s64 ((v2si){1,0xffffffff});
|
||||
|
@ -22,7 +22,7 @@ test (void)
|
||||
{
|
||||
double x = foo ();
|
||||
x = bar (x);
|
||||
x /= 1024 * 1024 * 1024;
|
||||
x /= 1024L * 1024L * 1024L;
|
||||
x *= 70;
|
||||
x = x < 70 ? x : 70;
|
||||
x += 30;
|
||||
|
@ -1,2 +1,2 @@
|
||||
/* Tests error recovery for invalid code. */
|
||||
__attribute__((foo) int f (){} /* { dg-error "(parse error|syntax error|expected '\\)') before 'int'" } */
|
||||
__attribute__((foo) int f (){} /* { dg-error "(parse error|syntax error|expected '\\)') before `int'" } */
|
||||
|
@ -63,14 +63,27 @@ return3_##NAME (void) \
|
||||
|
||||
#define CHECK(NAME) test_##NAME()
|
||||
|
||||
#if __INT_MAX__ > 32767
|
||||
SETUP (orig, 49, 1.0, 111111)
|
||||
#else
|
||||
SETUP (orig, 49, 1.0, 1111)
|
||||
#endif
|
||||
#ifndef SKIP_ATTRIBUTE
|
||||
#if __INT_MAX__ > 32767
|
||||
SETUP (p_all, 50, 2.0, 222222)
|
||||
SETUP (p_inner, 51, 3.0, 333333)
|
||||
SETUP (p_outer, 52, 4.0, 444444)
|
||||
SETUP (a_max, 53, 5.0, 555555)
|
||||
SETUP (m_outer_p_inner, 54, 6.0, 666666)
|
||||
SETUP (m_inner_p_outer, 55, 7.0, 777777)
|
||||
SETUP (m_inner_p_outer, 55, 7.0, 777777)
|
||||
#else
|
||||
SETUP (p_all, 50, 2.0, 2222)
|
||||
SETUP (p_inner, 51, 3.0, 3333)
|
||||
SETUP (p_outer, 52, 4.0, 4444)
|
||||
SETUP (a_max, 53, 5.0, 5555)
|
||||
SETUP (m_outer_p_inner, 54, 6.0, 6666)
|
||||
SETUP (m_inner_p_outer, 55, 7.0, 7777)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -17,7 +17,8 @@
|
||||
#error 0x1234 /* { dg-bogus "error" "wide charconst recognition 3" } */
|
||||
#endif
|
||||
|
||||
#if 'abcd' /* { dg-warning "multi-character character constant" "multi-character charconst" } */
|
||||
/* The 'character constant (is )?too long' message is produced by 16-bit targets. */
|
||||
#if 'abcd' /* { dg-warning "(multi-character character constant)|(character constant (is )?too long)" "multi-character charconst" } */
|
||||
#endif
|
||||
|
||||
#if 'abcdefghi' /* { dg-error "character constant (is )?too long" "charconst too long" } */
|
||||
|
@ -1,7 +1,8 @@
|
||||
/* PR target/14313 */
|
||||
/* Origin: <Pawe Sikora <pluto@ds14.agh.edu.pl> */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* The xstormy16 doesn't support V2DI. */
|
||||
/* { dg-do compile { xfail xstormy16-*-* } } */
|
||||
/* { dg-options "" } */
|
||||
/* { dg-options "-march=pentium3" { target i?86-*-* } } */
|
||||
/* { dg-forbid-option "-m64" { target i?86-*-* } } */
|
||||
|
@ -3,8 +3,19 @@
|
||||
/* { dg-options "-O2" } */
|
||||
/* { dg-options "-O2 -mcpu=ultrasparc" { target sparc64-*-* sparcv9-*-* } } */
|
||||
|
||||
long bar (unsigned int);
|
||||
long foo (long x, unsigned int y)
|
||||
#if __INT_MAX__ > 32767
|
||||
#define PTR_TYPE long
|
||||
#else
|
||||
/* For 16-bit ports a long is a 32-bit quantity. So you cannot
|
||||
cast a 32-bit long integer into a pointer which will only be
|
||||
16-bits long. */
|
||||
#define PTR_TYPE int
|
||||
#endif
|
||||
|
||||
extern PTR_TYPE bar (unsigned int);
|
||||
|
||||
PTR_TYPE
|
||||
foo (PTR_TYPE x, unsigned int y)
|
||||
{
|
||||
return *(((long *) (bar (y) - 1)) + 1 + (x >> 2) % 359);
|
||||
return *(((PTR_TYPE *) (bar (y) - 1)) + 1 + (x >> 2) % 359);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user