From 54e22276286b0e646f91fc52920332a56219b6be Mon Sep 17 00:00:00 2001 From: Janis Johnson Date: Tue, 26 Aug 2008 21:39:49 +0000 Subject: [PATCH] altivec-macros.c: Fix dg-message directives. * gcc.target/powerpc/altivec-macros.c: Fix dg-message directives. * gcc.target/powerpc/ppu-intrinsics.c: Ignore some warnings. * gcc.target/powerpc/darwin-save-world-1.c: Require AltiVec hardware. * gcc.target/powerpc/altivec-types-1.c: Expect some notes. * gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c: Ignore a warning. * g++.dg/ext/altivec-2.C: Initialize a local variable. * g++.dg/ext/altivec-3.C: Move AltiVec code out of main. From-SVN: r139610 --- gcc/testsuite/ChangeLog | 12 ++++++++++-- gcc/testsuite/g++.dg/ext/altivec-2.C | 2 +- gcc/testsuite/g++.dg/ext/altivec-3.C | 11 +++++++---- gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c | 2 ++ gcc/testsuite/gcc.target/powerpc/altivec-macros.c | 12 ++++++------ gcc/testsuite/gcc.target/powerpc/altivec-types-1.c | 3 +++ gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c | 1 + gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c | 2 +- 8 files changed, 31 insertions(+), 14 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d3a00d8..7f2b4b9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,7 +1,15 @@ 2008-08-26 Janis Johnson - gcc.dg/torture/type-generic-1.c: Don't use IBM 128-bit long double. - g++.dg/torture/type-generic-1.C: Ditto. + * gcc.target/powerpc/altivec-macros.c: Fix dg-message directives. + * gcc.target/powerpc/ppu-intrinsics.c: Ignore some warnings. + * gcc.target/powerpc/darwin-save-world-1.c: Require AltiVec hardware. + * gcc.target/powerpc/altivec-types-1.c: Expect some notes. + * gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c: Ignore a warning. + * g++.dg/ext/altivec-2.C: Initialize a local variable. + * g++.dg/ext/altivec-3.C: Move AltiVec code out of main. + + * gcc.dg/torture/type-generic-1.c: Don't use IBM 128-bit long double. + * g++.dg/torture/type-generic-1.C: Ditto. 2008-08-26 Victor Kaplansky diff --git a/gcc/testsuite/g++.dg/ext/altivec-2.C b/gcc/testsuite/g++.dg/ext/altivec-2.C index 6a404b2..268ff99 100644 --- a/gcc/testsuite/g++.dg/ext/altivec-2.C +++ b/gcc/testsuite/g++.dg/ext/altivec-2.C @@ -10,7 +10,7 @@ int main (int argc, const char * argv[]) { - int i; + int i = 0; const float cf = 1.0; vector float v; const vector float cv = (vector float){1.0, 2.0, 3.0, 4.0}; diff --git a/gcc/testsuite/g++.dg/ext/altivec-3.C b/gcc/testsuite/g++.dg/ext/altivec-3.C index da029ee..d42303d 100644 --- a/gcc/testsuite/g++.dg/ext/altivec-3.C +++ b/gcc/testsuite/g++.dg/ext/altivec-3.C @@ -120,16 +120,19 @@ void baz2 (int i, ... ) CHECK_INVARIANT (vec_all_eq (vxi.v, vx_g.v)); } -int main(void) +void main1(void) { CHECK_INVARIANT (sizeof(struct foo) == 8 && sizeof(struct vfoo) == 48); - altivec_check(); - bar(i_1, x_g, (short)i_2, (float)d_2, ld_1, (char)i_1, d_3); baz(i_1, v_g, i_1, vx_g, i_1, v2_g, i_1, vx2_g); quux(i_1, v_g, v_g); baz2(i_1, vx_g); - +} + +int main(void) +{ + altivec_check(); + main1(); return 0; } diff --git a/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c b/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c index ba7f85c..29b1e98 100644 --- a/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c +++ b/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c @@ -22,3 +22,5 @@ __m128i get_vec(void) return ret; } +/* Ignore a warning that is irrelevant to the purpose of this test. */ +/* { dg-prune-output ".*GCC vector returned by reference.*" } */ diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-macros.c b/gcc/testsuite/gcc.target/powerpc/altivec-macros.c index ef497a4..8ea8df2 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-macros.c +++ b/gcc/testsuite/gcc.target/powerpc/altivec-macros.c @@ -55,9 +55,9 @@ _Pragma ("__vector") /* { dg-warning "redefined" "pixel redefined" { target *-*-* } 48 } */ /* { dg-warning "redefined" "bool redefined" { target *-*-* } 49 } */ -/* { dg-message "note: previous" "prev __vector defn" { target *-*-* } 24 } */ -/* { dg-message "note: previous" "prev __pixel defn" { target *-*-* } 27 } */ -/* { dg-message "note: previous" "prev __bool defn" { target *-*-* } 30 } */ -/* { dg-message "note: previous" "prev vector defn" { target *-*-* } 33 } */ -/* { dg-message "note: previous" "prev pixel defn" { target *-*-* } 36 } */ -/* { dg-message "note: previous" "prev bool defn" { target *-*-* } 39 } */ +/* { dg-message "location of the previous" "prev __vector defn" { target *-*-* } 24 } */ +/* { dg-message "location of the previous" "prev __pixel defn" { target *-*-* } 27 } */ +/* { dg-message "location of the previous" "prev __bool defn" { target *-*-* } 30 } */ +/* { dg-message "location of the previous" "prev vector defn" { target *-*-* } 33 } */ +/* { dg-message "location of the previous" "prev pixel defn" { target *-*-* } 36 } */ +/* { dg-message "location of the previous" "prev bool defn" { target *-*-* } 39 } */ diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-types-1.c b/gcc/testsuite/gcc.target/powerpc/altivec-types-1.c index 56bf4b9..d293042 100644 --- a/gcc/testsuite/gcc.target/powerpc/altivec-types-1.c +++ b/gcc/testsuite/gcc.target/powerpc/altivec-types-1.c @@ -86,3 +86,6 @@ __vector __bool float vbf; /* { dg-error "" "" } */ __vector __bool double vbd; /* { dg-error "" "" } */ __vector __bool short float blf; /* { dg-error "" "" } */ __vector __bool short double vlbd; /* { dg-error "" "" } */ + +/* { dg-message "note: previous" "prev vsf" { target *-*-* } 79 } */ +/* { dg-message "note: previous" "prev vsd" { target *-*-* } 82 } */ diff --git a/gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c b/gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c index 452060e..c45a90f 100644 --- a/gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c +++ b/gcc/testsuite/gcc.target/powerpc/darwin-save-world-1.c @@ -1,5 +1,6 @@ /* { dg-do run { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-skip-if "need to be able to execute AltiVec" { ! { powerpc_altivec_ok && vmx_hw } } } */ /* { dg-options "-maltivec" } */ /* With altivec turned on, Darwin wants to save the world but we did not mark lr as being saved any more diff --git a/gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c b/gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c index bfdf742..3d9afb2 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c +++ b/gcc/testsuite/gcc.target/powerpc/ppu-intrinsics.c @@ -1,5 +1,5 @@ /* { dg-do link { target { *-*-linux* && powerpc_fprs } } } */ -/* { dg-options "-W -Wall -mcpu=cell" } */ +/* { dg-options "-W -Wall -Wno-uninitialized -mcpu=cell" } */ /* Test some PPU intrinsics from . */ #include -- 2.7.4