- 23 Nov, 2018 2 commits
-
-
From-SVN: r266400
GCC Administrator committed -
* lang.opt (fpad-source): New option. * scanner.c (load_line): Don't pad fixed form lines if !flag_pad_source. * invoke.texi (-fno-pad-source): Document. * gfortran.dg/pad_source_1.f: New test. * gfortran.dg/pad_source_2.f: New test. * gfortran.dg/pad_source_3.f: New test. * gfortran.dg/pad_source_4.f: New test. * gfortran.dg/pad_source_5.f: New test. From-SVN: r266397
Jakub Jelinek committed
-
- 22 Nov, 2018 26 commits
-
-
PR lto/88142 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned parameters; do not warn here. (odr_subtypes_equivalent_p): Likewise. (warn_odr): Fix typo. (warn_types_mismatch): Do not output confused warnings on integer types. (odr_types_equivalent_p): Update. * g++.dg/lto/odr-5_0.C: New testcase. * g++.dg/lto/odr-5_1.C: New testcase. From-SVN: r266396
Jan Hubicka committed -
* lto.c (cmp_type_location): Remove. (lto_read_decls): Do not allocate odr_types. From-SVN: r266395
Jan Hubicka committed -
* config/i386/i386.c (ix86_option_override_internal, ix86_can_inline_p, classify_argument, construct_container, ix86_expand_prologue, ix86_expand_split_stack_prologue, ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop, expand_setmem_epilogue_via_loop, promote_duplicated_reg, ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi): Formatting fixes. From-SVN: r266391
Jakub Jelinek committed -
* config/i386/i386.c (ix86_option_override_internal): For stack_protector_guard related options, use opts_set->x_ instead of global_options_set. and prefix options with opts->x_ . Move defaults for offset and reg into else block. From-SVN: r266390
Jakub Jelinek committed -
* config/i386/i386.c (ix86_check_avx_upper_register): Return true for all SSE registers with mode bitsize > 128. From-SVN: r266389
Uros Bizjak committed -
* g++.dg/lto/odr-2_0.C: Drop dg-lto-options. * g++.dg/lto/odr-3_0.C: Likewise; harden for optimizing compilatoin. From-SVN: r266388
Jan Hubicka committed -
PR tree-optimization/85794 * gcc.dg/vect/O3-pr85794.c: New test. From-SVN: r266387
Jakub Jelinek committed -
2018-11-22 Marc Glisse <marc.glisse@inria.fr> PR libstdc++/87106 * include/bits/stl_algobase.h: Include <type_traits>. (__niter_base): Add noexcept specification. * include/bits/stl_deque.h: Include <bits/stl_uninitialized.h>. (__is_trivially_relocatable): Specialize for deque. * include/bits/stl_iterator.h: Include <type_traits>. (__niter_base): Add noexcept specification. * include/bits/stl_uninitialized.h (__is_trivially_relocatable): Add parameter for meta-programming. (__relocate_a_1, __relocate_a): Add noexcept specification. * include/bits/stl_vector.h (__use_relocate): Test __relocate_a. From-SVN: r266386
Marc Glisse committed -
2018-11-22 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/87718 * ira-costs.c: Remove trailing white-spaces. (record_operand_costs): Add a special treatment for moves involving a hard register. 2018-11-22 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/87718 * gcc.target/i386/pr82361-1.c: Check only the first operand of moves. From-SVN: r266385
Vladimir Makarov committed -
* config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove. (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here. From-SVN: r266382
Uros Bizjak committed -
2018-11-22 Martin Liska <mliska@suse.cz> * common/config/i386/i386-common.c (processor_names): Add static assert and add missing "znver2". (ix86_get_valid_option_values): Add checking assert for null values and add "native" value if feasible. * config/i386/i386.h: Do not declare size of processor_names. * common/config/i386/i386-common.c: * config/i386/i386.c: Add static assert for size of processor_cost_table. From-SVN: r266381
Martin Liska committed -
In case of high register pressure in PIC mode, address of the stack protector's guard can be spilled on ARM targets as shown in PR85434, thus allowing an attacker to control what the canary would be compared against. ARM does lack stack_protect_set and stack_protect_test insn patterns, defining them does not help as the address is expanded regularly and the patterns only deal with the copy and test of the guard with the canary. This problem does not occur for x86 targets because the PIC access and the test can be done in the same instruction. Aarch64 is exempt too because PIC access insn pattern are mov of UNSPEC which prevents it from the second access in the epilogue being CSEd in cse_local pass with the first access in the prologue. The approach followed here is to create new "combined" set and test standard pattern names that take the unexpanded guard and do the set or test. This allows the target to use an opaque pattern (eg. using UNSPEC) to hide the individual instructions being generated to the compiler and split the pattern into generic load, compare and branch instruction after register allocator, therefore avoiding any spilling. This is here implemented for the ARM targets. For targets not implementing these new standard pattern names, the existing stack_protect_set and stack_protect_test pattern names are used. To be able to split PIC access after register allocation, the functions had to be augmented to force a new PIC register load and to control which register it loads into. This is because sharing the PIC register between prologue and epilogue could lead to spilling due to CSE again which an attacker could use to control what the canary gets compared against. 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org> gcc/ PR target/85434 * target-insns.def (stack_protect_combined_set): Define new standard pattern name. (stack_protect_combined_test): Likewise. * cfgexpand.c (stack_protect_prologue): Try new stack_protect_combined_set pattern first. * function.c (stack_protect_epilogue): Try new stack_protect_combined_test pattern first. * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now parameters to control which register to use as PIC register and force reloading PIC register respectively. Insert in the stream of insns if possible. (legitimize_pic_address): Expose above new parameters in prototype and adapt recursive calls accordingly. Use pic_reg if non null instead of cached one. (arm_load_pic_register): Add pic_reg parameter and use it if non null. (arm_legitimize_address): Adapt to new legitimize_pic_address prototype. (thumb_legitimize_address): Likewise. (arm_emit_call_insn): Adapt to require_pic_register prototype change. (arm_expand_prologue): Adapt to arm_load_pic_register prototype change. (thumb1_expand_prologue): Likewise. * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype change. (arm_load_pic_register): Likewise. * config/arm/predicated.md (guard_addr_operand): New predicate. (guard_operand): New predicate. * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address prototype change. (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue prototype change. (stack_protect_combined_set): New expander.. (stack_protect_combined_set_insn): New insn_and_split pattern. (stack_protect_set_insn): New insn pattern. (stack_protect_combined_test): New expander. (stack_protect_combined_test_insn): New insn_and_split pattern. (arm_stack_protect_test_insn): New insn pattern. * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern. * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec. (UNSPEC_SP_TEST): Likewise. * doc/md.texi (stack_protect_combined_set): Document new standard pattern name. (stack_protect_set): Clarify that the operand for guard's address is legal. (stack_protect_combined_test): Document new standard pattern name. (stack_protect_test): Clarify that the operand for guard's address is legal. gcc/testsuite/ PR target/85434 * gcc.target/arm/pr85434.c: New test. From-SVN: r266379
Thomas Preud'homme committed -
2018-11-22 Richard Biener <rguenther@suse.de> PR tree-optimization/88148 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional valueization callback parameter and handle it. * tree-ssa-loop-niter.h (simplify_replace_tree): Export. * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees. * gfortran.dg/pr88148.f90: New testcase. From-SVN: r266378
Richard Biener committed -
2018-11-22 Martin Liska <mliska@suse.cz> * bugzilla-close-candidate.py: New file. From-SVN: r266377
Martin Liska committed -
The implementations of std::make_shared for -frtti and -fno-rtti are not compatible, because they pass different arguments to _Sp_counted_ptr_inplace::_M_get_deleter and so can't interoperate. Either the argument doesn't match the expected value, and so the shared_ptr::_M_ptr member is never set, or the type-punned reference is treated as a real std::type_info object and gets dereferenced. This patch removes the differences between -frtti and -fno-rtti, so that typeid is never used, and the type-punned reference is used in both cases. For backwards compatibility with existing code that passes typeid(_Sp_make_shared_tag) that still needs to be handled, but only after checking that the argument is not the type-punned reference (so it's safe to treat as a real std::type_info object). The reference is bound to an object of literal type, so that it doesn't need a guard variable to make its initialization thread-safe. This patch also fixes 87520 by ensuring that the type-punned reference is bound to "a region of storage of suitable size and alignment to contain an object of the reference's type" (as per the proposed resolution of Core DR 453). If all objects are built with the fixed version of GCC then -frtti and -fno-rtti can be mixed freely and std::make_shared will work correctly. If some objects are built with unfixed GCC versions then problems can still arise, depending on which template instantiations are kept by the linker. PR libstdc++/85930 PR libstdc++/87520 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti) [__cpp_rtti]: Define even when RTTI is enabled. Use array of sizeof(type_info) so that type-punned reference binds to an object of the correct size as well as correct alignment. (_Sp_counted_ptr_inplace::_M_get_deleter) [__cpp_rtti]: Check for _S_ti() reference even when RTTI is enabled. (__shared_ptr(_Sp_make_shared_tag, const _Alloc&, _Args&&...)) [__cpp_rtti]: Pass _S_ti() instead of typeid(_Sp_make_shared_tag). From-SVN: r266376
Jonathan Wakely committed -
From-SVN: r266374
Martin Liska committed -
From-SVN: r266373
Andreas Schwab committed -
2018-11-22 Richard Biener <rguenther@suse.de> PR lto/87229 PR lto/88112 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs which can appear in size expressions. * tree-streamer-in.c (unpack_ts_base_value_fields): Stream CALL_EXPR_BY_DESCRIPTOR. (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN. * tree-streamer-out.c (pack_ts_base_value_fields): Stream CALL_EXPR_BY_DESCRIPTOR. (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN. Revert PR lto/87229 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val sizepos values. From-SVN: r266372
Richard Biener committed -
2018-11-22 Richard Biener <rguenther@suse.de> PR tree-optimization/88069 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not apply to default defs. From-SVN: r266371
Richard Biener committed -
PR target/85644 PR target/86832 * config/i386/i386.c (ix86_option_override_internal): Default ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET is defined. * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>, stack_protect_test, stack_protect_test_<mode>): Use empty condition instead of TARGET_SSP_TLS_GUARD. From-SVN: r266370
Jakub Jelinek committed -
PR c++/87386 * parser.c (cp_parser_operator): Use str.get_value () instead of just str in USERDEF_LITERAL_VALUE and USERDEF_LITERAL_SUFFIX_ID arguments. From-SVN: r266369
Jakub Jelinek committed -
2018-11-22 Martin Liska <mliska@suse.cz> PR sanitizer/88017 * config/i386/i386.c (ix86_option_override_internal): 2018-11-22 Martin Liska <mliska@suse.cz> PR sanitizer/88017 * gcc.dg/tsan/pr88017.c: New test. From-SVN: r266368
Martin Liska committed -
The old __sync builtins have been deprecated for a long time now in favor of the __atomic builtins following the C++11/C11 memory model. This patch converts libgfortran to use the modern __atomic builtins. At the same time I weakened the consistency to relaxed for incrementing and decrementing the counter, and acquire-release when decrementing to check whether the counter is 0 and the unit can be freed. This is similar to e.g. std::shared_ptr in C++. Regtested on x86_64-pc-linux-gnu. libgfortran/ChangeLog: 2018-11-22 Janne Blomqvist <jb@gcc.gnu.org> * acinclude.m4 (LIBGFOR_CHECK_ATOMIC_FETCH_ADD): Rename and test presence of atomic builtins instead of sync builtins. * configure.ac (LIBGFOR_CHECK_ATOMIC_FETCH_ADD): Call new test. * io/io.h (inc_waiting_locked): Use __atomic_fetch_add. (predec_waiting_locked): Use __atomic_add_fetch. (dec_waiting_unlocked): Use __atomic_fetch_add. * config.h.in: Regenerated. * configure: Regenerated. * Makefile.in: Regenerated. From-SVN: r266367
Janne Blomqvist committed -
libphobos/ChangeLog: 2018-11-22 Johannes Pfau <johannespfau@gmail.com> PR d/87824 * testsuite/libphobos.shared/shared.exp: Set proper path to phobos library for multilib builds. From-SVN: r266366
Johannes Pfau committed -
From-SVN: r266364
GCC Administrator committed -
Factor out new function read_initial_length in dwarf.c. Bootstrapped and reg-tested on x86_64. 2018-11-22 Tom de Vries <tdevries@suse.de> * dwarf.c (read_initial_length): Factor out of ... (build_address_map, read_line_info): ... here. From-SVN: r266361
Tom de Vries committed
-
- 21 Nov, 2018 12 commits
-
-
PR c++/88122 * method.c (maybe_explain_implicit_delete): If FUNCTION_FIRST_USER_PARMTYPE (decl) is NULL, set const_p to false instead of ICEing. * g++.dg/cpp0x/implicit15.C: New test. From-SVN: r266360
Jakub Jelinek committed -
PR c++/87386 * parser.c (cp_parser_primary_expression): Use id_expression.get_location () instead of id_expr_token->location. Adjust the range from id_expr_token->location to id_expressio.get_finish (). (cp_parser_operator_function_id): Pass location of the operator token down to cp_parser_operator. (cp_parser_operator): Add start_loc argument, always construct a location with caret at start_loc and range from start_loc to the finish of the last token. gcc/testsuite/ * g++.dg/diagnostic/pr87386.C: New test. * g++.dg/parse/error17.C: Adjust expected diagnostics. libstdc++-v3/ * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust expected line. * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise. * testsuite/20_util/uses_allocator/69293_neg.cc: Likewise. * testsuite/experimental/propagate_const/requirements2.cc: Likewise. * testsuite/experimental/propagate_const/requirements3.cc: Likewise. * testsuite/experimental/propagate_const/requirements4.cc: Likewise. * testsuite/experimental/propagate_const/requirements5.cc: Likewise. From-SVN: r266359
Jakub Jelinek committed -
2013-10-26 Vladimir Makarov <vmakarov@redhat.com> Revert: 2013-10-25 Vladimir Makarov <vmakarov@redhat.com> * lra-spills.c (lra_final_code_change): Remove useless move insns. From-SVN: r266358
Uros Bizjak committed -
PR rtl-optimization/85925 * gcc.c-torture/execute/20181120-1.c: Require effective target int32plus. (u): New variable. (main): Compare d against u.f1 rather than 0x101. Use 0x4030201 instead of 0x10101. From-SVN: r266357
Jakub Jelinek committed -
PR middle-end/88129 * function.c (expand_function_end): Do not emit extra blockage insn. From-SVN: r266356
Uros Bizjak committed -
PR target/85667 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead of FIRST_SSE_REG for 4 or 8 byte modes. testsuite/ChangeLog: PR target/85667 * gcc.target/pr85667-1.c: New testcase. * gcc.target/pr85667-2.c: New testcase. * gcc.target/pr85667-3.c: New testcase. * gcc.target/pr85667-4.c: New testcase. From-SVN: r266355
Lokesh Janghel committed -
From-SVN: r266354
Jakub Jelinek committed -
PR libstdc++/88111 * include/std/memory_resource (pool_options): Add Doxygen comments. * src/c++17/memory_resource.cc (pool_sizes): Only use suitable values on targets with 16-bit or 20-bit size_t type. (munge_options): Make default values depend on width of size_t type. From-SVN: r266353
Jonathan Wakely committed -
On 16-bit msp430-elf size_t is either 16 bits or 20 bits, and so can't represent all values of the uint32_t type used for bitset::size_type. Using the smaller of size_t and uint32_t for size_type ensures it fits in size_t. PR libstdc++/88113 * src/c++17/memory_resource.cc (bitset::size_type): Use the smaller of uint32_t and size_t. (bitset::size(), bitset::free(), bitset::update_next_word()) (bitset::max_blocks_per_chunk(), bitset::max_word_index()): Use size_type consistently instead of size_t. (chunk): Adjust static_assert checking sizeof(chunk). From-SVN: r266352
Jonathan Wakely committed -
re PR ipa/87957 (ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘identifier_node’ in warn_odr, at ipa-devirt.c:1051 since r265519) PR lto/87957 * g++.dg/lto/odr-1_0.C: Extend by mismatched enum. * g++.dg/lto/odr-1_1.C: Extend by mismatched enum. * g++.dg/lto/odr-2_0.C: New. * g++.dg/lto/odr-2_0.C: New. * g++.dg/lto/odr-3_1.C: New. * g++.dg/lto/odr-3_1.C: New. From-SVN: r266351
Jan Hubicka committed -
re PR ipa/87957 (ICE tree check: expected tree that contains ‘decl minimal’ structure, have ‘identifier_node’ in warn_odr, at ipa-devirt.c:1051 since r265519) PR lto/87957 * tree.c (fld_decl_context): Break out from ... (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL. (fld_incomplete_type_of): Build copy of TYP_DECL. * ipa-devirt.c (free_enum_values): Rename to ... (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs and TREE_TYPEs of TYPE_DECLs. (get_odr_type): Initialize odr_vtable_hash if needed. From-SVN: r266350
Jan Hubicka committed -
In some cases of overriding or resetting locations, we might retain discriminator info from earlier locations, when we should take discriminator information from the overriding location or reset it. for gcc/ChangeLog * final.c (compute_discriminator): Declare. Renamed from... (maybe_set_discriminator): ... this. Set and return a local. (override_discriminator): New. (final_scan_insn_1): Set it. (notice_source_line): Adjust. Always set discriminator. From-SVN: r266349
Alexandre Oliva committed
-