- 20 Jun, 2019 23 commits
-
-
2019-06-14 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/65921 * runtime/memory.c (SIZE_MAX):Remove macro definition. (xmallocarray): Use __builtin_mul_overflow. From-SVN: r272520
Janne Blomqvist committed -
These tests were broken in the first place, and more broken following the change to drop pic symbol stubs unless the linker needs them. Fixed to work for x86 as well as powerpc and amended the options to force pic symbol stubs on. gcc/testsuite/ 2019-06-20 Iain Sandoe <iain@sandoe.co.uk> * obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks. * obj-c++.dg/stubify-2.mm: Likewise. * objc.dg/stubify-1.m: Likewise. * objc.dg/stubify-2.m: Likewise. From-SVN: r272518
Iain Sandoe committed -
With the addition of the AArch64 NetBSD support code we now have four ports all using and defining the same errata work-around headers. That's silly and long-term becomes a maintenance burden. This patch factors all that code into a single header to eliminate all the duplication. * config/aarch64/aarch64-errata.h: New file. * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Delete. (CA53_ERR_843419_SPEC): Delete. (LINK_SPEC): Use AARCH64_ERRATA_LINK_SPEC instead of above. * config/aarch64/aarch64-linux.h: Likewise. * config/aarch64/aarch64-netbsd.h: Likewise. * config/aarch64/aarch64-freebsd.h: Likewise. From-SVN: r272515
Richard Earnshaw committed -
From-SVN: r272514
Marek Polacek committed -
2019-06-20 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/rs6000.md (isa attribute): Add support for for a future processor. From-SVN: r272513
Michael Meissner committed -
PR c++/87512 * g++.dg/cpp1z/inline-var7.C: New test. From-SVN: r272512
Marek Polacek committed -
Standard floating point scalar operation patterns for combiner, which preserve the rest of the vector, look like (vec_merge:V2DF (vec_duplicate:V2DF (reg:DF 87)) (reg/v:V2DF 85 [ x ]) (const_int 1 [0x1])])) and (vec_merge:V2DF (vec_duplicate:V2DF (op:DF (vec_select:DF (reg/v:V2DF 85 [ x ]) (parallel [ (const_int 0 [0])])) (reg:DF 87)) (reg/v:V2DF 85 [ x ]) (const_int 1 [0x1])])) This patch adds and generates such standard floating point scalar operation patterns for +, -, *, /, > and <. Tested on x86-64. gcc/ PR target/54855 * config/i386/i386-expand.c (ix86_expand_vector_set): Generate standard scalar operation pattern for V2DF. * config/i386/sse.md (*<sse>_vm<plusminus_insn><mode>3): New. (*<sse>_vm<multdiv_mnemonic><mode>3): Likewise. (*ieee_<ieee_maxmin><mode>3): Likewise. (vec_setv2df_0): Likewise. gcc/testsuite/ PR target/54855 * gcc.target/i386/pr54855-1.c: New test. * gcc.target/i386/pr54855-2.c: Likewise. * gcc.target/i386/pr54855-3.c: Likewise. * gcc.target/i386/pr54855-4.c: Likewise. * gcc.target/i386/pr54855-5.c: Likewise. * gcc.target/i386/pr54855-6.c: Likewise. * gcc.target/i386/pr54855-7.c: Likewise. * gcc.target/i386/pr54855-8.c: Likewise. * gcc.target/i386/pr54855-9.c: Likewise. * gcc.target/i386/pr54855-10.c: Likewise. From-SVN: r272511
H.J. Lu committed -
tree-ssa-alias.c (aliasing_component_refs_p): Remove ref2_is_decl parameter; it has no use in gimple memory model. * tree-ssa-alias.c (aliasing_component_refs_p): Remove ref2_is_decl parameter; it has no use in gimple memory model. (indirect_ref_may_alias_decl_p): Update. * gcc.c-torture/execute/alias-access-path-1.c: New testcase. From-SVN: r272510
Jan Hubicka committed -
As mentioned in PR 90770, this is a patch that Debian have been carrying for some time. The additional unoptimized copies of libstdc++ libs that get built during each stage are never going to be used, so don't bother building them. For a profiled bootstrap this means we won't train the compiler on the unoptimized library code with assertions enabled, but that doesn't seem like a big problem, as the same code has already been compiled once for the main libstdc++ library. * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final stage of bootstrap. * configure: Regenerate. From-SVN: r272509
Jonathan Wakely committed -
* include/std/variant (_Variant_storage, _Extra_visit_slot_needed): Qualify calls to __never_valueless. From-SVN: r272508
Jonathan Wakely committed -
PR c++/89873 * g++.dg/cpp1y/noexcept1.C: New test. From-SVN: r272507
Marek Polacek committed -
2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/90937 * trans-types.c (get_formal_from_actual_arglist): Get symbol from current namespace so it will be freed later. If symbol is of type character, get an empty character length. 2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/90937 * gfortran.dg/external_procedure_4.f90: New test. From-SVN: r272506
Thomas Koenig committed -
Add missing dg-require-effective-target global_constructor. Tested on nvptx. 2019-06-20 Tom de Vries <tdevries@suse.de> * gcc.dg/pr90866-2.c: Require global_constructor. From-SVN: r272505
Tom de Vries committed -
Add missing dg-require-effective-target nonlocal_goto. Tested on nvptx. 2019-06-20 Tom de Vries <tdevries@suse.de> * gcc.c-torture/compile/pr89280.c: Require nonlocal_goto. * gcc.dg/pr88870.c: Same. * gcc.dg/pr90082.c: Same. From-SVN: r272504
Tom de Vries committed -
Add missing dg-require-effective-target indirect_jumps. Tested on nvptx. 2019-06-20 Tom de Vries <tdevries@suse.de> * gcc.dg/pr89737.c: Require indirect_jumps. * gcc.dg/torture/pr87693.c: Same. * gcc.dg/torture/pr89135.c: Same. * gcc.dg/torture/pr90071.c: Same. From-SVN: r272503
Tom de Vries committed -
Add missing dg-require-effective-target label_values. Tested on nvptx. 2019-06-20 Tom de Vries <tdevries@suse.de> * gcc.c-torture/compile/pr89280.c: Require label_values. * gcc.dg/pr89737.c: Same. * gcc.dg/pr90082.c: Same. * gcc.dg/torture/pr89135.c: Same. * gcc.dg/torture/pr89247.c: Same. * gcc.dg/torture/pr90071.c: Same. From-SVN: r272502
Tom de Vries committed -
Add missing dg-require-effective-target alloca. Tested on nvptx. 2019-06-20 Tom de Vries <tdevries@suse.de> * gcc.c-torture/compile/pr77754-1.c: Require alloca. * gcc.c-torture/compile/pr77754-2.c: Same. * gcc.c-torture/compile/pr77754-3.c: Same. * gcc.c-torture/compile/pr77754-4.c: Same. * gcc.c-torture/compile/pr77754-5.c: Same. * gcc.c-torture/compile/pr77754-6.c: Same. * gcc.c-torture/compile/pr87110.c: Same. * gcc.c-torture/execute/pr86528.c: Same. * gcc.dg/Walloca-larger-than-2.c: Same. * gcc.dg/Walloca-larger-than.c: Same. * gcc.dg/Warray-bounds-41.c: Same. * gcc.dg/Wrestrict-17.c: Same. * gcc.dg/Wstrict-overflow-27.c: Same. * gcc.dg/Wstringop-truncation-3.c: Same. * gcc.dg/pr78902.c: Same. * gcc.dg/pr87099.c: Same. * gcc.dg/pr87320.c: Same. * gcc.dg/pr89045.c: Same. * gcc.dg/strlenopt-62.c: Same. * gcc.dg/tree-ssa/alias-37.c: Same. From-SVN: r272501
Tom de Vries committed -
* doc/xml/manual/status_cxx2017.xml: Fix outdated reference to C++17 working draft. From-SVN: r272500
Jonathan Wakely committed -
The current tests wouldn't notice if the vector<bool> contents were printed in reverse, because it would read the same forwards and backwards. Change the content so the tests would fail if that happened. * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic vector<bool> for test. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. From-SVN: r272499
Jonathan Wakely committed -
2019-06-20 Martin Liska <mliska@suse.cz> * params.def (PARAM_HASH_TABLE_VERIFICATION_LIMIT): Decrease to 10. From-SVN: r272498
Martin Liska committed -
* tree-vect-stmts.c (enum scan_store_kind): New type. (scan_store_can_perm_p): Change last argument from int * to vec<enum scan_store_kind> *, record precisely which permutations need whole vector left shift or that plus VEC_COND_EXPR. (vectorizable_scan_store): Adjust caller, use whole vector left shift and additional VEC_COND_EXPR only for those iterations that need it. From-SVN: r272497
Jakub Jelinek committed -
Fix the test for failure in parsecpu's checking of the --with-fpu argument, and the error message that gets printed when the check fails. for gcc/ChangeLog * config.gcc: Fix ARM --with-fpu checking and error message. From-SVN: r272496
Alexandre Oliva committed -
From-SVN: r272495
GCC Administrator committed
-
- 19 Jun, 2019 17 commits
-
-
The current implementation of istream_iterator allows the iterator to be reused after reaching end-of-stream, so that subsequent reads from the stream can succeed (e.g. if the stream state has been cleared and stream position changed from EOF). The P0738R2 paper clarified that the expected behaviour is to set the stream pointer to null after reaching end-of-stream, preventing further reads. This implements that requirement, and adds the new default constructor to std::ostream_iterator. * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make private. (istream_iterator::_M_read()): Do not check stream state before attempting extraction. Set stream pointer to null when extraction fails (P0738R2). (operator==(const istream_iterator&, const istream_iterator&)): Change to be a hidden friend of istream_iterator. (operator!=(const istream_iterator&, const istream_iterator&)): Likewise. (ostream_iterator::ostream_iterator()): Add default constructor. (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use addressof. * testsuite/24_iterators/istream_iterator/1.cc: New test. * testsuite/24_iterators/ostream_iterator/1.cc: New test. * testsuite/24_iterators/ostream_iterator/70766.cc: Also check constructor taking a string. * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc: New test. From-SVN: r272491
Jonathan Wakely committed -
Have the pretty-printer for 'std::vector<bool>' return a value of type 'bool' rather than an 'int'. This way, the type is clear and that can be used for better display and a 'gdb.Value' constructed from the returned value will have type 'bool' again, not e.g. 'long long' as happened previously (at least with GDB 8.2.1 on amd64). 2019-06-19 Michael Weghorn <m.weghorn@posteo.de> Jonathan Wakely <jwakely@redhat.com> PR libstdc++/90945 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use values of type bool for vector<bool> elements. * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>. * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise. Co-Authored-By: Jonathan Wakely <jwakely@redhat.com> From-SVN: r272490
Michael Weghorn committed -
The change in r263433 broke the contract of the __rotate functions, by no longer accepting empty ranges. That means that callers which inlined the old version of std::rotate (without checks) that end up linking to a new definition of std::__rotate (also without checks) could perform a divide by zero and crash. This restores the old contract of the __rotate overloads. PR libstdc++/90920 partially revert r263433 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges. (rotate): Remove checks. * testsuite/25_algorithms/rotate/90920.cc: New test. From-SVN: r272489
Jonathan Wakely committed -
re PR tree-optimization/90626 (fold strcmp(a, b) == 0 to zero when one string length is exact and the other is unequal) PR tree-optimization/90626 gcc/ChangeLog: * tree-ssa-strlen.c (strxcmp_unequal): Fix typos. From-SVN: r272487
Martin Sebor committed -
* attribs.c (get_attribute_namespace): No longer static. (decl_attributes): Avoid shadowing. Preserve the C++11 form for C++11 attributes. (attr_noreturn_exclusions): Make it extern. * attribs.h (get_attribute_namespace): Declare. * tree-inline.c (function_attribute_inlinable_p): Use get_attribute_name. * c-attribs.c (handle_noreturn_attribute): No longer static. * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions): Declare. * c-format.c (check_function_format): Use get_attribute_name. * decl.c (duplicate_decls): Give an error when a function is declared [[noreturn]] after its first declaration. * parser.c (cp_parser_std_attribute): Don't treat C++11 noreturn attribute as equivalent to GNU's. * tree.c (std_attribute_table): Add noreturn. * g++.dg/warn/noreturn-8.C: New test. * g++.dg/warn/noreturn-9.C: New test. * g++.dg/warn/noreturn-10.C: New test. * g++.dg/warn/noreturn-11.C: New test. From-SVN: r272486
Marek Polacek committed -
PR tree-optimization/90626 - fold strcmp(a, b) == 0 to zero when one string length is exact and the other is unequal gcc/ChangeLog: PR tree-optimization/90626 * tree-ssa-strlen.c (strxcmp_unequal): New function. (handle_builtin_string_cmp): Call it. gcc/testsuite/ChangeLog: PR tree-optimization/90626 * gcc.dg/strlenopt-65.c: New test. * gcc.dg/strlenopt-66.c: New test. * gcc.dg/strlenopt.h (strcmp, strncmp): Declare. From-SVN: r272485
Martin Sebor committed -
pie, no-pie and rdynamic are driver options, we can process them in the relevant place and drop them once dealt with. There's no need to generate a new header to process the "no_compact_unwind" which is applied on the basis of the target system. Support for the -pie, -no_pie and -no_compact_unwind options should ideally be checked at configure time, however the status quo is to assert that linkers capable of targeting the relevant systems support these options (i.e. we trust that the user doesn't attempt to configure inappropriately). TODO: check the availability of the linker opts in configure rather than trusting to the user. This will fix the fail of pie-7.c, which is a result of failing to handle the no-pie driver option. 2019-06-19 Iain Sandoe <iain@sandoe.co.uk> * config/darwin.h (DRIVER_SELF_SPECS): Add RDYNAMIC, DARWIN_PIE_SPEC and DARWIN_NOPIE_SPEC. (RDYNAMIC): New, modified from DARWIN_EXPORT_DYNAMIC. (DARWIN_PIE_SPEC): Collate from darwin.h and darwin9.h. (DARWIN_NOPIE_SPEC): Collate from darwin10.h. (DARWIN_NOCOMPACT_UNWIND): New from darwin10.h (DARWIN_EXPORT_DYNAMIC): Delete. * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move no_compact_unwind and pie options processing to darwin.h. * config/darwin9.h (DARWIN_PIE_SPEC): Move pie processing to darwin.h From-SVN: r272484
Iain Sandoe committed -
gcc/c-family/ChangeLog: PR translation/90156 * c-format.c (function_format_info::format_type): Adjust type. (function_format_info::is_raw): New member. (decode_format_type): Adjust signature. Handle "raw" diag attributes. (decode_format_attr): Adjust call to decode_format_type. Avoid a redundant call to convert_format_name_to_system_name. Avoid abbreviating the word "arguments" in a diagnostic. (format_warning_substr): New function. (avoid_dollar_number): Quote dollar sign in a diagnostic. (finish_dollar_format_checking): Same. (check_format_info): Same. (struct baltoks_t): New. (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays. (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New functions. (check_format_info_main): Call check_plain. Use baltoks_t. Call maybe_diag_unbalanced_tokens. (handle_format_attribute): Spell out the word "arguments" in a diagnostic. gcc/testsuite/ChangeLog: PR translation/90156 * gcc.dg/format/gcc_diag-11.c: Enable. From-SVN: r272483
Martin Sebor committed -
2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69499 * match.c (gfc_match_select_type): SELECT TYPE is an executable statement, and cannot appear in MODULE or SUBMODULE scope. 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69499 * gfortran.dg/pr69499.f90: New test. * gfortran.dg/module_error_1.f90: Update dg-error string. From-SVN: r272482
Steven G. Kargl committed -
2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69398 * decl.c (attr_decl): Check for duplicate DIMENSION attribute for a CLASS entity. 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/69398 * gfortran.dg/pr69398.f90: New test. From-SVN: r272481
Steven G. Kargl committed -
2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/87907 * resolve.c (resolve_contained_fntype): Do not dereference a NULL pointer. 2019-06-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/87907 * gfortran.dg/pr87907.f90: New testcase. From-SVN: r272480
Steven G. Kargl committed -
2019-06-19 Iain Sandoe <iain@sandoe.co.uk> * config/darwin-driver.c (darwin_driver_init): Fix off-by-one errors in computing the number of options to be moved. From-SVN: r272479
Iain Sandoe committed -
* config/arm/netbsd-elf.h (SYSARCH_ARM_SYNC_ICACHE): New definition. (CLEAR_INSN_CACHE) Use it. From-SVN: r272478
Maya Rashish committed -
* include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value category used in invocable check. (reduce(Iter, Iter, T)): Pass initial value as rvalue. * testsuite/26_numerics/reduce/2.cc: New test. From-SVN: r272477
Jonathan Wakely committed -
runtime.concatstring{2,3,4,5} are just wrappers of concatstrings. These wrappers don't provide any benefit, at least in the C calling convention we use, where passing arrays by value isn't an efficient thing. Change it to always use concatstrings. Also, the cap field of the slice passed to concatstrings is not necessary. So change it to pass a pointer and a length directly, which is more efficient than passing a slice header by value. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/182539 From-SVN: r272476
Ian Lance Taylor committed -
* config/i386/i386.md (cmpstrnsi): Remove dead code. From-SVN: r272474
Uros Bizjak committed -
This fixes and simplifies the setjmp and non-local goto implementation. Currently the virtual frame pointer is saved when using __builtin_setjmp or a non-local goto. Depending on whether a frame pointer is used, this may either save SP or FP with an immediate offset. However the goto or longjmp always updates the hard frame pointer. A receiver veneer in the original function then assigns the hard frame pointer to the virtual frame pointer, which should, if it works correctly, again assign SP or FP. However the special elimination code in eliminate_regs_in_insn doesn't do this correctly unless the frame pointer is used, and even if it worked by writing SP, the frame pointer would still be corrupted. A much simpler implementation is to always save and restore the hard frame pointer. This avoids 2 redundant instructions which add/subtract the virtual frame offset. A large amount of code can be removed as a result, including all implementations of TARGET_BUILTIN_SETJMP_FRAME_VALUE (all of which already use the hard frame pointer). The expansion of nonlocal_goto on PA can be simplied to just restore the hard frame pointer. This fixes the most obvious issues, however there are still issues on targets which define HARD_FRAME_POINTER_IS_FRAME_POINTER (arm, mips). Each function could have a different hard frame pointer, so a non-local goto may restore the wrong frame pointer (TARGET_BUILTIN_SETJMP_FRAME_VALUE could be useful for this). The i386 TARGET_BUILTIN_SETJMP_FRAME_VALUE was incorrect: if stack_realign_fp is true, it would save the hard frame pointer value but restore the virtual frame pointer which according to ix86_initial_elimination_offset can have a non-zero offset from the hard frame pointer. The ia64 implementation of nonlocal_goto seems incorrect since the helper function moves the the frame pointer value into the static chain register (so this patch does nothing to make it better or worse). AArch64 + x86-64 bootstrap OK, new test passes on AArch64, x86-64 and Arm. gcc/ PR middle-end/84521 * builtins.c (expand_builtin_setjmp_setup): Save hard_frame_pointer_rtx. (expand_builtin_setjmp_receiver): Do not emit sfp = fp move since we restore fp. * function.c (expand_function_start): Save hard_frame_pointer_rtx for non-local goto. * lra-eliminations.c (eliminate_regs_in_insn): Remove sfp = fp elimination code. (remove_reg_equal_offset_note): Remove unused function. * reload1.c (eliminate_regs_in_insn): Remove sfp = hfp elimination code. * config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Remove. (arc_builtin_setjmp_frame_value): Remove function. * config/avr/avr.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Remove. (avr_builtin_setjmp_frame_value): Remove function. * config/i386/i386.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Remove. (ix86_builtin_setjmp_frame_value): Remove function. * config/pa/pa.md (nonlocal_goto): Remove FP adjustment. * config/sparc/sparc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Remove. (sparc_builtin_setjmp_frame_value): Remove function. * config/vax/vax.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Remove. (vax_builtin_setjmp_frame_value): Remove function. * config/xtensa/xtensa.c (xtensa_frame_pointer_required): Force frame pointer if has_nonlocal_label. testsuite/ PR middle-end/84521 * gcc.c-torture/execute/pr84521.c: New test. From-SVN: r272473
Wilco Dijkstra committed
-