- 22 Feb, 2019 32 commits
-
-
gcc/testsuite/ChangeLog: * gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test. From-SVN: r269120
Martin Sebor committed -
With -mavx, for $ cat foo.i extern float f; extern double d; extern int i; void foo (void) { d = f; f = i; } we need to generate vxorp[ds] %xmmN, %xmmN, %xmmN ... vcvtss2sd f(%rip), %xmmN, %xmmX ... vcvtsi2ss i(%rip), %xmmN, %xmmY to avoid partial XMM register stall. This patch adds a pass to generate a single vxorps %xmmN, %xmmN, %xmmN at entry of the nearest dominator for basic blocks with SF/DF conversions, which is in the fake loop that contains the whole function, instead of generating one vxorp[ds] %xmmN, %xmmN, %xmmN for each SF/DF conversion. NB: The LCM algorithm isn't appropriate here since it may place a vxorps inside the loop. Simple testcase show this: $ cat badcase.c extern float f; extern double d; void foo (int n, int k) { for (int j = 0; j != n; j++) if (j < k) d = f; } It generates ... loop: if(j < k) vxorps %xmm0, %xmm0, %xmm0 vcvtss2sd f(%rip), %xmm0, %xmm0 ... loopend ... This is because LCM only works when there is a certain benifit. But for conditional branch, LCM wouldn't move vxorps %xmm0, %xmm0, %xmm0 out of loop. SPEC CPU 2017 on Intel Xeon with AVX512 shows: 1. The nearest dominator |RATE |Improvement| |500.perlbench_r | 0.55% | |538.imagick_r | 8.43% | |544.nab_r | 0.71% | 2. LCM |RATE |Improvement| |500.perlbench_r | -0.76% | |538.imagick_r | 7.96% | |544.nab_r | -0.13% | Performance impacts of SPEC CPU 2017 rate on Intel Xeon with AVX512 using -Ofast -flto -march=skylake-avx512 -funroll-loops before commit e739972ad6ad05e32a1dd5c29c0b950a4c4bd576 Author: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Thu Jan 31 20:06:42 2019 +0000 PR target/89071 * config/i386/i386.md (*extendsfdf2): Split out reg->reg alternative to avoid partial SSE register stall for TARGET_AVX. (truncdfsf2): Ditto. (sse4_1_round<mode>2): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268427 138bc75d-0d04-0410-961f-82ee72b054a4 are: |INT RATE |Improvement| |500.perlbench_r | 0.55% | |502.gcc_r | 0.14% | |505.mcf_r | 0.08% | |523.xalancbmk_r | 0.18% | |525.x264_r |-0.49% | |531.deepsjeng_r |-0.04% | |541.leela_r |-0.26% | |548.exchange2_r |-0.3% | |557.xz_r |BuildSame| |FP RATE |Improvement| |503.bwaves_r |-0.29% | |507.cactuBSSN_r | 0.04% | |508.namd_r |-0.74% | |510.parest_r |-0.01% | |511.povray_r | 2.23% | |519.lbm_r | 0.1% | |521.wrf_r | 0.49% | |526.blender_r | 0.13% | |527.cam4_r | 0.65% | |538.imagick_r | 8.43% | |544.nab_r | 0.71% | |549.fotonik3d_r | 0.15% | |554.roms_r | 0.08% | After commit e739972ad6ad05e32a1dd5c29c0b950a4c4bd576, on Skylake client, impacts on 538.imagick_r with -fno-unsafe-math-optimizations -march=native -Ofast -funroll-loops -flto 1. Size comparision: before: text data bss dec hex filename 2436377 8352 4528 2449257 255f69 imagick_r after: text data bss dec hex filename 2425249 8352 4528 2438129 2533f1 imagick_r 2. Number of vxorps: before after difference 4948 4135 -19.66% 3. Performance improvement: |RATE |Improvement| |538.imagick_r | 5.5% | gcc/ 2019-02-22 H.J. Lu <hongjiu.lu@intel.com> Hongtao Liu <hongtao.liu@intel.com> Sunil K Pandey <sunil.k.pandey@intel.com> PR target/87007 * config/i386/i386-passes.def: Add pass_remove_partial_avx_dependency. * config/i386/i386-protos.h (make_pass_remove_partial_avx_dependency): New. * config/i386/i386.c (make_pass_remove_partial_avx_dependency): New function. (pass_data_remove_partial_avx_dependency): New. (pass_remove_partial_avx_dependency): Likewise. (make_pass_remove_partial_avx_dependency): Likewise. * config/i386/i386.md (avx_partial_xmm_update): New attribute. (*extendsfdf2): Add avx_partial_xmm_update. (truncdfsf2): Likewise. (*float<SWI48:mode><MODEF:mode>2): Likewise. (SF/DF conversion splitters): Disabled for TARGET_AVX. gcc/testsuite/ 2019-02-22 H.J. Lu <hongjiu.lu@intel.com> Hongtao Liu <hongtao.liu@intel.com> Sunil K Pandey <sunil.k.pandey@intel.com> PR target/87007 * gcc.target/i386/pr87007-1.c: New test. * gcc.target/i386/pr87007-2.c: Likewise. Co-Authored-By: Hongtao Liu <hongtao.liu@intel.com> Co-Authored-By: Sunil K Pandey <sunil.k.pandey@intel.com> From-SVN: r269119
H.J. Lu committed -
PR middle-end/85598 * gimple-ssa-sprintf.c (pass_sprintf_length::execute): Enable loop analysis for pass. From-SVN: r269115
Aldy Hernandez committed -
This is a repeat of commit r263989, which commit r264052 accidentally reverted. 2019-02-22 Thiago Macieira <thiago.macieira@intel.com> PR target/89444 * config/i386/i386.h (PTA_WESTMERE): Remove PTA_AES. (PTA_SKYLAKE): Add PTA_AES. (PTA_GOLDMONT): Likewise. From-SVN: r269114
Thiago Macieira committed -
2019-02-22 Richard Biener <rguenther@suse.de> c-family/ * c-pch.c (no_checksum): Remove. (pch_init): Remove assertion that executable_checksum is not all zero. (c_common_valid_pch): Likewise. From-SVN: r269113
Richard Biener committed -
While doing more testing I found a couple of issues with my BTI patches. This patch fixes them: 1) Remove a reference to return address key. The original patch was written based on a different not yet committed patch ([PATCH 3/3][GCC][AARCH64] Add support for pointer authentication B key) and I missed out on cleaning this up. This is hidden behind the configuration option and thus went unnoticed. 2) Add a missed case for adding the BTI instruction in thunk functions. *** gcc/ChangeLog *** 2019-02-22 Sudakshina Das <sudi.das@arm.com> * config/aarch64/aarch64.c (aarch64_output_mi_thunk): Add bti instruction if enabled. (aarch64_override_options): Remove reference to return address key. From-SVN: r269112
Sudakshina Das committed -
2019-02-22 Richard Biener <rguenther@suse.de> PR tree-optimization/89440 * tree-vect-loop.c (vect_create_epilog_for_reduction): Remove not necessary assert. * gcc.dg/vect/pr89440.c: New testcase. From-SVN: r269111
Richard Biener committed -
gcc/testsuite/ * lib/target-supports.exp (check_effective_target_offload_nvptx): Remove. From-SVN: r269110
Thomas Schwinge committed -
[libgomp] In OpenACC testing, by default only build for the offload target that we're actually going to test ... to avoid compilation overhead, and to keep simple '-foffload=[...]' handling in test cases. libgomp/ * testsuite/libgomp.oacc-c++/c++.exp: Specify "-foffload=$offload_target". * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. * testsuite/lib/libgomp.exp (check_effective_target_openacc_nvidia_accel_configured): Remove, as (conceptually) merged into check_effective_target_openacc_nvidia_accel_selected. Adjust all users. From-SVN: r269109
Thomas Schwinge committed -
... instead of through offload plugins. libgomp/ * plugin/configfrag.ac: Populate and AC_SUBST offload_targets. * testsuite/libgomp-test-support.exp.in: Adjust. * testsuite/lib/libgomp.exp: Likewise. Don't populate openacc_device_types_s. (offload_target_to_openacc_device_type): New proc. * testsuite/libgomp.oacc-c++/c++.exp: Adjust. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. * Makefile.in: Regenerate. * configure: Likewise. * testsuite/Makefile.in: Likewise. From-SVN: r269108
Thomas Schwinge committed -
libgomp/ * plugin/configfrag.ac: Populate and AC_SUBST offload_plugins instead of offload_targets, and AC_DEFINE_UNQUOTED OFFLOAD_PLUGINS instead of OFFLOAD_TARGETS. * target.c (gomp_target_init): Adjust. * testsuite/libgomp-test-support.exp.in: Likewise. * testsuite/lib/libgomp.exp: Likewise. Populate openacc_device_types_s instead of offload_targets_s_openacc. (check_effective_target_openacc_nvidia_accel_selected) (check_effective_target_openacc_host_selected): Adjust. * testsuite/libgomp.oacc-c++/c++.exp: Likewise. * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. * Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise. * testsuite/Makefile.in: Likewise. From-SVN: r269107
Thomas Schwinge committed -
[libgomp] In OpenACC offloading testing, be more explicit in what is supported, and what is not, or why not libgomp/ * testsuite/lib/libgomp.exp: Error out for unknown offload target. * testsuite/libgomp.oacc-c++/c++.exp: Likewise. Report if "offloading: supported, but hardware not accessible". * testsuite/libgomp.oacc-c/c.exp: Likewise. * testsuite/libgomp.oacc-fortran/fortran.exp: Likewise. From-SVN: r269106
Thomas Schwinge committed -
... instead of having an incomplete local implementation. With these changes in place, we can then also revert the work-around r267213 "[nvptx] Unify C/Fortran routine handling in nvptx_goacc_validate_dims". gcc/fortran/ PR fortran/72741 * gfortran.h (oacc_routine_lop): New enum. (symbol_attribute): Use it. * openmp.c (gfc_oacc_routine_dims): Replace with... (gfc_oacc_routine_lop): ... this new function. (gfc_match_oacc_routine): Adjust. * trans-decl.c (add_attributes_to_decl): Likewise. gcc/ PR fortran/72741 * omp-general.c (oacc_replace_fn_attrib): Mostly split out into... (oacc_replace_fn_attrib_attr): ... this new function. * omp-general.h (oacc_replace_fn_attrib_attr): New prototype. * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): Revert workaround. gcc/testsuite/ PR fortran/72741 * gfortran.dg/goacc/classify-routine.f95: Adjust. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> From-SVN: r269105
Thomas Schwinge committed -
..., which were committed as part of, but logically don't belong into r261813 "Update OpenACC data clause semantics to the 2.5 behavior", and which confuse later changes. gcc/fortran/ * openmp.c (gfc_match_oacc_declare): Revert earlier changes. gcc/testsuite/ * c-c++-common/goacc/routine-5.c: Revert earlier changes. * g++.dg/goacc/template.C: Likewise. From-SVN: r269104
Thomas Schwinge committed -
... which has been present (with HSA offloading configured) ever since this test case got added. gcc/testsuite/ PR fortran/78027 * gfortran.dg/goacc/pr78027.f90: Add 'dg-additional-options "-Wno-hsa"'. From-SVN: r269103
Thomas Schwinge committed -
gcc/c/ * c-parser.c (c_parser_oacc_shape_clause): Add loc formal parameter. Adjust all users. (c_parser_oacc_simple_clause): Replace parser with loc formal parameter. Adjust all users. gcc/cp/ * parser.c (cp_parser_oacc_simple_clause): Remove parser formal parameter, move loc formal parameter to the front. Adjust all users. (cp_parser_oacc_shape_clause): Add loc formal parameter. Adjust all users. From-SVN: r269102
Thomas Schwinge committed -
This patch adds support for the Neoverse N1 [1]. This CPU was previously supported through the Ares codename. -mcpu=ares is retained as an alias of the new -mcpu=neoverse-n1. Bootstrapped and tested on arm-none-linux-gnueabihf. * config/arm/arm-cpus.in (ares): Rename to... (neoverse-n1): ... This. Add ares as alias. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Likewise. * doc/invoke.txt (ARM Options): Document neoverse-n1. From-SVN: r269101
Kyrylo Tkachov committed -
This patch adds -mcpu and -mtune support for the Neoverse E1 CPU [1]. The new option is -mcpu=neoverse-e1. Bootstrapped and tested on aarch64-none-linux-gnu. * config/aarch64/aarch64-cores.def (neoverse-e1): Define. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi (AArch64 Options): Document neoverse-e1 -mcpu option. From-SVN: r269100
Kyrylo Tkachov committed -
This patch adds support for the Neoverse N1 CPU [1]. This was supported in GCC earlier through the codename Ares, which it now replaces. -mcpu=ares is still accepted as there's been a binutils release supporting it, but the internal structures are renamed to use Neoverse N1-related identifiers. Bootstrapped and tested on aarch64-none-linux-gnu. * config/aarch64/aarch64.c (ares_tunings): Rename to... (neoversen1_tunings): ... This. * config/aarch64/aarch64-cores.def (ares): Change tuning to the above. (neoverse-n1): New CPU. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.txt (AArch64 Options): Document neoverse-n1. From-SVN: r269099
Kyrylo Tkachov committed -
2019-02-22 Richard Biener <rguenther@suse.de> PR middle-end/87609 * cfghooks.h (dependence_hash): New typedef. (struct copy_bb_data): New type. (cfg_hooks::duplicate_block): Adjust to take a copy_bb_data argument. (duplicate_block): Likewise. * cfghooks.c (duplicate_block): Pass down copy_bb_data. (copy_bbs): Create and pass down copy_bb_data. * cfgrtl.c (cfg_layout_duplicate_bb): Adjust. (rtl_duplicate_bb): Likewise. * tree-cfg.c (gimple_duplicate_bb): If the copy_bb_data arg is not NULL remap dependence info. * gcc.dg/torture/restrict-7.c: New testcase. From-SVN: r269098
Richard Biener committed -
2019-02-22 Richard Biener <rguenther@suse.de> PR tree-optimization/87609 * tree-core.h (tree_base): Document special clique values. * tree-inline.c (remap_dependence_clique): Do not use the special clique value of one. (maybe_set_dependence_info): Use clique one. (clear_dependence_clique): New callback. (compute_dependence_clique): Clear clique one from all refs before assigning it (again). From-SVN: r269097
Richard Biener committed -
* configure.host (abi_baseline_pair): Adjust for SPARC64/Linux. * config/abi/post/sparc64-linux-gnu: New directory. * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file. * config/abi/post/sparc64-linux-gnu/32: New directory. * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file. From-SVN: r269096
Eric Botcazou committed -
The standard says that in a generic lambda we should speculatively capture 'this' if we see a call to an overload set that contains a non-static member function, but it seems wrong to reject the program if we can't capture, since it might not actually be needed. * lambda.c (lambda_expr_this_capture): Change add_capture_p to int. (maybe_generic_this_capture): Pass -1. From-SVN: r269095
Jason Merrill committed -
We mostly use is_normal_capture_proxy to decide whether or not to use DECL_CAPTURED_VARIABLE; we could just check whether it's set. VLA capture is still mostly broken, but this fixes this ICE. * lambda.c (is_normal_capture_proxy): Check DECL_CAPTURED_VARIABLE. From-SVN: r269094
Jason Merrill committed -
The members of an explicit specialization of a class template don't have the template parameters of that class template, so we shouldn't try to provide arguments for them. Only set outer_args when the class is an instantiation. * pt.c (do_class_deduction): Don't include explicit specialization args in outer_args. From-SVN: r269093
Jason Merrill committed -
* testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test. * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New test. From-SVN: r269091
Jonathan Wakely committed -
This patch adds recognition of the u8string and u8string_view type aliases to the gdb pretty printer extension. 2019-02-22 Tom Honermann <tom@honermann.net> * python/libstdcxx/v6/printers.py (register_type_printers): Add type printers for u8string and u8string_view. From-SVN: r269090
Tom Honermann committed -
This patch augments existing tests to validate behavior for char8_t. In all cases, added test cases are cloned from existing tests for wchar_t or char16_t. A few tests required updates to line numbers for diagnostic messages. 2019-02-22 Tom Honermann <tom@honermann.net> * testsuite/18_support/byte/ops.cc: Validate std::to_integer<char8_t>, std::to_integer<char16_t>, and std::to_integer<char32_t>. * testsuite/18_support/numeric_limits/dr559.cc: Validate std::numeric_limits<char8_t>. * testsuite/18_support/numeric_limits/lowest.cc: Validate std::numeric_limits<char8_t>::lowest(). * testsuite/18_support/numeric_limits/max_digits10.cc: Validate std::numeric_limits<char8_t>::max_digits10. * testsuite/18_support/type_info/fundamental.cc: Validate typeinfo for char8_t. * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating std::from_chars with char8_t. * testsuite/20_util/hash/requirements/explicit_instantiation.cc: Validate explicit instantiation of std::hash<char8_t>. * testsuite/20_util/is_integral/value.cc: Validate std::is_integral<char8_t>. * testsuite/20_util/make_signed/requirements/typedefs-4.cc: Validate std::make_signed<char8_t>. * testsuite/21_strings/basic_string/cons/char/deduction.cc: Validate u8string construction from char8_t sources. * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate std::pmr::u8string. * testsuite/21_strings/basic_string_view/operations/compare/ char/70483.cc: Validate substr operations on u8string_view. * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that the u8string_view typedef is defined. * testsuite/21_strings/char_traits/requirements/ constexpr_functions.cc: Validate char_traits<char8_t> constexpr member functions. * testsuite/21_strings/char_traits/requirements/ constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17 constexpr member functions. * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate that the u8string typedef is defined. * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence of the std::codecvt<char16_t, char8_t, std::mbstate_t> and std::codecvt<char32_t, char8_t, std::mbstate_t> facets. * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line numbers. * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc: Validate std::atomic<char8_t>::is_always_lock_free * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc: Update line numbers. * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc: Likewise. * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc: Likewise. * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc: Validate std::experimental::pmr::u8string. * testsuite/experimental/string_view/typedefs.cc: Validate that the u8string_view typedef is defined. * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and char32_t to the typelists. From-SVN: r269089
Tom Honermann committed -
This patch corrects ambiguous partial specializations of typelist::detail::append_. Previously, neither append_<chain<Hd, Tl>, Typelist_Chain> nor append_<Typelist_Chain, null_type> was a better match for append_<chain<Hd, Tl>, null_type>. 2019-02-22 Tom Honermann <tom@honermann.net> * include/ext/typelist.h: Constrain a partial specialization of typelist::detail::append_ to only match chain<T1,T2>. From-SVN: r269088
Tom Honermann committed -
PR go/89406 net: remove unixgram test sockets Backport https://golang.org/cl/163277 from the master library. Updates https://gcc.gnu.org/PR89406 Reviewed-on: https://go-review.googlesource.com/c/163200 From-SVN: r269087
Ian Lance Taylor committed -
Backport https://golang.org/cl/163237 from the master library: Ensure that cmd/go consistently calls base.Exit rather than os.Exit, so that we don't incorrectly leave the work directory around on exit. Test this by modifying the testsuite to run all the tests with TMPDIR set to a temporary directory, and then check that no files are left behind in that temporary directory. Adjust a couple of tests to make this approach work. Updates https://gcc.gnu.org/PR89406 Reviewed-on: https://go-review.googlesource.com/c/163198 From-SVN: r269086
Ian Lance Taylor committed -
From-SVN: r269085
GCC Administrator committed
-
- 21 Feb, 2019 8 commits
-
-
gcc/ChangeLog: * doc/extend.texi (__clear_cache): Correct signature. libgcc/ChangeLog: * libgcc2.h (__clear_cache): Correct signature. * libgcc2.c (__clear_cache): Same. gcc/testsuite/ChangeLog: * gcc.dg/Wbuiltin-declaration-mismatch-12.c: New test. From-SVN: r269082
Martin Sebor committed -
Here, we were trying to instantiate the default argument before setting DECL_FRIEND_CONTEXT, so that the instantiated lambda ended up being treated as part of the S template, which confused dwarf2out. * pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner. From-SVN: r269081
Jason Merrill committed -
Just like in make_constrained_auto, we need to defer setting TYPE_CANONICAL until we've set fields that will affect structural_comptypes. * pt.c (make_template_placeholder): Set TYPE_CANONICAL after CLASS_PLACEHOLDER_TEMPLATE. From-SVN: r269080
Jason Merrill committed -
PR go/89170 * varasm.c (decode_addr_const): Call lookup_constant_def rather than output_constant_def. (add_constant_to_table): New static function. (output_constant_def): Call add_constant_to_table. (tree_output_constant_def): Likewise. From-SVN: r269079
Ian Lance Taylor committed -
PR c++/89285 * builtins.c (fold_builtin_arith_overflow): If first two args are INTEGER_CSTs, set intres and ovfres to constants rather than calls to ifn. * constexpr.c (struct constexpr_fundef): Add parms and result members. (retrieve_constexpr_fundef): Adjust for the above change. (register_constexpr_fundef): Save constexpr body with copy_fn, temporarily set DECL_CONTEXT on DECL_RESULT before that. (get_fundef_copy): Change FUN argument to FUNDEF with constexpr_fundef * type, grab body and parms/result out of constexpr_fundef struct and temporarily change it for copy_fn calls too. (cxx_eval_builtin_function_call): For __builtin_FUNCTION temporarily adjust current_function_decl from ctx->call context. Test !potential_constant_expression instead of !is_constant_expression. (cxx_bind_parameters_in_call): Grab parameters from new_call. Undo convert_for_arg_passing changes for TREE_ADDRESSABLE type passing. (cxx_eval_call_expression): Adjust get_fundef_copy caller. (cxx_eval_conditional_expression): For IF_STMT, allow then or else operands to be NULL. (label_matches): Handle BREAK_STMT and CONTINUE_STMT. (cxx_eval_loop_expr): Add support for FOR_STMT, WHILE_STMT and DO_STMT. (cxx_eval_switch_expr): Add support for SWITCH_STMT. (cxx_eval_constant_expression): Handle IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT, CONTINUE_STMT, SWITCH_STMT, BREAK_STMT and CONTINUE_STMT. For SIZEOF_EXPR, recurse on the result of fold_sizeof_expr. Ignore DECL_EXPR with USING_DECL operand. * lambda.c (maybe_add_lambda_conv_op): Build thisarg using build_int_cst to make it a valid constant expression. * g++.dg/ubsan/vptr-4.C: Expect reinterpret_cast errors. * g++.dg/cpp1y/constexpr-84192.C (f2): Adjust expected diagnostics. * g++.dg/cpp1y/constexpr-70265-2.C (foo): Adjust expected line of diagnostics. * g++.dg/cpp1y/constexpr-89285.C: New test. * g++.dg/cpp0x/constexpr-arith-overflow.C (add, sub, mul): Ifdef out for C++11. (TEST_ADD, TEST_SUB, TEST_MUL): Define to Assert (true) for C++11. * g++.dg/cpp0x/constexpr-arith-overflow2.C: New test. From-SVN: r269078
Jakub Jelinek committed -
The common base class for __is_move_insertable and __is_copy_insertable instantiates both the copy and move tests, when only one is needed. The unneeded one might cause errors outside the immediate context. The solution used in this patch is to replace them with alias templates, which will only be instantiated as needed. PR libstdc++/89416 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace class template with class. Replace move and copy member types with member alias templates, so they are only instantiated when needed. (__is_copy_insertable, __is_move_insertable): Adjust base class. * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable test for C++11/14/17 as well. * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New test. From-SVN: r269075
Jonathan Wakely committed -
Since -mindirect-branch is incompatible with -fcf-protection=return and -fcf-protection, replace -fcf-protection with -fcf-protection=branch. PR target/87412 * gcc.target/i386/indirect-thunk-attr-14.c: Replace -fcf-protection with -fcf-protection=branch. * gcc.target/i386/indirect-thunk-attr-15.c: Likewise. * gcc.target/i386/indirect-thunk-attr-16.c: Likewise. * gcc.target/i386/indirect-thunk-extern-8.c: Likewise. * gcc.target/i386/indirect-thunk-extern-9.c: Likewise. * gcc.target/i386/indirect-thunk-extern-10.c: Likewise. From-SVN: r269074
H.J. Lu committed -
Base fields for empty bases appear in initialization order, which may not be the same as layout order. If they also show up in a CONSTRUCTOR in that order, output_constructor_regular_field aborts because it understandably doesn't want to go backwards. I also considered making o_c_r_f more tolerant of the case where the out-of-order field has fieldsize 0, and so no actual data needs to be emitted, but we might as well avoid adding an element to the CONSTRUCTOR in the first place. * typeck2.c (process_init_constructor_record): Skip trivial initialization of an empty base. From-SVN: r269073
Jason Merrill committed
-