summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-12 03:43:39 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-12 03:43:39 +0000
commit80f256468055dce2c6b5edeba747a66ae6c16771 (patch)
tree0e28b2a77ead278ce4d143f845d124442038a09e /gcc/testsuite/gcc.target
parent69d4a59043e5e60826db60da7f9d7a519a1585e3 (diff)
downloadgcc-80f256468055dce2c6b5edeba747a66ae6c16771.tar.gz
Synchronize with trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/fortran-dev@145974 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target')
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpabsb-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpabsd-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpabsw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpalignr-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vphaddd-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vphaddsw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vphaddw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vphsubd-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vphsubsw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vphsubw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpmaddubsw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpmulhrsw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpshufb-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpsignb-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpsignd-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vpsignw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39678.c19
-rw-r--r--gcc/testsuite/gcc.target/mips/interrupt_handler.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c8
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-memmovua.c2
-rw-r--r--gcc/testsuite/gcc.target/spu/tag_manager.c9
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c72
22 files changed, 117 insertions, 27 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpabsb-1.c b/gcc/testsuite/gcc.target/i386/avx-vpabsb-1.c
index 80081ff1c28..bd5b1fbe9f4 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpabsb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpabsb-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mfpmath=sse -mavx" } */
+/* { dg-options "-O2 -mfpmath=sse -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpabsd-1.c b/gcc/testsuite/gcc.target/i386/avx-vpabsd-1.c
index 3b165f1a61d..3ea84d80827 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpabsd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpabsd-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mfpmath=sse -mavx" } */
+/* { dg-options "-O2 -mfpmath=sse -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpabsw-1.c b/gcc/testsuite/gcc.target/i386/avx-vpabsw-1.c
index b737068127e..6de79a5b627 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpabsw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpabsw-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mfpmath=sse -mavx" } */
+/* { dg-options "-O2 -mfpmath=sse -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpalignr-1.c b/gcc/testsuite/gcc.target/i386/avx-vpalignr-1.c
index 13c84c8f9f6..1a60b467ffd 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpalignr-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpalignr-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mfpmath=sse -mavx" } */
+/* { dg-options "-O2 -mfpmath=sse -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vphaddd-1.c b/gcc/testsuite/gcc.target/i386/avx-vphaddd-1.c
index 57af9a6039a..d0aee21394a 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vphaddd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vphaddd-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vphaddsw-1.c b/gcc/testsuite/gcc.target/i386/avx-vphaddsw-1.c
index 0fce115c311..b58978aeb63 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vphaddsw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vphaddsw-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mfpmath=sse -mavx" } */
+/* { dg-options "-O2 -mfpmath=sse -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vphaddw-1.c b/gcc/testsuite/gcc.target/i386/avx-vphaddw-1.c
index 08faf3ca272..cdf17f694ff 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vphaddw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vphaddw-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vphsubd-1.c b/gcc/testsuite/gcc.target/i386/avx-vphsubd-1.c
index 93cc726ea3a..b1be419cb8d 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vphsubd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vphsubd-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vphsubsw-1.c b/gcc/testsuite/gcc.target/i386/avx-vphsubsw-1.c
index cd0e687f8d0..477523e30eb 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vphsubsw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vphsubsw-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vphsubw-1.c b/gcc/testsuite/gcc.target/i386/avx-vphsubw-1.c
index f9050da565b..55893a67298 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vphsubw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vphsubw-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpmaddubsw-1.c b/gcc/testsuite/gcc.target/i386/avx-vpmaddubsw-1.c
index c80ad6fd408..adc4763006d 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpmaddubsw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpmaddubsw-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpmulhrsw-1.c b/gcc/testsuite/gcc.target/i386/avx-vpmulhrsw-1.c
index 6451bf12c33..121252ec664 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpmulhrsw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpmulhrsw-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpshufb-1.c b/gcc/testsuite/gcc.target/i386/avx-vpshufb-1.c
index a868b191cfc..5ab106c3f05 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpshufb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpshufb-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mavx" } */
+/* { dg-options "-O2 -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpsignb-1.c b/gcc/testsuite/gcc.target/i386/avx-vpsignb-1.c
index c88acf2e0fa..9677c683422 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpsignb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpsignb-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mfpmath=sse -mavx" } */
+/* { dg-options "-O2 -mfpmath=sse -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpsignd-1.c b/gcc/testsuite/gcc.target/i386/avx-vpsignd-1.c
index ca5bb39db08..84b16b73a15 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpsignd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpsignd-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mfpmath=sse -mavx" } */
+/* { dg-options "-O2 -mfpmath=sse -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/avx-vpsignw-1.c b/gcc/testsuite/gcc.target/i386/avx-vpsignw-1.c
index 392ca03e066..daf47e6019f 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vpsignw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vpsignw-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target avx } */
-/* { dg-options "-O2 -mfpmath=sse -mavx" } */
+/* { dg-options "-O2 -mfpmath=sse -mavx -fno-strict-aliasing" } */
#define CHECK_H "avx-check.h"
#define TEST avx_test
diff --git a/gcc/testsuite/gcc.target/i386/pr39678.c b/gcc/testsuite/gcc.target/i386/pr39678.c
new file mode 100644
index 00000000000..70e8ff497cd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39678.c
@@ -0,0 +1,19 @@
+/* PR target/39678 */
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2" } */
+
+struct X {
+ char c;
+ __complex__ float val;
+};
+
+struct X
+foo (float *p)
+{ /* { dg-message "note: The ABI of passing structure with complex float member has changed in GCC 4.4" } */
+ struct X x;
+ x.c = -3;
+ __real x.val = p[0];
+ __imag x.val = p[1];
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/mips/interrupt_handler.c b/gcc/testsuite/gcc.target/mips/interrupt_handler.c
index 1cf891829f7..35ee1d20614 100644
--- a/gcc/testsuite/gcc.target/mips/interrupt_handler.c
+++ b/gcc/testsuite/gcc.target/mips/interrupt_handler.c
@@ -1,5 +1,5 @@
/* Test attributes for interrupt handlers */
-/* { dg-do compile } */
+/* { dg-do assemble } */
/* { dg-options "-mips32r2 -msoft-float" } */
void f () { }
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c b/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c
index b7081bf7186..761c7b0b5df 100644
--- a/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c
+++ b/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c
@@ -35,15 +35,15 @@ long long f4() {
}
/* Aligned. */
-struct u0 { unsigned long long d : 32; } y0;
+struct u0 { unsigned long long d : 32; } y_0;
unsigned long long g0() {
- return y0.d;
+ return y_0.d;
}
/* Unaligned load. */
-struct u1 { long long c : 8; unsigned long long d : 32; } y1;
+struct u1 { long long c : 8; unsigned long long d : 32; } y_1;
unsigned long long g1() {
- return y1.d;
+ return y_1.d;
}
/* Unaligned load. */
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c b/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c
index 68927929854..ec5c0bdab59 100644
--- a/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c
+++ b/gcc/testsuite/gcc.target/sh/sh4a-memmovua.c
@@ -5,7 +5,7 @@
/* { dg-final { scan-assembler-times "\tmovua\\.l\t(.*)+" 2 } } */
#ifdef __SH4A__
-#include <stdlib.h>
+#include <string.h>
struct s { int i; char a[10], b[10]; } x;
int f() {
diff --git a/gcc/testsuite/gcc.target/spu/tag_manager.c b/gcc/testsuite/gcc.target/spu/tag_manager.c
index 24a206c4b95..4b3ab9f8dda 100644
--- a/gcc/testsuite/gcc.target/spu/tag_manager.c
+++ b/gcc/testsuite/gcc.target/spu/tag_manager.c
@@ -1,8 +1,8 @@
-/* Copyright (C) 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2007, 2009 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
+ Software Foundation; either version 3 of the License, or (at your option)
any later version.
This file is distributed in the hope that it will be useful, but WITHOUT
@@ -11,9 +11,8 @@
for more details.
You should have received a copy of the GNU General Public License
- along with this file; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this file; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
/* { dg-do run } */
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c b/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
index 68eca53a2e4..299bc80caba 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
@@ -2,6 +2,7 @@
#include "defines.h"
#include "args.h"
+#include <complex.h>
struct IntegerRegisters iregs;
struct FloatRegisters fregs;
@@ -116,6 +117,45 @@ check_struct_passing8 (struct flex2_struct is ATTRIBUTE_UNUSED)
check_int_arguments;
}
+struct complex1_struct
+{
+ int c;
+ __complex__ float x;
+};
+
+struct complex1a_struct
+{
+ long l;
+ float f;
+};
+
+struct complex2_struct
+{
+ int c;
+ __complex__ float x;
+ float y;
+};
+
+struct complex2a_struct
+{
+ long l;
+ double d;
+};
+
+void
+check_struct_passing9 (struct complex1_struct is ATTRIBUTE_UNUSED)
+{
+ check_int_arguments;
+ check_float_arguments;
+}
+
+void
+check_struct_passing10 (struct complex2_struct is ATTRIBUTE_UNUSED)
+{
+ check_int_arguments;
+ check_double_arguments;
+}
+
static struct flex1_struct f1s = { 60, { } };
static struct flex2_struct f2s = { 61, { } };
@@ -136,6 +176,18 @@ main (void)
};
int i;
#endif
+ struct complex1_struct c1s = { 4, ( -13.4 + 3.5*I ) };
+ union
+ {
+ struct complex1_struct c;
+ struct complex1a_struct u;
+ } c1u;
+ struct complex2_struct c2s = { 4, ( -13.4 + 3.5*I ), -34.5 };
+ union
+ {
+ struct complex2_struct c;
+ struct complex2a_struct u;
+ } c2u;
clear_struct_registers;
iregs.I0 = is.i;
@@ -185,5 +237,25 @@ main (void)
clear_int_hardware_registers;
WRAP_CALL (check_struct_passing8)(f2s);
+ clear_struct_registers;
+ c1u.c = c1s;
+ iregs.I0 = c1u.u.l;
+ num_iregs = 1;
+ fregs.xmm0._float [0] = c1u.u.f;
+ num_fregs = 1;
+ clear_int_hardware_registers;
+ clear_float_hardware_registers;
+ WRAP_CALL (check_struct_passing9)(c1s);
+
+ clear_struct_registers;
+ c2u.c = c2s;
+ iregs.I0 = c2u.u.l;
+ num_iregs = 1;
+ fregs.xmm0._double[0] = c2u.u.d;
+ num_fregs = 1;
+ clear_int_hardware_registers;
+ clear_float_hardware_registers;
+ WRAP_CALL (check_struct_passing10)(c2s);
+
return 0;
}