2017-02-19 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* gimple-parser.c (c_parser_gimple_postfix_expression): Check return
value of c_parser_parse_ssa_name against error_mark_node and emit
error if ssa name is anonymous and written as default definition.
From-SVN: r245571
PR target/79559
* config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
instead of gcc_assert for K, r and R code checks. Formatting fixes.
* gcc.target/i386/pr79559.c: New test.
From-SVN: r245560
By extending the set of floating types, TS 18661-3 thereby affected
the definition of DECIMAL_DIG, which is defined in terms of the
"widest supported floating type". This is not conditional on whether
__STDC_WANT_IEC_60559_TYPES_EXT__ is defined when <float.h> is
included.
I raised this possible incompatibility with C11 (an implementation
should be able to conform simultaneously with C11, and with C11 + TS
18661) in DR#501. This is not yet resolved, but the latest proposal
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2108.pdf> would
obsolete DECIMAL_DIG with the intention of limiting it to the C11
types (so making it equivalent to LDBL_DECIMAL_DIG). (This proposal
is intended to go along with a corresponding change to TS 18661-3 to
avoid the new types and non-arithmetic interchange encodings affecting
the value of DECIMAL_DIG.)
To avoid releasing GCC 7 with a wider-than-C11 value of DECIMAL_DIG
and possibly reverting back to a C11 value in a future release, this
patch reverts back to the C11 value now. If the proposed resolution
to DR#501 changes again so that DECIMAL_DIG *should* have a
wider-than-C11 value, we can move back to a wider-than-C11 value in
GCC 8.
Bootstrapped with no regressions on x86_64-pc-linux-gnu.
gcc/c-family:
* c-cppbuiltin.c (builtin_define_float_constants): Define
__DECIMAL_DIG__ to the value for long double.
gcc/testsuite:
* gcc.dg/c11-float-2.c: New test.
* gcc.dg/torture/float128-floath.c,
gcc.dg/torture/float128x-floath.c,
gcc.dg/torture/float16-floath.c, gcc.dg/torture/float32-floath.c,
gcc.dg/torture/float32x-floath.c, gcc.dg/torture/float64-floath.c,
gcc.dg/torture/float64x-floath.c: Do not test comparison of
*_DECIMAL_DIG macros with DECIMAL_DIG.
From-SVN: r245555
[gcc]
2017-02-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/79261
* config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
* config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
generator for vsx_xxpermdi_<mode>_be.
* config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
force big-endian semantics.
(vsx_xxpermdi_<mode>_be): New define_expand with same
implementation as previous version of vsx_xxpermdi_<mode>.
[gcc/testsuite]
2017-02-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/79261
* gcc.target/powerpc/vec-xxpermdi.c: New file.
From-SVN: r245545
Along with the update this fixes a problem that was always present but
only showed up with the new reflect test. When a program used a
**unsafe.Pointer and stored the value in an interface type, the
generated type descriptor pointed to the GC data for *unsafe.Pointer.
It did that by name, but we were not generating a variable with the
right name.
Reviewed-on: https://go-review.googlesource.com/37144
From-SVN: r245535
A cast from float to double should turn a signaling NaN into a quiet
NaN, if using -fsignaling-nans. On PowerPC single-precision floats are
stored as double precision in registers, and so, the cast normally does
nothing. This causes gcc.dg/pr59833.c to fail (it does such a cast,
and expects a quiet NaN as output).
This patch adds a new pattern, used with -fsignaling-nans in effect,
that creates an frsp instruction (or xsrsp) in this case. Since the
input already is SFmode, that instruction turns signaling NaNs into
quiet NaNs and does nothing more.
* config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
If HONOR_SNANS (SFmode) force the input to a register.
(*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
(*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
an frsp or similar insn.
From-SVN: r245534
The testcases pr59833.c and pr61441.c check whether signaling NaNs as
input to some operation result in quiet NaNs. Without -fsignaling-nans
this is not guaranteed to happen. So, this patch add this option to
these testcases.
* gcc.dg/pr59833.c: Add -fsignaling-nans to options.
* gcc.dg/pr61441.c: Ditto.
From-SVN: r245533
2017-02-17 Martin Liska <mliska@suse.cz>
PR tree-optimization/79529
* tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
ssa_defined_default_def_p to handle cases which are implicitly
defined.
* tree-ssa.c (ssa_defined_default_def_p): New function.
(ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
which are implicitly defined.
* tree-ssa.h (ssa_defined_default_def_p): Declare.
From-SVN: r245530
2017-02-16 Alan Modra <amodra@gmail.com>
PR rtl-optimization/79286
* ira.c (def_dominates_uses): New function.
(update_equiv_regs): Don't create an equivalence for insns that
may trap where the register def does not dominate the use.
* gcc.c-torture/execute/pr79286.c: New.
From-SVN: r245521
* pt.c (apply_late_template_attributes): Do apply non-dependent
attributes to types.
Co-Authored-By: Jason Merrill <jason@redhat.com>
From-SVN: r245516
2017-02-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/78127
* lra.c (lra): Call lra_eliminate before finish the loop after
lra_constraint.
From-SVN: r245514
PR libstdc++/60936
* src/c++11/snprintf_lite.cc (__concat_size_t): Calculate length
written to buffer, not length remaining in buffer.
From-SVN: r245505
PR c++/79512
c/
* c-parser.c (c_parser_omp_target): For -fopenmp-simd
ignore #pragma omp target even when not followed by identifier.
cp/
* parser.c (cp_parser_omp_target): For -fopenmp-simd
ignore #pragma omp target even when not followed by identifier.
testsuite/
* c-c++-common/gomp/pr79512.c: New test.
From-SVN: r245504
2017-02-16 Richard Biener <rguenther@suse.de>
* graphite.h: Do not include isl/isl_val_gmp.h, instead include
isl/isl_val.h.
* graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
(gcc_expression_from_isl_expr_int): Use generic isl_val interface.
* graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
(isl_val_int_from_wi): New function.
(extract_affine_gmp): Rename to ...
(extract_affine_wi): ... this, take a widest_int.
(extract_affine_int): Just wrap extract_affine_wi.
(add_param_constraints): Use isl_val_int_from_wi.
(add_loop_constraints): Likewise, and extract_affine_wi.
From-SVN: r245501