Skip to content
Snippets Groups Projects
  1. Dec 11, 2022
    • Iain Buclaw's avatar
      d: Merge upstream dmd, druntime c8ae4adb2e, phobos 792c8b7c1. · 6d799f0a
      Iain Buclaw authored
      D front-end changes:
      
      	- Import dmd v2.101.0.
      	- Deprecate the ability to call `__traits(getAttributes)' on
      	  overload sets.
      	- Deprecate non-empty `for' statement increment clause with no
      	  effect.
      	- Array literals assigned to `scope' array variables can now be
      	  allocated on the stack.
      
      D runtime changes:
      
      	- Import druntime v2.101.0.
      
      Phobos changes:
      
      	- Import phobos v2.101.0.
      
      gcc/d/ChangeLog:
      
      	* dmd/MERGE: Merge upstream dmd c8ae4adb2e.
      	* typeinfo.cc (check_typeinfo_type): Update for new front-end
      	interface.
      	(TypeInfoVisitor::visit (TypeInfoStructDeclaration *)): Remove warning
      	that toHash() must be declared 'nothrow @safe`.
      
      libphobos/ChangeLog:
      
      	* libdruntime/MERGE: Merge upstream druntime c8ae4adb2e.
      	* src/MERGE: Merge upstream phobos 792c8b7c1.
      6d799f0a
    • Iain Buclaw's avatar
      d: Expand bsr intrinsic as `clz(arg) ^ (argsize - 1)' · cc7f509d
      Iain Buclaw authored
      As well as removing unnecessary casts, this results in less temporaries
      being generated during the initial gimple lowering pass.  Otherwise the
      code generated is identical to the former intrinsic expansion.
      
      gcc/d/ChangeLog:
      
      	* intrinsics.cc (expand_intrinsic_bsf): Fix comment.
      	(expand_intrinsic_bsr): Use BIT_XOR_EXPR instead of MINUS_EXPR.
      cc7f509d
    • Richard Biener's avatar
      tree-optimization/89317 - missed folding of (p + 4) - &p->d · d13b86f9
      Richard Biener authored
      The PR notices we fail to simplify
      
        a_4 = &x_3(D)->data;
        b_5 = x_3(D) + 16;
        _1 = b_5 - a_4;
      
      together with the enabler handling ADDR_EXPR leafs in separate
      stmts in match.pd the suggested patterns work.
      
      	PR tree-optimization/89317
      	* match.pd ((p + b) - &p->c -> b - offsetof(c)): New patterns.
      
      	* gcc.dg/tree-ssa/pr89317.c: New testcase.
      d13b86f9
    • Richard Biener's avatar
      Treat ADDR_EXPR and CONSTRUCTOR as GIMPLE/GENERIC magically · 26295a06
      Richard Biener authored
      The following allows to match ADDR_EXPR for both the invariant
      &a.b case as well as the &p->d case in a separate definition
      transparently.  This also allows to remove the hack we employ
      for CONSTRUCTOR which we handle for example with
      
       (match vec_same_elem_p
        CONSTRUCTOR@0
        (if (TREE_CODE (@0) == SSA_NAME
             && uniform_vector_p (gimple_assign_rhs1 (SSA_NAME_DEF_STMT (@0))))))
      
      Note CONSTUCTORs always appear as separate definition in GIMPLE,
      but I continue to play safe and ADDR_EXPRs are now matched in
      both places where previously ADDR_EXPR@0 would have missed
      the &p->x case.
      
      This is a prerequesite for the PR89317 fix.
      
      	* genmatch.cc (dt_node::gen_kids): Handle ADDR_EXPR in both
      	the GENERIC and GIMPLE op position.
      	(dt_simplify::gen): Capture both GENERIC and GIMPLE op
      	position for ADDR_EXPR and CONSTRUCTOR.
      	* match.pd: Simplify CONSTRUCTOR leaf handling.
      
      	* gcc.dg/tree-ssa/forwprop-3.c: Adjust.
      	* g++.dg/tree-ssa/pr31146-2.C: Likewise.
      26295a06
    • Richard Biener's avatar
      tree-optimization/106904 - bogus -Wstringopt-overflow with vectors · f8d136e5
      Richard Biener authored
      The following avoids CSE of &ps->wp to &ps->wp.hwnd confusing
      -Wstringopt-overflow by making sure to produce addresses to the
      biggest container from vectorization.  For this I introduce
      strip_zero_offset_components which turns &ps->wp.hwnd into
      &(*ps) and use that to base the vector data references on.
      That will also work for addresses with variable components,
      alternatively emitting pointer arithmetic via calling
      get_inner_reference and gimplifying that would be possible
      but likely more intrusive.
      
      This is by no means a complete fix for all of those issues
      (avoiding ADDR_EXPRs in favor of pointer arithmetic might be).
      Other passes will have similar issues.
      
      In theory that might now cause false negatives.
      
      	PR tree-optimization/106904
      	* tree.h (strip_zero_offset_components): Declare.
      	* tree.cc (strip_zero_offset_components): Define.
      	* tree-vect-data-refs.cc (vect_create_addr_base_for_vector_ref):
      	Strip zero offset components before building the address.
      
      	* gcc.dg/Wstringop-overflow-pr106904.c: New testcase.
      f8d136e5
    • Tobias Burnus's avatar
      fortran/openmp.cc: Remove 's' that slipped in during %<..%> replacement · 045592f6
      Tobias Burnus authored
      Seemingly, 's' (in VI that's the 's'ubstitute command) appeared verbatim in
      a gfc_error message when to doing the '...' to %<...%> replacements in commit
      r13-4590-g84f6f8a2a97f88be01e223c9c9dbab801a4f501f
      
      gcc/fortran/
      	* openmp.cc (gfc_match_omp_context_selector_specification):
      	Remove spurious 's' in an error message.
      045592f6
    • GCC Administrator's avatar
      Daily bump. · c6b12b80
      GCC Administrator authored
      c6b12b80
  2. Dec 10, 2022
    • Harald Anlauf's avatar
      Fortran: reject bad SIZE argument while simplifying ISHFTC [PR106911] · ae443853
      Harald Anlauf authored
      gcc/fortran/ChangeLog:
      
      	PR fortran/106911
      	* simplify.cc (gfc_simplify_ishftc): If the SIZE argument is known
      	to be outside the allowed range, terminate simplification.
      
      gcc/testsuite/ChangeLog:
      
      	PR fortran/106911
      	* gfortran.dg/pr106911.f90: New test.
      ae443853
    • Jakub Jelinek's avatar
      ivopts: Fix IP_END handling for asm goto [PR107997] · 7676235f
      Jakub Jelinek authored
      The following testcase ICEs, because the latch bb ends with
      asm goto which has both fallthrough to the header and one or more labels
      in the header too.  In that case there is just a single edge out of the
      latch block, but still the asm goto is stmt_ends_bb_p statement, yet
      ivopts decides to emit an IV bump at the IP_END position and inserts
      it into the same bb as the asm goto after it, which then fails verification
      (control flow in the middle of bb).
      
      The following patch fixes it by splitting the latch -> header edge in that
      case and inserting into the newly created bb, where split_edge ->
      redirect_edge_and_branch is able to deal with this case correctly.
      
      2022-12-10  Jakub Jelinek  <jakub@redhat.com>
      
      	PR tree-optimization/107997
      	* tree-ssa-loop-ivopts.cc: Include cfganal.h.
      	(create_new_iv) <case IP_END>: If ip_end_pos bb is non-empty and ends
      	with a stmt which ends bb, instead of adding iv update after it split
      	the latch edge and insert iterator into the new latch bb.
      
      	* gcc.c-torture/compile/pr107997.c: New test.
      7676235f
    • Tobias Burnus's avatar
      libgomp: Handle OpenMP's reverse offloads · ea4b23d9
      Tobias Burnus authored
      This commit enabled reverse offload for nvptx such that gomp_target_rev
      actually gets called.  And it fills the latter function to do all of
      the following: finding the host function to the device func ptr and
      copying the arguments to the host, processing the mapping/firstprivate,
      calling the host function, copying back the data and freeing as needed.
      
      The data handling is made easier by assuming that all host variables
      either existed before (and are in the mapping) or that those are
      devices variables not yet available on the host. Thus, the reverse
      mapping can do without refcounts etc. Note that the spec disallows
      inside a target region device-affecting constructs other than target
      plus ancestor device-modifier and it also limits the clauses permitted
      on this construct.
      
      For the function addresses, an additional splay tree is used; for
      the lookup of mapped variables, the existing splay-tree is used.
      Unfortunately, its data structure requires a full walk of the tree;
      Additionally, the just mapped variables are recorded in a separate
      data structure an extra lookup. While the lookup is slow, assuming
      that only few variables get mapped in each reverse offload construct
      and that reverse offload is the exception and not performance critical,
      this seems to be acceptable.
      
      libgomp/ChangeLog:
      
      	* libgomp.h (struct target_mem_desc): Predeclare; move
      	below after 'reverse_splay_tree_node' and add rev_array
      	member.
      	(struct reverse_splay_tree_key_s, reverse_splay_compare): New.
      	(reverse_splay_tree_node, reverse_splay_tree,
      	reverse_splay_tree_key): New typedef.
      	(struct gomp_device_descr): Add mem_map_rev member.
      	* oacc-host.c (host_dispatch): NULL init .mem_map_rev.
      	* plugin/plugin-nvptx.c (GOMP_OFFLOAD_get_num_devices): Claim
      	support for GOMP_REQUIRES_REVERSE_OFFLOAD.
      	* splay-tree.h (splay_tree_callback_stop): New typedef; like
      	splay_tree_callback but returning int not void.
      	(splay_tree_foreach_lazy): Define; like splay_tree_foreach but
      	taking splay_tree_callback_stop as argument.
      	* splay-tree.c (splay_tree_foreach_internal_lazy,
      	splay_tree_foreach_lazy): New; but early exit if callback returns
      	nonzero.
      	* target.c: Instatiate splay_tree_c with splay_tree_prefix 'reverse'.
      	(gomp_map_lookup_rev): New.
      	(gomp_load_image_to_device): Handle reverse-offload function
      	lookup table.
      	(gomp_unload_image_from_device): Free devicep->mem_map_rev.
      	(struct gomp_splay_tree_rev_lookup_data, gomp_splay_tree_rev_lookup,
      	gomp_map_rev_lookup, struct cpy_data, gomp_map_cdata_lookup_int,
      	gomp_map_cdata_lookup): New auxiliary structs and functions for
      	gomp_target_rev.
      	(gomp_target_rev): Implement reverse offloading and its mapping.
      	(gomp_target_init): Init current_device.mem_map_rev.root.
      	* testsuite/libgomp.fortran/reverse-offload-2.f90: New test.
      	* testsuite/libgomp.fortran/reverse-offload-3.f90: New test.
      	* testsuite/libgomp.fortran/reverse-offload-4.f90: New test.
      	* testsuite/libgomp.fortran/reverse-offload-5.f90: New test.
      	* testsuite/libgomp.fortran/reverse-offload-5a.f90: New test without
      	mapping of on-device allocated variables.
      ea4b23d9
    • Gaius Mulley's avatar
      Add initial ChangeLogs for modula2. · 68ee8a64
      Gaius Mulley authored
      
      Add initial ChangeLog file in libgm2 and gcc/m2.
      
      ChangeLog:
      
      	* libgm2: (New directory).
      	* libgm2/ChangeLog: (New file).
      
      gcc/ChangeLog:
      
      	* m2: (New directory).
      	* m2/ChangeLog: (New file).
      
      Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
      68ee8a64
    • Thomas Schwinge's avatar
      Add stub 'gcc/rust/ChangeLog' · 24ff0b3e
      Thomas Schwinge authored
      24ff0b3e
    • Tobias Burnus's avatar
      Fortran: Replace simple '.' quotes by %<.%> · 84f6f8a2
      Tobias Burnus authored
      When using %qs instead of '%s' or %<=%> instead of '=' looks nicer
      by having nicer quotes and bold text, if the terminal supports it;
      otherwise, plain quotes are used.
      
      gcc/fortran/ChangeLog:
      
      	* match.cc (gfc_match_member_sep): Use %<...%> in gfc_error.
      	* openmp.cc (gfc_match_oacc_routine, gfc_match_omp_context_selector,
      	gfc_match_omp_context_selector_specification,
      	gfc_match_omp_declare_variant, resolve_omp_clauses): Likewise;
      	use %qs instead of '%s'.
      	* primary.cc (match_real_constant, gfc_match_varspec): Likewise.
      	* resolve.cc (gfc_resolve_formal_arglist, resolve_operator,
      	resolve_ordinary_assign): Likewise.
      84f6f8a2
    • Thomas Schwinge's avatar
      Prepare 'contrib/gcc-changelog/git_commit.py' for GCC/Rust · 325529e2
      Thomas Schwinge authored
      	contrib/
      	* gcc-changelog/git_commit.py (default_changelog_locations): Add
      	'gcc/rust'.
      	(bug_components): Add 'rust'.
      325529e2
    • Gaius Mulley's avatar
      Add ChangeLog directories for modula2 into git_commit.py. · 7e4aa710
      Gaius Mulley authored
      
      Prepare to add changelogs for the Modula2 front end by changing
      the contrib git_commit.py script.
      
      contrib/ChangeLog:
      
      	* gcc-changelog/git_commit.py (default_changelog_locations):
      	New entry for gcc/m2.  New entry for libgm2.
      
      Signed-off-by: default avatarGaius Mulley <gaiusmod2@gmail.com>
      7e4aa710
    • Ian Lance Taylor's avatar
      libbacktrace: rewrite and simplify main zstd loop · 1bdba731
      Ian Lance Taylor authored
      	* elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry.
      	(ZSTD_ENCODE_BASELINE_BITS): Define.
      	(ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define.
      	(elf_zstd_literal_length_base): New static const array.
      	(elf_zstd_match_length_base): Likewise.
      	(struct elf_zstd_fse_baseline_entry): Define.
      	(elf_zstd_make_literal_baseline_fse): New static function.
      	(elf_zstd_make_offset_baseline_fse): Likewise.
      	(elf_zstd_make_match_baseline_fse): Likewise.
      	(print_table, main): Use elf_zstd_fse_baseline_entry.
      	(elf_zstd_lit_table, elf_zstd_match_table): Likewise.
      	(elf_zstd_offset_table): Likewise.
      	(struct elf_zstd_seq_decode): Likewise.  Remove use_rle and rle
      	fields.
      	(elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry,
      	taking a conversion function.  Convert RLE to FSE.
      	(elf_zstd_literal_length_baseline): Remove.
      	(elf_zstd_literal_length_bits): Remove.
      	(elf_zstd_match_length_baseline): Remove.
      	(elf_zstd_match_length_bits): Remove.
      	(elf_zstd_decompress): Use elf_zstd_fse_baseline_entry.  Rewrite
      	and simplify main loop.
      1bdba731
    • GCC Administrator's avatar
      Daily bump. · 40ce6485
      GCC Administrator authored
      40ce6485
  3. Dec 09, 2022
    • Paul Thomas's avatar
      Fortran: ICE on recursive derived types with allocatable components [PR107872] · 01254aa2
      Paul Thomas authored
      gcc/fortran/ChangeLog:
      
      	PR fortran/107872
      	* resolve.cc (derived_inaccessible): Skip over allocatable components
      	to prevent an infinite loop.
      
      gcc/testsuite/ChangeLog:
      
      	PR fortran/107872
      	* gfortran.dg/pr107872.f90: New test.
      01254aa2
    • Tobias Burnus's avatar
      Fortran/OpenMP: align/allocator modifiers to the allocate clause · b2e1c49b
      Tobias Burnus authored
      gcc/fortran/ChangeLog:
      
      	* dump-parse-tree.cc (show_omp_namelist): Improve OMP_LIST_ALLOCATE
      	output.
      	* gfortran.h (struct gfc_omp_namelist): Add 'align' to 'u'.
      	(gfc_free_omp_namelist): Add bool arg.
      	* match.cc (gfc_free_omp_namelist): Likewise; free 'u.align'.
      	* openmp.cc (gfc_free_omp_clauses, gfc_match_omp_clause_reduction,
      	gfc_match_omp_flush): Update call.
      	(gfc_match_omp_clauses): Match 'align/allocate modifers in
      	'allocate' clause.
      	(resolve_omp_clauses): Resolve align.
      	* st.cc (gfc_free_statement): Update call
      	* trans-openmp.cc (gfc_trans_omp_clauses): Handle 'align'.
      
      libgomp/ChangeLog:
      
      	* libgomp.texi (5.1 Impl. Status): Split allocate clause/directive
      	item about 'align'; mark clause as 'Y' and directive as 'N'.
      	* testsuite/libgomp.fortran/allocate-2.f90: New test.
      	* testsuite/libgomp.fortran/allocate-3.f90: New test.
      b2e1c49b
    • Jiufu Guo's avatar
      rs6000: Remove useless copy_rtx in rs6000_emit_set_{,long}_const · 71b31d13
      Jiufu Guo authored
      Function rs6000_emit_set_const/rs6000_emit_set_long_const are only invoked from
      two "define_split"s where the target operand is limited to gpc_reg_operand or
      int_reg_operand, then the operand must be REG_P.
      And in rs6000_emit_set_const/rs6000_emit_set_long_const, to create temp rtx,
      it is using code like "gen_reg_rtx({S|D}Imode)", it must also be REG_P.
      So, copy_rtx is not needed for temp and dest.
      
      This patch removes those "copy_rtx" for rs6000_emit_set_const and
      rs6000_emit_set_long_const.
      
      gcc/ChangeLog:
      
      	* config/rs6000/rs6000.cc (rs6000_emit_set_const): Remove copy_rtx.
      	(rs6000_emit_set_long_const): Likewise.
      71b31d13
    • Martin Liska's avatar
      MAINTAINERS: fix spacing · 96cb786b
      Martin Liska authored
      ChangeLog:
      
      	* MAINTAINERS: Fix spacing.
      96cb786b
    • Martin Liska's avatar
      i386: fix assert (__builtin_cpu_supports ("x86-64") >= 0) · d71b20fc
      Martin Liska authored
      Similar story as PR103661, we again return a negative number
      for __builtin_cpu_supports:
      
      Documentation says:
      
      int __builtin_cpu_supports(const char *feature)
      This function returns a positive integer if the run-time CPU supports feature and returns 0 otherwise.
      while we return -2147483648.
      
      Moreover, I noticed "x86-64" is not a valid option for __builtin_cpu_is,
      but for __builtin_cpu_supports.
      
      PR target/107551
      
      gcc/ChangeLog:
      
      	* config/i386/i386-builtins.cc (fold_builtin_cpu): Use same path
      	as for PR103661.
      	* doc/extend.texi: Fix "x86-64" use.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/i386/builtin_target.c: Add more checks.
      d71b20fc
    • Sebastian Huber's avatar
      Rename SUBTARGET_CC1_SPEC to OS_CC1_SPEC · 3e4b8dc4
      Sebastian Huber authored
      This change resolves a naming conflict introduced by the recently added
      SUBTARGET_CC1_SPEC to gcc.cc.  Some targets (mips and loongarch) aready used
      a SUBTARGET_CC1_SPEC define.  Rename the define used by gcc.cc to OS_CC1_SPEC.
      
      gcc/ChangeLog:
      
      	* config/rtems.h (SUBTARGET_CC1_SPEC): Rename to...
      	(OS_CC1_SPEC): ...this.
      	* gcc.cc (SUBTARGET_CC1_SPEC): Rename to...
      	(OS_CC1_SPEC): ...this.
      3e4b8dc4
    • David Malcolm's avatar
      analyzer: rename region-model-impl-calls.cc to kf.cc · 63a42ffc
      David Malcolm authored
      
      gcc/ChangeLog:
      	* Makefile.in (ANALYZER_OBJS): Update for renaming of
      	analyzer/region-model-impl-calls.cc to analyzer/kf.cc.
      
      gcc/analyzer/ChangeLog:
      	* analyzer.h (class known_function): Expand comment.
      	* region-model-impl-calls.cc: Rename to...
      	* kf.cc: ...this.
      	* known-function-manager.h (class known_function_manager): Add
      	leading comment.
      
      Signed-off-by: default avatarDavid Malcolm <dmalcolm@redhat.com>
      63a42ffc
    • David Malcolm's avatar
      analyzer: fix ICE on region creation during get_referenced_base_regions [PR108003] · 7dc0ecaf
      David Malcolm authored
      
      gcc/analyzer/ChangeLog:
      	PR analyzer/108003
      	* call-summary.cc
      	(call_summary_replay::convert_region_from_summary_1): Convert
      	heap_regs_in_use from auto_sbitmap to auto_bitmap.
      	* region-model-manager.cc
      	(region_model_manager::get_or_create_region_for_heap_alloc):
      	Convert from sbitmap to bitmap.
      	* region-model-manager.h: Likewise.
      	* region-model.cc
      	(region_model::get_or_create_region_for_heap_alloc): Convert from
      	auto_sbitmap to auto_bitmap.
      	(region_model::get_referenced_base_regions): Likewise.
      	* region-model.h: Include "bitmap.h" rather than "sbitmap.h".
      	(region_model::get_referenced_base_regions): Convert from
      	auto_sbitmap to auto_bitmap.
      
      gcc/testsuite/ChangeLog:
      	PR analyzer/108003
      	* g++.dg/analyzer/pr108003.C: New test.
      
      Signed-off-by: default avatarDavid Malcolm <dmalcolm@redhat.com>
      7dc0ecaf
    • David Malcolm's avatar
      analyzer: handle memmove like memcpy · cf80a23e
      David Malcolm authored
      
      gcc/analyzer/ChangeLog:
      	* region-model-impl-calls.cc (class kf_memcpy): Rename to...
      	(class kf_memcpy_memmove): ...this.
      	(kf_memcpy::impl_call_pre): Rename to...
      	(kf_memcpy_memmove::impl_call_pre): ...this, and check the src for
      	poison.
      	(register_known_functions): Update for above renaming, and
      	register BUILT_IN_MEMMOVE and BUILT_IN_MEMMOVE_CHK.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/analyzer/memcpy-1.c (test_8a, test_8b): New tests.
      	* gcc.dg/analyzer/memmove-1.c: New test, based on memcpy-1.c
      	* gcc.dg/analyzer/out-of-bounds-1.c (test7): Update expected
      	result for uninit srcBuf.
      	* gcc.dg/analyzer/out-of-bounds-5.c (test8, test9): Add
      	dg-warnings for memcpy from uninit src vla.
      	* gcc.dg/analyzer/pr104308.c (test_memmove_within_uninit):
      	Expect creation point note to be missing on riscv*-*-*.
      
      Signed-off-by: default avatarDavid Malcolm <dmalcolm@redhat.com>
      cf80a23e
    • liuhongt's avatar
      Enable hwasan for x86-64. · 2996b5c0
      liuhongt authored
      libsanitizer
      	* configure.tgt: Enable hwasan for x86-64.
      2996b5c0
    • liuhongt's avatar
      Implement hwasan target_hook. · bb576017
      liuhongt authored
      gcc/ChangeLog:
      
      	* doc/invoke.texi (x86 options): Document
      	-mlam={none,u48,u57}.
      	* config/i386/i386-opts.h (enum lam_type): New enum.
      	* config/i386/i386.cc (ix86_memtag_can_tag_addresses): New.
      	(ix86_memtag_set_tag): Ditto.
      	(ix86_memtag_extract_tag): Ditto.
      	(ix86_memtag_add_tag): Ditto.
      	(ix86_memtag_tag_size): Ditto.
      	(ix86_memtag_untagged_pointer): Ditto.
      	(TARGET_MEMTAG_CAN_TAG_ADDRESSES): New.
      	(TARGET_MEMTAG_ADD_TAG): Ditto.
      	(TARGET_MEMTAG_SET_TAG): Ditto.
      	(TARGET_MEMTAG_EXTRACT_TAG): Ditto.
      	(TARGET_MEMTAG_UNTAGGED_POINTER): Ditto.
      	(TARGET_MEMTAG_TAG_SIZE): Ditto.
      	(IX86_HWASAN_SHIFT): Ditto.
      	(IX86_HWASAN_TAG_SIZE): Ditto.
      	* config/i386/i386-expand.cc (ix86_expand_call): Untag code
      	pointer.
      	* config/i386/i386-options.cc (ix86_option_override_internal):
      	Error when enable -mlam=[u48|u57] for 32-bit code.
      	* config/i386/i386.opt: Add -mlam=[none|u48|u57].
      	* config/i386/i386-protos.h (ix86_memtag_untagged_pointer):
      	Declare.
      	(ix86_memtag_can_tag_addresses): Ditto.
      bb576017
    • Jonathan Wakely's avatar
      libstdc++: Remove digit separators [PR108015] · d61c0357
      Jonathan Wakely authored
      These are not valid in C++11 and cause a warning when preprocessing,
      even though they're inside a skipped group.
      
      chrono:2436: warning: missing terminating ' character
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/108015
      	* include/std/chrono (hh_mm_ss): Remove digit separators.
      d61c0357
    • Jonathan Wakely's avatar
      libstdc++: Fix some -Wunused warnings in tests · f76d7943
      Jonathan Wakely authored
      libstdc++-v3/ChangeLog:
      
      	* include/ext/pb_ds/detail/type_utils.hpp (PB_DS_STATIC_ASSERT):
      	Add unused attribute to avoid -Wunused-local-typedef warnings.
      	* testsuite/17_intro/tag_type_explicit_ctor.cc: Add pragma to
      	ignore -Wunused-variable warnings
      f76d7943
    • Jonathan Wakely's avatar
      libstdc++: Add [[nodiscard]] to chrono conversion functions · 646e979c
      Jonathan Wakely authored
      Also add doxygen comments.
      
      libstdc++-v3/ChangeLog:
      
      	* include/bits/chrono.h (duration_cast, floor, round, abs, ceil)
      	(time_point_cast): Add [[nodiscard]] attribute and doxygen
      	comments.
      	(treat_as_floating_point): Add doxygen commen.
      646e979c
    • Jonathan Wakely's avatar
      libstdc++: Change class-key for duration and time_point to class · 7eec3114
      Jonathan Wakely authored
      We define these with the 'struct' keyword, but the standard uses
      'class'. This results in warnings if users try to refer to them using
      elaborated type specifiers.
      
      libstdc++-v3/ChangeLog:
      
      	* include/bits/chrono.h (duration, time_point): Change 'struct'
      	to 'class'.
      7eec3114
    • GCC Administrator's avatar
      Daily bump. · e6110da4
      GCC Administrator authored
      e6110da4
  4. Dec 08, 2022
    • Marek Polacek's avatar
      docs: Suggest options to improve ASAN stack traces · 6a07798c
      Marek Polacek authored
      I got a complaint that while Clang docs suggest options that improve
      the quality of the backtraces ASAN prints (cf.
      <https://clang.llvm.org/docs/AddressSanitizer.html#usage>), our docs
      don't say anything to that effect.  This patch amends that with a new
      paragraph.  (It deliberately doesn't mention -fno-omit-frame-pointer.)
      
      gcc/ChangeLog:
      
      	* doc/invoke.texi (-fsanitize=address): Suggest options to improve
      	stack traces.
      6a07798c
    • Harald Anlauf's avatar
      Fortran: diagnose and reject duplicate CONTIGUOUS attribute [PR108025] · 3a9f6d5a
      Harald Anlauf authored
      gcc/fortran/ChangeLog:
      
      	PR fortran/108025
      	* symbol.cc (gfc_add_contiguous): Diagnose and reject duplicate
      	CONTIGUOUS attribute.
      
      gcc/testsuite/ChangeLog:
      
      	PR fortran/108025
      	* gfortran.dg/contiguous_12.f90: New test.
      3a9f6d5a
    • Eugene Rozenfeld's avatar
      Fix count comparison in ipa-cp · 7410032a
      Eugene Rozenfeld authored
      The existing comparison was incorrect for non-PRECISE counts
      (e.g., AFDO): we could end up with a 0 base_count, which could
      lead to asserts, e.g., in good_cloning_opportunity_p.
      
      Tested on x86_64-pc-linux-gnu.
      
      gcc/ChangeLog:
      	PR ipa/108000
      	* ipa-cp.cc (ipcp_propagate_stage): Fix profile count comparison
      
      gcc/testsuite
      	* gcc.dg/tree-prof/pr108000.c: Regression test
      7410032a
    • David Faust's avatar
      bpf: add define_insn for bswap · 5ddfe794
      David Faust authored
      The eBPF architecture provides 'end[be,le]' instructions for endianness
      swapping. Add a define_insn for bswap<mode>2 to use them instaed of
      falling back on a libcall.
      
      gcc/
      
      	* config/bpf/bpf.md (bswap<mode>2): New define_insn.
      
      gcc/testsuite/
      
      	* gcc.target/bpf/bswap-1.c: New test.
      5ddfe794
    • Jason Merrill's avatar
      c++: build initializer_list<string> in a loop [PR105838] · bd0485f2
      Jason Merrill authored
      The previous patch avoided building an initializer_list<string> at all when
      building a vector<string>, but in situations where that isn't possible, we
      could still build the initializer_list with a loop over a constant array.
      
      This is represented using a VEC_INIT_EXPR, which required adjusting a couple
      of places that expected the initializer array to have the same type as the
      target array and fixing build_vec_init not to undo our efforts.
      
      	PR c++/105838
      
      gcc/cp/ChangeLog:
      
      	* call.cc (convert_like_internal) [ck_list]: Use
      	maybe_init_list_as_array.
      	* constexpr.cc (cxx_eval_vec_init_1): Init might have
      	a different type.
      	* tree.cc (build_vec_init_elt): Likewise.
      	* init.cc (build_vec_init): Handle from_array from a
      	TARGET_EXPR.  Retain TARGET_EXPR of a different type.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/tree-ssa/initlist-opt2.C: New test.
      bd0485f2
    • Jason Merrill's avatar
      c++: avoid initializer_list<string> [PR105838] · d081807d
      Jason Merrill authored
      When constructing a vector<string> from { "strings" }, first is built an
      initializer_list<string>, which is then copied into the strings in the
      vector.  But this is inefficient: better would be treat the { "strings" }
      as a range and construct the strings in the vector directly from the
      string-literals.  We can do this transformation for standard library
      classes because we know the design patterns they follow.
      
      	PR c++/105838
      
      gcc/cp/ChangeLog:
      
      	* call.cc (list_ctor_element_type): New.
      	(braced_init_element_type): New.
      	(has_non_trivial_temporaries): New.
      	(maybe_init_list_as_array): New.
      	(maybe_init_list_as_range): New.
      	(build_user_type_conversion_1): Use maybe_init_list_as_range.
      	* parser.cc (cp_parser_braced_list): Call
      	recompute_constructor_flags.
      	* cp-tree.h (find_temps_r): Declare.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/tree-ssa/initlist-opt1.C: New test.
      d081807d
    • Jason Merrill's avatar
      c++: fewer allocator temps [PR105838] · 1e184761
      Jason Merrill authored
      In this PR, initializing the array of std::string to pass to the vector
      initializer_list constructor gets very confusing to the optimizers as the
      number of elements increases, primarily because of all the std::allocator
      temporaries passed to all the string constructors.  Instead of creating one
      for each string, let's share an allocator between all the strings; we can do
      this safely because we know that std::allocator is stateless and that string
      doesn't care about the object identity of its allocator parameter.
      
      	PR c++/105838
      
      gcc/cp/ChangeLog:
      
      	* cp-tree.h (is_std_allocator): Declare.
      	* constexpr.cc (is_std_allocator): Split out  from...
      	(is_std_allocator_allocate): ...here.
      	* init.cc (find_temps_r): New.
      	(find_allocator_temp): New.
      	(build_vec_init): Use it.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/tree-ssa/allocator-opt1.C: New test.
      1e184761
Loading