limits-fndefn.c: Skip for AVR.
* gcc.c-torture/compile/limits-fndefn.c: Skip for AVR. * gcc.dg/builtins-config.h: Use standard independent __AVR__ symbol. * gcc.dg/cdce1.c: Skip for AVR. * gcc.dg/cdce2.c: Ditto. * gcc.dg/fold-bitand-1.c: Ignore warnings such as alignment. * gcc.dg/fold-eqandshift-3.c: Use long on AVR. * gcc.dg/fold-overflow-1.c: Skip for AVR. * gcc.dg/multiple-overflow-warn-3.c: Use target independent macro for ms bit position. * gcc.dg/pch/struct-1.c: Allow for target without 32 bit int. * gcc.dg/tree-ssa/pr33920.c: Add warning check for AVR. * gcc.dg/ucnid-5.c: Skip for AVR. * gcc.dg/Wconversion-5.c: Mark warning xfail for AVR target. * gcc.dg/Wconversion-real-integer.c: Skip for AVR. * gcc.dg/Wconversion-real.c: Ditto. * gcc.dg/wtr-conversion-1.c: Add warning test for AVR. * gcc.dg/utf-cvt.c: Skip tests and mark excess xfail for AVR. * gcc.dg/Wtype-limits-Wextra.c: Ditto. * gcc.dg/Wtype-limits.c: Ditto. From-SVN: r136918
This commit is contained in:
parent
0cf7fb1fd8
commit
77cacee417
@ -1,3 +1,24 @@
|
||||
2008-06-18 Andy Hutchinson <hutchinsonandy@aim.com>
|
||||
|
||||
* gcc.c-torture/compile/limits-fndefn.c: Skip for AVR.
|
||||
* gcc.dg/builtins-config.h: Use standard independent __AVR__ symbol.
|
||||
* gcc.dg/cdce1.c: Skip for AVR.
|
||||
* gcc.dg/cdce2.c: Ditto.
|
||||
* gcc.dg/fold-bitand-1.c: Ignore warnings such as alignment.
|
||||
* gcc.dg/fold-eqandshift-3.c: Use long on AVR.
|
||||
* gcc.dg/fold-overflow-1.c: Skip for AVR.
|
||||
* gcc.dg/multiple-overflow-warn-3.c: Use target independent macro for ms bit position.
|
||||
* gcc.dg/pch/struct-1.c: Allow for target without 32 bit int.
|
||||
* gcc.dg/tree-ssa/pr33920.c: Add warning check for AVR.
|
||||
* gcc.dg/ucnid-5.c: Skip for AVR.
|
||||
* gcc.dg/Wconversion-5.c: Mark warning xfail for AVR target.
|
||||
* gcc.dg/Wconversion-real-integer.c: Skip for AVR.
|
||||
* gcc.dg/Wconversion-real.c: Ditto.
|
||||
* gcc.dg/wtr-conversion-1.c: Add warning test for AVR.
|
||||
* gcc.dg/utf-cvt.c: Skip tests and mark excess xfail for AVR.
|
||||
* gcc.dg/Wtype-limits-Wextra.c: Ditto.
|
||||
* gcc.dg/Wtype-limits.c: Ditto.
|
||||
|
||||
2008-06-18 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* gcc.dg/dfp/convert-bfp-6.c, gcc.dg/dfp/convert-bfp-9.c: XFAIL
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* { dg-skip-if "too complex for avr" { "avr-*-*" } { "*" } { "" } } */
|
||||
#define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9,
|
||||
#define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \
|
||||
LIM1(x##5) LIM1(x##6) LIM1(x##7) LIM1(x##8) LIM1(x##9)
|
||||
|
@ -19,7 +19,7 @@ void test1 (void)
|
||||
unsigned char f = (int) uc;
|
||||
signed char g = (int) sc;
|
||||
unsigned char h = (unsigned int) (short int) uc;
|
||||
signed char i = (int) (unsigned short int) sc; /* { dg-warning "may alter its value" } */
|
||||
signed char i = (int) (unsigned short int) sc; /* { dg-warning "may alter its value" "" { xfail avr-*-* } } */
|
||||
unsigned char j = (unsigned int) (short int) us; /* { dg-warning "may alter its value" } */
|
||||
signed char k = (int) (unsigned short int) ss; /* { dg-warning "may alter its value" } */
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
integers. */
|
||||
|
||||
/* { dg-do compile }
|
||||
/* { dg-skip-if "doubles are floats,ints are 16bits" { "avr-*-*" } { "*" } { "" } } */
|
||||
/* { dg-options "-std=c99 -Wconversion" } */
|
||||
|
||||
#include <limits.h>
|
||||
@ -70,3 +71,4 @@ void h (void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* Test for diagnostics for Wconversion for floating-point. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-skip-if "doubles are floats" { "avr-*-*" } { "*" } { "" } } */
|
||||
/* { dg-options "-std=c99 -Wconversion" } */
|
||||
|
||||
float vfloat;
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* Test that -Wtype-limits is enabled by -Wextra */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-excess-errors "short=int" { target { avr-*-* } } } */
|
||||
/* { dg-options "-Wextra" } */
|
||||
|
||||
|
||||
void a (unsigned char x)
|
||||
{
|
||||
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */
|
||||
@ -22,10 +22,10 @@ void a (unsigned char x)
|
||||
|
||||
void b (unsigned short x)
|
||||
{
|
||||
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */
|
||||
if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */
|
||||
if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */
|
||||
if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */
|
||||
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { ! "avr-*-*" } } } */
|
||||
if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { ! "avr-*-*" } } } */
|
||||
if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { ! "avr-*-*" } } } */
|
||||
if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { ! "avr-*-*" } } } */
|
||||
}
|
||||
|
||||
void c (unsigned int x)
|
||||
@ -64,3 +64,4 @@ int test (int x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-excess-errors "short=int" { target { avr-*-* } } } */
|
||||
/* { dg-options "-Wtype-limits" } */
|
||||
|
||||
|
||||
|
||||
void a (unsigned char x)
|
||||
{
|
||||
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */
|
||||
@ -22,10 +22,10 @@ void a (unsigned char x)
|
||||
|
||||
void b (unsigned short x)
|
||||
{
|
||||
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */
|
||||
if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */
|
||||
if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */
|
||||
if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */
|
||||
if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { ! "avr-*-*" } } } */
|
||||
if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { ! "avr-*-*" } } } */
|
||||
if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" "" { target { ! "avr-*-*" } } } */
|
||||
if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" "" { target { ! "avr-*-*" } } } */
|
||||
}
|
||||
|
||||
void c (unsigned int x)
|
||||
@ -64,3 +64,4 @@ int test (int x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
/* PA HP-UX doesn't have the entire C99 runtime. */
|
||||
#elif defined(__sgi)
|
||||
/* Irix6 doesn't have the entire C99 runtime. */
|
||||
#elif defined(AVR)
|
||||
#elif defined(__AVR__)
|
||||
/* AVR doesn't have the entire C99 runtime. */
|
||||
#elif defined(__FreeBSD__) && (__FreeBSD__ < 5)
|
||||
/* FreeBSD before version 5 doesn't have the entire C99 runtime. */
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-skip-if "doubles are floats" { "avr-*-*" } { "*" } { "" } } */
|
||||
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */
|
||||
/* { dg-final { scan-tree-dump "cdce1.c:16: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
|
||||
/* { dg-final { cleanup-tree-dump "cdce" } } */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-skip-if "doubles are floats" { "avr-*-*" } { "*" } { "" } } */
|
||||
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */
|
||||
/* { dg-final { scan-tree-dump "cdce2.c:16: note: function call is shrink-wrapped into error conditions\." "cdce" } }*/
|
||||
/* { dg-final { cleanup-tree-dump "cdce" } } */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,11 +1,10 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-fdump-tree-original" } */
|
||||
/* { dg-options "-w -fdump-tree-original" } */
|
||||
|
||||
char c1 __attribute__ ((aligned (1)));
|
||||
char c2 __attribute__ ((aligned (2)));
|
||||
char c4 __attribute__ ((aligned (4)));
|
||||
char c8 __attribute__ ((aligned (8)));
|
||||
|
||||
char c8 __attribute__ ((aligned (8)));
|
||||
unsigned f1(void)
|
||||
{
|
||||
return 3 & (__SIZE_TYPE__)&c1;
|
||||
|
@ -3,14 +3,22 @@
|
||||
/* { dg-options "-O2 -fdump-tree-original" } */
|
||||
|
||||
void foo (void);
|
||||
|
||||
#if(__SIZEOF_INT__ >= 4)
|
||||
int test1 (int a)
|
||||
#else
|
||||
int test1 (long a)
|
||||
#endif
|
||||
|
||||
{
|
||||
if ((a >> 3) & 134217728)
|
||||
foo ();
|
||||
}
|
||||
|
||||
#if(__SIZEOF_INT__ >= 4)
|
||||
int test2 (unsigned int b)
|
||||
#else
|
||||
int test2 (unsigned long b)
|
||||
#endif
|
||||
{
|
||||
if ((b >> 3) & 134217728)
|
||||
foo ();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-compile } */
|
||||
/* { dg-skip-if "consts are shorts, not longs" { "m32c-*-*" } { "*" } { "" } } */
|
||||
/* { dg-skip-if "consts are shorts, not longs" { "m32c-*-*" "avr-*-*" } { "*" } { "" } } */
|
||||
/* { dg-options "-O -ftrapping-math" } */
|
||||
|
||||
/* There should be exactly 2 +Inf in the assembly file. */
|
||||
|
@ -5,8 +5,9 @@
|
||||
short int
|
||||
g (void)
|
||||
{
|
||||
short int wc = ((short int)1 << 31) - 1; /* { dg-bogus "overflow .* overflow" } */
|
||||
short int wc = ((short int)1 << (8 * __SIZEOF_INT__ - 1)) - 1; /* { dg-bogus "overflow .* overflow" } */
|
||||
/* { dg-warning "overflow" "" { target *-*-* } 8 } */
|
||||
return wc;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/* { dg-require-effective-target int32plus } */
|
||||
#include "struct-1.h"
|
||||
|
||||
struct ChainSearchRecord {
|
||||
@ -7,6 +6,11 @@ struct ChainSearchRecord {
|
||||
typedef struct ChainSearchRecord ChainSearchRecord;
|
||||
void foo (ChainSearchPtr s)
|
||||
{
|
||||
#if(__SIZEOF_INT__ >= 4)
|
||||
s->identity = 0x6a73616d;
|
||||
#else
|
||||
s->identity = 0x616d;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ void init_code ()
|
||||
object V658;
|
||||
|
||||
T1240:
|
||||
if (V648 >= (long)V651)
|
||||
if (V648 >= (long)V651) /* { dg-warning "cast from pointer to integer of different size" "" { target { "avr-*-*" } } } */
|
||||
goto T1243;
|
||||
V653 = ((char *) V654->v.v_self)[V648];
|
||||
V659 = (object) V654 + V653;
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
|
||||
/* { dg-skip-if "No dollar in identfiers" { "avr-*-*" } { "*" } { "" } } */
|
||||
/* { dg-options "-std=c99 -fdollars-in-identifiers -fextended-identifiers" } */
|
||||
void abort (void);
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
|
||||
/* Test the char16_t and char32_t promotion rules. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-excess-errors "short and int are 16bit" { target { "avr-*-*" } } } */
|
||||
/* { dg-options "-std=gnu99 -Wall -Wconversion -Wsign-conversion" } */
|
||||
|
||||
typedef short unsigned int char16_t;
|
||||
@ -43,9 +44,9 @@ void m (char16_t c0, char32_t c1)
|
||||
f_c (c1); /* { dg-warning "alter its value" } */
|
||||
fsc (c1); /* { dg-warning "alter its value" } */
|
||||
fuc (c1); /* { dg-warning "alter its value" } */
|
||||
f_s (c1); /* { dg-warning "alter its value" } */
|
||||
fss (c1); /* { dg-warning "alter its value" } */
|
||||
fus (c1); /* { dg-warning "alter its value" } */
|
||||
f_s (c1); /* { dg-warning "alter its value" "" { target { ! "avr-*-*" } } } */
|
||||
fss (c1); /* { dg-warning "alter its value" "" { target { ! "avr-*-*" } } } */
|
||||
fus (c1); /* { dg-warning "alter its value" "" { target { ! "avr-*-*" } } } */
|
||||
f_i (c1); /* { dg-warning "change the sign" } */
|
||||
fsi (c1); /* { dg-warning "change the sign" } */
|
||||
fui (c1);
|
||||
|
@ -28,9 +28,9 @@ testfunc1 ()
|
||||
foo_f (cd); /* { dg-warning "as floating rather than complex" "prototype conversion warning" } */
|
||||
|
||||
foo_ld (i); /* { dg-warning "as floating rather than integer" "prototype conversion warning" } */
|
||||
foo_ld (f);
|
||||
foo_ld (ld);
|
||||
foo_ld (cd); /* { dg-warning "as floating rather than complex" "prototype conversion warning" } */
|
||||
foo_ld (f); /* { dg-warning "as 'float' rather than 'double'" "small double" { target { "avr-*-*" } } } */
|
||||
foo_ld (ld);/* { dg-warning "as 'float' rather than 'double'" "small long double" { target { "avr-*-*" } } } */
|
||||
foo_ld (cd);/* { dg-warning "as floating rather than complex" "prototype conversion warning" } */
|
||||
|
||||
foo_cd (i); /* { dg-warning "as complex rather than integer" "prototype conversion warning" } */
|
||||
foo_cd (f); /* { dg-warning "as complex rather than floating" "prototype conversion warning" } */
|
||||
|
Loading…
Reference in New Issue
Block a user