and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

This project is mirrored from git://gcc.gnu.org/git/gcc.git. Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Last successful update .
  1. 26 May, 2020 3 commits
    • liuhongt's avatar
      Add ChangeLog entry for my last commit. · cfdff3ee
      liuhongt authored
      cfdff3ee
    • liuhongt's avatar
      Fix non-comforming expander for... · 9d0dc47d
      liuhongt authored
      Fix non-comforming expander for floatv2div2sf2,floatunsv2div2sf2,fix_truncv2sfv2di,fixuns_truncv2sfv2di.
      
      2020-05-26  Hongtao Liu  <hongtao.liu@intel.com>
      	    Uroš Bizjak  <ubizjak@gmail.com>
      
      gcc/ChangeLog:
      	PR target/95211
      	PR target/95256
      	* config/i386/sse.md (<floatunssuffix>v2div2sf2): New expander.
      	(fix<fixunssuffix>_truncv2sfv2di2): Ditto.
      	(avx512dq_float<floatunssuffix>v2div2sf2): Renaming from
      	float<floatunssuffix>v2div2sf2.
      	(avx512dq_fix<fixunssuffix>_truncv2sfv2di2<mask_name>):
      	Renaming from fix<fixunssuffix>_truncv2sfv2di2<mask_name>.
      	(vec_pack<floatprefix>_float_<mode>): Adjust icode name.
      	(vec_unpack_<fixprefix>fix_trunc_lo_<mode>): Ditto.
      	(vec_unpack_<fixprefix>fix_trunc_hi_<mode>): Ditto.
      	* config/i386/i386-builtin.def: Ditto.
      	* emit-rtl.c (validate_subreg): Allow use of *paradoxical* vector
      	subregs when both omode and imode are vector mode and
      	have the same inner mode.
      
      gcc/testsuite/ChangeLog
      	* gcc.target/i386/pr95211.c: New test.
      9d0dc47d
    • GCC Administrator's avatar
      Daily bump. · 0b0d9a77
      GCC Administrator authored
      0b0d9a77
  2. 25 May, 2020 25 commits
    • Clément Chigot's avatar
    • Eric Botcazou's avatar
      Fix internal error on store to FP component at -O2 · ed01d707
      Eric Botcazou authored
      This is about a GIMPLE verification failure at -O2 or above because
      the GIMPLE store merging pass generates a NOP_EXPR between a FP type
      and an integral type.  This happens when the bit-field insertion path
      is taken for a FP field, which can happen in Ada for bit-packed record
      types.
      
      It is fixed by generating an intermediate VIEW_CONVERT_EXPR.  The patch
      also tames a little the bit-field insertion path because, for bit-packed
      record  types in Ada, you can end up with large bit-field regions, which
      results in a lot of mask-and-shifts instructions.
      
      gcc/ChangeLog
      	* gimple-ssa-store-merging.c (merged_store_group::can_be_merged_into):
      	Only turn MEM_REFs into bit-field stores for small bit-field regions
      	(imm_store_chain_info::output_merged_store): Be prepared for sources
      	with non-integral type in the bit-field insertion case.
      	(pass_store_merging::process_store): Use MAX_BITSIZE_MODE_ANY_INT as
      	the largest size for the bit-field case.
      
      gcc/testsuite/ChangeLog
      	* gnat.dg/opt84.adb: New test.
      ed01d707
    • Uros Bizjak's avatar
      i386: Remove broadcasts from TARGET_MMX_WITH_SSE vec_dup insn patterns · 14cd049a
      Uros Bizjak authored
      XMM broadcast instructions broadcast value from general reg to all
      elements of the vector.  This is not allowed for TARGET_MMX_WITH_SSE,
      where it is expected that bits outside lower 64bits load or retain
      zero value.  Following testcases expect broadcast, and are thus invalid:
      
      FAIL: gcc.target/i386/sse2-mmx-18b.c scan-assembler-not movd
      FAIL: gcc.target/i386/sse2-mmx-18b.c scan-assembler-times pbroadcastd 1
      FAIL: gcc.target/i386/sse2-mmx-19b.c scan-assembler-not movd
      FAIL: gcc.target/i386/sse2-mmx-19b.c scan-assembler-times pbroadcastw 1
      FAIL: gcc.target/i386/sse2-mmx-19d.c scan-assembler-times pbroadcastw 1
      FAIL: gcc.target/i386/sse2-mmx-19e.c scan-assembler-times pbroadcastw 1
      
      These testcases are removed entirely.
      
      2020-05-25  Uroš Bizjak  <ubizjak@gmail.com>
      
      gcc/ChangeLog:
      	* config/i386/mmx.md (*vec_dupv2sf): Redefine as define_insn.
      	(mmx_pshufw_1): Change Yv constraint to xYw.  Correct type attribute.
      	(*vec_dupv4hi): Redefine as define_insn.
      	Remove alternative with general register input.
      	(*vec_dupv2si): Ditto.
      
      gcc/testsuite/ChangeLog:
      	* gcc.target/i386/sse2-mmx-18a.c (dg-options): Remove -mno-avx512vl.
      	* gcc.target/i386/sse2-mmx-19a.c (dg-options): Remove -mno-avx.
      	* gcc.target/i386/sse2-mmx-18b.c: Remove.
      	* gcc.target/i386/sse2-mmx-18c.c: Ditto.
      	* gcc.target/i386/sse2-mmx-19b.c: Ditto.
      	* gcc.target/i386/sse2-mmx-19c.c: Ditto.
      	* gcc.target/i386/sse2-mmx-19d.c: Ditto.
      	* gcc.target/i386/sse2-mmx-19e.c: Ditto.
      14cd049a
    • Martin Jambor's avatar
      BRIG FE testsuite: Fix dump scan patterns in packed.hsail test · a42cc1f8
      Martin Jambor authored
      Starting with r11-165-eb72dc66 which converted DECL_GIMPLE_REG_P to
      DECL_NOT_GIMPLE_REG_P we have failing BRIG testcase:
      
      -PASS: packed.hsail.brig scan-tree-dump gimple "_[0-9]+ = q2 \\+ q3;"
      -PASS: packed.hsail.brig scan-tree-dump gimple "= VEC_PERM_EXPR <new_output.[0-9]+_[0-9]+, [a-z0-9_]+, { 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }>;"
      +FAIL: packed.hsail.brig scan-tree-dump gimple "_[0-9]+ = q2 \\+ q3;"
      +FAIL: packed.hsail.brig scan-tree-dump gimple "= VEC_PERM_EXPR <new_output.[0-9]+_[0-9]+, [a-z0-9_]+, { 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }>;"
      
      because the gimplifier is now smarter and generates nicer code, which
      however, does not match the regexp in the testsuite:
      
      --- before/packed.hsail.brig.005t.gimple        2020-05-12 17:59:26.434305513 +0200
      +++ after/packed.hsail.brig.005t.gimple 2020-05-12 17:52:34.477055987 +0200
      @@ -109,277 +109,267 @@
         q2 = q1 + _24;
         _25 = VEC_PERM_EXPR <q1, q1, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }>;
         q3 = q2 + _25;
      -  _26 = q2 + q3;
      -  new_output.11 = _26;
      -  new_output.21_27 = new_output.11;
      -  _28 = VEC_PERM_EXPR <new_output.21_27, q4, { 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }>;
      -  s_output.12 = _28;
      +  new_output.11 = q2 + q3;
      +  s_output.12 = VEC_PERM_EXPR <new_output.11, q4, { 0, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }>;
         q4 = s_output.12;
      
      I have looked at the SSA dump and verified that the variable in
      question is a gimple register because it gets its SSA name.  I have
      not looked into why the gimplifier previously though it had to go
      through the additional temporaries though.
      
      Tested with make -k check-brig.
      
      	* brig.dg/test/gimple/packed.hsail: Fix scan dump patterns.
      a42cc1f8
    • Richard Biener's avatar
      tree-optimization/95309 - fix invariant SLP node costing · dc0c0196
      Richard Biener authored
      This makes sure to compute SLP_TREE_NUMBER_OF_VEC_STMTS during SLP
      analysis even for invariant / external nodes so costing properly
      knows what to cost.
      
      2020-05-25  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/95309
      	* tree-vect-slp.c (vect_get_constant_vectors): Move number
      	of vector computation ...
      	(vect_slp_analyze_node_operations): ... to analysis phase.
      dc0c0196
    • Yannick Moy's avatar
      [Ada] Fix spurious error on checking of null Abstract_State · 431e762f
      Yannick Moy authored
      2020-05-25  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* sem_util.adb (Check_No_Hidden_State): Stop propagation at
      	first block/task/entry.
      431e762f
    • Yannick Moy's avatar
      [Ada] Change pragma Compile_Time_Error to force compile-time evaluation · 1a14bfbd
      Yannick Moy authored
      2020-05-25  Yannick Moy  <moy@adacore.com>
      
      gcc/ada/
      
      	* doc/gnat_rm/implementation_defined_pragmas.rst: Document
      	changes to pragmas Compile_Time_Error/Compile_Time_Warning.
      	* gnat_rm.texi: Regenerate.
      	* libgnat/g-bytswa.adb: Change uses of Compile_Time_Error to
      	Compile_Time_Warning, as the actual expression may not always be
      	known statically.
      	* sem_prag.adb (Analyze_Pragma): Handle differently pragma
      	Compile_Time_Error in both compilation and in GNATprove mode.
      	(Validate_Compile_Time_Warning_Or_Error): Issue an error or
      	warning when the expression is not known at compile time.
      	* usage.adb: Add missing documentation for warning switches _c
      	and _r.
      	* warnsw.ads: Update comment.
      1a14bfbd
    • Justin Squirek's avatar
      [Ada] Spurious accessibility error on return aggregate in GNATprove mode · 43542919
      Justin Squirek authored
      2020-05-25  Justin Squirek  <squirek@adacore.com>
      
      gcc/ada/
      
      	* sem_ch6.adb (Check_Return_Obj_Accessibility): Use original
      	node to avoid looking at expansion done in GNATprove mode.
      43542919
    • Jan Hubicka's avatar
      Do not stream redundant stuff · a746f952
      Jan Hubicka authored
      as discussed on IRC this adds knob to disable stuff we stream "just for fun"
      (or to make it easier to debug streamer desychnonization).
      
      Te size of .o files in gcc subdirectory is reduced form 506MB to 492MB
      
      gcc/
      
      	* lto-streamer-out.c (lto_output_tree): Add streamer_debugging check.
      	* lto-streamer.h (streamer_debugging): New constant
      	* tree-streamer-in.c (streamer_read_tree_bitfields): Add
      	streamer_debugging check.
      	(streamer_get_pickled_tree): Likewise.
      	* tree-streamer-out.c (pack_ts_base_value_fields): Likewise.
      a746f952
    • Richard Biener's avatar
      tree-optimization/95308 - really avoid forward propagating of &TMR · 67bfbda1
      Richard Biener authored
      This fixes a hole that still allowed forwarding of TARGET_MEM_REF
      addresses.
      
      2020-05-25  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/95308
      	* tree-ssa-forwprop.c (pass_forwprop::execute): Generalize
      	test for TARGET_MEM_REFs.
      
      	* g++.dg/torture/pr95308.C: New testcase.
      67bfbda1
    • Richard Biener's avatar
      tree-optimization/95295 - fix wrong-code with SM · 4acca1c0
      Richard Biener authored
      We failed to compare the rematerialized store values when merging
      paths after walking PHIs.
      
      2020-05-25  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/95295
      	* tree-ssa-loop-im.c (sm_seq_valid_bb): Compare remat stores
      	RHSes and drop to full sm_other if they are not equal.
      
      	* gcc.dg/torture/pr95295-1.c: New testcase.
      	* gcc.dg/torture/pr95295-2.c: Likewise.
      	* gcc.dg/torture/pr95283.c: Likewise.
      4acca1c0
    • Richard Biener's avatar
      tree-optimization/95271 - fix bswap vectorization invariant SLP type · c0e27f72
      Richard Biener authored
      This properly updates invariant SLP nodes vector types for bswap
      vectorization.
      
      2020-05-25  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/95271
      	* tree-vect-stmts.c (vectorizable_bswap): Update invariant SLP
      	children vector type.
      	(vectorizable_call): Pass down slp ops.
      
      	* gcc.dg/vect/bb-slp-pr95271.c: New testcase.
      c0e27f72
    • Richard Biener's avatar
      tree-optimization/95297 - handle scalar shift arg for SLP invariant vectype · d3169454
      Richard Biener authored
      This skips invariant vector type setting for a scalar shift argument.
      
      2020-05-25  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/95297
      	* tree-vect-stmts.c (vectorizable_shift): For scalar_shift_arg
      	skip updating operand 1 vector type.
      
      	* g++.dg/vect/pr95297.cc: New testcase.
      	* g++.dg/vect/pr95290.cc: Likewise.
      d3169454
    • Richard Biener's avatar
      tree-optimization/95308 - really avoid forward propagating of &TMR · a0c623f5
      Richard Biener authored
      This fixes a hole that still allowed forwarding of TARGET_MEM_REF
      addresses.
      
      2020-05-25  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/95308
      	* tree-ssa-forwprop.c (pass_forwprop::execute): Generalize
      	test for TARGET_MEM_REFs.
      
      	* g++.dg/torture/pr95308.C: New testcase.
      a0c623f5
    • Richard Biener's avatar
      tree-optimization/95284 - amend previous store commoning fix · f73f8bab
      Richard Biener authored
      Generalize check for clobbers.
      
      2020-05-25  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/95284
      	* tree-ssa-sink.c (sink_common_stores_to_bb): Amend previous
      	fix.
      
      	* g++.dg/torture/pr95284.C: New testcase.
      f73f8bab
    • Eric Botcazou's avatar
      Fix internal error on problematic renaming · af62ba41
      Eric Botcazou authored
      This is an internal renaming generated for a generalized loop iteration
      made on a tagged record type with predicate, and gigi cannot use the most
      efficient way of implementing renamings because the renamed object is an
      expression with a non-empty Actions list.
      
      gcc/ada/ChangeLog
      	* gcc-interface/decl.c (gnat_to_gnu_entity): Add new local variable
      	and use it throughout the function.
      	<E_Variable>: Rename local variable and adjust accordingly.  In the
      	case of a renaming, materialize the entity if the renamed object is
      	an N_Expression_With_Actions node.
      	<E_Procedure>: Use Alias accessor function consistently.
      
      gcc/testsuite/ChangeLog
      	* gnat.dg/renaming16.adb: New test.
      	* gnat.dg/renaming16_pkg.ads: New helper.
      af62ba41
    • Eric Botcazou's avatar
      Fix small fallout of earlier change · 0949185a
      Eric Botcazou authored
      gcc/ada/ChangeLog
      	* gcc-interface/misc.c (get_array_bit_stride): Get to the debug type,
      	if any, before calling gnat_get_array_descr_info.
      0949185a
    • Eric Botcazou's avatar
      Fix missing back-annotation for derived types · 036c83b6
      Eric Botcazou authored
      Gigi fails to back-annotate the Present_Expr field of variants present
      in a type derived from a discriminated untagged record type, which is
      for example visible in the output -gnatRj.
      
      gcc/ada/ChangeLog
      	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Tidy up.
      	(build_variant_list): Add GNAT_VARIANT_PART parameter and annotate
      	its variants if it is present.  Adjust the recursive call by passing
      	the variant subpart of variants, if any.
      	(copy_and_substitute_in_layout): Rename GNU_SUBST_LIST to SUBST_LIST
      	and adjust throughout.  For a type, pass the variant part in the
      	call to build_variant_list.
      036c83b6
    • Eric Botcazou's avatar
      Fix incorrect handling of Component_Size · 15c55b96
      Eric Botcazou authored
      The compiler can mishandle a Component_Size clause on an array type
      specifying a size multiple of the storage unit, when this size is
      not a multiple of the alignment of the component type.
      
      gcc/ada/ChangeLog
      	* gcc-interface/decl.c (gnat_to_gnu_component_type): Cap alignment
      	of the component type according to the component size.
      
      gcc/testsuite/ChangeLog
      	* gnat.dg/array40.adb: New test.
      	* gnat.dg/array40_pkg.ads: New helper.
      15c55b96
    • Martin Liska's avatar
      Allow only ignored files in ChangeLog entries. · deea3def
      Martin Liska authored
      	* gcc-changelog/git_commit.py: Add trailing '/'
      	for libdruntime.  Allow empty changelog for
      	only ignored files.
      	* gcc-changelog/test_email.py: New test for go
      	patch in ignored location.
      	* gcc-changelog/test_patches.txt: Add test.
      deea3def
    • Eric Botcazou's avatar
      Change description of fat pointertype with -fgnat-encodings=minimal · a27aceb9
      Eric Botcazou authored
      This makes a step back in the representation of fat pointer types in
      the debug info with -fgnat-encodings=minimal so as to avoid hiding the
      data indirection and making it easiser to synthetize the construct.
      
      gcc/ada/ChangeLog
      	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Add a
      	description of the various types associated with the unconstrained
      	type.  Declare the fat pointer earlier.  Set the current function
      	as context on the template type, and the fat pointer type on the
      	array type.  Always mark the fat pointer type as artificial and set
      	it as the context for the pointer type to the array.  Also reuse
      	GNU_ENTITY_NAME.  Finish up the unconstrained type at the very end.
      	* gcc-interface/misc.c (gnat_get_array_descr_info): Do not handle
      	fat pointer types and tidy up accordingly.
      	* gcc-interface/utils.c (build_unc_object_type): Do not set the
      	context on the template type.
      a27aceb9
    • Eric Botcazou's avatar
      49d6f724
    • Eric Botcazou's avatar
      Fix wrong assignment to mutable Out parameter of task entry · 5dce843f
      Eric Botcazou authored
      Under very specific circumstances the compiler can generate a wrong
      assignment to a mutable record object which contains an array component,
      because it does not correctly handle the update of the discriminant.
      
      gcc/ada/ChangeLog
      	* gcc-interface/gigi.h (operand_type): New static inline function.
      	* gcc-interface/trans.c (gnat_to_gnu): Do not suppress conversion
      	to the resulty type at the end for array types.
      	* gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Do not
      	remove conversions between array types on the LHS.
      
      gcc/testsuite/ChangeLog
      	* gnat.dg/array39.adb: New test.
      	* gnat.dg/array39_pkg.ads: New helper.
      	* gnat.dg/array39_pkg.adb: Likewise.
      5dce843f
    • liuhongt's avatar
      Add missing expander for vector float_extend and float_truncate. · 94c04097
      liuhongt authored
      2020-05-25  Hongtao Liu  <hongtao.liu@intel.com>
      
      gcc/ChangeLog
      	PR target/95125
      	* config/i386/sse.md (sf2dfmode_lower): New mode attribute.
      	(trunc<mode><sf2dfmode_lower>2) New expander.
      	(extend<sf2dfmode_lower><mode>2): Ditto.
      
      gcc/testsuite/ChangeLog
      	* gcc.target/i386/pr95125-avx.c: New test.
      	* gcc.target/i386/pr95125-avx512f.c: Ditto.
      94c04097
    • GCC Administrator's avatar
      Daily bump. · a7fe8919
      GCC Administrator authored
      a7fe8919
  3. 24 May, 2020 2 commits
    • Harald Anlauf's avatar
      PR fortran/95106 - truncation of long symbol names with EQUIVALENCE · d176184d
      Harald Anlauf authored
      	For long module names, the generated name-mangled symbol was
      	truncated, leading to bogus warnings about COMMON block
      	mismatches.  Provide sufficiently large temporaries.
      
      gcc/fortran/
      
      2020-05-24  Harald Anlauf  <anlauf@gmx.de>
      
      	PR fortran/95106
      	* trans-common.c (gfc_sym_mangled_common_id): Enlarge temporaries
      	for name-mangling.
      
      gcc/testsuite/
      
      2020-05-24  Harald Anlauf  <anlauf@gmx.de>
      
      	PR fortran/95106
      	* gfortran.dg/equiv_11.f90: New test.
      d176184d
    • GCC Administrator's avatar
      Daily bump. · 392bc7d2
      GCC Administrator authored
      392bc7d2
  4. 23 May, 2020 10 commits
    • David Edelsohn's avatar
      libcpp, libdecnumber: configure and substitute AR · 731c4ce0
      David Edelsohn authored
      AIX supports "FAT" libraries containing 32 bit and 64 bit objects
      (similar to Darwin), but commands for manipulating libraries do not
      default to accept both 32 bit and 64 bit object files.  While updating
      the AIX configuration to support building and running GCC as a 64 bit
      application, I have encountered some build libraries that hard code
      AR=ar instead of testing the environment.
      
      This patch adds AR_CHECK_TOOL(AR, ar) to configure.ac for the two
      libraries and updates Makefile.in to accept the substitution.
      
      2020-05-23  David Edelsohn  <dje.gcc@gmail.com>
      
      libcpp/ChangeLog:
      	* Makefile.in (AR): Substitute @AR@.
      	* configure.ac (CHECK_PROG AR): New.
      	* configure: Regenerate.
      
      libdecnumber/ChangeLog:
      	* Makefile.in (AR): Substitute @AR@.
      	* configure.ac (CHECK_PROG AR): New.
      	* configure: Regenerate.
      731c4ce0
    • Patrick Palka's avatar
      libstdc++: Compile PR93978 testcase with -Wall · a57aa111
      Patrick Palka authored
      Now that the frontend issue PR c++/94038 is thoroughly fixed, the
      testcase for PR93978 no longer fails to compile with -O -Wall, so add
      -Wall to the testcase's compile flags to help ensure we don't regress
      here.
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/93978
      	* testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
      	dg-additional-options.  Avoid unused-but-set-variable warning.
      a57aa111
    • Patrick Palka's avatar
      c++: Avoid concept evaluation when uid-sensitive [PR94038] · 6d1556ec
      Patrick Palka authored
      Concept evaluation may entail DECL_UID generation and/or template
      instantiation, so in general we can't perform it during uid-sensitive
      constexpr evaluation.
      
      gcc/cp/ChangeLog:
      
      	PR c++/94038
      	* constexpr.c (cxx_eval_constant_expression)
      	<case TEMPLATE_ID_EXPR>: Don't evaluate the concept when
      	constexpr evaluation is uid-sensitive.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/94038
      	* g++.dg/warn/pr94038-3.C: New test.
      6d1556ec
    • Jonathan Wakely's avatar
      libstdc++: Fix function that can't be constexpr in C++11 (PR 95289) · 3cb0c7cc
      Jonathan Wakely authored
      The body of this function isn't just a return statement, so it can't be
      constexpr until C++14.
      
      	PR libstdc++/95289
      	* include/debug/helper_functions.h (__get_distance): Only declare
      	as a constexpr function for C++14 and up.
      	* testsuite/25_algorithms/copy/debug/95289.cc: New test.
      3cb0c7cc
    • Thomas Koenig's avatar
      Fixes a hang on an invalid ID in a WAIT statement. · 8df7ee67
      Thomas Koenig authored
      gcc/fortran/ChangeLog:
      
      2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR libfortran/95191
      	* libgfortran.h (libgfortran_error_codes): Add
      	LIBERROR_BAD_WAIT_ID.
      
      libgfortran/ChangeLog:
      
      2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR libfortran/95191
      	* io/async.c (async_wait_id): Generate error if ID is higher
      	than the highest current ID.
      	* runtime/error.c (translate_error): Handle LIBERROR_BAD_WAIT_ID.
      
      libgomp/ChangeLog:
      
      2020-05-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
      
      	PR libfortran/95191
      	* testsuite/libgomp.fortran/async_io_9.f90: New test.
      8df7ee67
    • Jonathan Wakely's avatar
      libstdc++: Refactor filesystem::path string conversions · 584d52b0
      Jonathan Wakely authored
      This simplifies the logic of converting Source arguments and pairs of
      InputIterator arguments into the native string format. For any input
      that is a contiguous range of path::value_type (or char8_t for POSIX)
      a string view can be created and the conversion can be done directly,
      with no intermediate allocation. Previously some cases created a
      basic_string unnecessarily, for example construction from a pair of
      path::string_type::iterators, or a pair of non-const value_type*
      pointers.
      
      	* include/bits/fs_path.h (__detail::_S_range_begin)
      	(__detail::_S_range_end, path::_S_string_from_iter): Replace with
      	overloaded function template __detail::__effective_range.
      	(__detail::__effective_range): New overloaded function template to
      	create a basic_string or basic_string_view for an effective range.
      	(__detail::__value_type_is_char): Use __detail::__effective_range.
      	Do not use remove_const on value type.
      	(__detail::__value_type_is_char_or_char8_t): Likewise.
      	(path::path(const Source&, format))
      	(path::path(const Source&, const locale&))
      	(path::operator/=(const Source&), path::append(const Source&))
      	(path::concat(const Source&)): Use __detail::__effective_range.
      	(path::_S_to_string(InputIterator, InputIterator)): New function
      	template to create a string view if possible, or string otherwise.
      	(path::_S_convert): Add overloads that convert a string returned
      	by __detail::__effective_range. Use if-constexpr to inline conversion
      	logic from all overloads of _Cvt::_S_convert.
      	(path::_S_convert_loc): Add overload that converts a string. Use
      	_S_to_string to avoid allocation when possible.
      	(path::_Cvt): Remove.
      	(path::operator+=(CharT)): Remove indirection through path::concat.
      	* include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
      	overload for non-const pointers, to avoid constructing a std::string.
      	* src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
      	compilation with call to _S_convert.
      584d52b0
    • Jonathan Wakely's avatar
      libstdc++: Remove incorrect static specifiers · 00c8f2a5
      Jonathan Wakely authored
      These functions were originally static members of the path class, but
      the 'static' specifiers were not removed when they were moved to
      namespace scope. This causes ODR violations when the functions are
      called from functions defined in the header, which is incompatible with
      Nathan's modules branch.  Change them to 'inline' instead.
      
      	* include/bits/fs_path.h (__detail::_S_range_begin)
      	(__detail::_S_range_end): Remove unintentional static specifiers.
      	* include/experimental/bits/fs_path.h (__detail::_S_range_begin)
      	(__detail::_S_range_end): Likewise.
      00c8f2a5
    • Jonathan Wakely's avatar
      libstdc++: Simplify filesystem::path SFINAE constraints · 988b853f
      Jonathan Wakely authored
      This replaces the filesystem::__detail::_Path SFINAE helper with two
      separate helpers, _Path and _Path2. This avoids having one helper which
      tries to check two different sets of requirements.
      
      The _Path helper now uses variable templates instead of a set of
      overloaded functions to detect specializations of basic_string or
      basic_string_view.
      
      The __not_<is_void<remove_pointer_t<_Tp1>> check is not necessary in
      C++20 because iterator_traits<void*> is now empty. For C++17 replace
      that check with a __safe_iterator_traits helper with partial
      specializations for void pointers.
      
      Finally, the __is_encoded_char check no longer uses remove_const_t,
      which means that iterators with a const value_type will no longer be
      accepted as arguments for path creation. Such iterators resulted in
      undefined behaviour anyway, so it's still conforming to reject them in
      the constraint checks.
      
      	* include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
      	Replace alias template with variable template. Don't remove const.
      	(filesystem::__detail::__is_path_src): Replace overloaded function
      	template with variable template and specializations.
      	(filesystem::__detail::__is_path_iter_src): Replace alias template
      	with class template.
      	(filesystem::__detail::_Path): Use __is_path_src. Remove support for
      	iterator pairs.
      	(filesystem::__detail::_Path2): New alias template for checking
      	InputIterator requirements.
      	(filesystem::__detail::__constructible_from): Remove.
      	(filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
      	* testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
      	constructor arguments of void and void* types.
      988b853f
    • Iain Sandoe's avatar
      Darwin: Make sanitizer local vars linker-visible. · 804254ed
      Iain Sandoe authored
      Another case where we need a linker-visible symbols in order to
      preserve the ld64 atom model.  If these symbols are emitted as
      'local' the linker cannot see that they are separate from any
      global weak entry that precedes them.  This will cause the linker
      to complain that there is (apparently) direct access to such a
      weak global, preventing it from being replaced.
      
      This is a short-term fix for the problem - we need generic
      handling for relevant cases (that also does not pessimise objects
      by emitting unnecessary symbols and relocations).
      
      gcc/ChangeLog:
      
      2020-05-23  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/darwin.h (ASM_GENERATE_INTERNAL_LABEL):
      	Make ubsan_{data,type},ASAN symbols linker-visible.
      804254ed
    • liuhongt's avatar
      Adjust typo in testcase of my last commit · 33e09fc5
      liuhongt authored
      gcc/testsuite/ChangeLog
      	* gcc.target/i386/pr92658-avx512vl.c: Fix typo.
      33e09fc5