aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-05-28Fix check-params-in-docs.py for --help=param.Martin Liska1-7/+10
contrib/ChangeLog: * check-params-in-docs.py: Update to new format of help. Apply flake8 corrections.
2020-05-28mklog: support renaming of filesMartin Liska2-0/+34
contrib/ChangeLog: * mklog.py: Support renaming of files. One needs unidiff 0.6.0+. * test_mklog.py: Test it.
2020-05-28Fix nonconforming memory_operand for vpmovq{d,w,b}/vpmovd{w,b}/vpmovwb.liuhongt7-283/+421
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.
2020-05-28testsuite/95363 - fix gcc.dg/vect/bb-slp-pr95271.c for ilp32Richard Biener1-7/+10
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.
2020-05-28gcov-tool: Flexible endian adjustment for merging coverage dataMartin Liska4-7/+9
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.
2020-05-28Daily bump.GCC Administrator10-1/+277
2020-05-27outputs.exp: no lto, linker default output, cdtor temps, empty argsAlexandre Oliva2-48/+119
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.
2020-05-27gcc: xtensa: delegitimize UNSPEC_PLTMax Filippov1-0/+24
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.
2020-05-28Add support for __builtin_bswap128Eric Botcazou16-5/+125
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.
2020-05-27libstdc++: Fix atomic<FP>::load (PR 95282)Jonathan Wakely2-1/+36
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.
2020-05-27libstdc++: Fix view adaptors for mixed-const sentinels and iterators (PR 95322)Jonathan Wakely2-47/+68
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.
2020-05-27libstdc++: Fix std::reverse_iterator comparisons (PR 94354)Jonathan Wakely2-5/+105
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.
2020-05-27i386: Fix V2SF horizontal add/subtract insnsUros Bizjak2-33/+46
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.
2020-05-27PR fortran/95090 - ICE: identifier overflowHarald Anlauf2-1/+21
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.
2020-05-27i386: Remove %q modifier from two pmov insn templates [PR95355]Uros Bizjak2-2/+22
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.
2020-05-27jit: use deep unsharing of trees [PR 95314]David Malcolm4-1/+75
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.
2020-05-27jit: fix libgccjit.info entry [PR 91330]David Malcolm2-3/+3
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.
2020-05-27c++: Handle multiple aggregate overloads [PR95319].Jason Merrill2-1/+27
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.
2020-05-27Fortran : ICE in gfc_trans_label_assign PR50392Mark Eggleston2-3/+20
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.
2020-05-27i386: Implement V2SF shufflesUros Bizjak3-20/+124
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.
2020-05-27c++: operator<=> and -Wzero-as-null-pointer-constant [PR95242]Jason Merrill2-0/+4
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.
2020-05-27c++: Fix stdcall attribute in template. [PR95222]Jason Merrill2-1/+53
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.
2020-05-27c++: Revert alias template change [pr95263]Nathan Sidwell2-15/+25
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.
2020-05-27tree-optimization/95295 - fix sinking after path merging in new SM codeRichard Biener2-2/+22
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.
2020-05-27libstdc++: Add new testcase for comparison category typesJonathan Wakely1-0/+46
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.
2020-05-27tree-optimization/95356 - fix vectorizable_shift vector typesRichard Biener1-1/+1
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.
2020-05-27tree-optimization/95335 - fix SLP nodes dropped to invariantRichard Biener2-1/+19
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.
2020-05-27Add new git-backport.py script.Martin Liska2-1/+61
contrib/ChangeLog: * gcc-git-customization.sh: Use git-backport.py to drop all changes for ChangeLog files. * git-backport.py: New file.
2020-05-27Bump version to 11.Martin Liska1-1/+1
gcc/ada/ChangeLog: * gnatvsn.ads: Bump Library_Version to 11.
2020-05-27Add debug (slp_tree) and dump infrastructure for thisRichard Biener3-12/+84
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.
2020-05-27openmp: Fix up omp_declare_variant{s,_alt} htab handlingJakub Jelinek2-0/+38
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.
2020-05-27Rewrite maintainer-scripts/update_version_gitJakub Jelinek1-67/+10
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.
2020-05-27Rename commit-mklog alias to gcc-commit-mklog.Martin Liska1-3/+1
contrib/ChangeLog: * gcc-git-customization.sh: Rename commit-mklog to gcc-commit-mklog.
2020-05-27prepare-commit-msg: Save diff if requested by user.Martin Liska1-0/+5
contrib/ChangeLog: * prepare-commit-msg: Save diff to a file if the GCC_GIT_DIFF_FILE variable is set.
2020-05-27Daily bump.GCC Administrator12-1/+389
2020-05-26Fix pr20601-1.c on the H8Jeff Law1-2/+2
gcc/ * config/h8300/testcompare.md (tst_extzv_1_n): Do not accept constants for the primary input operand. (tstsi_variable_bit_qi): Similarly.
2020-05-26jit: fix missing types for builtins [PR 95306]David Malcolm8-11/+279
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.
2020-05-26PR fortran/95104 - Segfault on a legal WAIT statementHarald Anlauf2-1/+9
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>
2020-05-26libstdc++: Fix common_iterator::operator-> [PR95322]Patrick Palka3-18/+129
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.
2020-05-26PR libfortran/95195 - improve runtime error for namelist i/o to unformatted fileHarald Anlauf2-0/+22
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.
2020-05-26Fix issue with LTO bootstrapEric Botcazou1-9/+0
gcc/ada/ChangeLog PR ada/95333 * gcc-interface/decl.c (gnat_to_gnu_param): Never make a variant of the type.
2020-05-26PR fortran/95089 - ICE in gfc_get_derived_type, at fortran/trans-types.c:2843Harald Anlauf2-2/+14
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.
2020-05-26i386: Add SSE2 alternative to mmx_pswapd2vsi2Uros Bizjak1-7/+13
2020-05-26 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: * config/i386/mmx.md (mmx_pswapdv2si2): Add SSE2 alternative.
2020-05-26[LTO/offloading] Fix offloading-compilation ICE without -flto (PR84320)Tobias Burnus1-1/+1
gcc/ChangeLog: PR ipa/95320 * ipa-utils.h (odr_type_p): Also permit calls with only flag_generate_offload set.
2020-05-26gcc-changelog: handle entries with multi-line file listsPierre-Marie de Rodat3-0/+117
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.
2020-05-26gcc-changelog: remove file descriptor leaksPierre-Marie de Rodat3-4/+8
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.
2020-05-26jit: fix sphinx formatting issues in docsDavid Malcolm3-615/+618
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.
2020-05-26jit: check for void types [PR 95296]David Malcolm10-2575/+1454
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.
2020-05-26do not skip validation of switch after %<optAlexandre Oliva2-12/+30
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.
2020-05-26tree-optimization/95327 - fix another vectorizable_shift const SLP opRichard Biener1-2/+8
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.