1. 17 Feb, 2020 10 commits
    • libstdc++: Implement "Safe Integral Comparisons" (P0586R2) · 98cf2c26
      	* include/std/type_traits (__is_standard_integer): New helper trait.
      	* include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
      	(cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
      	* include/std/version (__cpp_lib_integer_comparison_functions): Define.
      	* testsuite/20_util/integer_comparisons/1.cc: New test.
      	* testsuite/20_util/integer_comparisons/2.cc: New test.
      	* testsuite/20_util/integer_comparisons/equal.cc: New test.
      	* testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
      	* testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
      	* testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
      	* testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
      	* testsuite/20_util/integer_comparisons/in_range.cc: New test.
      	* testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
      	* testsuite/20_util/integer_comparisons/less.cc: New test.
      	* testsuite/20_util/integer_comparisons/less_equal.cc: New test.
      	* testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
      	* testsuite/20_util/integer_comparisons/less_neg.cc: New test.
      	* testsuite/20_util/integer_comparisons/not_equal.cc: New test.
      	* testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
      Jonathan Wakely committed
    • Fix grammar in error message. · 5e2dae50
      	PR ipa/93760
      	* ipa-devirt.c (odr_types_equivalent_p): Fix grammar.
      	PR ipa/93760
      	* g++.dg/lto/odr-8_1.C: Fix grammar.
      Martin Liska committed
    • Fix double quoting. · c83a55d8
      	PR translation/93755
      	* config/rs6000/rs6000.c (rs6000_option_override_internal):
      	Fix double quotes.
      Martin Liska committed
    • Fix a typo. · 1db97918
      	PR other/93756
      	* config/rx/elf.opt: Fix typo.
      	PR other/93756
      	* src/std/algorithm/iteration.d: Fix typo.
      Martin Liska committed
    • c/86134 avoid errors for unrecognized -Wno- options · abe13e18
      This makes sure to not promote diagnostics about unrecognized -Wno-
      options to errors and make the intent of the diagnostic clearer.
      
      2020-02-17  Richard Biener  <rguenther@suse.de>
      
      	PR c/86134
      	* opts-global.c (print_ignored_options): Use inform and
      	amend message.
      
      	* gcc.dg/pr86134.c: New testcase.
      	* gcc.dg/pr28322-2.c: Adjust.
      Richard Biener committed
    • analyzer: fix ICEs in region_model::get_lvalue_1 [PR 93388] · f76a88eb
      There have been various ICEs with -fanalyzer involving unhandled tree
      codes in region_model::get_lvalue_1; PR analyzer/93388 reports various
      others e.g. for IMAGPART_EXPR, REALPART_EXPR, and VIEW_CONVERT_EXPR seen
      when running the testsuite with -fanalyzer forcibly enabled.
      
      Whilst we could implement lvalue-handling in the region model for every
      tree code, for some of these we're straying far from my primary goal for
      GCC 10 of implementing a double-free checker for C.
      
      This patch implements a fallback for unimplemented tree codes: create a
      dummy region, but mark the new state as being invalid, and stop
      exploring state along this path.  It also implements VIEW_CONVERT_EXPR.
      
      Doing so fixes the ICEs, whilst effectively turning off the analyzer
      along code paths that use such tree codes.  Hopefully this compromise
      is sensible for GCC 10.
      
      gcc/analyzer/ChangeLog:
      	PR analyzer/93388
      	* engine.cc (impl_region_model_context::on_unknown_tree_code):
      	New.
      	(exploded_graph::get_or_create_node): Reject invalid states.
      	* exploded-graph.h
      	(impl_region_model_context::on_unknown_tree_code): New decl.
      	(point_and_state::point_and_state): Assert that the state is
      	valid.
      	* program-state.cc (program_state::program_state): Initialize
      	m_valid to true.
      	(program_state::operator=): Copy m_valid.
      	(program_state::program_state): Likewise for move constructor.
      	(program_state::print): Print m_valid.
      	(program_state::dump_to_pp): Likewise.
      	* program-state.h (program_state::m_valid): New field.
      	* region-model.cc (region_model::get_lvalue_1): Implement the
      	default case by returning a new symbolic region and calling
      	the context's on_unknown_tree_code, rather than issuing an
      	internal_error.  Implement VIEW_CONVERT_EXPR.
      	* region-model.h (region_model_context::on_unknown_tree_code): New
      	vfunc.
      	(test_region_model_context::on_unknown_tree_code): New.
      
      gcc/testsuite/ChangeLog:
      	PR analyzer/93388
      	* gcc.dg/analyzer/torture/20060625-1.c: New test.
      	* gcc.dg/analyzer/torture/pr51628-30.c: New test.
      	* gcc.dg/analyzer/torture/pr59037.c: New test.
      David Malcolm committed
    • analyzer: fix wording for assignment from NULL · 0993ad65
      This patch improves the wording of the state-transition event (1) in
      the -Wanalyzer-null-dereference diagnostic for:
      
      void test (void)
      {
        int *p = NULL;
        *p = 1;
      }
      
      taking the path description from:
      
        ‘test’: events 1-2
          |
          |    5 |   int *p = NULL;
          |      |        ^
          |      |        |
          |      |        (1) assuming ‘p’ is NULL
          |    6 |   *p = 1;
          |      |   ~~~~~~
          |      |      |
          |      |      (2) dereference of NULL ‘p’
          |
      
      to:
      
        ‘test’: events 1-2
          |
          |    5 |   int *p = NULL;
          |      |        ^
          |      |        |
          |      |        (1) ‘p’ is NULL
          |    6 |   *p = 1;
          |      |   ~~~~~~
          |      |      |
          |      |      (2) dereference of NULL ‘p’
          |
      
      since the "assuming" at (1) only makes sense for state transitions
      due to comparisons, not for assignments.
      
      gcc/analyzer/ChangeLog:
      	* sm-malloc.cc (malloc_diagnostic::describe_state_change): For
      	transition to the "null" state, only say "assuming" when
      	transitioning from the "unchecked" state.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/analyzer/malloc-1.c (test_48): New.
      David Malcolm committed
    • analyzer: add diagnostics to output of -fdump-analyzer-exploded-graph · 67098787
      gcc/analyzer/ChangeLog:
      	* diagnostic-manager.h (diagnostic_manager::get_saved_diagnostic):
      	Add const overload.
      	* engine.cc (exploded_node::dump_dot): Dump saved_diagnostics.
      	* exploded-graph.h (exploded_graph::get_diagnostic_manager): Add
      	const overload.
      David Malcolm committed
    • rs6000: mark clobber for registers changed by untpyed_call · a8532e99
      As PR93047 said, __builtin_apply/__builtin_return does not work well with
      -frename-registers.  This is caused by return register(e.g. r3) is used to
      rename another register, before return register is stored to stack.
      This patch fix this issue by emitting clobber for those egisters which
      maybe changed by untyped call.
      
      gcc/
      2020-02-17  Jiufu Guo  <guojiufu@linux.ibm.com>
      
      	PR target/93047
      	* config/rs6000/rs6000.md (untyped_call): Add emit_clobber.
      
      gcc/testsuite
      2020-02-17  Jiufu Guo  <guojiufu@linux.ibm.com>
      
      	PR target/93047
      	* gcc.dg/torture/stackalign/builtin-return-2.c: New test case.
      Jiufu Guo committed
    • Daily bump. · f0a33db5
      GCC Administrator committed
  2. 16 Feb, 2020 5 commits
  3. 15 Feb, 2020 16 commits
    • c++: Fix poor diagnostic for array initializer [PR93710] · eef65c47
      A small improvement for an error in build_user_type_conversion_1:
      instead of
      
      array-init1.C:11:1: error: conversion from ‘long int’ to ‘A’ is ambiguous
         11 | };
            | ^
      
      we will print
      
      array-init1.C:8:3: error: conversion from ‘long int’ to ‘A’ is ambiguous
          8 |   0L,
            |   ^~
      
      2020-02-12  Marek Polacek  <polacek@redhat.com>
      
      	PR c++/93710 - poor diagnostic for array initializer.
      	* call.c (build_user_type_conversion_1): Use cp_expr_loc_or_input_loc
      	for an error call.
      
      	* g++.dg/diagnostic/array-init1.C: New test.
      Marek Polacek committed
    • c++: Add -std=c++20. · fb260504
      It's probably past time for this, but definitely now that we're done with
      the final committee meeting of C++20.  This patch only adds the option and
      adjusts the testsuite to recognize it; more extensive changes can wait for
      the published standard.
      
      gcc/ChangeLog
      2020-02-15  Jason Merrill  <jason@redhat.com>
      
      	* doc/invoke.texi (C Dialect Options): Add -std=c++20.
      
      gcc/c-family/ChangeLog
      2020-02-15  Jason Merrill  <jason@redhat.com>
      
      	* c.opt: Add -std=c++20.
      
      gcc/testsuite/ChangeLog
      2020-02-15  Jason Merrill  <jason@redhat.com>
      
      	* lib/target-supports.exp (check_effective_target_c++2a_only): Also
      	look for -std=*++20.
      	(check_effective_target_concepts): Use check_effective_target_c++2a.
      Jason Merrill committed
    • runtime: on 32-bit systems, limit default GOMAXPROCS to 32 · 17edb331
      Otherwise we can easily run out of stack space for threads.
      
      The user can still override by setting GOMAXPROCS.
      
      Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/219278
      Ian Lance Taylor committed
    • libstdc++: Whitespace and formatting adjustments · 55992626
      libstdc++-v3/ChangeLog:
      
      	* include/bits/ranges_algo.h: Adjust whitespace and formatting.
      	* include/bits/ranges_algobase.h: Likewise.
      	* include/bits/ranges_uninitialized.h: Likewise.
      Patrick Palka committed
    • libstdc++: Convert the ranges algorithm entities into function objects · b40c57bd
      This is the standard way to inhibit ADL for these entities, which is required as
      per [algorithms.requirements] p2 and [specialized.algorithms] p4.  The
      conversion was done mostly mechanically with a custom Vim macro.
      
      libstdc++-v3/ChangeLog:
      
      	* include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
      	binary_search, copy_if, count, count_if, equal_range, find, find_end,
      	find_first_of, find_if, find_if_not, for_each, generate, generate_n,
      	includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
      	is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
      	lower_bound, make_heap, max, max_element, merge, min, min_element,
      	minmax, minmax_element, mismatch, next_permutation, none_of,
      	nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
      	partition_point, pop_heap, prev_permutation, push_heap, remove,
      	remove_copy, remove_copy_if, remove_if, replace, replace_copy,
      	replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
      	search, search_n, set_difference, set_intersection,
      	set_symmetric_difference, set_union, shuffle, sort, sort_heap,
      	stable_partition, stable_sort, swap_ranges, transform, unique,
      	unique_copy, upper_bound): Convert into function objects.
      	* include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
      	fill, move_backward, copy_backward): Likewise.
      	* include/bits/ranges_uninitialized.h (uninitialized_default_construct,
      	uninitialized_default_construct_n, uninitialized_value_construct,
      	uninitialized_value_construct_n, uninitialized_copy,
      	uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
      	uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
      	destroy, destroy_n): Likewise.
      Patrick Palka committed
    • libstdc++: Fold some ranges algo subroutines into their only caller · 90b7eb65
      These subroutines have only a single call site, so it might be best and simplest
      to eliminate them before we convert the algos into function objects.
      
      libstdc++-v3/ChangeLog:
      
      	* include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
      	(ranges::find_end): ... here.
      	(ranges::__lexicographical_compare): Fold into ...
      	(ranges::lexicographical_compare): ... here.
      	* include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
      	(ranges::equal): ... here.
      Patrick Palka committed
    • c++: Add test for PR 68061. · acff02ef
      	PR c++/68061
      	* g++.dg/concepts/attrib1.C: New.
      Jason Merrill committed
    • c++: Fix lambda in atomic constraint. · 1e166191
      find_template_parameters needs to find the mention of T in the lambda.
      Fixing that leaves this as a hard error, which may be surprising but is
      consistent with lambdas in other SFINAE contexts like template argument
      deduction.
      
      gcc/cp/ChangeLog
      2020-02-15  Jason Merrill  <jason@redhat.com>
      
      	PR c++/92556
      	* pt.c (any_template_parm_r): Look into lambda body.
      Jason Merrill committed
    • c++: Remove more dead code. · d7136542
      gcc/cp/ChangeLog
      2020-02-15  Jason Merrill  <jason@redhat.com>
      
      	PR c++/92583
      	* pt.c (any_template_parm_r): Remove CONSTRUCTOR handling.
      Jason Merrill committed
    • c++: Add testcase for PR 90764. · 4d5bb56b
           PR c++/90764
           * g++.dg/cpp1z/class-deduction69.C: New.
      Jason Merrill committed
    • match.pd: Disallow side-effects in GENERIC for non-COND_EXPR to COND_EXPR simplifications [PR93744] · 187dd955
      As the following testcases show (the first one reported, last two
      found by code inspection), we need to disallow side-effects
      in simplifications that turn some unconditional expression into conditional
      one.  From my little understanding of genmatch.c, it is able to
      automatically disallow side effects if the same operand is used multiple
      times in the match pattern, maybe if it is used multiple times in the
      replacement pattern, and if it is used in conditional contexts in the match
      pattern, could it be taught to handle this case too?  If yes, perhaps
      just the first hunk could be usable for 8/9 backports (+ the testcases).
      
      2020-02-15  Jakub Jelinek  <jakub@redhat.com>
      
      	PR tree-optimization/93744
      	* match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0,
      	A - ((A - B) & -(C cmp D)) -> (C cmp D) ? B : A,
      	A + ((B - A) & -(C cmp D)) -> (C cmp D) ? B : A): For GENERIC, make
      	sure @2 in the first and @1 in the other patterns has no side-effects.
      
      	* gcc.c-torture/execute/pr93744-1.c: New test.
      	* gcc.c-torture/execute/pr93744-2.c: New test.
      	* gcc.c-torture/execute/pr93744-3.c: New test.
      Jakub Jelinek committed
    • libstdc++: Update __cpp_lib_erase_if macro (P1115R3) · 55b00d14
      Now that this feature has been approved for C++20 we can define the
      macro to the official value.
      
      	* include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
      	* include/std/deque: Likewise.
      	* include/std/forward_list: Likewise.
      	* include/std/list: Likewise.
      	* include/std/string: Likewise.
      	* include/std/vector: Likewise.
      	* include/std/version: Likewise.
      	* testsuite/23_containers/deque/erasure.cc: Test for new value.
      	* testsuite/23_containers/forward_list/erasure.cc: Likewise.
      	* testsuite/23_containers/list/erasure.cc: Likewise.
      	* testsuite/23_containers/map/erasure.cc: Likewise.
      	* testsuite/23_containers/set/erasure.cc: Likewise.
      	* testsuite/23_containers/unordered_map/erasure.cc: Likewise.
      	* testsuite/23_containers/unordered_set/erasure.cc: Likewise.
      	* testsuite/23_containers/vector/erasure.cc: Likewise.
      Jonathan Wakely committed
    • libstdc++: Implement LWG 3150 for std::uniform_random_bit_generator · 5b1d5885
      	* include/bits/random.h (uniform_random_bit_generator): Require min()
      	and max() to be constant expressions and min() to be less than max().
      	* testsuite/26_numerics/random/concept.cc: Check additional cases.
      	* testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
      Jonathan Wakely committed
    • PR 87488: Add --with-diagnostics-urls configuration option · 458c8d64
      2020-02-15  David Malcolm  <dmalcolm@redhat.com>
      	    Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
      	PR 87488
      	PR other/93168
      	* config.in (DIAGNOSTICS_URLS_DEFAULT): New define.
      	* configure.ac (--with-diagnostics-urls): New configuration
      	option, based on --with-diagnostics-color.
      	(DIAGNOSTICS_URLS_DEFAULT): New define.
      	* config.h: Regenerate.
      	* configure: Regenerate.
      	* diagnostic.c (diagnostic_urls_init): Handle -1 for
      	DIAGNOSTICS_URLS_DEFAULT from configure-time
      	--with-diagnostics-urls=auto-if-env by querying for a GCC_URLS
      	and TERM_URLS environment variable.
      	* diagnostic-url.h (diagnostic_url_format): New enum type.
      	(diagnostic_urls_enabled_p): rename to...
      	(determine_url_format): ... this, and change return type.
      	* diagnostic-color.c (parse_env_vars_for_urls): New helper function.
      	(auto_enable_urls): Disable URLs on xfce4-terminal, gnome-terminal,
      	the linux console, and mingw.
      	(diagnostic_urls_enabled_p): rename to...
      	(determine_url_format): ... this, and adjust.
      	* pretty-print.h (pretty_printer::show_urls): rename to...
      	(pretty_printer::url_format): ... this, and change to enum.
      	* pretty-print.c (pretty_printer::pretty_printer,
      	pp_begin_url, pp_end_url, test_urls): Adjust.
      	* doc/install.texi (--with-diagnostics-urls): Document the new
      	configuration option.
      	(--with-diagnostics-color): Document the existing interaction
      	with GCC_COLORS better.
      	* doc/invoke.texi (-fdiagnostics-urls): Add GCC_URLS and TERM_URLS
      	vindex reference.  Update description of defaults based on the above.
      	(-fdiagnostics-color): Update description of how -fdiagnostics-color
      	interacts with GCC_COLORS.
      Bernd Edlinger committed
    • Document compatibility of aliases and their targets, correct weakref example. · d6ee2e7c
      gcc/ChangeLog:
      
      	* doc/extend.texi (attribute alias): Mention type requirement.
      	(attribute weak): Same.
      	(attribute weakref): Correct invalid example.
      Martin Sebor committed
  4. 14 Feb, 2020 9 commits
    • Fix duplicates for anonymous structures with -fdump-ada-spec · 1d757b09
      This fixes a weakness in the way -fdump-ada-spec builds names for
      anonymous structures in the C/C++ code, resulting in duplicate
      identifiers under specific circumstances.
      
      c-family/
      	* c-ada-spec.c: Include bitmap.h.
      	(dump_ada_double_name): Rename into...
      	(dump_anonymous_type_name): ...this.  Always use the TYPE_UID.
      	(dump_ada_array_type): Adjust to above renaming.  Robustify.
      	(dump_nested_types_1): New function copied from...  Add
      	dumped_types parameter and pass it down to dump_nested_type.
      	(dump_nested_types): ...this.  Remove parent parameter.  Just
      	call dump_nested_types_1 on an automatic bitmap.
      	(dump_nested_type): Add dumped_types parameter.
      	<ARRAY_TYPE>: Do not dump it if already present in dumped_types.
      	Adjust recursive calls and adjust to above renaming.
      	(dump_ada_declaration): Adjust call to dump_nested_types.
      	Tidy up and adjust to above renaming.
      	(dump_ada_specs): Initialize and release bitmap obstack.
      Eric Botcazou committed
    • Update .po files. · c26007ab
      gcc/po:
      	* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
      	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
      	zh_TW.po: Update.
      
      libcpp/po:
      	* be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, fi.po, fr.po,
      	id.po, ja.po, nl.po, pt_BR.po, ru.po, sr.po, sv.po, tr.po, uk.po,
      	vi.po, zh_CN.po, zh_TW.po: Update.
      Joseph Myers committed
    • Fix problematic TLS sequences for the Solaris linker · 81fc5525
      This is an old thinko pertaining to the interaction between TLS
      sequences and delay slot filling: the compiler knows that it cannot
      put instructions with TLS relocations into delay slots with the
      original Sun TLS model, but it tests TARGET_SUN_TLS in this context,
      which depends only on the assembler.  So if the compiler is configured
      with the GNU assembler and the Solaris linker, then TARGET_GNU_TLS is
      set instead and the limitation is not enforced.
      
      	PR target/93704
      	* config/sparc/sparc.c (eligible_for_call_delay): Test HAVE_GNU_LD
      	in conjunction with TARGET_GNU_TLS in early return.
      Eric Botcazou committed
    • rtlanal: optimize costly division in rtx_cost · d8305a03
      There's a costly signed 64-bit division in rtx_cost on x86 as well as
      any other target where UNITS_PER_WORD expands to TARGET_64BIT ?  8 : 4.
      It's also evident that rtx_cost does redundant work for a SET.
      
      Obviously the variable named 'factor' rarely exceeds 1, so in the
      majority of cases it can be computed with a well-predictable branch
      rather than a division.
      
      This patch makes rtx_cost do the division only in case mode is wider
      than UNITS_PER_WORD, and also moves a test for a SET up front to avoid
      redundancy.
      No functional change.
      
      	* rtlanal.c (rtx_cost): Handle a SET up front. Avoid division if
      	the mode is not wider than UNITS_PER_WORD.
      Alexander Monakov committed
    • c++: Fix thinko in enum_min_precision [PR61414] · 519a33f9
      When backporting the PR61414 fix to 8.4, I've noticed that the caching
      of prec is actually broken, as it would fail to actually store the computed
      precision into the hash_map's value and so next time we'd think the enum needs
      0 bits.
      
      2020-02-14  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/61414
      	* class.c (enum_min_precision): Change prec type from int to int &.
      
      	* g++.dg/cpp0x/enum39.C: New test.
      Jakub Jelinek committed
    • sra: Avoid verification failure (PR 93516) · 515dd042
      get_ref_base_and_extent can return different sizes for COMPONENT_REFs
      and DECLs of the same type, with the latter including (more?)  padding.
      When in the IL there is an assignment between such a COMPONENT_REF and a
      DECL, SRA will try to propagate the access from the former as a child of
      the latter, creating an artificial reference that does not match the
      access's declared size, which triggers a verifier assert.
      
      Fixed by teaching the propagation functions about this special situation
      so that they don't do it.  The condition is the same that
      build_user_friendly_ref_for_offset uses so the artificial reference
      causing the verifier is guaranteed not to be created.
      
      2020-02-14  Martin Jambor  <mjambor@suse.cz>
      
      	PR tree-optimization/93516
      	* tree-sra.c (propagate_subaccesses_from_rhs): Do not create
      	access of the same type as the parent.
      	(propagate_subaccesses_from_lhs): Likewise.
      
      	gcc/testsuite/
      	* g++.dg/tree-ssa/pr93516.C: New test.
      Martin Jambor committed
    • Intrinsic macro of vpshr* and vpshl* lack a closing parenthesis which would cause failure in O0. · cf1db5c9
      2020-02-14 Hongtao Liu  <hongtao.liu@intel.com>
      
      gcc/
      	PR target/93724
      	* config/i386/avx512vbmi2intrin.h
      	(_mm512_shrdi_epi16, _mm512_mask_shrdi_epi16,
      	_mm512_maskz_shrdi_epi16, _mm512_shrdi_epi32,
      	_mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32,
      	_m512_shrdi_epi64, _m512_mask_shrdi_epi64,
      	_m512_maskz_shrdi_epi64, _mm512_shldi_epi16,
      	_mm512_mask_shldi_epi16, _mm512_maskz_shldi_epi16,
      	_mm512_shldi_epi32, _mm512_mask_shldi_epi32,
      	_mm512_maskz_shldi_epi32, _mm512_shldi_epi64,
      	_mm512_mask_shldi_epi64, _mm512_maskz_shldi_epi64): Fix typo
      	of lacking a closing parenthesis.
      	* config/i386/avx512vbmi2vlintrin.h
      	(_mm256_shrdi_epi16, _mm256_mask_shrdi_epi16,
      	_mm256_maskz_shrdi_epi16, _mm256_shrdi_epi32,
      	_mm256_mask_shrdi_epi32, _mm256_maskz_shrdi_epi32,
      	_m256_shrdi_epi64, _m256_mask_shrdi_epi64,
      	_m256_maskz_shrdi_epi64, _mm256_shldi_epi16,
      	_mm256_mask_shldi_epi16, _mm256_maskz_shldi_epi16,
      	_mm256_shldi_epi32, _mm256_mask_shldi_epi32,
      	_mm256_maskz_shldi_epi32, _mm256_shldi_epi64,
      	_mm256_mask_shldi_epi64, _mm256_maskz_shldi_epi64,
      	_mm_shrdi_epi16, _mm_mask_shrdi_epi16,
      	_mm_maskz_shrdi_epi16, _mm_shrdi_epi32,
      	_mm_mask_shrdi_epi32, _mm_maskz_shrdi_epi32,
      	_mm_shrdi_epi64, _mm_mask_shrdi_epi64,
      	_m_maskz_shrdi_epi64, _mm_shldi_epi16,
      	_mm_mask_shldi_epi16, _mm_maskz_shldi_epi16,
      	_mm_shldi_epi32, _mm_mask_shldi_epi32,
      	_mm_maskz_shldi_epi32, _mm_shldi_epi64,
      	_mm_mask_shldi_epi64, _mm_maskz_shldi_epi64): Ditto.
      
      gcc/testsuite/
      	* gcc.target/i386/avx512vbmi2-vpshld-1.c: New test.
      	* gcc.target/i386/avx512vbmi2-vpshrd-1.c: Ditto.
      	* gcc.target/i386/sse-12.c: Add -mavx512vbmi2.
      	* gcc.target/i386/sse-13.c: Ditto.
      	* gcc.target/i386/sse-14.c: Add -mavx512vbmi2 and tests.
      	* gcc.target/i386/sse-22.c: Ditto.
      liuhongt committed
    • c++: Partially implement P1042R1: __VA_OPT__ wording clarifications [PR92319] · e235031d
      I've noticed we claim in cxx-status.html that we implement P1042R1,
      but it seems we don't implement any of the changes from there.
      The following patch implements just the change that __VA_OPT__ determines
      whether to expand to nothing or the enclosed tokens no longer based on
      whether there were any tokens passed to __VA_ARGS__, but whether __VA_ARGS__
      expands to any tokens (from testing apparently it has to be non-CPP_PADDING
      tokens).
      
      I'm afraid I'm completely lost about the padding preservation/removal
      changes that are also in the paper, so haven't touched that part.
      
      2020-02-14  Jakub Jelinek  <jakub@redhat.com>
      
      	Partially implement P1042R1: __VA_OPT__ wording clarifications
      	PR preprocessor/92319
      	* macro.c (expand_arg): Move declarations before vaopt_state
      	definition.
      	(class vaopt_state): Move enum update_type definition earlier.  Remove
      	m_allowed member, add m_arg and m_update members.
      	(vaopt_state::vaopt_state): Change last argument from bool any_args
      	to macro_arg *arg, initialize m_arg and m_update instead of m_allowed.
      	(vaopt_state::update): When bumping m_state from 1 to 2 and m_update
      	is ERROR, determine if __VA_ARGS__ expansion has any non-CPP_PADDING
      	tokens and set m_update to INCLUDE if it has any, DROP otherwise.
      	Return m_update instead of m_allowed ? INCLUDE : DROP in m_state >= 2.
      	(replace_args, create_iso_definition): Adjust last argument to
      	vaopt_state ctor.
      
      	* c-c++-common/cpp/va-opt-4.c: New test.
      Jakub Jelinek committed