===================================================================
@@ -1,6 +1,7 @@
/* PR c/11446: packed on a struct takes precedence over aligned on the type
of a field. */
/* { dg-do run } */
+/* { dg-additional-options "-mno-ms-bitfields" { target *-*-mingw* } } */
extern void abort (void);
===================================================================
@@ -158,27 +158,27 @@
struct ten test_ten;
#if defined (_TEST_MS_LAYOUT) || defined (_MSC_VER)
- size_t exp_sizeof_one = 12;
- size_t exp_sizeof_two = 16;
+ size_t exp_sizeof_one = 8;
+ size_t exp_sizeof_two = 12;
size_t exp_sizeof_three =6;
size_t exp_sizeof_four = 8;
size_t exp_sizeof_five = 3;
size_t exp_sizeof_six = 8;
size_t exp_sizeof_seven = 3;
- size_t exp_sizeof_eight = 4;
+ size_t exp_sizeof_eight = 2;
size_t exp_sizeof_nine = 8;
- size_t exp_sizeof_ten = 16;
+ size_t exp_sizeof_ten = 8;
- unsigned char exp_one_c = 8;
- unsigned char exp_two_c = 12;
+ unsigned char exp_one_c = 7;
+ unsigned char exp_two_c = 9;
unsigned char exp_three_c = 4;
unsigned char exp_four_c = 4;
char exp_five_c = 2;
char exp_six_c = 5;
char exp_seven_c = 2;
- char exp_eight_c = 2;
+ char exp_eight_c = 1;
char exp_nine_c = 0;
- char exp_ten_c = 8;
+ char exp_ten_c = 1;
#else /* testing -mno-ms-bitfields */
===================================================================
@@ -10,6 +10,9 @@
#include <pthread.h>
#include <unistd.h>
+#ifdef _WIN32
+#include <windows.h>
+#endif
/*#define DEBUGIT 1 */
@@ -175,7 +178,11 @@
t, err);
};
+#ifdef _WIN32
+ Sleep (5000);
+#else
sleep (5);
+#endif
/* Stop please. */
__sync_lock_test_and_set (&doquit, 1ll);
===================================================================
@@ -3,7 +3,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target dfp } */
/* { dg-options "-Wformat" } */
-/* { dg-skip-if "No scanf/printf dfp support" { *-*-mingw* } } */
+/* { dg-skip-if "No scanf/printf dfp support" { *-*-mingw* } { "*" }
{ "" } } */
extern int printf (const char *restrict, ...);
===================================================================
@@ -5,7 +5,8 @@
packing to be larger than 1, which cannot be guaranteed for all targets.
We won't get a warning anyway if the target has "packed" structure
layout. */
-/* { dg-options "-Wpadded -fpack-struct=8" } */
+/* { dg-additional-options "-Wpadded -fpack-struct=8" } */
+/* { dg-additional-options "-mno-ms-bitfields" { target *-*-mingw* } } */
struct foo {
char bar;
===================================================================
@@ -10,7 +10,11 @@
#if defined(__i386__)
# define SIZE 248
#elif defined(__x86_64__)
-# define SIZE 356
+# ifndef _WIN64
+# define SIZE 356
+# else
+# define SIZE (256 - 24)
+# endif
#elif defined (__sparc__)
# if defined (__arch64__)
# define SIZE 76
===================================================================
@@ -3,6 +3,8 @@
/* { dg-options "-g -O2" } */
/* { dg-require-effective-target ptr32plus } */
+__extension__ typedef __PTRDIFF_TYPE__ ptr_t;
+
int baz (int, int, void *);
static inline __attribute__ ((always_inline)) long
@@ -16,5 +18,5 @@
long
bar (long x, long y, long z)
{
- return foo (x, y, (void *) z);
+ return foo (x, y, (void *) (ptr_t) z);
}
===================================================================
@@ -18,10 +18,11 @@
return a;
}
-/* { dg-final { scan-assembler-not
"emutls_get_address.*emutls_get_address.*" { target { ! {
"*-wrs-vxworks" "*-*-darwin8" "hppa*-*-hpux*" "spu-*-*"
"i?86-*-mingw*" } } } } } */
+/* { dg-final { scan-assembler-not
"emutls_get_address.*emutls_get_address.*" { target { ! {
"*-wrs-vxworks" "*-*-darwin8" "hppa*-*-hpux*" "spu-*-*"
"i?86-*-mingw*" "x86_64-*-mingw*" } } } } } */
/* { dg-final { scan-assembler-not
"call\tL___emutls_get_address.stub.*call\tL___emutls_get_address.stub.*"
{ target "*-*-darwin8" } } } */
/* { dg-final { scan-assembler-not "(b,l|bl)
__emutls_get_address.*(b,l|bl) __emutls_get_address.*" { target
"hppa*-*-hpux*" } } } */
/* { dg-final { scan-assembler-not
"(brsl|brasl)\t__emutls_get_address.*(brsl|brasl)\t__emutls_get_address.*"
{ target spu-*-* } } } */
/* { dg-final { scan-assembler-not "tls_lookup.*tls_lookup.*" {
target *-wrs-vxworks } } } */
/* { dg-final { scan-assembler-not
"call\t___emutls_get_address.*call\t___emutls_get_address" { target
"i?86-*-mingw*" } } } */
+/* { dg-final { scan-assembler-not
"call\t__emutls_get_address.*call\t__emutls_get_address" { target
"x86_64-*-mingw*" } } } */
===================================================================
@@ -3,7 +3,7 @@
/* { dg-add-options tls } */
extern void abort (void);
-extern void *memset (void *, int, __SIZE_TYPE__);
+__extension__ extern void *memset (void *, int, __SIZE_TYPE__);
struct A
{
===================================================================
@@ -32,7 +32,7 @@
/* As long as the sizes are as expected, we know attributes are working.
bf-ms-layout.c makes sure the right thing happens when the attribute
is on. */
- if (sizeof(struct one_ms) != 12)
+ if (sizeof(struct one_ms) != 8)
abort();
if (sizeof(struct one_gcc) != 8)
abort();
===================================================================
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! { x86_64-*-mingw* } } } } */
/* { dg-options "-O2" } */
/* { dg-additional-options "-mpreferred-stack-boundary=12" { target
x86_64-*-* } } */
===================================================================
@@ -1,23 +1,24 @@
-long *wm_TR;
-long *wm_HB;
-long *wm_SPB;
+__extension__ typedef __PTRDIFF_TYPE__ ptr_t;
+ptr_t *wm_TR;
+ptr_t *wm_HB;
+ptr_t *wm_SPB;
-long mem[100];
+ptr_t mem[100];
f (mr_TR, mr_SPB, mr_HB, reg1, reg2)
- long *mr_TR;
- long *mr_SPB;
- long *mr_HB;
- long *reg1;
- long *reg2;
+ ptr_t *mr_TR;
+ ptr_t *mr_SPB;
+ ptr_t *mr_HB;
+ ptr_t *reg1;
+ ptr_t *reg2;
{
- long *x = mr_TR;
+ ptr_t *x = mr_TR;
for (;;)
{
if (reg1 < reg2)
goto out;
- if ((long *) *reg1 < mr_HB && (long *) *reg1 >= mr_SPB)
+ if ((ptr_t *) *reg1 < mr_HB && (ptr_t *) *reg1 >= mr_SPB)
*--mr_TR = *reg1;
reg1--;
}
@@ -29,7 +30,7 @@
main ()
{
- mem[99] = (long) mem;
+ mem[99] = (ptr_t) mem;
f (mem + 100, mem + 6, mem + 8, mem + 99, mem + 99);
exit (0);
}