Patrick Palka [Fri, 29 May 2020 13:44:09 +0000 (09:44 -0400)]
c++: constexpr ctor with RANGE_EXPR index [PR95241]
In the testcase below, the CONSTRUCTOR for 'field' contains a RANGE_EXPR
index:
{{aggr_init_expr<...>, [1...2]={.off=1}}}
but get_or_insert_ctor_field isn't prepared to handle looking up a
RANGE_EXPR index.
This patch adds limited support to get_or_insert_ctor_field for looking
up a RANGE_EXPR index. The limited scope of this patch should make it
more suitable for backporting, and more extensive support would be
needed only to handle self-modifying CONSTRUCTORs that contain a
RANGE_EXPR index, but I haven't yet been able to come up with a testcase
that actually creates such a CONSTRUCTOR.
gcc/cp/ChangeLog:
PR c++/95241
* constexpr.c (get_or_insert_ctor_field): Add limited support
for RANGE_EXPR index lookups.
gcc/testsuite/ChangeLog:
PR c++/95241
* g++.dg/cpp0x/constexpr-array25.C: New test.
Martin Liska [Fri, 29 May 2020 11:21:41 +0000 (13:21 +0200)]
Port bugzilla-close-candidate script to git.
maintainer-scripts/ChangeLog:
* bugzilla-close-candidate.py: Support both SVN and GIT messages
in PRs. Remove need of usage of the bugzilla API key.
Andrew Stubbs [Mon, 18 May 2020 13:05:02 +0000 (14:05 +0100)]
amdgcn: Fix VCC early clobber
gcc/ChangeLog:
2020-05-28 Andrew Stubbs <ams@codesourcery.com>
* config/gcn/gcn-valu.md (add<mode>3_vcc_zext_dup): Add early clobber.
(add<mode>3_vcc_zext_dup_exec): Likewise.
(add<mode>3_vcc_zext_dup2): Likewise.
(add<mode>3_vcc_zext_dup2_exec): Likewise.
François Dumont [Sun, 24 May 2020 10:04:38 +0000 (12:04 +0200)]
libstdc++: Review unordered_map insert_or_assign/try_emplace (PR 95079)
Those methods are making a double lookup in case of insertion, they can
perform only one.
PR libstdc++/95079
* include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
* include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
(unordered_map<>::insert_or_assign): Adapt.
Richard Biener [Fri, 29 May 2020 10:00:00 +0000 (12:00 +0200)]
tree-optimization/95272 - add SLP_TREE_REPRESENTATIVE
This adds SLP_TREE_REPRESENTATIVE - a representative stmt-info that
is used by SLP analysis and code generation. This avoids the need
for the hack in vect_slp_rearrange_stmts which previously avoided
to re-arrange stmts that might not have been isomorphic because
of operand swapping. It also plays nice with future directions of SLP
and for the forseeable future is easier than replicating more and
more info in the SLP node as long as non-SLP is in-tree.
2020-05-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/95272
* tree-vectorizer.h (_slp_tree::representative): Add.
(SLP_TREE_REPRESENTATIVE): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Adjust SLP
node gathering.
(vectorizable_live_operation): Use the representative to
attach the reduction info to.
* tree-vect-slp.c (_slp_tree::_slp_tree): Initialize
SLP_TREE_REPRESENTATIVE.
(vect_create_new_slp_node): Likewise.
(slp_copy_subtree): Copy it.
(vect_slp_rearrange_stmts): Re-arrange even COND_EXPR stmts.
(vect_slp_analyze_node_operations_1): Pass the representative
to vect_analyze_stmt.
(vect_schedule_slp_instance): Pass the representative to
vect_transform_stmt.
* gcc.dg/vect/pr95272.c: New testcase.
Richard Biener [Fri, 29 May 2020 08:46:06 +0000 (10:46 +0200)]
tree-optimization/95356 - more vectorizable_shift massaging
The previous fix clashed with the rewrite to emit SLP invariants
during the SLP walk. Thus the following adjusts the SLP tree
hacking vectorizable_shift does appropriately.
Still resisting the attempt of a rewrite of vectorizable_shift ...
2020-05-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/95356
* tree-vect-stmts.c (vectorizable_shift): Do in-place SLP
node hacking during analysis.
Jan Hubicka [Fri, 29 May 2020 10:25:48 +0000 (12:25 +0200)]
Fix streamer desynchornization caused by streamer debugging patch
it turns out I lost one hunk in the patch disabling extra streaming
which causes streamer to go out of sync in the case non-trivial scc
containing the node being streamed appears in local stream (which seems
quite rare since it does not happen during bootstrap).
2020-05-29 Jan Hubicka <hubicka@ucw.cz>
PR lto/95362
* lto-streamer-out.c (lto_output_tree): Disable redundant streaming.
Martin Liska [Fri, 29 May 2020 09:50:54 +0000 (11:50 +0200)]
Remove references to SVN in libsanitizer.
Simple documentation update based on usage of GIT by both
LLVM and GCC.
libsanitizer/ChangeLog:
* HOWTO_MERGE: Do not mention not existing argument.
* README.gcc: Update LLVM repository location.
Martin Liska [Fri, 29 May 2020 09:29:25 +0000 (11:29 +0200)]
Fix various limitations of git-backport.py.
I've just tested the script and I'm going to install the patch
to all active branches.
contrib/ChangeLog:
* git-backport.py: The script did 'git co HEAD~' when
there was no modified ChangeLog file in a successful
git cherry pick.
Run cherry-pick --continue without editor.
Richard Biener [Fri, 29 May 2020 08:16:38 +0000 (10:16 +0200)]
tree-optimization/95403 - guard vect_init_vector_1 against NULL stmt_info
2020-05-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/95403
* tree-vect-stmts.c (vect_init_vector_1): Guard against NULL
stmt_vinfo.
* gfortran.dg/vect/pr95403.f: New testcase.
Jakub Jelinek [Fri, 29 May 2020 08:48:40 +0000 (10:48 +0200)]
openmp: One omp_resolve_declare_variant followup
As noticed by Arseny, I got the condition when to call the add removal hook
wrong wrong. Fixed thusly.
2020-05-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/95315
* omp-general.c (omp_resolve_declare_variant): Fix up addition of
declare variant cgraph node removal callback.
* gcc.dg/gomp/pr95315-2.c: New test.
Jakub Jelinek [Fri, 29 May 2020 08:42:50 +0000 (10:42 +0200)]
expander: Optimize store_expr from STRING_CST [PR95052]
In the following testcase, store_expr of e.g. 97 bytes long string literal
into 1MB long array is implemented by copying the 97 bytes from .rodata
section, followed by clearing the remaining bytes. But, as the STRING_CST
has type char[1024*1024], we actually allocate whole 1MB in .rodata section
for it, even when we only use the first 97 bytes from that.
The following patch tweaks it so that if we are going to initialize only the
small part from it, we don't emit all the zeros that we never use after it.
2020-05-29 Jakub Jelinek <jakub@redhat.com>
PR middle-end/95052
* expr.c (store_expr): If expr_size is constant and significantly
larger than TREE_STRING_LENGTH, set temp to just the
TREE_STRING_LENGTH portion of the STRING_CST.
* gcc.target/i386/pr95052.c: New test.
Richard Biener [Fri, 29 May 2020 07:25:53 +0000 (09:25 +0200)]
tree-optimization/95393 - fold MIN/MAX_EXPR generated by phiopt
This makes sure to fold generated stmts so they do not survive
until RTL expansion and cause awkward code generation.
2020-05-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/95393
* tree-ssa-phiopt.c (minmax_replacement): Use gimple_build
to build the min/max expression so we simplify cases like
MAX(0, s) immediately.
* gcc.dg/tree-ssa/phi-opt-21.c: New testcase.
* g++.dg/vect/slp-pr87105.cc: Adjust.
Joe Ramsay [Fri, 29 May 2020 07:44:37 +0000 (08:44 +0100)]
aarch64: add support for unpacked EOR, ORR and AND
Extended patterns for these instructions to support unpacked vectors.
BIC will have to wait, as there is not currently support for unpacked
NOT.
2020-05-29 Joe Ramsay <joe.ramsay@arm.com>
gcc/
* config/aarch64/aarch64-sve.md (<LOGICAL:optab><mode>3): Add support
for unpacked EOR, ORR, AND.
gcc/testsuite/
* gcc.target/aarch64/sve/load_const_offset_2.c: Force using packed
vectors.
* gcc.target/aarch64/sve/logical_unpacked_and_1.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_and_2.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_and_3.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_and_4.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_and_5.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_and_6.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_and_7.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_eor_1.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_eor_2.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_eor_3.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_eor_4.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_eor_5.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_eor_6.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_eor_7.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_orr_1.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_orr_2.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_orr_3.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_orr_4.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_orr_5.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_orr_6.c: New test.
* gcc.target/aarch64/sve/logical_unpacked_orr_7.c: New test.
* gcc.target/aarch64/sve/scatter_store_6.c: Force using packed vectors.
* gcc.target/aarch64/sve/scatter_store_7.c: Force using packed vectors.
* gcc.target/aarch64/sve/strided_load_3.c: Force using packed vectors.
* gcc.target/aarch64/sve/strided_store_3.c: Force using packed vectors.
* gcc.target/aarch64/sve/unpack_signed_1.c: Force using packed vectors.
Martin Liska [Fri, 29 May 2020 06:59:04 +0000 (08:59 +0200)]
git_commit: fix duplicite email address.
The patch is about to handle situations like seen
in
3ea6977d0f1813d982743a09660eec1760e981ec.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Properly
handle duplicite authors.
* gcc-changelog/test_email.py: New test.
* gcc-changelog/test_patches.txt: New patch.
GCC Administrator [Fri, 29 May 2020 00:16:23 +0000 (00:16 +0000)]
Daily bump.
Jakub Jelinek [Thu, 28 May 2020 21:40:54 +0000 (23:40 +0200)]
c++: Try to complete decomp types [PR95328]
Two years ago Paolo has added the
else if (processing_template_decl && !COMPLETE_TYPE_P (type))
pedwarn (...);
lines into cp_finish_decomp. For type dependent decl we punt much earlier,
but even for types which aren't type dependent COMPLETE_TYPE_P might be
false as this testcase shows, so this patch tries to complete_type first
(the reason for writing it that way is that it is then followed by another
else if and if complete_type returns error_mark_node, we shouldn't report
anything, as a bug should have been reported already.
2020-05-28 Jakub Jelinek <jakub@redhat.com>
PR c++/95328
* decl.c (cp_finish_decomp): Call complete_type before checking
COMPLETE_TYPE_P.
* g++.dg/cpp1z/decomp53.C: New test.
Harald Anlauf [Thu, 28 May 2020 20:28:08 +0000 (22:28 +0200)]
PR fortran/95373 - ICE in build_reference_type, at tree.c:7942
The use of KIND, LEN, RE, and IM inquiry references for applicable intrinsic
types is valid only for suffienctly new Fortran standards. Add appropriate
check.
2020-05-28 Harald Anlauf <anlauf@gmx.de>
gcc/fortran/
PR fortran/95373
* primary.c (is_inquiry_ref): Check validity of inquiry
references against selected Fortran standard.
gcc/testsuite/
PR fortran/95373
* gfortran.dg/pr95373_1.f90: New test.
* gfortran.dg/pr95373_2.f90: New test.
Harald Anlauf [Thu, 28 May 2020 19:53:17 +0000 (21:53 +0200)]
PR fortran/95104 - Segfault on a legal WAIT statement
The initial commit for this PR uncovered a latent issue with unit locking
in the Fortran run-time library. Add check for valid unit.
2020-05-28 Harald Anlauf <anlauf@gmx.de>
libgfortran/
PR libfortran/95104
* io/unit.c (unlock_unit): Guard by check for NULL pointer.
Jason Merrill [Thu, 28 May 2020 04:35:56 +0000 (00:35 -0400)]
c++: Immediately deduce auto member [PR94926].
In r9-297 I was trying to be more flexible and treat static data members of
class templates more like variable templates, where the type need not be
determined until the variable is instantiated, but I suppose that in a class
the types of all the non-template members need to be determined at the time
of class instantiation.
gcc/cp/ChangeLog:
PR c++/94926
* decl.c (cp_finish_decl): Revert r9-297 change.
(check_static_variable_definition): Likewise.
* constexpr.c (ensure_literal_type_for_constexpr_object): Likewise.
* pt.c (instantiate_decl): Return early on type error.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/pr86648.C: Expect error.
* g++.dg/cpp1z/static2.C: Expect error.
* g++.dg/cpp0x/nsdmi16.C: New test.
Nicolás Bértolo [Fri, 22 May 2020 20:54:41 +0000 (17:54 -0300)]
jit: port libgccjit to Windows
2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
/ChangeLog:
* configure.ac: Don't require --enable-host-shared when building
for Mingw.
* configure: Regenerate.
2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
gcc/ChangeLog:
* Makefile.in: don't look for libiberty in the "pic" subdirectory
when building for Mingw. Add dependency on xgcc with the proper
extension.
2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
gcc/c/ChangeLog:
* Make-lang.in: Remove extra slash.
2020-05-28 Nicolas Bértolo <nicolasbertolo@gmail.com>
gcc/jit/ChangeLog:
* Make-lang.in: Remove extra slash. Build libgccjit.dll and its
import library in Windows.
* config-lang.in: Update comment about --enable-host-shared.
* jit-w32.h: New file.
* jit-w32.c: New file.
(print_last_error): New function that prints the error
string corresponding to GetLastError().
(get_TOKEN_USER_current_user): Helper function used for getting
the SID belonging to the current user.
(create_directory_for_current_user): Helper function to create
a directory with permissions such that only the current user can
access it.
(win_mkdtemp): Create a temporary directory using Windows APIs.
* jit-playback.c: Do not chmod files in Windows. Use LoadLibrary,
FreeLibrary and GetProcAddress instead of libdl.
* jit-result.h, jit-result.c: Introduce result::handle_t to
abstract over the types used for dynamic library handles.
* jit-tempdir.c: Do not use mkdtemp() in Windows, use
win_mkdtemp().
Jeff Law [Thu, 28 May 2020 18:37:08 +0000 (12:37 -0600)]
Finish prior patch
* config/h8300/logical.md (bclrhi_msx): Remove pattern.
Jeff Law [Thu, 28 May 2020 18:28:56 +0000 (12:28 -0600)]
Fix incorrect code generation with bit insns on H8/SX.
* config/h8300/logical.md (HImode H8/SX bit-and splitter): Don't
make a nonzero adjustment to the memory offset.
(b<ior,xor>hi_msx): Turn into a splitter.
Eric Botcazou [Thu, 28 May 2020 17:29:42 +0000 (19:29 +0200)]
Fix off-by-one error in previous commit
The bitregion_end field points to the next bit after the region.
gcc/ChangeLog
* gimple-ssa-store-merging.c (merged_store_group::can_be_merged_into):
Fix off-by-one error.
Marek Polacek [Thu, 28 May 2020 13:54:41 +0000 (09:54 -0400)]
c++: Fix initlist-array12.C
* g++.dg/cpp0x/initlist-array12.C: Fix the definition of
initializer_list for ilp32 target.
Marek Polacek [Thu, 28 May 2020 14:13:16 +0000 (10:13 -0400)]
c++: Fix tmplattr10.C
This test uses C++11 features so should only run in c++11.
* g++.dg/ext/tmplattr10.C: Only run in c++11.
H.J. Lu [Thu, 28 May 2020 14:36:15 +0000 (07:36 -0700)]
Revert "Add missing ChangeLog entry for r11-694"
This reverts commit
7e58fe0e4c2b79a1cf5c93161856e27e1c830162.
H.J. Lu [Thu, 28 May 2020 14:13:46 +0000 (07:13 -0700)]
Add missing ChangeLog entry for r11-694
H.J. Lu [Thu, 28 May 2020 14:07:13 +0000 (07:07 -0700)]
gcc.dg/builtin-bswap-10.c: Check "! int128"
Check "! int128" instead of ilp32 since ILP32 targets can support int128.
gcc/testsuite/
* gcc.dg/builtin-bswap-10.c: Check "! int128" instead of ilp32
Mark Eggleston [Wed, 1 Apr 2020 08:52:41 +0000 (09:52 +0100)]
Fortran : "type is( real(kind(1.)) )" spurious syntax error PR94397
Based on a patch in the comments of the PR. That patch fixed this
problem but caused the test cases for PR93484 to fail. It has been
changed to reduce initialisation expressions if the expression is
not EXPR_VARIABLE and not EXPR_CONSTANT.
2020-05-28 Steven G. Kargl <kargl@gcc.gnu.org>
Mark Eggleston <markeggleston@gcc.gnu.org>
gcc/fortran/
PR fortran/94397
* match.c (gfc_match_type_spec): New variable ok initialised
to true. Set ok with the return value of gfc_reduce_init_expr
called only if the expression is not EXPR_CONSTANT and is not
EXPR_VARIABLE. Add !ok to the check for type not being integer
or the rank being greater than zero.
2020-05-28 Mark Eggleston <markeggleston@gcc.gnu.org>
gcc/testsuite/
PR fortran/94397
* gfortran.dg/pr94397.F90: New test.
Richard Sandiford [Thu, 28 May 2020 12:18:13 +0000 (13:18 +0100)]
aarch64: Fix missed shrink-wrapping opportunity
wb_candidate1 and wb_candidate2 exist for two overlapping cases:
when we use an STR or STP with writeback to allocate the frame,
and when we set up a frame chain record (either using writeback
allocation or not).
However, aarch64_layout_frame was leaving these fields with
legitimate register numbers even if we decided to do neither
of those things. This prevented those registers from being
shrink-wrapped, even though we were otherwise treating them
as normal saves and restores.
The case this patch handles isn't the common case, so it might
not be worth going out of our way to optimise it. But I think
the patch actually makes the output of aarch64_layout_frame more
consistent.
2020-05-28 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* config/aarch64/aarch64.h (aarch64_frame): Add a comment above
wb_candidate1 and wb_candidate2.
* config/aarch64/aarch64.c (aarch64_layout_frame): Invalidate
wb_candidate1 and wb_candidate2 if we decided not to use them.
gcc/testsuite/
* gcc.target/aarch64/shrink_wrap_1.c: New test.
Richard Sandiford [Thu, 28 May 2020 12:18:12 +0000 (13:18 +0100)]
aarch64: Fix segfault in aarch64_expand_epilogue [PR95361]
The stack frame for the function in the testcase consisted of two
SVE save slots. Both saves had been shrink-wrapped, but for different
blocks, meaning that the stack allocation and deallocation were
separate from the saves themselves. Before emitting the deallocation,
we tried to attach a REG_CFA_DEF_CFA note to the preceding instruction,
to redefine the CFA in terms of the stack pointer. But in this case
there was no preceding instruction.
This in practice only happens for SVE because:
(a) We don't try to shrink-wrap wb_candidate* registers even when
we've decided to treat them as normal saves and restores.
I have a fix for that.
(b) Even with (a) fixed, we're (almost?) guaranteed to emit
a stack tie for frames that are 64k or larger, so we end
up hanging the REG_CFA_DEF_CFA note on that instead.
We should only need to redefine the CFA if it was previously
defined in terms of the frame pointer. In other cases the CFA
should already be defined in terms of the stack pointer,
so redefining it is unnecessary but usually harmless.
2020-05-28 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR testsuite/95361
* config/aarch64/aarch64.c (aarch64_expand_epilogue): Assert that
we have at least some CFI operations when using a frame pointer.
Only redefine the CFA if we have CFI operations.
gcc/testsuite/
PR testsuite/95361
* gcc.target/aarch64/sve/pr95361.c: New test.
Richard Biener [Thu, 28 May 2020 10:26:21 +0000 (12:26 +0200)]
remove obsolete code from SLP invariant costing
This removes handling of !SLP_TREE_VECTYPE from invariant costing.
The single caller guards against this case already.
2020-05-28 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_prologue_cost_for_slp): Remove
case for !SLP_TREE_VECTYPE.
(vect_slp_analyze_node_operations): Adjust.
Richard Biener [Wed, 27 May 2020 13:38:20 +0000 (15:38 +0200)]
Code generate externals/invariants during the SLP graph walk
This generates vector defs for externals and invariants during the SLP
walk rather than as part of getting vectorized defs when vectorizing
the users. This is a requirement to make sharing of external/invariant
nodes be reflected in actual code generation.
This temporarily adds a SLP_TREE_VEC_DEFS vector alongside the
SLP_TREE_VEC_STMTS one. Eventually the latter can go away.
2020-05-27 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (_slp_tree::vec_defs): Add.
(SLP_TREE_VEC_DEFS): Likewise.
* tree-vect-slp.c (_slp_tree::_slp_tree): Adjust.
(_slp_tree::~_slp_tree): Likewise.
(vect_mask_constant_operand_p): Remove unused function.
(vect_get_constant_vectors): Rename to...
(vect_create_constant_vectors): ... this. Take the
invariant node as argument and code generate it. Remove
dead code, remove temporary asserts. Pass a NULL stmt_info
to vect_init_vector.
(vect_get_slp_defs): Simplify.
(vect_schedule_slp_instance): Code-generate externals and
invariants using vect_create_constant_vectors.
Richard Biener [Mon, 18 May 2020 14:01:08 +0000 (16:01 +0200)]
make vect_finish_stmt_generation work w/o stmt_vec_info
This makes the call chain below vec_init_vector happy with a NULL
stmt_vec_info which is used as "context".
2020-05-27 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vect_finish_stmt_generation_1):
Conditionalize stmt_info use, assert the new stmt cannot throw
when not specified.
(vect_finish_stmt_generation): Adjust assert.
Richard Biener [Thu, 28 May 2020 08:27:48 +0000 (10:27 +0200)]
tree-optimization/95273 - more vectorizable_shift massaging
Covering all bases in vectorizable_shift is hard - this makes sure
to appropriately handle the case of PR95356 without breaking others.
2020-05-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/95273
PR tree-optimization/95356
* tree-vect-stmts.c (vectorizable_shift): Adjust when and to
what we set the vector type of the shift operand SLP node
again.
* gcc.target/i386/pr95356.c: New testcase.
Andrea Corallo [Wed, 27 May 2020 16:43:48 +0000 (17:43 +0100)]
arm: Fix unwanted fall-throughs in arm.c
gcc/ChangeLog
2020-05-28 Andrea Corallo <andrea.corallo@arm.com>
* config/arm/arm.c (mve_vector_mem_operand): Fix unwanted
fall-throughs.
Pierre-Marie de Rodat [Wed, 27 May 2020 13:25:18 +0000 (15:25 +0200)]
gcc-changelog: enhance handling of renamings
So far, we expect from a commit that renames a file to contain a
changelog entry only for the new name. For example, after the following
commit:
$ git move foo bar
$ git commit
We expect the following changelog:
* bar: Renamed from foo.
Git does not keep track of renamings, only file deletions and additions.
The display of patches then uses heuristics (with config-dependent
parameters) to try to match deleted and added files in the same commit.
It is thus brittle to rely on this information.
This commit modifies changelog processing so that renames are considered
as a deletion of a file plus an addition of another file. The following
changelog is now expected for the above example:
* foo: Move...
* bar: Here.
contrib/
* gcc-changelog/git_email.py (GitEmail.__init__): Interpret file
renamings as a file deletion plus a file addition.
* gcc-changelog/git_repository.py (parse_git_revisions):
Likewise.
* gcc-changelog/test_email.py: New testcase.
* gcc-changelog/test_patches.txt: New testcase.
Martin Liska [Thu, 28 May 2020 08:49:49 +0000 (10:49 +0200)]
Add documentation for missing params.
The patch fixes various issues spotted by check-params-in-docs.py
script. I'm going to install the patch.
gcc/ChangeLog:
PR web/95380
* doc/invoke.texi: Add missing params, remove max-once-peeled-insns and
rename ipcp-unit-growth to ipa-cp-unit-growth.
Martin Liska [Thu, 28 May 2020 08:36:48 +0000 (10:36 +0200)]
Fix check-params-in-docs.py for --help=param.
contrib/ChangeLog:
* check-params-in-docs.py: Update to new format
of help. Apply flake8 corrections.
Martin Liska [Wed, 27 May 2020 18:03:50 +0000 (20:03 +0200)]
mklog: support renaming of files
contrib/ChangeLog:
* mklog.py: Support renaming of files.
One needs unidiff 0.6.0+.
* test_mklog.py: Test it.
liuhongt [Mon, 25 May 2020 08:10:06 +0000 (16:10 +0800)]
Fix nonconforming memory_operand for vpmovq{d,w,b}/vpmovd{w,b}/vpmovwb.
According to Intel SDM, VPMOVQB xmm1/m16 {k1}{z}, xmm2 has 16-bit
memory_operand instead of 128-bit one which existed in current
implementation. Also for other vpmov instructions which have
memory_operand narrower than 128bits.
2020-05-25 Hongtao Liu <hongtao.liu@intel.com>
gcc/ChangeLog
* config/i386/sse.md (*avx512vl_<code>v2div2qi2_store_1): Rename
from *avx512vl_<code>v2div2qi_store and refine memory size of
the pattern.
(*avx512vl_<code>v2div2qi2_mask_store_1): Ditto.
(*avx512vl_<code><mode>v4qi2_store_1): Ditto.
(*avx512vl_<code><mode>v4qi2_mask_store_1): Ditto.
(*avx512vl_<code><mode>v8qi2_store_1): Ditto.
(*avx512vl_<code><mode>v8qi2_mask_store_1): Ditto.
(*avx512vl_<code><mode>v4hi2_store_1): Ditto.
(*avx512vl_<code><mode>v4hi2_mask_store_1): Ditto.
(*avx512vl_<code>v2div2hi2_store_1): Ditto.
(*avx512vl_<code>v2div2hi2_mask_store_1): Ditto.
(*avx512vl_<code>v2div2si2_store_1): Ditto.
(*avx512vl_<code>v2div2si2_mask_store_1): Ditto.
(*avx512f_<code>v8div16qi2_store_1): Ditto.
(*avx512f_<code>v8div16qi2_mask_store_1): Ditto.
(*avx512vl_<code>v2div2qi2_store_2): New define_insn_and_split.
(*avx512vl_<code>v2div2qi2_mask_store_2): Ditto.
(*avx512vl_<code><mode>v4qi2_store_2): Ditto.
(*avx512vl_<code><mode>v4qi2_mask_store_2): Ditto.
(*avx512vl_<code><mode>v8qi2_store_2): Ditto.
(*avx512vl_<code><mode>v8qi2_mask_store_2): Ditto.
(*avx512vl_<code><mode>v4hi2_store_2): Ditto.
(*avx512vl_<code><mode>v4hi2_mask_store_2): Ditto.
(*avx512vl_<code>v2div2hi2_store_2): Ditto.
(*avx512vl_<code>v2div2hi2_mask_store_2): Ditto.
(*avx512vl_<code>v2div2si2_store_2): Ditto.
(*avx512vl_<code>v2div2si2_mask_store_2): Ditto.
(*avx512f_<code>v8div16qi2_store_2): Ditto.
(*avx512f_<code>v8div16qi2_mask_store_2): Ditto.
* config/i386/i386-builtin-types.def: Adjust builtin type.
* config/i386/i386-expand.c: Ditto.
* config/i386/i386-builtin.def: Adjust builtin.
* config/i386/avx512fintrin.h: Ditto.
* config/i386/avx512vlbwintrin.h: Ditto.
* config/i386/avx512vlintrin.h: Ditto.
Richard Biener [Thu, 28 May 2020 07:44:32 +0000 (09:44 +0200)]
testsuite/95363 - fix gcc.dg/vect/bb-slp-pr95271.c for ilp32
This fixes the testcase to avoid out of bound shifts on ilp32 targets.
2020-05-28 Richard Biener <rguenther@suse.de>
PR testsuite/95363
* gcc.dg/vect/bb-slp-pr95271.c: Fix on ilp32 targets.
Martin Liska [Thu, 28 May 2020 06:16:58 +0000 (08:16 +0200)]
gcov-tool: Flexible endian adjustment for merging coverage data
gcc/ChangeLog:
2020-05-27 Dong JianQiang <dongjianqiang2@huawei.com>
PR gcov-profile/95332
* gcov-io.c (gcov_var::endian): Move field.
(from_file): Add IN_GCOV_TOOL check.
* gcov-io.h (gcov_magic): Ditto.
libgcc/ChangeLog:
2020-05-27 Dong JianQiang <dongjianqiang2@huawei.com>
PR gcov-profile/95332
* libgcov-util.c (read_gcda_file): Call gcov_magic.
* libgcov.h (gcov_magic): Disable GCC poison.
GCC Administrator [Thu, 28 May 2020 04:23:50 +0000 (04:23 +0000)]
Daily bump.
Alexandre Oliva [Thu, 28 May 2020 02:16:52 +0000 (23:16 -0300)]
outputs.exp: no lto, linker default output, cdtor temps, empty args
This patch fixes various issues in the testsuite that came up after
the dump/aux output revamp, namely:
- many outputs.exp tests used -flto without checking that LTO was
supported, getting lots of failures. With this patch, we test for LTO
support, and skip -flto tests on platforms that do not support it.
- some linkers error out if an output file is not named, and the
a.{out,exe} construct that we used throughout outputs.exp to match the
default linker output would trigger a bug in tcl globbing. With this
patch, we detect the default linker output early. If none is found,
we arrange to pass -o a.out explicitly in tests that used to test the
default linker output. We now look for the detected default, or for
explicitly-specified output.
- collect2 will leave <execname>.cdtor.* files behind in -save-temps
tests. Ignore them.
- The prepending of -Wl, to file names in ldflags et al was done in a
way that introduced empty arguments when consecutive blanks appeared
in these board configuration knobs. Skip the empty strings between
consecutive blanks to avoid this problem.
gcc/testsuite/ChangeLog:
* lib/gcc-defs.exp: Avoid introducing empty arguments between
consecutive blanks in board linking options.
* gcc.misc-tests/outputs.exp: Likewise. Document
-gsplit-dwarf testing, skip LTO tests if -flto is not
supported, detect the default linker output name, cope with
the need for an explicit executable output.
Max Filippov [Mon, 25 May 2020 02:41:13 +0000 (19:41 -0700)]
gcc: xtensa: delegitimize UNSPEC_PLT
This fixes 'non-delegitimized UNSPEC 3 found in variable location' notes
issued when building libraries which interferes with running tests.
2020-05-27 Max Filippov <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.c (xtensa_delegitimize_address): New
function.
(TARGET_DELEGITIMIZE_ADDRESS): New macro.
Eric Botcazou [Wed, 27 May 2020 22:31:15 +0000 (00:31 +0200)]
Add support for __builtin_bswap128
This patch introduces a new builtin named __builtin_bswap128 on targets
where TImode is supported, i.e. 64-bit targets only in practice. The
implementation simply reuses the existing double word path in optab, so
no routine is added to libgcc (which means that you get two calls to
_bswapdi2 in the worst case).
gcc/ChangeLog:
* builtin-types.def (BT_UINT128): New primitive type.
(BT_FN_UINT128_UINT128): New function type.
* builtins.def (BUILT_IN_BSWAP128): New GCC builtin.
* doc/extend.texi (__builtin_bswap128): Document it.
* builtins.c (expand_builtin): Deal with BUILT_IN_BSWAP128.
(is_inexpensive_builtin): Likewise.
* fold-const-call.c (fold_const_call_ss): Likewise.
* fold-const.c (tree_call_nonnegative_warnv_p): Likewise.
* tree-ssa-ccp.c (evaluate_stmt): Likewise.
* tree-vect-stmts.c (vect_get_data_ptr_increment): Likewise.
(vectorizable_call): Likewise.
* optabs.c (expand_unop): Always use the double word path for it.
* tree-core.h (enum tree_index): Add TI_UINT128_TYPE.
* tree.h (uint128_type_node): New global type.
* tree.c (build_common_tree_nodes): Build it if TImode is supported.
gcc/testsuite/ChangeLog:
* gcc.dg/builtin-bswap-10.c: New test.
* gcc.dg/builtin-bswap-11.c: Likewise.
* gcc.dg/builtin-bswap-12.c: Likewise.
* gcc.target/i386/builtin-bswap-5.c: Likewise.
Jonathan Wakely [Wed, 27 May 2020 21:55:21 +0000 (22:55 +0100)]
libstdc++: Fix atomic<FP>::load (PR 95282)
PR libstdc++/95282
* include/bits/atomic_base.h (__atomic_impl::load): Add
cv-qualifiers to parameter so that _Tp is deduced as the
unqualified type.
* testsuite/29_atomics/atomic_float/95282.cc: New test.
Jonathan Wakely [Wed, 27 May 2020 21:08:15 +0000 (22:08 +0100)]
libstdc++: Fix view adaptors for mixed-const sentinels and iterators (PR 95322)
The bug report is that transform_view's sentinel<false> cannot be
compared to its iterator<true>. The comparison is supposed to use
operator==(iterator<Const>, sentinel<Const>) after converting
sentinel<false> to sentinel<true>. However, the operator== is a hidden
friend so is not a candidate when comparing iterator<true> with
sentinel<false>. The required conversion would only happen if we'd found
the operator, but we can't find the operator until after the conversion
happens.
A new LWG issue has been reported, but not yet assigned a number. The
solution suggested by Casey Carter is to make the hidden friends of the
sentinel types work with iterators of any const-ness, so that no
conversions are required.
Patrick Palka observed that join_view has a similar problem and a
similar fix is used for its sentinel.
PR libstdc++/95322
* include/std/ranges (transform_view::_Sentinel): Allow hidden
friends to work with _Iterator<true> and _Iterator<false>.
(join_view::_Sentinel): Likewise.
* testsuite/std/ranges/adaptors/95322.cc: New test.
Jonathan Wakely [Wed, 27 May 2020 20:58:56 +0000 (21:58 +0100)]
libstdc++: Fix std::reverse_iterator comparisons (PR 94354)
The std::reverse_iterator comparisons have always been implemented only
in terms of equality and less than. In C++98 that made no difference for
reasonable code, because when the underlying operators are the same type
they are required to support all comparisons anyway.
But since LWG 280 it's possible to compare reverse_iterator<X> and
reverse_iterator<Y>, and comparisons between X and Y might not support
the full set of equality and relational operators. This means that it
matters whether we implement operator!= as x.base() != y.base() or
!(x.base() == y.base()), and the current implementation is
non-conforming.
This was already fixed in GCC 10.1 for C++20, this change also fixes it
for all other -std modes.
PR libstdc++/94354
* include/bits/stl_iterator.h (reverse_iterator): Fix comparison
operators to use the correct operations on the underlying
iterators.
* testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
Uros Bizjak [Wed, 27 May 2020 19:46:49 +0000 (21:46 +0200)]
i386: Fix V2SF horizontal add/subtract insns
PFPNACC insn is incorrectly modelled to perform addition and subtraction
of two operands, but in reality it performs horizontal addition and
subtraction:
Instruction: PFPNACC dest,src
Description:
dest[31:0] <- dest[31:0] - dest[63:32];
dest[63:32] <- src[31:0] + src[63:32];
Also, it is not possible to directly replace PFACC with HADDPS and PFNACC
with HSUBPS, because operands in the second word do not match.
PFACC does:
dest[31..0] <- dest[31..0] + dest[63..32];
dest[63..32] <- src[31..0] + src [63..32];
while HADDPS does:
dest[31..0] <- dest[31..0] + dest[63..32];
dest[63..32] <- dest[127..96] + dest[95..64];
dest[95..64] <- src [31..0] + src [64..32];
dest[127:96] <- src [127..96] + src [95..64];
2020-05-27 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
* config/i386/mmx.md (*mmx_haddv2sf3): Remove SSE alternatives.
(mmx_hsubv2sf3): Ditto.
(mmx_haddsubv2sf3): New expander.
(*mmx_haddsubv2sf3): Rename from mmx_addsubv2sf3. Correct
RTL template to model horizontal subtraction and addition.
* config/i386/i386-builtin.def (IX86_BUILTIN_PFPNACC):
Update for rename.
Harald Anlauf [Wed, 27 May 2020 19:20:24 +0000 (21:20 +0200)]
PR fortran/95090 - ICE: identifier overflow
For long module name, derive type and component name, the generated
name-mangled symbol did not fit into a buffer when coarrays were
enabled. Provide sufficiently large temporary.
2020-05-27 Harald Anlauf <anlauf@gmx.de>
gcc/fortran/
PR fortran/95090
* iresolve.c (gfc_get_string): Enlarge temporary for
name-mangling.
gcc/testsuite/
PR fortran/95090
* gfortran.dg/pr95090.f90: New test.
Uros Bizjak [Wed, 27 May 2020 19:02:51 +0000 (21:02 +0200)]
i386: Remove %q modifier from two pmov insn templates [PR95355]
2020-05-27 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
PR target/95355
* config/i386/sse.md
(<mask_codefor>avx512f_<code>v16qiv16si2<mask_name>):
Remove %q operand modifier from insn template.
(avx512f_<code>v8hiv8di2<mask_name>): Ditto.
gcc/testsuite/ChangeLog:
PR target/95355
* gcc.target/i386/pr95355.c: New test.
David Malcolm [Wed, 27 May 2020 13:44:07 +0000 (09:44 -0400)]
jit: use deep unsharing of trees [PR 95314]
PR jit/95314 reports a internal error inside verify_gimple, which
turned out to be due to reusing the result of
gcc_jit_lvalue_get_address in several functions, leading to tree nodes
shared between multiple function bodies.
This patch fixes the issue by adopting the "Deep unsharing" strategy
described in the comment in gimplify.c preceding mostly_copy_tree_r:
to mark all of the jit "frontend"'s expression tree nodes with
TREE_VISITED, and to set LANG_HOOKS_DEEP_UNSHARING, so that "they are
unshared on the first reference within functions when the regular
unsharing algorithm runs".
gcc/jit/ChangeLog:
PR jit/95314
* dummy-frontend.c (LANG_HOOKS_DEEP_UNSHARING): Define to be true.
* jit-playback.h (gcc::jit::playback::rvalue): Mark tree node with
TREE_VISITED.
gcc/testsuite/ChangeLog:
PR jit/95314
* jit.dg/all-non-failing-tests.h: Add test-pr95314-rvalue-reuse.c.
* jit.dg/test-pr95314-rvalue-reuse.c: New test.
David Malcolm [Wed, 27 May 2020 08:04:58 +0000 (04:04 -0400)]
jit: fix libgccjit.info entry [PR 91330]
2020-05-27 Tom Tromey <tromey@gcc.gnu.org>
gcc/jit/ChangeLog:
PR jit/91330
* docs/conf.py (texinfo_documents): Set description.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
Jason Merrill [Wed, 27 May 2020 14:27:25 +0000 (10:27 -0400)]
c++: Handle multiple aggregate overloads [PR95319].
Here, when considering the two 'insert' overloads, we look for aggregate
conversions from the same initializer-list to B<3> or
initializer_list<B<3>>. But since my fix for reshape_init overhead on the
PR14179 testcase we reshaped the initializer-list directly, leading to an
error when we then tried to reshape it differently for the second overload.
gcc/cp/ChangeLog:
PR c++/95319
* decl.c (reshape_init_array_1): Don't reuse in overload context.
gcc/testsuite/ChangeLog:
PR c++/95319
* g++.dg/cpp0x/initlist-array12.C: New test.
Mark Eggleston [Thu, 7 May 2020 07:15:26 +0000 (08:15 +0100)]
Fortran : ICE in gfc_trans_label_assign PR50392
A function may contain an assigned goto. If the the return variable
is an integer a statement can be assigned to it. Prior to this fix
this resulted in an ICE.
2020-05-27 Tobias Burnus <tobias@codesourcery.com>
gcc/fortran/
PR fortran/50392
* trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
delimiters. Add auxiliary variables if a label is assigned to
a return variable. (gfc_gat_fake_result): If the symbol has an
assign attribute set declaration from the symbol's backend
declaration.
2020-05-27 Mark Eggleston <markeggleston@gnu.gcc.org>
gcc/testsuite/
PR fortran/50392
* gfortran.dg/pr50392.f: New test.
Uros Bizjak [Wed, 27 May 2020 14:32:10 +0000 (16:32 +0200)]
i386: Implement V2SF shuffles
2020-05-27 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
* config/i386/mmx.md (mmx_pswapdsf2): Add SSE alternatives.
Enable insn pattern for TARGET_MMX_WITH_SSE.
(*mmx_movshdup): New insn pattern.
(*mmx_movsldup): Ditto.
(*mmx_movss): Ditto.
* config/i386/i386-expand.c (ix86_vectorize_vec_perm_const):
Handle E_V2SFmode.
(expand_vec_perm_movs): Handle E_V2SFmode.
(expand_vec_perm_even_odd): Ditto.
(expand_vec_perm_broadcast_1): Assert that E_V2SFmode
is already handled by standard shuffle patterns.
gcc/testsuite/ChangeLog:
* gcc.target/i386/vperm-v2sf.c: New test.
Jason Merrill [Tue, 26 May 2020 21:27:55 +0000 (17:27 -0400)]
c++: operator<=> and -Wzero-as-null-pointer-constant [PR95242]
In C++20, if there is no viable operator< available, lhs < rhs gets
rewritten to (lhs <=> rhs) < 0, where operator< for the comparison
categories is intended to accept literal 0 on the RHS but not other
integers. We don't want this to produce a warning from
-Wzero-as-null-pointer-constant.
gcc/cp/ChangeLog:
* call.c (build_new_op_1): Suppress
warn_zero_as_null_pointer_constant across comparison of <=> result
to 0.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/spaceship-synth2.C: Add
-Wzero-as-null-pointer-constant.
Jason Merrill [Mon, 25 May 2020 23:04:05 +0000 (19:04 -0400)]
c++: Fix stdcall attribute in template. [PR95222]
Another case that breaks with my fix for PR90750: we shouldn't move type
attributes in TYPENAME context either, as there's no decl for them to move
to.
gcc/cp/ChangeLog:
PR c++/95222
* decl.c (grokdeclarator): Don't shift attributes in TYPENAME
context.
gcc/testsuite/ChangeLog:
PR c++/95222
* g++.dg/ext/tmplattr10.C: New test.
Nathan Sidwell [Wed, 27 May 2020 13:50:15 +0000 (09:50 -0400)]
c++: Revert alias template change [pr95263]
Turns out templates are more complicated than you think, even when you
know they are more complicated than you think. Reverting this change.
PR c++/95263
* pt.c (lookup_template_class_1): Restore alias template mutation.
Richard Biener [Wed, 27 May 2020 11:05:07 +0000 (13:05 +0200)]
tree-optimization/95295 - fix sinking after path merging in new SM code
This fixes a missed sinking of remat stores across unrelated stores
after merging from different paths.
2020-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/95295
* tree-ssa-loop-im.c (sm_seq_valid_bb): Fix sinking after
merging stores from paths.
* gcc.dg/torture/pr95295-3.c: New testcase.
Jonathan Wakely [Wed, 27 May 2020 12:13:19 +0000 (13:13 +0100)]
libstdc++: Add new testcase for comparison category types
Comparing a comparison category type to anything except a literal 0 is
undefined. This verifies that at least some misuses are diagnosed at
compile time.
* testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
Richard Biener [Wed, 27 May 2020 09:42:35 +0000 (11:42 +0200)]
tree-optimization/95356 - fix vectorizable_shift vector types
This makes sure to always use the same vector type for the shift
operand as for the shifted operand.
2020-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/95356
* tree-vect-stmts.c (vectorizable_shift): Adjust vector
type for the shift operand.
Richard Biener [Wed, 27 May 2020 09:18:01 +0000 (11:18 +0200)]
tree-optimization/95335 - fix SLP nodes dropped to invariant
When we drop a SLP node to invariant because we cannot vectorize it
we have to make sure to revisit it in the users.
2020-05-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/95335
* tree-vect-slp.c (vect_slp_analyze_node_operations): Reset
lvisited for nodes made external.
* gcc.dg/vect/bb-slp-pr95335.c: New testcase.
Martin Liska [Tue, 26 May 2020 13:32:32 +0000 (15:32 +0200)]
Add new git-backport.py script.
contrib/ChangeLog:
* gcc-git-customization.sh: Use git-backport.py to drop
all changes for ChangeLog files.
* git-backport.py: New file.
Martin Liska [Wed, 27 May 2020 09:38:41 +0000 (11:38 +0200)]
Bump version to 11.
gcc/ada/ChangeLog:
* gnatvsn.ads: Bump Library_Version to 11.
Richard Biener [Mon, 25 May 2020 14:10:12 +0000 (16:10 +0200)]
Add debug (slp_tree) and dump infrastructure for this
This adds an alternate debug_dump_context similar to the one for
selftests but for interactive debugging routines. This allows
to share code between user-visible dumping via the dump_* API
and those debugging routines. The primary driver was SLP node
dumping which wasn't accessible from inside a gdb session up to
now.
2020-05-27 Richard Biener <rguenther@suse.de>
* dump-context.h (debug_dump_context): New class.
(dump_context): Make it friend.
* dumpfile.c (debug_dump_context::debug_dump_context):
Implement.
(debug_dump_context::~debug_dump_context): Likewise.
* tree-vect-slp.c: Include dump-context.h.
(vect_print_slp_tree): Dump a single SLP node.
(debug): New overload for slp_tree.
(vect_print_slp_graph): Rename from vect_print_slp_tree and
use that.
(vect_analyze_slp_instance): Adjust.
Jakub Jelinek [Wed, 27 May 2020 08:25:56 +0000 (10:25 +0200)]
openmp: Fix up omp_declare_variant{s,_alt} htab handling
This patch fixes a GC ICE. During debugging, I've found that during
gimplification we can actually call omp_resolve_declare_variant multiple
times and it would create a new magic declare_variant_alt FUNCTION_DECL
each time, which is undesirable, once we have such a decl, we should just
use that. The other problem is that there was no cgraph node removal hook.
As the omp_declare_variants htab is used just early during gimplification,
we can just clear the whole htab, rather than trying to lookup and remove
a particular entry. The other hash table is used later as well and that
one uses just DECL_UID as hash, so in that case the patch removes the elt.
2020-05-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/95315
* omp-general.c (omp_declare_variant_remove_hook): New function.
(omp_resolve_declare_variant): Always return base if it is already
declare_variant_alt magic decl itself. Register
omp_declare_variant_remove_hook as cgraph node removal hook.
* gcc.dg/gomp/pr95315.c: New test.
Jakub Jelinek [Wed, 27 May 2020 08:24:09 +0000 (10:24 +0200)]
Rewrite maintainer-scripts/update_version_git
This patch rewrites update_version_git to be just a thin wrapper around
Martin's new python script. This just arranges to check out the gcc
repo in a temporary directory, copy out the contrib scripts so that
the running script doesn't change with branch checkouts and runs the script.
I've run it today manually but hopefully we can do it from cron again
from tomorrow.
2020-05-27 Jakub Jelinek <jakub@redhat.com>
* update_version_git: Rewrite using
contrib/gcc-changelog/git_update_version.py.
Martin Liska [Wed, 27 May 2020 08:16:21 +0000 (10:16 +0200)]
Rename commit-mklog alias to gcc-commit-mklog.
contrib/ChangeLog:
* gcc-git-customization.sh: Rename
commit-mklog to gcc-commit-mklog.
Martin Liska [Tue, 26 May 2020 07:08:31 +0000 (09:08 +0200)]
prepare-commit-msg: Save diff if requested by user.
contrib/ChangeLog:
* prepare-commit-msg: Save diff to a file if
the GCC_GIT_DIFF_FILE variable is set.
GCC Administrator [Wed, 27 May 2020 07:45:56 +0000 (07:45 +0000)]
Daily bump.
Jeff Law [Wed, 27 May 2020 04:14:40 +0000 (22:14 -0600)]
Fix pr20601-1.c on the H8
gcc/
* config/h8300/testcompare.md (tst_extzv_1_n): Do not accept constants
for the primary input operand.
(tstsi_variable_bit_qi): Similarly.
David Malcolm [Tue, 26 May 2020 13:28:16 +0000 (09:28 -0400)]
jit: fix missing types for builtins [PR 95306]
PR jit/95306 reports that attempts to use builtins
__builtin_sadd_overflow" and "__builtin_memcpy" via
gcc_jit_context_get_builtin_function lead to inscrutable error
messages of the form:
unimplemented primitive type for builtin: 42
and:
unimplemented primitive type for builtin: 38
The root cause is that jit-builtins.c only implements a subset
of the types defined via DEF_PRIMITIVE_TYPE in builtin-types.def.
This patch:
- implements enough types to enable the above two builtins to be
referenced
- documents gcc_jit_context_get_builtin_function, and notes the
limitation that not all types are supported (supporting
some of them would take a lot of extra work)
- improves the error message for the unsupported cases
- adds a testcase for __builtin_memcpy. This required
jit_langhook_global_bindings_p to be implemented (otherwise
the assertion there failed deep inside "expand" on the builtin)
- adds test coverage for the above
gcc/jit/ChangeLog:
PR jit/95306
* docs/topics/functions.rst
(gcc_jit_context_get_builtin_function): Document.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* dummy-frontend.c (jit_langhook_global_bindings_p): Remove
gcc_unreachable.
* jit-builtins.c (type_names): New array.
(get_string_for_type_id): New function.
(gcc::jit::builtins_manager::make_primitive_type): Show name of
type in error messages. Update cases to reflect the order in
builtin-types.def. Implement cases for BT_INT8, BT_INT16,
BT_UINT8, BT_CONST_PTR, BT_VOLATILE_PTR, BT_INT_PTR, BT_FLOAT_PTR,
BT_CONST_DOUBLE_PTR, BT_SIZE, BT_CONST_SIZE.
gcc/testsuite/ChangeLog:
PR jit/95306
* jit.dg/all-non-failing-tests.h: Add test-builtin-memcpy.c and
test-pr95306-builtin-types.c.
* jit.dg/test-builtin-memcpy.c: New test.
* jit.dg/test-error-gcc_jit_context_get_builtin_function-unimplemented-type.c:
New test.
* jit.dg/test-pr95306-builtin-types.c: New test.
Harald Anlauf [Tue, 26 May 2020 21:29:52 +0000 (23:29 +0200)]
PR fortran/95104 - Segfault on a legal WAIT statement
Referencing a unit in a WAIT statement that has not been opened before
resulted in a NULL pointer dereference. Check for this condition.
2020-05-26 Harald Anlauf <anlauf@gmx.de>
libgfortran/
PR libfortran/95104
* io/transfer.c (st_wait_async): Do not dereference NULL pointer.
gcc/testsuite/
PR libfortran/95104
* gfortran.dg/pr95104.f90: New test.
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
Patrick Palka [Tue, 26 May 2020 20:17:34 +0000 (16:17 -0400)]
libstdc++: Fix common_iterator::operator-> [PR95322]
This patch fixes the definition of common_iterator::operator-> when the
underlying iterator's operator* returns a non-reference.
The first problem is that the class __detail::_Common_iter_proxy is used
unqualified. Fixing that revealed another problem: the class's template
friend declaration of common_iterator doesn't match up with the
definition of common_iterator, because the friend declaration isn't
constrained.
If we try to make the friend declaration match up by adding constraints,
we run into frontend bug PR93467. So we currently can't correctly
express this friend relation between __detail::_Common_iter_proxy and
common_iterator.
As a workaround to this frontend bug, this patch moves the definition of
_Common_iter_proxy into the class template of common_iterator so that we
could instead express the friend relation via the injected-class-name.
(This bug was found when attempting to use views::common to work around
the compile failure with the testcase in PR95322.)
libstdc++-v3/ChangeLog:
PR libstdc++/95322
* include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
Remove and instead define it ...
(common_iterator::_Proxy): ... here.
(common_iterator::operator->): Use it.
* testsuite/24_iterators/common_iterator/2.cc: New test.
* testsuite/std/ranges/adaptors/95322.cc: New test.
Harald Anlauf [Tue, 26 May 2020 19:21:19 +0000 (21:21 +0200)]
PR libfortran/95195 - improve runtime error for namelist i/o to unformatted file
Namelist input/output to unformatted files is prohibited.
Generate useful runtime errors instead instead of misleading ones.
2020-05-26 Harald Anlauf <anlauf@gmx.de>
libgfortran/
PR fortran/95195
* io/transfer.c (finalize_transfer): Generate runtime error for
namelist input/output to unformatted file.
gcc/testsuite/
PR fortran/95195
* gfortran.dg/namelist_97.f90: New test.
Eric Botcazou [Tue, 26 May 2020 19:21:08 +0000 (21:21 +0200)]
Fix issue with LTO bootstrap
gcc/ada/ChangeLog
PR ada/95333
* gcc-interface/decl.c (gnat_to_gnu_param): Never make a variant of
the type.
Harald Anlauf [Tue, 26 May 2020 19:19:19 +0000 (21:19 +0200)]
PR fortran/95089 - ICE in gfc_get_derived_type, at fortran/trans-types.c:2843
For long module name, derive type and component name, the
generated name-mangled symbol did not fit into a buffer when
coarrays were enabled. Provide sufficiently large temporary.
2020-05-26 Harald Anlauf <anlauf@gmx.de>
gcc/fortran/
PR fortran/95089
* trans-types.c (gfc_get_derived_type): Enlarge temporary to hold
mangled name "_caf_symbol".
gcc/testsuite/
PR fortran/95089
* gfortran.dg/pr95089.f90: New test.
Uros Bizjak [Tue, 26 May 2020 16:51:37 +0000 (18:51 +0200)]
i386: Add SSE2 alternative to mmx_pswapd2vsi2
2020-05-26 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
* config/i386/mmx.md (mmx_pswapdv2si2): Add SSE2 alternative.
Tobias Burnus [Tue, 26 May 2020 16:24:28 +0000 (18:24 +0200)]
[LTO/offloading] Fix offloading-compilation ICE without -flto (PR84320)
gcc/ChangeLog:
PR ipa/95320
* ipa-utils.h (odr_type_p): Also permit calls with
only flag_generate_offload set.
Pierre-Marie de Rodat [Tue, 26 May 2020 14:22:16 +0000 (16:22 +0200)]
gcc-changelog: handle entries with multi-line file lists
This extends the ChangeLog entries parsing machinery to handle entries
that cover multiple files spanning over multiple lines. For instance:
* first_file_patched.c, second_file_patched.c, third_file_patched.c,
fourth_file_patched.c: Do things.
contrib/
* gcc-changelog/git_commit.py (ChangeLogEntry): Handle entries
with multi-line file lists.
* gcc-changelog/test_email.py: New testcase.
* gcc-changelog/test_patches.txt: Likewise.
Pierre-Marie de Rodat [Tue, 26 May 2020 14:13:28 +0000 (16:13 +0200)]
gcc-changelog: remove file descriptor leaks
Currently, running gcc-changelog's unit tests may clutter the output
with tons of warnings such as:
.../contrib/gcc-changelog/git_email.py:40: ResourceWarning: unclosed
file <_io.TextIOWrapper name='/tmp/tmpt5okd4qp.patch' mode='r'
encoding='UTF-8'>
lines = open(self.filename).read().splitlines()
ResourceWarning: Enable tracemalloc to get the object allocation
traceback
This commit fixes these leaks, which restores a clean testsuite output.
contrib/
* gcc-changelog/git_update_version.py: Close file objects after
use.
* gcc-changelog/git_email.py: Likewise.
* gcc-changelog/test_email.py: Likewise.
David Malcolm [Mon, 25 May 2020 13:13:16 +0000 (09:13 -0400)]
jit: fix sphinx formatting issues in docs
gcc/jit/ChangeLog:
* docs/topics/compatibility.rst: Fix underline.
Fix missing labels.
* docs/topics/types.rst: Fix missing blank line.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
David Malcolm [Sun, 24 May 2020 22:36:36 +0000 (18:36 -0400)]
jit: check for void types [PR 95296]
PR jit/95296 reports an ICE when using libgccjit to create a local of void
type.
This patch adds checking to various API entrypoints in libgccjit.c so that
they fail gracefully with an error if the client code attempts to create
various kinds of rvalues or types involving void types.
The patch documents these and various pre-existing restrictions on types
in the API.
gcc/jit/ChangeLog:
PR jit/95296
* docs/topics/expressions.rst (Unary Operations): Document that
result_type of gcc_jit_context_new_unary_op must be a numeric type.
(Binary Operations): Likewise for gcc_jit_context_new_binary_op.
(Global variables): Document that "type" of
gcc_jit_context_new_global must be non-`void`.
* docs/topics/function-pointers.rst
(gcc_jit_context_new_function_ptr_type): Document that the
param_types must be non-void, but that return_type may be.
* docs/topics/functions.rst (Params): Document that
gcc_jit_context_new_param's type must be non-void.
(Functions): Likewise for gcc_jit_function_new_local.
* docs/topics/types.rst (gcc_jit_context_new_array_type): Document
that the type must be non-void.
(gcc_jit_context_new_field): Likewise.
* docs/_build/texinfo/Makefile: Regenerate.
* docs/_build/texinfo/libgccjit.texi: Regenerate.
* libgccjit.c (gcc_jit_context_new_array_type): Fail if
element_type is void.
(gcc_jit_context_new_field): Likewise for "type".
(gcc_jit_context_new_function_ptr_type): Likewise for each
element of param_types.
(gcc_jit_context_new_param): Likewise for "type".
(gcc_jit_context_new_global): Likewise.
(gcc_jit_function_new_local): Likewise.
(gcc_jit_type_get_aligned): Likewise.
gcc/testsuite/ChangeLog:
PR jit/95296
* jit.dg/test-error-gcc_jit_context_new_global-void-type.c: New
test.
* jit.dg/test-error-gcc_jit_function_new_local-void-type.c: New
test.
* jit.dg/test-fuzzer.c (fuzzer_init): Allow for make_random_type
to return NULL.
(get_random_type): Allow for elements in f->types to be NULL.
Alexandre Oliva [Tue, 26 May 2020 14:02:21 +0000 (11:02 -0300)]
do not skip validation of switch after %<opt
After the patch that revamped dump and aux outputs, GCC compilation
drivers built without Ada would reject -d* options. Such options
would only be validated because of the %{d*} in Ada lang specs, though
other languages had it as well. Other languages had %< specs that had
to be there before %{d*} %:dumps(), while Ada was missing them.
Adding them to Ada brought the same problem to compilers that had Ada
enabled.
The reason validation failed was that they mishandled %< specs,
advancing past the beginning of the next spec, causing it not to be
handled. Since %{d*} appeared after an odd %<, it was thus ignored.
The logic of validate_switches originally skipped the closing brace
that matched the opening brace, but this shouldn't happen for %<.
Fixed by letting validate_switches know whether it is handling a
braced group or a single atom, and behaving accordingly.
gcc/ChangeLog:
* gcc.c (validate_switches): Add braced parameter. Adjust all
callers. Expected and skip trailing brace only if braced.
Return after handling one atom otherwise.
(DUMPS_OPTIONS): New.
(cpp_debug_options): Define in terms of it.
gcc/ada/ChangeLog:
* gcc-interface/lang-specs.h (ADA_DUMPS_OPTIONS): Define in
terms of DUMPS_OPTIONS. Replace occurrences of %{d*} %:dumps
with it.
Richard Biener [Tue, 26 May 2020 07:47:26 +0000 (09:47 +0200)]
tree-optimization/95327 - fix another vectorizable_shift const SLP op
This fixes another case where we fail to set the type on a SLP
constant operand in vectorizable_shift.
2020-05-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/95327
* tree-vect-stmts.c (vectorizable_shift): Compute op1_vectype
when we are not using a scalar shift.
Uros Bizjak [Tue, 26 May 2020 13:17:51 +0000 (15:17 +0200)]
i386: Implement V2SI and V4HI shuffles
2020-05-26 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
* config/i386/mmx.md (*mmx_pshufd_1): New insn pattern.
* config/i386/i386-expand.c (ix86_vectorize_vec_perm_const):
Handle E_V2SImode and E_V4HImode.
(expand_vec_perm_even_odd_1): Handle E_V4HImode.
Assert that E_V2SImode is already handled.
(expand_vec_perm_broadcast_1): Assert that E_V2SImode
is already handled by standard shuffle patterns.
gcc/testsuite/ChangeLog:
* gcc.target/i386/vperm-v2si.c: New test.
* gcc.target/i386/vperm-v4hi.c: Ditto.
Iain Sandoe [Tue, 26 May 2020 07:57:32 +0000 (08:57 +0100)]
coroutines, testsuite: Fix co-ret-17-void-ret-coro.C.
This was a bad testcase, found with fsanitize=address; the final suspend
is 'suspend never' which flows off the end of the coroutine destroying
the promise and the frame. At that point access via the handle is an
error. Fixed by checking that the promise is destroyed via a global var.
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/torture/co-ret-17-void-ret-coro.C: Check for
promise destruction via a global variable.
Martin Liska [Tue, 26 May 2020 10:11:24 +0000 (12:11 +0200)]
Support --dry-mode in git_update_version.py.
The patch improves the script based on Jakub's needs,
I'm going to install the patch.
contrib/ChangeLog:
* gcc-changelog/git_update_version.py: Add 2 new options.
Jan Hubicka [Tue, 26 May 2020 08:14:38 +0000 (10:14 +0200)]
Simplify types of TYPE_VALUES in enumeral types
streaming code assumes that INTEGER_CST never appears in non-trivial component.
This is not true and we sometimes stream such components which sort of silently
works but breaks our IL invariant about tree sharing. This patch fixes one
instance of this problem where ENUMERAL_TYPE lists all its valids in TYPE_VALUES
that with some FEs (like Ada and C++) are having the enumeral type as a type
while in other FEs (like C) are simple integer types.
I convert them all to integers which also increases chance that they will be
shared with other integer constants at stream time.
gcc/
* tree.c (free_lang_data_in_type): Simpify types of TYPE_VALUES in
enumeral types.
Jakub Jelinek [Tue, 26 May 2020 07:35:21 +0000 (09:35 +0200)]
openmp: Ensure copy ctor for composite distribute parallel for class iterators is instantiated [PR95197]
During gimplification omp_finish_clause langhook is called in several places
to add the language specific info to the clause like what default/copy ctors,
dtors and assignment operators should be used.
Unfortunately, if it refers to some not yet instantiated method, during
gimplification it is too late and the methods will not be instantiated
anymore. For other cases, the genericizer has code to detect those and
instantiate whatever is needed, this change adds the same for
distribute parallel for class iterators where we under the hood need
a copy constructor for the iterator to implement it.
2020-05-26 Jakub Jelinek <jakub@redhat.com>
PR c++/95197
* gimplify.c (find_combined_omp_for): Move to omp-general.c.
* omp-general.h (find_combined_omp_for): Declare.
* omp-general.c: Include tree-iterator.h.
(find_combined_omp_for): New function, moved from gimplify.c.
* cp-gimplify.c: Include omp-general.h.
(cp_genericize_r) <case OMP_DISTRIBUTE>: For class iteration
variables in composite distribute parallel for, instantiate copy
ctor of their types.
Alexandre Oliva [Tue, 26 May 2020 07:30:18 +0000 (04:30 -0300)]
accept for dir/ChangeLog entries
I've long introduced ChangeLog entries as "for dir/ChangeLog", a
format adopted by GNU CVS-Utilities some 20 years ago. My commits
have been formatted like this forever.
This patch makes it acceptable for git gcc-verify.
contrib/ChangeLog:
* gcc-changelog/git_commit.py (changelog_regex): Accept optional
'for' prefix.
Alexandre Oliva [Tue, 26 May 2020 07:30:15 +0000 (04:30 -0300)]
revamp dump and aux output names
This patch simplifies (!!!) the logic governing the naming of dump
files and auxiliary output files in the driver, in the compiler, and
in the LTO wrapper. No changes are made to the naming of primary
outputs, there are often ways to restore past behavior, and a number
of inconsistencies are fixed. Some internal options are removed
(-auxbase and -auxbase-strip), sensible existing uses of -dumpdir and
-dumpbase options remain unchanged, additional useful cases are added,
making for what is still admittedly quite complex. Extensive
documentation and testcases provide numerous examples, from normal to
corner cases.
The most visible changes are:
- aux and dump files now always go in the same directory, that
defaults to the directory of the primary output, but that can be
overridden with -dumpdir, -save-temps=*, or, preserving past behavior,
with a -dumpbase with a directory component.
- driver and compiler now have the same notion of naming of auxiliary
outputs, e.g. .dwo files will no longer be in one location while the
debug info suggests they are elsewhere, and -save-temps and .dwo
auxiliary outputs now go in the same location as .su, .ci and
coverage data, with consistent naming.
- explicitly-specified primary output names guide not only the
location of aux and dump outputs: the output base name is also used in
their base name, as a prefix when also linking (e.g. foo.c bar.c -o
foobar creates foobar-foo.dwo and foobar-bar.dwo with -gsplit-dwarf),
or as the base name instead of the input name (foo.c -c -o whatever.o
creates whatever.su rather than foo.su with -fstack-usage). The
preference for the input file base name, quite useful for our
testsuite, can be restored with -dumpbase "". When compiling and
linking tests in the testsuite with additional inputs, we now use this
flag. Files named in dejagnu board ldflags, libs, and ldscripts are
now quoted in the gcc testsuite with -Wl, so that they are not counted
as additional inputs by the compiler driver.
- naming a -dumpbase when compiling multiple sources used to cause
dumps from later compiles to overwrite those of earlier ones; it is
now used as a prefix when compiling multiple sources, like an
executable name above.
- the dumpbase, explicitly specified or computed from output or input
names, now also governs the naming of aux outputs; since aux outputs
usually replaced the suffix from the input name, while dump outputs
append their own additional suffixes, a -dumpbase-ext option is
introduced to enable a chosen suffix to be dropped from dumpbase to
form aux output names.
- LTO dump and aux outputs were quite a mess, sometimes leaking
temporary output names into -save-temps output names, sometimes
conversely generating desirable aux outputs in temporary locations.
They now obey the same logic of compiler aux and dump outputs, landing
in the expected location and taking the linker output name or an
explicit dumpbase overrider into account.
- Naming of -fdump-final-insns outputs now follows the dump file
naming logic for the .gkd files, and the .gk dump files generated in
the second -fcompare-debug compilation get the .gk inserted before the
suffix that -dumpbase-ext drops in aux outputs.
gcc/ChangeLog:
* common.opt (aux_base_name): Define.
(dumpbase, dumpdir): Mark as Driver options.
(-dumpbase, -dumpdir): Likewise.
(dumpbase-ext, -dumpbase-ext): New.
(auxbase, auxbase-strip): Drop.
* doc/invoke.texi (-dumpbase, -dumpbase-ext, -dumpdir):
Document.
(-o): Introduce the notion of primary output, mention it
influences auxiliary and dump output names as well, add
examples.
(-save-temps): Adjust, move examples into -dump*.
(-save-temps=cwd, -save-temps=obj): Likewise.
(-fdump-final-insns): Adjust.
* dwarf2out.c (gen_producer_string): Drop auxbase and
auxbase_strip; add dumpbase_ext.
* gcc.c (enum save_temps): Add SAVE_TEMPS_DUMP.
(save_temps_prefix, save_temps_length): Drop.
(save_temps_overrides_dumpdir): New.
(dumpdir, dumpbase, dumpbase_ext): New.
(dumpdir_length, dumpdir_trailing_dash_added): New.
(outbase, outbase_length): New.
(The Specs Language): Introduce %". Adjust %b and %B.
(ASM_FINAL_SPEC): Use %b.dwo for an aux output name always.
Precede object file with %w when it's the primary output.
(cpp_debug_options): Do not pass on incoming -dumpdir,
-dumpbase and -dumpbase-ext options; recompute them with
%:dumps.
(cc1_options): Drop auxbase with and without compare-debug;
use cpp_debug_options instead of dumpbase. Mark asm output
with %w when it's the primary output.
(static_spec_functions): Drop %:compare-debug-auxbase-opt and
%:replace-exception. Add %:dumps.
(driver_handle_option): Implement -save-temps=*/-dumpdir
mutual overriding logic. Save dumpdir, dumpbase and
dumpbase-ext options. Do not save output_file in
save_temps_prefix.
(adds_single_suffix_p): New.
(single_input_file_index): New.
(process_command): Combine output dir, output base name, and
dumpbase into dumpdir and outbase.
(set_collect_gcc_options): Pass a possibly-adjusted -dumpdir.
(do_spec_1): Optionally dumpdir instead of save_temps_prefix,
and outbase instead of input_basename in %b, %B and in
-save-temps aux files. Handle empty argument %".
(driver::maybe_run_linker): Adjust dumpdir and auxbase.
(compare_debug_dump_opt_spec_function): Adjust gkd dump file
naming. Spec-quote the computed -fdump-final-insns file name.
(debug_auxbase_opt): Drop.
(compare_debug_self_opt_spec_function): Drop auxbase-strip
computation.
(compare_debug_auxbase_opt_spec_function): Drop.
(not_actual_file_p): New.
(replace_extension_spec_func): Drop.
(dumps_spec_func): New.
(convert_white_space): Split-out parts into...
(quote_string, whitespace_to_convert_p): ... these. New.
(quote_spec_char_p, quote_spec, quote_spec_arg): New.
(driver::finalize): Release and reset new variables; drop
removed ones.
* lto-wrapper.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Define if...
(TARGET_EXECUTABLE_SUFFIX): ... is defined; define this to the
empty string otherwise.
(DUMPBASE_SUFFIX): Drop leading period.
(debug_objcopy): Use concat.
(run_gcc): Recognize -save-temps=* as -save-temps too. Obey
-dumpdir. Pass on empty dumpdir and dumpbase with a directory
component. Simplify temp file names.
* opts.c (finish_options): Drop aux base name handling.
(common_handle_option): Drop auxbase-strip handling.
* toplev.c (print_switch_values): Drop auxbase, add
dumpbase-ext.
(process_options): Derive aux_base_name from dump_base_name
and dump_base_ext.
(lang_dependent_init): Compute dump_base_ext along with
dump_base_name. Disable stack usage and callgraph-info during
lto generation and compare-debug recompilation.
gcc/fortran/ChangeLog:
* options.c (gfc_get_option_string): Drop auxbase, add
dumpbase_ext.
gcc/ada/ChangeLog:
* gcc-interface/lang-specs.h: Drop auxbase and auxbase-strip.
Use %:dumps instead of -dumpbase. Add %w for implicit .s
primary output.
* switch.adb (Is_Internal_GCC_Switch): Recognize dumpdir and
dumpbase-ext. Drop auxbase and auxbase-strip.
lto-plugin/ChangeLog:
* lto-plugin.c (skip_in_suffix): New.
(exec_lto_wrapper): Use skip_in_suffix and concat to build
non-temporary output names.
(onload): Look for -dumpdir in COLLECT_GCC_OPTIONS, and
override link_output_name with it.
contrib/ChangeLog:
* compare-debug: Adjust for .gkd files named as dump files,
with the source suffix rather than the object suffix.
gcc/testsuite/ChangeLog:
* gcc.misc-tests/outputs.exp: New.
* gcc.misc-tests/outputs-0.c: New.
* gcc.misc-tests/outputs-1.c: New.
* gcc.misc-tests/outputs-2.c: New.
* lib/gcc-defs.exp (gcc_adjusted_linker_flags): New.
(gcc_adjust_linker_flags): New.
(dg-additional-files-options): Call it. Pass -dumpbase ""
when there are additional sources.
* lib/profopt.exp (profopt-execute): Pass the executable
suffix with -dumpbase-ext.
* lib/scandump.exp (dump-base): Mention -dumpbase "" use.
* lib/scanltranstree.exp: Adjust dump suffix expectation.
* lib/scanwpaipa.exp: Likewise.
Martin Liska [Tue, 26 May 2020 07:01:41 +0000 (09:01 +0200)]
Allow ChangeLog entries for ignored location.
We should be able to generate ChangeLog entries for
commits like
b3d566f570f4416299240b51654b70c74f6cba6a.
I'm going to install the patch.
contrib/ChangeLog:
* gcc-changelog/git_commit.py: Parse changelog entries for
ignored locations.
* gcc-changelog/test_email.py: Add new test for it.
* gcc-changelog/test_patches.txt: Likewise.
Martin Liska [Mon, 25 May 2020 18:55:29 +0000 (20:55 +0200)]
Update merge.sh to reflect usage of git.
After switching to GIT, we should use it in libsanitizer
merge script. I'll do merge from master as soon as
PR95311 gets fixed.
I'm going to install the patch.
libsanitizer/ChangeLog:
* LOCAL_PATCHES: Use git hash instead of SVN id.
* merge.sh: Use git instead of VCS. Update paths
relative to upstream git repository.
Jason Merrill [Fri, 22 May 2020 22:40:35 +0000 (18:40 -0400)]
gcc-git: Add prepare-commit-msg hook.
This patch introduces a prepare-commit-msg hook that appends a ChangeLog
skeleton to a commit message when the GCC_FORCE_MKLOG environment variable
is set, and a 'git commit-mklog' command set that variable while running
'git commit'.
contrib/ChangeLog:
* prepare-commit-msg: New file.
* gcc-git-customization.sh: Install it. Add commit-mklog alias.
* mklog.py: Add new option -c which appends
to a ChangeLog file.
Martin Liska [Tue, 26 May 2020 06:07:30 +0000 (08:07 +0200)]
Revert "Add ChangeLog entry for my last commit."
This reverts commit
cfdff3eeb902958d3eefe60d5712d64e2367843f.