From eb8a3cca947b3912ca890a25753e6b1aebba6089 Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Tue, 21 Oct 2014 14:41:01 +0000 Subject: [PATCH] [ARM] Update testcases for GNU11 2014-10-21 Jiong Wang * gcc.target/arm/20031108-1.c (Proc_7): Add explicit declaration. (Proc_1): Add return type. * gcc.target/arm/cold-lc.c (show_stack): Add explict declaration. * gcc.target/arm/neon-modes-2.c (foo): Likewise. * gcc.target/arm/pr43920-2.c (lseek): Likewise. * gcc.target/arm/pr44788.c (foo): Likewise. * gcc.target/arm/pr55642.c (abs): Likewise. * gcc.target/arm/pr58784.c (f): Likewise. * gcc.target/arm/pr60650.c (foo1, foo2): Likewise. * gcc.target/arm/vfp-ldmdbs.c (bar): Likewise. * gcc.target/arm/vfp-ldmias.c (bar): Likewise. * gcc.target/arm/pr60650-2.c (fn1, fn2): Add return type and add type for local variables. * lib/target-supports.exp (check_effective_target_arm_crypto_ok_nocache): Add declaration for vaeseq_u8. (check_effective_target_arm_neon_fp16_ok_nocache): Add declaration for vcvt_f16_f32. (check_effective_target_arm_neonv2_ok_nocache): Add declaration for vfma_f32. * gcc.target/arm/pr51968.c: Add -Wno-implicit-function-declaration. From-SVN: r216517 --- gcc/testsuite/ChangeLog | 24 +++++++++++++++++++++ gcc/testsuite/gcc.target/arm/20031108-1.c | 3 +++ gcc/testsuite/gcc.target/arm/cold-lc.c | 1 + gcc/testsuite/gcc.target/arm/neon-modes-2.c | 2 ++ gcc/testsuite/gcc.target/arm/pr43920-2.c | 2 ++ gcc/testsuite/gcc.target/arm/pr44788.c | 2 ++ gcc/testsuite/gcc.target/arm/pr51968.c | 2 +- gcc/testsuite/gcc.target/arm/pr55642.c | 2 ++ gcc/testsuite/gcc.target/arm/pr58784.c | 3 +++ gcc/testsuite/gcc.target/arm/pr60650-2.c | 8 ++++--- gcc/testsuite/gcc.target/arm/pr60650.c | 4 ++++ gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c | 2 +- gcc/testsuite/gcc.target/arm/vfp-ldmias.c | 2 +- gcc/testsuite/lib/target-supports.exp | 3 +++ 14 files changed, 54 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f31f54361dc..04affb7c2a5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,27 @@ +2014-10-21 Jiong Wang + + * gcc.target/arm/20031108-1.c (Proc_7): Add explicit declaration. + (Proc_1): Add return type. + * gcc.target/arm/cold-lc.c (show_stack): Add explict declaration. + * gcc.target/arm/neon-modes-2.c (foo): Likewise. + * gcc.target/arm/pr43920-2.c (lseek): Likewise. + * gcc.target/arm/pr44788.c (foo): Likewise. + * gcc.target/arm/pr55642.c (abs): Likewise. + * gcc.target/arm/pr58784.c (f): Likewise. + * gcc.target/arm/pr60650.c (foo1, foo2): Likewise. + * gcc.target/arm/vfp-ldmdbs.c (bar): Likewise. + * gcc.target/arm/vfp-ldmias.c (bar): Likewise. + * gcc.target/arm/pr60650-2.c (fn1, fn2): Add return type and add type + for local variables. + * lib/target-supports.exp + (check_effective_target_arm_crypto_ok_nocache): Add declaration for + vaeseq_u8. + (check_effective_target_arm_neon_fp16_ok_nocache): Add declaration for + vcvt_f16_f32. + (check_effective_target_arm_neonv2_ok_nocache): Add declaration for + vfma_f32. + * gcc.target/arm/pr51968.c: Add -Wno-implicit-function-declaration. + 2014-10-21 Andreas Schwab * gcc.dg/bf-spl1.c (main): Fix implicit int. diff --git a/gcc/testsuite/gcc.target/arm/20031108-1.c b/gcc/testsuite/gcc.target/arm/20031108-1.c index d9b6006f442..7923e115139 100644 --- a/gcc/testsuite/gcc.target/arm/20031108-1.c +++ b/gcc/testsuite/gcc.target/arm/20031108-1.c @@ -20,6 +20,9 @@ typedef struct record Rec_Pointer Ptr_Glob; +extern int Proc_7 (int, int, int *); + +void Proc_1 (Ptr_Val_Par) Rec_Pointer Ptr_Val_Par; { diff --git a/gcc/testsuite/gcc.target/arm/cold-lc.c b/gcc/testsuite/gcc.target/arm/cold-lc.c index 295c29fe8f0..467a6966bd3 100644 --- a/gcc/testsuite/gcc.target/arm/cold-lc.c +++ b/gcc/testsuite/gcc.target/arm/cold-lc.c @@ -7,6 +7,7 @@ struct thread_info { struct task_struct *task; }; extern struct thread_info *current_thread_info (void); +extern int show_stack (struct task_struct *, unsigned long *); void dump_stack (void) { diff --git a/gcc/testsuite/gcc.target/arm/neon-modes-2.c b/gcc/testsuite/gcc.target/arm/neon-modes-2.c index 40f1bba363b..16319bb2a1f 100644 --- a/gcc/testsuite/gcc.target/arm/neon-modes-2.c +++ b/gcc/testsuite/gcc.target/arm/neon-modes-2.c @@ -11,6 +11,8 @@ #define MANY(A) A (0), A (1), A (2), A (3), A (4), A (5) +extern void foo (int *, int *); + void bar (uint32_t *ptr, int y) { diff --git a/gcc/testsuite/gcc.target/arm/pr43920-2.c b/gcc/testsuite/gcc.target/arm/pr43920-2.c index f647165bd63..f5e8f4837c6 100644 --- a/gcc/testsuite/gcc.target/arm/pr43920-2.c +++ b/gcc/testsuite/gcc.target/arm/pr43920-2.c @@ -4,6 +4,8 @@ #include +extern int lseek(int, long, int); + int getFileStartAndLength (int fd, int *start_, size_t *length_) { int start, end; diff --git a/gcc/testsuite/gcc.target/arm/pr44788.c b/gcc/testsuite/gcc.target/arm/pr44788.c index eb4bc11af9f..9ce44a8e765 100644 --- a/gcc/testsuite/gcc.target/arm/pr44788.c +++ b/gcc/testsuite/gcc.target/arm/pr44788.c @@ -2,6 +2,8 @@ /* { dg-require-effective-target arm_thumb2_ok } */ /* { dg-options "-Os -fno-strict-aliasing -fPIC -mthumb -march=armv7-a -mfpu=vfp3 -mfloat-abi=softfp" } */ +extern void foo (float *); + void joint_decode(float* mlt_buffer1, int t) { int i; float decode_buffer[1060]; diff --git a/gcc/testsuite/gcc.target/arm/pr51968.c b/gcc/testsuite/gcc.target/arm/pr51968.c index f0506c267fe..6cf802b5529 100644 --- a/gcc/testsuite/gcc.target/arm/pr51968.c +++ b/gcc/testsuite/gcc.target/arm/pr51968.c @@ -1,6 +1,6 @@ /* PR target/51968 */ /* { dg-do compile } */ -/* { dg-options "-O2 -march=armv7-a -mfloat-abi=softfp -mfpu=neon" } */ +/* { dg-options "-O2 -Wno-implicit-function-declaration -march=armv7-a -mfloat-abi=softfp -mfpu=neon" } */ /* { dg-require-effective-target arm_neon_ok } */ typedef __builtin_neon_qi int8x8_t __attribute__ ((__vector_size__ (8))); diff --git a/gcc/testsuite/gcc.target/arm/pr55642.c b/gcc/testsuite/gcc.target/arm/pr55642.c index 10f2daa252d..a7defa77d52 100644 --- a/gcc/testsuite/gcc.target/arm/pr55642.c +++ b/gcc/testsuite/gcc.target/arm/pr55642.c @@ -2,6 +2,8 @@ /* { dg-do compile } */ /* { dg-require-effective-target arm_thumb2_ok } */ +extern int abs (int); + int foo (int v) { diff --git a/gcc/testsuite/gcc.target/arm/pr58784.c b/gcc/testsuite/gcc.target/arm/pr58784.c index 9a1fcff1cd0..4ee3ef5a4fb 100644 --- a/gcc/testsuite/gcc.target/arm/pr58784.c +++ b/gcc/testsuite/gcc.target/arm/pr58784.c @@ -11,6 +11,9 @@ typedef struct __attribute__ ((__packed__)) char stepsRemoved; ptp_tlv_t tlv[1]; } ptp_message_announce_t; + +extern void f (ptp_message_announce_t *); + int ptplib_send_announce(int sequenceId, int i) { ptp_message_announce_t tx_packet; diff --git a/gcc/testsuite/gcc.target/arm/pr60650-2.c b/gcc/testsuite/gcc.target/arm/pr60650-2.c index 19467607b6e..c8d46152423 100644 --- a/gcc/testsuite/gcc.target/arm/pr60650-2.c +++ b/gcc/testsuite/gcc.target/arm/pr60650-2.c @@ -4,17 +4,19 @@ int a, h, j; long long d, e, i; int f; +int fn1 (void *p1, int p2) { switch (p2) case 8: { - register b = *(long long *) p1, c asm ("r2"); + register int b = *(long long *) p1, c asm ("r2"); asm ("%0": "=r" (a), "=r" (c):"r" (b), "r" (0)); *(long long *) p1 = c; } } +int fn2 () { int k; @@ -27,8 +29,8 @@ fn2 () case 0: ( { - register l asm ("r4"); - register m asm ("r0"); + register int l asm ("r4"); + register int m asm ("r0"); asm (" .err .endif\n\t": "=r" (h), "=r" (j):"r" (m), "r" (l));; diff --git a/gcc/testsuite/gcc.target/arm/pr60650.c b/gcc/testsuite/gcc.target/arm/pr60650.c index 17a5ed448cf..734b41f001a 100644 --- a/gcc/testsuite/gcc.target/arm/pr60650.c +++ b/gcc/testsuite/gcc.target/arm/pr60650.c @@ -20,6 +20,10 @@ struct btrfs_root int a, c, d; long long e; +extern int foo1 (struct btrfs_root *, int, int, int); +extern int foo2 (struct btrfs_root *, int, int); + +int truncate_one_csum (struct btrfs_root *p1, long long p2, long long p3) { int f, g, i = p1->fs_info->sb->s_blocksize_bits; diff --git a/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c b/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c index 10bccf66c28..0187c01606c 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmdbs.c @@ -3,7 +3,7 @@ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ /* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ -extern void baz (float); +extern void bar (float); void foo (float *p, float a, int n) diff --git a/gcc/testsuite/gcc.target/arm/vfp-ldmias.c b/gcc/testsuite/gcc.target/arm/vfp-ldmias.c index bc40451be35..92051fd1827 100644 --- a/gcc/testsuite/gcc.target/arm/vfp-ldmias.c +++ b/gcc/testsuite/gcc.target/arm/vfp-ldmias.c @@ -3,7 +3,7 @@ /* { dg-skip-if "need fp instructions" { *-*-* } { "-mfloat-abi=soft" } { "" } } */ /* { dg-options "-O2 -mfpu=vfp -mfloat-abi=softfp" } */ -extern void baz (float); +extern void bar (float); void foo (float *p, float a, int n) diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 4398345eb8a..91460c200c0 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -2404,6 +2404,7 @@ proc check_effective_target_arm_crypto_ok_nocache { } { foreach flags {"" "-mfloat-abi=softfp" "-mfpu=crypto-neon-fp-armv8" "-mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp"} { if { [check_no_compiler_messages_nocache arm_crypto_ok object { #include "arm_neon.h" + extern uint8x16_t vaeseq_u8 (uint8x16_t, uint8x16_t); uint8x16_t foo (uint8x16_t a, uint8x16_t b) { @@ -2548,6 +2549,7 @@ proc check_effective_target_arm_neon_fp16_ok_nocache { } { "-mfpu=neon-fp16 -mfloat-abi=softfp"} { if { [check_no_compiler_messages_nocache arm_neon_fp_16_ok object { #include "arm_neon.h" + extern float16x4_t vcvt_f16_f32 (float32x4_t); float16x4_t foo (float32x4_t arg) { @@ -2623,6 +2625,7 @@ proc check_effective_target_arm_neonv2_ok_nocache { } { foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-vfpv4" "-mfpu=neon-vfpv4 -mfloat-abi=softfp"} { if { [check_no_compiler_messages_nocache arm_neonv2_ok object { #include "arm_neon.h" + extern float32x2_t vfma_f32 (float32x2_t, float32x2_t, float32x2_t); float32x2_t foo (float32x2_t a, float32x2_t b, float32x2_t c) { -- 2.30.2