1. 21 Jun, 2019 24 commits
    • re PR c++/90909 (call devirtualized to pure virtual) · f70d81ba
      /cp
      2019-06-21  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/90909
      	Revert:
      	2019-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/67184
      	PR c++/69445
      	* call.c (build_over_call): Devirtualize when the final overrider
      	comes from the base.
      
      /testsuite
      2019-06-21  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/90909
      	Revert:
      	2019-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/67184
      	PR c++/69445
      	* g++.dg/other/final3.C: New.
      	* g++.dg/other/final4.C: Likewise.
      	* g++.dg/other/final5.C: Likewise.
      
      	* g++.dg/other/final6.C: New.
      
      From-SVN: r272573
      Paolo Carlini committed
    • PR c++/61490 - qualified-id in friend function definition. · 32833537
      	* decl.c (grokdeclarator): Diagnose qualified-id in friend function
      	definition.  Improve location for diagnostics of friend functions.
      
      	* g++.dg/diagnostic/friend2.C: New test.
      	* g++.dg/diagnostic/friend3.C: New test.
      
      From-SVN: r272572
      Marek Polacek committed
    • PR c++/60223 - ICE with T{} in non-deduced context. · fc39d4e1
      	* pt.c (unify): Allow COMPOUND_LITERAL_P in a non-deduced context.
      
      	* g++.dg/cpp0x/nondeduced1.C: New test.
      	* g++.dg/cpp0x/nondeduced2.C: New test.
      	* g++.dg/cpp0x/nondeduced3.C: New test.
      	* g++.dg/cpp0x/nondeduced4.C: New test.
      
      From-SVN: r272571
      Marek Polacek committed
    • PR c++/64235 - missing syntax error with invalid alignas. · 4789c23b
      	* parser.c (cp_parser_std_attribute_spec): Commit to tentative parse
      	if there's a missing close paren.
      
      	* g++.dg/parse/alignas1.C: New test.
      
      From-SVN: r272570
      Marek Polacek committed
    • re PR fortran/67884 (Missing error message on required allocatable attribute) · 9b15893c
      2019-06-21  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/67884
      	* resolve.c (deferred_requirements) : Check only the result variable.
      	(resolve_fl_procedure): Check deferred requirements on functions.
      
      2019-06-21  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/67884
      	* gfortran.dg/dummy_procedure_8.f90: Remove a test that is ...
      	* gfortran.dg/pr67884.f90: ... covered here.  New test.
      
      From-SVN: r272569
      Steven G. Kargl committed
    • PR c++/90490 - fix decltype issues in noexcept-specifier. · 4c60db9a
      	* except.c (build_noexcept_spec): Call
      	instantiate_non_dependent_expr_sfinae before
      	build_converted_constant_expr instead of calling
      	instantiate_non_dependent_expr after it.  Add
      	processing_template_decl_sentinel.
      
      	* g++.dg/cpp0x/noexcept43.C: New test.
      	* g++.dg/cpp0x/noexcept44.C: New test.
      
      From-SVN: r272568
      Marek Polacek committed
    • PR c++/90875 - added -Wswitch-outside-range option · c27d68ee
      From-SVN: r272567
      Matthew Beliveau committed
    • [Darwin, fixincludes] Fix Darwin9/10 math.h issues. · 5a50aed3
      Darwin has had long long functions for some considerable time and these are
      exposed in Darwin8 and Darwin11+ headers.  However, for some reason it was
      elected to hide them behind __STRICT_ANSI__ and __STDC_VERSION__ on Darwin9
      and Darwin10.  This is a problem for G++/libstdc++ that expects the functions
      to be available for strict ansi (-std=c++14, for example) and without
      defining __STDC_VERSION__.  The fix here follows the pattern used in
      Darwin11+ headers where the functions may be explicitly hidden by defining
      __DARWIN_NO_LONG_LONG.
      
      This fixes the tr1 testsuite fails seen on Darwin9 and 10.
      
      2019-06-21  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* inclhack.def: Replace the complex test using __STRICT_ANSI__ and
      	__STDC_VERSION__ with a test using __DARWIN_NO_LONG_LONG.
      	Ensure that the top level math.h uses <> to wrap included headers
      	rather than "".
      	* fixincl.x: Regenerated.
      	* tests/base/architecture/ppc/math.h: Update test to include the
      	__DARWIN_NO_LONG_LONG case.
      
      From-SVN: r272563
      Iain Sandoe committed
    • [Darwin, fixincludes] Fix Darwin14 header issues. · 59a0b1db
      There are two issues with the Darwin14 (SDK) headers in which unguarded
      advanced syntax elements causes any code including these headers to fail.
      
      2019-06-21  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* inclhack.def: Guard __has_attribute and __has_extension in
      	os/base.h.
      	Guard Apple blocks syntax in dispatch/object.h.
      	* fixincl.x: Regenerate.
      	* tests/base/dispatch/object.h: New file.
      	* tests/base/os/base.h: New file.
      
      From-SVN: r272561
      Iain Sandoe committed
    • re PR tree-optimization/90930 (Excessive memory consumption) · 8d5558c5
      2019-06-21  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90930
      	* tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Set visited
      	flag on new stmts to avoid re-processing them.
      
      From-SVN: r272560
      Richard Biener committed
    • PR c++/90875 - added -Wswitch-outside-range option · da9e9b57
      	* doc/invoke.texi (Wswitch-outside-range): Document.
      
      	* c.opt (Wswitch-outside-range): Added new option.
      	* c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
      
      	* c-c++-common/Wswitch-outside-range-1.c: New test.
      	* c-c++-common/Wswitch-outside-range-2.c: New test.
      	* c-c++-common/Wswitch-outside-range-3.c: New test.
      	* c-c++-common/Wswitch-outside-range-4.c: New test.
      
      From-SVN: r272559
      Matthew Beliveau committed
    • re PR fortran/51991 (Wrong error message with variables named "SAVE*") · 69352933
      2019-06-21  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/51991
      	* decl.c (gfc_match_save): If SAVE was not seen, return MATCH_NO
      	instead issuing an error message and returning MATCH_ERROR.
      
      2019-06-21  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/51991
      	gfortran.dg/pr51991.f90
      
      From-SVN: r272556
      Steven G. Kargl committed
    • re PR tree-optimization/90949 (null pointer check removed) · 84338a14
      	PR tree-optimization/90949
      	* tree-ssa-copy.c (fini_copy_prop): Use reset_flow_sensitive_info.
      	* tree-ssanames.c (reset_flow_sensitive_info): Reset non-null state.
      
      	* gcc.c-torture/execute/pr90949.c: New test.
      
      From-SVN: r272555
      Jeff Law committed
    • Fix missing name in ChangeLog · 1296eaf6
      Fix another case in which a name in the commit message wasn't copied to
      the ChangeLog -- sorry!
      
      From-SVN: r272553
      Richard Sandiford committed
    • PR c++/90953 - ICE with -Wmissing-format-attribute. · 3f3d6a6f
      	* c-common.c (check_function_arguments_recurse): Use
      	get_attribute_name.
      	(check_missing_format_attribute): Likewise.
      
      	* g++.dg/warn/miss-format-7.C: New test.
      
      From-SVN: r272552
      Marek Polacek committed
    • Fix missing name in ChangeLog · 390549c8
      It was in the commit message but got dropped from the ChangeLog entry
      due to a scripting bug.
      
      From-SVN: r272551
      Richard Sandiford committed
    • compiler: omit write barrier for assignment to *(convert(&local)) · 28b9598b
          
          Assignments to local variables don't need a write barrier. But
          currently the compiler inserts a write barrier if the LHS is a
          local variable with type converted, as *(convert(&local)). Let
          the compiler recognize this pattern and omit the write barrier.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182541
      
      From-SVN: r272550
      Ian Lance Taylor committed
    • compiler: open code string slice expressions · c9b236e5
          
          Currently a string slice expression is implemented with a runtime
          call __go_string_slice. Change it to open code it, which is more
          efficient, and allows the backend to further optimize it.
          
          Also omit the write barrier for length-only update (i.e.
          s = s[:n]).
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182540
      
      From-SVN: r272549
      Ian Lance Taylor committed
    • re PR debug/90914 (ICE in schedule_generic_params_dies_gen, at dwarf2out.c:27153) · 050e182a
      2019-06-21  Richard Biener  <rguenther@suse.de>
      
      	PR debug/90914
      	* dwarf2out.c (prune_unused_types_walk): Always consider
      	function-local extern declarations as used.
      
      	* g++.dg/debug/pr90914.C: New testcase.
      
      From-SVN: r272547
      Richard Biener committed
    • re PR tree-optimization/90913 (ICE in maybe_gen_insn, at optabs.c:7341 since r272239) · b614fca2
      2019-06-21  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90913
      	* tree-vect-loop-manip.c (vect_loop_versioning): Do not re-use
      	the scalar variant of if-conversion versioning.
      
      	* gfortran.dg/vect/pr90913.f90: New testcase.
      
      From-SVN: r272545
      Richard Biener committed
    • omp-low.c (lower_rec_simd_input_clauses): Add rvar2 argument... · 1612b1fe
      	* omp-low.c (lower_rec_simd_input_clauses): Add rvar2 argument,
      	create another "omp scan inscan exclusive" array if
      	!ctx->scan_inclusive.
      	(lower_rec_input_clauses): Handle exclusive scan inscan reductions.
      	(lower_omp_scan): Likewise.
      	* tree-vectorizer.h (struct _stmt_vec_info): Use 3-bit instead of
      	2-bit bitfield for simd_lane_access_p member.
      	* tree-vect-data-refs.c (vect_analyze_data_refs): Also handle
      	aux == (void *)-4 as simd lane access.
      	* tree-vect-stmts.c (check_scan_store): Handle exclusive scan.  Update
      	comment with permutations to show the canonical permutation order.
      	(vectorizable_scan_store): Handle exclusive scan.
      	(vectorizable_store): Call vectorizable_scan_store even for
      	STMT_VINFO_SIMD_LANE_ACCESS_P > 3.
      
      	* gcc.dg/vect/vect-simd-12.c: New test.
      	* gcc.dg/vect/vect-simd-13.c: New test.
      	* gcc.dg/vect/vect-simd-14.c: New test.
      	* gcc.dg/vect/vect-simd-15.c: New test.
      	* gcc.target/i386/sse2-vect-simd-12.c: New test.
      	* gcc.target/i386/sse2-vect-simd-13.c: New test.
      	* gcc.target/i386/sse2-vect-simd-14.c: New test.
      	* gcc.target/i386/sse2-vect-simd-15.c: New test.
      	* gcc.target/i386/avx2-vect-simd-12.c: New test.
      	* gcc.target/i386/avx2-vect-simd-13.c: New test.
      	* gcc.target/i386/avx2-vect-simd-14.c: New test.
      	* gcc.target/i386/avx2-vect-simd-15.c: New test.
      	* gcc.target/i386/avx512f-vect-simd-12.c: New test.
      	* gcc.target/i386/avx512f-vect-simd-13.c: New test.
      	* gcc.target/i386/avx512f-vect-simd-14.c: New test.
      	* gcc.target/i386/avx512bw-vect-simd-15.c: New test.
      	* g++.dg/vect/simd-6.cc: New test.
      	* g++.dg/vect/simd-7.cc: New test.
      	* g++.dg/vect/simd-8.cc: New test.
      	* g++.dg/vect/simd-9.cc: New test.
      	* c-c++-common/gomp/scan-2.c: Don't expect any diagnostics.
      
      From-SVN: r272544
      Jakub Jelinek committed
    • re PR c++/90950 (OpenMP clause handling rejecting references to incomplete types in templates) · e73fb06d
      	PR c++/90950
      	* semantics.c (finish_omp_clauses): Don't reject references to
      	incomplete types if processing_template_decl.
      
      	* g++.dg/gomp/lastprivate-1.C: New test.
      
      From-SVN: r272543
      Jakub Jelinek committed
    • tree-vect-data-refs.c (vect_find_stmt_data_reference): Handle "omp simd array"… · 080c269b
      tree-vect-data-refs.c (vect_find_stmt_data_reference): Handle "omp simd array" arrays with one byte elements.
      
      	* tree-vect-data-refs.c (vect_find_stmt_data_reference): Handle
      	"omp simd array" arrays with one byte elements.
      
      	* gcc.dg/vect/vect-simd-11.c: New test.
      	* gcc.target/i386/sse2-vect-simd-11.c: New test.
      	* gcc.target/i386/avx2-vect-simd-11.c: New test.
      	* gcc.target/i386/avx512bw-vect-simd-11.c: New test.
      
      From-SVN: r272542
      Jakub Jelinek committed
    • Daily bump. · da10d7c2
      From-SVN: r272538
      GCC Administrator committed
  2. 20 Jun, 2019 16 commits
    • re PR c++/79781 (ICE on valid C++ code with -std=c++14 (in assemble_integer, at varasm.c:2733)) · 7bfe2b4b
      	PR c++/79781
      	* g++.dg/ext/goto1.C: New test.
      
      From-SVN: r272527
      Marek Polacek committed
    • re PR fortran/77632 ([F08] Pointer initialisation does not quite work with arrays) · 2cf4aa79
      2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/77632
      	* /decl.c (variable_decl): Mark a variable that is a target in pointer
      	initialization when in PROGRAM, MODULE, or SUBMODULE scope with an
      	implicit save.
      
      2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/77632
      	* gfortran.dg/pr77632_1.f90: New test.
      
      From-SVN: r272526
      Steven G. Kargl committed
    • re PR c++/68265 (Arbitrary syntactic nonsense silently accepted after 'int… · c35f57c5
      re PR c++/68265 (Arbitrary syntactic nonsense silently accepted after 'int (*){}' until the next close brace)
      
      	PR c++/68265
      	* g++.dg/parse/error62.C: New test.
      
      From-SVN: r272525
      Marek Polacek committed
    • re PR fortran/86587 (Derived-type with attributes BIND(C) and PRIVATE raises an… · 966e7f73
      re PR fortran/86587 (Derived-type with attributes BIND(C) and PRIVATE raises an error but standard accepts it)
      
      2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/86587
      	* symbol.c (verify_bind_c_derived_type): Remove erroneous error
      	checking for BIND(C) and PRIVATE attributes.
      
      2019-06-20  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR fortran/86587
      	* gfortran.dg/pr86587.f90: New test.
      
      From-SVN: r272524
      Steven G. Kargl committed
    • alpha.md (@unaligned_store<mode>): Rename from unaligned_store<mode>. · 145f748f
      	* config/alpha/alpha.md (@unaligned_store<mode>):
      	Rename from unaligned_store<mode>.
      	(@reload_in<mode>_aligned): Rename from reload_in<mode>_aligned.
      	* config/alpha/sync.md (@load_locked_<mode>): Rename
      	from load_locked_<mode>.
      	(@store_conditional_<mode>): Rename from store_conditional_<mode>.
      	(@atomic_compare_and_swap<mode>_1): Rename
      	from atomic_compare_and_swap<mode>_1.
      	(@atomic_exchange<mode>_1): Rename from atomic_exchange<mode>_1.
      	* config/alpha/alpha.c (alpha_expand_mov_nobwx):
      	Use gen_reload_in_aligned and gen_unaligned_store.
      	(emit_load_locked): Remove.
      	(emit_store_conditional): Ditto.
      	(alpha_split_atomic_op): Use gen_load_locked and gen_store_conditional.
      	(alpha_split_compare_and_swap): Ditto.
      	(alpha_expand_compare_and_swap_12): Use gen_atomic_compare_and_swap_1.
      	(alpha_split_compare_and_swap_12): Use gen_load_locked
      	and gen_store_conditional.
      	(alpha_split_atomic_exchange): Ditto.
      	(alpha_expand_atomic_exchange_12): Use gen_atomic_exchange_1.
      	(alpha_split_atomic_exchange_12): Use gen_load_locked
      	and gen_store_conditional.
      
      From-SVN: r272523
      Uros Bizjak committed
    • libfortran/65921: Add forgotten PR number to ChangeLog · 6bd48717
      2019-06-14  Janne Blomqvist  <jb@gcc.gnu.org>
      
              PR fortran/65921
              * runtime/memory.c (SIZE_MAX):Remove macro definition.
              (xmallocarray): Use __builtin_mul_overflow.
      
      From-SVN: r272520
      Janne Blomqvist committed
    • [objective-c/c++, testsuite] Fix stubify tests for -fnext-runtime. · b7a0332c
      These tests were broken in the first place, and more broken following
      the change to drop pic symbol stubs unless the linker needs them.
      
      Fixed to work for x86 as well as powerpc and amended the options to
      force pic symbol stubs on.
      
      gcc/testsuite/
      
      2019-06-20  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks.
      	* obj-c++.dg/stubify-2.mm: Likewise.
      	* objc.dg/stubify-1.m: Likewise.
      	* objc.dg/stubify-2.m: Likewise.
      
      From-SVN: r272518
      Iain Sandoe committed
    • [aarch64] Refactor common errata work-around specs · 91bed1a1
      With the addition of the AArch64 NetBSD support code we now have four
      ports all using and defining the same errata work-around headers.
      That's silly and long-term becomes a maintenance burden.
      
      This patch factors all that code into a single header to eliminate all
      the duplication.
      
      	* config/aarch64/aarch64-errata.h: New file.
      	* config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Delete.
      	(CA53_ERR_843419_SPEC): Delete.
      	(LINK_SPEC): Use AARCH64_ERRATA_LINK_SPEC instead of above.
      	* config/aarch64/aarch64-linux.h: Likewise.
      	* config/aarch64/aarch64-netbsd.h: Likewise.
      	* config/aarch64/aarch64-freebsd.h: Likewise.
      
      From-SVN: r272515
      Richard Earnshaw committed
    • rs6000.md (isa attribute): Add support for for a future processor. · 7ca50393
      2019-06-20  Michael Meissner  <meissner@linux.ibm.com>
      
      	* config/rs6000/rs6000.md (isa attribute): Add support for
      	for a future processor.
      
      From-SVN: r272513
      Michael Meissner committed
    • re PR c++/87512 (Error: the type ‘const auto’ of ‘constexpr’ variable is not literal) · 7772dbe2
      	PR c++/87512
      	* g++.dg/cpp1z/inline-var7.C: New test.
      
      From-SVN: r272512
      Marek Polacek committed
    • i386: Generate standard floating point scalar operation patterns · ac173024
      Standard floating point scalar operation patterns for combiner, which
      preserve the rest of the vector, look like
      
           (vec_merge:V2DF
             (vec_duplicate:V2DF (reg:DF 87))
             (reg/v:V2DF 85 [ x ])
             (const_int 1 [0x1])]))
      
      and
      
           (vec_merge:V2DF
             (vec_duplicate:V2DF
               (op:DF (vec_select:DF (reg/v:V2DF 85 [ x ])
                      (parallel [ (const_int 0 [0])]))
               (reg:DF 87))
             (reg/v:V2DF 85 [ x ])
             (const_int 1 [0x1])]))
      
      This patch adds and generates such standard floating point scalar
      operation patterns for +, -, *, /, > and <.
      
      Tested on x86-64.
      
      gcc/
      
      	PR target/54855
      	* config/i386/i386-expand.c (ix86_expand_vector_set): Generate
      	standard scalar operation pattern for V2DF.
      	* config/i386/sse.md (*<sse>_vm<plusminus_insn><mode>3): New.
      	(*<sse>_vm<multdiv_mnemonic><mode>3): Likewise.
      	(*ieee_<ieee_maxmin><mode>3): Likewise.
      	(vec_setv2df_0): Likewise.
      
      gcc/testsuite/
      
      	PR target/54855
      	* gcc.target/i386/pr54855-1.c: New test.
      	* gcc.target/i386/pr54855-2.c: Likewise.
      	* gcc.target/i386/pr54855-3.c: Likewise.
      	* gcc.target/i386/pr54855-4.c: Likewise.
      	* gcc.target/i386/pr54855-5.c: Likewise.
      	* gcc.target/i386/pr54855-6.c: Likewise.
      	* gcc.target/i386/pr54855-7.c: Likewise.
      	* gcc.target/i386/pr54855-8.c: Likewise.
      	* gcc.target/i386/pr54855-9.c: Likewise.
      	* gcc.target/i386/pr54855-10.c: Likewise.
      
      From-SVN: r272511
      H.J. Lu committed
    • tree-ssa-alias.c (aliasing_component_refs_p): Remove ref2_is_decl parameter; it… · d1a7d8de
      tree-ssa-alias.c (aliasing_component_refs_p): Remove ref2_is_decl parameter; it has no use in gimple memory model.
      
      	* tree-ssa-alias.c (aliasing_component_refs_p): Remove ref2_is_decl
      	parameter; it has no use in gimple memory model.
      	(indirect_ref_may_alias_decl_p): Update.
      
      	* gcc.c-torture/execute/alias-access-path-1.c: New testcase.
      
      From-SVN: r272510
      Jan Hubicka committed
    • Skip libstdc++ debug build in early bootstrap stages · 86f73527
      As mentioned in PR 90770, this is a patch that Debian have been carrying
      for some time. The additional unoptimized copies of libstdc++ libs that
      get built during each stage are never going to be used, so don't bother
      building them.
      
      For a profiled bootstrap this means we won't train the compiler on the
      unoptimized library code with assertions enabled, but that doesn't seem
      like a big problem, as the same code has already been compiled once for
      the main libstdc++ library.
      
      	* acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
      	stage of bootstrap.
      	* configure: Regenerate.
      
      From-SVN: r272509
      Jonathan Wakely committed
    • Qualify calls to __never_valueless in <variant> · d306dee3
      	* include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
      	Qualify calls to __never_valueless.
      
      From-SVN: r272508
      Jonathan Wakely committed
    • re PR c++/89873 (internal compiler error: unexpected expression of kind implicit_conv_expr) · 73b7f10a
      	PR c++/89873
      	* g++.dg/cpp1y/noexcept1.C: New test.
      
      From-SVN: r272507
      Marek Polacek committed