PR c++/81011
* cp-gimplify.c (cxx_omp_finish_clause): When changing clause
to OMP_CLAUSE_SHARED, also clear OMP_CLAUSE_SHARED_FIRSTPRIVATE
and OMP_CLAUSE_SHARED_READONLY flags.
* g++.dg/gomp/pr81011.C: New test.
From-SVN: r249031
A couple of the Backend::var_expression invocations in
Unary_expression::do_get_backend were selecting "lvalue" context
incorrectly (these var exprs were not in an assignment or LHS
position); fix is to change back to "rvalue" context.
Reviewed-on: https://go-review.googlesource.com/45136
From-SVN: r249029
2017-06-08 Tom de Vries <tom@codesourcery.com>
* lib/target-supports.exp (check_effective_target_trampolines): Test for
'gcc,no_trampolines' instead of 'no_trampolines'.
From-SVN: r249026
When an interface I1 in an imported package has an unexported method,
and is then embedded into another interface I2, in a different
package, that has other methods, and a type T2 is converted to I2, we
failed to ever define the required interface method table. Naturally
T2 must implement the unexported method, and must therefore either be
defined in the same package as I1, or embed a type from that package.
In this case the compiler was assuming that that package would define
the interface method table, but of course, since I2 was not defined in
that package, that did not happen.
The fix is to only assume that the interface method table will be
defined elsewhere in the case where T2 and I2 are defined in the same
package. The compiler ensures that all such interface method tables
are created, in Gogo::build_interface_method_tables. This requires
knowing the package in which an interface type is defined, a simple
tweak to the importer.
Testing this revealed that the special case for stub methods created
for the embedded unexported methods of T2 needs to be done for
function declarations as it currently is for function definitions, so
that the newly created interface method tables use the correct name.
Testing that revealed that the code to determine the pkgpath symbol
for such stub methods was wrong. It assumed that one could call
pkgpath_for_symbol on the pkgpath to get the pkgpath symbol. Would
that it twere so simple. Instead, add a function to look up the
package, which must be known, and fetch the pkgpath symbol.
The test for this is https://golang.org/cl/45085.
Reviewed-on: https://go-review.googlesource.com/45086
From-SVN: r249024
2017-06-08 Olivier Hainque <hainque@adacore.com>
* config/t-vxworks (LIBGCC2_INCLUDES): Add path to wrn/coreip to
the set of -I options, support for direct inclusions of net/uio.h
by VxWorks header files via ioLib.h.
From-SVN: r249016
gcc/ChangeLog:
2017-05-09 Alexander Ivchenko <aivchenk@gmail.com>
* tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
New function.
(chkp_get_hard_register_fake_addr_expr): Ditto.
(chkp_build_addr_expr): Add check for hard reg case.
(chkp_parse_array_and_component_ref): Ditto.
(chkp_find_bounds_1): Ditto.
(chkp_process_stmt): Don't generate bounds store for
hard reg case.
gcc/testsuite/ChangeLog:
2017-05-09 Alexander Ivchenko <aivchenk@gmail.com>
* gcc.target/i386/mpx/hard-reg-2-lbv.c: New test.
* gcc.target/i386/mpx/hard-reg-2-nov.c: New test.
* gcc.target/i386/mpx/hard-reg-2-ubv.c: New test.
From-SVN: r249015
* predict.c (maybe_hot_bb_p): Do not check profile status.
(maybe_hot_edge_p): Likewise.
(probably_never_executed): Check for zero counts even if profile
is not read.
(unlikely_executed_edge_p): New function.
(unlikely_executed_stmt_p): New function.
(unlikely_executed_bb_p): New function.
(set_even_probabilities): Use unlikely predicates.
(combine_predictions_for_bb): Likewise.
(predict_paths_for_bb): Likewise.
(predict_paths_leading_to_edge): Likewise.
(determine_unlikely_bbs): New function.
(estimate_bb_frequencies): Use it.
(compute_function_frequency): Use zero counts even if profile is
not read.
* profile-count.h: Fix typo.
* g++.dg/tree-ssa/counts-1.C: New testcase.
* gcc.dg/tree-ssa/counts-1.c: New testcase.
From-SVN: r249013
2017-06-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/80928
* gcc.dg/vect/slp-perm-8.c: Do not expect check loop to be vectorized.
From-SVN: r249004
2017-06-07 Tony Reix <tony.reix@atos.net>
Matthieu Sarter <matthieu.sarter.external@atos.net>
David Edelsohn <dje.gcc@gmail.com>
* simple-object-xcoff.c (simple_object_xcoff_find_sections):
Search symbol table for .go_export symbol and apply pfn if found.
Co-Authored-By: David Edelsohn <dje.gcc@gmail.com>
Co-Authored-By: Matthieu Sarter <matthieu.sarter.external@atos.net>
From-SVN: r248999
gcc/ChangeLog:
2017-06-07 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-c: The return type of the following
built-in functions was implemented as int not long long. Fix sign
of return value for the unsigned version of vec_mulo and vec_mule.
vector unsigned long long vec_bperm (vector unsigned long long,
vector unsigned char)
vector signed long long vec_mule (vector signed int,
vector signed int)
vector unsigned long long vec_mule (vector unsigned int,
vector unsigned int)
vector signed long long vec_mulo (vector signed int,
vector signed int)
vector unsigned long long vec_mulo (vector unsigned int,
vector unsigned int)
* doc/extend.texi: Fix the documentation for the built-in
functions.
gcc/testsuite/ChangeLog:
2017-06-07 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-3.c: Fix vec_mule, vec_mulo test cases.
---
From-SVN: r248998
gcc/ChangeLog:
2017-06-07 Carl Love <cel@us.ibm.com>
PR target/80982
* config/rs6000/altivec.md (double<mode>2): Fix the implementation of
for BE.
From-SVN: r248997
gcc/ChangeLog:
2017-06-07 Carl Love <cel@us.ibm.com>
* config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
support, Generate doublehv for signed int/float for BE case only.
From-SVN: r248996
PR libstdc++/81002
* include/bits/regex.h (basic_regex): Adjust call to __compile_nfa
so iterator type is deduced.
* include/bits/regex_compiler.h (__compile_nfa): Reorder template
parameters to allow iterator type to be deduced.
* testsuite/28_regex/basic_regex/ctors/basic/iter.cc: New.
From-SVN: r248989
Now rs6000_nonimmediate_operand is just nonimmediate_operand.
* config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
* config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
*mov<mode>_softfloat, and an anonymous splitter): Use
nonimmediate_operand instead of rs6000_nonimmediate_operand.
From-SVN: r248987
We can also remove the two other SPE registers.
* config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
SPEFSCR registers.
* config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
(enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
(rs6000_debug_reg_global): Adjust.
(rs6000_init_hard_regno_mode_ok): Adjust.
(rs6000_dbx_register_number): Adjust.
* config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
(FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
Remove SPE_ACC and SPEFSCR.
(REG_ALLOC_ORDER): Ditto.
(FRAME_POINTER_REGNUM): Change to 111.
(enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
(REG_CLASS_NAMES): Ditto.
(REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
(REGISTER_NAMES): Ditto.
(ADDITIONAL_REG_NAMES): Ditto.
(rs6000_reg_names): Ditto.
* config/rs6000/rs6000.md: Renumber some register number
define_constants.
From-SVN: r248986
rs6000_cbranch_operator now is just comparison_operator, so just use
that directly.
* config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
* config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
comparison_operator.
From-SVN: r248977
This deletes -mfloat-gprs and the variables that go with it.
* config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
* config/rs6000/rs6000.opt: Ditto.
* config/rs6000/t-rtems: Ditto.
From-SVN: r248976
Since rs6000 no longer supports SPE, TARGET_FPRS now always is true.
This makes TARGET_{SF,DF}_SPE always false. Many patterns in spe.md
can now be deleted; which makes it possible to merge e.g. negdd2 with
*negdd2_fpr.
Finally, e500.h is deleted (it isn't used).
* config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
* config/rs6000/dfp.md: Ditto.
(negdd2, *negdd2_fpr): Merge.
(absdd2, *absdd2_fpr): Merge.
(negtd2, *negtd2_fpr): Merge.
(abstd2, *abstd2_fpr): Merge.
* config/rs6000/e500.h: Delete file.
* config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
TARGET_FPRS by 1 and simplify.
* config/rs6000/rs6000-c.c: Ditto.
* config/rs6000/rs6000.c: Ditto. Also replace TARGET_SF_SPE and
TARGET_DF_SPE by 0.
* config/rs6000/rs6000.h: Ditto. Delete TARGET_SF_SPE and
TARGET_DF_SPE.
* config/rs6000/rs6000.md: Ditto.
(floatdidf2, *floatdidf2_fpr): Merge.
(move_from_CR_gt_bit): Delete.
* config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
(E500_CR_IOR_COMPARE): Delete.
(All patterns that require !TARGET_FPRS): Delete.
* config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
From-SVN: r248974