From: Andy Hutchinson Date: Wed, 18 Jun 2008 21:41:13 +0000 (+0000) Subject: limits-fndefn.c: Skip for AVR. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77cacee41732f60acc96a5aaf1488a6b4ee7f8ac;p=gcc.git 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 39655958612..f9bd049d14d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,24 @@ +2008-06-18 Andy Hutchinson + + * 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 * gcc.dg/dfp/convert-bfp-6.c, gcc.dg/dfp/convert-bfp-9.c: XFAIL diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c index 4d2aef08933..0c5a2f5e774 100644 --- a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c +++ b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c @@ -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) diff --git a/gcc/testsuite/gcc.dg/Wconversion-5.c b/gcc/testsuite/gcc.dg/Wconversion-5.c index a09caae4def..2b0884525f4 100644 --- a/gcc/testsuite/gcc.dg/Wconversion-5.c +++ b/gcc/testsuite/gcc.dg/Wconversion-5.c @@ -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" } */ } diff --git a/gcc/testsuite/gcc.dg/Wconversion-real-integer.c b/gcc/testsuite/gcc.dg/Wconversion-real-integer.c index 5911f6a778b..1c03ba487e3 100644 --- a/gcc/testsuite/gcc.dg/Wconversion-real-integer.c +++ b/gcc/testsuite/gcc.dg/Wconversion-real-integer.c @@ -2,6 +2,7 @@ integers. */ /* { dg-do compile } +/* { dg-skip-if "doubles are floats,ints are 16bits" { "avr-*-*" } { "*" } { "" } } */ /* { dg-options "-std=c99 -Wconversion" } */ #include @@ -70,3 +71,4 @@ void h (void) } + diff --git a/gcc/testsuite/gcc.dg/Wconversion-real.c b/gcc/testsuite/gcc.dg/Wconversion-real.c index 4e79fd20e13..06396fba33c 100644 --- a/gcc/testsuite/gcc.dg/Wconversion-real.c +++ b/gcc/testsuite/gcc.dg/Wconversion-real.c @@ -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; diff --git a/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c b/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c index ae13e73ef8b..79fbbd00f44 100644 --- a/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c +++ b/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c @@ -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; } + diff --git a/gcc/testsuite/gcc.dg/Wtype-limits.c b/gcc/testsuite/gcc.dg/Wtype-limits.c index 64e7da61c9a..5a4605a08d6 100644 --- a/gcc/testsuite/gcc.dg/Wtype-limits.c +++ b/gcc/testsuite/gcc.dg/Wtype-limits.c @@ -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; } + diff --git a/gcc/testsuite/gcc.dg/builtins-config.h b/gcc/testsuite/gcc.dg/builtins-config.h index 556e87adee0..7e375b8d693 100644 --- a/gcc/testsuite/gcc.dg/builtins-config.h +++ b/gcc/testsuite/gcc.dg/builtins-config.h @@ -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. */ diff --git a/gcc/testsuite/gcc.dg/cdce1.c b/gcc/testsuite/gcc.dg/cdce1.c index 77971720086..61b19c9065c 100644 --- a/gcc/testsuite/gcc.dg/cdce1.c +++ b/gcc/testsuite/gcc.dg/cdce1.c @@ -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 #include #include diff --git a/gcc/testsuite/gcc.dg/cdce2.c b/gcc/testsuite/gcc.dg/cdce2.c index d79f27e404f..a461ce7ac30 100644 --- a/gcc/testsuite/gcc.dg/cdce2.c +++ b/gcc/testsuite/gcc.dg/cdce2.c @@ -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 #include #include diff --git a/gcc/testsuite/gcc.dg/fold-bitand-1.c b/gcc/testsuite/gcc.dg/fold-bitand-1.c index 413ed67d239..f490b153b2d 100644 --- a/gcc/testsuite/gcc.dg/fold-bitand-1.c +++ b/gcc/testsuite/gcc.dg/fold-bitand-1.c @@ -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; diff --git a/gcc/testsuite/gcc.dg/fold-eqandshift-3.c b/gcc/testsuite/gcc.dg/fold-eqandshift-3.c index d3b4adcf76c..5ed744ab536 100644 --- a/gcc/testsuite/gcc.dg/fold-eqandshift-3.c +++ b/gcc/testsuite/gcc.dg/fold-eqandshift-3.c @@ -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 (); diff --git a/gcc/testsuite/gcc.dg/fold-overflow-1.c b/gcc/testsuite/gcc.dg/fold-overflow-1.c index bed8aac9f9b..e2b731b735a 100644 --- a/gcc/testsuite/gcc.dg/fold-overflow-1.c +++ b/gcc/testsuite/gcc.dg/fold-overflow-1.c @@ -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. */ diff --git a/gcc/testsuite/gcc.dg/multiple-overflow-warn-3.c b/gcc/testsuite/gcc.dg/multiple-overflow-warn-3.c index afb4e517f28..da19de508d4 100644 --- a/gcc/testsuite/gcc.dg/multiple-overflow-warn-3.c +++ b/gcc/testsuite/gcc.dg/multiple-overflow-warn-3.c @@ -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; } + diff --git a/gcc/testsuite/gcc.dg/pch/struct-1.c b/gcc/testsuite/gcc.dg/pch/struct-1.c index 698e88b285a..9559c07e980 100644 --- a/gcc/testsuite/gcc.dg/pch/struct-1.c +++ b/gcc/testsuite/gcc.dg/pch/struct-1.c @@ -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 } + diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c b/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c index 1cece8163d2..55e75d48e2b 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr33920.c @@ -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; diff --git a/gcc/testsuite/gcc.dg/ucnid-5.c b/gcc/testsuite/gcc.dg/ucnid-5.c index 8cd86060dfe..aea57ef0682 100644 --- a/gcc/testsuite/gcc.dg/ucnid-5.c +++ b/gcc/testsuite/gcc.dg/ucnid-5.c @@ -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); diff --git a/gcc/testsuite/gcc.dg/utf-cvt.c b/gcc/testsuite/gcc.dg/utf-cvt.c index 109d231bff4..5c39644f917 100644 --- a/gcc/testsuite/gcc.dg/utf-cvt.c +++ b/gcc/testsuite/gcc.dg/utf-cvt.c @@ -1,6 +1,7 @@ /* Contributed by Kris Van Hees */ /* 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); diff --git a/gcc/testsuite/gcc.dg/wtr-conversion-1.c b/gcc/testsuite/gcc.dg/wtr-conversion-1.c index 15086f245fe..72094c21840 100644 --- a/gcc/testsuite/gcc.dg/wtr-conversion-1.c +++ b/gcc/testsuite/gcc.dg/wtr-conversion-1.c @@ -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" } */