PR gcov-profile/71868
* cfgloopanal.c (expected_loop_iterations_unbounded): When we
have a function with multiple latches, count them all.
From-SVN: r238706
PR tree-optimization/71987
* tree-ssa-reassoc.c (maybe_optimize_range_tests): Call get_ops
just for SSA_NAMEs. Fix GNU coding style.
* gcc.dg/torture/pr71987.c: New test.
From-SVN: r238704
* testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Use
std::mt19937, std::thread and std::atomic to simplify test.
* testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
From-SVN: r238703
The 2015-11-23 sanitizer merge from upstream lost the changes from
f6528435 to sanitizer_common/sanitizer_common_interceptors.inc, which
made use of _OBSTACK_SIZE_T. So the configury changes to define
_OBSTACK_SIZE_T don't do anything. This wasn't such a bad thing
anyway.. The configure test wrongly adds -I${srcdir}/../include,
effectively resulting in a test of libiberty/obstack rather than libc
obstack support, and it's the latter that asan and tsan need to work
with.
So, remove the useless configure test. Upstream santizer project has
been made aware of the problem if glibc obstack support is ever
updated. Bootsrapped etc. x86_64-linux and committed as obvious.
Revert 2015-11-09 Alan Modra <amodra@gmail.com>
* configure.ac: Don't substitute OBSTACK_DEFS.
* asan/Makefile.am: Remove OBSTACK_DEFS from DEFS.
* tsan/Makefile.am: Likewise.
* configure: Regenerate.
* Makefile.in: Regenerate.
* asan/Makefile.in: Regenerate.
* interception/Makefile.in: Regenerate.
* libbacktrace/Makefile.in: Regenerate.
* lsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.in: Regenerate.
* tsan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Regenerate.
From-SVN: r238701
2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71935
* check.c (is_c_interoperable): Simplify right expression.
2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/71935
* gfortran.dg/c_sizeof_1.f90: Move invalid code to ...
* gfortran.dg/c_sizeof_6.f90: here. Test for error.
* gfortran.dg/pr71935.f90: New test.
From-SVN: r238665
gcc/c-family/ChangeLog:
PR c++/71675
* c-common.c (resolve_overloaded_builtin): Avoid converting
__atomic_compare_exchange_n return type to that of what its
first argument points to.
gcc/testsuite/ChangeLog:
PR c++/71675
* g++.dg/ext/atomic-3.C: New test.
* gcc.dg/atomic/pr71675.c: New test.
From-SVN: r238664
gcc/ChangeLog:
2016-07-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000.c (rs6000_option_override_internal): Add
comments to explain why certain error messages make mention of
undocumented options.
(rs6000_invalid_builtin): Change error messages to replace mention
of undocumented options with mention of the -mcpu=power9 option
that enables those undocumented options.
* config/rs6000/rs6000.h (MASK_FLOAT128): New macro.
(RS6000_BTM_FLOAT128): Use the new MASK_FLOAT128 macro in the
definition of this macro to correct an existing error.
* config/rs6000/rs6000.opt: Add the Undocumented qualifier to the
mpower9-fusion, mpower9-vector, mpower9-dform, and mmodulo entries.
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Modify
descriptions of built-in functions so that they depend on
-mcpu=power9 instead of on the corresponding undocumented flags.
* doc/invoke.texi (Option Summary): Remove all mention of newly
undocumented flags.
(IBM RS/6000 and PowerPC Options): Likewise.
* doc/md.texi (Constraints for Particuliar Machines): Remove all
mention of newly undocumented flags.
From-SVN: r238648
2016-07-22 Evgeny Stupachenko <evstupac@gmail.com>
gcc/
* ipa-cp.c (determine_versionability): Do not create constprop clones,
when target_clones attribute is set.
gcc/testsuite/
* gcc.target/i386/mvc8.c: New test.
From-SVN: r238645
The current logic determining whether to use .machine in the generated
asm code puts it there if the compiler is not configured with a default
target cpu, _or_ no -mcpu= was given on the command line. It should
be "and" instead.
PR target/71216
* config/rs6000/rs6000.c (rs6000_file_start): Fix condition for
when to emit a ".machine" pseudo-op.
From-SVN: r238639
2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71795
* frontend-passes.c (combine_array_constructor): Don't
do anything if the expression is inside an array iterator.
2016-07-22 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71795
* gfortran.dg/constructor_50.f90: New test.
From-SVN: r238638
PR gcov-profile/69028
PR gcov-profile/62047
* g++.dg/cilk-plus/pr69028.C: New test.
PR gcov-profile/69028
PR gcov-profile/62047
* cilk.c (create_cilk_helper_decl): Set location of a new decl
to the current_function_decl.
PR gcov-profile/69028
PR gcov-profile/62047
* coverage.c (coverage_compute_lineno_checksum): Do not
calculate checksum for fns w/o xloc.file.
(coverage_compute_profile_id): Likewise.
From-SVN: r238637
libgfortran/ChangeLog:
2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
* caf/libcaf.h: Add parameter stat to caf_get() and
caf_send()'s function prototypes.
* caf/single.c (_gfortran_caf_get): Implement reporting
error using stat instead of abort().
(_gfortran_caf_send): Same.
(_gfortran_caf_sendget): Use NULL for stat when calling
caf_send().
gcc/testsuite/ChangeLog:
2016-07-22 Andre Vehreschild <vehre@gcc.gnu.org>
* gfortran.dg/coarray_stat_2.f90: New test.
From-SVN: r238636
* call.c (build_over_call): Check unsafe_copy_elision_p even for
trivial constructors.
* method.c (do_build_copy_constructor): Don't copy tail padding
even in a trivial constructor.
From-SVN: r238620
The compiler check that issued a duplicate declaration error for
a, a, a := 1, 2, 3
was incorrectly issuing an error for
a, a, a = 1, 2, 3
While this is not particularly useful, it is valid Go.
Test is https://golang.org/cl/25143.
Reviewed-on: https://go-review.googlesource.com/25144
From-SVN: r238618
* testsuite/21_strings/basic_string/modifiers/append/char/1.cc: Fix
reads past the end of strings.
* testsuite/21_strings/basic_string/operations/compare/char/1.cc:
Likewise.
* testsuite/21_strings/char_traits/requirements/short/1.cc: Fix
invalid array accesses.
* testsuite/experimental/string_view/operations/compare/char/1.cc:
Fix read past the end of string.
* testsuite/util/testsuite_character.cc: Fix out-of-bounds write.
From-SVN: r238609