Skip to content
Snippets Groups Projects
  1. Nov 09, 2020
    • Jonathan Wakely's avatar
      config-ml.in: Suppress output from multi-do recipes · 8a713174
      Jonathan Wakely authored
      The FIXME comments saying "Leave out until this is tested a bit more"
      are from 1997. I think they've been sufficiently tested.
      
      ChangeLog:
      
      	* config-ml.in (multi-do, multi-clean): Add @ to silence recipes.
      	Remove FIXME comments.
      8a713174
    • Richard Biener's avatar
      tree-optimization/97753 - fix SLP induction vect · f5761c31
      Richard Biener authored
      This fixes updating of the step vectors when filling up to group_size.
      
      2020-11-09  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/97753
      	* tree-vect-loop.c (vectorizable_induction): Fill vec_steps
      	when CSEing inside the group.
      
      	* gcc.dg/vect/pr97753.c: New testcase.
      f5761c31
    • Richard Biener's avatar
      tree-optimization/97746 - fix order of mask precision computes · ec735bc7
      Richard Biener authored
      This fixes the order of walking PHIs and stmts for BB mask
      precision compute.
      
      2020-11-09  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/97746
      	* tree-vect-patterns.c (vect_determine_precisions): First walk PHIs.
      
      	* gcc.dg/vect/bb-slp-pr97746.c: New testcase.
      ec735bc7
    • Nathan Sidwell's avatar
      c++: ADL refactor · e38cd64a
      Nathan Sidwell authored
      This refactors the ADL lookup.  It just so happens the refactoring
      makes dropping modules in simpler :) We break apart the namespace and
      class fn processing, and move scope iteration to an outer function.
      It'll also become possible to find the same enum in multiple place, so
      we need to handle that idempotently.
      
      	gcc/cp/
      	* cp-tree.h (LOOKUP_FOUND_P): Add ENUMERAL_TYPE.
      	* name-lookup.c (class name_lookup): Add comments.
      	(name_lookup::adl_namespace_only): Replace with ...
      	(name_lookup::adl_class_fns): ... this and ...
      	(name_lookup::adl_namespace_fns): ... this.
      	(name_lookup::adl_namespace): Deal with inline nests here.
      	(name_lookup::adl_class): Complete the type here.
      	(name_lookup::adl_type): Call broken-out enum ..
      	(name_lookup::adl_enum): New.  No need to call the namespace adl
      	if it is class-scope.
      	(name_lookup::search_adl): Iterate over collected scopes here.
      e38cd64a
    • Nathan Sidwell's avatar
      c++: Consistently expose singleton overloads · 4081596e
      Nathan Sidwell authored
      This is a patch from my name-lookup overhaul.  I noticed the parser
      and one path in name-lookup looked through an overload of a single
      known decl.  It seems more consistent to do that in both paths through
      name-lookup, and not in the parser itself.
      
      	gcc/cp/
      	* name-lookup.c (lookup_qualified_name): Expose an overload of a
      	singleton with known type.
      	(lookup_name_1): Just check the overload's type to expose it.
      	* parser.c (cp_parser_lookup_name): Do not do that check here.
      4081596e
    • Richard Biener's avatar
      CSE VN_INFO calls in PRE and VN · ede8cfb8
      Richard Biener authored
      The following CSEs VN_INFO calls which nowadays are hashtable queries.
      
      2020-11-09  Richard Biener  <rguenther@suse.de>
      
      	* tree-ssa-pre.c (get_representative_for): CSE VN_INFO calls.
      	(create_expression_by_pieces): Likewise.
      	(insert_into_preds_of_block): Likewsie.
      	(do_pre_regular_insertion): Likewsie.
      	* tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_insert):
      	Likewise.
      	(eliminate_dom_walker::eliminate_stmt): Likewise.
      ede8cfb8
    • Richard Biener's avatar
      Use a per-edge PRE PHI translation cache · 17c25a45
      Richard Biener authored
      This changes the phi translation cache to be per edge which
      pushes it off the profiling radar.  For larger testcases the
      combined hashtable causes a load of cache misses and making it
      per edge allows to shrink the entry further.
      
      2020-11-09  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/97765
      	* tree-ssa-pre.c (bb_bitmap_sets::phi_translate_table): Add.
      	(PHI_TRANS_TABLE): New macro.
      	(phi_translate_table): Remove.
      	(expr_pred_trans_d::pred): Remove.
      	(expr_pred_trans_d::hash): Simplify.
      	(expr_pred_trans_d::equal): Likewise.
      	(phi_trans_add): Adjust.
      	(phi_translate): Likewise.  Remove hash-table expansion
      	detection and optimization.
      	(phi_translate_set): Allocate PHI_TRANS_TABLE here.
      	(init_pre): Adjsust.
      	(fini_pre): Free PHI_TRANS_TABLE.
      17c25a45
    • Andrea Corallo's avatar
      arm: [testcase] Better narrow some bfloat16 testcase · 2d4fa1f7
      Andrea Corallo authored
      2020-11-05  Andrea Corallo  <andrea.corallo@arm.com>
      
      	* gcc.target/arm/simd/vld1_lane_bf16_1.c: Require target to
      	support and add -mfloat-abi=hard flag.
      	* gcc.target/arm/simd/vld1_lane_bf16_indices_1.c: Likewise.
      	* gcc.target/arm/simd/vld1q_lane_bf16_indices_1.c: Likewise.
      	* gcc.target/arm/simd/vst1_lane_bf16_1.c: Likewise.
      	* gcc.target/arm/simd/vst1_lane_bf16_indices_1.c: Likewise.
      	* gcc.target/arm/simd/vstq1_lane_bf16_indices_1.c: Likewise.
      2d4fa1f7
    • Cui,Lili's avatar
      Enable MOVDIRI, MOVDIR64B, CLDEMOTE and WAITPKG for march=tremont · dc7e8839
      Cui,Lili authored
      1. Enable MOVDIRI, MOVDIR64B, CLDEMOTE and WAITPKG for march=tremont
      2. Move PREFETCHW from march=broadwell to march=silvermont.
      3. Add PREFETCHWT1 to march=knl
      
      gcc/ChangeLog:
      
      2020-11-09  Lili Cui  <lili.cui@intel.com>
      
      	PR target/97685
      	* config/i386/i386.h:
      	(PTA_BROADWELL): Delete PTA_PRFCHW.
      	(PTA_SILVERMONT): Add PTA_PRFCHW.
      	(PTA_KNL): Add PTA_PREFETCHWT1.
      	(PTA_TREMONT): Add PTA_MOVDIRI, PTA_MOVDIR64B, PTA_CLDEMOTE and PTA_WAITPKG.
      	* doc/invoke.texi: Delete PREFETCHW for broadwell, skylake, knl, knm,
      	skylake-avx512, cannonlake, icelake-client, icelake-server, cascadelake,
      	cooperlake, tigerlake and sapphirerapids.
      	Add PREFETCHW for silvermont, goldmont, goldmont-plus and tremont.
      	Add XSAVEC and XSAVES for goldmont, goldmont-plus and tremont.
      	Add MOVDIRI, MOVDIR64B, CLDEMOTE and WAITPKG for tremont.
      	Add KEYLOCKER and HREST for alderlake.
      	Add AMX-BF16, AMX-TILE, AMX-INT8 and UINTR for sapphirerapids.
      	Add KEYLOCKER for tigerlake.
      dc7e8839
    • Christophe Lyon's avatar
      libiberty/pex-win32.c: Initialize orig_err · 946b73c1
      Christophe Lyon authored
      Initializing orig_err avoids a warning: "may be used uninitialized".
      See 97108.
      
      2020-09-14  Torbjörn SVENSSON <torbjorn.svensson@st.com>
      	Christophe Lyon  <christophe.lyon@linaro.org>
      
      	libiberty/
      	* pex-win32.c (pex_win32_exec_child): Initialize orig_err.
      946b73c1
    • Kewen Lin's avatar
      ira: Recompute regstat as max_regno changes [PR97705] · ce4ae1f4
      Kewen Lin authored
      As PR97705 shows, the commit r11-4637 caused some dumping
      comparison difference error on pass ira.  It exposed one
      issue about the newly introduced function remove_scratches,
      which can increase the largest pseudo reg number if it
      succeeds, later some function will use the max_reg_num()
      to get the latest max_regno, when iterating the numbers
      we can access some data structures which are allocated as
      the previous max_regno, some out of array bound accesses
      can occur, the failure can be random since the values
      beyond the array could be random.
      
      This patch is to free/reinit/recompute the relevant data
      structures that is regstat_n_sets_and_refs and reg_info_p
      to ensure we won't access beyond some array bounds.
      
      Bootstrapped/regtested on powerpc64le-linux-gnu P9 and
      powerpc64-linux-gnu P8.
      
      gcc/ChangeLog:
      
      	PR rtl-optimization/97705
      	* ira.c (ira): Refactor some regstat free/init/compute invocation
      	into lambda function regstat_recompute_for_max_regno, and call it
      	when max_regno increases as remove_scratches succeeds.
      ce4ae1f4
    • GCC Administrator's avatar
      Daily bump. · fb95de7a
      GCC Administrator authored
      fb95de7a
  2. Nov 08, 2020
    • Iain Sandoe's avatar
      Objective-C/C++ : Handle parsing @property 'class' attribute. · b642fca1
      Iain Sandoe authored
      This attribute states that a property is one manipulated by class
      methods (it requires a static variable and the setter and getter
      must be provided explicitly, they cannot be @synthesized).
      
      gcc/c-family/ChangeLog:
      
      	* c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
      	of keywords accepted in @property attribute contexts.
      	* c-objc.h (enum objc_property_attribute_group): Add
      	OBJC_PROPATTR_GROUP_CLASS.
      	(enum objc_property_attribute_kind): Add
      	OBJC_PROPERTY_ATTR_CLASS.
      
      gcc/cp/ChangeLog:
      
      	* parser.c (cp_parser_objc_at_property_declaration): Handle
      	class keywords in @property attribute context.
      
      gcc/objc/ChangeLog:
      
      	* objc-act.c (objc_prop_attr_kind_for_rid): Handle class
      	attribute.
      	(objc_add_property_declaration): Likewise.
      	* objc-act.h (PROPERTY_CLASS): Record class attribute state.
      
      gcc/testsuite/ChangeLog:
      
      	* obj-c++.dg/property/at-property-4.mm: Test handling class
      	attributes.
      	* objc.dg/property/at-property-4.m: Likewise.
      b642fca1
    • Iain Sandoe's avatar
      testsuite, Darwin, PPC : Skip zero scratch regs tests. · 49393e26
      Iain Sandoe authored
      XFAIL-ing these is not sufficient, unfortunately, we need to
      skip them completely.
      
      gcc/testsuite/ChangeLog:
      
      	* c-c++-common/zero-scratch-regs-10.c: Skip for powerpc
      	Darwin.
      	* c-c++-common/zero-scratch-regs-11.c: Likewise.
      	* c-c++-common/zero-scratch-regs-8.c: Likewise.
      	* c-c++-common/zero-scratch-regs-9.c: Likewise.
      49393e26
    • Iain Sandoe's avatar
      testsuite, Darwin, X86 : Add target requires native tls to test. · 94b74e7a
      Iain Sandoe authored
      The builtin_thread_pointer test does not work for emulated TLS.
      Add a target requires to cover this.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/i386/builtin_thread_pointer.c: Require native TLS.
      94b74e7a
    • David Edelsohn's avatar
      rs6000: Fix bootstrap after r11-4793. · 8e620386
      David Edelsohn authored
      The patch omitted a change for rs6000.c, fixed thus.
      
      gcc/ChangeLog:
      
      	* config/rs6000/rs6000.c (rs6000_mangle_decl_assembler_name): Change
      	DECL_IS_BUILTIN -> DECL_IS_UNDECLARED_BUILTIN.
      8e620386
    • GCC Administrator's avatar
      Daily bump. · 2da7ee05
      GCC Administrator authored
      2da7ee05
  3. Nov 07, 2020
    • Marek Polacek's avatar
      testsuite: Fix Wimplicit-fallthrough-20.c. · bd3cefe4
      Marek Polacek authored
      The r11-4813 patch removed "ignored" from the dg-warnings in this test,
      causing this test to fail when compiled as C++.
      
      gcc/testsuite/ChangeLog:
      
      	* c-c++-common/Wimplicit-fallthrough-20.c: Adjust dg-warning.
      bd3cefe4
    • Lewis Hyatt's avatar
      libcpp: Update cpp_wcwidth() to Unicode 13.0.0 · 497c9f8d
      Lewis Hyatt authored
      generated_cpp_wcwidth.h was regenerated using Unicode 13.0.0 data files. No
      material changes to the parsing scripts (either GCC- or glibc-sourced) were
      necessary; glibc's utf8_gen.py was tweaked slightly by glibc and matched here.
      
      contrib/ChangeLog:
      
      	* unicode/EastAsianWidth.txt: Update to Unicode 13.0.0.
      	* unicode/PropList.txt: Likewise.
      	* unicode/README: Likewise.
      	* unicode/UnicodeData.txt: Likewise.
      	* unicode/from_glibc/unicode_utils.py: Update to latest glibc version.
      	* unicode/from_glibc/utf8_gen.py: Likewise.
      
      libcpp/ChangeLog:
      
      	* generated_cpp_wcwidth.h: Regenerated from Unicode 13.0.0 data.
      497c9f8d
    • Iain Sandoe's avatar
      Objective-C/C++ (C-family) : Add missing 'atomic' property attribute. · 6f762481
      Iain Sandoe authored
      This is the default, but it is still legal in user code and therefore
      we should handle it in parsing.  Fix whitespace issues in the lines
      affected.
      
      gcc/c-family/ChangeLog:
      
      	* c-common.c (c_common_reswords): Add 'atomic' property
      	attribute.
      	* c-common.h (enum rid): Add RID_PROPATOMIC for atomic
      	property attributes.
      
      gcc/objc/ChangeLog:
      
      	* objc-act.c (objc_prop_attr_kind_for_rid): Handle
      	RID_PROPATOMIC.
      
      gcc/testsuite/ChangeLog:
      
      	* obj-c++.dg/property/at-property-4.mm: Test atomic property
      	attribute.
      	* objc.dg/property/at-property-4.m: Likewise.
      6f762481
    • Iain Sandoe's avatar
      Objective-C : Implement NSObject attribute. · 0c30bf43
      Iain Sandoe authored
      This attribute allows pointers to be marked as pointers to
      an NSObject-compatible object.  This allows for additional
      checking of assignment etc. when refering to pointers to
      opaque types.
      
      gcc/c-family/ChangeLog:
      
      	* c-attribs.c (handle_nsobject_attribute): New.
      	* c.opt: Add WNSObject-attribute.
      
      gcc/objc/ChangeLog:
      
      	* objc-act.c (objc_compare_types): Handle NSObject type
      	attributes.
      	(objc_type_valid_for_messaging): Likewise.
      
      gcc/testsuite/ChangeLog:
      
      	* obj-c++.dg/attributes/nsobject-01.mm: New test.
      	* objc.dg/attributes/nsobject-01.m: New test.
      0c30bf43
    • Eric Botcazou's avatar
      Fix Ada build failure for the SuSE PowerPC64/Linux compiler · df784801
      Eric Botcazou authored
      gcc/ada/ChangeLog:
      	* gcc-interface/Makefile.in: Force target_cpu to powerpc if the
      	nominal target is powerpc64-suse-linux.
      df784801
    • Iain Sandoe's avatar
      testsuite, Darwin, PPC : XFAIL zero-scratch-regs tests. · 13193e40
      Iain Sandoe authored
      These tests fail because of an unimplemented 'sorry'; there
      is no plan to implement this in the short term, so XFAILing
      the tests to reduce noise.
      
      gcc/testsuite/ChangeLog:
      
      	* c-c++-common/zero-scratch-regs-10.c: XFAIL for
      	powerpc-darwin.
      	* c-c++-common/zero-scratch-regs-11.c: Likewise.
      	* c-c++-common/zero-scratch-regs-8.c: Likewise.
      	* c-c++-common/zero-scratch-regs-9.c: Likewise.
      13193e40
    • Iain Sandoe's avatar
      Ada : Fix bootstrap after r11-4793. · b2a28b8b
      Iain Sandoe authored
      The patch omitted a change for Ada, fixed thus.
      
      gcc/ada/ChangeLog:
      
      	* gcc-interface/misc.c (gnat_printable_name): Change
      	DECL_IS_BUILTIN -> DECL_IS_UNDECLARED_BUILTIN.
      b2a28b8b
    • Martin Uecker's avatar
      C Parser: Implement mixing of labels and code. · 8b7a9a24
      Martin Uecker authored
      Implement mixing of labels and code as adopted for C2X
      and process some std-attributes on labels.
      
      2020-11-06  Martin Uecker  <muecker@gwdg.de>
      
      gcc/
      	* doc/extend.texi: Document mixing labels and code.
      	* doc/invoke.texi: Likewise.
      
      gcc/c/
      	* c-parser.c (c_parser_label): Implement mixing of labels and code.
      	(c_parser_all_labels): Likewise.
      
      gcc/testsuite/
      	* c-c++-common/attr-fallthrough-2.c: Update compiler flags.
      	* c-c++-common/Wimplicit-fallthrough-20.c: Adapt test.
      	* gcc.dg/20031223-1.c: Update compiler flags and adapt test.
      	* gcc.dg/c11-labels-1.c: New test.
      	* gcc.dg/c11-labels-2.c: New test.
      	* gcc.dg/c11-labels-3.c: New test.
      	* gcc.dg/c2x-attr-syntax-3.c: Adapt test.
      	* gcc.dg/c2x-labels-1.c: New test.
      	* gcc.dg/c2x-labels-2.c: New test.
      	* gcc.dg/c2x-labels-3.c: New test.
      	* gcc.dg/decl-9.c: Update compiler flags and add error.
      	* gcc.dg/gomp/barrier-2.c: Update compiler flags and add warning.
      	* gcc.dg/gomp/declare-simd-5.c: Update compiler flags and adapt test.
      	* gcc.dg/gomp/declare-variant-2.c: Update compiler flags and add error.
      	* gcc.dg/label-compound-stmt-1.c: Update compiler flags.
      	* gcc.dg/parse-decl-after-label.c: Update compiler flags.
      8b7a9a24
    • Liu Hao's avatar
      libsupc++: Make the destructor parameter to `__cxa_thread_atexit()` use the... · 7fc0f78c
      Liu Hao authored
      libsupc++: Make the destructor parameter to `__cxa_thread_atexit()` use the `__thiscall` calling convention for i686-w64-mingw32
      
      The mingw-w64 implementations of `__cxa_thread_atexit()` and `__cxa_atexit()` have been
      using `__thiscall` since two years ago. Using the default calling convention (which is
      `__cdecl`) causes crashes as explained in PR83562.
      
      Calling conventions have no effect on x86_64-w64-mingw32.
      
      Reference: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83562
      Reference: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/crt/cxa_thread_atexit.c
      Reference: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/f3e0fbb40cbc9f8821db8bd8a0c4dae8ff671e9f/
      Reference: https://github.com/msys2/MINGW-packages/issues/7071
      
      
      Signed-off-by: default avatarLiu Hao <lh_mouse@126.com>
      
          2020-10-08  Liu Hao  <lh_mouse@126.com>
      
      	libstdc++-v3:
      	* libsupc++/cxxabi.h: (__cxa_atexit): mark with _GLIBCXX_CDTOR_CALLABI
      	(__cxa_thread_atexit): ditto
      	* libsupc++/atexit_thread.cc: (__cxa_atexit): mark with
      	_GLIBCXX_CDTOR_CALLABI
      	(__cxa_thread_atexit): ditto
      	(elt): ditto
      7fc0f78c
    • GCC Administrator's avatar
      Daily bump. · 44cab2d8
      GCC Administrator authored
      44cab2d8
  4. Nov 06, 2020
    • Segher Boessenkool's avatar
      rs6000: Don't use operands[] for temporaries in define_expand · 1a0f964e
      Segher Boessenkool authored
      In ac001f5c Alan fixed my thinko using operands that do not refer
      to anything mentioned in the RTL pattern.  Instead, it just uses fresh
      new local rtxes for those.
      
      This patch takes that a tiny bit further: it uses local rtx for all
      temporaries used in the expanders.  As a bonus that simplifies the code
      a tiny bit as well.
      
      2020-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
      
      	* config/rs6000/rs6000.md (@tablejump<mode>_normal): Don't abuse
      	operands[].
      	(@tablejump<mode>_nospec): Ditto.
      1a0f964e
    • Martin Uecker's avatar
      MAINTAINERS: Update my email address. · 4959bedc
      Martin Uecker authored
      2020-11-07  Martin Uecker  <muecker@gwdg.de>
      
      	* MAINTAINERS: Update my email address.
      4959bedc
    • Peter Bergner's avatar
      rs6000: Use the correct minimized testcase · bd7ed097
      Peter Bergner authored
      Use the correct minimized test case source rather than the large test
      source.
      
      gcc/testsuite/
      	* gcc.target/powerpc/pr64505.c: Run everywhere.  Use correct minimized
      	test case.
      bd7ed097
    • Peter Bergner's avatar
      rs6000: Fix default alignment ABI break caused by MMA base support · a37b5bcf
      Peter Bergner authored
      As part of the MMA base support, we incremented BIGGEST_ALIGNMENT in
      order to align the __vector_pair and __vector_quad types to 256 and 512
      bytes respectively.  This had the unintended effect of changing the
      default alignment used by __attribute__ ((__aligned__)) which causes
      an ABI break because of some dodgy code in GLIBC's struct pthread.
      The fix is to revert the BIGGEST_ALIGNMENT change and to force the
      alignment on the type itself rather than the mode used by the type.
      
      2020-11-06  Peter Bergner  <bergner@linux.ibm.com>
      
      gcc/
      	* config/rs6000/rs6000.h (BIGGEST_ALIGNMENT): Revert previous commit
      	so as not to break the ABI.
      	* config/rs6000/rs6000-call.c (rs6000_init_builtins): Set the ABI
      	mandated alignment for __vector_pair and __vector_quad types.
      
      gcc/testsuite/
      	* gcc.target/powerpc/mma-alignment.c: New test.
      a37b5bcf
    • Jeff Law's avatar
      Fix stack pointer handling in ms_hook_prologue functions for i386 target. · 659ba632
      Jeff Law authored
      gcc/
      	PR target/91489
      	* config/i386/i386.md (simple_return): Also check
      	for ms_hook_prologue function attribute.
      	* config/i386/i386.c (ix86_can_use_return_insn_p):
      	Also check for ms_hook_prologue function attribute.
      	* config/i386/i386-protos.h (ix86_function_ms_hook_prologue): Declare.
      
      gcc/testsuite
      	PR target/91489
      	* gcc.target/i386/ms_hook_prologue.c: Expand testcase
      	to reproduce PR target/91489 issue.
      659ba632
    • Segher Boessenkool's avatar
      rs6000: Fix TARGET_POWERPC64 vs. TARGET_64BIT confusion · e5502ae7
      Segher Boessenkool authored
      I gave Ke Wen bad advice, luckily David corrected me: it is true that we
      cannot use TARGET_POWERPC64 on many 32-bit OSes, since either the kernel
      or userland does not save the top half of the 64-bit integer registers,
      but we do not have to care about that in separate patterns or related
      code.  The flag is automatically not enabled by default on targets that
      do not handle this correctly.
      
      This patch fixes it.
      
      Segher
      
      2020-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
      
      	PR target/96933
      	* config/rs6000/rs6000.c (rs6000_expand_vector_init): Use
      	TARGET_POWERPC64 instead of TARGET_64BIT.
      e5502ae7
    • Joseph Myers's avatar
      builtins: Add DFP signaling NaN built-in functions · 6c8e4f4d
      Joseph Myers authored
      Add built-in functions __builtin_nansd32, __builtin_nansd64 and
      __builtin_nansd128 to return signaling NaNs of decimal floating-point
      types, analogous to the functions already present for binary
      floating-point types.
      
      This patch, independent of
      <https://gcc.gnu.org/pipermail/gcc-patches/2020-October/557136.html>
      (pending review), is in preparation for adding the <float.h> macros
      for such signaling NaNs that are in C2x, analogous to the macros for
      other types that are in that patch.
      
      Bootstrapped with no regressions for x86_64-pc-linux-gnu.  Also ran
      the new tests for powerpc64le-linux-gnu to confirm they do work in the
      case (hardware DFP) where floating-point exceptions are supported for
      DFP.
      
      gcc/
      2020-11-06  Joseph Myers  <joseph@codesourcery.com>
      
      	* builtins.def (BUILT_IN_NANSD32, BUILT_IN_NANSD64)
      	(BUILT_IN_NANSD128): New built-in functions.
      	* fold-const-call.c (fold_const_call): Handle the new built-in
      	functions.
      	* doc/extend.texi (__builtin_nansd32, __builtin_nansd64)
      	(__builtin_nansd128): Document.
      	* doc/sourcebuild.texi (Effective-Target Keywords): Document
      	fenv_exceptions_dfp.
      
      gcc/testsuite/
      2020-11-06  Joseph Myers  <joseph@codesourcery.com>
      
      	* lib/target-supports.exp
      	(check_effective_target_fenv_exceptions_dfp): New.
      	* gcc.dg/dfp/builtin-snan-1.c, gcc.dg/dfp/builtin-snan-2.c: New
      	tests.
      6c8e4f4d
    • Marek Polacek's avatar
      c++: Small tweak to can_convert_eh [PR81660] · 43d3b7bc
      Marek Polacek authored
      While messing with check_handlers_1, I spotted this bug report which
      complains that we don't warn about the case when we have two duplicated
      handlers of type int.  can_convert_eh implements [except.handle] and
      that says: A handler is a match for an exception object of type E if
       - The handler is of type cv T or cv T& and E and T are the same type
         (ignoring the top-level cv-qualifiers), or [...]
      
      but we don't implement this bullet properly for non-class types.  The
      fix therefore seems pretty obvious.  Also change the return type to
      bool when we're only returning yes/no.
      
      gcc/cp/ChangeLog:
      
      	PR c++/81660
      	* except.c (can_convert_eh): Change the return type to bool.  If
      	the type TO and FROM are the same, return true.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/81660
      	* g++.dg/warn/Wexceptions3.C: New test.
      	* g++.dg/eh/pr42859.C: Add dg-warning.
      	* g++.dg/torture/pr81659.C: Likewise.
      43d3b7bc
    • Bin Cheng's avatar
      Improve uninitialized warning with value range info · 7987a8d2
      Bin Cheng authored
      Function use_pred_not_overlap_with_undef_path_pred of
      pass_late_warn_uninitialized
      checks if predicate of variable use overlaps with predicate of undefined
      control flow path.
      For now, it only checks ssa_var comparing against constant, this can be
      improved where
      ssa_var compares against another ssa_var with value range info, as described in
      comment:
      
      +         /* Check value range info of rhs, do following transforms:
      +              flag_var < [min, max]  ->  flag_var < max
      +              flag_var > [min, max]  ->  flag_var > min
      +
      +            We can also transform LE_EXPR/GE_EXPR to LT_EXPR/GT_EXPR:
      +              flag_var <= [min, max] ->  flag_var < [min, max+1]
      +              flag_var >= [min, max] ->  flag_var > [min-1, max]
      +            if no overflow/wrap.  */
      
      gcc/
      
      	* tree-ssa-uninit.c (find_var_cmp_const): New function.
      	(use_pred_not_overlap_with_undef_path_pred): Call above.
      7987a8d2
    • Jonathan Wakely's avatar
      libstdc++: Fix symbol version conflict in linker script · 887515ac
      Jonathan Wakely authored
      The change in r11-4748-50b840ac causes
      a build error on Solaris, due to the new explicit instantiation matching
      patterns for two different symbol versions.
      
      libstdc++-v3/ChangeLog:
      
      	* config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten up patterns
      	for basic_stringbuf that refer to __xfer_bufptrs.
      887515ac
    • Iain Sandoe's avatar
      Objective-C/C++ : Allow visibility prefix attributes on interfaces. · 6e8e1036
      Iain Sandoe authored
      This passes visibiliy through without warning (so that, for example,
      __attribute__((__visibility("default"))) does not result in any
      diagnostic).
      
      gcc/objc/ChangeLog:
      
      	* objc-act.c (start_class): Accept visibility attributes
      	without warning.
      6e8e1036
    • Iain Sandoe's avatar
      Objective-C/C++ (parsers) : Update @property attribute parsing. · 9a34a5cc
      Iain Sandoe authored
      At present, we are missing parsing and checking for around
      half of the property attributes in use.  The existing ad hoc scheme
      for the parser's communication with the Objective C validation
      is not suitable for extending to cover all the missing cases.
      
      Additionally:
      
      1/ We were declaring errors in two cases that the reference
         implementation warns (or is silent).
      
         I've elected to warn for both those cases, (Wattributes) it
         could be that we should implement Wobjc-xxx-property warning
         masks (TODO).
      
      2/ We were emitting spurious complaints about missing property
         attributes when these were not being parsed because we gave
         up on the first syntax error.
      
      3/ The quality of the diagnostic locations was poor (that's
         true for much of Objective-C, we will have to improve it as
         we modernise areas).
      
      We continue to attempt to keep the code, warning and error output
      similar (preferably identical output) between the C and C++ front
      ends.
      
      The interface to the Objective-C-specific parts of the parsing is
      simplified to a vector of parsed (but not fully-checked) property
      attributes, this will simplify the addition of new attributes.
      
      gcc/c-family/ChangeLog:
      
      	* c-objc.h (enum objc_property_attribute_group): New
      	(enum objc_property_attribute_kind): New.
      	(OBJC_PROPATTR_GROUP_MASK): New.
      	(struct property_attribute_info): Small class encapsulating
      	parser output from property attributes.
      	(objc_prop_attr_kind_for_rid): New
      	(objc_add_property_declaration): Simplify interface.
      	* stub-objc.c (enum rid): Dummy type.
      	(objc_add_property_declaration): Simplify interface.
      	(objc_prop_attr_kind_for_rid): New.
      
      gcc/c/ChangeLog:
      
      	* c-parser.c (c_parser_objc_at_property_declaration):
      	Improve parsing fidelity. Associate better location info
      	with @property attributes.  Clean up the interface to
      	objc_add_property_declaration ().
      
      gcc/cp/ChangeLog:
      
      	* parser.c (cp_parser_objc_at_property_declaration):
      	Improve parsing fidelity. Associate better location info
      	with @property attributes.  Clean up the interface to
      	objc_add_property_declaration ().
      
      gcc/objc/ChangeLog:
      
      	* objc-act.c (objc_prop_attr_kind_for_rid): New.
      	(objc_add_property_declaration): Adjust to consume the
      	parser output using a vector of parsed attributes.
      
      gcc/testsuite/ChangeLog:
      
      	* obj-c++.dg/property/at-property-1.mm: Adjust expected
      	diagnostics.
      	* obj-c++.dg/property/at-property-29.mm: Likewise.
      	* obj-c++.dg/property/at-property-4.mm: Likewise.
      	* obj-c++.dg/property/property-neg-2.mm: Likewise.
      	* objc.dg/property/at-property-1.m: Likewise.
      	* objc.dg/property/at-property-29.m: Likewise.
      	* objc.dg/property/at-property-4.m: Likewise.
      	* objc.dg/property/at-property-5.m: Likewise.
      	* objc.dg/property/property-neg-2.m: Likewise.
      9a34a5cc
    • Jakub Jelinek's avatar
      c++: Propagate attributes to clones in duplicate_decls [PR67453] · 6c282c14
      Jakub Jelinek authored
      On the following testcase where the cdtor attributes aren't on the
      in-class declaration but on an out-of-class definition, the cdtors
      have their clones created from the in-class declaration, and later on
      duplicate_decls updates attributes on the abstract cdtors, but nothing
      propagates them to the clones.
      
      2020-11-06  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/67453
      	* decl.c (duplicate_decls): Propagate DECL_ATTRIBUTES and
      	DECL_PRESERVE_P from olddecl to its clones if any.
      
      	* g++.dg/ext/attr-used-2.C: New test.
      6c282c14
Loading