summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-11 16:03:03 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-11 16:03:03 +0000
commit3bc27e2679214e7ebf931b6526e8d730302bea02 (patch)
tree464194ba44e3e419e94749e114cb365402e0577e /gcc/testsuite/gcc.c-torture
parent8f78e2d345b9c738fc24ec158dc4f20016a58b5c (diff)
downloadgcc-3bc27e2679214e7ebf931b6526e8d730302bea02.tar.gz
2011-07-11 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 176158 using svnmerge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@176161 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20000804-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr16566-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr41679.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr46883.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr46934.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr49644.c16
7 files changed, 64 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
index 6916951bb72..38e42be2040 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c
@@ -1,7 +1,7 @@
/* This does not work on h8300 due to the use of an asm
statement to force a 'long long' (64-bits) to go in a register. */
/* { dg-do assemble } */
-/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ilp32 && { ! nonpic } } } { "*" } { "" } } */
+/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ia32 && { ! nonpic } } } { "*" } { "" } } */
/* { dg-skip-if "No 64-bit registers" { m32c-*-* } { "*" } { "" } } */
/* { dg-skip-if "Not enough 64-bit registers" { pdp11-*-* } { "-O0" } { "" } } */
/* { dg-xfail-if "" { h8300-*-* } { "*" } { "" } } */
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c b/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c
index 2f7a10668a7..73cf05a0d5d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c
@@ -1,6 +1,6 @@
/* ICE with flexible arrays in non-lvalue structures. Bug 16566
(comment #5). */
-/* { dg-options "-Wno-psabi" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
+/* { dg-options "-Wno-psabi" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } } */
struct A
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41679.c b/gcc/testsuite/gcc.c-torture/compile/pr41679.c
new file mode 100644
index 00000000000..aa10cb612e3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41679.c
@@ -0,0 +1,15 @@
+/* { dg-options "-g" } */
+
+extern int a;
+extern char b;
+extern int foo (void);
+
+void
+test (void)
+{
+ int c;
+ b = foo () ? '~' : '\0';
+ while ((c = foo ()))
+ if (c == '7')
+ a = 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46883.c b/gcc/testsuite/gcc.c-torture/compile/pr46883.c
new file mode 100644
index 00000000000..db8527d5452
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr46883.c
@@ -0,0 +1,13 @@
+void bar (unsigned char *q, unsigned short *data16s, int len)
+{
+ int i;
+
+ for (i = 0; i < len; i++)
+ {
+ q[2 * i] =
+ (((data16s[i] & 0xFF) << 8) | ((data16s[i] >> 8) & 0xFF)) & 0xFF;
+ q[2 * i + 1] =
+ ((unsigned short)
+ (((data16s[i] & 0xFF) << 8) | ((data16s[i] >> 8) & 0xFF))) >> 8;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46934.c b/gcc/testsuite/gcc.c-torture/compile/pr46934.c
new file mode 100644
index 00000000000..a9c0b683315
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr46934.c
@@ -0,0 +1,17 @@
+int caller (unsigned int reg_type)
+{
+ switch (reg_type)
+ {
+ case 0x80000000:
+ return (int)foo();
+
+ case 0x80000003:
+ return (int) bar();
+
+ case 0x80000001:
+ return (int) baz();
+
+ case 0x80000004:
+ return (int) fooz();
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
index 25009e47c3e..d15e90a525a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
@@ -44,7 +44,7 @@ set additional_flags "-fno-inline"
if [istarget "i\[34567\]86-*-*"] then {
lappend additional_flags "-ffloat-store"
}
-if { [istarget "x86_64-*-*"] && [check_effective_target_ilp32] } then {
+if { [istarget "x86_64-*-*"] && [check_effective_target_ia32] } then {
lappend additional_flags "-ffloat-store"
}
if [istarget "m68k-*-*"] then {
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr49644.c b/gcc/testsuite/gcc.c-torture/execute/pr49644.c
new file mode 100644
index 00000000000..88be23c40a9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr49644.c
@@ -0,0 +1,16 @@
+/* PR c/49644 */
+
+extern void abort (void);
+
+int
+main ()
+{
+ _Complex double a[12], *c = a, s = 3.0 + 1.0i;
+ double b[12] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, *d = b;
+ int i;
+ for (i = 0; i < 6; i++)
+ *c++ = *d++ * s;
+ if (c != a + 6 || d != b + 6)
+ abort ();
+ return 0;
+}