20120111-1.c: Fix wrong int = int32_t assumption.
authorGeorg-Johann Lay <avr@gjlay.de>
Fri, 13 Jan 2012 19:03:20 +0000 (19:03 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Fri, 13 Jan 2012 19:03:20 +0000 (19:03 +0000)
* 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
gcc/testsuite/g++.dg/ipa/pr51759.C
gcc/testsuite/gcc.c-torture/execute/20120111-1.c
gcc/testsuite/gcc.dg/cpp/warn-multichar-2.c
gcc/testsuite/gcc.dg/cpp/warn-multichar.c
gcc/testsuite/gcc.dg/lto/20090218-2_1.c
gcc/testsuite/gcc.dg/pr50527.c

index 12d5830a0a2dd149c63b51e4a9e27fc178718698..5c4ff697e32e5080b43f66831e571bd4473ca8a6 100644 (file)
@@ -1,3 +1,15 @@
+2012-01-13  Georg-Johann Lay  <avr@gjlay.de>
+
+       * 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  <jason@redhat.com>
 
        PR c++/51813
index accfaf2dcc2df0d92e3d694f699d0be9b5b35730..1acb7cf1f9c528886172a886421aeebfee92f3cc 100644 (file)
@@ -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
 {
index eac086e3b51b371396e91ab54f77b87259d3d7d0..cd18a3b66b26723dc826f294b1fd4d8124945500 100644 (file)
@@ -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() {
index f9fd4f6dfa042c7ab92aac17786d6e6c599e9153..5b5a0cc377ca29290f8c10a7e57ae04000d5887a 100644 (file)
@@ -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
index f5b02dad4792e6d9d82669f5af4cf537614661fa..9188a15868547513c15c9e07788839940801ed99 100644 (file)
@@ -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
index 119fbe4a16bcb790322d6d6f4e86a414be0ec6a1..5e103cb0359acd24759728e8de8a6af89dcaeffd 100644 (file)
@@ -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);
index 87fae9659d5dd808849782e52a16a9db102e983e..824c3fc6037f98afe7316dcd7c6f274426f7123a 100644 (file)
@@ -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);