diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dc3edeec504..8162c13daa3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-11-27 Richard Sandiford + + * gcc.dg/mips-movcc-[123].c: Pass the ?: expressions to other + functions. + 2004-11-27 Jakub Jelinek PR rtl-optimization/17825 diff --git a/gcc/testsuite/gcc.dg/mips-movcc-1.c b/gcc/testsuite/gcc.dg/mips-movcc-1.c index b433a4d45b5..1e051173bf1 100644 --- a/gcc/testsuite/gcc.dg/mips-movcc-1.c +++ b/gcc/testsuite/gcc.dg/mips-movcc-1.c @@ -4,20 +4,22 @@ /* { dg-final { scan-assembler "movn" } } */ /* { dg-final { scan-assembler "movt" } } */ +void ext_int (int); + int sub1 (int i, int j, int k) { - return k ? i : j; + ext_int (k ? i : j); } int sub2 (int i, int j, long l) { - return !l ? i : j; + ext_int (!l ? i : j); } int sub3 (int i, int j, float f) { - return f ? i : j; + ext_int (f ? i : j); } diff --git a/gcc/testsuite/gcc.dg/mips-movcc-2.c b/gcc/testsuite/gcc.dg/mips-movcc-2.c index d8ea4cc6ba1..954a7f109ee 100644 --- a/gcc/testsuite/gcc.dg/mips-movcc-2.c +++ b/gcc/testsuite/gcc.dg/mips-movcc-2.c @@ -4,20 +4,22 @@ /* { dg-final { scan-assembler "movn" } } */ /* { dg-final { scan-assembler "movf" } } */ +void ext_long (long); + long sub4 (long i, long j, long k) { - return k ? i : j; + ext_long (k ? i : j); } long sub5 (long i, long j, int k) { - return !k ? i : j; + ext_long (!k ? i : j); } long sub6 (long i, long j, float f) { - return !f ? i : j; + ext_long (!f ? i : j); } diff --git a/gcc/testsuite/gcc.dg/mips-movcc-3.c b/gcc/testsuite/gcc.dg/mips-movcc-3.c index 9e515fa6a30..0bffe683dfb 100644 --- a/gcc/testsuite/gcc.dg/mips-movcc-3.c +++ b/gcc/testsuite/gcc.dg/mips-movcc-3.c @@ -7,38 +7,41 @@ /* { dg-final { scan-assembler "movn.d" } } */ /* { dg-final { scan-assembler "movf.d" } } */ +void ext_float (float); +void ext_double (double); + float sub7 (float f, float g, int i) { - return i ? f : g; + ext_float (i ? f : g); } float sub8 (float f, float g, long l) { - return !l ? f : g; + ext_float (!l ? f : g); } float sub9 (float f, float g, float h) { - return h ? f : g; + ext_float (h ? f : g); } double suba (double f, double g, int i) { - return i ? f : g; + ext_double (i ? f : g); } double subb (double f, double g, long l) { - return !l ? f : g; + ext_double (!l ? f : g); } double subc (double f, double g, double h) { - return !h ? f : g; + ext_double (!h ? f : g); }