Index: gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp	2018-01-13 17:54:52.925270132 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/aarch64-sve.exp	2018-01-26 14:09:27.089932690 +0000
@@ -44,8 +44,16 @@ if { [check_effective_target_aarch64_sve
     set sve_flags "-march=armv8.2-a+sve"
 }
 
+# Most of the code-quality tests are written for LP64.  Just do the
+# correctness tests for ILP32.
+if { [check_effective_target_ilp32] } {
+    set pattern "*_run"
+} else {
+    set pattern "*"
+}
+
 # Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/$pattern.\[cCS\]]] \
     $sve_flags $DEFAULT_CFLAGS
 
 # All done.
Index: gcc/testsuite/gcc.target/aarch64/sve/clastb_2_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/clastb_2_run.c	2018-01-13 17:59:52.122334084 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/clastb_2_run.c	2018-01-26 14:09:27.089932690 +0000
@@ -6,15 +6,15 @@
 int __attribute__ ((optimize (1)))
 main (void)
 {
-  unsigned int a[N] = {
+  TYPE a[N] = {
     11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
     1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
     21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
     31, 32
   };
-  __builtin_memset (a + 32, 43, (N - 32) * sizeof (int));
+  __builtin_memset (a + 32, 43, (N - 32) * sizeof (TYPE));
 
-  unsigned int ret = condition_reduction (a, 16);
+  TYPE ret = condition_reduction (a, 16);
 
   if (ret != 10)
     __builtin_abort ();
Index: gcc/testsuite/gcc.target/aarch64/sve/clastb_4_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/clastb_4_run.c	2018-01-13 17:59:52.123334046 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/clastb_4_run.c	2018-01-26 14:09:27.089932690 +0000
@@ -8,15 +8,15 @@ extern void abort (void) __attribute__ (
 int __attribute__ ((optimize (1)))
 main (void)
 {
-  short a[N] = {
+  TYPE a[N] = {
   11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
   1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
   21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
   31, 32
   };
-  __builtin_memset (a+32, 43, (N-32)*sizeof (short));
+  __builtin_memset (a+32, 43, (N-32)*sizeof (TYPE));
 
-  short ret = condition_reduction (a, 16);
+  TYPE ret = condition_reduction (a, 16);
 
   if (ret != 10)
     abort ();
Index: gcc/testsuite/gcc.target/aarch64/sve/clastb_5_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/clastb_5_run.c	2018-01-13 17:59:52.123334046 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/clastb_5_run.c	2018-01-26 14:09:27.089932690 +0000
@@ -6,15 +6,15 @@
 int __attribute__ ((optimize (1)))
 main (void)
 {
-  long a[N] = {
+  TYPE a[N] = {
     11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
     1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
     21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
     31, 32
   };
-  __builtin_memset (a + 32, 43, (N - 32) * sizeof (long));
+  __builtin_memset (a + 32, 43, (N - 32) * sizeof (TYPE));
 
-  long ret = condition_reduction (a, 16);
+  TYPE ret = condition_reduction (a, 16);
 
   if (ret != 10)
     __builtin_abort ();
Index: gcc/testsuite/gcc.target/aarch64/sve/clastb_3_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/clastb_3_run.c	2018-01-13 17:59:52.122334084 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/clastb_3_run.c	2018-01-26 14:09:27.089932690 +0000
@@ -6,15 +6,15 @@
 int __attribute__ ((optimize (1)))
 main (void)
 {
-  unsigned char a[N] = {
+  TYPE a[N] = {
     11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
     1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
     21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
     31, 32
   };
-  __builtin_memset (a + 32, 43, N - 32);
+  __builtin_memset (a + 32, 43, (N - 32) * sizeof (TYPE));
 
-  unsigned char ret = condition_reduction (a, 16);
+  TYPE ret = condition_reduction (a, 16);
 
   if (ret != 10)
     __builtin_abort ();
Index: gcc/testsuite/gcc.target/aarch64/sve/const_pred_1.C
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/const_pred_1.C	2018-01-13 17:54:52.925270132 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/const_pred_1.C	2018-01-26 14:09:27.089932690 +0000
@@ -1,7 +1,9 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -msve-vector-bits=256" } */
 
-typedef signed char vnx16qi __attribute__((vector_size(32)));
+#include <stdint.h>
+
+typedef int8_t vnx16qi __attribute__((vector_size(32)));
 
 vnx16qi
 foo (vnx16qi x, vnx16qi y)
Index: gcc/testsuite/gcc.target/aarch64/sve/const_pred_2.C
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/const_pred_2.C	2018-01-13 17:54:52.925270132 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/const_pred_2.C	2018-01-26 14:09:27.089932690 +0000
@@ -1,7 +1,9 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -msve-vector-bits=256" } */
 
-typedef short vnx8hi __attribute__((vector_size(32)));
+#include <stdint.h>
+
+typedef int16_t vnx8hi __attribute__((vector_size(32)));
 
 vnx8hi
 foo (vnx8hi x, vnx8hi y)
Index: gcc/testsuite/gcc.target/aarch64/sve/const_pred_3.C
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/const_pred_3.C	2018-01-13 17:54:52.925270132 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/const_pred_3.C	2018-01-26 14:09:27.090932647 +0000
@@ -1,7 +1,9 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -msve-vector-bits=256" } */
 
-typedef int vnx4si __attribute__((vector_size(32)));
+#include <stdint.h>
+
+typedef int32_t vnx4si __attribute__((vector_size(32)));
 
 vnx4si
 foo (vnx4si x, vnx4si y)
Index: gcc/testsuite/gcc.target/aarch64/sve/const_pred_4.C
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/const_pred_4.C	2018-01-13 17:54:52.925270132 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/const_pred_4.C	2018-01-26 14:09:27.090932647 +0000
@@ -1,7 +1,9 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -msve-vector-bits=256" } */
 
-typedef long long vnx2di __attribute__((vector_size(32)));
+#include <stdint.h>
+
+typedef int64_t vnx2di __attribute__((vector_size(32)));
 
 vnx2di
 foo (vnx2di x, vnx2di y)
Index: gcc/testsuite/gcc.target/aarch64/sve/load_const_offset_2.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/load_const_offset_2.c	2018-01-13 17:54:52.930269938 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/load_const_offset_2.c	2018-01-26 14:09:27.090932647 +0000
@@ -1,14 +1,16 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize -save-temps" } */
 
+#include <stdint.h>
+
 void
-f (unsigned int *restrict a, signed char *restrict b, signed char mask, int n)
+f (uint32_t *restrict a, int8_t *restrict b, int8_t mask, int n)
 {
   for (int i = 0; i < n; ++i)
-    a[i] += (signed char) (b[i] | mask);
+    a[i] += (int8_t) (b[i] | mask);
 }
 
-/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+\]\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #1, mul vl\]\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #2, mul vl\]\n} 1 } } */
-/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #3, mul vl\]\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+\]\n} 1 { xfail ilp32 } } } */
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #1, mul vl\]\n} 1 { xfail ilp32 } } } */
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #2, mul vl\]\n} 1 { xfail ilp32 } } } */
+/* { dg-final { scan-assembler-times {\tld1w\tz[0-9]+\.s, p[0-7]/z, \[x[0-9]+, #3, mul vl\]\n} 1 { xfail ilp32 } } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/logical_1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/logical_1.c	2018-01-13 17:54:52.930269938 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/logical_1.c	2018-01-26 14:09:27.090932647 +0000
@@ -1,6 +1,8 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O3 --save-temps" } */
 
+#include <stdint.h>
+
 #define DO_CONSTANT(VALUE, TYPE, OP, NAME)			\
 void vlogical_imm_##NAME##_##TYPE (TYPE *dst, int count)	\
 {								\
@@ -78,12 +80,12 @@ #define DO_LOGICAL_OPS(TYPE, OP, NAME)
   DO_CONSTANT (-8, TYPE, OP, NAME ## minus8)			\
   DO_CONSTANT (-9, TYPE, OP, NAME ## minus9)
 
-DO_LOGICAL_OPS_BRIEF (char, &, and)
-DO_LOGICAL_OPS_BRIEF (long, &, and)
+DO_LOGICAL_OPS_BRIEF (int8_t, &, and)
+DO_LOGICAL_OPS_BRIEF (int64_t, &, and)
 
-DO_LOGICAL_OPS (int, &, and)
-DO_LOGICAL_OPS (int, |, or)
-DO_LOGICAL_OPS (int, ^, xor)
+DO_LOGICAL_OPS (int32_t, &, and)
+DO_LOGICAL_OPS (int32_t, |, or)
+DO_LOGICAL_OPS (int32_t, ^, xor)
 
 /* { dg-final { scan-assembler-times {\tand\tz[0-9]+\.d, z[0-9]+\.d, #0x1\n} 1 } } */
 /* { dg-final { scan-assembler-times {\tand\tz[0-9]+\.s, z[0-9]+\.s, #0x1\n} 1 } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_1.c	2018-01-13 17:57:48.805056669 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_1.c	2018-01-26 14:09:27.090932647 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_2.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_2.c	2018-01-13 17:57:48.805056669 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_2.c	2018-01-26 14:09:27.090932647 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -14,22 +16,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_3.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_3.c	2018-01-13 17:57:48.805056669 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_3.c	2018-01-26 14:09:27.090932647 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -15,22 +17,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_4.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_4.c	2018-01-13 17:57:48.805056669 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_4.c	2018-01-26 14:09:27.091932603 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_5.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_5.c	2018-01-13 17:57:48.805056669 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_5.c	2018-01-26 14:09:27.091932603 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_6.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_6.c	2018-01-13 17:57:48.806056632 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_6.c	2018-01-26 14:09:27.091932603 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_7.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_7.c	2018-01-13 17:57:48.806056632 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_7.c	2018-01-26 14:09:27.091932603 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_8.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_8.c	2018-01-13 17:57:48.806056632 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_load_8.c	2018-01-26 14:09:27.091932603 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -12,22 +14,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_1.c	2018-01-13 17:57:48.806056632 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_1.c	2018-01-26 14:09:27.091932603 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -18,22 +20,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_2.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_2.c	2018-01-13 17:57:48.806056632 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_2.c	2018-01-26 14:09:27.091932603 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_3 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -19,22 +21,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c	2018-01-13 17:57:48.806056632 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_3.c	2018-01-26 14:09:27.092932560 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_4 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -20,22 +22,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_4.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_4.c	2018-01-13 17:57:48.807056595 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/mask_struct_store_4.c	2018-01-26 14:09:27.092932560 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, OUTTYPE, INTYPE, MASKTYPE)		\
   void __attribute__ ((noinline, noclone))			\
   NAME##_2 (OUTTYPE *__restrict dest, INTYPE *__restrict src,	\
@@ -16,22 +18,22 @@ #define TEST_LOOP(NAME, OUTTYPE, INTYPE,
   }
 
 #define TEST2(NAME, OUTTYPE, INTYPE) \
-  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, signed char) \
-  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, unsigned short) \
+  TEST_LOOP (NAME##_i8, OUTTYPE, INTYPE, int8_t) \
+  TEST_LOOP (NAME##_i16, OUTTYPE, INTYPE, uint16_t) \
   TEST_LOOP (NAME##_f32, OUTTYPE, INTYPE, float) \
   TEST_LOOP (NAME##_f64, OUTTYPE, INTYPE, double)
 
 #define TEST1(NAME, OUTTYPE) \
-  TEST2 (NAME##_i8, OUTTYPE, signed char) \
-  TEST2 (NAME##_i16, OUTTYPE, unsigned short) \
-  TEST2 (NAME##_i32, OUTTYPE, int) \
-  TEST2 (NAME##_i64, OUTTYPE, unsigned long)
+  TEST2 (NAME##_i8, OUTTYPE, int8_t) \
+  TEST2 (NAME##_i16, OUTTYPE, uint16_t) \
+  TEST2 (NAME##_i32, OUTTYPE, int32_t) \
+  TEST2 (NAME##_i64, OUTTYPE, uint64_t)
 
 #define TEST(NAME) \
-  TEST1 (NAME##_i8, signed char) \
-  TEST1 (NAME##_i16, unsigned short) \
-  TEST1 (NAME##_i32, int) \
-  TEST1 (NAME##_i64, unsigned long) \
+  TEST1 (NAME##_i8, int8_t) \
+  TEST1 (NAME##_i16, uint16_t) \
+  TEST1 (NAME##_i32, int32_t) \
+  TEST1 (NAME##_i64, uint64_t) \
   TEST2 (NAME##_f16_f16, _Float16, _Float16) \
   TEST2 (NAME##_f32_f32, float, float) \
   TEST2 (NAME##_f64_f64, double, double)
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_1.c	2018-01-13 17:57:37.497470813 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_1.c	2018-01-26 14:09:27.092932560 +0000
@@ -1,8 +1,10 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
+#include <stdint.h>
+
 #ifndef TYPE
-#define TYPE unsigned char
+#define TYPE uint8_t
 #endif
 
 #ifndef NAME
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_2.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_2.c	2018-01-13 17:57:37.499470741 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_2.c	2018-01-26 14:09:27.093932517 +0000
@@ -1,7 +1,7 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned short
+#define TYPE uint16_t
 #include "struct_vect_1.c"
 
 /* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_2_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_2_run.c	2018-01-13 17:57:37.499470741 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_2_run.c	2018-01-26 14:09:27.094932474 +0000
@@ -1,5 +1,5 @@
 /* { dg-do run { target aarch64_sve_hw } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned short
+#define TYPE uint16_t
 #include "struct_vect_1_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_3.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_3.c	2018-01-13 17:57:37.499470741 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_3.c	2018-01-26 14:09:27.094932474 +0000
@@ -1,7 +1,7 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned int
+#define TYPE uint32_t
 #include "struct_vect_1.c"
 
 /* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_3_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_3_run.c	2018-01-13 17:57:37.499470741 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_3_run.c	2018-01-26 14:09:27.094932474 +0000
@@ -1,5 +1,5 @@
 /* { dg-do run { target aarch64_sve_hw } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned int
+#define TYPE uint32_t
 #include "struct_vect_1_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_4.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_4.c	2018-01-13 17:57:37.499470741 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_4.c	2018-01-26 14:09:27.094932474 +0000
@@ -1,7 +1,7 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned long
+#define TYPE uint64_t
 #include "struct_vect_1.c"
 
 /* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_4_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_4_run.c	2018-01-13 17:57:37.499470741 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_4_run.c	2018-01-26 14:09:27.095932430 +0000
@@ -1,5 +1,5 @@
 /* { dg-do run { target aarch64_sve_hw } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned long
+#define TYPE uint64_t
 #include "struct_vect_1_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_7.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_7.c	2018-01-13 17:57:37.500470705 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_7.c	2018-01-26 14:09:27.095932430 +0000
@@ -1,9 +1,11 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
+#include <stdint.h>
+
 #ifndef TYPE
-#define TYPE unsigned char
-#define ITYPE signed char
+#define TYPE uint8_t
+#define ITYPE int8_t
 #endif
 
 void __attribute__ ((noinline, noclone))
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_8.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_8.c	2018-01-13 17:57:37.500470705 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_8.c	2018-01-26 14:09:27.095932430 +0000
@@ -1,8 +1,8 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned short
-#define ITYPE short
+#define TYPE uint16_t
+#define ITYPE int16_t
 #include "struct_vect_7.c"
 
 /* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_8_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_8_run.c	2018-01-13 17:57:37.500470705 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_8_run.c	2018-01-26 14:09:27.095932430 +0000
@@ -1,6 +1,6 @@
 /* { dg-do run { target aarch64_sve_hw } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned short
-#define ITYPE short
+#define TYPE uint16_t
+#define ITYPE int16_t
 #include "struct_vect_7_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_9.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_9.c	2018-01-13 17:57:37.500470705 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_9.c	2018-01-26 14:09:27.095932430 +0000
@@ -1,8 +1,8 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned int
-#define ITYPE int
+#define TYPE uint32_t
+#define ITYPE int32_t
 #include "struct_vect_7.c"
 
 /* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_9_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_9_run.c	2018-01-13 17:57:37.500470705 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_9_run.c	2018-01-26 14:09:27.095932430 +0000
@@ -1,6 +1,6 @@
 /* { dg-do run { target aarch64_sve_hw } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned int
-#define ITYPE int
+#define TYPE uint32_t
+#define ITYPE int32_t
 #include "struct_vect_7_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_10.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_10.c	2018-01-13 17:57:37.497470813 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_10.c	2018-01-26 14:09:27.092932560 +0000
@@ -1,8 +1,8 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned long
-#define ITYPE long
+#define TYPE uint64_t
+#define ITYPE int64_t
 #include "struct_vect_7.c"
 
 /* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_10_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_10_run.c	2018-01-13 17:57:37.498470777 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_10_run.c	2018-01-26 14:09:27.092932560 +0000
@@ -1,6 +1,6 @@
 /* { dg-do run { target aarch64_sve_hw } } */
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
-#define TYPE unsigned long
-#define ITYPE long
+#define TYPE uint64_t
+#define ITYPE int64_t
 #include "struct_vect_7_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_11.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_11.c	2018-01-13 17:57:37.498470777 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_11.c	2018-01-26 14:09:27.092932560 +0000
@@ -2,7 +2,7 @@
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
 #define TYPE _Float16
-#define ITYPE short
+#define ITYPE int16_t
 #include "struct_vect_7.c"
 
 /* { dg-final { scan-assembler {\tld2h\t{z[0-9]+.h - z[0-9]+.h}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_11_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_11_run.c	2018-01-13 17:57:37.498470777 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_11_run.c	2018-01-26 14:09:27.092932560 +0000
@@ -2,5 +2,5 @@
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
 #define TYPE _Float16
-#define ITYPE short
+#define ITYPE int16_t
 #include "struct_vect_7_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_12.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_12.c	2018-01-13 17:57:37.498470777 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_12.c	2018-01-26 14:09:27.092932560 +0000
@@ -2,7 +2,7 @@
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
 #define TYPE float
-#define ITYPE int
+#define ITYPE int32_t
 #include "struct_vect_7.c"
 
 /* { dg-final { scan-assembler {\tld2w\t{z[0-9]+.s - z[0-9]+.s}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_12_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_12_run.c	2018-01-13 17:57:37.498470777 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_12_run.c	2018-01-26 14:09:27.092932560 +0000
@@ -2,5 +2,5 @@
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
 #define TYPE float
-#define ITYPE int
+#define ITYPE int32_t
 #include "struct_vect_7_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_13.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_13.c	2018-01-13 17:57:37.498470777 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_13.c	2018-01-26 14:09:27.093932517 +0000
@@ -2,7 +2,7 @@
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
 #define TYPE double
-#define ITYPE long
+#define ITYPE int64_t
 #include "struct_vect_7.c"
 
 /* { dg-final { scan-assembler {\tld2d\t{z[0-9]+.d - z[0-9]+.d}, p[0-7]/z, \[x[0-9]+\]\n} } } */
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_13_run.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_13_run.c	2018-01-13 17:57:37.498470777 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_13_run.c	2018-01-26 14:09:27.093932517 +0000
@@ -2,5 +2,5 @@
 /* { dg-options "-O2 -ftree-vectorize --save-temps" } */
 
 #define TYPE double
-#define ITYPE long
+#define ITYPE int64_t
 #include "struct_vect_7_run.c"
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_14.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_14.c	2018-01-13 17:57:37.498470777 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_14.c	2018-01-26 14:09:27.093932517 +0000
@@ -1,25 +1,25 @@
 /* { dg-do assemble { target aarch64_asm_sve_ok } } */
 /* { dg-options "-O2 -ftree-vectorize -msve-vector-bits=256 --save-temps" } */
 
-#define TYPE unsigned char
+#define TYPE uint8_t
 #define NAME(X) qi_##X
 #include "struct_vect_1.c"
 #undef NAME
 #undef TYPE
 
-#define TYPE unsigned short
+#define TYPE uint16_t
 #define NAME(X) hi_##X
 #include "struct_vect_1.c"
 #undef NAME
 #undef TYPE
 
-#define TYPE unsigned int
+#define TYPE uint32_t
 #define NAME(X) si_##X
 #include "struct_vect_1.c"
 #undef NAME
 #undef TYPE
 
-#define TYPE unsigned long
+#define TYPE uint64_t
 #define NAME(X) di_##X
 #include "struct_vect_1.c"
 #undef NAME
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_18.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_18.c	2018-01-13 18:00:34.396686517 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_18.c	2018-01-26 14:09:27.093932517 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize" } */
 
+#include <stdint.h>
+
 #define N 2000
 
 #define TEST_LOOP(NAME, TYPE)					\
@@ -12,8 +14,8 @@ #define TEST_LOOP(NAME, TYPE)					\
   }
 
 #define TEST(NAME) \
-  TEST_LOOP (NAME##_i8, signed char) \
-  TEST_LOOP (NAME##_i16, unsigned short) \
+  TEST_LOOP (NAME##_i8, int8_t) \
+  TEST_LOOP (NAME##_i16, uint16_t) \
   TEST_LOOP (NAME##_f32, float) \
   TEST_LOOP (NAME##_f64, double)
 
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_19.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_19.c	2018-01-13 18:00:34.396686517 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_19.c	2018-01-26 14:09:27.093932517 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, TYPE)					\
   void __attribute__ ((noinline, noclone))			\
   NAME (TYPE *restrict dest, TYPE *restrict src, int n)		\
@@ -10,8 +12,8 @@ #define TEST_LOOP(NAME, TYPE)					\
   }
 
 #define TEST(NAME) \
-  TEST_LOOP (NAME##_i8, signed char) \
-  TEST_LOOP (NAME##_i16, unsigned short) \
+  TEST_LOOP (NAME##_i8, int8_t) \
+  TEST_LOOP (NAME##_i16, uint16_t) \
   TEST_LOOP (NAME##_f32, float) \
   TEST_LOOP (NAME##_f64, double)
 
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_20.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_20.c	2018-01-13 18:00:34.396686517 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_20.c	2018-01-26 14:09:27.094932474 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize" } */
 
+#include <stdint.h>
+
 #define N 2000
 
 #define TEST_LOOP(NAME, TYPE)					\
@@ -12,8 +14,8 @@ #define TEST_LOOP(NAME, TYPE)					\
   }
 
 #define TEST(NAME) \
-  TEST_LOOP (NAME##_i8, signed char) \
-  TEST_LOOP (NAME##_i16, unsigned short) \
+  TEST_LOOP (NAME##_i8, int8_t) \
+  TEST_LOOP (NAME##_i16, uint16_t) \
   TEST_LOOP (NAME##_f32, float) \
   TEST_LOOP (NAME##_f64, double)
 
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_21.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_21.c	2018-01-13 18:00:34.396686517 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_21.c	2018-01-26 14:09:27.094932474 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, TYPE)					\
   void __attribute__ ((noinline, noclone))			\
   NAME (TYPE *restrict dest, TYPE *restrict src, int n)		\
@@ -10,8 +12,8 @@ #define TEST_LOOP(NAME, TYPE)					\
   }
 
 #define TEST(NAME) \
-  TEST_LOOP (NAME##_i8, signed char) \
-  TEST_LOOP (NAME##_i16, unsigned short) \
+  TEST_LOOP (NAME##_i8, int8_t) \
+  TEST_LOOP (NAME##_i16, uint16_t) \
   TEST_LOOP (NAME##_f32, float) \
   TEST_LOOP (NAME##_f64, double)
 
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_22.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_22.c	2018-01-13 18:00:34.397686480 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_22.c	2018-01-26 14:09:27.094932474 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize" } */
 
+#include <stdint.h>
+
 #define N 2000
 
 #define TEST_LOOP(NAME, TYPE)					\
@@ -12,8 +14,8 @@ #define TEST_LOOP(NAME, TYPE)					\
   }
 
 #define TEST(NAME) \
-  TEST_LOOP (NAME##_i8, signed char) \
-  TEST_LOOP (NAME##_i16, unsigned short) \
+  TEST_LOOP (NAME##_i8, int8_t) \
+  TEST_LOOP (NAME##_i16, uint16_t) \
   TEST_LOOP (NAME##_f32, float) \
   TEST_LOOP (NAME##_f64, double)
 
Index: gcc/testsuite/gcc.target/aarch64/sve/struct_vect_23.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/struct_vect_23.c	2018-01-13 18:00:34.397686480 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/struct_vect_23.c	2018-01-26 14:09:27.094932474 +0000
@@ -1,6 +1,8 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize" } */
 
+#include <stdint.h>
+
 #define TEST_LOOP(NAME, TYPE)					\
   void __attribute__ ((noinline, noclone))			\
   NAME (TYPE *restrict dest, TYPE *restrict src, int n)		\
@@ -10,8 +12,8 @@ #define TEST_LOOP(NAME, TYPE)					\
   }
 
 #define TEST(NAME) \
-  TEST_LOOP (NAME##_i8, signed char) \
-  TEST_LOOP (NAME##_i16, unsigned short) \
+  TEST_LOOP (NAME##_i8, int8_t) \
+  TEST_LOOP (NAME##_i16, uint16_t) \
   TEST_LOOP (NAME##_f32, float) \
   TEST_LOOP (NAME##_f64, double)
 
Index: gcc/testsuite/gcc.target/aarch64/sve/popcount_1.c
===================================================================
--- gcc/testsuite/gcc.target/aarch64/sve/popcount_1.c	2018-01-13 17:54:52.932269861 +0000
+++ gcc/testsuite/gcc.target/aarch64/sve/popcount_1.c	2018-01-26 14:09:27.092932560 +0000
@@ -14,7 +14,7 @@ void __attribute__ ((noinline, noclone))
 popcount_64 (unsigned int *restrict dst, uint64_t *restrict src, int size)
 {
   for (int i = 0; i < size; ++i)
-    dst[i] = __builtin_popcountl (src[i]);
+    dst[i] = __builtin_popcountll (src[i]);
 }
 
 /* { dg-final { scan-assembler-times {\tcnt\tz[0-9]+\.s, p[0-7]/m, z[0-9]+\.s\n} 1 } } */
