aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/ia64
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
committerBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
commit1bc5aee63eb72b341f506ad058502cd0361f0d10 (patch)
treec607e8252f3405424ff15bc2d00aa38dadbb2518 /gcc-4.9/gcc/testsuite/gcc.target/ia64
parent283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb (diff)
downloadtoolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.gz
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.bz2
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.zip
Initial checkin of GCC 4.9.0 from trunk (r208799).
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/ia64')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20010423-1.c17
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20020313-1.c72
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20020326-1.c11
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20030225-2.c46
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20030405-1.c29
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20030811-1.c59
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20040303-1.c20
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20040709-2.c151
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20071210-2.c68
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20080802-1.c19
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20090324-1.c21
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/20101014.c66
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/asm-1.c29
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-bswap-1.c9
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-bswap-2.c9
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-fma-1.c25
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-fma-2.c19
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-popcount-1.c9
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-popcount-2.c9
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-1.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-2.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-varargs-1.c33
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/fpreg-1.c82
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/fpreg-2.c21
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c31
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/got-1.c23
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/ia64.exp41
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/mfused-madd-vect.c33
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/mfused-madd.c64
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/mno-fused-madd-vect.c31
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/mno-fused-madd.c64
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/postinc-1.c23
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr29682.c51
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-1.c68
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-2.c68
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-3.c76
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr43603.c39
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr43897.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr48496.c24
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr49303.c185
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr52657.c44
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/pr52731.c19
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-opt-1.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-opt-2.c12
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c11
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/small-addr-1.c23
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/sync-1.c23
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/types-1.c41
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/types-2.c20
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/versionid-1.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/versionid-2.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/visibility-1.c38
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/visibility-2.c15
54 files changed, 1970 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20010423-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20010423-1.c
new file mode 100644
index 000000000..4cec79370
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20010423-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int __sync_fetch_and_add_si (int *, int);
+
+inline unsigned int
+bar (volatile unsigned int *mem, unsigned int val)
+{
+ return __sync_fetch_and_add_si((int *)mem, (int)val);
+}
+
+volatile unsigned int x;
+
+void foo (unsigned short *a)
+{
+ *a = bar (&x, 1) + 1;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20020313-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20020313-1.c
new file mode 100644
index 000000000..bc134febf
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20020313-1.c
@@ -0,0 +1,72 @@
+/* PR 5312
+ The problem here is that the ia64 scheduler saw a sequence of L L M type
+ insns, and messed up its internal state on which slot it was issuing
+ to, and aborted. */
+
+/* { dg-do compile } */
+/* In ILP32 mode, we get warnings about large integer constants.
+ Those cause spurious FAILs. */
+/* { dg-options "-w -O2 -mconstant-gp" } */
+
+typedef unsigned long __u64;
+typedef unsigned int __u32;
+typedef struct { } spinlock_t;
+struct cpuinfo_ia64 {
+ union {
+ struct {
+ __u32 irq_count;
+ __u32 bh_count;
+ } f;
+ __u64 irq_and_bh_counts;
+ } irq_stat;
+ __u32 softirq_pending;
+} __attribute__ ((aligned ((1UL << 14)))) ;
+enum
+{
+ TCA_UNSPEC,
+ TCA_KIND,
+ TCA_OPTIONS,
+ TCA_STATS,
+ TCA_XSTATS,
+ TCA_RATE,
+};
+struct tc_stats
+{
+ __u64 bytes;
+ __u32 packets;
+ __u32 drops;
+ __u32 overlimits;
+ __u32 bps;
+ __u32 pps;
+ __u32 qlen;
+ __u32 backlog;
+ spinlock_t *lock;
+};
+struct sk_buff {
+ unsigned int data_len;
+ unsigned char *tail;
+ unsigned char *end;
+};
+static inline int skb_is_nonlinear(const struct sk_buff *skb)
+{
+ return skb->data_len;
+}
+static inline int skb_tailroom(const struct sk_buff *skb)
+{
+ return skb_is_nonlinear(skb) ? 0 : skb->end-skb->tail;
+}
+struct rtattr
+{
+ unsigned short rta_len;
+ unsigned short rta_type;
+};
+int qdisc_copy_stats(struct sk_buff *skb, struct tc_stats *st)
+{
+ do { do { (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count)++; __asm__ __volatile__("": : :"memory"); } while (0); (void)(st->lock); } while (0);
+ ({ if (skb_tailroom(skb) < (int)( (((( ((sizeof(struct rtattr))+4 -1) & ~(4 -1) ) + ((char*)&st->lock - (char*)st)))+4 -1) & ~(4 -1) )) goto rtattr_failure; __rta_fill(skb, TCA_STATS, (char*)&st->lock - (char*)st, st); });
+ do { do { } while(0); do { do { __asm__ __volatile__("": : :"memory"); (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count)--; } while (0); if (__builtin_expect((((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->softirq_pending), 0) && (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count) == 0) do_softirq(); } while (0); } while (0);
+ return 0;
+rtattr_failure:
+ do { do { } while(0); do { do { __asm__ __volatile__("": : :"memory"); (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count)--; } while (0); if (__builtin_expect((((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->softirq_pending), 0) && (((struct cpuinfo_ia64 *) (0xa000000000000000 + 2*(1UL << 14)))->irq_stat.f.bh_count) == 0) do_softirq(); } while (0); } while (0);
+ return -1;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20020326-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20020326-1.c
new file mode 100644
index 000000000..16da750ba
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20020326-1.c
@@ -0,0 +1,11 @@
+/* PR target/6054 */
+/* { dg-do compile } */
+/* { dg-options "-O -mconstant-gp" } */
+/* { dg-final { scan-assembler "mov r1 =" } } */
+
+extern void direct (void);
+void foo(void (*indirect) (void))
+{
+ indirect ();
+ direct ();
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030225-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030225-2.c
new file mode 100644
index 000000000..278180777
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030225-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+extern void abort (void);
+extern void exit (int);
+
+int __attribute__((noinline, const))
+ret4 (float value)
+{
+ return 4;
+}
+
+int __attribute__((noinline, const))
+ret0 (float value)
+{
+ return 0;
+}
+
+float __attribute__((noinline))
+test (float x, float y)
+{
+ int clsx = ret4 (x);
+ int clsy = ret0 (y);
+
+ if (clsx == 0 || clsy == 0
+ || (y < 0 && clsx == 1 && clsy == 1))
+ return x - y;
+
+ return x < y ? 0 : x - y;
+}
+
+float a = 0.0, b;
+
+int main (void)
+{
+ unsigned long e;
+ b = a / a;
+ __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (e));
+ e &= ~0x7e000UL;
+ __asm__ __volatile__ ("mov.m ar.fpsr=%0" :: "r" (e) : "memory");
+ a = test (0, b);
+ __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (e));
+ if (e & 0x2000)
+ abort ();
+ exit (0);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030405-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030405-1.c
new file mode 100644
index 000000000..510638ce5
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030405-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (int x, int y)
+{
+ if (y == 0)
+ {
+ register long r8 asm ("r8");
+ register long r15 asm ("r15") = 1;
+ long retval;
+ __asm __volatile ("foo" : "=r" (r8), "=r" (r15) : "1" (r15));
+ retval = r8;
+ y = retval;
+ }
+
+ {
+ register long r8 asm ("r8");
+ register long r15 asm ("r15") = 2;
+ long retval;
+ register long _out1 asm ("out1") = x;
+ register long _out0 asm ("out0") = y;
+ __asm __volatile ("foo"
+ : "=r" (r8), "=r" (r15) , "=r" (_out0), "=r" (_out1)
+ : "1" (r15) , "2" (_out0), "3" (_out1));
+ retval = r8;
+ return retval;
+ }
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030811-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030811-1.c
new file mode 100644
index 000000000..45f78b361
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20030811-1.c
@@ -0,0 +1,59 @@
+/* Origin: PR target/11693 from Andreas Schwab <schwab@suse.de> */
+/* { dg-do compile } */
+/* { dg-options "-O2 -frename-registers" } */
+
+static inline unsigned long long
+foo (void)
+{
+ unsigned long long x;
+ __asm__ __volatile__ ("" : "=r" (x) :: "memory");
+ return x;
+}
+
+static inline void
+bar (unsigned long long x, unsigned long long y)
+{
+ __asm__ __volatile__ ("" :: "r"(x), "r"(y) : "memory");
+}
+
+static inline void
+baz (unsigned long long x, unsigned long long y, unsigned long long z,
+ unsigned long long p, unsigned long long q)
+{
+ __asm__ __volatile__ ("" :: "r" (q << 2) : "memory");
+ __asm__ __volatile__ ("" :: "r" (z) : "memory");
+ if (x & 0x1)
+ __asm__ __volatile__ ("" :: "r" (y), "r" (p) : "memory");
+ if (x & 0x2)
+ __asm__ __volatile__ ("" :: "r" (y), "r" (p) : "memory");
+}
+
+static inline unsigned long long
+ffz (unsigned long long x)
+{
+ unsigned long long r;
+ __asm__ ("" : "=r" (r) : "r" (x & (~x - 1)));
+ return r;
+}
+
+void die (const char *, ...) __attribute__ ((noreturn));
+
+void
+test (void *x)
+{
+ unsigned long long a, c;
+
+ a = foo ();
+ bar (0xc000000000000000LL, 0x660);
+ bar (0xa00000000000c000LL, 0x539);
+ baz (2, 1, 0xa000000000008000LL,
+ ({ unsigned long long b;
+ b = ({ unsigned long long d; __asm__ ("" : "=r" (d) : "r" (x)); d; })
+ + 0x10000000000661LL;
+ b;
+ }),
+ 14);
+ c = ffz (0x1fffffffffffffffLL);
+ if (c < 51 || c > 61)
+ die ("die", c - 1);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20040303-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20040303-1.c
new file mode 100644
index 000000000..60b5c528f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20040303-1.c
@@ -0,0 +1,20 @@
+/* Test floating point division on ia64. There was a bug in the
+ max-throughput version of the inline division code. Expecting an
+ exact value from a floating point expression is unwise but GCC
+ depends on it in allocno_compare. */
+
+/* { dg-do run } */
+/* { dg-options "-minline-float-divide-max-throughput" } */
+
+extern void abort (void);
+
+volatile int i = 24;
+volatile int j = 30;
+volatile int k = 1;
+
+int main()
+{
+ int pri2 = (((double) i / j) * (10000 / 1000) * k);
+ if (pri2 != 8) abort();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20040709-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20040709-2.c
new file mode 100644
index 000000000..585ab06f0
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20040709-2.c
@@ -0,0 +1,151 @@
+/* Check for ia64 data speculation failure with '-O2 -funroll-loops'. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -funroll-loops -Wno-overflow" } */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned int
+myrnd (void)
+{
+ static unsigned int s = 1388815473;
+ s *= 1103515245;
+ s += 12345;
+ return (s / 65536) % 2048;
+}
+
+#define T(S) \
+struct S s##S; \
+struct S retme##S (struct S x) \
+{ \
+ return x; \
+} \
+ \
+unsigned int fn1##S (unsigned int x) \
+{ \
+ struct S y = s##S; \
+ y.k += x; \
+ y = retme##S (y); \
+ return y.k; \
+} \
+ \
+unsigned int fn2##S (unsigned int x) \
+{ \
+ struct S y = s##S; \
+ y.k += x; \
+ y.k %= 15; \
+ return y.k; \
+} \
+ \
+unsigned int retit##S (void) \
+{ \
+ return s##S.k; \
+} \
+ \
+unsigned int fn3##S (unsigned int x) \
+{ \
+ s##S.k += x; \
+ return retit##S (); \
+} \
+ \
+void test##S (void) \
+{ \
+ int i; \
+ unsigned int mask, v, a, r; \
+ struct S x; \
+ char *p = (char *) &s##S; \
+ for (i = 0; i < sizeof (s##S); ++i) \
+ *p++ = myrnd (); \
+ if (__builtin_classify_type (s##S.l) == 8) \
+ s##S.l = 5.25; \
+ s##S.k = -1; \
+ mask = s##S.k; \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn1##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || x.k != s##S.k || x.l != s##S.l \
+ || ((v + a) & mask) != r) \
+ abort (); \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn2##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || x.k != s##S.k || x.l != s##S.l \
+ || ((((v + a) & mask) % 15) & mask) != r) \
+ abort (); \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn3##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || s##S.k != r || x.l != s##S.l \
+ || ((v + a) & mask) != r) \
+ abort (); \
+}
+
+#define pck __attribute__((packed))
+struct pck A { unsigned short i : 1, l : 1, j : 3, k : 11; }; T(A)
+struct pck B { unsigned short i : 4, j : 1, k : 11; unsigned int l; }; T(B)
+struct pck C { unsigned int l; unsigned short i : 4, j : 1, k : 11; }; T(C)
+struct pck D { unsigned long long l : 6, i : 6, j : 23, k : 29; }; T(D)
+struct pck E { unsigned long long l, i : 12, j : 23, k : 29; }; T(E)
+struct pck F { unsigned long long i : 12, j : 23, k : 29, l; }; T(F)
+struct pck G { unsigned short i : 1, j : 1, k : 6; unsigned long long l; }; T(G)
+struct pck H { unsigned short i : 6, j : 2, k : 8; unsigned long long l; }; T(H)
+struct pck I { unsigned short i : 1, j : 6, k : 1; unsigned long long l; }; T(I)
+struct pck J { unsigned short i : 1, j : 8, k : 7; unsigned short l; }; T(J)
+struct pck K { unsigned int k : 6, l : 1, j : 10, i : 15; }; T(K)
+struct pck L { unsigned int k : 6, j : 11, i : 15; unsigned int l; }; T(L)
+struct pck M { unsigned int l; unsigned short k : 6, j : 11, i : 15; }; T(M)
+struct pck N { unsigned long long l : 6, k : 6, j : 23, i : 29; }; T(N)
+struct pck O { unsigned long long l, k : 12, j : 23, i : 29; }; T(O)
+struct pck P { unsigned long long k : 12, j : 23, i : 29, l; }; T(P)
+struct pck Q { unsigned short k : 12, j : 1, i : 3; unsigned long long l; }; T(Q)
+struct pck R { unsigned short k : 2, j : 11, i : 3; unsigned long long l; }; T(R)
+struct pck S { unsigned short k : 1, j : 6, i : 9; unsigned long long l; }; T(S)
+struct pck T { unsigned short k : 1, j : 8, i : 7; unsigned short l; }; T(T)
+struct pck U { unsigned short j : 6, k : 1, i : 9; unsigned long long l; }; T(U)
+struct pck V { unsigned short j : 8, k : 1, i : 7; unsigned short l; }; T(V)
+struct pck W { long double l; unsigned int k : 12, j : 13, i : 7; }; T(W)
+struct pck X { unsigned int k : 12, j : 13, i : 7; long double l; }; T(X)
+struct pck Y { unsigned int k : 12, j : 11, i : 9; long double l; }; T(Y)
+struct pck Z { long double l; unsigned int j : 13, i : 7, k : 12; }; T(Z)
+
+int
+main (void)
+{
+ testA ();
+ testB ();
+ testC ();
+ testD ();
+ testE ();
+ testF ();
+ testG ();
+ testH ();
+ testI ();
+ testJ ();
+ testK ();
+ testL ();
+ testM ();
+ testN ();
+ testO ();
+ testP ();
+ testQ ();
+ testR ();
+ testS ();
+ testT ();
+ testU ();
+ testV ();
+ testW ();
+ testX ();
+ testY ();
+ testZ ();
+ exit (0);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20071210-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20071210-2.c
new file mode 100644
index 000000000..96a20a73f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20071210-2.c
@@ -0,0 +1,68 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -fselective-scheduling2" } */
+
+extern void abort (void);
+
+struct S
+{
+ int n1, n2, n3, n4;
+};
+
+__attribute__((noinline)) struct S
+foo (int x, int y, int z)
+{
+ if (x != 10 || y != 9 || z != 8)
+ abort ();
+ struct S s = { 1, 2, 3, 4 };
+ return s;
+}
+
+__attribute__((noinline)) void **
+bar (void **u, int *v)
+{
+ void **w = u;
+ int *s = v, x, y, z;
+ void **p, **q;
+ static void *l[] = { &&lab1, &&lab1, &&lab2, &&lab3, &&lab4 };
+
+ if (!u)
+ return l;
+
+ q = *w++;
+ goto *q;
+lab2:
+ p = q;
+ q = *w++;
+ x = s[2];
+ y = s[1];
+ z = s[0];
+ s -= 1;
+ struct S r = foo (x, y, z);
+ s[3] = r.n1;
+ s[2] = r.n2;
+ s[1] = r.n3;
+ s[0] = r.n4;
+ goto *q;
+lab3:
+ p = q;
+ q = *w++;
+ s += 1;
+ s[0] = 23;
+lab1:
+ goto *q;
+lab4:
+ return 0;
+}
+
+int
+main (void)
+{
+ void **u = bar ((void **) 0, (int *) 0);
+ void *t[] = { u[2], u[4] };
+ int s[] = { 7, 8, 9, 10, 11, 12 };
+ if (bar (t, &s[1]) != (void **) 0
+ || s[0] != 4 || s[1] != 3 || s[2] != 2 || s[3] != 1
+ || s[4] != 11 || s[5] != 12)
+ abort ();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20080802-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20080802-1.c
new file mode 100644
index 000000000..b689a5d8d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20080802-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msched-control-spec" } */
+
+struct cpp_reader;
+
+extern const char * parse_include (struct cpp_reader *, int *m, void *);
+extern int _cpp_compare_file_date (struct cpp_reader *, const char *, int);
+
+void
+_cpp_init_internal_pragmas (struct cpp_reader *pfile)
+{
+ const char *fname;
+ int angle_brackets, ordering;
+
+ fname = parse_include (pfile, &angle_brackets, (void *) 0);
+ if (!fname)
+ return;
+ ordering = _cpp_compare_file_date (pfile, fname, angle_brackets);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20090324-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20090324-1.c
new file mode 100644
index 000000000..d9aff6a18
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20090324-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fmodulo-sched" } */
+
+static char *place_region_bounds_x, *place_region_bounds_y;
+static void read_place () {
+ char msg[300];
+ update_screen (msg);
+}
+static void alloc_and_load_placement_structs () {
+ int i, j;
+ for (j=0;
+ j<100;
+ j++) {
+ place_region_bounds_x[i] = place_region_bounds_x[i-1];
+ place_region_bounds_y[i] = place_region_bounds_y[i-1];
+ }
+}
+void place_and_route () {
+ read_place ();
+ alloc_and_load_placement_structs ();
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/20101014.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20101014.c
new file mode 100644
index 000000000..c3e3e9f35
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/20101014.c
@@ -0,0 +1,66 @@
+/* { dg-do compile } */
+/* { dg-options "-w -O2 -g -fselective-scheduling2" } */
+
+typedef long unsigned int size_t;
+struct fileloc
+{
+ const char *file;
+};
+typedef struct type *type_p;
+typedef const struct type *const_type_p;
+enum typekind
+{
+ TYPE_STRUCT,
+ TYPE_UNION,
+ TYPE_POINTER,
+ TYPE_LANG_STRUCT,
+ TYPE_PARAM_STRUCT
+};
+struct type
+{
+ enum typekind kind;
+ union
+ {
+ struct
+ {
+ struct fileloc line;
+ } s;
+ struct
+ {
+ struct fileloc line;
+ } param_struct;
+ } u;
+};
+struct outf
+{
+ size_t bufused;
+ char *buf;
+};
+typedef struct outf *outf_p;
+oprintf (outf_p o, const char *format, ...)
+{
+ char *s;
+ size_t slength;
+ memcpy (o->buf + o->bufused, s, slength);
+}
+output_mangled_typename (outf_p of, const_type_p t)
+{
+ switch (t->kind)
+ {
+ case TYPE_POINTER: (fancy_abort ("/gcc/gengtype.c", 1988, __FUNCTION__));
+ }
+}
+output_type_enum (outf_p of, type_p s)
+{
+ if (s->kind == TYPE_PARAM_STRUCT && s->u.param_struct.line.file != ((void *)0))
+ {
+ oprintf (of, ", gt_e_");
+ }
+ else if (((s)->kind == TYPE_UNION || (s)->kind == TYPE_STRUCT || (s)->kind == TYPE_LANG_STRUCT) && s->u.s.line.file != ((void *)0))
+ {
+ oprintf (of, ", gt_ggc_e_");
+ output_mangled_typename (of, s);
+ }
+ else
+ oprintf (of, ", gt_types_enum_last");
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/asm-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/asm-1.c
new file mode 100644
index 000000000..0acfee589
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/asm-1.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options } */
+
+extern void abort (void);
+
+/* Test that "=S" properly avoids the post-increment on the memory address. */
+
+static void foo(int *x)
+{
+ long i;
+ for (i = 0; i < 100; ++i)
+ __asm__("st4 %0 = r0" : "=S"(x[i]));
+}
+
+int main()
+{
+ int array[100];
+ long i;
+
+ for (i = 0; i < 100; ++i)
+ array[i] = -1;
+
+ foo(array);
+
+ for (i = 0; i < 100; ++i)
+ if (array[i])
+ abort ();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-bswap-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-bswap-1.c
new file mode 100644
index 000000000..381e3fe22
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-bswap-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "mux1" } } */
+
+long foo (long x)
+{
+ return __builtin_bswap64 (x);
+}
+
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-bswap-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-bswap-2.c
new file mode 100644
index 000000000..96f32c702
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-bswap-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "mux1" } } */
+
+int foo (int x)
+{
+ return __builtin_bswap32 (x);
+}
+
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-fma-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-fma-1.c
new file mode 100644
index 000000000..a4b2e063c
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-fma-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+/* Don't confuse the fma insn with the fma in the filename. */
+/* { dg-final { scan-assembler-times "fma\\." 4 } } */
+/* { dg-final { scan-assembler-times "fms" 2 } } */
+/* { dg-final { scan-assembler-times "fnma" 4 } } */
+
+#ifndef __FP_FAST_FMAF
+# error "__FP_FAST_FMAF should be defined"
+#endif
+#ifndef __FP_FAST_FMA
+# error "__FP_FAST_FMA should be defined"
+#endif
+
+float f0(float x, float y, float z) { return __builtin_fmaf(x,y,z); }
+float f1(float x, float y, float z) { return __builtin_fmaf(x,y,-z); }
+float f2(float x, float y, float z) { return __builtin_fmaf(-x,y,z); }
+float f3(float x, float y, float z) { return __builtin_fmaf(x,-y,z); }
+float f4(float x, float y, float z) { return __builtin_fmaf(-x,-y,z); }
+
+double d0(double x, double y, double z) { return __builtin_fma(x,y,z); }
+double d1(double x, double y, double z) { return __builtin_fma(x,y,-z); }
+double d2(double x, double y, double z) { return __builtin_fma(-x,y,z); }
+double d3(double x, double y, double z) { return __builtin_fma(x,-y,z); }
+double d4(double x, double y, double z) { return __builtin_fma(-x,-y,z); }
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-fma-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-fma-2.c
new file mode 100644
index 000000000..16d95b70c
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-fma-2.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-skip-if "128-bit long double" { *-*-hpux* } { "*" } { "" } } */
+/* { dg-options "-O" } */
+/* Don't confuse the fma insn with the fma in the filename. */
+/* { dg-final { scan-assembler-times "fma\[ \]" 2 } } */
+/* { dg-final { scan-assembler-times "fms" 1 } } */
+/* { dg-final { scan-assembler-times "fnma" 2 } } */
+
+#ifndef __FP_FAST_FMAL
+# error "__FP_FAST_FMAL should be defined"
+#endif
+
+typedef long double LD;
+
+LD L0(LD x, LD y, LD z) { return __builtin_fmal(x,y,z); }
+LD L1(LD x, LD y, LD z) { return __builtin_fmal(x,y,-z); }
+LD L2(LD x, LD y, LD z) { return __builtin_fmal(-x,y,z); }
+LD L3(LD x, LD y, LD z) { return __builtin_fmal(x,-y,z); }
+LD L4(LD x, LD y, LD z) { return __builtin_fmal(-x,-y,z); }
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-popcount-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-popcount-1.c
new file mode 100644
index 000000000..c9641d0e6
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-popcount-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "popcnt" } } */
+
+int foo (int x)
+{
+ return __builtin_popcount (x);
+}
+
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-popcount-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-popcount-2.c
new file mode 100644
index 000000000..50ced72e7
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/builtin-popcount-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "popcnt" } } */
+
+int foo (int x)
+{
+ return __builtin_popcount (x) == 0;
+}
+
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-1.c
new file mode 100644
index 000000000..38e9c870f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-1.c
@@ -0,0 +1,12 @@
+/* Bug 14610 */
+/* { dg-do run } */
+
+extern void abort(void);
+volatile __float80 x = 30.0;
+
+int main(void)
+{
+ double d = x;
+ if (d != 30.0) abort ();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-2.c
new file mode 100644
index 000000000..346daa7ba
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-2.c
@@ -0,0 +1,13 @@
+/* Bug 14610 */
+/* { dg-do run } */
+/* { dg-options "-minline-int-divide-max-throughput" } */
+
+extern void abort(void);
+volatile int j = 30;
+
+int main(void)
+{
+ if (29 % j != 29) abort();
+ if (30 % j != 0) abort();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-varargs-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-varargs-1.c
new file mode 100644
index 000000000..96524be6b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/float80-varargs-1.c
@@ -0,0 +1,33 @@
+/* Test for a bug with passing __float80 in varargs. The __float80
+ value was wrongly passed, leading to an abort. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do run } */
+/* { dg-options "" } */
+
+#include <stdarg.h>
+
+extern void abort (void);
+extern void exit (int);
+
+__float80 s = 1.234L;
+__float80 d;
+
+void vf (int a0, ...);
+
+int
+main (void)
+{
+ vf (0, s);
+ if (d != s)
+ abort ();
+ exit (0);
+}
+
+void
+vf (int a0, ...)
+{
+ va_list ap;
+ va_start (ap, a0);
+ d = va_arg (ap, __float80);
+ va_end (ap);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/fpreg-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/fpreg-1.c
new file mode 100644
index 000000000..8c9e21d7c
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/fpreg-1.c
@@ -0,0 +1,82 @@
+/* Test permitted and invalid uses of __fpreg. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+__float80 f80;
+double d;
+/* Default initialized __fpreg is OK. */
+__fpreg fpreg, fpreg2;
+/* But explicitly zero-initialized is an invalid conversion. */
+__fpreg fi = 0; /* { dg-error "invalid conversion to '__fpreg'" } */
+
+__fpreg f0 (__fpreg);
+int f1 (__float80);
+
+/* __fpreg in a structure is OK. */
+struct s {
+ __float80 b;
+ __fpreg a;
+} x;
+
+void
+f (void)
+{
+ __fpreg *p;
+ /* Valid operations. */
+ fpreg = fpreg2;
+ fpreg2 = (__fpreg) fpreg;
+ fpreg = f0 (fpreg2);
+ fpreg = +fpreg2;
+ p = &fpreg;
+ (void) fpreg;
+ fpreg = x.a;
+ fpreg2 = (struct s) { 0 }.a;
+ fpreg = (d ? fpreg : fpreg2);
+ d = sizeof (fpreg);
+ (void)(fpreg, fpreg);
+ /* Invalid operations. */
+ ++fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ --fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg++; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg--; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = -fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = ~fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = !fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = *fpreg; /* { dg-error "invalid type argument" } */
+ if (fpreg) /* { dg-error "invalid operation on '__fpreg'" } */
+ return;
+ d = fpreg; /* { dg-error "invalid conversion from '__fpreg'" } */
+ d = (double) fpreg; /* { dg-error "invalid conversion from '__fpreg'" } */
+ fpreg = (__fpreg) d; /* { dg-error "invalid conversion to '__fpreg'" } */
+ fpreg = fpreg * fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = fpreg / fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = fpreg % fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = fpreg + fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = fpreg - fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = fpreg << fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = fpreg >> fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg < fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg > fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg <= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg >= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg == fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg != fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg & fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg ^ fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg | fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg && fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = fpreg || fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ d = (fpreg ? 1 : 2); /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg = (d ? fpreg : d); /* { dg-error "invalid conversion to '__fpreg'" } */
+ fpreg *= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg /= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg %= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg += fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg -= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg <<= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg >>= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg &= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg ^= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+ fpreg |= fpreg; /* { dg-error "invalid operation on '__fpreg'" } */
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/fpreg-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/fpreg-2.c
new file mode 100644
index 000000000..a21bd0fb2
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/fpreg-2.c
@@ -0,0 +1,21 @@
+/* Test __fpreg ABI. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-final { scan-assembler "ldf.fill" } } */
+/* { dg-final { scan-assembler "stf.spill" } } */
+
+__fpreg x;
+
+void f (void);
+
+void
+g (void)
+{
+ __fpreg b = x;
+ f ();
+ x = b;
+}
+
+char t1[(sizeof (__fpreg) == sizeof (__float80) ? 1 : -1)];
+char t2[(__alignof (__fpreg) == __alignof (__float80) ? 1 : -1)];
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c
new file mode 100644
index 000000000..b3d4536bf
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile { target ia64-*-linux* } } */
+/* { dg-options "-O2" } */
+
+/* { dg-final { scan-assembler-not "@ltoffx\\(os_boot_rendez#\\)" } } */
+/* { dg-final { scan-assembler "@ltoff\\(@fptr\\(os_boot_rendez#\\)\\)" } } */
+
+/* Test function descriptor access. */
+
+struct ia64_fdesc
+{
+ unsigned long func;
+ unsigned long gp;
+};
+
+void
+os_boot_rendez (void)
+{
+}
+
+extern int check (unsigned long);
+
+int
+main (int argc, char **argv)
+{
+ int i;
+ int res = 0;
+
+ for (i = 0; i < 1; i++)
+ res += check (((struct ia64_fdesc *) os_boot_rendez)->gp);
+ return res;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/got-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/got-1.c
new file mode 100644
index 000000000..7a12ebd02
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/got-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fPIC" } */
+
+/* { dg-final { scan-assembler "@ltoffx\\(object#\\)" } } */
+/* { dg-final { scan-assembler "@ltoffx\\(object#\[-+\]16384\\)" } } */
+/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]1\\)" } } */
+/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]8191\\)" } } */
+/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]8192\\)" } } */
+/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]8193\\)" } } */
+/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]16383\\)" } } */
+/* { dg-final { scan-assembler-not "@ltoffx\\(object#\[-+\]16385\\)" } } */
+
+/* must not be in sdata */
+extern char object[];
+
+#define r(n) char *r_##n (void) { return &object[n]; }
+#define R(n) char *R_##n (void) { return &object[-n]; }
+
+#define t(n) r(n) R(n)
+
+t(0) t(1)
+t(8191) t(8192) t(8193)
+t(16383) t(16384) t(16385)
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/ia64.exp b/gcc-4.9/gcc/testsuite/gcc.target/ia64/ia64.exp
new file mode 100644
index 000000000..d70e990c3
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/ia64.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an IA-64 target.
+if ![istarget ia64*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/mfused-madd-vect.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/mfused-madd-vect.c
new file mode 100644
index 000000000..e166e85da
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/mfused-madd-vect.c
@@ -0,0 +1,33 @@
+/* { dg-do compile */
+/* { dg-options "-O2 -ftree-vectorize" } */
+/* { dg-final { scan-assembler-not "fpmpy" } } */
+
+/* fpma and fpms will show in either way because there are no
+ specific vector add/sub instructions. So we just check for fpmpy. */
+
+#define N 16
+extern bar(float *, float *, float *, float *);
+void foo()
+{
+ int i;
+ float a[N], b[N], c[N], d[N];
+ bar(a,b,c,d);
+ for (i = 0; i < N; i++) {
+ a[i] = b[i] + c[i] * d[i];
+ }
+ bar(a,b,c,d);
+#if 0
+ for (i = 0; i < N; i++) {
+ a[i] = b[i] - c[i] * d[i];
+ }
+ bar(a,b,c,d);
+#endif
+ for (i = 0; i < N; i++) {
+ a[i] = b[i] * c[i] + d[i];
+ }
+ bar(a,b,c,d);
+ for (i = 0; i < N; i++) {
+ a[i] = b[i] * c[i] - d[i];
+ }
+ bar(a,b,c,d);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/mfused-madd.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/mfused-madd.c
new file mode 100644
index 000000000..8ecb31f0d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/mfused-madd.c
@@ -0,0 +1,64 @@
+/* { dg-do compile */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "fmpy" } } */
+/* { dg-final { scan-assembler-not "fadd" } } */
+/* { dg-final { scan-assembler-not "fsub" } } */
+/* { dg-final { scan-assembler "fma" } } */
+/* { dg-final { scan-assembler "fms" } } */
+/* { dg-final { scan-assembler "fnma" } } */
+
+float foo01(float a, float b, float c) {return (a + b * c);}
+float foo02(float a, float b, float c) {return (a - b * c);}
+float foo03(float a, float b, float c) {return (a * b + c);}
+float foo04(float a, float b, float c) {return (a * b - c);}
+
+double foo05(double a, double b, double c) {return (a + b * c);}
+double foo06(double a, double b, double c) {return (a - b * c);}
+double foo07(double a, double b, double c) {return (a * b + c);}
+double foo08(double a, double b, double c) {return (a * b - c);}
+
+__float80 foo09(__float80 a, __float80 b, __float80 c) {return (a + b * c);}
+__float80 foo10(__float80 a, __float80 b, __float80 c) {return (a - b * c);}
+__float80 foo11(__float80 a, __float80 b, __float80 c) {return (a * b + c);}
+__float80 foo12(__float80 a, __float80 b, __float80 c) {return (a * b - c);}
+
+
+
+float foo20(double a, double b, double c) {return (float) (a + b * c);}
+float foo21(double a, double b, double c) {return (float) (a - b * c);}
+float foo22(double a, double b, double c) {return (float) (a * b + c);}
+float foo23(double a, double b, double c) {return (float) (a * b - c);}
+
+float foo24(__float80 a, __float80 b, __float80 c) {return (float) (a + b * c);}
+float foo25(__float80 a, __float80 b, __float80 c) {return (float) (a - b * c);}
+float foo26(__float80 a, __float80 b, __float80 c) {return (float) (a * b + c);}
+float foo27(__float80 a, __float80 b, __float80 c) {return (float) (a * b - c);}
+
+double foo28(__float80 a, __float80 b, __float80 c) {return (double) (a + b * c);}
+double foo29(__float80 a, __float80 b, __float80 c) {return (double) (a - b * c);}
+double foo30(__float80 a, __float80 b, __float80 c) {return (double) (a * b + c);}
+double foo31(__float80 a, __float80 b, __float80 c) {return (double) (a * b - c);}
+
+
+float foo001(float a, float b, double c) { return (a + b * c); }
+float foo002(float a, float b, double c) { return (a - b * c); }
+
+float foo005(float a, double b, double c) { return (a + b * c); }
+float foo006(float a, double b, double c) { return (a - b * c); }
+float foo007(float a, double b, double c) { return (a * b + c); }
+float foo008(float a, double b, double c) { return (a * b - c); }
+
+double foo009(double a, float b, double c) { return (a + b * c); }
+double foo010(double a, float b, double c) { return (a - b * c); }
+double foo011(double a, float b, double c) { return (a * b + c); }
+double foo012(double a, float b, double c) { return (a * b - c); }
+
+float foo013(float a, double b, __float80 c) { return (a + b * c); }
+float foo014(float a, double b, __float80 c) { return (a - b * c); }
+float foo017(double a, float b, __float80 c) { return (a + b * c); }
+float foo018(double a, float b, __float80 c) { return (a - b * c); }
+
+float foo021(float a, __float80 b, double c) { return (a + b * c); }
+float foo022(float a, __float80 b, double c) { return (a - b * c); }
+float foo023(float a, __float80 b, double c) { return (a * b + c); }
+float foo024(float a, __float80 b, double c) { return (a * b - c); }
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/mno-fused-madd-vect.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/mno-fused-madd-vect.c
new file mode 100644
index 000000000..fd80d061a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/mno-fused-madd-vect.c
@@ -0,0 +1,31 @@
+/* { dg-do compile */
+/* { dg-options "-O2 -ffp-contract=off -ftree-vectorize" } */
+/* { dg-final { scan-assembler "fpmpy" } } */
+
+/* fpma and fpms will show in either way because there are no
+ specific vector add/sub instructions. So we just check for fpmpy. */
+
+#define N 16
+extern bar(float *, float *, float *, float *);
+void foo()
+{
+ int i;
+ float a[N], b[N], c[N], d[N];
+ bar(a,b,c,d);
+ for (i = 0; i < N; i++) {
+ a[i] = b[i] + c[i] * d[i];
+ }
+ bar(a,b,c,d);
+ for (i = 0; i < N; i++) {
+ a[i] = b[i] - c[i] * d[i];
+ }
+ bar(a,b,c,d);
+ for (i = 0; i < N; i++) {
+ a[i] = b[i] * c[i] + d[i];
+ }
+ bar(a,b,c,d);
+ for (i = 0; i < N; i++) {
+ a[i] = b[i] * c[i] - d[i];
+ }
+ bar(a,b,c,d);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/mno-fused-madd.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/mno-fused-madd.c
new file mode 100644
index 000000000..487519add
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/mno-fused-madd.c
@@ -0,0 +1,64 @@
+/* { dg-do compile */
+/* { dg-options "-O2 -ffp-contract=off" } */
+/* { dg-final { scan-assembler-not "fma" } } */
+/* { dg-final { scan-assembler-not "fms" } } */
+/* { dg-final { scan-assembler-not "fnma" } } */
+/* { dg-final { scan-assembler "fmpy" } } */
+/* { dg-final { scan-assembler "fadd" } } */
+/* { dg-final { scan-assembler "fsub" } } */
+
+float foo01(float a, float b, float c) {return (a + b * c);}
+float foo02(float a, float b, float c) {return (a - b * c);}
+float foo03(float a, float b, float c) {return (a * b + c);}
+float foo04(float a, float b, float c) {return (a * b - c);}
+
+double foo05(double a, double b, double c) {return (a + b * c);}
+double foo06(double a, double b, double c) {return (a - b * c);}
+double foo07(double a, double b, double c) {return (a * b + c);}
+double foo08(double a, double b, double c) {return (a * b - c);}
+
+__float80 foo09(__float80 a, __float80 b, __float80 c) {return (a + b * c);}
+__float80 foo10(__float80 a, __float80 b, __float80 c) {return (a - b * c);}
+__float80 foo11(__float80 a, __float80 b, __float80 c) {return (a * b + c);}
+__float80 foo12(__float80 a, __float80 b, __float80 c) {return (a * b - c);}
+
+
+
+float foo20(double a, double b, double c) {return (float) (a + b * c);}
+float foo21(double a, double b, double c) {return (float) (a - b * c);}
+float foo22(double a, double b, double c) {return (float) (a * b + c);}
+float foo23(double a, double b, double c) {return (float) (a * b - c);}
+
+float foo24(__float80 a, __float80 b, __float80 c) {return (float) (a + b * c);}
+float foo25(__float80 a, __float80 b, __float80 c) {return (float) (a - b * c);}
+float foo26(__float80 a, __float80 b, __float80 c) {return (float) (a * b + c);}
+float foo27(__float80 a, __float80 b, __float80 c) {return (float) (a * b - c);}
+
+double foo28(__float80 a, __float80 b, __float80 c) {return (double) (a + b * c);}
+double foo29(__float80 a, __float80 b, __float80 c) {return (double) (a - b * c);}
+double foo30(__float80 a, __float80 b, __float80 c) {return (double) (a * b + c);}
+double foo31(__float80 a, __float80 b, __float80 c) {return (double) (a * b - c);}
+
+
+float foo001(float a, float b, double c) { return (a + b * c); }
+float foo002(float a, float b, double c) { return (a - b * c); }
+
+float foo005(float a, double b, double c) { return (a + b * c); }
+float foo006(float a, double b, double c) { return (a - b * c); }
+float foo007(float a, double b, double c) { return (a * b + c); }
+float foo008(float a, double b, double c) { return (a * b - c); }
+
+double foo009(double a, float b, double c) { return (a + b * c); }
+double foo010(double a, float b, double c) { return (a - b * c); }
+double foo011(double a, float b, double c) { return (a * b + c); }
+double foo012(double a, float b, double c) { return (a * b - c); }
+
+float foo013(float a, double b, __float80 c) { return (a + b * c); }
+float foo014(float a, double b, __float80 c) { return (a - b * c); }
+float foo017(double a, float b, __float80 c) { return (a + b * c); }
+float foo018(double a, float b, __float80 c) { return (a - b * c); }
+
+float foo021(float a, __float80 b, double c) { return (a + b * c); }
+float foo022(float a, __float80 b, double c) { return (a - b * c); }
+float foo023(float a, __float80 b, double c) { return (a * b + c); }
+float foo024(float a, __float80 b, double c) { return (a * b - c); }
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/postinc-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/postinc-1.c
new file mode 100644
index 000000000..93c30d872
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/postinc-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -mlp64" { target ia64-*-hpux* } } */
+
+void copy_loop_ldouble (void *xdest,
+ const void *xsrc,
+ long roff,
+ long soff,
+ long len,
+ long shift)
+{ __float128 *dest = xdest;
+ const long double *src;
+ long i;
+ roff /= sizeof (__float128);
+ soff /= sizeof (__float128);
+ src = xsrc;
+ src += shift * soff;
+ for (i = 0; i < len - shift; ++i) {
+ *dest = *src;
+ dest += roff;
+ src += soff;
+ }
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr29682.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr29682.c
new file mode 100644
index 000000000..ecca32392
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr29682.c
@@ -0,0 +1,51 @@
+/* { dg-do compile { target ia64-*-* } } */
+/* { dg-options "-O3 -msched-control-spec" } */
+typedef long unsigned int size_t;
+typedef unsigned char uint8_t;
+typedef unsigned int uint32_t;
+typedef uint8_t byte;
+typedef enum pgpArmor_e
+{
+ PGPARMOR_ERR_CRC_CHECK = -7, PGPARMOR_ERR_BODY_DECODE =
+ -3, PGPARMOR_ERR_UNKNOWN_ARMOR_TYPE = -2, PGPARMOR_ERR_NO_BEGIN_PGP =
+ -1, PGPARMOR_NONE = 0, PGPARMOR_MESSAGE = 1, PGPARMOR_PUBKEY =
+ 5, PGPARMOR_PRIVKEY = 6, PGPARMOR_SECKEY = 7
+}
+pgpArmor;
+pgpCRC (const byte * octets, size_t len)
+{
+ unsigned int crc = 0xb704ce;
+ int i;
+ while (len--)
+ {
+ for (i = 0; i < 8; i++)
+ {
+ crc <<= 1;
+ if (crc & 0x1000000)
+ crc ^= 0x1864cfb;
+ }
+ }
+}
+pgpReadPkts (const char *fn, const byte ** pkt, size_t * pktlen)
+{
+ const byte *b = ((void *) 0);
+ const char *enc = ((void *) 0);
+ byte *dec;
+ size_t declen;
+ uint32_t crcpkt, crc;
+ int pstate = 0;
+ pgpArmor ec = PGPARMOR_ERR_NO_BEGIN_PGP;
+ {
+ switch (pstate)
+ {
+ case 0:
+ if (b64decode (enc, (void **) &dec, &declen) != 0)
+ {
+ goto exit;
+ }
+ crc = pgpCRC (dec, declen);
+ }
+ }
+exit:if (ec > PGPARMOR_NONE && pkt)
+ *pkt = b;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-1.c
new file mode 100644
index 000000000..9ce66f494
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-1.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -ftree-vectorize" } */
+
+unsigned int v1[] __attribute__ ((aligned(16))) =
+{
+ 0x80000000, 1, 0xa0000000, 2,
+ 3, 0xd0000000, 0xf0000000, 0xe0000000
+};
+unsigned int v2[] __attribute__ ((aligned(16))) =
+{
+ 4, 0xb0000000, 5, 0xc0000000,
+ 0xd0000000, 6, 7, 8
+};
+
+unsigned int max[] =
+{
+ 0x80000000, 0xb0000000, 0xa0000000, 0xc0000000,
+ 0xd0000000, 0xd0000000, 0xf0000000, 0xe0000000
+};
+
+unsigned int min[] =
+{
+ 4, 1, 5, 2,
+ 3, 6, 7, 8
+};
+
+unsigned int res[8] __attribute__ ((aligned(16)));
+
+extern void abort (void);
+
+void
+find_max (void)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ res[i] = v1[i] < v2[i] ? v2[i] : v1[i];
+}
+
+void
+find_min (void)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ res[i] = v1[i] > v2[i] ? v2[i] : v1[i];
+}
+
+int main (void)
+{
+ int i;
+ int err = 0;
+
+ find_max ();
+ for (i = 0; i < 8; i++)
+ if (res[i] != max[i])
+ err++;
+
+ find_min ();
+ for (i = 0; i < 8; i++)
+ if (res[i] != min[i])
+ err++;
+
+ if (err)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-2.c
new file mode 100644
index 000000000..d41eef383
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -ftree-vectorize" } */
+
+unsigned short v1[] __attribute__ ((aligned(16))) =
+{
+ 0x8000, 0x9000, 1, 10, 0xa000, 0xb000, 2, 20,
+ 3, 30, 0xd000, 0xe000, 0xf000, 0xe000, 25, 30
+};
+unsigned short v2[] __attribute__ ((aligned(16))) =
+{
+ 4, 40, 0xb000, 0x8000, 5, 50, 0xc000, 0xf000,
+ 0xd000, 0xa000, 6, 65, 7, 75, 0xe000, 0xc000
+};
+
+unsigned short max[] =
+{
+ 0x8000, 0x9000, 0xb000, 0x8000, 0xa000, 0xb000, 0xc000, 0xf000,
+ 0xd000, 0xa000, 0xd000, 0xe000, 0xf000, 0xe000, 0xe000, 0xc000
+};
+
+unsigned short min[] =
+{
+ 4, 40, 1, 10, 5, 50, 2, 20,
+ 3, 30, 6, 65, 7, 75, 25, 30
+};
+
+unsigned short res[16] __attribute__ ((aligned(16)));
+
+extern void abort (void);
+
+void
+find_max (void)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ res[i] = v1[i] < v2[i] ? v2[i] : v1[i];
+}
+
+void
+find_min (void)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ res[i] = v1[i] > v2[i] ? v2[i] : v1[i];
+}
+
+int main (void)
+{
+ int i;
+ int err = 0;
+
+ find_max ();
+ for (i = 0; i < 16; i++)
+ if (res[i] != max[i])
+ err++;
+
+ find_min ();
+ for (i = 0; i < 16; i++)
+ if (res[i] != min[i])
+ err++;
+
+ if (err)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-3.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-3.c
new file mode 100644
index 000000000..29e090883
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr42542-3.c
@@ -0,0 +1,76 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -ftree-vectorize" } */
+
+unsigned char v1[] __attribute__ ((aligned(16))) =
+{
+ 0x80, 0xd0, 0x90, 0xa0, 1, 15, 10, 15,
+ 0xa0, 0xc0, 0xb0, 0xf0, 2, 25, 20, 35,
+ 3, 34, 30, 36, 0xd0, 0x80, 0xe0, 0xb0,
+ 0xf0, 0xe0, 0xe0, 0x80, 25, 34, 30, 40
+};
+unsigned char v2[] __attribute__ ((aligned(16))) =
+{
+ 4, 44, 40, 48, 0xb0, 0x80, 0x80, 0x90,
+ 5, 55, 50, 51, 0xc0, 0xb0, 0xf0, 0xd0,
+ 0xd0, 0x80, 0xa0, 0xf0, 6, 61, 65, 68,
+ 7, 76, 75, 81, 0xe0, 0xf0, 0xc0, 0x90
+};
+
+unsigned char max[] =
+{
+ 0x80, 0xd0, 0x90, 0xa0, 0xb0, 0x80, 0x80, 0x90,
+ 0xa0, 0xc0, 0xb0, 0xf0, 0xc0, 0xb0, 0xf0, 0xd0,
+ 0xd0, 0x80, 0xa0, 0xf0, 0xd0, 0x80, 0xe0, 0xb0,
+ 0xf0, 0xe0, 0xe0, 0x80, 0xe0, 0xf0, 0xc0, 0x90
+};
+
+unsigned char min[] =
+{
+ 4, 44, 40, 48, 1, 15, 10, 15,
+ 5, 55, 50, 51, 2, 25, 20, 35,
+ 3, 34, 30, 36, 6, 61, 65, 68,
+ 7, 76, 75, 81, 25, 34, 30, 40
+};
+
+unsigned char res[32] __attribute__ ((aligned(16)));
+
+extern void abort (void);
+
+void
+find_max (void)
+{
+ int i;
+
+ for (i = 0; i < 32; i++)
+ res[i] = v1[i] < v2[i] ? v2[i] : v1[i];
+}
+
+void
+find_min (void)
+{
+ int i;
+
+ for (i = 0; i < 32; i++)
+ res[i] = v1[i] > v2[i] ? v2[i] : v1[i];
+}
+
+int main (void)
+{
+ int i;
+ int err = 0;
+
+ find_max ();
+ for (i = 0; i < 32; i++)
+ if (res[i] != max[i])
+ err++;
+
+ find_min ();
+ for (i = 0; i < 32; i++)
+ if (res[i] != min[i])
+ err++;
+
+ if (err)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr43603.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr43603.c
new file mode 100644
index 000000000..ad3a5b114
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr43603.c
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int
+foo( long * np, int * dp, int qn)
+{
+ int i;
+ int n0;
+ int d0;
+ int a;
+ int b;
+ int c;
+ int d;
+
+ a = 1;
+ b = 0;
+ c = 1;
+ d = 1;
+
+ d0 = dp[0];
+
+ for (i = qn; i >= 0; i--) {
+ if (bar((c == 0)) && (np[1] == d0)) {
+ car(np - 3, dp, 3);
+ } else {
+ __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0" : "=&f" ((a)),
+"=f" (b) : "f" ((c)), "f" ((d)));
+ n0 = np[0];
+ if (n0 < d0)
+ c = 1;
+ else
+ c = 0;
+
+ }
+ *--np = a;
+ }
+
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr43897.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr43897.c
new file mode 100644
index 000000000..fb73e8692
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr43897.c
@@ -0,0 +1,12 @@
+/* PR target/43897 */
+/* { dg-do assemble } */
+/* { dg-options "-O2" } */
+
+int
+sub (int i)
+{
+ float tmp;
+ if (i)
+ __asm__ __volatile__ ("frcpa.s0 %0,p1=f0,f0":"=f" (tmp)::"p1");
+ return i + 10;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr48496.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr48496.c
new file mode 100644
index 000000000..6e604336a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr48496.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef unsigned int UINT64 __attribute__((__mode__(__DI__)));
+
+typedef struct
+{
+ UINT64 x[2] __attribute__((aligned(16)));
+} fpreg;
+
+struct ia64_args
+{
+ fpreg fp_regs[8];
+ UINT64 gp_regs[8];
+};
+
+ffi_call(long i, long gpcount, long fpcount, void **avalue)
+{
+ struct ia64_args *stack;
+ stack = __builtin_alloca (64);
+ asm ("stf.spill %0 = %1%P0" : "=m" (*&stack->fp_regs[fpcount++])
+ : "f"(*(double *)avalue[i]));
+ stack->gp_regs[gpcount++] = *(UINT64 *)avalue[i];
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr49303.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr49303.c
new file mode 100644
index 000000000..2d88304f8
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr49303.c
@@ -0,0 +1,185 @@
+/* { dg-do compile } */
+/* { dg-options "-w -O2 -fselective-scheduling2 -fsel-sched-pipelining" } */
+
+typedef struct rtx_def *rtx;
+typedef const struct rtx_def *const_rtx;
+typedef struct basic_block_def *basic_block;
+enum machine_mode {
+ VOIDmode, BLKmode, CCmode, CCImode, BImode, QImode, HImode, SImode, DImode, TImode, OImode, QQmode, HQmode, SQmode, DQmode, TQmode, UQQmode, UHQmode, USQmode, UDQmode, UTQmode, HAmode, SAmode, DAmode, TAmode, UHAmode, USAmode, UDAmode, UTAmode, SFmode, DFmode, XFmode, RFmode, TFmode, SDmode, DDmode, TDmode, CQImode, CHImode, CSImode, CDImode, CTImode, COImode, SCmode, DCmode, XCmode, RCmode, TCmode, V4QImode, V2HImode, V8QImode, V4HImode, V2SImode, V16QImode, V8HImode, V4SImode, V2SFmode, V4SFmode, MAX_MACHINE_MODE, MIN_MODE_RANDOM = VOIDmode, MAX_MODE_RANDOM = BLKmode, MIN_MODE_CC = CCmode, MAX_MODE_CC = CCImode, MIN_MODE_INT = QImode, MAX_MODE_INT = OImode, MIN_MODE_PARTIAL_INT = VOIDmode, MAX_MODE_PARTIAL_INT = VOIDmode, MIN_MODE_FRACT = QQmode, MAX_MODE_FRACT = TQmode, MIN_MODE_UFRACT = UQQmode, MAX_MODE_UFRACT = UTQmode, MIN_MODE_ACCUM = HAmode, MAX_MODE_ACCUM = TAmode, MIN_MODE_UACCUM = UHAmode, MAX_MODE_UACCUM = UTAmode, MIN_MODE_FLOAT = SFmode, MAX_MODE_FLOAT = TFmode, MIN_MODE_DECIMAL_FLOAT = SDmode, MAX_MODE_DECIMAL_FLOAT = TDmode, MIN_MODE_COMPLEX_INT = CQImode, MAX_MODE_COMPLEX_INT = COImode, MIN_MODE_COMPLEX_FLOAT = SCmode, MAX_MODE_COMPLEX_FLOAT = TCmode, MIN_MODE_VECTOR_INT = V4QImode, MAX_MODE_VECTOR_INT = V4SImode, MIN_MODE_VECTOR_FRACT = VOIDmode, MAX_MODE_VECTOR_FRACT = VOIDmode, MIN_MODE_VECTOR_UFRACT = VOIDmode, MAX_MODE_VECTOR_UFRACT = VOIDmode, MIN_MODE_VECTOR_ACCUM = VOIDmode, MAX_MODE_VECTOR_ACCUM = VOIDmode, MIN_MODE_VECTOR_UACCUM = VOIDmode, MAX_MODE_VECTOR_UACCUM = VOIDmode, MIN_MODE_VECTOR_FLOAT = V2SFmode, MAX_MODE_VECTOR_FLOAT = V4SFmode, NUM_MACHINE_MODES = MAX_MACHINE_MODE };
+struct real_value {
+};
+extern void vec_assert_fail (const char *, const char * ,const char *file_,unsigned line_,const char *function_) __attribute__ ((__noreturn__));
+typedef struct vec_prefix {
+ unsigned num;
+};
+enum rtx_code {
+ UNKNOWN , VALUE , DEBUG_EXPR , EXPR_LIST , INSN_LIST , SEQUENCE , ADDRESS , DEBUG_INSN , INSN , JUMP_INSN , CALL_INSN , BARRIER , CODE_LABEL , NOTE , COND_EXEC , PARALLEL , ASM_INPUT , ASM_OPERANDS , UNSPEC , UNSPEC_VOLATILE , ADDR_VEC , ADDR_DIFF_VEC , PREFETCH , SET , USE , CLOBBER , CALL , RETURN , EH_RETURN , TRAP_IF , CONST_INT , CONST_FIXED , CONST_DOUBLE , CONST_VECTOR , CONST_STRING , CONST , PC , REG , SCRATCH , SUBREG , STRICT_LOW_PART , CONCAT , CONCATN , MEM , LABEL_REF , SYMBOL_REF , CC0 , IF_THEN_ELSE , COMPARE , PLUS , MINUS , NEG , MULT , SS_MULT , US_MULT , DIV , SS_DIV , US_DIV , MOD , UDIV , UMOD , AND , IOR , XOR , NOT , ASHIFT , ROTATE , ASHIFTRT , LSHIFTRT , ROTATERT , SMIN , SMAX , UMIN , UMAX , PRE_DEC , PRE_INC , POST_DEC , POST_INC , PRE_MODIFY , POST_MODIFY , NE , EQ , GE , GT , LE , LT , GEU , GTU , LEU , LTU , UNORDERED , ORDERED , UNEQ , UNGE , UNGT , UNLE , UNLT , LTGT , SIGN_EXTEND , ZERO_EXTEND , TRUNCATE , FLOAT_EXTEND , FLOAT_TRUNCATE , FLOAT , FIX , UNSIGNED_FLOAT , UNSIGNED_FIX , FRACT_CONVERT , UNSIGNED_FRACT_CONVERT , SAT_FRACT , UNSIGNED_SAT_FRACT , ABS , SQRT , BSWAP , FFS , CLZ , CTZ , POPCOUNT , PARITY , SIGN_EXTRACT , ZERO_EXTRACT , HIGH , LO_SUM , VEC_MERGE , VEC_SELECT , VEC_CONCAT , VEC_DUPLICATE , SS_PLUS , US_PLUS , SS_MINUS , SS_NEG , US_NEG , SS_ABS , SS_ASHIFT , US_ASHIFT , US_MINUS , SS_TRUNCATE , US_TRUNCATE , FMA , VAR_LOCATION , DEBUG_IMPLICIT_PTR , ENTRY_VALUE , LAST_AND_UNUSED_RTX_CODE};
+enum rtx_class {
+ RTX_COMPARE, RTX_COMM_COMPARE, RTX_BIN_ARITH, RTX_COMM_ARITH, RTX_UNARY, RTX_EXTRA, RTX_MATCH, RTX_INSN, RTX_OBJ, RTX_CONST_OBJ, RTX_TERNARY, RTX_BITFIELD_OPS, RTX_AUTOINC };
+extern const enum rtx_class rtx_class[((int) LAST_AND_UNUSED_RTX_CODE)];
+union rtunion_def {
+ int rt_int;
+ unsigned int rt_uint;
+ rtx rt_rtx;
+};
+typedef union rtunion_def rtunion;
+struct rtx_def {
+ __extension__ enum rtx_code code: 16;
+ __extension__ enum machine_mode mode : 8;
+ unsigned int unchanging : 1;
+ union u {
+ rtunion fld[1];
+ }
+ u;
+};
+static __inline__ unsigned int rhs_regno (const_rtx x) {
+ return (((x)->u.fld[0]).rt_uint);
+}
+struct regstat_n_sets_and_refs_t {
+ int sets;
+};
+extern struct regstat_n_sets_and_refs_t *regstat_n_sets_and_refs;
+static __inline__ int REG_N_SETS (int regno) {
+ return regstat_n_sets_and_refs[regno].sets;
+}
+struct target_regs {
+ unsigned char x_hard_regno_nregs[334][MAX_MACHINE_MODE];
+};
+extern struct target_regs default_target_regs;
+static __inline__ unsigned int end_hard_regno (enum machine_mode mode, unsigned int regno) {
+ return regno + ((&default_target_regs)->x_hard_regno_nregs)[regno][(int) mode];
+}
+struct function {
+ struct eh_status *eh;
+ struct control_flow_graph *cfg;
+};
+extern struct function *cfun;
+typedef struct VEC_edge_gc {
+}
+VEC_edge_gc;
+struct basic_block_def {
+ VEC_edge_gc *preds;
+ struct basic_block_def *next_bb;
+ int index;
+}
+VEC_basic_block_gc;
+struct control_flow_graph {
+ basic_block x_entry_block_ptr;
+}
+bitmap_obstack;
+typedef struct bitmap_element_def {
+}
+bitmap_element;
+typedef struct bitmap_head_def {
+ bitmap_element *first;
+ bitmap_element *current;
+}
+bitmap_head;
+struct dataflow {
+ struct df_problem *problem;
+ void *block_info;
+ unsigned int block_info_size;
+};
+struct df_insn_info {
+ int luid;
+};
+struct df_d {
+ struct dataflow *problems_by_index[(7 + 1)];
+ struct df_insn_info **insns;
+};
+struct df_lr_bb_info {
+ bitmap_head def;
+ bitmap_head in;
+};
+extern struct df_d *df;
+static __inline__ struct df_lr_bb_info * df_lr_get_bb_info (unsigned int index) {
+ if (index < (df->problems_by_index[1])->block_info_size) return &((struct df_lr_bb_info *) (df->problems_by_index[1])->block_info)[index];
+ else return ((void *)0);
+}
+typedef struct reg_stat_struct {
+ int last_set_label;
+ unsigned long last_set_nonzero_bits;
+ char last_set_invalid;
+}
+reg_stat_type;
+typedef struct VEC_reg_stat_type_base {
+ struct vec_prefix prefix;
+ reg_stat_type vec[1];
+}
+VEC_reg_stat_type_base;
+static __inline__ reg_stat_type *VEC_reg_stat_type_base_index (VEC_reg_stat_type_base *vec_, unsigned ix_ ,const char *file_,unsigned line_,const char *function_) {
+ (void)((vec_ && ix_ < vec_->prefix.num) ? 0 : (vec_assert_fail ("index","VEC(reg_stat_type,base)" ,file_,line_,function_), 0));
+ return &vec_->vec[ix_];
+}
+typedef struct VEC_reg_stat_type_heap {
+ VEC_reg_stat_type_base base;
+}
+VEC_reg_stat_type_heap;
+static VEC_reg_stat_type_heap *reg_stat;
+static int mem_last_set;
+static int label_tick;
+int get_last_value_validate (rtx *loc, rtx insn, int tick, int replace)
+{
+ rtx x = *loc;
+ int i, j;
+ if ((((enum rtx_code) (x)->code) == REG))
+ {
+ unsigned int regno = (rhs_regno(x));
+ unsigned int endregno = (((((rhs_regno(x))) < 334)) ? end_hard_regno (((enum machine_mode) (x)->mode), (rhs_regno(x))) : (rhs_regno(x)) + 1);
+ for (j = regno;
+ j < endregno;
+ j++)
+ {
+ reg_stat_type *rsp = (VEC_reg_stat_type_base_index(((reg_stat) ? &(reg_stat)->base : 0),j ,"/gcc/combine.c",12640,__FUNCTION__));
+ if (
+ rsp->last_set_invalid
+ ||
+ (
+ (
+ regno >= 334
+ && REG_N_SETS (regno) == 1
+ && (!bitmap_bit_p ((&(df_lr_get_bb_info((((cfun + 0)->cfg->x_entry_block_ptr)->next_bb)->index))->in), regno) )
+ )
+ && rsp->last_set_label > tick
+ )
+ )
+ {
+ return replace;
+ }
+ }
+ }
+ else if ((((enum rtx_code) (x)->code) == MEM)
+ &&
+ (
+ (
+ {
+ __typeof ((x)) const _rtx = ((x));
+ _rtx;
+ }
+ )->unchanging
+ )
+ &&
+ (
+ tick != label_tick
+ || ((((df->insns[((((insn)->u.fld[0]).rt_int))]))->luid)) <= mem_last_set
+ )
+ )
+ {
+ {
+ if (
+ i == 1
+ )
+ {
+ rtx x0 = (((x)->u.fld[0]).rt_rtx);
+ rtx x1 = (((x)->u.fld[1]).rt_rtx);
+ if ((((rtx_class[(int) (((enum rtx_code) (x1)->code))]) & (~1)) == (RTX_COMM_ARITH & (~1)))
+ &&
+ (
+ x0 == (((x1)->u.fld[0]).rt_rtx)
+ )
+ )
+ return get_last_value_validate (&(((x1)->u.fld[x0 == (((x1)->u.fld[0]).rt_rtx) ? 1 : 0]).rt_rtx) , insn, tick, replace);
+ }
+ }
+ }
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr52657.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr52657.c
new file mode 100644
index 000000000..8db588198
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr52657.c
@@ -0,0 +1,44 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+typedef unsigned long int mp_limb_t;
+
+typedef struct
+{
+ int _mp_alloc;
+ int _mp_size;
+ mp_limb_t *_mp_d;
+} __mpz_struct;
+
+typedef __mpz_struct mpz_t[1];
+typedef mp_limb_t * mp_ptr;
+typedef const mp_limb_t * mp_srcptr;
+typedef long int mp_size_t;
+
+extern mp_limb_t __gmpn_addmul_2 (mp_ptr, mp_srcptr, mp_size_t, mp_srcptr);
+
+void
+__gmpn_redc_2 (mp_ptr rp, mp_ptr up, mp_srcptr mp, mp_size_t n, mp_srcptr mip)
+{
+ mp_limb_t q[2];
+ mp_size_t j;
+ mp_limb_t upn;
+
+ for (j = n - 2; j >= 0; j -= 2)
+ {
+ mp_limb_t _ph, _pl;
+ __asm__ ("xma.hu %0 = %3, %5, f0\n\t"
+ "xma.l %1 = %3, %5, f0\n\t"
+ ";;\n\t"
+ "xma.l %0 = %3, %4, %0\n\t"
+ ";;\n\t"
+ "xma.l %0 = %2, %5, %0"
+ : "=&f" (q[1]), "=&f" (q[0])
+ : "f" (mip[1]), "f" (mip[0]), "f" (up[1]), "f" (up[0]));
+ upn = up[n];
+ up[1] = __gmpn_addmul_2 (up, mp, n, q);
+ up[0] = up[n];
+ up[n] = upn;
+ up += 2;
+ }
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr52731.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr52731.c
new file mode 100644
index 000000000..50ef1d78d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/pr52731.c
@@ -0,0 +1,19 @@
+/* { dg-do compile { target ia64-*-* } } */
+/* { dg-options "-O2" } */
+
+char* area;
+long int area_size;
+char* base;
+
+void fun(unsigned long int addr)
+{
+ unsigned long int size32 = (addr + 4096 - 1) & ~(4096 - 1);
+ unsigned long int size = size32 * sizeof(unsigned int);
+
+ if (size > 0) {
+ size = (size + 1) & ~(1);
+ }
+
+ area_size = size;
+ area = base + size;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-opt-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-opt-1.c
new file mode 100644
index 000000000..6e8d1a2fa
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-opt-1.c
@@ -0,0 +1,12 @@
+/* PR target/38056. Do not do sibcall optimization across object file
+ boundery when -mconstant-gp is not used. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "br.call.*bar" } } */
+
+int bar(int x);
+
+int foo(int x)
+{
+ return (bar(x + 1));
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-opt-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-opt-2.c
new file mode 100644
index 000000000..d802b792d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-opt-2.c
@@ -0,0 +1,12 @@
+/* PR target/38056. Do sibcall optimization across object file
+ boundery when -mconstant-gp is used. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mconstant-gp" } */
+/* { dg-final { scan-assembler-not "br.call.*bar" } } */
+
+int bar(int x);
+
+int foo(int x)
+{
+ return (bar(x + 1));
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c
new file mode 100644
index 000000000..471179119
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-unwind-1.c
@@ -0,0 +1,10 @@
+/* PR 13158. Emit ".restore sp" for a sibcall. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -w" } */
+/* { dg-final { scan-assembler-times "\\.restore sp" 1 } } */
+
+static void do_date (char *);
+void rfc822_date (char *date)
+{
+ do_date (date);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c
new file mode 100644
index 000000000..0ae31ae5b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sibcall-unwind-2.c
@@ -0,0 +1,11 @@
+/* PR 18987. This caused an assembler error because we emitted ".restore sp"
+ twice. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -w" } */
+/* { dg-final { scan-assembler-times "\\.restore sp" 1 } } */
+
+static void do_date (char *);
+void rfc822_date (char *date)
+{
+ do_date (date);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/small-addr-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/small-addr-1.c
new file mode 100644
index 000000000..846218623
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/small-addr-1.c
@@ -0,0 +1,23 @@
+/* PR target/21632 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct S
+{
+ void *s[256];
+};
+
+struct T
+{
+ long t[23];
+ struct S *u;
+};
+
+extern struct T __attribute__((model (small))) v;
+
+void *
+foo (void)
+{
+ return v.u->s[0];
+}
+
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/sync-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sync-1.c
new file mode 100644
index 000000000..2de04e57e
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/sync-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "xchg4 .*, r0" } } */
+/* { dg-final { scan-assembler "cmpxchg4.*, r0, .*" } } */
+/* { dg-final { scan-assembler "cmpxchg8.*, r0, .*" { target lp64 } } } */
+
+int
+foo1 (int *p)
+{
+ return __sync_lock_test_and_set (p, 0);
+}
+
+int
+foo2 (int *p, int v)
+{
+ return __sync_bool_compare_and_swap (p, v, 0);
+}
+
+long
+foo3 (long *p, long v)
+{
+ return __sync_bool_compare_and_swap (p, v, 0);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/types-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/types-1.c
new file mode 100644
index 000000000..ace49ebb3
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/types-1.c
@@ -0,0 +1,41 @@
+/* { dg-do compile { target ia64*-hp-hpux* } } */
+
+/* Test that __fpreg is distinct from any other builtin type. */
+
+extern float fr1; /* { dg-message "note: previous declaration of " } */
+extern __fpreg fr1; /* { dg-error "" } */
+extern double fr2; /* { dg-message "note: previous declaration of " } */
+extern __fpreg fr2; /* { dg-error "" } */
+extern long double fr3; /* { dg-message "note: previous declaration of " } */
+extern __fpreg fr3; /* { dg-error "" } */
+extern __float80 fr4; /* { dg-message "note: previous declaration of " } */
+extern __fpreg fr4; /* { dg-error "" } */
+extern __float128 fr5; /* { dg-message "note: previous declaration of " } */
+extern __fpreg fr5; /* { dg-error "" } */
+
+/* Test that __float80 is distinct from any other builtin type. */
+
+extern float f801; /* { dg-message "note: previous declaration of " } */
+extern __float80 f801; /* { dg-error "" } */
+extern double f802; /* { dg-message "note: previous declaration of " } */
+extern __float80 f802; /* { dg-error "" } */
+extern long double f803; /* { dg-message "note: previous declaration of " } */
+extern __float80 f803; /* { dg-error "" } */
+extern __fpreg f804; /* { dg-message "note: previous declaration of " } */
+extern __float80 f804; /* { dg-error "" } */
+extern __float128 f805; /* { dg-message "note: previous declaration of " } */
+extern __float80 f805; /* { dg-error "" } */
+
+/* Test that __float128 is distinct from any other builtin type --
+ except "long double", for which it is a synonym. */
+
+extern float f1281; /* { dg-message "note: previous declaration of " } */
+extern __float128 f1281; /* { dg-error "" } */
+extern double f1282; /* { dg-message "note: previous declaration of " } */
+extern __float128 f1282; /* { dg-error "" } */
+extern long double f1283;
+extern __float128 f1283;
+extern __fpreg f1284; /* { dg-message "note: previous declaration of " } */
+extern __float128 f1284; /* { dg-error "" } */
+extern __float80 f1285; /* { dg-message "note: previous declaration of " } */
+extern __float128 f1285; /* { dg-error "" } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/types-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/types-2.c
new file mode 100644
index 000000000..30e4ddbf8
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/types-2.c
@@ -0,0 +1,20 @@
+/* { dg-do run { target ia64*-hp-hpux* } } */
+/* { dg-options } */
+
+/* Test that the sizes and alignments of the extra floating-point
+ types are correct. */
+
+int main () {
+ if (sizeof (__fpreg) != 16)
+ return 1;
+ if (__alignof__ (__fpreg) != 16)
+ return 2;
+
+ if (sizeof (__float80) != 16)
+ return 3;
+ if (__alignof__ (__float80) != 16)
+ return 4;
+
+ return 0;
+}
+
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/versionid-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/versionid-1.c
new file mode 100644
index 000000000..4ee8224a7
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/versionid-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target ia64-*-hpux* } } */
+
+extern int foo () __attribute__((version_id ("20040821")));
+
+int bar(int i)
+{
+ return (foo() + 1);
+}
+
+/* { dg-final { scan-assembler "alias.*foo.*foo\\\{20040821\\\}" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/versionid-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/versionid-2.c
new file mode 100644
index 000000000..258de0911
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/versionid-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target ia64-*-hpux* } } */
+
+extern int foo () __attribute__((version_id ("20040821")));
+
+int foo(int i)
+{
+ return (1);
+}
+
+/* { dg-final { scan-assembler "alias.*foo.*foo\\\{20040821\\\}" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/visibility-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/visibility-1.c
new file mode 100644
index 000000000..fdccab3c7
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/visibility-1.c
@@ -0,0 +1,38 @@
+/* Test visibility attribute. */
+/* { dg-do compile { target ia64*-*-linux* } } */
+/* { dg-options "-O2 -fpic" } */
+/* { dg-final { scan-assembler "\\.hidden.*variable_j" } } */
+/* { dg-final { scan-assembler "\\.hidden.*variable_m" } } */
+/* { dg-final { scan-assembler "\\.protected.*baz" } } */
+/* { dg-final { scan-assembler "gprel.*variable_i" } } */
+/* { dg-final { scan-assembler "gprel.*variable_j" } } */
+/* { dg-final { scan-assembler "ltoff.*variable_k" } } */
+/* { dg-final { scan-assembler "gprel.*variable_l" } } */
+/* { dg-final { scan-assembler "gprel.*variable_m" } } */
+/* { dg-final { scan-assembler "ltoff.*variable_n" } } */
+
+static int variable_i;
+int variable_j __attribute__((visibility ("hidden")));
+int variable_k;
+struct A { char a[64]; };
+static struct A variable_l __attribute__((section (".sbss")));
+struct A variable_m __attribute__((visibility ("hidden"), section(".sbss")));
+struct A variable_n __attribute__((section (".sbss")));
+
+void foo (void)
+{
+ variable_i = 0;
+ variable_j = 0;
+ variable_k = 0;
+}
+
+void bar (void)
+{
+ variable_l.a[10] = 0;
+ variable_m.a[10] = 0;
+ variable_n.a[10] = 0;
+}
+
+void __attribute__((visibility ("protected"))) baz (void)
+{
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/visibility-2.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/visibility-2.c
new file mode 100644
index 000000000..895ef6d91
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/visibility-2.c
@@ -0,0 +1,15 @@
+/* Test visibility attribute. */
+/* { dg-do link { target ia64*-*-linux* } } */
+/* { dg-options "-O2 -fpic" } */
+
+int foo (int x);
+int bar (int x) __asm__ ("foo") __attribute__ ((visibility ("hidden")));
+int bar (int x)
+{
+ return x;
+}
+
+int main ()
+{
+ return 0;
+}