PR tree-optimization/71947
* tree-ssa-dom.c (cprop_into_stmt): Avoid replacing A with B, then
B with A within a single statement.
PR tree-optimization/71947
* gcc.dg/tree-ssa/pr71947-1.c: New test.
* gcc.dg/tree-ssa/pr71947-2.c: New test.
* gcc.dg/tree-ssa/pr71947-3.c: New test.
* gcc.dg/tree-ssa/pr71947-4.c: New test.
* gcc.dg/tree-ssa/pr71947-5.c: New test.
* gcc.dg/tree-ssa/pr71947-6.c: New test.
From-SVN: r240947
Add an interface to the go Linemap class to allow clients to ask for the
line number for a Location (for debugging dumps), so as to move some
gcc-specific location code into the back end.
Reviewed-on: https://go-review.googlesource.com/30699
* go-linemap.cc (Gcc_linemap::location_line): New method.
From-SVN: r240942
Change the compiler to use the new routines. Drop the separation of
small and large values when sending on a channel. Allocate the select
struct on the stack. Remove the old C implementation of channels. Adjust
the garbage collector for the new data structure.
Bring in part of the tracing code, enough for the channel code to call.
Bump the permitted number of allocations in one of the tests in
context_test.go. The difference is that now receiving from a channel
allocates a sudog, which the C code used to simply put on the
stack. This will be somewhat better when we port proc.go.
Reviewed-on: https://go-review.googlesource.com/30714
From-SVN: r240941
* include/std/functional (_Bind_result::__enable_if_void): Use alias
template instead of class template.
(_Bind_result::__disable_if_void): Likewise.
(_Bind_result::__call): Adjust uses of __enable_if_void and
__disable_if_void.
From-SVN: r240940
Turned out that there where a few () around macro args uses missing.
One real problem with it was detected with the int-in-bool-context in
the definition of DBX_REGISTER_NUMBER. But while being at it I've
also tried to fix other places where brackets might be missing.
gcc/ChangeLog:
2016-10-10 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.h: Wrap more macros args in brackets and fix
some formatting.
From-SVN: r240930
2016-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/77915
* frontend-passes.c (inline_matmul_assign): Return early if
inside a FORALL statement.
2016-10-10 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/77915
* gfortran.dg/matmul_11.f90: New test.
From-SVN: r240928
* gcc-interface/decl.c (gnat_to_gnu_entity): Put volatile qualifier
on types at the very end of the processing.
(gnat_to_gnu_param): Remove redundant test.
(change_qualified_type): Do nothing for unconstrained array types.
From-SVN: r240915
* gcc-interface/utils2.c (find_common_type): Do not return the LHS type
if it's an array with non-constant lower bound and the RHS type is an
array with a constant one.
From-SVN: r240913
2016-10-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* ipa-prop.c (ipcp_transform_function): Set fields m_vr and bits to NULL of
(*ipcp_transformations)][node->uid].
From-SVN: r240903
Many POSIX systems have the bad habit of not restarting interrupted
syscalls. On these systems it's up to the user to check for an error
with errno == EINTR and restart manually. This patch does this for
libgfortran, so that GFortran users don't have to do it.
2016-10-09 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/67585
* io/io.h: TEMP_FAILURE_RETRY: Define macro if not found.
* io/unix.c (raw_read): Handle EINTR.
(raw_write): Check for return value -1.
(raw_seek): Handle EINTR.
(raw_tell): Likewise.
(raw_size): Likewise.
(raw_truncate): Likewise.
(raw_close): Likewise.
(buf_flush): Call raw_seek instead of lseek.
(buf_read): Likewise.
(buf_write): Likewise.
(fd_to_stream): Handle EINTR.
(tempfile_open): Likewise.
(regular_file2): Likewise.
(compare_file_filename): Likewise.
(find_file): Likewise.
(inquire_sequential): Likewise.
(inquire_direct): Likewise.
(inquire_formatted): Likewise.
From-SVN: r240902
PR tree-optimization/77901
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Only optimize
if ranges[i].exp is SSA_NAME when looking for >= and only when
ranges[i].exp is NULL or SSA_NAME when looking for the other
comparison.
* gcc.c-torture/compile/pr77901.c: New test.
From-SVN: r240899
2016-10-08 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* diagnostic-core.h (warning_at_rich_loc_n): Declare.
* diagnostic.c (warning_at_rich_loc_n): New function.
(diagnostic_n_impl_richloc): Likewise.
(diagnostic_n_impl): Move most of the function to
diagnostic_n_impl_richloc and call it.
From-SVN: r240891
* call.c (build_user_type_conversion_1): Consider conversions from
a single element in an initializer-list.
(build_temp): Undo early_elide_copy change.
(build_over_call): Check that we don't try to copy a TARGET_EXPR
in C++17 mode. Set user_conv_p here.
(convert_like_real): Not here.
(check_self_delegation): Split out from...
(build_special_member_call): ...here. Handle C++17 copy elision.
* cvt.c (early_elide_copy): Remove.
(ocp_convert): Undo early_elide_copy change.
* except.c (build_throw): Likewise.
* init.c (expand_default_init): Likewise.
* typeck.c (cp_build_modify_expr): Likewise.
From-SVN: r240889
* c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
* doc/invoke.texi (-Wimplicit-fallthrough): Document the accepted
FALLTHRU comment styles.
* lex.c (fallthrough_comment_p): Fix off-by-one size comparison
errors, cleanup.
(_cpp_lex_direct): Allow arbitrary comments in between
fallthrough_comment_p comment and following token.
* c-c++-common/Wimplicit-fallthrough-23.c: New test.
* c-c++-common/Wimplicit-fallthrough-24.c: New test.
From-SVN: r240884