Jan Hubicka [Thu, 6 Oct 2016 13:45:45 +0000 (15:45 +0200)]
postreload.c (reload_cse_simplify): Skip also USE when detecting noop move.
* postreload.c (reload_cse_simplify): Skip also USE when detecting
noop move.
From-SVN: r240833
Richard Biener [Thu, 6 Oct 2016 12:17:53 +0000 (12:17 +0000)]
re PR tree-optimization/77855 (wrong code at -O3 on x86_64-linux-gnu (in both 32-bit and 64-bit modes))
2016-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/77855
* tree-ssa-pre.c (prune_clobbered_mems): Queue exprs to remove
instead of removing the current item while iterating over the set
which is not safe.
* gcc.dg/torture/pr77855.c: New testcase.
From-SVN: r240832
James Clarke [Thu, 6 Oct 2016 10:28:23 +0000 (10:28 +0000)]
re PR target/77759 (ICE in function_arg_record_value on nested empty class)
PR target/77759
* config/sparc/sparc.c (classify_data_t): Remove int_regs field.
(classify_registers): Don't set it
(function_arg_slotno): Don't initialize and test it. Tidy up.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r240830
Richard Biener [Thu, 6 Oct 2016 08:54:37 +0000 (08:54 +0000)]
re PR tree-optimization/77839 (Memory- and compile time hog at -O1 and above)
2016-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/77839
* tree-ssa-sccvn.c (set_ssa_val_to): Forbid value -> constant value
lattice transition.
* gcc.dg/torture/pr77839.c: New testcase.
From-SVN: r240829
Martin Liska [Thu, 6 Oct 2016 07:34:23 +0000 (09:34 +0200)]
Add -fprofile-update option juggling
* gcc.c: Set -fprofile-update=atomic when profiling is
enabled and -pthread is set. Warn when one combines
-pthread and -fprofile-update=single for an app using
profiling code.
From-SVN: r240828
Martin Liska [Thu, 6 Oct 2016 07:33:49 +0000 (09:33 +0200)]
Fix warnings for make profiledbootstrap (PR bootstrap/77788)
PR bootstrap/77788
* expmed.h (mul_highpart_cost_ptr): Add an gcc_assert.
* gimple-ssa-strength-reduction.c (slsr_process_cast):
Initialize a pointer to NULL.
(slsr_process_copy): Likewise.
* input.c (location_get_source_line): Likewise.
* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
From-SVN: r240827
Ian Lance Taylor [Thu, 6 Oct 2016 03:51:03 +0000 (03:51 +0000)]
escape: Avoid allocation of varargs parameter.
There was a bug in the escape analysis that would cause
the slice implicitly created to hold varargs parameters to always
escape, as well as the appended to slice argument. The intended
behavior was that the elements of the appendee and appended to
slice would escape to the heap. Alongside of these issues,
the varargs slice would also have a chance to be initialized to an
invalid memory location if it were stack-allocated. This has been
fixed as well.
Reviewed-on: https://go-review.googlesource.com/30450
From-SVN: r240826
Marek Polacek [Thu, 6 Oct 2016 00:25:29 +0000 (00:25 +0000)]
* g++.dg/cpp1z/init-statement9.C: New test.
From-SVN: r240824
GCC Administrator [Thu, 6 Oct 2016 00:16:17 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240823
Jason Merrill [Wed, 5 Oct 2016 22:59:02 +0000 (18:59 -0400)]
Implement P0135R1, Guaranteed copy elision.
* cvt.c (ocp_convert): Don't re-copy a TARGET_EXPR in C++17.
From-SVN: r240820
Jason Merrill [Wed, 5 Oct 2016 22:58:55 +0000 (18:58 -0400)]
PR c++/54293 - binding reference to member of temporary
* call.c (reference_binding): Fix binding to member of temporary.
From-SVN: r240819
Jason Merrill [Wed, 5 Oct 2016 22:57:58 +0000 (18:57 -0400)]
* call.c (extend_ref_init_temps): Fix TARGET_EXPR handling.
From-SVN: r240818
Andrew Senkevich [Wed, 5 Oct 2016 22:08:48 +0000 (22:08 +0000)]
Delete x86 deprecated pcommit instruction support
Delete x86 pcommit instruction support, which has been deprecated:
https://software.intel.com/en-us/blogs/2016/09/12/deprecate-pcommit-instruction
gcc/
* common/config/i386/i386-common.c (OPTION_MASK_ISA_PCOMMIT_UNSET,
OPTION_MASK_ISA_PCOMMIT_SET): Deleted definitions.
(ix86_handle_option): Deleted handle of OPT_mpcommit.
* config.gcc: Deleted pcommitintrin.h
* config/i386/pcommitintrin.h: Deleted file.
* config/i386/cpuid.h (bit_PCOMMIT): Deleted.
* config/i386/driver-i386.c (host_detect_local_cpu): Deleted pcommit
detection.
* config/i386/i386-c.c (ix86_target_macros_internal): Deleted define
__PCOMMIT__.
* config/i386/i386.c (ix86_target_string): Deleted -mpcommit.
(PTA_PCOMMIT): Deleted define.
(ix86_option_override_internal): Deleted handle of option.
(ix86_valid_target_attribute_inner_p): Deleted pcommit.
* config/i386/i386-builtin.def (IX86_BUILTIN_PCOMMIT,
__builtin_ia32_pcommit): Deleted.
* config/i386/i386.h (TARGET_PCOMMIT, TARGET_PCOMMIT_P): Deleted.
* config/i386/i386.md (unspecv): Deleted UNSPECV_PCOMMIT.
(pcommit): Deleted instruction.
* config/i386/i386.opt: Mention -mpcommit deprecation.
* config/i386/x86intrin.h: Deleted inclusion of pcommitintrin.h.
gcc/testsuite/
* gcc.target/i386/pcommit-1.c: Deleted.
* gcc.target/i386/sse-12.c: Deleted -pcommit option.
* gcc.target/i386/sse-13.c: Ditto.
* gcc.target/i386/sse-14.c: Ditto.
* gcc.target/i386/sse-22.c: Ditto.
* gcc.target/i386/sse-23.c: Ditto.
* g++.dg/other/i386-2.C: Ditto.
From-SVN: r240816
Uros Bizjak [Wed, 5 Oct 2016 22:06:37 +0000 (00:06 +0200)]
pr77833.c: Require int128 effective target.
* gcc.target/i386/pr77833.c: Require int128 effective target.
From-SVN: r240815
Uros Bizjak [Wed, 5 Oct 2016 22:02:05 +0000 (00:02 +0200)]
re PR target/77874 (two problems with gcc.target/i386/avx-1.c)
PR target/77874
* config/i386/sse.md (<mask_codefor><code><mode>3<mask_name>):
Remove wrong assert.
(<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>:
Use <round_constraint> as operand 1 constraint.
From-SVN: r240814
Steven G. Kargl [Wed, 5 Oct 2016 21:14:14 +0000 (21:14 +0000)]
re PR fortran/58991 (ICE with associate and character string constant)
2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
PR fortran/58991
PR fortran/58992
* resolve.c (resolve_assoc_var): Fix CHARACTER type-spec for a
selector in ASSOCIATE.
(resolve_fl_variable): Skip checks for an ASSOCIATE variable.
2016-10-05 Steven G. Kargl <kargls@gcc.gnu.org>
PR fortran/58991
PR fortran/58992
* gfortran.dg/associate_22.f90: New test.
From-SVN: r240812
Fritz Reese [Wed, 5 Oct 2016 20:24:48 +0000 (20:24 +0000)]
Fix ICE due to comparison between UNION components.
2016-10-05 Fritz Reese <fritzoreese@gmail.com>
Fix ICE due to comparison between UNION components.
gcc/fortran/
* interface.c (gfc_compare_types): Don't compare BT_UNION components
until we know they're both UNIONs.
* interface.c (gfc_compare_union_types): Guard against empty
components.
gcc/testsuite/gfortran.dg/
* dec_union_9.f90: New testcase.
* dec_union_10.f90: New testcase.
From-SVN: r240810
Jason Merrill [Wed, 5 Oct 2016 19:59:28 +0000 (15:59 -0400)]
* parser.c (cp_parser_skip_to_end_of_statement): Add missing break.
From-SVN: r240809
Marek Polacek [Wed, 5 Oct 2016 19:25:15 +0000 (19:25 +0000)]
Fix last commit.
From-SVN: r240806
Jakub Jelinek [Wed, 5 Oct 2016 19:04:39 +0000 (21:04 +0200)]
re PR sanitizer/66343 ("Error: .Lubsan_type3 already defined" with UBSan and precompiled headers)
PR sanitizer/66343
* ubsan.c (ubsan_create_data): Call initialize_sanitizer_builtins here.
(ubsan_instrument_float_cast): And not here.
* c-ubsan.c (ubsan_instrument_return): Don't call
initialize_sanitizer_builtins here.
* gcc.dg/pch/pr66343-3.c: New test.
* gcc.dg/pch/pr66343-3.hs: New file.
From-SVN: r240804
Jakub Jelinek [Wed, 5 Oct 2016 19:03:28 +0000 (21:03 +0200)]
re PR sanitizer/66343 ("Error: .Lubsan_type3 already defined" with UBSan and precompiled headers)
PR sanitizer/66343
* ubsan.c (ubsan_ids): New GTY(()) array.
(ubsan_type_descriptor, ubsan_create_data): Use ubsan_ids
instead of static local counters.
* gcc.dg/pch/pr66343-1.c: New test.
* gcc.dg/pch/pr66343-1.hs: New file.
* gcc.dg/pch/pr66343-2.c: New test.
* gcc.dg/pch/pr66343-2.hs: New file.
From-SVN: r240803
Jason Merrill [Wed, 5 Oct 2016 18:57:45 +0000 (14:57 -0400)]
* semantics.c (finish_compound_literal): Handle class placeholder.
From-SVN: r240802
Steve Ellcey [Wed, 5 Oct 2016 18:42:10 +0000 (18:42 +0000)]
MAINTAINERS: Update email address after it got reverted.
2016-10-05 Steve Ellcey <sellcey@caviumnetworks.com>
* MAINTAINERS: Update email address after it got reverted.
From-SVN: r240801
Bernd Edlinger [Wed, 5 Oct 2016 18:34:17 +0000 (18:34 +0000)]
c-common.c (c_common_truthvalue_conversion): Warn also for suspicious conditional expression in boolean context when...
2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
conditional expression in boolean context when only one arm is
non-boolean.
testsuite:
2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-c++-common/Wint-in-bool-context.c: Update test.
From-SVN: r240799
Marek Polacek [Wed, 5 Oct 2016 18:02:06 +0000 (18:02 +0000)]
Implement P0305R1, Selection statements with initializer.
* cp-array-notation.c (create_an_loop): Call finish_init_stmt
instead of finish_for_init_stmt.
* cp-tree.h (finish_for_init_stmt): Rename to finish_init_stmt.
* decl.c (poplevel): Adjust a comment.
* init.c (build_vec_init): Call finish_init_stmt instead of
finish_for_init_stmt.
* name-lookup.c (pushdecl_maybe_friend_1): Adjust a comment.
* name-lookup.h (enum scope_kind): Likewise.
* parser.c (cp_parser_statement): Update commentary.
(cp_parser_init_statement_p): New function.
(cp_parser_selection_statement): Parse the optional init-statement.
(cp_parser_for): Call finish_init_stmt instead of finish_for_init_stmt.
(cp_parser_c_for): Likewise.
(cp_convert_range_for): Call finish_init_stmt instead of finish_for_init_stmt.
(cp_parser_range_for_member_function): Update commentary.
(cp_parser_iteration_statement):
(cp_parser_for_init_statement): Rename to cp_parser_init_statement.
* pt.c (tsubst_omp_for_iterator): Update commentary.
(tsubst_expr): Call finish_init_stmt instead of finish_for_init_stmt.
* semantics.c (finish_for_init_stmt): Rename to finish_init_stmt.
Update commentary.
* g++.dg/cpp1z/init-statement1.C: New test.
* g++.dg/cpp1z/init-statement2.C: New test.
* g++.dg/cpp1z/init-statement3.C: New test.
* g++.dg/cpp1z/init-statement4.C: New test.
* g++.dg/cpp1z/init-statement5.C: New test.
* g++.dg/cpp1z/init-statement6.C: New test.
* g++.dg/cpp1z/init-statement7.C: New test.
* g++.dg/cpp1z/init-statement8.C: New test.
From-SVN: r240798
Louis Krupp [Wed, 5 Oct 2016 18:00:30 +0000 (18:00 +0000)]
re PR fortran/67524 (ICE on using implicit character instead of implicit none etc.)
2016-10-05 Louis Krupp <louis.krupp@zoho.com>
PR fortran/67524
* gfortran.dg/pr67524.f90: New test.
2016-10-05 Louis Krupp <louis.krupp@zoho.com>
PR fortran/67524
* resolve.c (resolve_symbol): Don't apply default type rules to
mixed-entry master created for function entry points.
From-SVN: r240797
Jakub Jelinek [Wed, 5 Oct 2016 17:47:34 +0000 (19:47 +0200)]
re PR sanitizer/77823 (ICE: in ubsan_encode_value, at ubsan.c:137 with -fsanitize=undefined and vector types)
PR sanitizer/77823
* c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
is not integral.
* c-c++-common/ubsan/shift-9.c: New test.
From-SVN: r240796
Senthil Kumar Selvaraj [Wed, 5 Oct 2016 17:11:22 +0000 (17:11 +0000)]
Fix pr69941.c test failure for avr
The test assumes ints are atleast 32 bits wide. For the avr
target, ints are 16 bits wide. This leads VRP to conclude
that a right shift by 9 followed by an equality comparison
to 0x74 can never be true. VRP eliminates the conditional, and
the code ends up unconditionally calling __builtin_abort.
Fixed the testcase to use __INT32_TYPE__ for targets with less
than 32 bit wide integers, wherever the size happens to be
significant.
gcc/testsuite/ChangeLog
2016-10-05 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.dg/torture/pr69941.c: Use __INT32_TYPE__ instead
of int if __SIZEOF_INT__ is less than 4 bytes.
From-SVN: r240795
Jerry DeLisle [Wed, 5 Oct 2016 16:32:24 +0000 (16:32 +0000)]
re PR libfortran/77868 (Fail to NULL guard check for internal unit in inquire_via_unit)
2016-10-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/77868
* io/inquire.c (inquire_via_unit): NULL guard the check for
internal unit passed into child IO procedure.
* gfortran.dg/dtio_15.f90: Fix spaces in dg-do.
* gfortran.dg/class_array_20.f03: Likewise.
* gfortran.dg/class_array_21.f03: Likewise.
* gfortran.dg/finalize_29.f08: Likewise.
* gfortran.dg/unlimited_polymorphic_23.f90: Likewise.
From-SVN: r240794
Martin Sebor [Wed, 5 Oct 2016 15:21:40 +0000 (15:21 +0000)]
PR bootstrap/77819 - undefined reference to gnu_libc_printf_pointer_format with uClibc
gcc/ChangeLog:
PR bootstrap/77819
* config/linux.h (TARGET_PRINTF_POINTER_FORMAT): Define macro.
* config/linux.c (gnu_libc_printf_pointer_format): Remove.
* targhooks.c [DEFAULT_LIBC == LIBC_UCLIBC) && SINGLE_LIBC]
(default_printf_pointer_format): Define function.
* targhooks.c (linux_printf_pointer_format): Define new function.
* targhooks.h (linux_printf_pointer_format): Declare.
(gnu_libc_printf_pointer_format): Remove declaration.
From-SVN: r240793
Jakub Jelinek [Wed, 5 Oct 2016 15:10:01 +0000 (17:10 +0200)]
* c-common.c (c_common_reswords): Update comment for C++11.
From-SVN: r240792
Kyrylo Tkachov [Wed, 5 Oct 2016 14:57:14 +0000 (14:57 +0000)]
[fold-const] Fix native_encode_real for HFmode constants
* fold-const.c (native_encode_real): Fix logic for selecting offset
to write to when BYTES_BIG_ENDIAN.
From-SVN: r240791
Jonathan Wakely [Wed, 5 Oct 2016 12:40:31 +0000 (13:40 +0100)]
70564 fix newly-added tests for not_fn
PR libstdc++/70564
* testsuite/20_util/not_fn/1.cc: Fix test.
* testsuite/experimental/functional/not_fn.cc: Likewise.
From-SVN: r240784
Kelvin Nilsen [Wed, 5 Oct 2016 12:36:48 +0000 (12:36 +0000)]
re PR target/77847 (PowerPC big endian power7/power8 do not bootstrap due to fall through error)
libcpp/ChangeLog:
2016-10-04 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/77847
* lex.c (search_line_fast): Add a FALLTHROUGH comment to correct
compiler error in the version of this function that is
conditionally compiled when GCC_VERSION >= 4005 and both
__ALTIVEC__ and __BIG_ENDIAN__ symbols are defined.
From-SVN: r240783
Wilco Dijkstra [Wed, 5 Oct 2016 12:31:05 +0000 (12:31 +0000)]
Move all existing strchr and strrchr folding from builtins.c to gimple-fold.c.
gcc/
* builtins.c (fold_builtin_strchr): Remove function.
(fold_builtin_strrchr): Likewise.
(fold_builtin2): Remove strchr, index, strrchr, rindex cases.
* gimple-fold.c (target_char_cst_p): New function.
(gimple_fold_builtin_strchr) Add more foldings.
(gimple_fold_builtin): Add index, strrchr, rindex cases.
From-SVN: r240782
Jonathan Wakely [Wed, 5 Oct 2016 12:01:57 +0000 (13:01 +0100)]
PR 70101 fix allocator-extended ctors for std::priority_queue
PR libstdc++/70101
* include/bits/stl_queue.h (priority_queue): Fix allocator-extended
constructors.
* testsuite/23_containers/priority_queue/allocator.cc: New test.
From-SVN: r240781
Jonathan Wakely [Wed, 5 Oct 2016 12:01:51 +0000 (13:01 +0100)]
77864 Fix noexcept conditions for map/set default constructors
PR libstdc++/77864
* include/bits/stl_map.h (map::map()): Use nothrow constructibility
of comparison function in conditional noexcept.
* include/bits/stl_multimap.h (multimap::multimap()): Likewise.
* include/bits/stl_multiset.h (multiset::multiset()): Likewise.
* include/bits/stl_set.h (set::set()): Likewise.
* testsuite/23_containers/map/cons/noexcept_default_construct.cc:
New test.
* testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
Likewise.
* testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
Likewise.
* testsuite/23_containers/set/cons/noexcept_default_construct.cc:
Likewise.
From-SVN: r240780
Jonathan Wakely [Wed, 5 Oct 2016 12:01:44 +0000 (13:01 +0100)]
Remove invalid alias declaration from _Node_handle
* include/bits/node_handle.h (_Node_handle): Remove invalid and unused
alias declaration.
From-SVN: r240779
Jonathan Wakely [Wed, 5 Oct 2016 12:01:36 +0000 (13:01 +0100)]
PR 70564 disambiguate constructors for not_fn call wrapper
PR libstdc++/70564
* include/experimental/functional (_Not_fn): Remove.
(not_fn): Use std::_Not_fn.
* include/std/functional (_Not_fn): Add second parameter to
disambiguate copying from initialization by not_fn. Define for C++14.
(not_fn): Add second argument to initialization.
* testsuite/20_util/not_fn/1.cc: Copy call wrapper using
direct-initialization.
From-SVN: r240778
Richard Biener [Wed, 5 Oct 2016 11:58:25 +0000 (11:58 +0000)]
re PR middle-end/77863 (genmatch segfault on a wrong usage of an for operator)
2016-10-05 Richard Biener <rguenther@suse.de>
PR middle-end/77863
* genmatch.c (capture_info::walk_c_expr): Diagnose unknown
capture ids in c-exprs.
From-SVN: r240777
Richard Biener [Wed, 5 Oct 2016 11:38:59 +0000 (11:38 +0000)]
re PR target/77826 (ICE in decompose, at wide-int.h:928 w/ -m64 -O2 and above)
2016-10-05 Richard Biener <rguenther@suse.de>
PR middle-end/77826
* genmatch.c (dt_operand::gen_match_op): Amend operand_equal_p
with types_match for GIMPLE code gen to handle type mismatched
constants properly.
(dt_operand::gen): Adjust.
* match.pd ((X /[ex] A) * A -> X): Properly handle converted
and constant A.
* gcc.dg/torture/pr77826.c: New testcase.
From-SVN: r240776
Richard Biener [Wed, 5 Oct 2016 11:34:58 +0000 (11:34 +0000)]
match.pd (copysign(x, CST) -> [-]abs (x)): New pattern.
2016-10-05 Richard Biener <rguenther@suse.de>
* match.pd (copysign(x, CST) -> [-]abs (x)): New pattern.
* gcc.dg/fold-copysign-1.c: New testcase.
From-SVN: r240775
Richard Biener [Wed, 5 Oct 2016 09:36:27 +0000 (09:36 +0000)]
re PR middle-end/77842 (genmatch segfault on a missing brace)
2016-10-05 Richard Biener <rguenther@suse.de>
PR middle-end/77842
* genmatch.c (parser::parse_c_expr): Handle premature EOF.
From-SVN: r240774
Andreas Schwab [Wed, 5 Oct 2016 09:11:27 +0000 (09:11 +0000)]
* g++.dg/pr49847-2.C: Remove.
From-SVN: r240773
Pierre-Marie de Rodat [Wed, 5 Oct 2016 07:53:37 +0000 (07:53 +0000)]
DWARF: move pessimistic DWARF version checks for imported entities
A check in dwarf2out_imported_module_or_decl prevents
DW_TAG_imported_module from being emitted as it was introduced in the
DWARFv3 standard. However, this also prevents valid strict DWARFv2
constructs such as DW_TAG_imported_declaration from being emitted in
dwarf2out_imported_module_or_decl_1.
The latter already protects the emission of newer DWARF tags with
appropriate checks, so the one in the former is redundant and
pessimistic. This function is already called from places like
process_scope_var, which are not protected anyway.
This patch moves the check in dwarf2out_imported_module_or_decl so that
in strict DWARFv2 mode, tags like DW_TAG_imported_declaration are
emitted while DW_TAG_imported_module are not.
gcc/
* dwarf2out.c (dwarf2out_imported_module_or_decl): Move DWARF
version check to protect only DW_TAG_imported_module generation.
gcc/testsuite/
* gnat.dg/debug7.adb, gnat.dg/debug7.ads: New testcase.
From-SVN: r240772
Andreas Schwab [Wed, 5 Oct 2016 07:50:34 +0000 (07:50 +0000)]
crtbegin.S (__do_jv_register_classes): Remove.
* config/ia64/crtbegin.S (__do_jv_register_classes): Remove.
(.section .init_array): Don't call __do_jv_register_classes.
(.section .init): Likewise.
From-SVN: r240771
Richard Biener [Wed, 5 Oct 2016 07:48:24 +0000 (07:48 +0000)]
re PR middle-end/55152 (MAX_EXPR(a,-a) is really ABS_EXPR(a))
2016-10-05 Richard Biener <rguenther@suse.de>
PR middle-end/55152
* match.pd (min(a,-a) -> -abs(a)): New pattern.
* gcc.dg/pr55152-2.c: New testcase.
From-SVN: r240770
Jerry DeLisle [Wed, 5 Oct 2016 04:45:29 +0000 (04:45 +0000)]
dtio_15.f90: New test.
2016-10-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* gfortran.dg/dtio_15.f90: New test.
From-SVN: r240769
Jerry DeLisle [Wed, 5 Oct 2016 04:39:33 +0000 (04:39 +0000)]
2016-10-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
io/inquire.c (inquire_via_unit): Add check for internal unit
passed into child IO procedure.
From-SVN: r240768
Jason Merrill [Wed, 5 Oct 2016 02:33:48 +0000 (22:33 -0400)]
* g++.dg/cpp1z/class-deduction16.C: Use tuple.
From-SVN: r240766
Jason Merrill [Wed, 5 Oct 2016 01:24:38 +0000 (21:24 -0400)]
PR c++/77852 - class deduction from list-init
* pt.c (do_class_deduction): Handle list-initialization.
(do_auto_deduction): Call it sooner.
(build_deduction_guide): Use tsubst_arg_types.
(rewrite_template_parm): Don't copy_type.
From-SVN: r240765
Ian Lance Taylor [Wed, 5 Oct 2016 00:21:41 +0000 (00:21 +0000)]
explow.c (allocate_dynamic_stack_space): Call do_pending_stack_adjust before handling flag_split_stack.
gcc/:
* explow.c (allocate_dynamic_stack_space): Call
do_pending_stack_adjust before handling flag_split_stack.
gcc/testsuite/:
* gcc.dg/split-7.c: New test.
From-SVN: r240764
GCC Administrator [Wed, 5 Oct 2016 00:16:15 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240761
Martin Sebor [Tue, 4 Oct 2016 23:00:42 +0000 (23:00 +0000)]
builtin-sprintf-warn-1.c: Cast int argument to %lc directive to wint_t to silence -Wformat warnings on...
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Cast int argument to
%lc directive to wint_t to silence -Wformat warnings on targets
where the latter is a distinct type such as long.
From-SVN: r240758
Jason Merrill [Tue, 4 Oct 2016 21:14:18 +0000 (17:14 -0400)]
PR c++/77775 - misoptimization of PMF comparison
* constexpr.c (cxx_eval_component_reference): Use name matching
for PMFs.
From-SVN: r240757
Jason Merrill [Tue, 4 Oct 2016 20:42:58 +0000 (16:42 -0400)]
Implement P0091R2, Template argument deduction for class templates.
* parser.c (cp_parser_simple_type_specifier): Parse class placeholder.
Use the location of the beginning of the type-specifier.
(cp_parser_init_declarator): Parse deduction guide.
(cp_parser_diagnose_invalid_type_name): Mention class deduction.
(cp_parser_type_id_1): Don't accept class placeholder as template arg.
* cp-tree.h (CLASS_PLACEHOLDER_TEMPLATE): New.
* decl.c (grokdeclarator): Check for uninitialized auto here.
(start_decl_1): Not here.
(cp_finish_decl): Or here. Don't collapse a list when doing
class deduction.
(grokfndecl): Check deduction guide scope and body.
* error.c (dump_decl, dump_function_decl, dump_function_name):
Handle deduction guides.
* pt.c (make_template_placeholder, do_class_deduction): New.
(build_deduction_guide, rewrite_template_parm): New.
(dguide_name, dguide_name_p, deduction_guide_p): New.
(do_auto_deduction): Call do_class_deduction.
(splice_late_return_type, is_auto): Handle class placeholders.
(template_parms_level_to_args): Split from template_parms_to_args.
(tsubst_template_parms_level): Split from tsubst_template_parms.
* typeck2.c (build_functional_cast): Handle class placeholder.
From-SVN: r240756
Martin Sebor [Tue, 4 Oct 2016 17:34:00 +0000 (17:34 +0000)]
PR c++/77804 - Internal compiler error on incorrect initialization of new-d array
gcc/cp/ChangeLog:
PR c++/77804
* init.c (warn_placement_new_too_small): Avoid assuming an array type
has a constant size.
gcc/testsuite/ChangeLog:
PR c++/77804
* g++.dg/warn/Wplacement-new-size-4.C: New test.
From-SVN: r240754
David Malcolm [Tue, 4 Oct 2016 17:10:41 +0000 (17:10 +0000)]
read-md.c: track column numbers
gcc/ChangeLog:
* genattrtab.c (make_internal_attr): Supply dummy column number to
file_location ctor.
(main): Likewise.
* genoutput.c (init_insn_for_nothing): Likewise.
* gensupport.c (add_define_attr): Likewise.
* read-md.c (message_at_1): Print column number.
(fatal_with_file_and_line): Likewise.
(rtx_reader::read_char): Track column numbers.
(rtx_reader::unread_char): Likewise.
(rtx_reader::rtx_reader): Initialize m_read_md_colno.
(rtx_reader::handle_include): Stash and restore m_read_md_colno.
(rtx_reader::handle_file): Initialize m_read_md_colno.
(rtx_reader::get_current_location): Supply column number to
file_location ctor.
* read-md.h (struct file_location): Add field "colno".
(file_location::file_location): Likewise.
(rtx_reader::get_colno): New accessor.
(rtx_reader::m_read_md_colno): New field.
(rtx_reader::m_last_line_colno): New field.
From-SVN: r240752
Jakub Jelinek [Tue, 4 Oct 2016 15:34:16 +0000 (17:34 +0200)]
re PR c++/77791 (ICE on invalid C++11 code with redefined function parameter: tree check: expected tree that contains ‘decl minimal’ structure, have ‘error_mark’ in cp_parser_lambda_declarator_opt, at cp/parser.c:1011)
PR c++/77791
* parser.c (cp_parser_lambda_declarator_opt): Only pedwarn
for C++11 on decls in the param_list. Test cxx_dialect < cxx14 before
the loop just once.
* g++.dg/cpp0x/lambda/lambda-77791.C: New test.
From-SVN: r240751
Jakub Jelinek [Tue, 4 Oct 2016 15:32:31 +0000 (17:32 +0200)]
extend.texi (Java Exceptions): Remove.
* doc/extend.texi (Java Exceptions): Remove.
(java_interface): Remove.
cp/
* cp-tree.h (enum cp_tree_index): Remove CPTI_JAVA_*,
CPTI_LANG_NAME_JAVA and CPTI_JCLASS.
(java_byte_type_node, java_short_type_node, java_int_type_node,
java_long_type_node, java_float_type_node, java_double_type_node,
java_char_type_node, java_boolean_type_node, lang_name_java,
jclass_node): Remove.
(enum languages): Remove lang_java.
(TYPE_FOR_JAVA): Remove.
(struct lang_type_class): Remove java_interface bit-field.
(TYPE_JAVA_INTERFACE): Remove.
(pragma_java_exceptions): Remove.
(check_java_method, build_java_class_ref): Remove prototypes.
* name-lookup.c (pushtag_1): Don't set TYPE_FOR_JAVA.
* decl2.c (acceptable_java_type, check_java_method): Remove.
(import_export_decl): Remove TYPE_FOR_JAVA handling.
(build_java_method_aliases): Remove.
(c_parse_final_cleanups): Don't call build_java_method_aliases.
(possibly_inlined_p): Don't test pragma_java_exceptions.
* init.c (build_new_1): Remove TYPE_FOR_JAVA handling.
(build_java_class_ref): Remove.
* pt.c (maybe_new_partial_specialization, lookup_template_class_1,
instantiate_class_template_1): Don't copy TYPE_FOR_JAVA.
* except.c (eh_type_info): Remove java type handling.
(decl_is_java_type, choose_personality_routine): Remove.
(initialize_handler_parm): Don't call choose_personality_routine.
(expand_start_catch_block): Don't handle java types.
(build_throw): Likewise.
* cp-lang.c (cp_eh_personality): Don't handle pragma_java_exceptions.
* typeck.c (structural_comptypes): Don't compare TYPE_FOR_JAVA.
* call.c (build_over_call): Don't handle TYPE_JAVA_INTERFACE.
(java_iface_lookup_fn): Remove.
(build_java_interface_fn_ref): Remove.
* tree.c (cxx_attribute_table): Remove java_interface.
(handle_java_interface_attribute): Remove.
* lex.c (pragma_java_exceptions): Remove.
(init_cp_pragma): Don't register GCC java_exceptions pragma.
(handle_pragma_java_exceptions): Remove.
(retrofit_lang_decl): Don't handle lang_name_java.
* method.c (implicitly_declare_fn): Don't handle TYPE_FOR_JAVA.
* error.c (language_to_string): Don't handle lang_java.
* decl.c (record_builtin_java_type): Remove.
(initialize_predefined_identifiers): Remove Java.
(cxx_init_decl_processing): Remove java_*_type_node.
(cp_finish_decl): Don't handle TYPE_FOR_JAVA.
(grokfndecl): Likewise.
(check_special_function_return_type): Likewise.
(grokdeclarator): Don't set TYPE_FOR_JAVA.
(grokparms): Don't handle TYPE_FOR_JAVA.
(xref_basetypes): Likewise.
(check_function_type): Likewise.
(finish_constructor_body): Likewise.
* mangle.c (write_builtin_type): Don't handle TYPE_FOR_JAVA
and java_*_type_node.
(write_bare_function_type): Don't handle TYPE_FOR_JAVA.
(write_java_integer_type_codes): Remove.
* class.c (add_method): Don't handle TYPE_FOR_JAVA.
(add_implicitly_declared_members, determine_key_method,
finish_struct_1): Likewise.
(push_lang_context): Don't handle lang_name_java.
testsuite/
* g++.dg/other/java3.C: Remove.
* g++.dg/other/java1.C: Remove.
* g++.dg/other/error12.C: Remove.
* g++.dg/other/java2.C: Remove.
* g++.dg/warn/Wnvdtor.C: Remove.
* g++.dg/lookup/java1.C: Remove.
* g++.dg/lookup/java2.C: Remove.
* g++.dg/ext/pr34829.C: Remove.
* g++.dg/ext/java-3.C: Remove.
* g++.dg/ext/java-1.C: Remove.
* g++.dg/ext/java-2.C: Remove.
* g++.old-deja/g++.oliva/dwarf2.C: Remove.
From-SVN: r240750
Doug Gilmore [Tue, 4 Oct 2016 15:28:23 +0000 (15:28 +0000)]
re PR tree-optimization/77808 (ICE in duplicate_ssa_name_ptr_info, at tree-ssanames.c:630 starting with r240439)
Fix PR tree-optimization/77808
gcc/
PR tree-optimization/77808
* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Check base_addr
and addr are different before copying points-to information.
gcc/testsuite/
PR tree-optimization/77808
* gcc.dg/tree-ssa/pr77808.c: New testcase.
From-SVN: r240749
Uros Bizjak [Tue, 4 Oct 2016 14:50:35 +0000 (16:50 +0200)]
x86-tune.def (X86_TUNE_VECTORIZE_DOUBLE): Remove.
* config/i386/x86-tune.def (X86_TUNE_VECTORIZE_DOUBLE): Remove.
* config/i386/i386.h (TARGET_VECTORIZE_DOUBLE): Remove.
* config/i386/i386.c (ix86_add_stmt_cost): Use TARGET_BONNEL instead
of !TARGET_VECTORIZE_DOUBLE when penalizing DFmode vector ops.
From-SVN: r240748
Andre Vieira [Tue, 4 Oct 2016 14:13:52 +0000 (14:13 +0000)]
Add missing testcases from previous patch revision r240379, failed to svn add.
From-SVN: r240746
Richard Biener [Tue, 4 Oct 2016 13:40:54 +0000 (13:40 +0000)]
re PR tree-optimization/77399 (Poor code generation for vector casts and loads)
2016-10-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/77399
* tree-ssa-forwprop.c (simplify_vector_constructor): Properly
verify the target can convert.
* gcc.dg/tree-ssa/forwprop-35.c: Adjust.
From-SVN: r240744
Richard Biener [Tue, 4 Oct 2016 13:39:22 +0000 (13:39 +0000)]
re PR target/77833 (ICE: in plus_constant, at explow.c:87 with -O -mavx512f)
2016-10-04 Richard Biener <rguenther@suse.de>
PR middle-end/77833
* explow.c (plus_constant): Verify the mode of the constant
pool offset before calling plus_constant.
* gcc.target/i386/pr77833.c: New testcase.
From-SVN: r240743
Richard Biener [Tue, 4 Oct 2016 13:18:18 +0000 (13:18 +0000)]
re PR middle-end/77407 (Optimize integer i / abs (i) into the sign of i)
2016-10-04 Richard Biener <rguenther@suse.de>
PR middle-end/77407
* match.pd (X / abs (X) -> X < 0 ? -1 : 1): Drop vector
type support, mark with :C.
(X / -X -> -1): Mark with :C.
From-SVN: r240742
Rainer Orth [Tue, 4 Oct 2016 09:00:27 +0000 (09:00 +0000)]
Restore --enable-objc-gc support
* configure.ac (target_libraries): Readd target-boehm-gc.
Restore --enable-objc-gc handling.
* configure: Regenerate.
From-SVN: r240740
Jakub Jelinek [Tue, 4 Oct 2016 07:49:44 +0000 (09:49 +0200)]
defaults.h (JCR_SECTION_NAME, [...]): Remove.
gcc/
* defaults.h (JCR_SECTION_NAME, TARGET_USE_JCR_SECTION): Remove.
* system.h (JCR_SECTION_NAME, TARGET_USE_JCR_SECTION): Poison.
* doc/tm.texi.in (TARGET_USE_JCR_SECTION): Remove.
* doc/tm.texi: Regenerated.
* config/i386/mingw32.h (TARGET_USE_JCR_SECTION): Remove.
* config/i386/cygming.h (TARGET_USE_JCR_SECTION): Remove.
* config/darwin.h (JCR_SECTION_NAME): Remove.
* config/pa/pa64-hpux.h (JCR_SECTION_NAME): Remove.
* config/rs6000/aix71.h (TARGET_USE_JCR_SECTION): Remove.
* config/rs6000/aix51.h (TARGET_USE_JCR_SECTION): Remove.
* config/rs6000/aix52.h (TARGET_USE_JCR_SECTION): Remove.
* config/rs6000/aix53.h (TARGET_USE_JCR_SECTION): Remove.
* config/rs6000/aix61.h (TARGET_USE_JCR_SECTION): Remove.
gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Don't define
__LIBGCC_JCR_SECTION_NAME__.
libgcc/
* config/i386/cygming-crtbegin.c (_Jv_RegisterClasses): Remove.
(__JCR_LIST__): Remove.
(__gcc_register_frame): Don't attempt to _Jv_RegisterClasses.
* config/i386/cygming-crtend.c (__JCR_END__): Remove.
* config/ia64/crtbegin.S (__JCR_LIST__): Remove.
* config/ia64/crtend.S (__JCR_END__): Remove.
* crtstuff.c: Remove __LIBGCC_JCR_SECTION_NAME__ from preprocessor
conditionals.
(__JCR_LIST__, __JCR_END__): Remove.
(frame_dummy): Don't attempt to _Jv_RegisterClasses.
(__do_global_ctors_1): Likewise.
From-SVN: r240739
GCC Administrator [Tue, 4 Oct 2016 00:16:17 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240738
François Dumont [Mon, 3 Oct 2016 20:23:13 +0000 (20:23 +0000)]
shared_ptr.cc (mask, [...]): Move declaration...
2016-10-03 François Dumont <fdumont@gcc.gnu.org>
* src/c++11/shared_ptr.cc (mask, invalid, get_mutex): Move
declaration...
* src/c++11/mutex_pool.h: ... here. New.
* src/c++11/debug.cc: Use latter.
From-SVN: r240732
Prathamesh Kulkarni [Mon, 3 Oct 2016 19:48:58 +0000 (19:48 +0000)]
Fix ChangeLog entry for r240730
From-SVN: r240731
Prathamesh Kulkarni [Mon, 3 Oct 2016 19:42:55 +0000 (19:42 +0000)]
ipa-cp.c (propagate_bits_accross_jump_function): Introduce space between callee name and param in dump message in call to fprintf.
2016-10-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* ipa-cp.c (propagate_bits_accross_jump_function): Introduce space
between callee name and param in dump message in call to fprintf.
From-SVN: r240730
Jeff Law [Mon, 3 Oct 2016 19:37:08 +0000 (13:37 -0600)]
MAINTAINERS: Move several inactive maintainers to the write-after-approval section.
* MAINTAINERS: Move several inactive maintainers to the
write-after-approval section.
From-SVN: r240729
Jeff Law [Mon, 3 Oct 2016 19:28:24 +0000 (13:28 -0600)]
re PR tree-optimization/71550 (wrong code at -O3 on x86_64-linux-gnu)
PR tree-optimization/71550
PR tree-optimization/71403
* tree-ssa-threadbackward.c: Include tree-vectorizer.h
(profitable_jump_thread_path): Also return boolean indicating if
the realized path will create an irreducible loop.
Remove loop depth tests from 71403.
(fsm_find_control_statement_thread_paths): Remove loop depth tests
from 71403. If threading will create an irreducible loop, then
throw away loop iteration and related information.
PR tree-optimization/71550
PR tree-optimization/71403
* gcc.c-torture/execute/pr71550.c: New test.
From-SVN: r240727
Ian Lance Taylor [Mon, 3 Oct 2016 18:39:54 +0000 (18:39 +0000)]
re PR go/77809 ("_LITTLE_ENDIAN" redefined)
PR go/77809
libgo: strip most C macros from runtime.inc
The Go runtime package is picking up C macros from runtime_sysinfo.go
and then re-exporting them to runtime.inc. This can cause name
conflicts. Change the Makefile so that we only put the macros we need
into runtime.inc. These are the constants that are actually defined by
Go code, not runtime_sysinfo.go. There are only a few, so we can
pattern match.
This is an additional hack on runtime.inc. The long term goal is to
convert the runtime package to Go and eliminate runtime.inc entirely, so
a few hacks seem acceptable.
Fixes GCC PR 77809.
Reviewed-on: https://go-review.googlesource.com/30167
From-SVN: r240724
Jonathan Wakely [Mon, 3 Oct 2016 17:01:10 +0000 (18:01 +0100)]
Define std::gcd and std::lcm for C++17
* doc/xml/manual/status_cxx2017.xml: Update gcd/lcm status.
* doc/html/*: Regenerate.
* include/experimental/numeric (__abs): Move to <numeric>.
(gcd, lcm): Use __detail::gcd and __detail::lcm.
* include/std/numeric (__detail::__abs_integral)
(__detail::__gcd, __detail::__lcm): Define.
(gcd, lcm): Define for C++17.
* testsuite/26_numerics/gcd/1.cc: New test.
* testsuite/26_numerics/lcm/1.cc: New test.
* testsuite/experimental/numeric/gcd.cc: Swap contents with ...
* testsuite/experimental/numeric/lcd.cc: ... this.
From-SVN: r240723
Uros Bizjak [Mon, 3 Oct 2016 15:51:33 +0000 (17:51 +0200)]
configure.ac (strict_warn): Merge -Wmissing-format-attribute and -Woverloaded-virtual checks for warning...
* configure.ac (strict_warn): Merge -Wmissing-format-attribute and
-Woverloaded-virtual checks for warning options.
* configure: Regenerate.
From-SVN: r240721
Jonathan Wakely [Mon, 3 Oct 2016 14:35:28 +0000 (15:35 +0100)]
Fix libstdc++ versioned namespace build
PR libstdc++/68323
PR libstdc++/77794
* config/abi/pre/gnu-versioned-namespace.ver: Add exports for
__cxa_thread_atexit and __gnu_cxx::__freeres.
* include/Makefile.am: Add <experimental/bits/lfts_config.h>
* include/Makefile.in: Regenerate.
* include.bits/basic_string.h: Fix nesting of versioned namespaces.
* include/bits/c++config: Declare versioned namespaces for literals.
* include/bits/regex.h (basic_regex, match_results): Add workarounds
for PR c++/59256.
* include/bits/uniform_int_dist.h: Fix nesting of versioned namespace.
* include/std/chrono: Likewise.
* include/std/complex: Likewise.
* include/std/string_view: Likewise.
* include/std/variant: Likewise. Add workaround for PR c++/59256.
* include/experimental/bits/fs_fwd.h: Declare versioned namespace.
* include/experimental/bits/lfts_config.h: Declare versioned
namespaces.
* include/experimental/algorithm: Include
<experimental/bits/lfts_config.h>.
* include/experimental/any: Likewise.
* include/experimental/bits/erase_if.h: Likewise.
* include/experimental/chrono: Likewise.
* include/experimental/functional: Likewise.
* include/experimental/memory_resource: Likewise.
* include/experimental/optional: Likewise.
* include/experimental/propagate_const: Likewise.
* include/experimental/random: Likewise.
* include/experimental/ratio: Likewise.
* include/experimental/system_error: Likewise.
* include/experimental/tuple: Likewise.
* include/experimental/type_traits: Likewise.
* include/experimental/utility: Likewise.
* include/experimental/string_view: Likewise. Fix nesting of
versioned namespaces.
* include/experimental/bits/string_view.tcc: Reopen inline namespace
for non-inline function definitions.
* testsuite/17_intro/using_namespace_std_exp_neg.cc: New test.
* testsuite/20_util/duration/literals/range.cc: Adjust dg-error line.
* testsuite/experimental/any/misc/any_cast_neg.cc: Likewise.
* testsuite/experimental/propagate_const/assignment/move_neg.cc:
Likewise.
* testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
* testsuite/experimental/propagate_const/requirements2.cc: Likewise.
* testsuite/experimental/propagate_const/requirements3.cc: Likewise.
* testsuite/experimental/propagate_const/requirements4.cc: Likewise.
* testsuite/experimental/propagate_const/requirements5.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.
From-SVN: r240714
Bernd Edlinger [Mon, 3 Oct 2016 14:05:46 +0000 (14:05 +0000)]
re PR preprocessor/77699 (suspicious code in get_next_line)
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR preprocessor/77699
* input.c (maybe_grow): Don't allocate one byte extra headroom.
(get_next_line): Return false on error.
(read_next_line): Removed, use get_next_line instead.
(read_line_num): Don't copy the line.
(location_get_source_line): Don't use static data.
(selftest::test_reading_source_line): Add more test cases.
From-SVN: r240713
Senthil Kumar Selvaraj [Mon, 3 Oct 2016 12:08:27 +0000 (12:08 +0000)]
Fix failing gcc.target/avr/torture/builtins_error.c
The compiler defaults to thin LTO objects if built with linker plugin
support, and in that case, the error expected by the testcase appears
only at link time, if at all. Forcing fat LTO object file creation
generates the error consistently at compile time, as expected.
gcc/testsuite/ChangeLog:
2016-10-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
* gcc.target/avr/torture/builtins-error.c: Add -ffat-lto-objects
option.
From-SVN: r240711
Jonathan Wakely [Mon, 3 Oct 2016 11:50:46 +0000 (12:50 +0100)]
Ensure "C++" language linkage for std::abs overloads
PR libstdc++/77814
* include/bits/std_abs.h: Use "C++" language linkage.
* testsuite/17_intro/headers/c++2011/linkage.cc: Move <complex.h> to
the end. Add <stdalign.h>.
From-SVN: r240710
Ville Voutilainen [Mon, 3 Oct 2016 11:06:53 +0000 (14:06 +0300)]
re PR libstdc++/77802 (Boost Fiber doesn't compile)
PR libstdc++/77802
* testsuite/20_util/tuple/77802.cc: New.
Revert:
2016-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement LWG 2729 for tuple.
* include/std/tuple (_Tuple_impl(_Tuple_impl&&)):
Suppress conditionally.
(_Tuple_impl(_Tuple_impl<_Idx, _UHead, _UTails...>&&)): Likewise.
(__is_tuple_impl_trait_impl, __is_tuple_impl_trait): New.
(_Tuple_impl(const _Head&)): Constrain.
(_Tuple_impl(_UHead&&)): Likewise.
(_Tuple_impl(_Tuple_impl&&)): Suppress conditionally.
(_Tuple_impl(const _Tuple_impl<_Idx, _UHead>&)): Constrain.
(_Tuple_impl(_Tuple_impl<_Idx, _UHead>&&)): Likewise.
(operator=(const tuple&)): Enable conditionally.
(operator=(tuple&&)): Suppress conditionally.
(operator=(const tuple<_UElements...>&)): Constrain.
(operator=(tuple<_UElements...>&&)): Likewise.
(operator=(const tuple&)): Enable conditionally (2-param tuple).
(operator=(tuple&&)): Suppress conditionally (2-param tuple).
(operator=(const tuple<_U1, _U2>&)): Constrain.
(operator=(tuple<_U1, _U2>&&)): Likewise.
(operator=(const pair<_U1, _U2>&)): Likewise.
(operator=(pair<_U1, _U2>&&)): Likewise.
* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust.
* testsuite/20_util/tuple/tuple_traits.cc: New.
From-SVN: r240709
Kyrylo Tkachov [Mon, 3 Oct 2016 09:28:28 +0000 (09:28 +0000)]
Revert: [RTL ifcvt] Transform (X == CST) ? -CST : Y into (X == CST) ? -X : Y when conditional negation is available
Revert
2016-09-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* ifcvt.c (noce_try_avoid_const_materialization): New function.
(noce_process_if_block): Use it.
* gcc.target/aarch64/ifcvt_avoid_const_materialization_1.c: New test.
From-SVN: r240708
Marek Polacek [Mon, 3 Oct 2016 08:10:43 +0000 (08:10 +0000)]
Core 903
Core 903
* typeck.c (cp_build_binary_op): Pass original operands to
null_ptr_cst_p, not those after the default conversions.
* g++.dg/cpp0x/nullptr37.C: New test.
From-SVN: r240707
Bernd Edlinger [Mon, 3 Oct 2016 08:00:21 +0000 (08:00 +0000)]
invoke.texi: Update -Wint-in-bool-context.
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* doc/invoke.texi: Update -Wint-in-bool-context.
c-family:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-common.c (c_common_truthvalue_conversion): Warn for suspicious
left shift in boolean context.
cp:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* parser.c (cp_parser_condition): Fix a warning.
testsuite:
2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
* c-c++-common/Wint-in-bool-context.c: Update test.
From-SVN: r240706
GCC Administrator [Mon, 3 Oct 2016 00:16:19 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240705
Jakub Jelinek [Sun, 2 Oct 2016 19:32:45 +0000 (21:32 +0200)]
asm3.C (two): Only use register keyword for C++14 and earlier.
* g++.dg/ext/asm3.C (two): Only use register keyword for C++14 and
earlier.
* g++.dg/charset/asm2.c (memmove): Likewise.
* g++.dg/tls/diag-2.C (foo): Expect -Wregister error for C++17.
* g++.dg/tls/diag-4.C (foo): Likewise.
* c-c++-common/vector-subscript-2.c (vf): Change dg-error to
dg-warning, fix up regex.
* g++.old-deja/g++.brendan/warnings4.C: Limit to c++14_down targets.
* g++.old-deja/g++.mike/p700.C: Add -Wno-register.
* g++.old-deja/g++.mike/net31.C: Likewise.
* g++.old-deja/g++.other/regstack.C (foo): Expect -Wregister warning
for C++17.
* g++.old-deja/g++.jason/enum3.C: Add -Wno-register.
* g++.old-deja/g++.eh/ia64-1.C: Likewise.
From-SVN: r240702
Jakub Jelinek [Sun, 2 Oct 2016 19:31:57 +0000 (21:31 +0200)]
dwarf2out.c (output_fde, [...]): Use MAX_ARTIFICIAL_LABEL_BYTES as char array sizes for...
* dwarf2out.c (output_fde, output_call_frame_info,
dwarf2out_do_cfi_startproc, set_indirect_string,
gen_internal_sym, output_die, output_line_info): Use
MAX_ARTIFICIAL_LABEL_BYTES as char array sizes for
ASM_GENERATE_INTERNAL_LABEL output.
From-SVN: r240701
GCC Administrator [Sun, 2 Oct 2016 00:16:22 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240699
Richard Biener [Sat, 1 Oct 2016 14:34:18 +0000 (14:34 +0000)]
re PR middle-end/77798 (465.tonto ICE with trunk with -O2)
2016-10-01 Richard Biener <rguenther@suse.de>
PR middle-end/77798
* genmatch.c (get_operand_type): Add operand position arg
and handle COND_EXPR comparison operand with fixed boolean_type_node.
(expr::gen_transform): Adjust.
(dt_simplify::gen_1): Likewise.
* gfortran.fortran-torture/compile/pr77798.f90: New testcase.
From-SVN: r240696
Andre Vehreschild [Sat, 1 Oct 2016 14:00:57 +0000 (16:00 +0200)]
re PR libfortran/77663 (libgfortran/caf/single.c: three minor problems and a lost token)
gcc/testsuite/ChangeLog:
2016-10-01 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/77663
* gfortran.dg/coarray_send_by_ref_1.f08: New test.
libgfortran/ChangeLog:
2016-10-01 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/77663
* caf/single.c (caf_internal_error): Fix not terminating va-list.
(_gfortran_caf_register): Free memory also when other allocs failed.
(_gfortran_caf_get_by_ref): Fixed style.
(send_by_ref): Token is now stored at the correct position preventing
inaccessible tokens, memory loss and possibly crashes.
From-SVN: r240695
Jakub Jelinek [Sat, 1 Oct 2016 08:41:52 +0000 (10:41 +0200)]
sse.md (<mask_codefor><code><mode>): Add FALLTHRU comments.
* config/i386/sse.md (<mask_codefor><code><mode>): Add FALLTHRU
comments. Simplify asserts, remove unnecessary conditions.
Formatting fixes.
(*<code><mode>3): Likewise.
From-SVN: r240694
GCC Administrator [Sat, 1 Oct 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r240691
Jakub Jelinek [Fri, 30 Sep 2016 23:43:49 +0000 (01:43 +0200)]
re PR c/77490 (bit-not (~) on boolean should be warned about)
PR c/77490
* c-c++-common/Wbool-operation-1.c: Add -Wno-psabi to dg-options.
Add dg-prune-output directive.
From-SVN: r240688
Jerry DeLisle [Fri, 30 Sep 2016 23:19:58 +0000 (23:19 +0000)]
re PR fortran/66643 (Missing compilation error for formatted data transfer without format)
2016-09-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/66643
* io.c (match_dt_unit): Peek check for missing format.
* gfortran.fortran-torture/compile/arrayio.f90: Update test.
* gfortran.fortran-torture/compile/write.f90: Update test.
From-SVN: r240686
Jakub Jelinek [Fri, 30 Sep 2016 22:47:29 +0000 (00:47 +0200)]
* doc/invoke.texi (-Wregister): Document.
From-SVN: r240685
Jakub Jelinek [Fri, 30 Sep 2016 22:46:39 +0000 (00:46 +0200)]
configure.ac: Add target-libffi to target_libraries.
* configure.ac: Add target-libffi to target_libraries.
Readd libgcj target disablings, modified to only target-libffi.
Readd target addition of go to unsupported languages.
* configure: Regenerated.
From-SVN: r240684
Bernd Edlinger [Fri, 30 Sep 2016 18:57:49 +0000 (18:57 +0000)]
configure.ac: Split CHECKING_P into CHECKING_P and ENABLE_EXTRA_CHECKING.
2016-09-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
* configure.ac: Split CHECKING_P into CHECKING_P and
ENABLE_EXTRA_CHECKING.
* configure: Regenerated.
* config.in: Adjust commment of CHECKING_P. Add ENABLE_EXTRA_CHECKING.
* common.opt (flag_checking): Use CHECKING_P and ENABLE_EXTRA_CHECKING.
From-SVN: r240677
Steve Ellcey [Fri, 30 Sep 2016 18:35:41 +0000 (18:35 +0000)]
MAINTAINERS: Update email address.
2016-09-30 Steve Ellcey <sellcey@caviumnetworks.com>
* MAINTAINERS: Update email address.
From-SVN: r240675
Jonathan Wakely [Fri, 30 Sep 2016 18:28:53 +0000 (19:28 +0100)]
libstdc++/77795 Only declare ::gets for C++98 and C++11
PR libstdc++/77795
* acinclude.m4 (GLIBCXX_CHECK_STDIO_PROTO): Use -std=gnu++11 to check
for gets.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/c_global/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Only declare
for C++98 and C++11.
* include/c_std/cstdio [!_GLIBCXX_HAVE_GETS] (gets): Likewise.
* testsuite/27_io/headers/cstdio/functions_neg.cc: New test.
From-SVN: r240672