From 7a852b965676eef1476321c9fc4ecf9d5dfe6c21 Mon Sep 17 00:00:00 2001 From: Georg-Johann Lay Date: Fri, 13 Jan 2012 19:03:20 +0000 Subject: [PATCH] 20120111-1.c: Fix wrong int = int32_t assumption. * gcc.c-torture/execute/20120111-1.c: Fix wrong int = int32_t assumption. * g++.dg/ipa/pr51759.C: Fix assumption sizeof(int) > 2. * gcc.dg/cpp/warn-multichar.c: Fix to work on int=16 platforms. * gcc.dg/cpp/warn-multichar-2.c: Ditto. * gcc.dg/debug/dwarf2/pr49871.c: Add dg-require-effective-target int32plus because of big array needed. * gcc.dg/pr50527.c: Don't FAIL if sizeof(void*) = 2 * gcc.dg/lto/20090218-2_1.c: Fix prototype of malloc, memcpy. From-SVN: r183158 --- gcc/testsuite/ChangeLog | 12 ++++++++++++ gcc/testsuite/g++.dg/ipa/pr51759.C | 4 ++++ gcc/testsuite/gcc.c-torture/execute/20120111-1.c | 2 +- gcc/testsuite/gcc.dg/cpp/warn-multichar-2.c | 2 +- gcc/testsuite/gcc.dg/cpp/warn-multichar.c | 2 +- gcc/testsuite/gcc.dg/lto/20090218-2_1.c | 4 ++-- gcc/testsuite/gcc.dg/pr50527.c | 2 +- 7 files changed, 22 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 12d5830a0a2..5c4ff697e32 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,15 @@ +2012-01-13 Georg-Johann Lay + + * gcc.c-torture/execute/20120111-1.c: Fix wrong int = int32_t + assumption. + * g++.dg/ipa/pr51759.C: Fix assumption sizeof(int) > 2. + * gcc.dg/cpp/warn-multichar.c: Fix to work on int=16 platforms. + * gcc.dg/cpp/warn-multichar-2.c: Ditto. + * gcc.dg/debug/dwarf2/pr49871.c: Add dg-require-effective-target + int32plus because of big array needed. + * gcc.dg/pr50527.c: Don't FAIL if sizeof(void*) = 2 + * gcc.dg/lto/20090218-2_1.c: Fix prototype of malloc, memcpy. + 2012-01-13 Jason Merrill PR c++/51813 diff --git a/gcc/testsuite/g++.dg/ipa/pr51759.C b/gcc/testsuite/g++.dg/ipa/pr51759.C index accfaf2dcc2..1acb7cf1f9c 100644 --- a/gcc/testsuite/g++.dg/ipa/pr51759.C +++ b/gcc/testsuite/g++.dg/ipa/pr51759.C @@ -1,6 +1,10 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +#if __SIZEOF_INT__ == 2 && __SIZEOF_LONG__ == 4 +#define unsigned unsigned long +#endif + extern "C" void abort (void); struct S { diff --git a/gcc/testsuite/gcc.c-torture/execute/20120111-1.c b/gcc/testsuite/gcc.c-torture/execute/20120111-1.c index eac086e3b51..cd18a3b66b2 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20120111-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20120111-1.c @@ -6,7 +6,7 @@ uint32_t f0a (uint64_t arg2) __attribute__((noinline)); uint32_t f0a (uint64_t arg) { - return ~(arg > -3); + return ~((unsigned) (arg > -3)); } int main() { diff --git a/gcc/testsuite/gcc.dg/cpp/warn-multichar-2.c b/gcc/testsuite/gcc.dg/cpp/warn-multichar-2.c index f9fd4f6dfa0..5b5a0cc377c 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-multichar-2.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-multichar-2.c @@ -1,5 +1,5 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Werror=multichar" } /* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */ -#if 'abc' // { dg-error "multi-character character constant .-Werror=multichar." } +#if 'ab' // { dg-error "multi-character character constant .-Werror=multichar." } #endif diff --git a/gcc/testsuite/gcc.dg/cpp/warn-multichar.c b/gcc/testsuite/gcc.dg/cpp/warn-multichar.c index f5b02dad479..9188a158685 100644 --- a/gcc/testsuite/gcc.dg/cpp/warn-multichar.c +++ b/gcc/testsuite/gcc.dg/cpp/warn-multichar.c @@ -1,5 +1,5 @@ // { dg-do preprocess } // { dg-options "-std=gnu99 -fdiagnostics-show-option -Wmultichar" } -#if 'abc' // { dg-warning "multi-character character constant .-Wmultichar." } +#if 'ab' // { dg-warning "multi-character character constant .-Wmultichar." } #endif diff --git a/gcc/testsuite/gcc.dg/lto/20090218-2_1.c b/gcc/testsuite/gcc.dg/lto/20090218-2_1.c index 119fbe4a16b..5e103cb0359 100644 --- a/gcc/testsuite/gcc.dg/lto/20090218-2_1.c +++ b/gcc/testsuite/gcc.dg/lto/20090218-2_1.c @@ -4,8 +4,8 @@ int main(void) { return 0; } -void *malloc(unsigned long size); -void *memcpy(void *dest, const void *src, unsigned long n); +void *malloc(__SIZE_TYPE__ size); +void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n); static mem_attrs * get_mem_attrs () { void **slot; *slot = malloc (3); diff --git a/gcc/testsuite/gcc.dg/pr50527.c b/gcc/testsuite/gcc.dg/pr50527.c index 87fae9659d5..824c3fc6037 100644 --- a/gcc/testsuite/gcc.dg/pr50527.c +++ b/gcc/testsuite/gcc.dg/pr50527.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-Os --param large-stack-frame=30" } */ +/* { dg-options "-Os --param large-stack-frame=30 -Wno-pointer-to-int-cast" } */ extern void abort (void); -- 2.30.2