pack-test-5.c: Add -mno-ms-bitfields option for mingw-targets.
* gcc.dg/pack-test-5.c: Add -mno-ms-bitfields option for mingw-targets. * gcc.dg/Wpadded.c: Likewise. * gcc.dg/bf-ms-layout-2.c: Adjust offsets to fit ms-bitfield structure-layout. * gcc.dg/di-sync-multithread.c: Replace for mingw-target the use for sleep by Sleep and add windows.h include for this function. * gcc.dg/format/dfp-printf-1.c: Adjust dg-skip-if rule for mingw targets. * gcc.dg/stack-usage-1.c (SIZE): Provide proper SIZE for x64 mingw target. * gcc.dg/tls/thr-cse-1.c: Provide proper pattern for x64 mingw target. * gcc.dg/tls/opt-11.c (memset): Use __extension__ to avoid fail on x64 mingw target. * gcc.dg/bf-ms-attrib.c: Adjust expected size for ms_struct layout. * gcc.dg/pr50251.c: Disable test for x64 mingw target. * gcc.c-torture/execute/930930-1.c (long): Replace by ptr_t to avoid failure on LLP64 target. From-SVN: r184519
This commit is contained in:
parent
560ad30812
commit
4d33b77106
13 changed files with 68 additions and 27 deletions
|
@ -1,3 +1,25 @@
|
|||
2012-02-23 Kai Tietz <ktietz@redhat.com>
|
||||
|
||||
* gcc.dg/pack-test-5.c: Add -mno-ms-bitfields option
|
||||
for mingw-targets.
|
||||
* gcc.dg/Wpadded.c: Likewise.
|
||||
* gcc.dg/bf-ms-layout-2.c: Adjust offsets to fit ms-bitfield
|
||||
structure-layout.
|
||||
* gcc.dg/di-sync-multithread.c: Replace for mingw-target the use
|
||||
for sleep by Sleep and add windows.h include for this function.
|
||||
* gcc.dg/format/dfp-printf-1.c: Adjust dg-skip-if rule for mingw
|
||||
targets.
|
||||
* gcc.dg/stack-usage-1.c (SIZE): Provide proper SIZE for x64 mingw
|
||||
target.
|
||||
* gcc.dg/tls/thr-cse-1.c: Provide proper pattern for x64 mingw
|
||||
target.
|
||||
* gcc.dg/tls/opt-11.c (memset): Use __extension__ to avoid fail
|
||||
on x64 mingw target.
|
||||
* gcc.dg/bf-ms-attrib.c: Adjust expected size for ms_struct layout.
|
||||
* gcc.dg/pr50251.c: Disable test for x64 mingw target.
|
||||
* gcc.c-torture/execute/930930-1.c (long): Replace by ptr_t to avoid
|
||||
failure on LLP64 target.
|
||||
|
||||
2012-02-23 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
PR c/52290
|
||||
|
|
|
@ -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 @@ f (mr_TR, mr_SPB, mr_HB, reg1, reg2)
|
|||
|
||||
main ()
|
||||
{
|
||||
mem[99] = (long) mem;
|
||||
mem[99] = (ptr_t) mem;
|
||||
f (mem + 100, mem + 6, mem + 8, mem + 99, mem + 99);
|
||||
exit (0);
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
We won't get a warning anyway if the target has "packed" structure
|
||||
layout. */
|
||||
/* { dg-options "-Wpadded -fpack-struct=8" } */
|
||||
/* { dg-additional-options "-mno-ms-bitfields" { target *-*-mingw* } } */
|
||||
|
||||
struct foo {
|
||||
char bar;
|
||||
|
|
|
@ -32,7 +32,7 @@ main()
|
|||
/* 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();
|
||||
|
|
|
@ -158,27 +158,27 @@ int main(){
|
|||
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 @@ main ()
|
|||
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, ...);
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 @@ foo (int x, int y, void *z)
|
|||
long
|
||||
bar (long x, long y, long z)
|
||||
{
|
||||
return foo (x, y, (void *) z);
|
||||
return foo (x, y, (void *) (ptr_t) z);
|
||||
}
|
||||
|
|
|
@ -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-*-* } } */
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
/* { dg-require-effective-target tls_runtime } */
|
||||
/* { dg-add-options tls } */
|
||||
|
||||
__extension__ typedef __SIZE_TYPE__ size_t;
|
||||
|
||||
extern void abort (void);
|
||||
extern void *memset (void *, int, __SIZE_TYPE__);
|
||||
extern void *memset (void *, int, size_t);
|
||||
|
||||
struct A
|
||||
{
|
||||
|
|
|
@ -18,10 +18,11 @@ int foo (int b, int c, int d)
|
|||
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*" } } } */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue