From 00b7527b254adcf0898964d03983dd0eed0c78c9 Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Thu, 25 Jul 2013 14:58:21 +0000 Subject: [PATCH] re PR rtl-optimization/57960 (S/390: LRA ICE building glibc) 2013-07-25 Vladimir Makarov PR rtl-optimization/57960 * lra-constraints.c (process_alt_operands): Use the right mode when checking strict_low. 2013-07-25 Vladimir Makarov PR rtl-optimization/57960 * gcc.target/s390/pr57960.c: New. From-SVN: r201243 --- gcc/ChangeLog | 6 +++++ gcc/lra-constraints.c | 3 ++- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/s390/pr57960.c | 30 +++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.target/s390/pr57960.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0561d81f347..e13f79b1237 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-07-25 Vladimir Makarov + + PR rtl-optimization/57960 + * lra-constraints.c (process_alt_operands): Use the right mode + when checking strict_low. + 2013-07-25 Jan Hubicka * lto-symtab.c (lto_cgraph_replace_node): Release function body. diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 5cb06453a03..29cf7dbe852 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -1940,7 +1940,8 @@ process_alt_operands (int only_alternative) && ira_class_hard_regs_num[this_alternative] > 0 && ! HARD_REGNO_MODE_OK (ira_class_hard_regs [this_alternative][0], - GET_MODE (op))) + GET_MODE + (*curr_id->operand_loc[nop]))) goto fail; losers++; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 16e6c74a976..3812c7ecbd3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-07-25 Vladimir Makarov + + PR rtl-optimization/57960 + * gcc.target/s390/pr57960.c: New. + 2013-07-25 Janus Weil PR fortran/57639 diff --git a/gcc/testsuite/gcc.target/s390/pr57960.c b/gcc/testsuite/gcc.target/s390/pr57960.c new file mode 100644 index 00000000000..ee751edc842 --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/pr57960.c @@ -0,0 +1,30 @@ +/* PR rtl-optimization/57960 */ + +/* { dg-do compile } */ +/* { dg-options "-march=z10 -m64 -mzarch -O1" } */ + +typedef union +{ + long double value; + struct + { + unsigned int w0, w1, w2, w3; + } + parts32; +} + ieee854_long_double_shape_type; +static const long double one = 1.0L; +long double +__ieee754_acosl (long double x) +{ + long double z, w; + int ix; + ieee854_long_double_shape_type u; + + z = (one - u.value) * 0.5; + u.parts32.w2 = 0; + u.parts32.w3 = 0; + w = z - u.value * u.value; + return 2.0 * w; + +} -- 2.30.2