forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pull-request #1
Merged
Merged
pull-request #1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…data since r255469 gcc/ChangeLog: PR c/86453 * attribs.c (decl_attributes): Reject conflicting attributes before calling attribute handlers. gcc/testsuite/ChangeLog: PR c/86453 * c-c++-common/Wattributes.c: Adjust. * gcc.dg/Wattributes-10.c: New test. * g++.dg/Wattributes-3.C: Adjust. * gcc.dg/Wattributes-6.c: Adjust. * gcc.dg/pr18079.c: Adjust. * gcc.dg/torture/pr42363.c: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262596 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-12 Christophe Lyon <christophe.lyon@linaro.org> * compare_tests: Print number of tests in each category. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262600 138bc75d-0d04-0410-961f-82ee72b054a4
zero reference, add doloop_end instead. * doc/md.texi (decrement_and_branch_until_zero): Remove. (Looping patterns): Remove decrement_and_branch_until_zero. Add detail for doloop_end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262603 138bc75d-0d04-0410-961f-82ee72b054a4
directive. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262604 138bc75d-0d04-0410-961f-82ee72b054a4
"omp declare target implicit" attribute. * c-decl.c (c_decl_attributes): Don't diagnose vars without mappable type here, instead add "omp declare target implicit" attribute. (finish_decl): Diagnose vars without mappable type here. * decl2.c (cplus_decl_attributes): Don't diagnose vars without mappable type here, instead add "omp declare target implicit" attribute. Add that attribute instead of "omp declare target" also when processing_template_decl. * decl.c (cp_finish_decl): Diagnose vars without mappable type here, and before calling cp_omp_mappable_type call complete_type. * c-c++-common/gomp/declare-target-3.c: New test. * g++.dg/gomp/declare-target-2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262605 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ 2018-07-06 Kito Cheng <kito.cheng@gmail.com> * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE. (riscv_expand_epilogue): Add assertion to check interrupt mode. (riscv_set_current_function): Extract getting interrupt type to new function. (riscv_get_interrupt_type): New function. (riscv_merge_decl_attributes): New function, checking interrupt type is same. (TARGET_MERGE_DECL_ATTRIBUTES): Define. gcc/testsuite/ 2018-07-06 Kito Cheng <kito.cheng@gmail.com> * gcc.target/riscv/interrupt-conflict-mode.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262607 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/testsuite/ * gnat.dg/warn5.adb: Expect warning for riscv*-*-*. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262608 138bc75d-0d04-0410-961f-82ee72b054a4
…ith r262596 gcc/testsuite/ChangeLog: g++.dg/warn/pr86453.C: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262609 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262620 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org> Richard Biener <rguenther@suse.de> PR middle-end/86489 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check that the loop latch destination where phi is defined. gcc/testsuite/ChangeLog: 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org> PR middle-end/86489 * gcc.dg/pr86489.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262622 138bc75d-0d04-0410-961f-82ee72b054a4
PR debug/86452 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for instead of get_context_die. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262624 138bc75d-0d04-0410-961f-82ee72b054a4
* config/sparc/sparc.c (sparc_compute_frame_size): Make static git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262625 138bc75d-0d04-0410-961f-82ee72b054a4
arrays instead of numbered variables. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262626 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-13 Tom de Vries <tdevries@suse.de> * maintainers-verify.sh: New file. * gcc.src/maintainers.exp: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262627 138bc75d-0d04-0410-961f-82ee72b054a4
When compiling gcc.dg/vla-1.c with -O3 -g, vla a and b in f1 are optimized away, and f1 is cloned to a version f1.constprop with no parameters, eliminating parameter i. Debug info is generated to describe the sizes of a and b, but that process generates debug expressions that are not reused. Fix the duplication by saving and reusing the generated debug expressions in remap_ssa_name. Concretely: reuse D#7 here instead of generating D#8: ... __attribute__((noinline)) f1.constprop () { intD.6 iD.1935; <bb 3> # DEBUG D#10 s=> iD.1897 # DEBUG iD.1935 => D#10 <bb 2> - # DEBUG D#8 s=> iD.1935 # DEBUG D#7 s=> iD.1935 saved_stack.2_1 = __builtin_stack_save (); # DEBUG BEGIN_STMT # DEBUG D#6 => D#7 + 1 # DEBUG D#5 => (long intD.8) D#6 # DEBUG D#4 => D#5 + -1 # DEBUG D.1937 => (sizetype) D#4 # DEBUG a.0D.1942 => NULL # DEBUG BEGIN_STMT - # DEBUG D#3 => D#8 + 2 + # DEBUG D#3 => D#7 + 2 # DEBUG D#2 => (long intD.8) D#3 # DEBUG D#1 => D#2 + -1 # DEBUG D.1944 => (sizetype) D#1 # DEBUG b.1D.1949 => NULL ... Bootstrapped and reg-tested on x86_64. 2018-07-13 Tom de Vries <tdevries@suse.de> * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated in remap_ssa_name. * gcc.dg/vla-1.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262628 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc-interface/misc.c (gnat_handle_option): Accept it. * gcc-interface/utils.c (finish_character_type): Tweak comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262629 138bc75d-0d04-0410-961f-82ee72b054a4
Optimization fipa-icf breaks debug info (as is noted in PR63572 - "ICF breaks user debugging experience"), which make guality tests clztest.c, ctztest.c and sra-1.c unsupported for option combination "-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects". F.i., in clztest.c foo and bar are merged, and gdb can set a breakpoint on a line in foo, but trying to set a breakpoint on a line in bar results in a breakpoint in main instead. This patch works around the problem by adding -fno-ipa-icf (as is already done in csttest.c and pr43077-1.c) to those testcases: ... -UNSUPPORTED: gcc.dg/guality/clztest.c ... line . g == f +PASS: gcc.dg/guality/clztest.c ... line . g == f -UNSUPPORTED: gcc.dg/guality/ctztest.c ... line . g == f +PASS: gcc.dg/guality/ctztest.c ... line . g == f -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4 +PASS: gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4 -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line . a[1] == 14 +PASS: gcc.dg/guality/sra-1.c ... line . a[1] == 14 ... Tested on x86_64. 2018-07-13 Tom de Vries <tdevries@suse.de> * gcc.dg/guality/clztest.c: Add -fno-ipa-icf in dg-options. * gcc.dg/guality/ctztest.c: Same. * gcc.dg/guality/sra-1.c: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262631 138bc75d-0d04-0410-961f-82ee72b054a4
PR middle-end/85974 * match.pd (addr1 - addr2): Allow either of the operand to have a conversion. * gcc.c-torture/compile/930326-1.c: Adjust to cover widening. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262632 138bc75d-0d04-0410-961f-82ee72b054a4
This patch moves the vendor and CPU id data from driver-arm.c to the main table of CPU data in arm-cpus.in. It then adds rules to parsecpu.awk to build data tables that can be used by the driver for automatic CPU detection when running natively. This is the last major bit of CPU-specific data that can be usefully moved to the CPU data tables (I don't think it is sensible to move the per-cpu tuning data from its current location). The syntax and parser can support revision ranges, but at present nothing is done with that data: no supported cpu currently needs that capability. * config/arm/driver-arm.c: Include arm-native.h. (host_detect_local_cpu): Use auto-generated data tables. (vendors, arm_cpu_table): Delete. Move part information to ... * config/arm/arm-cpus.in: ... here. * config/arm/parsecpu.awk (gen_native): New function. (vendor, part): New CPU fields. (END): Add support for building the native CPU detection tables. * config/arm/t-arm (arm-native.h): Add build rule. (driver-arm.o): Add dependency on arm-native.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262633 138bc75d-0d04-0410-961f-82ee72b054a4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809 Inline strcmp with small constant strings The design doc for PR78809 is at: https://www.mail-archive.com/gcc@gcc.gnu.org/msg83822.html this patch is for the third part of change of PR78809. C. for strcmp (s1, s2), strncmp (s1, s2, n), and memcmp (s1, s2, n) if the result is NOT used to do simple equality test against zero, one of "s1" or "s2" is a small constant string, n is a constant, and the Min value of the length of the constant string and "n" is smaller than a predefined threshold T, inline the call by a byte-to-byte comparision sequence to avoid calling overhead. adding test case strcmpopt_5.c into gcc.dg for part C of PR78809. adding test case strcmpopt_6.c into gcc.dg to test the following case: When the specified length exceeds one of the arguments of the call to memcmp, the call to memcmp should NOT be inlined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262636 138bc75d-0d04-0410-961f-82ee72b054a4
https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00701.html PR c++/86374 * pt.c (lookup_template_class_1): Use tsubst_aggr_type for contexts that are classes. * parser.c (cp_parser_template_id): Combine entering_scope decl & initializer. PR c++/86374 * g++.dg/pr86374.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262637 138bc75d-0d04-0410-961f-82ee72b054a4
The frontend could parse omitted pointer typess at the end of the type, but not in the middle, so code like []*[][]int{{{1}}} failed. Test case is in https://golang.org/cl/123477. Fixes golang/go#26340 Reviewed-on: https://go-review.googlesource.com/123479 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262641 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com> Steve Munroe <munroesj52@gmail.com> * config/rs6000/emmintrin.h (_mm_and_si128): New function. (_mm_andnot_si128): Likewise. (_mm_or_si128): Likewise. (_mm_xor_si128): Likewise. [gcc/testsuite] 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com> Steve Munroe <munroesj52@gmail.com> * gcc.target/powerpc/sse2-pand-1.c: New file. * gcc.target/powerpc/sse2-pandn-1.c: Likewise. * gcc.target/powerpc/sse2-por-1.c: Likewise. * gcc.target/powerpc/sse2-pxor-1.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262642 138bc75d-0d04-0410-961f-82ee72b054a4
(stream_out): Add PART parameter; pass it to do_stream_out. (lto_wpa_write_files): Update call of stream_out. * lto-streamer-out.c (copy_function_or_variable): Dump info about copying section. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262645 138bc75d-0d04-0410-961f-82ee72b054a4
r259399, which added PROCESSOR_SKYLAKE, disabled many x86 optimizations which are enabled by PROCESSOR_HASWELL. As the result, -mtune=skylake generates slower codes on Skylake than before. The same also applies to Cannonlake and Icelak tuning. This patch changes -mtune={skylake|cannonlake|icelake} to tune like -mtune=haswell for until their tuning is properly adjusted. It also enables -mprefer-vector-width=256 for -mtune=haswell, which has no impact on codegen when AVX512 isn't enabled. Performance impacts on SPEC CPU 2017 rate with 1 copy using -march=native -mfpmath=sse -O2 -m64 are 1. On Broadwell server: 500.perlbench_r -0.56% 502.gcc_r -0.18% 505.mcf_r 0.24% 520.omnetpp_r 0.00% 523.xalancbmk_r -0.32% 525.x264_r -0.17% 531.deepsjeng_r 0.00% 541.leela_r 0.00% 548.exchange2_r 0.12% 557.xz_r 0.00% Geomean 0.00% 503.bwaves_r 0.00% 507.cactuBSSN_r 0.21% 508.namd_r 0.00% 510.parest_r 0.19% 511.povray_r -0.48% 519.lbm_r 0.00% 521.wrf_r 0.28% 526.blender_r 0.19% 527.cam4_r 0.39% 538.imagick_r 0.00% 544.nab_r -0.36% 549.fotonik3d_r 0.51% 554.roms_r 0.00% Geomean 0.17% On Skylake client: 500.perlbench_r 0.96% 502.gcc_r 0.13% 505.mcf_r -1.03% 520.omnetpp_r -1.11% 523.xalancbmk_r 1.02% 525.x264_r 0.50% 531.deepsjeng_r 2.97% 541.leela_r 0.50% 548.exchange2_r -0.95% 557.xz_r 2.41% Geomean 0.56% 503.bwaves_r 0.49% 507.cactuBSSN_r 3.17% 508.namd_r 4.05% 510.parest_r 0.15% 511.povray_r 0.80% 519.lbm_r 3.15% 521.wrf_r 10.56% 526.blender_r 2.97% 527.cam4_r 2.36% 538.imagick_r 46.40% 544.nab_r 2.04% 549.fotonik3d_r 0.00% 554.roms_r 1.27% Geomean 5.49% On Skylake server: 500.perlbench_r 0.71% 502.gcc_r -0.51% 505.mcf_r -1.06% 520.omnetpp_r -0.33% 523.xalancbmk_r -0.22% 525.x264_r 1.72% 531.deepsjeng_r -0.26% 541.leela_r 0.57% 548.exchange2_r -0.75% 557.xz_r -1.28% Geomean -0.21% 503.bwaves_r 0.00% 507.cactuBSSN_r 2.66% 508.namd_r 3.67% 510.parest_r 1.25% 511.povray_r 2.26% 519.lbm_r 1.69% 521.wrf_r 11.03% 526.blender_r 3.39% 527.cam4_r 1.69% 538.imagick_r 64.59% 544.nab_r -0.54% 549.fotonik3d_r 2.68% 554.roms_r 0.00% Geomean 6.19% This patch improves -march=native performance on Skylake up to 60% and leaves -march=native performance unchanged on Haswell. gcc/ 2018-07-13 H.J. Lu <hongjiu.lu@intel.com> Sunil K Pandey <sunil.k.pandey@intel.com> PR target/84413 * config/i386/i386.c (m_CORE_AVX512): New. (m_CORE_AVX2): Likewise. (m_CORE_ALL): Add m_CORE_AVX2. * config/i386/x86-tune.def: Replace m_HASWELL with m_CORE_AVX2. Replace m_SKYLAKE_AVX512 with m_CORE_AVX512 on avx256_optimal and remove the rest of m_SKYLAKE_AVX512. gcc/testsuite/ 2018-07-13 H.J. Lu <hongjiu.lu@intel.com> Sunil K Pandey <sunil.k.pandey@intel.com> PR target/84413 * gcc.target/i386/pr84413-1.c: New test. * gcc.target/i386/pr84413-2.c: Likewise. * gcc.target/i386/pr84413-3.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262649 138bc75d-0d04-0410-961f-82ee72b054a4
The libffi library doesn't understand zero-sized objects. When we see a zero-sized field in a struct, just skip it when converting to the FFI data structures. There is no value to pass in any case, so not telling libffi about the field doesn't affect anything. The test case for this is https://golang.org/cl/123316. Fixes golang/go#26335 Reviewed-on: https://go-review.googlesource.com/123335 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262651 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262658 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262659 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ * config/riscv/linux.h (TARGET_ASM_FILE_END): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262660 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262917 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262921 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262922 138bc75d-0d04-0410-961f-82ee72b054a4
…7:16 gcc/ChangeLog: * gcc/gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid diagnosing calls with unknown arguments unless -Walloca-larger-than is restricted to less than PTRDIFF_MAX bytes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262923 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262927 138bc75d-0d04-0410-961f-82ee72b054a4
* cp-gimplify.c (cp_fold): Don't fold comparisons into other kind of expressions other than INTEGER_CST regardless of TREE_NO_WARNING or warn_nonnull_compare. * g++.dg/warn/Wnonnull-compare-9.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262928 138bc75d-0d04-0410-961f-82ee72b054a4
An rl<wd>imi instruction is often written like "(a << 8) | (b & 255)". If "b" now is a byte in memory, combine will combine the load with the masking (with 255 in the example), since that is a single instruction; and then the rl*imi isn't combined from the remaining pieces. This patch adds a splitter to make combine handle this case. * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the zero_extend argument from memory): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262929 138bc75d-0d04-0410-961f-82ee72b054a4
This changes vsx_init_v4si to be an expander. That way, no special cases are needed anymore for special arguments: the normal RTL passes can deal with it. * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust. * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete. * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force the elements into a register. (rs6000_split_v4si_init_di_reg): Delete. (rs6000_split_v4si_init): Delete. * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT. (vsx_init_v4si): Rewrite as a define_expand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262930 138bc75d-0d04-0410-961f-82ee72b054a4
hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262931 138bc75d-0d04-0410-961f-82ee72b054a4
* gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL terminated STRING_CST object. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262932 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c/86617 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values. testsuite: 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de> PR c/86617 * gcc.dg/pr86617.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262933 138bc75d-0d04-0410-961f-82ee72b054a4
2018-07-23 Carl Love <cel@us.ibm.com> PR 86591 * gcc.target/powerpc/altivec-1-runnable.c: Move vector double tests to file altivec-2-runnable.c. * gcc.target/powerpc/altivec-2-runnable.c: Add vector double tests. * gcc.target/powerpc/buitlins-1.c: Remove dg-final check for xxlor. Update dg-final test for __divdi3 and __udivdi3 instructions. Update comments for instruction generated by vec_mergeh, vec_perm, vec_round, vec_cts, vec_ctu, vec_cpsgn tests. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262934 138bc75d-0d04-0410-961f-82ee72b054a4
…g malloc pmr::resource_adaptor can avoid allocating an oversized buffer and doing manual alignment within that buffer when the wrapped allocator is known to always meet the requested alignment. Specifically, if the allocator is known to use malloc or new directly, then we can call the allocator directly for any fundamental alignment. PR libstdc++/70940 * include/experimental/memory_resource (__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion. (__resource_adaptor_common::__guaranteed_alignment): New helper to give maximum alignment an allocator guarantees. Specialize for known allocators using new and malloc. (__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment. (__resource_adaptor_imp::do_deallocate): Likewise. * testsuite/experimental/memory_resource/new_delete_resource.cc: Check that new and delete are called with expected sizes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262935 138bc75d-0d04-0410-961f-82ee72b054a4
* fixincl.x: Regenerate. * tests/base/unistd.h [AIX_UNISTD_CHECK]: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262936 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262940 138bc75d-0d04-0410-961f-82ee72b054a4
* g++.dg/tree-ssa-/pr19476-1.C: Check dom2 dump instead of ccp1. * g++.dg/tree-ssa-/pr19476-5.C: Likewise. * g++.dg/tree-ssa-/pr19476-6.C: New test. * g++.dg/tree-ssa-/pr19476-7.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262942 138bc75d-0d04-0410-961f-82ee72b054a4
PR libstdc++/70966 * include/experimental/memory_resource (__get_default_resource): Use placement new to create an object with dynamic storage duration. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262943 138bc75d-0d04-0410-961f-82ee72b054a4
By making the memory_resource base class a template parameter the __resource_adaptor_imp can be used to adapt an allocator into a std::pmr::memory_resource instead of experimental::pmr::memory_resource. * include/experimental/memory_resource: Adjust comments and whitespace. (__resource_adaptor_imp): Add second template parameter for type of memory resource base class. (memory_resource): Define default constructor, destructor, copy constructor and copy assignment operator as defaulted. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262944 138bc75d-0d04-0410-961f-82ee72b054a4
The erased_type condition is only true for code using the Library Fundamentals TS, so assume it's less common and only check it after checking for convertibility. This does mean for types using erased_type the more expensive convertibility check is done first, but such types are rare. * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder conditions. Add comments. * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line. * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise. * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262945 138bc75d-0d04-0410-961f-82ee72b054a4
* match.pd: Add BIT_FIELD_REF canonicalizations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262946 138bc75d-0d04-0410-961f-82ee72b054a4
* include/std/bit (__countl_zero, __countr_zero, __popcount): Use local variables for number of digits instead of type aliases. (__log2p1): Remove redundant branch also checked in __countl_zero. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262947 138bc75d-0d04-0410-961f-82ee72b054a4
* expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT and abs_d == d, do the power of two handling if profitable. * gcc.target/i386/pr86627.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262948 138bc75d-0d04-0410-961f-82ee72b054a4
Committed on behalf of matthew.malcomson@arm.com 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com> * config/aarch64/aarch64-simd.md (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into... (aarch64_<ANY_EXTEND:su>subw<mode>): ... This... (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this. (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into... (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This... (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this. (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into... (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This... (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this. * gcc.target/aarch64/vect-su-add-sub.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262949 138bc75d-0d04-0410-961f-82ee72b054a4
There are various ways that it's possible for a gimple statement to have an UNKNOWN_LOCATION, and for that UNKNOWN_LOCATION to be wrapped in an ad-hoc location to capture inlining information. For such a location, LOCATION_FILE (loc) is NULL. Various places in -fsave-optimization-record were checking for loc != UNKNOWN_LOCATION and were passing LOCATION_FILE (loc) to code that assumed a non-NULL filename, thus leading to segfaults for the above cases. This patch updates the tests to use LOCATION_LOCUS (loc) != UNKNOWN_LOCATION instead, to look through ad-hoc location wrappers, fixing the segfaults. It also adds various assertions to the affected code. gcc/ChangeLog: PR tree-optimization/86636 * json.cc (json::object::set): Fix comment. Add assertions. (json::array::append): Move here from json.h. Add comment and an assertion. (json::string::string): Likewise. * json.h (json::array::append): Move to json.cc. (json::string::string): Likewise. * optinfo-emit-json.cc (optrecord_json_writer::impl_location_to_json): Assert that we aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc wrapper around it. Expand the location once, rather than three times. (optrecord_json_writer::inlining_chain_to_json): Fix the check for UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc wrappers. (optrecord_json_writer::optinfo_to_json): Likewise, in four places. Fix some overlong lines. gcc/testsuite/ChangeLog: PR tree-optimization/86636 * gcc.c-torture/compile/pr86636.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262950 138bc75d-0d04-0410-961f-82ee72b054a4
r262589 introduced another instance of the bug fixed in r258131. 2018-07-23 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR tree-optimization/86618 * tree-vect-stmts.c (vectorizable_call): Don't take the address of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262951 138bc75d-0d04-0410-961f-82ee72b054a4
An output iterator passed as the unused first argument to __niter_wrap might have already been invalidated, so don't copy it. PR libstdc++/86658 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused parameter by reference, to avoid copying invalid iterators. * testsuite/25_algorithms/copy/86658.cc: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262952 138bc75d-0d04-0410-961f-82ee72b054a4
This is missing the synchronized_pool_resource and unsynchronized_pool_resource classes but is otherwise complete. This is a new implementation, not based on the existing code in <experimental/memory_resource>, but memory_resource and polymorphic_allocator ended up looking almost the same anyway. The constant_init kluge in src/c++17/memory_resource.cc is apparently due to Richard Smith and ensures that the objects are constructed during constant initialiation phase and not destroyed (because the constant_init destructor doesn't destroy the union member and the storage is not reused). * config/abi/pre/gnu.ver: Export new symbols. * configure: Regenerate. * include/Makefile.am: Add new <memory_resource> header. * include/Makefile.in: Regenerate. * include/precompiled/stdc++.h: Include <memory_resource> for C++17. * include/std/memory_resource: New header. (memory_resource, polymorphic_allocator, new_delete_resource) (null_memory_resource, set_default_resource, get_default_resource) (pool_options, monotonic_buffer_resource): Define. * src/Makefile.am: Add c++17 directory. * src/Makefile.in: Regenerate. * src/c++11/Makefile.am: Fix comment. * src/c++17/Makefile.am: Add makefile for new sub-directory. * src/c++17/Makefile.in: Generate. * src/c++17/memory_resource.cc: New. (newdel_res_t, null_res_t, constant_init, newdel_res, null_res) (default_res, new_delete_resource, null_memory_resource) (set_default_resource, get_default_resource): Define. * testsuite/20_util/memory_resource/1.cc: New test. * testsuite/20_util/memory_resource/2.cc: New test. * testsuite/20_util/monotonic_buffer_resource/1.cc: New test. * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test. * testsuite/20_util/monotonic_buffer_resource/release.cc: New test. * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc: New test. * testsuite/20_util/polymorphic_allocator/1.cc: New test. * testsuite/20_util/polymorphic_allocator/resource.cc: New test. * testsuite/20_util/polymorphic_allocator/select.cc: New test. * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource): Define concrete memory resource for testing. (__gnu_test::default_resource_mgr): Define RAII helper for changing default resource. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262953 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262957 138bc75d-0d04-0410-961f-82ee72b054a4
…variable offset PR tree-optimization/86532 - Wrong code due to a wrong strlen folding starting with r262522 gcc/ChangeLog: PR tree-optimization/86622 PR tree-optimization/86532 * builtins.h (string_length): Declare. * builtins.c (c_strlen): Correct handling of non-constant offsets. (check_access): Be prepared for non-constant length ranges. (string_length): Make extern. * expr.c (string_constant): Only handle the minor non-constant array index. Use string_constant to compute the length of a generic string constant. gcc/testsuite/ChangeLog: PR tree-optimization/86622 PR tree-optimization/86532 * gcc.c-torture/execute/strlen-2.c: New test. * gcc.c-torture/execute/strlen-3.c: New test. * gcc.c-torture/execute/strlen-4.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262958 138bc75d-0d04-0410-961f-82ee72b054a4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.