diff options
Diffstat (limited to 'gcc')
101 files changed, 3144 insertions, 932 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f1f3405..ef93c56 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,238 @@ +2021-03-16 Segher Boessenkool <segher@kernel.crashing.org> + + PR target/98092 + * config/rs6000/predicates.md (branch_comparison_operator): Allow + ordered and unordered for CCFPmode, if flag_finite_math_only. + +2021-03-16 Jakub Jelinek <jakub@redhat.com> + + PR target/99600 + * config/i386/i386-expand.c (ix86_split_lea_for_addr): Emit a MULT + rather than ASHIFT. + * config/i386/i386.md (mult by 1248 into ashift): New splitter. + +2021-03-16 Martin Liska <mliska@suse.cz> + + PR target/99592 + * optc-save-gen.awk: Add flag_ipa_ra to exceptions for + cl_optimization_compare function. + +2021-03-16 Ilya Leoshkevich <iii@linux.ibm.com> + + * config/s390/s390.c (f_constraint_p): Treat "fv" constraints + as "v". + +2021-03-16 Jakub Jelinek <jakub@redhat.com> + + PR target/99563 + * config/i386/i386.h (struct machine_function): Add + has_explicit_vzeroupper bitfield. + * config/i386/i386-expand.c (ix86_expand_builtin): Set + cfun->machine->has_explicit_vzeroupper when expanding + IX86_BUILTIN_VZEROUPPER. + * config/i386/i386-features.c (rest_of_handle_insert_vzeroupper): + Do the mode switching only when TARGET_VZEROUPPER, expensive + optimizations turned on and not optimizing for size. + (pass_insert_vzeroupper::gate): Enable even when + cfun->machine->has_explicit_vzeroupper is set. + +2021-03-16 Jakub Jelinek <jakub@redhat.com> + + PR target/99542 + * config/aarch64/aarch64.c + (aarch64_simd_clone_compute_vecsize_and_simdlen): If not a function + definition, walk TYPE_ARG_TYPES list if non-NULL for argument types + instead of DECL_ARGUMENTS. Ignore types for uniform arguments. + +2021-03-15 Richard Biener <rguenther@suse.de> + + PR tree-optimization/98834 + * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle missing + subsetting by truncating the access size. + +2021-03-15 Jan Hubicka <hubicka@ucw.cz> + + * config/i386/i386-options.c (processor_cost_table): Add znver3_cost. + * config/i386/x86-tune-costs.h (znver3_cost): New gobal variable; copy + of znver2_cost. + +2021-03-15 Martin Liska <mliska@suse.cz> + + * spellcheck.c: Add missing comma in initialization. + +2021-03-14 Uroš Bizjak <ubizjak@gmail.com> + + * config/i386/sse.md (*vec_extract<mode>): Merge alternative 0 with + alternative 2 and alternative 1 with alternative 3 using + YW register constraint. + (*vec_extract<PEXTR_MODE12:mode>_zext): Merge alternatives + using YW register constraint. + (*vec_extractv16qi_zext): Ditto. + (*vec_extractv4si): Merge alternatives 4 and 5 + using Yw register constraint. + (*ssse3_palignr<mode>_perm): Use Yw instead of v for alternative 3. + +2021-03-13 Martin Sebor <msebor@redhat.com> + + PR tree-optimization/99489 + * builtins.c (gimple_call_alloc_size): Fail gracefully when argument + is not a call statement. + +2021-03-13 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/99544 + * match.pd (X + (X << C) -> X * (1 + (1 << C))): Don't simplify + if for vector types multiplication can't be done in type's mode. + +2021-03-12 Eric Botcazou <ebotcazou@adacore.com> + + PR target/99422 + * config/sparc/constraints.md (w): Rename to... + (W): ... this and ditch previous implementation. + * config/sparc/sparc.md (*movdi_insn_sp64): Replace W with m. + (*movdf_insn_sp64): Likewise. + (*mov<VM64:mode>_insn_sp64): Likewise. + * config/sparc/sync.md (*atomic_compare_and_swap<mode>_1): Replace + w with W. + (atomic_compare_and_swap_leon3_1): Likewise. + (*atomic_compare_and_swapdi_v8plus): Likewise. + * config/sparc/sparc.c (memory_ok_for_ldd): Remove useless test on + architecture and add missing address validity check during LRA. + +2021-03-12 Tobias Burnus <tobias@codesourcery.com> + + PR fortran/98858 + * gimplify.c (omp_add_variable): Handle NULL_TREE as size + occuring for assumed-size arrays in use_device_{ptr,addr}. + +2021-03-12 Jakub Jelinek <jakub@redhat.com> + + PR target/99321 + * config/i386/constraints.md (YW): New internal constraint. + * config/i386/sse.md (v_Yw): Add V4TI, V2TI, V1TI and TI cases. + (*<sse2_avx2>_<insn><mode>3<mask_name>, + *<sse2_avx2>_uavg<mode>3<mask_name>, *abs<mode>2, + *<s>mul<mode>3_highpart<mask_name>): Use <v_Yw> instead of v in + constraints. + (<sse2_avx2>_psadbw): Use YW instead of v in constraints. + (*avx2_pmaddwd, *sse2_pmaddwd, *<code>v8hi3, *<code>v16qi3, + avx2_pmaddubsw256, ssse3_pmaddubsw128): Merge last two alternatives + into one, use Yw instead of former x,v. + (ashr<mode>3, <insn><mode>3): Use <v_Yw> instead of x in constraints of + the last alternative. + (<sse2_avx2>_packsswb<mask_name>, <sse2_avx2>_packssdw<mask_name>, + <sse2_avx2>_packuswb<mask_name>, <sse4_1_avx2>_packusdw<mask_name>, + *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, <ssse3_avx2>_palignr<mode>, + <ssse3_avx2>_pshufb<mode>3<mask_name>): Merge last two alternatives + into one, use <v_Yw> instead of former x,v. + (avx2_interleave_highv32qi<mask_name>, + vec_interleave_highv16qi<mask_name>): Use Yw instead of v in + constraints. Add && <mask_avx512bw_condition> to condition. + (avx2_interleave_lowv32qi<mask_name>, + vec_interleave_lowv16qi<mask_name>, + avx2_interleave_highv16hi<mask_name>, + vec_interleave_highv8hi<mask_name>, + avx2_interleave_lowv16hi<mask_name>, vec_interleave_lowv8hi<mask_name>, + avx2_pshuflw_1<mask_name>, sse2_pshuflw_1<mask_name>, + avx2_pshufhw_1<mask_name>, sse2_pshufhw_1<mask_name>, + avx2_<code>v16qiv16hi2<mask_name>, sse4_1_<code>v8qiv8hi2<mask_name>, + *sse4_1_<code>v8qiv8hi2<mask_name>_1, <sse2_avx2>_<insn><mode>3): Use + Yw instead of v in constraints. + * config/i386/mmx.md (Yv_Yw): New define_mode_attr. + (*mmx_<insn><mode>3, mmx_ashr<mode>3, mmx_<insn><mode>3): Use <Yv_Yw> + instead of Yv in constraints. + (*mmx_<insn><mode>3, *mmx_mulv4hi3, *mmx_smulv4hi3_highpart, + *mmx_umulv4hi3_highpart, *mmx_pmaddwd, *mmx_<code>v4hi3, + *mmx_<code>v8qi3, mmx_pack<s_trunsuffix>swb, mmx_packssdw, + mmx_punpckhbw, mmx_punpcklbw, mmx_punpckhwd, mmx_punpcklwd, + *mmx_uavgv8qi3, *mmx_uavgv4hi3, mmx_psadbw): Use Yw instead of Yv in + constraints. + (*mmx_pinsrw, *mmx_pinsrb, *mmx_pextrw, *mmx_pextrw_zext, *mmx_pextrb, + *mmx_pextrb_zext): Use YW instead of Yv in constraints. + (*mmx_eq<mode>3, mmx_gt<mode>3): Use x instead of Yv in constraints. + (mmx_andnot<mode>3, *mmx_<code><mode>3): Split last alternative into + two, one with just x, another isa avx512vl with v. + +2021-03-12 Martin Liska <mliska@suse.cz> + + * doc/invoke.texi: Add missing param documentation. + +2021-03-11 David Malcolm <dmalcolm@redhat.com> + + PR analyzer/96374 + * Makefile.in (ANALYZER_OBJS): Add analyzer/feasible-graph.o and + analyzer/trimmed-graph.o. + * doc/analyzer.texi (Analyzer Paths): Rewrite description of + feasibility checking to reflect new implementation. + * doc/invoke.texi (-fdump-analyzer-feasibility): Document new + option. + * shortest-paths.h (shortest_paths::get_shortest_distance): New. + +2021-03-11 David Malcolm <dmalcolm@redhat.com> + + * digraph.cc (selftest::test_shortest_paths): Update + shortest_paths init for new param. Add test of + SPS_TO_GIVEN_TARGET. + * shortest-paths.h (enum shortest_path_sense): New. + (shortest_paths::shortest_paths): Add "sense" param. + Update for renamings. Generalize to use "sense" param. + (shortest_paths::get_shortest_path): Rename param. + (shortest_paths::m_sense): New field. + (shortest_paths::m_prev): Rename... + (shortest_paths::m_best_edge): ...to this. + (shortest_paths::get_shortest_path): Update for renamings. + Conditionalize flipping of path on sense of traversal. + +2021-03-11 David Malcolm <dmalcolm@redhat.com> + + * digraph.cc (selftest::test_shortest_paths): Add test coverage + for paths from B and C. + * shortest-paths.h (shortest_paths::shortest_paths): Handle + unreachable nodes, rather than asserting. + +2021-03-11 David Edelsohn <dje.gcc@gmail.com> + + PR target/99094 + * config/rs6000/rs6000.c (rs6000_xcoff_file_start): Don't create + xcoff_tbss_section_name. + * config/rs6000/xcoff.h (ASM_OUTPUT_TLS_COMMON): Use .lcomm. + * xcoffout.c (xcoff_tbss_section_name): Delete. + * xcoffout.h (xcoff_tbss_section_name): Delete. + +2021-03-11 Richard Biener <rguenther@suse.de> + + PR tree-optimization/99523 + * tree-cfg.c (dump_function_to_file): Dump SSA names + w/o identifier to the decls section as well, not only those + without a VAR_DECL. + +2021-03-11 Jakub Jelinek <jakub@redhat.com> + + PR ipa/99517 + * ipa-icf-gimple.c (func_checker::compare_gimple_call): For internal + function calls with lhs fail if the lhs don't have compatible types. + +2021-03-11 Hans-Peter Nilsson <hp@axis.com> + + * config/cris/cris.h (HARD_FRAME_POINTER_REGNUM): Define. + Change FRAME_POINTER_REGNUM to correspond to a new faked + register faked_fp, part of GENNONACR_REGS like faked_ap. + (CRIS_FAKED_REGS_CONTENTS): New helper macro. + (FIRST_PSEUDO_REGISTER, FIXED_REGISTERS, CALL_USED_REGISTERS): + (REG_ALLOC_ORDER, REG_CLASS_CONTENTS, REGNO_OK_FOR_BASE_P) + (ELIMINABLE_REGS, REGISTER_NAMES): Adjust accordingly. + * config/cris/cris.md (CRIS_FP_REGNUM): Renumber to new faked + register. + (CRIS_REAL_FP_REGNUM): New constant. + * config/cris/cris.c (cris_reg_saved_in_regsave_area): Check + for HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM. + (cris_initial_elimination_offset): Handle elimination changes + to HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM + and add one from FRAME_POINTER_REGNUM to + HARD_FRAME_POINTER_REGNUM. + (cris_expand_prologue, cris_expand_epilogue): Emit code for + hard_frame_pointer_rtx instead of frame_pointer_rtx. + 2021-03-10 David Edelsohn <dje.gcc@gmail.com> PR target/99492 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index f2ed86a..609f807 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20210311 +20210317 diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog index 9ed1624..58b0fbb 100644 --- a/gcc/analyzer/ChangeLog +++ b/gcc/analyzer/ChangeLog @@ -1,3 +1,63 @@ +2021-03-15 Martin Liska <mliska@suse.cz> + + * sm-file.cc (get_file_using_fns): Add missing comma in initializer. + +2021-03-11 David Malcolm <dmalcolm@redhat.com> + + PR analyzer/96374 + * analyzer.opt (-param=analyzer-max-infeasible-edges=): New param. + (fdump-analyzer-feasibility): New flag. + * diagnostic-manager.cc: Include "analyzer/trimmed-graph.h" and + "analyzer/feasible-graph.h". + (epath_finder::epath_finder): Convert m_sep to a pointer and + only create it if !flag_analyzer_feasibility. + (epath_finder::~epath_finder): New. + (epath_finder::m_sep): Convert to a pointer. + (epath_finder::get_best_epath): Add param "diag_idx" and use it + when logging. Rather than finding the shortest path and then + checking feasibility, instead use explore_feasible_paths unless + !flag_analyzer_feasibility, in which case simply use the shortest + path, and note if it is infeasible. Update for m_sep becoming a + pointer. + (class feasible_worklist): New. + (epath_finder::explore_feasible_paths): New. + (epath_finder::process_worklist_item): New. + (class dump_eg_with_shortest_path): New. + (epath_finder::dump_trimmed_graph): New. + (epath_finder::dump_feasible_graph): New. + (saved_diagnostic::saved_diagnostic): Add "idx" param, using it + on new field m_idx. + (saved_diagnostic::to_json): Dump m_idx. + (saved_diagnostic::calc_best_epath): Pass m_idx to get_best_epath. + Remove assertion that m_problem was set when m_best_epath is NULL. + (diagnostic_manager::add_diagnostic): Pass an index when created + saved_diagnostic instances. + * diagnostic-manager.h (saved_diagnostic::saved_diagnostic): Add + "idx" param. + (saved_diagnostic::get_index): New accessor. + (saved_diagnostic::m_idx): New field. + * engine.cc (exploded_node::dump_dot): Call args.dump_extra_info. + Move code to... + (exploded_node::dump_processed_stmts): ...this new function and... + (exploded_node::dump_saved_diagnostics): ...this new function. + Add index of each diagnostic. + (exploded_edge::dump_dot): Move bulk of code to... + (exploded_edge::dump_dot_label): ...this new function. + * exploded-graph.h (eg_traits::dump_args_t::dump_extra_info): New + vfunc. + (exploded_node::dump_processed_stmts): New decl. + (exploded_node::dump_saved_diagnostics): New decl. + (exploded_edge::dump_dot_label): New decl. + * feasible-graph.cc: New file. + * feasible-graph.h: New file. + * trimmed-graph.cc: New file. + * trimmed-graph.h: New file. + +2021-03-11 David Malcolm <dmalcolm@redhat.com> + + * diagnostic-manager.cc (epath_finder::epath_finder): + Update shortest_paths init for new param. + 2021-03-10 David Malcolm <dmalcolm@redhat.com> PR analyzer/96374 diff --git a/gcc/analyzer/sm-file.cc b/gcc/analyzer/sm-file.cc index 48ef4aa..7a81c8f 100644 --- a/gcc/analyzer/sm-file.cc +++ b/gcc/analyzer/sm-file.cc @@ -246,7 +246,7 @@ get_file_using_fns () "__fbufsize", "__flbf", "__fpending", - "__fpurge" + "__fpurge", "__freadable", "__freading", "__fsetlocking", diff --git a/gcc/builtins.c b/gcc/builtins.c index 41e336c..196dda3 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -4924,7 +4924,7 @@ tree gimple_call_alloc_size (gimple *stmt, wide_int rng1[2] /* = NULL */, range_query * /* = NULL */) { - if (!stmt) + if (!stmt || !is_gimple_call (stmt)) return NULL_TREE; tree allocfntype; diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index 214e57b..e1da067 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2021-03-15 Tobias Burnus <tobias@codesourcery.com> + + PR c++/99509 + * c-decl.c (finish_decl): For 'omp declare target implicit' vars, + ensure that the varpool node is marked as offloadable. + 2021-03-05 Tobias Burnus <tobias@codesourcery.com> PR c/99137 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index b559ed5..3b2241b 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -58,6 +58,9 @@ along with GCC; see the file COPYING3. If not see #include "c-family/name-hint.h" #include "c-family/known-headers.h" #include "c-family/c-spellcheck.h" +#include "context.h" /* For 'g'. */ +#include "omp-general.h" +#include "omp-offload.h" /* For offload_vars. */ #include "tree-pretty-print.h" @@ -5658,9 +5661,22 @@ finish_decl (tree decl, location_t init_loc, tree init, DECL_ATTRIBUTES (decl)) && !lookup_attribute ("omp declare target link", DECL_ATTRIBUTES (decl))) - DECL_ATTRIBUTES (decl) - = tree_cons (get_identifier ("omp declare target"), - NULL_TREE, DECL_ATTRIBUTES (decl)); + { + DECL_ATTRIBUTES (decl) + = tree_cons (get_identifier ("omp declare target"), + NULL_TREE, DECL_ATTRIBUTES (decl)); + symtab_node *node = symtab_node::get (decl); + if (node != NULL) + { + node->offloadable = 1; + if (ENABLE_OFFLOADING) + { + g->have_offload = true; + if (is_a <varpool_node *> (node)) + vec_safe_push (offload_vars, decl); + } + } + } } /* This is the last point we can lower alignment so give the target the diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c index 25ab866..acdea2a 100644 --- a/gcc/config/aarch64/aarch64-builtins.c +++ b/gcc/config/aarch64/aarch64-builtins.c @@ -1954,7 +1954,7 @@ aarch64_expand_rng_builtin (tree exp, rtx target, int fcode, int ignore) return target; rtx cc_reg = gen_rtx_REG (CC_Zmode, CC_REGNUM); - rtx cmp_rtx = gen_rtx_fmt_ee (NE, SImode, cc_reg, const0_rtx); + rtx cmp_rtx = gen_rtx_fmt_ee (EQ, SImode, cc_reg, const0_rtx); emit_insn (gen_aarch64_cstoresi (target, cmp_rtx, cc_reg)); return target; } diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 8a86889..7838d99 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -23372,7 +23372,7 @@ aarch64_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, struct cgraph_simd_clone *clonei, tree base_type, int num) { - tree t, ret_type, arg_type; + tree t, ret_type; unsigned int elt_bits, count; unsigned HOST_WIDE_INT const_simdlen; poly_uint64 vec_bits; @@ -23412,11 +23412,17 @@ aarch64_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node, return 0; } - for (t = DECL_ARGUMENTS (node->decl); t; t = DECL_CHAIN (t)) + int i; + tree type_arg_types = TYPE_ARG_TYPES (TREE_TYPE (node->decl)); + bool decl_arg_p = (node->definition || type_arg_types == NULL_TREE); + + for (t = (decl_arg_p ? DECL_ARGUMENTS (node->decl) : type_arg_types), i = 0; + t && t != void_list_node; t = TREE_CHAIN (t), i++) { - arg_type = TREE_TYPE (t); + tree arg_type = decl_arg_p ? TREE_TYPE (t) : TREE_VALUE (t); - if (!currently_supported_simd_type (arg_type, base_type)) + if (clonei->args[i].arg_type != SIMD_CLONE_ARG_TYPE_UNIFORM + && !currently_supported_simd_type (arg_type, base_type)) { if (TYPE_SIZE (arg_type) != TYPE_SIZE (base_type)) warning_at (DECL_SOURCE_LOCATION (node->decl), 0, diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md index a8db33e..eaa582d 100644 --- a/gcc/config/i386/constraints.md +++ b/gcc/config/i386/constraints.md @@ -111,6 +111,8 @@ ;; otherwise any SSE register ;; w any EVEX encodable SSE register for AVX512BW with TARGET_AVX512VL ;; target, otherwise any SSE register. +;; W any EVEX encodable SSE register for AVX512BW target, +;; otherwise any SSE register. (define_register_constraint "Yz" "TARGET_SSE ? SSE_FIRST_REG : NO_REGS" "First SSE register (@code{%xmm0}).") @@ -151,6 +153,10 @@ "TARGET_AVX512BW && TARGET_AVX512VL ? ALL_SSE_REGS : TARGET_SSE ? SSE_REGS : NO_REGS" "@internal Any EVEX encodable SSE register (@code{%xmm0-%xmm31}) for AVX512BW with TARGET_AVX512VL target, otherwise any SSE register.") +(define_register_constraint "YW" + "TARGET_AVX512BW ? ALL_SSE_REGS : TARGET_SSE ? SSE_REGS : NO_REGS" + "@internal Any EVEX encodable SSE register (@code{%xmm0-%xmm31}) for AVX512BW target, otherwise any SSE register.") + ;; We use the B prefix to denote any number of internal operands: ;; f FLAGS_REG ;; g GOT memory operand. diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c index 02d3142..ac69eed 100644 --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c @@ -1348,9 +1348,10 @@ ix86_split_lea_for_addr (rtx_insn *insn, rtx operands[], machine_mode mode) if (regno0 != regno2) emit_insn (gen_rtx_SET (target, parts.index)); - /* Use shift for scaling. */ - ix86_emit_binop (ASHIFT, mode, target, - GEN_INT (exact_log2 (parts.scale))); + /* Use shift for scaling, but emit it as MULT instead + to avoid it being immediately peephole2 optimized back + into lea. */ + ix86_emit_binop (MULT, mode, target, GEN_INT (parts.scale)); if (parts.base) ix86_emit_binop (PLUS, mode, target, parts.base); @@ -13210,6 +13211,10 @@ rdseed_step: return 0; + case IX86_BUILTIN_VZEROUPPER: + cfun->machine->has_explicit_vzeroupper = true; + break; + default: break; } diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c index 41891c9..77783a1 100644 --- a/gcc/config/i386/i386-features.c +++ b/gcc/config/i386/i386-features.c @@ -1837,19 +1837,22 @@ ix86_add_reg_usage_to_vzerouppers (void) static unsigned int rest_of_handle_insert_vzeroupper (void) { - int i; - - /* vzeroupper instructions are inserted immediately after reload to - account for possible spills from 256bit or 512bit registers. The pass - reuses mode switching infrastructure by re-running mode insertion - pass, so disable entities that have already been processed. */ - for (i = 0; i < MAX_386_ENTITIES; i++) - ix86_optimize_mode_switching[i] = 0; + if (TARGET_VZEROUPPER + && flag_expensive_optimizations + && !optimize_size) + { + /* vzeroupper instructions are inserted immediately after reload to + account for possible spills from 256bit or 512bit registers. The pass + reuses mode switching infrastructure by re-running mode insertion + pass, so disable entities that have already been processed. */ + for (int i = 0; i < MAX_386_ENTITIES; i++) + ix86_optimize_mode_switching[i] = 0; - ix86_optimize_mode_switching[AVX_U128] = 1; + ix86_optimize_mode_switching[AVX_U128] = 1; - /* Call optimize_mode_switching. */ - g->get_passes ()->execute_pass_mode_switching (); + /* Call optimize_mode_switching. */ + g->get_passes ()->execute_pass_mode_switching (); + } ix86_add_reg_usage_to_vzerouppers (); return 0; } @@ -1880,8 +1883,10 @@ public: virtual bool gate (function *) { return TARGET_AVX - && TARGET_VZEROUPPER && flag_expensive_optimizations - && !optimize_size; + && ((TARGET_VZEROUPPER + && flag_expensive_optimizations + && !optimize_size) + || cfun->machine->has_explicit_vzeroupper); } virtual unsigned int execute (function *) diff --git a/gcc/config/i386/i386-options.c b/gcc/config/i386/i386-options.c index e93935f..7865bc1 100644 --- a/gcc/config/i386/i386-options.c +++ b/gcc/config/i386/i386-options.c @@ -743,7 +743,7 @@ static const struct processor_costs *processor_cost_table[] = &btver2_cost, &znver1_cost, &znver2_cost, - &znver2_cost + &znver3_cost }; /* Guarantee that the array is aligned with enum processor_type. */ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2603333..540d4f4 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -10265,15 +10265,20 @@ darwin_local_data_pic (rtx disp) && XINT (disp, 1) == UNSPEC_MACHOPIC_OFFSET); } -/* True if operand X should be loaded from GOT. */ +/* True if the function symbol operand X should be loaded from GOT. + + NB: In 32-bit mode, only non-PIC is allowed in inline assembly + statements, since a PIC register could not be available at the + call site. */ bool ix86_force_load_from_GOT_p (rtx x) { - return ((TARGET_64BIT || HAVE_AS_IX86_GOT32X) + return ((TARGET_64BIT || (!flag_pic && HAVE_AS_IX86_GOT32X)) && !TARGET_PECOFF && !TARGET_MACHO - && !flag_pic + && (!flag_pic || this_is_asm_operands) && ix86_cmodel != CM_LARGE + && ix86_cmodel != CM_LARGE_PIC && GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_FUNCTION_P (x) && (!flag_plt @@ -12701,7 +12706,8 @@ print_reg (rtx x, int code, FILE *file) y -- print "st(0)" instead of "st" as a register. d -- print duplicated register operand for AVX instruction. D -- print condition for SSE cmp instruction. - P -- if PIC, print an @PLT suffix. + P -- if PIC, print an @PLT suffix. For -fno-plt, load function + address from GOT. p -- print raw symbol name. X -- don't print any sort of PIC '@' suffix for a symbol. & -- print some in-use local-dynamic symbol name. @@ -13445,7 +13451,23 @@ ix86_print_operand (FILE *file, rtx x, int code) x = const0_rtx; } - if (code != 'P' && code != 'p') + if (code == 'P') + { + if (ix86_force_load_from_GOT_p (x)) + { + /* For inline assembly statement, load function address + from GOT with 'P' operand modifier to avoid PLT. */ + x = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, x), + (TARGET_64BIT + ? UNSPEC_GOTPCREL + : UNSPEC_GOT)); + x = gen_rtx_CONST (Pmode, x); + x = gen_const_mem (Pmode, x); + ix86_print_operand (file, x, 'A'); + return; + } + } + else if (code != 'p') { if (CONST_INT_P (x)) { diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 69fddca..4874910 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2941,6 +2941,10 @@ struct GTY(()) machine_function { /* True if the function needs a stack frame. */ BOOL_BITFIELD stack_frame_required : 1; + /* True if __builtin_ia32_vzeroupper () has been expanded in current + function. */ + BOOL_BITFIELD has_explicit_vzeroupper : 1; + /* The largest alignment, in bytes, of stack slot actually used. */ unsigned int max_used_stack_alignment; diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 2820f6d..9ff35d9 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -5219,6 +5219,18 @@ DONE; }) + +;; ix86_split_lea_for_addr emits the shifts as MULT to avoid it from being +;; peephole2 optimized back into a lea. Split that into the shift during +;; the following split pass. +(define_split + [(set (match_operand:SWI48 0 "general_reg_operand") + (mult:SWI48 (match_dup 0) (match_operand:SWI48 1 "const1248_operand"))) + (clobber (reg:CC FLAGS_REG))] + "reload_completed" + [(parallel [(set (match_dup 0) (ashift:SWI48 (match_dup 0) (match_dup 1))) + (clobber (reg:CC FLAGS_REG))])] + "operands[1] = GEN_INT (exact_log2 (INTVAL (operands[1])));") ;; Add instructions diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md index c6a2882..4c2b724 100644 --- a/gcc/config/i386/mmx.md +++ b/gcc/config/i386/mmx.md @@ -61,6 +61,9 @@ (define_mode_attr mmxdoublemode [(V8QI "V8HI") (V4HI "V4SI")]) +(define_mode_attr Yv_Yw + [(V8QI "Yw") (V4HI "Yw") (V2SI "Yv") (V1DI "Yv") (V2SF "Yv")]) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Move patterns @@ -1152,10 +1155,10 @@ "ix86_fixup_binary_operands_no_copy (<CODE>, <MODE>mode, operands);") (define_insn "*mmx_<insn><mode>3" - [(set (match_operand:MMXMODEI8 0 "register_operand" "=y,x,Yv") + [(set (match_operand:MMXMODEI8 0 "register_operand" "=y,x,<Yv_Yw>") (plusminus:MMXMODEI8 - (match_operand:MMXMODEI8 1 "register_mmxmem_operand" "<comm>0,0,Yv") - (match_operand:MMXMODEI8 2 "register_mmxmem_operand" "ym,x,Yv")))] + (match_operand:MMXMODEI8 1 "register_mmxmem_operand" "<comm>0,0,<Yv_Yw>") + (match_operand:MMXMODEI8 2 "register_mmxmem_operand" "ym,x,<Yv_Yw>")))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)" "@ @@ -1176,10 +1179,10 @@ "ix86_fixup_binary_operands_no_copy (<CODE>, <MODE>mode, operands);") (define_insn "*mmx_<insn><mode>3" - [(set (match_operand:MMXMODE12 0 "register_operand" "=y,x,Yv") + [(set (match_operand:MMXMODE12 0 "register_operand" "=y,x,Yw") (sat_plusminus:MMXMODE12 - (match_operand:MMXMODE12 1 "register_mmxmem_operand" "<comm>0,0,Yv") - (match_operand:MMXMODE12 2 "register_mmxmem_operand" "ym,x,Yv")))] + (match_operand:MMXMODE12 1 "register_mmxmem_operand" "<comm>0,0,Yw") + (match_operand:MMXMODE12 2 "register_mmxmem_operand" "ym,x,Yw")))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)" "@ @@ -1206,9 +1209,9 @@ "ix86_fixup_binary_operands_no_copy (MULT, V4HImode, operands);") (define_insn "*mmx_mulv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") - (mult:V4HI (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yv") - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv")))] + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yw") + (mult:V4HI (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yw") + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw")))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && ix86_binary_operator_ok (MULT, V4HImode, operands)" "@ @@ -1234,14 +1237,14 @@ "ix86_fixup_binary_operands_no_copy (MULT, V4HImode, operands);") (define_insn "*mmx_smulv4hi3_highpart" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yw") (truncate:V4HI (lshiftrt:V4SI (mult:V4SI (sign_extend:V4SI - (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yv")) + (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yw")) (sign_extend:V4SI - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv"))) + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw"))) (const_int 16))))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && ix86_binary_operator_ok (MULT, V4HImode, operands)" @@ -1269,14 +1272,14 @@ "ix86_fixup_binary_operands_no_copy (MULT, V4HImode, operands);") (define_insn "*mmx_umulv4hi3_highpart" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yw") (truncate:V4HI (lshiftrt:V4SI (mult:V4SI (zero_extend:V4SI - (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yv")) + (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yw")) (zero_extend:V4SI - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv"))) + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw"))) (const_int 16))))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && (TARGET_SSE || TARGET_3DNOW_A) @@ -1313,16 +1316,16 @@ "ix86_fixup_binary_operands_no_copy (MULT, V4HImode, operands);") (define_insn "*mmx_pmaddwd" - [(set (match_operand:V2SI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V2SI 0 "register_operand" "=y,x,Yw") (plus:V2SI (mult:V2SI (sign_extend:V2SI (vec_select:V2HI - (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yv") + (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yw") (parallel [(const_int 0) (const_int 2)]))) (sign_extend:V2SI (vec_select:V2HI - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv") + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw") (parallel [(const_int 0) (const_int 2)])))) (mult:V2SI (sign_extend:V2SI @@ -1432,10 +1435,10 @@ "ix86_fixup_binary_operands_no_copy (<CODE>, V4HImode, operands);") (define_insn "*mmx_<code>v4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yw") (smaxmin:V4HI - (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yv") - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv")))] + (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yw") + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw")))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && (TARGET_SSE || TARGET_3DNOW_A) && ix86_binary_operator_ok (<CODE>, V4HImode, operands)" @@ -1466,10 +1469,10 @@ "ix86_fixup_binary_operands_no_copy (<CODE>, V8QImode, operands);") (define_insn "*mmx_<code>v8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yw") (umaxmin:V8QI - (match_operand:V8QI 1 "register_mmxmem_operand" "%0,0,Yv") - (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yv")))] + (match_operand:V8QI 1 "register_mmxmem_operand" "%0,0,Yw") + (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yw")))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && (TARGET_SSE || TARGET_3DNOW_A) && ix86_binary_operator_ok (<CODE>, V8QImode, operands)" @@ -1483,10 +1486,10 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn "mmx_ashr<mode>3" - [(set (match_operand:MMXMODE24 0 "register_operand" "=y,x,Yv") + [(set (match_operand:MMXMODE24 0 "register_operand" "=y,x,<Yv_Yw>") (ashiftrt:MMXMODE24 - (match_operand:MMXMODE24 1 "register_operand" "0,0,Yv") - (match_operand:DI 2 "nonmemory_operand" "yN,xN,YvN")))] + (match_operand:MMXMODE24 1 "register_operand" "0,0,<Yv_Yw>") + (match_operand:DI 2 "nonmemory_operand" "yN,xN,<Yv_Yw>N")))] "TARGET_MMX || TARGET_MMX_WITH_SSE" "@ psra<mmxvecsize>\t{%2, %0|%0, %2} @@ -1509,10 +1512,10 @@ "TARGET_MMX_WITH_SSE") (define_insn "mmx_<insn><mode>3" - [(set (match_operand:MMXMODE248 0 "register_operand" "=y,x,Yv") + [(set (match_operand:MMXMODE248 0 "register_operand" "=y,x,<Yv_Yw>") (any_lshift:MMXMODE248 - (match_operand:MMXMODE248 1 "register_operand" "0,0,Yv") - (match_operand:DI 2 "nonmemory_operand" "yN,xN,YvN")))] + (match_operand:MMXMODE248 1 "register_operand" "0,0,<Yv_Yw>") + (match_operand:DI 2 "nonmemory_operand" "yN,xN,<Yv_Yw>N")))] "TARGET_MMX || TARGET_MMX_WITH_SSE" "@ p<vshift><mmxvecsize>\t{%2, %0|%0, %2} @@ -1549,10 +1552,10 @@ "ix86_fixup_binary_operands_no_copy (EQ, <MODE>mode, operands);") (define_insn "*mmx_eq<mode>3" - [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,x") (eq:MMXMODEI - (match_operand:MMXMODEI 1 "register_mmxmem_operand" "%0,0,Yv") - (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,Yv")))] + (match_operand:MMXMODEI 1 "register_mmxmem_operand" "%0,0,x") + (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,x")))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && ix86_binary_operator_ok (EQ, <MODE>mode, operands)" "@ @@ -1565,10 +1568,10 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn "mmx_gt<mode>3" - [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,x") (gt:MMXMODEI - (match_operand:MMXMODEI 1 "register_operand" "0,0,Yv") - (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,Yv")))] + (match_operand:MMXMODEI 1 "register_operand" "0,0,x") + (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,x")))] "TARGET_MMX || TARGET_MMX_WITH_SSE" "@ pcmpgt<mmxvecsize>\t{%2, %0|%0, %2} @@ -1594,19 +1597,20 @@ "operands[2] = force_reg (<MODE>mode, CONSTM1_RTX (<MODE>mode));") (define_insn "mmx_andnot<mode>3" - [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,x,v") (and:MMXMODEI - (not:MMXMODEI (match_operand:MMXMODEI 1 "register_operand" "0,0,Yv")) - (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,Yv")))] + (not:MMXMODEI (match_operand:MMXMODEI 1 "register_operand" "0,0,x,v")) + (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,x,v")))] "TARGET_MMX || TARGET_MMX_WITH_SSE" "@ pandn\t{%2, %0|%0, %2} pandn\t{%2, %0|%0, %2} - vpandn\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "*,sse2_noavx,avx") - (set_attr "mmx_isa" "native,*,*") - (set_attr "type" "mmxadd,sselog,sselog") - (set_attr "mode" "DI,TI,TI")]) + vpandn\t{%2, %1, %0|%0, %1, %2} + vpandnd\t{%2, %1, %0|%0, %1, %2}" + [(set_attr "isa" "*,sse2_noavx,avx,avx512vl") + (set_attr "mmx_isa" "native,*,*,*") + (set_attr "type" "mmxadd,sselog,sselog,sselog") + (set_attr "mode" "DI,TI,TI,TI")]) (define_expand "mmx_<code><mode>3" [(set (match_operand:MMXMODEI 0 "register_operand") @@ -1625,20 +1629,21 @@ "ix86_fixup_binary_operands_no_copy (<CODE>, <MODE>mode, operands);") (define_insn "*mmx_<code><mode>3" - [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:MMXMODEI 0 "register_operand" "=y,x,x,v") (any_logic:MMXMODEI - (match_operand:MMXMODEI 1 "register_mmxmem_operand" "%0,0,Yv") - (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,Yv")))] + (match_operand:MMXMODEI 1 "register_mmxmem_operand" "%0,0,x,v") + (match_operand:MMXMODEI 2 "register_mmxmem_operand" "ym,x,x,v")))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)" "@ p<logic>\t{%2, %0|%0, %2} p<logic>\t{%2, %0|%0, %2} - vp<logic>\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "*,sse2_noavx,avx") - (set_attr "mmx_isa" "native,*,*") - (set_attr "type" "mmxadd,sselog,sselog") - (set_attr "mode" "DI,TI,TI")]) + vp<logic>\t{%2, %1, %0|%0, %1, %2} + vp<logic>d\t{%2, %1, %0|%0, %1, %2}" + [(set_attr "isa" "*,sse2_noavx,avx,avx512vl") + (set_attr "mmx_isa" "native,*,*,*") + (set_attr "type" "mmxadd,sselog,sselog,sselog") + (set_attr "mode" "DI,TI,TI,TI")]) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; @@ -1652,12 +1657,12 @@ (define_code_attr s_trunsuffix [(ss_truncate "s") (us_truncate "u")]) (define_insn_and_split "mmx_pack<s_trunsuffix>swb" - [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yw") (vec_concat:V8QI (any_s_truncate:V4QI - (match_operand:V4HI 1 "register_operand" "0,0,Yv")) + (match_operand:V4HI 1 "register_operand" "0,0,Yw")) (any_s_truncate:V4QI - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv"))))] + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw"))))] "TARGET_MMX || TARGET_MMX_WITH_SSE" "@ pack<s_trunsuffix>swb\t{%2, %0|%0, %2} @@ -1672,12 +1677,12 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn_and_split "mmx_packssdw" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yw") (vec_concat:V4HI (ss_truncate:V2HI - (match_operand:V2SI 1 "register_operand" "0,0,Yv")) + (match_operand:V2SI 1 "register_operand" "0,0,Yw")) (ss_truncate:V2HI - (match_operand:V2SI 2 "register_mmxmem_operand" "ym,x,Yv"))))] + (match_operand:V2SI 2 "register_mmxmem_operand" "ym,x,Yw"))))] "TARGET_MMX || TARGET_MMX_WITH_SSE" "@ packssdw\t{%2, %0|%0, %2} @@ -1692,11 +1697,11 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn_and_split "mmx_punpckhbw" - [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yw") (vec_select:V8QI (vec_concat:V16QI - (match_operand:V8QI 1 "register_operand" "0,0,Yv") - (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yv")) + (match_operand:V8QI 1 "register_operand" "0,0,Yw") + (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yw")) (parallel [(const_int 4) (const_int 12) (const_int 5) (const_int 13) (const_int 6) (const_int 14) @@ -1715,11 +1720,11 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn_and_split "mmx_punpcklbw" - [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yw") (vec_select:V8QI (vec_concat:V16QI - (match_operand:V8QI 1 "register_operand" "0,0,Yv") - (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yv")) + (match_operand:V8QI 1 "register_operand" "0,0,Yw") + (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yw")) (parallel [(const_int 0) (const_int 8) (const_int 1) (const_int 9) (const_int 2) (const_int 10) @@ -1738,11 +1743,11 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn_and_split "mmx_punpckhwd" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yw") (vec_select:V4HI (vec_concat:V8HI - (match_operand:V4HI 1 "register_operand" "0,0,Yv") - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv")) + (match_operand:V4HI 1 "register_operand" "0,0,Yw") + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw")) (parallel [(const_int 2) (const_int 6) (const_int 3) (const_int 7)])))] "TARGET_MMX || TARGET_MMX_WITH_SSE" @@ -1759,11 +1764,11 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn_and_split "mmx_punpcklwd" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yw") (vec_select:V4HI (vec_concat:V8HI - (match_operand:V4HI 1 "register_operand" "0,0,Yv") - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv")) + (match_operand:V4HI 1 "register_operand" "0,0,Yw") + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw")) (parallel [(const_int 0) (const_int 4) (const_int 1) (const_int 5)])))] "TARGET_MMX || TARGET_MMX_WITH_SSE" @@ -1866,11 +1871,11 @@ }) (define_insn "*mmx_pinsrw" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,YW") (vec_merge:V4HI (vec_duplicate:V4HI (match_operand:HI 2 "nonimmediate_operand" "rm,rm,rm")) - (match_operand:V4HI 1 "register_operand" "0,0,Yv") + (match_operand:V4HI 1 "register_operand" "0,0,YW") (match_operand:SI 3 "const_int_operand")))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && (TARGET_SSE || TARGET_3DNOW_A) @@ -1902,11 +1907,11 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn "*mmx_pinsrb" - [(set (match_operand:V8QI 0 "register_operand" "=x,Yv") + [(set (match_operand:V8QI 0 "register_operand" "=x,YW") (vec_merge:V8QI (vec_duplicate:V8QI (match_operand:QI 2 "nonimmediate_operand" "rm,rm")) - (match_operand:V8QI 1 "register_operand" "0,Yv") + (match_operand:V8QI 1 "register_operand" "0,YW") (match_operand:SI 3 "const_int_operand")))] "TARGET_MMX_WITH_SSE && TARGET_SSE4_1 && ((unsigned) exact_log2 (INTVAL (operands[3])) @@ -1940,7 +1945,7 @@ (define_insn "*mmx_pextrw" [(set (match_operand:HI 0 "register_sse4nonimm_operand" "=r,r,m") (vec_select:HI - (match_operand:V4HI 1 "register_operand" "y,Yv,Yv") + (match_operand:V4HI 1 "register_operand" "y,YW,YW") (parallel [(match_operand:SI 2 "const_0_to_3_operand" "n,n,n")])))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && (TARGET_SSE || TARGET_3DNOW_A)" @@ -1959,7 +1964,7 @@ [(set (match_operand:SWI48 0 "register_operand" "=r,r") (zero_extend:SWI48 (vec_select:HI - (match_operand:V4HI 1 "register_operand" "y,Yv") + (match_operand:V4HI 1 "register_operand" "y,YW") (parallel [(match_operand:SI 2 "const_0_to_3_operand" "n,n")]))))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && (TARGET_SSE || TARGET_3DNOW_A)" @@ -1976,7 +1981,7 @@ (define_insn "*mmx_pextrb" [(set (match_operand:QI 0 "nonimmediate_operand" "=r,m") (vec_select:QI - (match_operand:V8QI 1 "register_operand" "Yv,Yv") + (match_operand:V8QI 1 "register_operand" "YW,YW") (parallel [(match_operand:SI 2 "const_0_to_7_operand" "n,n")])))] "TARGET_MMX_WITH_SSE && TARGET_SSE4_1" "@ @@ -1993,7 +1998,7 @@ [(set (match_operand:SWI248 0 "register_operand" "=r") (zero_extend:SWI248 (vec_select:QI - (match_operand:V8QI 1 "register_operand" "Yv") + (match_operand:V8QI 1 "register_operand" "YW") (parallel [(match_operand:SI 2 "const_0_to_7_operand" "n")]))))] "TARGET_MMX_WITH_SSE && TARGET_SSE4_1" "%vpextrb\t{%2, %1, %k0|%k0, %1, %2}" @@ -2394,15 +2399,15 @@ }) (define_insn "*mmx_uavgv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V8QI 0 "register_operand" "=y,x,Yw") (truncate:V8QI (lshiftrt:V8HI (plus:V8HI (plus:V8HI (zero_extend:V8HI - (match_operand:V8QI 1 "register_mmxmem_operand" "%0,0,Yv")) + (match_operand:V8QI 1 "register_mmxmem_operand" "%0,0,Yw")) (zero_extend:V8HI - (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yv"))) + (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yw"))) (const_vector:V8HI [(const_int 1) (const_int 1) (const_int 1) (const_int 1) (const_int 1) (const_int 1) @@ -2440,15 +2445,15 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn "*mmx_uavgv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yv") + [(set (match_operand:V4HI 0 "register_operand" "=y,x,Yw") (truncate:V4HI (lshiftrt:V4SI (plus:V4SI (plus:V4SI (zero_extend:V4SI - (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yv")) + (match_operand:V4HI 1 "register_mmxmem_operand" "%0,0,Yw")) (zero_extend:V4SI - (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yv"))) + (match_operand:V4HI 2 "register_mmxmem_operand" "ym,x,Yw"))) (const_vector:V4SI [(const_int 1) (const_int 1) (const_int 1) (const_int 1)])) (const_int 1))))] @@ -2483,9 +2488,9 @@ }) (define_insn "mmx_psadbw" - [(set (match_operand:V1DI 0 "register_operand" "=y,x,Yv") - (unspec:V1DI [(match_operand:V8QI 1 "register_operand" "0,0,Yv") - (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yv")] + [(set (match_operand:V1DI 0 "register_operand" "=y,x,Yw") + (unspec:V1DI [(match_operand:V8QI 1 "register_operand" "0,0,Yw") + (match_operand:V8QI 2 "register_mmxmem_operand" "ym,x,Yw")] UNSPEC_PSADBW))] "(TARGET_MMX || TARGET_MMX_WITH_SSE) && (TARGET_SSE || TARGET_3DNOW_A)" diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index ca4372d..43e4d57 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -566,7 +566,8 @@ (V4SI "v") (V8SI "v") (V16SI "v") (V2DI "v") (V4DI "v") (V8DI "v") (V4SF "v") (V8SF "v") (V16SF "v") - (V2DF "v") (V4DF "v") (V8DF "v")]) + (V2DF "v") (V4DF "v") (V8DF "v") + (TI "Yw") (V1TI "Yw") (V2TI "Yw") (V4TI "v")]) (define_mode_attr sse2_avx_avx512f [(V16QI "sse2") (V32QI "avx") (V64QI "avx512f") @@ -11736,10 +11737,10 @@ "ix86_fixup_binary_operands_no_copy (<CODE>, <MODE>mode, operands);") (define_insn "*<sse2_avx2>_<insn><mode>3<mask_name>" - [(set (match_operand:VI12_AVX2_AVX512BW 0 "register_operand" "=x,v") + [(set (match_operand:VI12_AVX2_AVX512BW 0 "register_operand" "=x,<v_Yw>") (sat_plusminus:VI12_AVX2_AVX512BW - (match_operand:VI12_AVX2_AVX512BW 1 "vector_operand" "<comm>0,v") - (match_operand:VI12_AVX2_AVX512BW 2 "vector_operand" "xBm,vm")))] + (match_operand:VI12_AVX2_AVX512BW 1 "vector_operand" "<comm>0,<v_Yw>") + (match_operand:VI12_AVX2_AVX512BW 2 "vector_operand" "xBm,<v_Yw>m")))] "TARGET_SSE2 && <mask_mode512bit_condition> && <mask_avx512bw_condition> && ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)" "@ @@ -11827,14 +11828,14 @@ "ix86_fixup_binary_operands_no_copy (MULT, <MODE>mode, operands);") (define_insn "*<s>mul<mode>3_highpart<mask_name>" - [(set (match_operand:VI2_AVX2 0 "register_operand" "=x,v") + [(set (match_operand:VI2_AVX2 0 "register_operand" "=x,<v_Yw>") (truncate:VI2_AVX2 (lshiftrt:<ssedoublemode> (mult:<ssedoublemode> (any_extend:<ssedoublemode> - (match_operand:VI2_AVX2 1 "vector_operand" "%0,v")) + (match_operand:VI2_AVX2 1 "vector_operand" "%0,<v_Yw>")) (any_extend:<ssedoublemode> - (match_operand:VI2_AVX2 2 "vector_operand" "xBm,vm"))) + (match_operand:VI2_AVX2 2 "vector_operand" "xBm,<v_Yw>m"))) (const_int 16))))] "TARGET_SSE2 && !(MEM_P (operands[1]) && MEM_P (operands[2])) && <mask_mode512bit_condition> && <mask_avx512bw_condition>" @@ -12128,19 +12129,19 @@ "ix86_fixup_binary_operands_no_copy (MULT, V16HImode, operands);") (define_insn "*avx2_pmaddwd" - [(set (match_operand:V8SI 0 "register_operand" "=x,v") + [(set (match_operand:V8SI 0 "register_operand" "=Yw") (plus:V8SI (mult:V8SI (sign_extend:V8SI (vec_select:V8HI - (match_operand:V16HI 1 "nonimmediate_operand" "%x,v") + (match_operand:V16HI 1 "nonimmediate_operand" "%Yw") (parallel [(const_int 0) (const_int 2) (const_int 4) (const_int 6) (const_int 8) (const_int 10) (const_int 12) (const_int 14)]))) (sign_extend:V8SI (vec_select:V8HI - (match_operand:V16HI 2 "nonimmediate_operand" "xm,vm") + (match_operand:V16HI 2 "nonimmediate_operand" "Ywm") (parallel [(const_int 0) (const_int 2) (const_int 4) (const_int 6) (const_int 8) (const_int 10) @@ -12161,8 +12162,7 @@ "TARGET_AVX2 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "vpmaddwd\t{%2, %1, %0|%0, %1, %2}" [(set_attr "type" "sseiadd") - (set_attr "isa" "*,avx512bw") - (set_attr "prefix" "vex,evex") + (set_attr "prefix" "vex") (set_attr "mode" "OI")]) (define_expand "sse2_pmaddwd" @@ -12192,17 +12192,17 @@ "ix86_fixup_binary_operands_no_copy (MULT, V8HImode, operands);") (define_insn "*sse2_pmaddwd" - [(set (match_operand:V4SI 0 "register_operand" "=x,x,v") + [(set (match_operand:V4SI 0 "register_operand" "=x,Yw") (plus:V4SI (mult:V4SI (sign_extend:V4SI (vec_select:V4HI - (match_operand:V8HI 1 "vector_operand" "%0,x,v") + (match_operand:V8HI 1 "vector_operand" "%0,Yw") (parallel [(const_int 0) (const_int 2) (const_int 4) (const_int 6)]))) (sign_extend:V4SI (vec_select:V4HI - (match_operand:V8HI 2 "vector_operand" "xBm,xm,vm") + (match_operand:V8HI 2 "vector_operand" "xBm,Ywm") (parallel [(const_int 0) (const_int 2) (const_int 4) (const_int 6)])))) (mult:V4SI @@ -12217,13 +12217,12 @@ "TARGET_SSE2 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "@ pmaddwd\t{%2, %0|%0, %2} - vpmaddwd\t{%2, %1, %0|%0, %1, %2} vpmaddwd\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sseiadd") (set_attr "atom_unit" "simul") - (set_attr "prefix_data16" "1,*,*") - (set_attr "prefix" "orig,vex,evex") + (set_attr "prefix_data16" "1,*") + (set_attr "prefix" "orig,vex") (set_attr "mode" "TI")]) (define_insn "avx512dq_mul<mode>3<mask_name>" @@ -12449,10 +12448,10 @@ (set_attr "mode" "<sseinsnmode>")]) (define_insn "ashr<mode>3" - [(set (match_operand:VI24_AVX2 0 "register_operand" "=x,x") + [(set (match_operand:VI24_AVX2 0 "register_operand" "=x,<v_Yw>") (ashiftrt:VI24_AVX2 - (match_operand:VI24_AVX2 1 "register_operand" "0,x") - (match_operand:DI 2 "nonmemory_operand" "xN,xN")))] + (match_operand:VI24_AVX2 1 "register_operand" "0,<v_Yw>") + (match_operand:DI 2 "nonmemory_operand" "xN,YwN")))] "TARGET_SSE2" "@ psra<ssemodesuffix>\t{%2, %0|%0, %2} @@ -12496,10 +12495,10 @@ (set_attr "mode" "<sseinsnmode>")]) (define_insn "<insn><mode>3" - [(set (match_operand:VI248_AVX2 0 "register_operand" "=x,x") + [(set (match_operand:VI248_AVX2 0 "register_operand" "=x,<v_Yw>") (any_lshift:VI248_AVX2 - (match_operand:VI248_AVX2 1 "register_operand" "0,x") - (match_operand:DI 2 "nonmemory_operand" "xN,xN")))] + (match_operand:VI248_AVX2 1 "register_operand" "0,<v_Yw>") + (match_operand:DI 2 "nonmemory_operand" "xN,YwN")))] "TARGET_SSE2" "@ p<vshift><ssemodesuffix>\t{%2, %0|%0, %2} @@ -12571,9 +12570,9 @@ (set_attr "mode" "<sseinsnmode>")]) (define_insn "<sse2_avx2>_<insn><mode>3" - [(set (match_operand:VIMAX_AVX2 0 "register_operand" "=x,v") + [(set (match_operand:VIMAX_AVX2 0 "register_operand" "=x,Yw") (any_lshift:VIMAX_AVX2 - (match_operand:VIMAX_AVX2 1 "register_operand" "0,v") + (match_operand:VIMAX_AVX2 1 "register_operand" "0,Yw") (match_operand:SI 2 "const_0_to_255_mul_8_operand" "n,n")))] "TARGET_SSE2" { @@ -12771,20 +12770,19 @@ (set_attr "mode" "TI")]) (define_insn "*<code>v8hi3" - [(set (match_operand:V8HI 0 "register_operand" "=x,x,v") + [(set (match_operand:V8HI 0 "register_operand" "=x,Yw") (smaxmin:V8HI - (match_operand:V8HI 1 "vector_operand" "%0,x,v") - (match_operand:V8HI 2 "vector_operand" "xBm,xm,vm")))] + (match_operand:V8HI 1 "vector_operand" "%0,Yw") + (match_operand:V8HI 2 "vector_operand" "xBm,Ywm")))] "TARGET_SSE2 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "@ p<maxmin_int>w\t{%2, %0|%0, %2} - vp<maxmin_int>w\t{%2, %1, %0|%0, %1, %2} vp<maxmin_int>w\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sseiadd") - (set_attr "prefix_data16" "1,*,*") - (set_attr "prefix_extra" "*,1,1") - (set_attr "prefix" "orig,vex,evex") + (set_attr "prefix_data16" "1,*") + (set_attr "prefix_extra" "*,1") + (set_attr "prefix" "orig,vex") (set_attr "mode" "TI")]) (define_expand "<code><mode>3" @@ -12856,20 +12854,19 @@ (set_attr "mode" "TI")]) (define_insn "*<code>v16qi3" - [(set (match_operand:V16QI 0 "register_operand" "=x,x,v") + [(set (match_operand:V16QI 0 "register_operand" "=x,Yw") (umaxmin:V16QI - (match_operand:V16QI 1 "vector_operand" "%0,x,v") - (match_operand:V16QI 2 "vector_operand" "xBm,xm,vm")))] + (match_operand:V16QI 1 "vector_operand" "%0,Yw") + (match_operand:V16QI 2 "vector_operand" "xBm,Ywm")))] "TARGET_SSE2 && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "@ p<maxmin_int>b\t{%2, %0|%0, %2} - vp<maxmin_int>b\t{%2, %1, %0|%0, %1, %2} vp<maxmin_int>b\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sseiadd") - (set_attr "prefix_data16" "1,*,*") - (set_attr "prefix_extra" "*,1,1") - (set_attr "prefix" "orig,vex,evex") + (set_attr "prefix_data16" "1,*") + (set_attr "prefix_extra" "*,1") + (set_attr "prefix" "orig,vex") (set_attr "mode" "TI")]) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -13888,57 +13885,54 @@ }) (define_insn "<sse2_avx2>_packsswb<mask_name>" - [(set (match_operand:VI1_AVX512 0 "register_operand" "=x,x,v") + [(set (match_operand:VI1_AVX512 0 "register_operand" "=x,<v_Yw>") (vec_concat:VI1_AVX512 (ss_truncate:<ssehalfvecmode> - (match_operand:<sseunpackmode> 1 "register_operand" "0,x,v")) + (match_operand:<sseunpackmode> 1 "register_operand" "0,<v_Yw>")) (ss_truncate:<ssehalfvecmode> - (match_operand:<sseunpackmode> 2 "vector_operand" "xBm,xm,vm"))))] + (match_operand:<sseunpackmode> 2 "vector_operand" "xBm,<v_Yw>m"))))] "TARGET_SSE2 && <mask_mode512bit_condition> && <mask_avx512bw_condition>" "@ packsswb\t{%2, %0|%0, %2} - vpacksswb\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2} vpacksswb\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sselog") - (set_attr "prefix_data16" "1,*,*") - (set_attr "prefix" "orig,<mask_prefix>,evex") + (set_attr "prefix_data16" "1,*") + (set_attr "prefix" "orig,<mask_prefix>") (set_attr "mode" "<sseinsnmode>")]) (define_insn "<sse2_avx2>_packssdw<mask_name>" - [(set (match_operand:VI2_AVX2 0 "register_operand" "=x,x,v") + [(set (match_operand:VI2_AVX2 0 "register_operand" "=x,<v_Yw>") (vec_concat:VI2_AVX2 (ss_truncate:<ssehalfvecmode> - (match_operand:<sseunpackmode> 1 "register_operand" "0,x,v")) + (match_operand:<sseunpackmode> 1 "register_operand" "0,<v_Yw>")) (ss_truncate:<ssehalfvecmode> - (match_operand:<sseunpackmode> 2 "vector_operand" "xBm,xm,vm"))))] + (match_operand:<sseunpackmode> 2 "vector_operand" "xBm,<v_Yw>m"))))] "TARGET_SSE2 && <mask_mode512bit_condition> && <mask_avx512bw_condition>" "@ packssdw\t{%2, %0|%0, %2} - vpackssdw\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2} vpackssdw\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sselog") - (set_attr "prefix_data16" "1,*,*") - (set_attr "prefix" "orig,<mask_prefix>,evex") + (set_attr "prefix_data16" "1,*") + (set_attr "prefix" "orig,<mask_prefix>") (set_attr "mode" "<sseinsnmode>")]) (define_insn "<sse2_avx2>_packuswb<mask_name>" - [(set (match_operand:VI1_AVX512 0 "register_operand" "=x,x,v") + [(set (match_operand:VI1_AVX512 0 "register_operand" "=x,<v_Yw>") (vec_concat:VI1_AVX512 (us_truncate:<ssehalfvecmode> - (match_operand:<sseunpackmode> 1 "register_operand" "0,x,v")) + (match_operand:<sseunpackmode> 1 "register_operand" "0,<v_Yw>")) (us_truncate:<ssehalfvecmode> - (match_operand:<sseunpackmode> 2 "vector_operand" "xBm,xm,vm"))))] + (match_operand:<sseunpackmode> 2 "vector_operand" "xBm,<v_Yw>m"))))] "TARGET_SSE2 && <mask_mode512bit_condition> && <mask_avx512bw_condition>" "@ packuswb\t{%2, %0|%0, %2} - vpackuswb\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2} vpackuswb\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sselog") - (set_attr "prefix_data16" "1,*,*") - (set_attr "prefix" "orig,<mask_prefix>,evex") + (set_attr "prefix_data16" "1,*") + (set_attr "prefix" "orig,<mask_prefix>") (set_attr "mode" "<sseinsnmode>")]) (define_insn "avx512bw_interleave_highv64qi<mask_name>" @@ -13986,11 +13980,11 @@ (set_attr "mode" "XI")]) (define_insn "avx2_interleave_highv32qi<mask_name>" - [(set (match_operand:V32QI 0 "register_operand" "=v") + [(set (match_operand:V32QI 0 "register_operand" "=Yw") (vec_select:V32QI (vec_concat:V64QI - (match_operand:V32QI 1 "register_operand" "v") - (match_operand:V32QI 2 "nonimmediate_operand" "vm")) + (match_operand:V32QI 1 "register_operand" "Yw") + (match_operand:V32QI 2 "nonimmediate_operand" "Ywm")) (parallel [(const_int 8) (const_int 40) (const_int 9) (const_int 41) (const_int 10) (const_int 42) @@ -14007,18 +14001,18 @@ (const_int 29) (const_int 61) (const_int 30) (const_int 62) (const_int 31) (const_int 63)])))] - "TARGET_AVX2 && <mask_avx512vl_condition>" + "TARGET_AVX2 && <mask_avx512vl_condition> && <mask_avx512bw_condition>" "vpunpckhbw\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}" [(set_attr "type" "sselog") (set_attr "prefix" "<mask_prefix>") (set_attr "mode" "OI")]) (define_insn "vec_interleave_highv16qi<mask_name>" - [(set (match_operand:V16QI 0 "register_operand" "=x,v") + [(set (match_operand:V16QI 0 "register_operand" "=x,Yw") (vec_select:V16QI (vec_concat:V32QI - (match_operand:V16QI 1 "register_operand" "0,v") - (match_operand:V16QI 2 "vector_operand" "xBm,vm")) + (match_operand:V16QI 1 "register_operand" "0,Yw") + (match_operand:V16QI 2 "vector_operand" "xBm,Ywm")) (parallel [(const_int 8) (const_int 24) (const_int 9) (const_int 25) (const_int 10) (const_int 26) @@ -14027,7 +14021,7 @@ (const_int 13) (const_int 29) (const_int 14) (const_int 30) (const_int 15) (const_int 31)])))] - "TARGET_SSE2 && <mask_avx512vl_condition>" + "TARGET_SSE2 && <mask_avx512vl_condition> && <mask_avx512bw_condition>" "@ punpckhbw\t{%2, %0|%0, %2} vpunpckhbw\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}" @@ -14082,11 +14076,11 @@ (set_attr "mode" "XI")]) (define_insn "avx2_interleave_lowv32qi<mask_name>" - [(set (match_operand:V32QI 0 "register_operand" "=v") + [(set (match_operand:V32QI 0 "register_operand" "=Yw") (vec_select:V32QI (vec_concat:V64QI - (match_operand:V32QI 1 "register_operand" "v") - (match_operand:V32QI 2 "nonimmediate_operand" "vm")) + (match_operand:V32QI 1 "register_operand" "Yw") + (match_operand:V32QI 2 "nonimmediate_operand" "Ywm")) (parallel [(const_int 0) (const_int 32) (const_int 1) (const_int 33) (const_int 2) (const_int 34) @@ -14110,11 +14104,11 @@ (set_attr "mode" "OI")]) (define_insn "vec_interleave_lowv16qi<mask_name>" - [(set (match_operand:V16QI 0 "register_operand" "=x,v") + [(set (match_operand:V16QI 0 "register_operand" "=x,Yw") (vec_select:V16QI (vec_concat:V32QI - (match_operand:V16QI 1 "register_operand" "0,v") - (match_operand:V16QI 2 "vector_operand" "xBm,vm")) + (match_operand:V16QI 1 "register_operand" "0,Yw") + (match_operand:V16QI 2 "vector_operand" "xBm,Ywm")) (parallel [(const_int 0) (const_int 16) (const_int 1) (const_int 17) (const_int 2) (const_int 18) @@ -14162,11 +14156,11 @@ (set_attr "mode" "XI")]) (define_insn "avx2_interleave_highv16hi<mask_name>" - [(set (match_operand:V16HI 0 "register_operand" "=v") + [(set (match_operand:V16HI 0 "register_operand" "=Yw") (vec_select:V16HI (vec_concat:V32HI - (match_operand:V16HI 1 "register_operand" "v") - (match_operand:V16HI 2 "nonimmediate_operand" "vm")) + (match_operand:V16HI 1 "register_operand" "Yw") + (match_operand:V16HI 2 "nonimmediate_operand" "Ywm")) (parallel [(const_int 4) (const_int 20) (const_int 5) (const_int 21) (const_int 6) (const_int 22) @@ -14182,11 +14176,11 @@ (set_attr "mode" "OI")]) (define_insn "vec_interleave_highv8hi<mask_name>" - [(set (match_operand:V8HI 0 "register_operand" "=x,v") + [(set (match_operand:V8HI 0 "register_operand" "=x,Yw") (vec_select:V8HI (vec_concat:V16HI - (match_operand:V8HI 1 "register_operand" "0,v") - (match_operand:V8HI 2 "vector_operand" "xBm,vm")) + (match_operand:V8HI 1 "register_operand" "0,Yw") + (match_operand:V8HI 2 "vector_operand" "xBm,Ywm")) (parallel [(const_int 4) (const_int 12) (const_int 5) (const_int 13) (const_int 6) (const_int 14) @@ -14230,11 +14224,11 @@ (set_attr "mode" "XI")]) (define_insn "avx2_interleave_lowv16hi<mask_name>" - [(set (match_operand:V16HI 0 "register_operand" "=v") + [(set (match_operand:V16HI 0 "register_operand" "=Yw") (vec_select:V16HI (vec_concat:V32HI - (match_operand:V16HI 1 "register_operand" "v") - (match_operand:V16HI 2 "nonimmediate_operand" "vm")) + (match_operand:V16HI 1 "register_operand" "Yw") + (match_operand:V16HI 2 "nonimmediate_operand" "Ywm")) (parallel [(const_int 0) (const_int 16) (const_int 1) (const_int 17) (const_int 2) (const_int 18) @@ -14250,11 +14244,11 @@ (set_attr "mode" "OI")]) (define_insn "vec_interleave_lowv8hi<mask_name>" - [(set (match_operand:V8HI 0 "register_operand" "=x,v") + [(set (match_operand:V8HI 0 "register_operand" "=x,Yw") (vec_select:V8HI (vec_concat:V16HI - (match_operand:V8HI 1 "register_operand" "0,v") - (match_operand:V8HI 2 "vector_operand" "xBm,vm")) + (match_operand:V8HI 1 "register_operand" "0,Yw") + (match_operand:V8HI 2 "vector_operand" "xBm,Ywm")) (parallel [(const_int 0) (const_int 8) (const_int 1) (const_int 9) (const_int 2) (const_int 10) @@ -15190,9 +15184,9 @@ }) (define_insn "avx2_pshuflw_1<mask_name>" - [(set (match_operand:V16HI 0 "register_operand" "=v") + [(set (match_operand:V16HI 0 "register_operand" "=Yw") (vec_select:V16HI - (match_operand:V16HI 1 "nonimmediate_operand" "vm") + (match_operand:V16HI 1 "nonimmediate_operand" "Ywm") (parallel [(match_operand 2 "const_0_to_3_operand") (match_operand 3 "const_0_to_3_operand") (match_operand 4 "const_0_to_3_operand") @@ -15264,9 +15258,9 @@ }) (define_insn "sse2_pshuflw_1<mask_name>" - [(set (match_operand:V8HI 0 "register_operand" "=v") + [(set (match_operand:V8HI 0 "register_operand" "=Yw") (vec_select:V8HI - (match_operand:V8HI 1 "vector_operand" "vBm") + (match_operand:V8HI 1 "vector_operand" "YwBm") (parallel [(match_operand 2 "const_0_to_3_operand") (match_operand 3 "const_0_to_3_operand") (match_operand 4 "const_0_to_3_operand") @@ -15347,9 +15341,9 @@ }) (define_insn "avx2_pshufhw_1<mask_name>" - [(set (match_operand:V16HI 0 "register_operand" "=v") + [(set (match_operand:V16HI 0 "register_operand" "=Yw") (vec_select:V16HI - (match_operand:V16HI 1 "nonimmediate_operand" "vm") + (match_operand:V16HI 1 "nonimmediate_operand" "Ywm") (parallel [(const_int 0) (const_int 1) (const_int 2) @@ -15421,9 +15415,9 @@ }) (define_insn "sse2_pshufhw_1<mask_name>" - [(set (match_operand:V8HI 0 "register_operand" "=v") + [(set (match_operand:V8HI 0 "register_operand" "=Yw") (vec_select:V8HI - (match_operand:V8HI 1 "vector_operand" "vBm") + (match_operand:V8HI 1 "vector_operand" "YwBm") (parallel [(const_int 0) (const_int 1) (const_int 2) @@ -15489,18 +15483,16 @@ [(V16QI "TARGET_SSE4_1") V8HI]) (define_insn "*vec_extract<mode>" - [(set (match_operand:<ssescalarmode> 0 "register_sse4nonimm_operand" "=r,m,r,m") + [(set (match_operand:<ssescalarmode> 0 "register_sse4nonimm_operand" "=r,m") (vec_select:<ssescalarmode> - (match_operand:PEXTR_MODE12 1 "register_operand" "x,x,v,v") + (match_operand:PEXTR_MODE12 1 "register_operand" "YW,YW") (parallel [(match_operand:SI 2 "const_0_to_<ssescalarnummask>_operand")])))] "TARGET_SSE2" "@ %vpextr<ssemodesuffix>\t{%2, %1, %k0|%k0, %1, %2} - %vpextr<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2} - vpextr<ssemodesuffix>\t{%2, %1, %k0|%k0, %1, %2} - vpextr<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "*,sse4,avx512bw,avx512bw") + %vpextr<ssemodesuffix>\t{%2, %1, %0|%0, %1, %2}" + [(set_attr "isa" "*,sse4") (set_attr "type" "sselog1") (set_attr "prefix_data16" "1") (set (attr "prefix_extra") @@ -15510,23 +15502,20 @@ (const_string "*") (const_string "1"))) (set_attr "length_immediate" "1") - (set_attr "prefix" "maybe_vex,maybe_vex,evex,evex") + (set_attr "prefix" "maybe_vex,maybe_vex") (set_attr "mode" "TI")]) (define_insn "*vec_extract<PEXTR_MODE12:mode>_zext" - [(set (match_operand:SWI48 0 "register_operand" "=r,r") + [(set (match_operand:SWI48 0 "register_operand" "=r") (zero_extend:SWI48 (vec_select:<PEXTR_MODE12:ssescalarmode> - (match_operand:PEXTR_MODE12 1 "register_operand" "x,v") + (match_operand:PEXTR_MODE12 1 "register_operand" "YW") (parallel [(match_operand:SI 2 "const_0_to_<PEXTR_MODE12:ssescalarnummask>_operand")]))))] "TARGET_SSE2" - "@ - %vpextr<PEXTR_MODE12:ssemodesuffix>\t{%2, %1, %k0|%k0, %1, %2} - vpextr<PEXTR_MODE12:ssemodesuffix>\t{%2, %1, %k0|%k0, %1, %2}" - [(set_attr "isa" "*,avx512bw") - (set_attr "type" "sselog1") + "%vpextr<PEXTR_MODE12:ssemodesuffix>\t{%2, %1, %k0|%k0, %1, %2}" + [(set_attr "type" "sselog1") (set_attr "prefix_data16" "1") (set (attr "prefix_extra") (if_then_else @@ -15538,18 +15527,15 @@ (set_attr "mode" "TI")]) (define_insn "*vec_extractv16qi_zext" - [(set (match_operand:HI 0 "register_operand" "=r,r") + [(set (match_operand:HI 0 "register_operand" "=r") (zero_extend:HI (vec_select:QI - (match_operand:V16QI 1 "register_operand" "x,v") + (match_operand:V16QI 1 "register_operand" "YW") (parallel [(match_operand:SI 2 "const_0_to_15_operand")]))))] "TARGET_SSE4_1" - "@ - %vpextrb\t{%2, %1, %k0|%k0, %1, %2} - vpextrb\t{%2, %1, %k0|%k0, %1, %2}" - [(set_attr "isa" "*,avx512bw") - (set_attr "type" "sselog1") + "%vpextrb\t{%2, %1, %k0|%k0, %1, %2}" + [(set_attr "type" "sselog1") (set_attr "prefix_data16" "1") (set_attr "prefix_extra" "1") (set_attr "length_immediate" "1") @@ -15656,9 +15642,9 @@ "operands[1] = gen_lowpart (SImode, operands[1]);") (define_insn "*vec_extractv4si" - [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,rm,Yr,*x,x,Yv") + [(set (match_operand:SI 0 "nonimmediate_operand" "=rm,rm,Yr,*x,Yw") (vec_select:SI - (match_operand:V4SI 1 "register_operand" "x,v,0,0,x,v") + (match_operand:V4SI 1 "register_operand" " x, v, 0, 0,Yw") (parallel [(match_operand:SI 2 "const_0_to_3_operand")])))] "TARGET_SSE4_1" { @@ -15674,7 +15660,6 @@ return "psrldq\t{%2, %0|%0, %2}"; case 4: - case 5: operands[2] = GEN_INT (INTVAL (operands[2]) * 4); return "vpsrldq\t{%2, %1, %0|%0, %1, %2}"; @@ -15682,14 +15667,14 @@ gcc_unreachable (); } } - [(set_attr "isa" "*,avx512dq,noavx,noavx,avx,avx512bw") - (set_attr "type" "sselog1,sselog1,sseishft1,sseishft1,sseishft1,sseishft1") + [(set_attr "isa" "*,avx512dq,noavx,noavx,avx") + (set_attr "type" "sselog1,sselog1,sseishft1,sseishft1,sseishft1") (set (attr "prefix_extra") (if_then_else (eq_attr "alternative" "0,1") (const_string "1") (const_string "*"))) (set_attr "length_immediate" "1") - (set_attr "prefix" "maybe_vex,evex,orig,orig,vex,evex") + (set_attr "prefix" "maybe_vex,evex,orig,orig,maybe_vex") (set_attr "mode" "TI")]) (define_insn "*vec_extractv4si_zext" @@ -16213,15 +16198,15 @@ }) (define_insn "*<sse2_avx2>_uavg<mode>3<mask_name>" - [(set (match_operand:VI12_AVX2_AVX512BW 0 "register_operand" "=x,v") + [(set (match_operand:VI12_AVX2_AVX512BW 0 "register_operand" "=x,<v_Yw>") (truncate:VI12_AVX2_AVX512BW (lshiftrt:<ssedoublemode> (plus:<ssedoublemode> (plus:<ssedoublemode> (zero_extend:<ssedoublemode> - (match_operand:VI12_AVX2_AVX512BW 1 "vector_operand" "%0,v")) + (match_operand:VI12_AVX2_AVX512BW 1 "vector_operand" "%0,<v_Yw>")) (zero_extend:<ssedoublemode> - (match_operand:VI12_AVX2_AVX512BW 2 "vector_operand" "xBm,vm"))) + (match_operand:VI12_AVX2_AVX512BW 2 "vector_operand" "xBm,<v_Yw>m"))) (match_operand:<ssedoublemode> <mask_expand_op3> "const1_operand")) (const_int 1))))] "TARGET_SSE2 && <mask_mode512bit_condition> && <mask_avx512bw_condition> @@ -16238,10 +16223,10 @@ ;; The correct representation for this is absolutely enormous, and ;; surely not generally useful. (define_insn "<sse2_avx2>_psadbw" - [(set (match_operand:VI8_AVX2_AVX512BW 0 "register_operand" "=x,v") + [(set (match_operand:VI8_AVX2_AVX512BW 0 "register_operand" "=x,YW") (unspec:VI8_AVX2_AVX512BW - [(match_operand:<ssebytemode> 1 "register_operand" "0,v") - (match_operand:<ssebytemode> 2 "vector_operand" "xBm,vm")] + [(match_operand:<ssebytemode> 1 "register_operand" "0,YW") + (match_operand:<ssebytemode> 2 "vector_operand" "xBm,YWm")] UNSPEC_PSADBW))] "TARGET_SSE2" "@ @@ -16815,12 +16800,12 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn "avx2_pmaddubsw256" - [(set (match_operand:V16HI 0 "register_operand" "=x,v") + [(set (match_operand:V16HI 0 "register_operand" "=Yw") (ss_plus:V16HI (mult:V16HI (zero_extend:V16HI (vec_select:V16QI - (match_operand:V32QI 1 "register_operand" "x,v") + (match_operand:V32QI 1 "register_operand" "Yw") (parallel [(const_int 0) (const_int 2) (const_int 4) (const_int 6) (const_int 8) (const_int 10) @@ -16831,7 +16816,7 @@ (const_int 28) (const_int 30)]))) (sign_extend:V16HI (vec_select:V16QI - (match_operand:V32QI 2 "nonimmediate_operand" "xm,vm") + (match_operand:V32QI 2 "nonimmediate_operand" "Ywm") (parallel [(const_int 0) (const_int 2) (const_int 4) (const_int 6) (const_int 8) (const_int 10) @@ -16863,10 +16848,9 @@ (const_int 29) (const_int 31)]))))))] "TARGET_AVX2" "vpmaddubsw\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "*,avx512bw") - (set_attr "type" "sseiadd") + [(set_attr "type" "sseiadd") (set_attr "prefix_extra" "1") - (set_attr "prefix" "vex,evex") + (set_attr "prefix" "vex") (set_attr "mode" "OI")]) ;; The correct representation for this is absolutely enormous, and @@ -16919,19 +16903,19 @@ (set_attr "mode" "XI")]) (define_insn "ssse3_pmaddubsw128" - [(set (match_operand:V8HI 0 "register_operand" "=x,x,v") + [(set (match_operand:V8HI 0 "register_operand" "=x,Yw") (ss_plus:V8HI (mult:V8HI (zero_extend:V8HI (vec_select:V8QI - (match_operand:V16QI 1 "register_operand" "0,x,v") + (match_operand:V16QI 1 "register_operand" "0,Yw") (parallel [(const_int 0) (const_int 2) (const_int 4) (const_int 6) (const_int 8) (const_int 10) (const_int 12) (const_int 14)]))) (sign_extend:V8HI (vec_select:V8QI - (match_operand:V16QI 2 "vector_operand" "xBm,xm,vm") + (match_operand:V16QI 2 "vector_operand" "xBm,Ywm") (parallel [(const_int 0) (const_int 2) (const_int 4) (const_int 6) (const_int 8) (const_int 10) @@ -16952,14 +16936,13 @@ "TARGET_SSSE3" "@ pmaddubsw\t{%2, %0|%0, %2} - vpmaddubsw\t{%2, %1, %0|%0, %1, %2} vpmaddubsw\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sseiadd") (set_attr "atom_unit" "simul") - (set_attr "prefix_data16" "1,*,*") + (set_attr "prefix_data16" "1,*") (set_attr "prefix_extra" "1") - (set_attr "prefix" "orig,vex,evex") + (set_attr "prefix" "orig,vex") (set_attr "mode" "TI")]) (define_insn "ssse3_pmaddubsw" @@ -17065,16 +17048,16 @@ }) (define_insn "*<ssse3_avx2>_pmulhrsw<mode>3<mask_name>" - [(set (match_operand:VI2_AVX2 0 "register_operand" "=x,x,v") + [(set (match_operand:VI2_AVX2 0 "register_operand" "=x,<v_Yw>") (truncate:VI2_AVX2 (lshiftrt:<ssedoublemode> (plus:<ssedoublemode> (lshiftrt:<ssedoublemode> (mult:<ssedoublemode> (sign_extend:<ssedoublemode> - (match_operand:VI2_AVX2 1 "vector_operand" "%0,x,v")) + (match_operand:VI2_AVX2 1 "vector_operand" "%0,<v_Yw>")) (sign_extend:<ssedoublemode> - (match_operand:VI2_AVX2 2 "vector_operand" "xBm,xm,vm"))) + (match_operand:VI2_AVX2 2 "vector_operand" "xBm,<v_Yw>m"))) (const_int 14)) (match_operand:VI2_AVX2 3 "const1_operand")) (const_int 1))))] @@ -17082,13 +17065,12 @@ && !(MEM_P (operands[1]) && MEM_P (operands[2]))" "@ pmulhrsw\t{%2, %0|%0, %2} - vpmulhrsw\t{%2, %1, %0<mask_operand4>|%0<mask_operand4>, %1, %2} vpmulhrsw\t{%2, %1, %0<mask_operand4>|%0<mask_operand4>, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sseimul") - (set_attr "prefix_data16" "1,*,*") + (set_attr "prefix_data16" "1,*") (set_attr "prefix_extra" "1") - (set_attr "prefix" "orig,maybe_evex,evex") + (set_attr "prefix" "orig,maybe_evex") (set_attr "mode" "<sseinsnmode>")]) (define_expand "smulhrsv4hi3" @@ -17160,21 +17142,20 @@ (set_attr "mode" "DI,TI,TI")]) (define_insn "<ssse3_avx2>_pshufb<mode>3<mask_name>" - [(set (match_operand:VI1_AVX512 0 "register_operand" "=x,x,v") + [(set (match_operand:VI1_AVX512 0 "register_operand" "=x,<v_Yw>") (unspec:VI1_AVX512 - [(match_operand:VI1_AVX512 1 "register_operand" "0,x,v") - (match_operand:VI1_AVX512 2 "vector_operand" "xBm,xm,vm")] + [(match_operand:VI1_AVX512 1 "register_operand" "0,<v_Yw>") + (match_operand:VI1_AVX512 2 "vector_operand" "xBm,<v_Yw>m")] UNSPEC_PSHUFB))] "TARGET_SSSE3 && <mask_mode512bit_condition> && <mask_avx512bw_condition>" "@ pshufb\t{%2, %0|%0, %2} - vpshufb\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2} vpshufb\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}" - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sselog1") - (set_attr "prefix_data16" "1,*,*") + (set_attr "prefix_data16" "1,*") (set_attr "prefix_extra" "1") - (set_attr "prefix" "orig,maybe_evex,evex") + (set_attr "prefix" "orig,maybe_evex") (set_attr "btver2_decode" "vector") (set_attr "mode" "<sseinsnmode>")]) @@ -17274,11 +17255,11 @@ (set_attr "mode" "<sseinsnmode>")]) (define_insn "<ssse3_avx2>_palignr<mode>" - [(set (match_operand:SSESCALARMODE 0 "register_operand" "=x,x,v") + [(set (match_operand:SSESCALARMODE 0 "register_operand" "=x,<v_Yw>") (unspec:SSESCALARMODE - [(match_operand:SSESCALARMODE 1 "register_operand" "0,x,v") - (match_operand:SSESCALARMODE 2 "vector_operand" "xBm,xm,vm") - (match_operand:SI 3 "const_0_to_255_mul_8_operand" "n,n,n")] + [(match_operand:SSESCALARMODE 1 "register_operand" "0,<v_Yw>") + (match_operand:SSESCALARMODE 2 "vector_operand" "xBm,<v_Yw>m") + (match_operand:SI 3 "const_0_to_255_mul_8_operand" "n,n")] UNSPEC_PALIGNR))] "TARGET_SSSE3" { @@ -17289,19 +17270,18 @@ case 0: return "palignr\t{%3, %2, %0|%0, %2, %3}"; case 1: - case 2: return "vpalignr\t{%3, %2, %1, %0|%0, %1, %2, %3}"; default: gcc_unreachable (); } } - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sseishft") (set_attr "atom_unit" "sishuf") - (set_attr "prefix_data16" "1,*,*") + (set_attr "prefix_data16" "1,*") (set_attr "prefix_extra" "1") (set_attr "length_immediate" "1") - (set_attr "prefix" "orig,vex,evex") + (set_attr "prefix" "orig,vex") (set_attr "mode" "<sseinsnmode>")]) (define_insn_and_split "ssse3_palignrdi" @@ -17367,9 +17347,9 @@ (V8DI "TARGET_AVX512F") (V4DI "TARGET_AVX512VL") (V2DI "TARGET_AVX512VL")]) (define_insn "*abs<mode>2" - [(set (match_operand:VI1248_AVX512VL_AVX512BW 0 "register_operand" "=v") + [(set (match_operand:VI1248_AVX512VL_AVX512BW 0 "register_operand" "=<v_Yw>") (abs:VI1248_AVX512VL_AVX512BW - (match_operand:VI1248_AVX512VL_AVX512BW 1 "vector_operand" "vBm")))] + (match_operand:VI1248_AVX512VL_AVX512BW 1 "vector_operand" "<v_Yw>Bm")))] "TARGET_SSSE3" "%vpabs<ssemodesuffix>\t{%1, %0|%0, %1}" [(set_attr "type" "sselog1") @@ -17731,22 +17711,21 @@ (set_attr "mode" "<sseinsnmode>")]) (define_insn "<sse4_1_avx2>_packusdw<mask_name>" - [(set (match_operand:VI2_AVX2 0 "register_operand" "=Yr,*x,x,v") + [(set (match_operand:VI2_AVX2 0 "register_operand" "=Yr,*x,<v_Yw>") (vec_concat:VI2_AVX2 (us_truncate:<ssehalfvecmode> - (match_operand:<sseunpackmode> 1 "register_operand" "0,0,x,v")) + (match_operand:<sseunpackmode> 1 "register_operand" "0,0,<v_Yw>")) (us_truncate:<ssehalfvecmode> - (match_operand:<sseunpackmode> 2 "vector_operand" "YrBm,*xBm,xm,vm"))))] + (match_operand:<sseunpackmode> 2 "vector_operand" "YrBm,*xBm,<v_Yw>m"))))] "TARGET_SSE4_1 && <mask_mode512bit_condition> && <mask_avx512bw_condition>" "@ packusdw\t{%2, %0|%0, %2} packusdw\t{%2, %0|%0, %2} - vpackusdw\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2} vpackusdw\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}" - [(set_attr "isa" "noavx,noavx,avx,avx512bw") + [(set_attr "isa" "noavx,noavx,avx") (set_attr "type" "sselog") (set_attr "prefix_extra" "1") - (set_attr "prefix" "orig,orig,<mask_prefix>,evex") + (set_attr "prefix" "orig,orig,<mask_prefix>") (set_attr "mode" "<sseinsnmode>")]) (define_insn "<sse4_1_avx2>_pblendvb" @@ -17867,9 +17846,9 @@ (set_attr "mode" "TI")]) (define_insn "avx2_<code>v16qiv16hi2<mask_name>" - [(set (match_operand:V16HI 0 "register_operand" "=v") + [(set (match_operand:V16HI 0 "register_operand" "=Yw") (any_extend:V16HI - (match_operand:V16QI 1 "nonimmediate_operand" "vm")))] + (match_operand:V16QI 1 "nonimmediate_operand" "Ywm")))] "TARGET_AVX2 && <mask_avx512bw_condition> && <mask_avx512vl_condition>" "vpmov<extsuffix>bw\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}" [(set_attr "type" "ssemov") @@ -17935,10 +17914,10 @@ "TARGET_AVX512BW") (define_insn "sse4_1_<code>v8qiv8hi2<mask_name>" - [(set (match_operand:V8HI 0 "register_operand" "=Yr,*x,v") + [(set (match_operand:V8HI 0 "register_operand" "=Yr,*x,Yw") (any_extend:V8HI (vec_select:V8QI - (match_operand:V16QI 1 "register_operand" "Yr,*x,v") + (match_operand:V16QI 1 "register_operand" "Yr,*x,Yw") (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3) (const_int 4) (const_int 5) @@ -17952,7 +17931,7 @@ (set_attr "mode" "TI")]) (define_insn "*sse4_1_<code>v8qiv8hi2<mask_name>_1" - [(set (match_operand:V8HI 0 "register_operand" "=Yr,*x,v") + [(set (match_operand:V8HI 0 "register_operand" "=Yr,*x,Yw") (any_extend:V8HI (match_operand:V8QI 1 "memory_operand" "m,m,m")))] "TARGET_SSE4_1 && <mask_avx512bw_condition> && <mask_avx512vl_condition>" @@ -21611,11 +21590,11 @@ (set_attr "mode" "<sseinsnmode>")]) (define_insn "*ssse3_palignr<mode>_perm" - [(set (match_operand:V_128 0 "register_operand" "=x,x,v") + [(set (match_operand:V_128 0 "register_operand" "=x,Yw") (vec_select:V_128 - (match_operand:V_128 1 "register_operand" "0,x,v") + (match_operand:V_128 1 "register_operand" "0,Yw") (match_parallel 2 "palignr_operand" - [(match_operand 3 "const_int_operand" "n,n,n")])))] + [(match_operand 3 "const_int_operand" "n,n")])))] "TARGET_SSSE3" { operands[2] = (GEN_INT (INTVAL (operands[3]) @@ -21626,19 +21605,18 @@ case 0: return "palignr\t{%2, %1, %0|%0, %1, %2}"; case 1: - case 2: return "vpalignr\t{%2, %1, %1, %0|%0, %1, %1, %2}"; default: gcc_unreachable (); } } - [(set_attr "isa" "noavx,avx,avx512bw") + [(set_attr "isa" "noavx,avx") (set_attr "type" "sseishft") (set_attr "atom_unit" "sishuf") - (set_attr "prefix_data16" "1,*,*") + (set_attr "prefix_data16" "1,*") (set_attr "prefix_extra" "1") (set_attr "length_immediate" "1") - (set_attr "prefix" "orig,vex,evex")]) + (set_attr "prefix" "orig,maybe_evex")]) (define_expand "avx512vl_vinsert<mode>" [(match_operand:VI48F_256 0 "register_operand") diff --git a/gcc/config/i386/x86-tune-costs.h b/gcc/config/i386/x86-tune-costs.h index cc27c79..e655e66 100644 --- a/gcc/config/i386/x86-tune-costs.h +++ b/gcc/config/i386/x86-tune-costs.h @@ -1688,6 +1688,140 @@ struct processor_costs znver2_cost = { "16", /* Func alignment. */ }; +struct processor_costs znver3_cost = { + { + /* Start of register allocator costs. integer->integer move cost is 2. */ + + /* reg-reg moves are done by renaming and thus they are even cheaper than + 1 cycle. Because reg-reg move cost is 2 and following tables correspond + to doubles of latencies, we do not model this correctly. It does not + seem to make practical difference to bump prices up even more. */ + 6, /* cost for loading QImode using + movzbl. */ + {6, 6, 6}, /* cost of loading integer registers + in QImode, HImode and SImode. + Relative to reg-reg move (2). */ + {8, 8, 8}, /* cost of storing integer + registers. */ + 2, /* cost of reg,reg fld/fst. */ + {6, 6, 16}, /* cost of loading fp registers + in SFmode, DFmode and XFmode. */ + {8, 8, 16}, /* cost of storing fp registers + in SFmode, DFmode and XFmode. */ + 2, /* cost of moving MMX register. */ + {6, 6}, /* cost of loading MMX registers + in SImode and DImode. */ + {8, 8}, /* cost of storing MMX registers + in SImode and DImode. */ + 2, 2, 3, /* cost of moving XMM,YMM,ZMM + register. */ + {6, 6, 6, 6, 12}, /* cost of loading SSE registers + in 32,64,128,256 and 512-bit. */ + {8, 8, 8, 8, 16}, /* cost of storing SSE registers + in 32,64,128,256 and 512-bit. */ + 6, 6, /* SSE->integer and integer->SSE + moves. */ + 8, 8, /* mask->integer and integer->mask moves */ + {6, 6, 6}, /* cost of loading mask register + in QImode, HImode, SImode. */ + {8, 8, 8}, /* cost if storing mask register + in QImode, HImode, SImode. */ + 2, /* cost of moving mask register. */ + /* End of register allocator costs. */ + }, + + COSTS_N_INSNS (1), /* cost of an add instruction. */ + COSTS_N_INSNS (1), /* cost of a lea instruction. */ + COSTS_N_INSNS (1), /* variable shift costs. */ + COSTS_N_INSNS (1), /* constant shift costs. */ + {COSTS_N_INSNS (3), /* cost of starting multiply for QI. */ + COSTS_N_INSNS (3), /* HI. */ + COSTS_N_INSNS (3), /* SI. */ + COSTS_N_INSNS (3), /* DI. */ + COSTS_N_INSNS (3)}, /* other. */ + 0, /* cost of multiply per each bit + set. */ + /* Depending on parameters, idiv can get faster on ryzen. This is upper + bound. */ + {COSTS_N_INSNS (16), /* cost of a divide/mod for QI. */ + COSTS_N_INSNS (22), /* HI. */ + COSTS_N_INSNS (30), /* SI. */ + COSTS_N_INSNS (45), /* DI. */ + COSTS_N_INSNS (45)}, /* other. */ + COSTS_N_INSNS (1), /* cost of movsx. */ + COSTS_N_INSNS (1), /* cost of movzx. */ + 8, /* "large" insn. */ + 9, /* MOVE_RATIO. */ + 6, /* CLEAR_RATIO */ + {6, 6, 6}, /* cost of loading integer registers + in QImode, HImode and SImode. + Relative to reg-reg move (2). */ + {8, 8, 8}, /* cost of storing integer + registers. */ + {6, 6, 6, 6, 12}, /* cost of loading SSE registers + in 32bit, 64bit, 128bit, 256bit and 512bit */ + {8, 8, 8, 8, 16}, /* cost of storing SSE register + in 32bit, 64bit, 128bit, 256bit and 512bit */ + {6, 6, 6, 6, 12}, /* cost of unaligned loads. */ + {8, 8, 8, 8, 16}, /* cost of unaligned stores. */ + 2, 2, 3, /* cost of moving XMM,YMM,ZMM + register. */ + 6, /* cost of moving SSE register to integer. */ + /* VGATHERDPD is 23 uops and throughput is 9, VGATHERDPD is 35 uops, + throughput 12. Approx 9 uops do not depend on vector size and every load + is 7 uops. */ + 18, 8, /* Gather load static, per_elt. */ + 18, 10, /* Gather store static, per_elt. */ + 32, /* size of l1 cache. */ + 512, /* size of l2 cache. */ + 64, /* size of prefetch block. */ + /* New AMD processors never drop prefetches; if they cannot be performed + immediately, they are queued. We set number of simultaneous prefetches + to a large constant to reflect this (it probably is not a good idea not + to limit number of prefetches at all, as their execution also takes some + time). */ + 100, /* number of parallel prefetches. */ + 3, /* Branch cost. */ + COSTS_N_INSNS (5), /* cost of FADD and FSUB insns. */ + COSTS_N_INSNS (5), /* cost of FMUL instruction. */ + /* Latency of fdiv is 8-15. */ + COSTS_N_INSNS (15), /* cost of FDIV instruction. */ + COSTS_N_INSNS (1), /* cost of FABS instruction. */ + COSTS_N_INSNS (1), /* cost of FCHS instruction. */ + /* Latency of fsqrt is 4-10. */ + COSTS_N_INSNS (10), /* cost of FSQRT instruction. */ + + COSTS_N_INSNS (1), /* cost of cheap SSE instruction. */ + COSTS_N_INSNS (3), /* cost of ADDSS/SD SUBSS/SD insns. */ + COSTS_N_INSNS (3), /* cost of MULSS instruction. */ + COSTS_N_INSNS (3), /* cost of MULSD instruction. */ + COSTS_N_INSNS (5), /* cost of FMA SS instruction. */ + COSTS_N_INSNS (5), /* cost of FMA SD instruction. */ + COSTS_N_INSNS (10), /* cost of DIVSS instruction. */ + /* 9-13. */ + COSTS_N_INSNS (13), /* cost of DIVSD instruction. */ + COSTS_N_INSNS (10), /* cost of SQRTSS instruction. */ + COSTS_N_INSNS (15), /* cost of SQRTSD instruction. */ + /* Zen can execute 4 integer operations per cycle. FP operations + take 3 cycles and it can execute 2 integer additions and 2 + multiplications thus reassociation may make sense up to with of 6. + SPEC2k6 bencharks suggests + that 4 works better than 6 probably due to register pressure. + + Integer vector operations are taken by FP unit and execute 3 vector + plus/minus operations per cycle but only one multiply. This is adjusted + in ix86_reassociation_width. */ + 4, 4, 3, 6, /* reassoc int, fp, vec_int, vec_fp. */ + znver2_memcpy, + znver2_memset, + COSTS_N_INSNS (4), /* cond_taken_branch_cost. */ + COSTS_N_INSNS (2), /* cond_not_taken_branch_cost. */ + "16", /* Loop alignment. */ + "16", /* Jump alignment. */ + "0:0:8", /* Label alignment. */ + "16", /* Func alignment. */ +}; + /* skylake_cost should produce code tuned for Skylake familly of CPUs. */ static stringop_algs skylake_memcpy[2] = { {libcall, {{1024, rep_prefix_4_byte, true}, {-1, libcall, false}}}, diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md index 69f3c70..859af75 100644 --- a/gcc/config/rs6000/predicates.md +++ b/gcc/config/rs6000/predicates.md @@ -1208,10 +1208,11 @@ (define_predicate "branch_comparison_operator" (and (match_operand 0 "comparison_operator") (match_test "GET_MODE_CLASS (GET_MODE (XEXP (op, 0))) == MODE_CC") - (if_then_else (match_test "GET_MODE (XEXP (op, 0)) == CCFPmode - && !flag_finite_math_only") - (match_code "lt,gt,eq,unordered,unge,unle,ne,ordered") - (match_code "lt,ltu,le,leu,gt,gtu,ge,geu,eq,ne")) + (if_then_else (match_test "GET_MODE (XEXP (op, 0)) == CCFPmode") + (if_then_else (match_test "flag_finite_math_only") + (match_code "lt,le,gt,ge,eq,ne,unordered,ordered") + (match_code "lt,gt,eq,unordered,unge,unle,ne,ordered")) + (match_code "lt,ltu,le,leu,gt,gtu,ge,geu,eq,ne")) (match_test "validate_condition_mode (GET_CODE (op), GET_MODE (XEXP (op, 0))), 1"))) diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 151136b..f7b1c03 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -16714,13 +16714,21 @@ s390_shift_truncation_mask (machine_mode mode) static bool f_constraint_p (const char *constraint) { + bool seen_f_p = false; + bool seen_v_p = false; + for (size_t i = 0, c_len = strlen (constraint); i < c_len; i += CONSTRAINT_LEN (constraint[i], constraint + i)) { if (constraint[i] == 'f') - return true; + seen_f_p = true; + if (constraint[i] == 'v') + seen_v_p = true; } - return false; + + /* Treat "fv" constraints as "v", because LRA will choose the widest register + * class. */ + return seen_f_p && !seen_v_p; } /* Implement TARGET_MD_ASM_ADJUST hook in order to fix up "f" diff --git a/gcc/config/sparc/constraints.md b/gcc/config/sparc/constraints.md index 82bbba9..7ddf014 100644 --- a/gcc/config/sparc/constraints.md +++ b/gcc/config/sparc/constraints.md @@ -19,7 +19,7 @@ ;;; Unused letters: ;;; B -;;; a jkl uv xyz +;;; a jkl uvwxyz ;; Register constraints @@ -190,14 +190,7 @@ (match_test "TARGET_ARCH32") (match_test "register_ok_for_ldd (op)"))) -;; Equivalent to 'T' but in 64-bit mode without alignment requirement (define_memory_constraint "W" - "Memory reference for 'e' constraint floating-point register" - (and (match_code "mem") - (match_test "TARGET_ARCH64") - (match_test "memory_ok_for_ldd (op)"))) - -(define_memory_constraint "w" "A memory with only a base register" (match_operand 0 "mem_noofs_operand")) diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index f150417..42ba415 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -9223,14 +9223,17 @@ register_ok_for_ldd (rtx reg) int memory_ok_for_ldd (rtx op) { - /* In 64-bit mode, we assume that the address is word-aligned. */ - if (TARGET_ARCH32 && !mem_min_alignment (op, 8)) + if (!mem_min_alignment (op, 8)) return 0; - if (! can_create_pseudo_p () + /* We need to perform the job of a memory constraint. */ + if ((reload_in_progress || reload_completed) && !strict_memory_address_p (Pmode, XEXP (op, 0))) return 0; + if (lra_in_progress && !memory_address_p (Pmode, XEXP (op, 0))) + return 0; + return 1; } diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 02b7c8d..c5d3696 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -1869,8 +1869,8 @@ visl") (set_attr "lra" "*,*,disabled,disabled,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*")]) (define_insn "*movdi_insn_sp64" - [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r, m, r,*e,?*e,?*e, W,b,b") - (match_operand:DI 1 "input_operand" "rI,N,m,rJ,*e, r, *e, W,?*e,J,P"))] + [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r, m, r,*e,?*e,?*e, m,b,b") + (match_operand:DI 1 "input_operand" "rI,N,m,rJ,*e, r, *e, m,?*e,J,P"))] "TARGET_ARCH64 && (register_operand (operands[0], DImode) || register_or_zero_or_all_ones_operand (operands[1], DImode))" @@ -2498,8 +2498,8 @@ visl") (set_attr "lra" "*,*,*,*,*,*,*,*,*,*,disabled,disabled,*,*,*,*,*")]) (define_insn "*movdf_insn_sp64" - [(set (match_operand:DF 0 "nonimmediate_operand" "=b,b,e,*r, e, e,W, *r,*r, m,*r") - (match_operand:DF 1 "input_operand" "G,C,e, e,*r,W#F,e,*rG, m,*rG, F"))] + [(set (match_operand:DF 0 "nonimmediate_operand" "=b,b,e,*r, e, e,m, *r,*r, m,*r") + (match_operand:DF 1 "input_operand" "G,C,e, e,*r,m#F,e,*rG, m,*rG, F"))] "TARGET_ARCH64 && (register_operand (operands[0], DFmode) || register_or_zero_or_all_ones_operand (operands[1], DFmode))" @@ -8467,8 +8467,8 @@ visl") (set_attr "cpu_feature" "vis,vis,vis,*,*,*,*,*,*,vis3,vis3")]) (define_insn "*mov<VM64:mode>_insn_sp64" - [(set (match_operand:VM64 0 "nonimmediate_operand" "=e,e,e,e,W,m,*r, m,*r, e,*r") - (match_operand:VM64 1 "input_operand" "Y,Z,e,W,e,Y, m,*r, e,*r,*r"))] + [(set (match_operand:VM64 0 "nonimmediate_operand" "=e,e,e,e,m,m,*r, m,*r, e,*r") + (match_operand:VM64 1 "input_operand" "Y,Z,e,m,e,Y, m,*r, e,*r,*r"))] "TARGET_VIS && TARGET_ARCH64 && (register_operand (operands[0], <VM64:MODE>mode) diff --git a/gcc/config/sparc/sync.md b/gcc/config/sparc/sync.md index c578e95..c0a20ef 100644 --- a/gcc/config/sparc/sync.md +++ b/gcc/config/sparc/sync.md @@ -202,7 +202,7 @@ (define_insn "*atomic_compare_and_swap<mode>_1" [(set (match_operand:I48MODE 0 "register_operand" "=r") - (match_operand:I48MODE 1 "mem_noofs_operand" "+w")) + (match_operand:I48MODE 1 "mem_noofs_operand" "+W")) (set (match_dup 1) (unspec_volatile:I48MODE [(match_operand:I48MODE 2 "register_operand" "r") @@ -214,7 +214,7 @@ (define_insn "atomic_compare_and_swap_leon3_1" [(set (match_operand:SI 0 "register_operand" "=r") - (match_operand:SI 1 "mem_noofs_operand" "+w")) + (match_operand:SI 1 "mem_noofs_operand" "+W")) (set (match_dup 1) (unspec_volatile:SI [(match_operand:SI 2 "register_operand" "r") @@ -235,7 +235,7 @@ (define_insn "*atomic_compare_and_swapdi_v8plus" [(set (match_operand:DI 0 "register_operand" "=h") - (match_operand:DI 1 "mem_noofs_operand" "+w")) + (match_operand:DI 1 "mem_noofs_operand" "+W")) (set (match_dup 1) (unspec_volatile:DI [(match_operand:DI 2 "register_operand" "h") diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 06c6dfa..0f91414 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,120 @@ +2021-03-16 Jason Merrill <jason@redhat.com> + + * tree.c (cp_tree_equal): Use real_identical. + +2021-03-16 Jakub Jelinek <jakub@redhat.com> + + PR c++/99613 + * decl.c (expand_static_init): For thread guards, call __cxa_atexit + before calling __cxa_guard_release rather than after it. Formatting + fixes. + +2021-03-16 Martin Liska <mliska@suse.cz> + Jason Merrill <jason@redhat.com> + + PR c++/99108 + * call.c (get_function_version_dispatcher): Handle + DECL_LOCAL_DECL_P. + * decl.c (maybe_version_functions): Likewise. + (maybe_mark_function_versioned): New. + * name-lookup.c (push_local_extern_decl_alias): No longer static. + * name-lookup.h (push_local_extern_decl_alias): Adjust. + +2021-03-16 Nathan Sidwell <nathan@acm.org> + + PR c++/99496 + * module.cc (trees_out::decl_value): Adjust typedef streaming, + indicate whether it is a dependent alias. + (trees_in::decl_value): Likewise. Set as dependent alias, if it + is one. + +2021-03-15 Iain Sandoe <iain@sandoe.co.uk> + + PR c++/99047 + * coroutines.cc (expand_one_await_expression): If the + await_ready() expression is not a boolean then convert it + as required. + +2021-03-15 Iain Sandoe <iain@sandoe.co.uk> + + PR c++/98704 + * coroutines.cc (build_actor_fn): Make destroy index 1 + correspond to the abnormal unhandled_exception() exit. + Substitute the proxy for the resume index. + (coro_rewrite_function_body): Arrange to reset the resume + index and make done = true for a rethrown exception from + unhandled_exception (). + (morph_fn_to_coro): Adjust calls to build_actor_fn and + coro_rewrite_function_body. + +2021-03-15 Iain Sandoe <iain@sandoe.co.uk> + + PR c++/98480 + * coroutines.cc (replace_continue): Rewrite continue into + 'goto label'. + (await_statement_walker): Handle await expressions in the + initializer, condition and iteration expressions of for + loops. + +2021-03-15 Iain Sandoe <iain@sandoe.co.uk> + + PR c++/96749 + * coroutines.cc (flatten_await_stmt): Allow for the case + where a target expression variable only has uses in the + second part of a compound expression. + (maybe_promote_temps): Avoid emiting empty statements. + +2021-03-15 Tobias Burnus <tobias@codesourcery.com> + + PR c++/99509 + * decl.c (cp_finish_decl): For 'omp declare target implicit' vars, + ensure that the varpool node is marked as offloadable. + +2021-03-12 Nathan Sidwell <nathan@acm.org> + + PR c++/99238 + * module.cc (depset::hash::add_binding_entity): Assert not + visited. + (depset::add::add_specializations): Likewise. + * name-lookup.c (name_lookup::dedup): New. + (name_lookup::~name_lookup): Assert not deduping. + (name_lookup::restore_state): Likewise. + (name_lookup::add_overload): Replace outlined code with dedup + call. + (name_lookup::add_value): Likewise. + (name_lookup::search_namespace_only): Likewise. + (name_lookup::adl_namespace_fns): Likewise. + (name_lookup::adl_class_fns): Likewise. + (name_lookup::search_adl): Likewise. Add clearing dedup call. + (name_lookup::search_qualified): Likewise. + (name_lookup::search_unqualified): Likewise. + +2021-03-12 Jakub Jelinek <jakub@redhat.com> + + PR c++/99507 + * call.c (build_over_call): For immediate evaluation of functions + that return references, undo convert_from_reference effects before + calling cxx_constant_value and call convert_from_reference + afterwards. + +2021-03-11 Nathan Sidwell <nathan@acm.org> + + PR c++/99248 + * name-lookup.c (lookup_elaborated_type_1): Access slot not bind + when there's a binding vector. + * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing. + +2021-03-11 Nathan Sidwell <nathan@acm.org> + + PR c++/99528 + * module.cc (enum merge_kind): Delete MK_type_tmpl_spec, + MK_decl_tmpl_spec. + (trees_in::decl_value): Adjust add_mergeable_specialization call. + (trees_out::get_merge_kind): Adjust detecting a partial template + instantiation. + (trees_out::key_mergeable): Adjust handling same. + (trees_in::key_mergeabvle): Likewise. + 2021-03-10 Nathan Sidwell <nathan@acm.org> PR c++/99423 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 7d12fea..29f4b50 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -8469,6 +8469,9 @@ get_function_version_dispatcher (tree fn) { tree dispatcher_decl = NULL; + if (DECL_LOCAL_DECL_P (fn)) + fn = DECL_LOCAL_DECL_ALIAS (fn); + gcc_assert (TREE_CODE (fn) == FUNCTION_DECL && DECL_FUNCTION_VERSIONED (fn)); @@ -9504,6 +9507,9 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) if (immediate_invocation_p (fndecl, nargs)) { tree obj_arg = NULL_TREE; + /* Undo convert_from_reference called by build_cxx_call. */ + if (REFERENCE_REF_P (call)) + call = TREE_OPERAND (call, 0); if (DECL_CONSTRUCTOR_P (fndecl)) obj_arg = cand->first_arg ? cand->first_arg : (*args)[0]; if (obj_arg && is_dummy_object (obj_arg)) @@ -9527,6 +9533,7 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain) call = cxx_constant_value (call, obj_arg); if (obj_arg && !error_operand_p (call)) call = build2 (INIT_EXPR, void_type_node, obj_arg, call); + call = convert_from_reference (call); } } return call; diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index c5aeb66..51984ef 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -1586,7 +1586,13 @@ expand_one_await_expression (tree *stmt, tree *await_expr, void *d) /* Use the await_ready() call to test if we need to suspend. */ tree ready_cond = TREE_VEC_ELT (awaiter_calls, 0); /* await_ready(). */ - ready_cond = build1_loc (loc, TRUTH_NOT_EXPR, boolean_type_node, ready_cond); + /* Convert to bool, if necessary. */ + if (TREE_CODE (TREE_TYPE (ready_cond)) != BOOLEAN_TYPE) + ready_cond = cp_convert (boolean_type_node, ready_cond, + tf_warning_or_error); + /* Be aggressive in folding here, since there are a significant number of + cases where the ready condition is constant. */ + ready_cond = invert_truthvalue_loc (loc, ready_cond); ready_cond = build1_loc (loc, CLEANUP_POINT_EXPR, boolean_type_node, ready_cond); @@ -2145,7 +2151,7 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody, tree orig, hash_map<tree, param_info> *param_uses, hash_map<tree, local_var_info> *local_var_uses, vec<tree, va_gc> *param_dtor_list, tree resume_fn_field, - unsigned body_count, tree frame_size) + tree resume_idx_field, unsigned body_count, tree frame_size) { verify_stmt_tree (fnbody); /* Some things we inherit from the original function. */ @@ -2267,6 +2273,17 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody, b = coro_build_cvt_void_expr_stmt (b, loc); add_stmt (b); + /* The destroy point numbered #1 is special, in that it is reached from a + coroutine that is suspended after re-throwing from unhandled_exception(). + This label just invokes the cleanup of promise, param copies and the + frame itself. */ + tree del_promise_label + = create_named_label_with_ctx (loc, "coro.delete.promise", actor); + b = build_case_label (build_int_cst (short_unsigned_type_node, 1), NULL_TREE, + create_anon_label_with_ctx (loc, actor)); + add_stmt (b); + add_stmt (build_stmt (loc, GOTO_EXPR, del_promise_label)); + short unsigned lab_num = 3; for (unsigned destr_pt = 0; destr_pt < body_count; destr_pt++) { @@ -2371,9 +2388,10 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody, p_data.to = ap; cp_walk_tree (&fnbody, replace_proxy, &p_data, NULL); - /* Set the actor pointer to null, so that 'done' will work. - Resume from here is UB anyway - although a 'ready' await will - branch to the final resume, and fall through to the destroy. */ + /* The rewrite of the function adds code to set the __resume field to + nullptr when the coroutine is done and also the index to zero when + calling an unhandled exception. These are represented by two proxies + in the function, so rewrite them to the proper frame access. */ tree resume_m = lookup_member (coro_frame_type, get_identifier ("__resume"), /*protect=*/1, /*want_type=*/0, tf_warning_or_error); @@ -2383,12 +2401,14 @@ build_actor_fn (location_t loc, tree coro_frame_type, tree actor, tree fnbody, p_data.to = res_x; cp_walk_tree (&fnbody, replace_proxy, &p_data, NULL); + p_data.from = resume_idx_field; + p_data.to = rat; + cp_walk_tree (&fnbody, replace_proxy, &p_data, NULL); + /* Add in our function body with the co_returns rewritten to final form. */ add_stmt (fnbody); /* now do the tail of the function. */ - tree del_promise_label - = create_named_label_with_ctx (loc, "coro.delete.promise", actor); r = build_stmt (loc, LABEL_EXPR, del_promise_label); add_stmt (r); @@ -2955,7 +2975,9 @@ flatten_await_stmt (var_nest_node *n, hash_set<tree> *promoted, break; case TARGET_EXPR: { - /* We have a temporary; promote it. */ + /* We have a temporary; promote it, but allow for the idiom in code + generated by the compiler like + a = (target_expr produces temp, op uses temp). */ tree init = t; temps_used->add (init); tree var_type = TREE_TYPE (init); @@ -2976,20 +2998,35 @@ flatten_await_stmt (var_nest_node *n, hash_set<tree> *promoted, } else init = build2 (INIT_EXPR, var_type, var, init); - var_nest_node *ins - = new var_nest_node (var, init, n->prev, n); - /* We have to replace the target expr... */ - *v.entry = var; - /* ... and any uses of its var. */ - proxy_replace pr = {TREE_OPERAND (t, 0), var}; - cp_walk_tree (&n->init, replace_proxy, &pr, NULL); - /* Compiler-generated temporaries can also have uses in following - arms of compound expressions, which will be listed in 'replace_in' - if present. */ - if (replace_in) - cp_walk_tree (replace_in, replace_proxy, &pr, NULL); - flatten_await_stmt (ins, promoted, temps_used, NULL); - flatten_await_stmt (n, promoted, temps_used, NULL); + /* Simplify for the case that we have an init containing the temp + alone. */ + if (t == n->init && n->var == NULL_TREE) + { + n->var = var; + proxy_replace pr = {TREE_OPERAND (t, 0), var}; + cp_walk_tree (&init, replace_proxy, &pr, NULL); + n->init = init; + if (replace_in) + cp_walk_tree (replace_in, replace_proxy, &pr, NULL); + flatten_await_stmt (n, promoted, temps_used, NULL); + } + else + { + var_nest_node *ins + = new var_nest_node (var, init, n->prev, n); + /* We have to replace the target expr... */ + *v.entry = var; + /* ... and any uses of its var. */ + proxy_replace pr = {TREE_OPERAND (t, 0), var}; + cp_walk_tree (&n->init, replace_proxy, &pr, NULL); + /* Compiler-generated temporaries can also have uses in + following arms of compound expressions, which will be listed + in 'replace_in' if present. */ + if (replace_in) + cp_walk_tree (replace_in, replace_proxy, &pr, NULL); + flatten_await_stmt (ins, promoted, temps_used, NULL); + flatten_await_stmt (n, promoted, temps_used, NULL); + } return; } break; @@ -3178,7 +3215,6 @@ maybe_promote_temps (tree *stmt, void *d) gcc_checking_assert (root->next == NULL); tree vlist = NULL_TREE; var_nest_node *t = root; - gcc_checking_assert (!t->var); /* We build the bind scope expression from the bottom-up. EXPR_LIST holds the inner expression nest at the current cleanup level (becoming the final expression list when we've exhausted the @@ -3214,9 +3250,12 @@ maybe_promote_temps (tree *stmt, void *d) add_stmt (cl); /* push this onto the level above. */ } else if (expr_list) - add_stmt (expr_list); - else - gcc_unreachable (); + { + if (TREE_CODE (expr_list) != STATEMENT_LIST) + add_stmt (expr_list); + else if (!tsi_end_p (tsi_start (expr_list))) + add_stmt (expr_list); + } } else { @@ -3225,7 +3264,12 @@ maybe_promote_temps (tree *stmt, void *d) else finish_expr_stmt (t->init); if (expr_list) - add_stmt (expr_list); + { + if (TREE_CODE (expr_list) != STATEMENT_LIST) + add_stmt (expr_list); + else if (!tsi_end_p (tsi_start (expr_list))) + add_stmt (expr_list); + } } expr_list = pop_stmt_list (new_list); var_nest_node *old = t; @@ -3407,6 +3451,50 @@ coro_build_add_if_not_cond_break (tree cond) finish_if_stmt (if_stmt); } +/* Tree walk callback to replace continue statements with goto label. */ +static tree +replace_continue (tree *stmt, int *do_subtree, void *d) +{ + tree expr = *stmt; + if (TREE_CODE (expr) == CLEANUP_POINT_EXPR) + expr = TREE_OPERAND (expr, 0); + if (CONVERT_EXPR_P (expr) && VOID_TYPE_P (expr)) + expr = TREE_OPERAND (expr, 0); + STRIP_NOPS (expr); + if (!STATEMENT_CLASS_P (expr)) + return NULL_TREE; + + switch (TREE_CODE (expr)) + { + /* Unless it's a special case, just walk the subtrees as usual. */ + default: return NULL_TREE; + + case CONTINUE_STMT: + { + tree *label = (tree *)d; + location_t loc = EXPR_LOCATION (expr); + /* re-write a continue to goto label. */ + *stmt = build_stmt (loc, GOTO_EXPR, *label); + *do_subtree = 0; + return NULL_TREE; + } + + /* Statements that do not require recursion. */ + case DECL_EXPR: + case BREAK_STMT: + case GOTO_EXPR: + case LABEL_EXPR: + case CASE_LABEL_EXPR: + case ASM_EXPR: + /* These must break recursion. */ + case FOR_STMT: + case WHILE_STMT: + case DO_STMT: + *do_subtree = 0; + return NULL_TREE; + } +} + /* Tree walk callback to analyze, register and pre-process statements that contain await expressions. */ @@ -3510,6 +3598,88 @@ await_statement_walker (tree *stmt, int *do_subtree, void *d) return res; } break; + case FOR_STMT: + { + /* for loops only need special treatment if the condition or the + iteration expression contain a co_await. */ + tree for_stmt = *stmt; + /* Sanity check. */ + if ((res = cp_walk_tree (&FOR_INIT_STMT (for_stmt), + analyze_expression_awaits, d, &visited))) + return res; + gcc_checking_assert (!awpts->saw_awaits); + + if ((res = cp_walk_tree (&FOR_COND (for_stmt), + analyze_expression_awaits, d, &visited))) + return res; + bool for_cond_await = awpts->saw_awaits != 0; + unsigned save_awaits = awpts->saw_awaits; + + if ((res = cp_walk_tree (&FOR_EXPR (for_stmt), + analyze_expression_awaits, d, &visited))) + return res; + bool for_expr_await = awpts->saw_awaits > save_awaits; + + /* If the condition has an await, then we will need to rewrite the + loop as + for (init expression;true;iteration expression) { + condition = await expression; + if (condition) + break; + ... + } + */ + if (for_cond_await) + { + tree insert_list = push_stmt_list (); + /* This will be expanded when the revised body is handled. */ + coro_build_add_if_not_cond_break (FOR_COND (for_stmt)); + /* .. add the original for body. */ + add_stmt (FOR_BODY (for_stmt)); + /* To make the new for body. */ + FOR_BODY (for_stmt) = pop_stmt_list (insert_list); + FOR_COND (for_stmt) = boolean_true_node; + } + /* If the iteration expression has an await, it's a bit more + tricky. + for (init expression;condition;) { + ... + iteration_expr_label: + iteration expression with await; + } + but, then we will need to re-write any continue statements into + 'goto iteration_expr_label:'. + */ + if (for_expr_await) + { + location_t sloc = EXPR_LOCATION (FOR_EXPR (for_stmt)); + tree insert_list = push_stmt_list (); + /* The original for body. */ + add_stmt (FOR_BODY (for_stmt)); + char *buf = xasprintf ("for.iter.expr.%u", awpts->cond_number++); + tree it_expr_label + = create_named_label_with_ctx (sloc, buf, NULL_TREE); + free (buf); + add_stmt (build_stmt (sloc, LABEL_EXPR, it_expr_label)); + add_stmt (FOR_EXPR (for_stmt)); + FOR_EXPR (for_stmt) = NULL_TREE; + FOR_BODY (for_stmt) = pop_stmt_list (insert_list); + /* rewrite continue statements to goto label. */ + hash_set<tree> visited_continue; + if ((res = cp_walk_tree (&FOR_BODY (for_stmt), + replace_continue, &it_expr_label, &visited_continue))) + return res; + } + + /* So now walk the body statement (list), if there were no await + expressions, then this handles the original body - and either + way we will have finished with this statement. */ + res = cp_walk_tree (&FOR_BODY (for_stmt), + await_statement_walker, d, NULL); + *do_subtree = 0; /* Done subtrees. */ + return res; + } + break; case WHILE_STMT: { /* We turn 'while (cond with awaits) stmt' into @@ -3872,9 +4042,9 @@ act_des_fn (tree orig, tree fn_type, tree coro_frame_ptr, const char* name) /* Re-write the body as per [dcl.fct.def.coroutine] / 5. */ static tree -coro_rewrite_function_body (location_t fn_start, tree fnbody, - tree orig, tree resume_fn_ptr_type, - tree& resume_fn_field, tree& fs_label) +coro_rewrite_function_body (location_t fn_start, tree fnbody, tree orig, + tree resume_fn_ptr_type, tree& resume_fn_field, + tree& resume_idx_field, tree& fs_label) { /* This will be our new outer scope. */ tree update_body = build3 (BIND_EXPR, void_type_node, NULL, NULL, NULL); @@ -3918,6 +4088,25 @@ coro_rewrite_function_body (location_t fn_start, tree fnbody, tree return_void = get_coroutine_return_void_expr (current_function_decl, fn_start, false); + /* We will need to be able to set the resume function pointer to nullptr + to signal that the coroutine is 'done'. */ + resume_fn_field + = build_lang_decl (VAR_DECL, get_identifier ("resume.fn.ptr.proxy"), + resume_fn_ptr_type); + DECL_ARTIFICIAL (resume_fn_field) = true; + tree zero_resume + = build1 (CONVERT_EXPR, resume_fn_ptr_type, integer_zero_node); + zero_resume + = build2 (INIT_EXPR, resume_fn_ptr_type, resume_fn_field, zero_resume); + /* Likewise, the resume index needs to be reset. */ + resume_idx_field + = build_lang_decl (VAR_DECL, get_identifier ("resume.index.proxy"), + short_unsigned_type_node); + DECL_ARTIFICIAL (resume_idx_field) = true; + tree zero_resume_idx = build_int_cst (short_unsigned_type_node, 0); + zero_resume_idx = build2 (INIT_EXPR, short_unsigned_type_node, + resume_idx_field, zero_resume_idx); + if (flag_exceptions) { /* Build promise.unhandled_exception(); */ @@ -3976,7 +4165,13 @@ coro_rewrite_function_body (location_t fn_start, tree fnbody, IF_SCOPE (not_iarc_if) = NULL; not_iarc_if = do_poplevel (iarc_scope); add_stmt (not_iarc_if); - /* ... else call the promise unhandled exception method. */ + /* ... else call the promise unhandled exception method + but first we set done = true and the resume index to 0. + If the unhandled exception method returns, then we continue + to the final await expression (which duplicates the clearing of + the field). */ + finish_expr_stmt (zero_resume); + finish_expr_stmt (zero_resume_idx); ueh = maybe_cleanup_point_expr_void (ueh); add_stmt (ueh); finish_handler (handler); @@ -4013,14 +4208,6 @@ coro_rewrite_function_body (location_t fn_start, tree fnbody, /* Before entering the final suspend point, we signal that this point has been reached by setting the resume function pointer to zero (this is what the 'done()' builtin tests) as per the current ABI. */ - resume_fn_field - = build_lang_decl (VAR_DECL, get_identifier ("resume.fn.ptr.proxy"), - resume_fn_ptr_type); - DECL_ARTIFICIAL (resume_fn_field) = true; - tree zero_resume - = build1 (CONVERT_EXPR, resume_fn_ptr_type, integer_zero_node); - zero_resume - = build2 (INIT_EXPR, resume_fn_ptr_type, resume_fn_field, zero_resume); finish_expr_stmt (zero_resume); finish_expr_stmt (build_init_or_final_await (fn_start, true)); BIND_EXPR_BODY (update_body) = pop_stmt_list (BIND_EXPR_BODY (update_body)); @@ -4164,9 +4351,11 @@ morph_fn_to_coro (tree orig, tree *resumer, tree *destroyer) the requirements for the coroutine frame. */ tree resume_fn_field = NULL_TREE; + tree resume_idx_field = NULL_TREE; tree fs_label = NULL_TREE; - fnbody = coro_rewrite_function_body (fn_start, fnbody, orig, act_des_fn_ptr, - resume_fn_field, fs_label); + fnbody = coro_rewrite_function_body (fn_start, fnbody, orig, + act_des_fn_ptr, resume_fn_field, + resume_idx_field, fs_label); /* Build our dummy coro frame layout. */ coro_frame_type = begin_class_definition (coro_frame_type); @@ -5048,7 +5237,7 @@ morph_fn_to_coro (tree orig, tree *resumer, tree *destroyer) /* Build the actor... */ build_actor_fn (fn_start, coro_frame_type, actor, fnbody, orig, param_uses, &local_var_uses, param_dtor_list, resume_fn_field, - body_aw_points.await_number, frame_size); + resume_idx_field, body_aw_points.await_number, frame_size); /* Destroyer ... */ build_destroy_fn (fn_start, coro_frame_type, destroy, actor); diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 9c7f6e5..8e8f37d 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -53,7 +53,9 @@ along with GCC; see the file COPYING3. If not see #include "asan.h" #include "gcc-rich-location.h" #include "langhooks.h" +#include "context.h" /* For 'g'. */ #include "omp-general.h" +#include "omp-offload.h" /* For offload_vars. */ /* Possible cases of bad specifiers type used by bad_specifiers. */ enum bad_spec_place { @@ -1108,6 +1110,21 @@ decls_match (tree newdecl, tree olddecl, bool record_versions /* = true */) return types_match; } +/* Mark DECL as versioned if it isn't already. */ + +static void +maybe_mark_function_versioned (tree decl) +{ + if (!DECL_FUNCTION_VERSIONED (decl)) + { + DECL_FUNCTION_VERSIONED (decl) = 1; + /* If DECL_ASSEMBLER_NAME has already been set, re-mangle + to include the version marker. */ + if (DECL_ASSEMBLER_NAME_SET_P (decl)) + mangle_decl (decl); + } +} + /* NEWDECL and OLDDECL have identical signatures. If they are different versions adjust them and return true. If RECORD is set to true, record function versions. */ @@ -1118,18 +1135,22 @@ maybe_version_functions (tree newdecl, tree olddecl, bool record) if (!targetm.target_option.function_versions (newdecl, olddecl)) return false; - if (!DECL_FUNCTION_VERSIONED (olddecl)) + maybe_mark_function_versioned (olddecl); + if (DECL_LOCAL_DECL_P (olddecl)) { - DECL_FUNCTION_VERSIONED (olddecl) = 1; - if (DECL_ASSEMBLER_NAME_SET_P (olddecl)) - mangle_decl (olddecl); + olddecl = DECL_LOCAL_DECL_ALIAS (olddecl); + maybe_mark_function_versioned (olddecl); } - if (!DECL_FUNCTION_VERSIONED (newdecl)) + maybe_mark_function_versioned (newdecl); + if (DECL_LOCAL_DECL_P (newdecl)) { - DECL_FUNCTION_VERSIONED (newdecl) = 1; - if (DECL_ASSEMBLER_NAME_SET_P (newdecl)) - mangle_decl (newdecl); + /* Unfortunately, we can get here before pushdecl naturally calls + push_local_extern_decl_alias, so we need to call it directly. */ + if (!DECL_LOCAL_DECL_ALIAS (newdecl)) + push_local_extern_decl_alias (newdecl); + newdecl = DECL_LOCAL_DECL_ALIAS (newdecl); + maybe_mark_function_versioned (newdecl); } if (record) @@ -8176,9 +8197,22 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, DECL_ATTRIBUTES (decl)) && !lookup_attribute ("omp declare target link", DECL_ATTRIBUTES (decl))) - DECL_ATTRIBUTES (decl) - = tree_cons (get_identifier ("omp declare target"), - NULL_TREE, DECL_ATTRIBUTES (decl)); + { + DECL_ATTRIBUTES (decl) + = tree_cons (get_identifier ("omp declare target"), + NULL_TREE, DECL_ATTRIBUTES (decl)); + symtab_node *node = symtab_node::get (decl); + if (node != NULL) + { + node->offloadable = 1; + if (ENABLE_OFFLOADING) + { + g->have_offload = true; + if (is_a <varpool_node *> (node)) + vec_safe_push (offload_vars, decl); + } + } + } } /* This is the last point we can lower alignment so give the target the @@ -9231,17 +9265,25 @@ expand_static_init (tree decl, tree init) /* Do the initialization itself. */ init = add_stmt_to_compound (begin, init); - init = add_stmt_to_compound - (init, build2 (MODIFY_EXPR, void_type_node, flag, boolean_true_node)); - init = add_stmt_to_compound - (init, build_call_n (release_fn, 1, guard_addr)); + init = add_stmt_to_compound (init, + build2 (MODIFY_EXPR, void_type_node, + flag, boolean_true_node)); + + /* Use atexit to register a function for destroying this static + variable. Do this before calling __cxa_guard_release. */ + init = add_stmt_to_compound (init, register_dtor_fn (decl)); + + init = add_stmt_to_compound (init, build_call_n (release_fn, 1, + guard_addr)); } else - init = add_stmt_to_compound (init, set_guard (guard)); + { + init = add_stmt_to_compound (init, set_guard (guard)); - /* Use atexit to register a function for destroying this static - variable. */ - init = add_stmt_to_compound (init, register_dtor_fn (decl)); + /* Use atexit to register a function for destroying this static + variable. */ + init = add_stmt_to_compound (init, register_dtor_fn (decl)); + } finish_expr_stmt (init); diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 03359db..6dbdc92 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -7719,18 +7719,35 @@ trees_out::decl_value (tree decl, depset *dep) } } - bool is_typedef = (!type && inner - && TREE_CODE (inner) == TYPE_DECL - && DECL_ORIGINAL_TYPE (inner) - && TYPE_NAME (TREE_TYPE (inner)) == inner); - if (is_typedef) + bool is_typedef = false; + if (!type && inner && TREE_CODE (inner) == TYPE_DECL) { - /* A typedef type. */ - int type_tag = insert (TREE_TYPE (inner)); + tree t = TREE_TYPE (inner); + unsigned tdef_flags = 0; + if (DECL_ORIGINAL_TYPE (inner) + && TYPE_NAME (TREE_TYPE (inner)) == inner) + { + tdef_flags |= 1; + if (TYPE_STRUCTURAL_EQUALITY_P (t) + && TYPE_DEPENDENT_P_VALID (t) + && TYPE_DEPENDENT_P (t)) + tdef_flags |= 2; + } if (streaming_p ()) - dump (dumper::TREE) - && dump ("Cloned:%d typedef %C:%N", type_tag, - TREE_CODE (TREE_TYPE (inner)), TREE_TYPE (inner)); + u (tdef_flags); + + if (tdef_flags & 1) + { + /* A typedef type. */ + int type_tag = insert (t); + if (streaming_p ()) + dump (dumper::TREE) + && dump ("Cloned:%d %s %C:%N", type_tag, + tdef_flags & 2 ? "depalias" : "typedef", + TREE_CODE (t), t); + + is_typedef = true; + } } if (streaming_p () && DECL_MAYBE_IN_CHARGE_CDTOR_P (decl)) @@ -7993,12 +8010,6 @@ trees_in::decl_value () dump (dumper::TREE) && dump ("Read:%d %C:%N", tag, TREE_CODE (decl), decl); - /* Regular typedefs will have a NULL TREE_TYPE at this point. */ - bool is_typedef = (!type && inner - && TREE_CODE (inner) == TYPE_DECL - && DECL_ORIGINAL_TYPE (inner) - && !TREE_TYPE (inner)); - existing = back_refs[~tag]; bool installed = install_entity (existing); bool is_new = existing == decl; @@ -8030,6 +8041,16 @@ trees_in::decl_value () } } + /* Regular typedefs will have a NULL TREE_TYPE at this point. */ + unsigned tdef_flags = 0; + bool is_typedef = false; + if (!type && inner && TREE_CODE (inner) == TYPE_DECL) + { + tdef_flags = u (); + if (tdef_flags & 1) + is_typedef = true; + } + if (is_new) { /* A newly discovered node. */ @@ -8076,6 +8097,14 @@ trees_in::decl_value () TREE_TYPE (inner) = DECL_ORIGINAL_TYPE (inner); DECL_ORIGINAL_TYPE (inner) = NULL_TREE; set_underlying_type (inner); + if (tdef_flags & 2) + { + /* Match instantiate_alias_template's handling. */ + tree type = TREE_TYPE (inner); + TYPE_DEPENDENT_P (type) = true; + TYPE_DEPENDENT_P_VALID (type) = true; + SET_TYPE_STRUCTURAL_EQUALITY (type); + } } if (inner_tag) @@ -10661,6 +10690,9 @@ trees_in::key_mergeable (int tag, merge_kind mk, tree decl, tree inner, spec.tmpl = tree_node (); spec.args = tree_node (); + if (get_overrun ()) + return error_mark_node; + DECL_NAME (decl) = DECL_NAME (spec.tmpl); DECL_CONTEXT (decl) = DECL_CONTEXT (spec.tmpl); DECL_NAME (inner) = DECL_NAME (decl); @@ -12706,6 +12738,9 @@ depset::hash::add_binding_entity (tree decl, WMB_Flags flags, void *data_) *slot = data->binding; } + /* Make sure nobody left a tree visited lying about. */ + gcc_checking_assert (!TREE_VISITED (decl)); + if (flags & WMB_Using) { decl = ovl_make (decl, NULL_TREE); @@ -13000,6 +13035,8 @@ depset::hash::add_specializations (bool decl_p) have_spec:; #endif + /* Make sure nobody left a tree visited lying about. */ + gcc_checking_assert (!TREE_VISITED (spec)); depset *dep = make_dependency (spec, depset::EK_SPECIALIZATION); if (dep->is_special ()) { diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index d8839e2..a6257f5 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -464,6 +464,7 @@ public: } ~name_lookup () { + gcc_checking_assert (!deduping); restore_state (); } @@ -471,6 +472,17 @@ private: /* Uncopyable, unmovable, unassignable. I am a rock. */ name_lookup (const name_lookup &); name_lookup &operator= (const name_lookup &); + public: + /* Turn on or off deduping mode. */ + void dedup (bool state) + { + if (deduping != state) + { + deduping = state; + lookup_mark (value, state); + } + } + protected: static bool seen_p (tree scope) { @@ -605,8 +617,7 @@ name_lookup::preserve_state () void name_lookup::restore_state () { - if (deduping) - lookup_mark (value, false); + gcc_checking_assert (!deduping); /* Unmark and empty this lookup's scope stack. */ for (unsigned ix = vec_safe_length (scopes); ix--;) @@ -703,12 +714,9 @@ name_lookup::add_overload (tree fns) probe = ovl_skip_hidden (probe); if (probe && TREE_CODE (probe) == OVERLOAD && OVL_DEDUP_P (probe)) - { - /* We're about to add something found by multiple paths, so - need to engage deduping mode. */ - lookup_mark (value, true); - deduping = true; - } + /* We're about to add something found by multiple paths, so need to + engage deduping mode. */ + dedup (true); } value = lookup_maybe_add (fns, value, deduping); @@ -737,12 +745,8 @@ name_lookup::add_value (tree new_val) value = ORIGINAL_NAMESPACE (value); else { - if (deduping) - { - /* Disengage deduping mode. */ - lookup_mark (value, false); - deduping = false; - } + /* Disengage deduping mode. */ + dedup (false); value = ambiguous (new_val, value); } } @@ -951,10 +955,7 @@ name_lookup::search_namespace_only (tree scope) if ((hit & 1 && BINDING_VECTOR_GLOBAL_DUPS_P (val)) || (hit & 2 && BINDING_VECTOR_PARTITION_DUPS_P (val))) - { - lookup_mark (value, true); - deduping = true; - } + dedup (true); } dup_detect |= dup; } @@ -1076,6 +1077,8 @@ name_lookup::search_qualified (tree scope, bool usings) found = search_usings (scope); } + dedup (false); + return found; } @@ -1177,6 +1180,8 @@ name_lookup::search_unqualified (tree scope, cp_binding_level *level) break; } + dedup (false); + /* Restore to incoming length. */ vec_safe_truncate (queue, length); @@ -1284,15 +1289,10 @@ name_lookup::adl_namespace_fns (tree scope, bitmap imports) else if (MODULE_BINDING_PARTITION_P (bind)) dup = 2; if (unsigned hit = dup_detect & dup) - { - if ((hit & 1 && BINDING_VECTOR_GLOBAL_DUPS_P (val)) - || (hit & 2 - && BINDING_VECTOR_PARTITION_DUPS_P (val))) - { - lookup_mark (value, true); - deduping = true; - } - } + if ((hit & 1 && BINDING_VECTOR_GLOBAL_DUPS_P (val)) + || (hit & 2 + && BINDING_VECTOR_PARTITION_DUPS_P (val))) + dedup (true); dup_detect |= dup; } @@ -1328,11 +1328,7 @@ name_lookup::adl_class_fns (tree type) if (CP_DECL_CONTEXT (fn) != context) continue; - if (!deduping) - { - lookup_mark (value, true); - deduping = true; - } + dedup (true); /* Template specializations are never found by name lookup. (Templates themselves can be found, but not template @@ -1634,12 +1630,9 @@ name_lookup::search_adl (tree fns, vec<tree, va_gc> *args) if (vec_safe_length (scopes)) { /* Now do the lookups. */ - if (fns) - { - deduping = true; - lookup_mark (fns, true); - } value = fns; + if (fns) + dedup (true); /* INST_PATH will be NULL, if this is /not/ 2nd-phase ADL. */ bitmap inst_path = NULL; @@ -1697,14 +1690,9 @@ name_lookup::search_adl (tree fns, vec<tree, va_gc> *args) if (tree bind = *mslot) { - if (!deduping) - { - /* We must turn on deduping, because some - other class from this module might also - be in this namespace. */ - deduping = true; - lookup_mark (value, true); - } + /* We must turn on deduping, because some other class + from this module might also be in this namespace. */ + dedup (true); /* Add the exported fns */ if (STAT_HACK_P (bind)) @@ -1715,6 +1703,7 @@ name_lookup::search_adl (tree fns, vec<tree, va_gc> *args) } fns = value; + dedup (false); } return fns; @@ -3385,7 +3374,7 @@ set_decl_context_in_fn (tree ctx, tree decl) /* DECL is a local extern decl. Find or create the namespace-scope decl that it aliases. Also, determines the linkage of DECL. */ -static void +void push_local_extern_decl_alias (tree decl) { if (dependent_type_p (TREE_TYPE (decl))) @@ -3419,7 +3408,7 @@ push_local_extern_decl_alias (tree decl) if (binding && TREE_CODE (binding) != TREE_LIST) for (ovl_iterator iter (binding); iter; ++iter) - if (decls_match (*iter, decl)) + if (decls_match (decl, *iter, /*record_versions*/false)) { alias = *iter; break; diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h index 67e923f..f63c4f5 100644 --- a/gcc/cp/name-lookup.h +++ b/gcc/cp/name-lookup.h @@ -453,6 +453,7 @@ extern void cp_emit_debug_info_for_using (tree, tree); extern void finish_nonmember_using_decl (tree scope, tree name); extern void finish_using_directive (tree target, tree attribs); +void push_local_extern_decl_alias (tree decl); extern tree pushdecl (tree, bool hiding = false); extern tree pushdecl_outermost_localscope (tree); extern tree pushdecl_top_level (tree); diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 3c46975..3acb643 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -3740,7 +3740,7 @@ cp_tree_equal (tree t1, tree t2) return tree_int_cst_equal (t1, t2); case REAL_CST: - return real_equal (&TREE_REAL_CST (t1), &TREE_REAL_CST (t2)); + return real_identical (&TREE_REAL_CST (t1), &TREE_REAL_CST (t2)); case STRING_CST: return TREE_STRING_LENGTH (t1) == TREE_STRING_LENGTH (t2) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4a3c1e2..7a36895 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -14362,6 +14362,10 @@ recurse deeper. The maximum depth of a symbolic value, before approximating the value as unknown. +@item analyzer-max-infeasible-edges +The maximum number of infeasible edges to reject before declaring +a diagnostic as infeasible. + @item gimple-fe-computed-hot-bb-threshold The number of executions of a basic block which is considered hot. The parameter is used only in GIMPLE FE. diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index a78e724..8cc9403 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,38 @@ +2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/99345 + * frontend-passes.c (doloop_contained_procedure_code): + Properly handle EXEC_IOLENGTH. + +2021-03-15 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/99545 + * trans-stmt.c (gfc_trans_allocate): Mark the initialization + assignment by setting init_flag. + +2021-03-14 Harald Anlauf <anlauf@gmx.de> + Paul Thomas <pault@gcc.gnu.org> + + * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for + CLASS arguments. + * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise. + +2021-03-13 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/99125 + * trans-array.c (gfc_conv_expr_descriptor): For deferred length + length components use the ss_info string length instead of + gfc_get_expr_charlen. Make sure that the deferred string length + is a variable before assigning to it. Otherwise use the expr. + * trans-expr.c (gfc_conv_string_length): Make sure that the + deferred string length is a variable before assigning to it. + +2021-03-12 Tobias Burnus <tobias@codesourcery.com> + + PR fortran/99514 + * resolve.c (resolve_symbol): Accept vars which are in DATA + and hence (either) implicit SAVE (or in common). + 2021-03-10 Harald Anlauf <anlauf@gmx.de> PR fortran/99205 diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index 2b9c2d1..cfc4747 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -2405,6 +2405,7 @@ doloop_contained_procedure_code (gfc_code **c, case EXEC_READ: case EXEC_WRITE: case EXEC_INQUIRE: + case EXEC_IOLENGTH: saved_io_op = last_io_op; last_io_op = co->op; break; @@ -2460,6 +2461,12 @@ doloop_contained_procedure_code (gfc_code **c, info->procedure->name, &info->where_do); break; + case EXEC_IOLENGTH: + if (co->expr1 && co->expr1->symtree->n.sym == do_var) + gfc_error_now (errmsg, do_var->name, &co->expr1->where, + info->procedure->name, &info->where_do); + break; + default: gcc_unreachable (); } diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 2a91ae7..32015c2 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -16024,12 +16024,12 @@ resolve_symbol (gfc_symbol *sym) } /* Check threadprivate restrictions. */ - if (sym->attr.threadprivate && !sym->attr.save + if (sym->attr.threadprivate + && !(sym->attr.save || sym->attr.data || sym->attr.in_common) && !(sym->ns->save_all && !sym->attr.automatic) - && (!sym->attr.in_common - && sym->module == NULL - && (sym->ns->proc_name == NULL - || sym->ns->proc_name->attr.flavor != FL_MODULE))) + && sym->module == NULL + && (sym->ns->proc_name == NULL + || sym->ns->proc_name->attr.flavor != FL_MODULE)) gfc_error ("Threadprivate at %L isn't SAVEd", &sym->declared_at); /* Check omp declare target restrictions. */ diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 478cddd..be5eb89 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -7670,15 +7670,21 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr) /* Set the string_length for a character array. */ if (expr->ts.type == BT_CHARACTER) { - se->string_length = gfc_get_expr_charlen (expr); + if (deferred_array_component) + se->string_length = ss_info->string_length; + else + se->string_length = gfc_get_expr_charlen (expr); + if (VAR_P (se->string_length) && expr->ts.u.cl->backend_decl == se->string_length) tmp = ss_info->string_length; else tmp = se->string_length; - if (expr->ts.deferred) + if (expr->ts.deferred && VAR_P (expr->ts.u.cl->backend_decl)) gfc_add_modify (&se->pre, expr->ts.u.cl->backend_decl, tmp); + else + expr->ts.u.cl->backend_decl = tmp; } /* If we have an array section, are assigning or passing an array diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 85c16d7..bffe080 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -2485,7 +2485,7 @@ gfc_conv_string_length (gfc_charlen * cl, gfc_expr * expr, stmtblock_t * pblock) se.expr, build_zero_cst (TREE_TYPE (se.expr))); gfc_add_block_to_block (pblock, &se.pre); - if (cl->backend_decl) + if (cl->backend_decl && VAR_P (cl->backend_decl)) gfc_add_modify (pblock, cl->backend_decl, se.expr); else cl->backend_decl = gfc_evaluate_now (se.expr, pblock); @@ -6662,6 +6662,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, symbol_attribute attr; char *msg; tree cond; + tree tmp; if (e->expr_type == EXPR_VARIABLE || e->expr_type == EXPR_FUNCTION) attr = gfc_expr_attr (e); @@ -6732,11 +6733,20 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, else goto end_pointer_check; - tmp = parmse.expr; + if (fsym && fsym->ts.type == BT_CLASS) + { + tmp = build_fold_indirect_ref_loc (input_location, + parmse.expr); + tmp = gfc_class_data_get (tmp); + if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (tmp))) + tmp = gfc_conv_descriptor_data_get (tmp); + } + else + tmp = parmse.expr; /* If the argument is passed by value, we need to strip the INDIRECT_REF. */ - if (!POINTER_TYPE_P (TREE_TYPE (parmse.expr))) + if (!POINTER_TYPE_P (TREE_TYPE (tmp))) tmp = gfc_build_addr_expr (NULL_TREE, tmp); cond = fold_build2_loc (input_location, EQ_EXPR, diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 9cf3642..5e53d11 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -8006,8 +8006,10 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr) { symbol_attribute attr; char *msg; + tree temp; + tree cond; - attr = gfc_expr_attr (e); + attr = sym ? sym->attr : gfc_expr_attr (e); if (attr.allocatable) msg = xasprintf ("Allocatable argument '%s' is not allocated", e->symtree->n.sym->name); @@ -8017,14 +8019,24 @@ gfc_conv_intrinsic_size (gfc_se * se, gfc_expr * expr) else goto end_arg_check; - argse.descriptor_only = 1; - gfc_conv_expr_descriptor (&argse, actual->expr); - tree temp = gfc_conv_descriptor_data_get (argse.expr); - tree cond = fold_build2_loc (input_location, EQ_EXPR, - logical_type_node, temp, - fold_convert (TREE_TYPE (temp), - null_pointer_node)); + if (sym) + { + temp = gfc_class_data_get (sym->backend_decl); + temp = gfc_conv_descriptor_data_get (temp); + } + else + { + argse.descriptor_only = 1; + gfc_conv_expr_descriptor (&argse, actual->expr); + temp = gfc_conv_descriptor_data_get (argse.expr); + } + + cond = fold_build2_loc (input_location, EQ_EXPR, + logical_type_node, temp, + fold_convert (TREE_TYPE (temp), + null_pointer_node)); gfc_trans_runtime_check (true, false, cond, &argse.pre, &e->where, msg); + free (msg); } end_arg_check: diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 547468f..7cbdef7 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -7001,7 +7001,7 @@ gfc_trans_allocate (gfc_code * code) gfc_expr *init_expr = gfc_expr_to_initialize (expr); gfc_expr *rhs = e3rhs ? e3rhs : gfc_copy_expr (code->expr3); flag_realloc_lhs = 0; - tmp = gfc_trans_assignment (init_expr, rhs, false, false, true, + tmp = gfc_trans_assignment (init_expr, rhs, true, false, true, false); flag_realloc_lhs = realloc_lhs; /* Free the expression allocated for init_expr. */ diff --git a/gcc/gimplify.c b/gcc/gimplify.c index caf25cc..6da6698 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7078,7 +7078,7 @@ omp_add_variable (struct gimplify_omp_ctx *ctx, tree decl, unsigned int flags) if ((flags & GOVD_SHARED) == 0) { t = TYPE_SIZE_UNIT (TREE_TYPE (TREE_TYPE (decl))); - if (DECL_P (t)) + if (t && DECL_P (t)) omp_notice_variable (ctx, t, true); } } diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 58c881a..a3eef23 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -bf35249a7c752836741b1cab43a312f87916fcb0 +4bdff733a0c2a9ddc3eff104b1be03df058a79c4 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 101cbe7..5409d26 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -11017,7 +11017,7 @@ Call_expression::do_lower(Gogo* gogo, Named_object* function, // If this is call to a method, call the method directly passing the // object as the first parameter. Bound_method_expression* bme = this->fn_->bound_method_expression(); - if (bme != NULL) + if (bme != NULL && !this->is_deferred_ && !this->is_concurrent_) { Named_object* methodfn = bme->function(); Function_type* mft = (methodfn->is_function() diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc index 7ad7339..b066011 100644 --- a/gcc/go/gofrontend/statements.cc +++ b/gcc/go/gofrontend/statements.cc @@ -2524,6 +2524,8 @@ Thunk_statement::is_constant_function() const return fn->func_expression()->closure() == NULL; if (fn->interface_field_reference_expression() != NULL) return true; + if (fn->bound_method_expression() != NULL) + return true; return false; } @@ -2566,6 +2568,7 @@ Thunk_statement::simplify_statement(Gogo* gogo, Named_object* function, Expression* fn = ce->fn(); Interface_field_reference_expression* interface_method = fn->interface_field_reference_expression(); + Bound_method_expression* bme = fn->bound_method_expression(); Location location = this->location(); @@ -2594,6 +2597,8 @@ Thunk_statement::simplify_statement(Gogo* gogo, Named_object* function, if (interface_method != NULL) vals->push_back(interface_method->expr()); + if (bme != NULL) + vals->push_back(bme->first_argument()); if (ce->args() != NULL) { @@ -2714,6 +2719,16 @@ Thunk_statement::build_struct(Function_type* fntype) fields->push_back(Struct_field(tid)); } + // If this thunk statement calls a bound method expression, as in + // "go s.m()", we pass the bound method argument to the thunk, + // to ensure that we make a copy of it if needed. + Bound_method_expression* bme = fn->bound_method_expression(); + if (bme != NULL) + { + Typed_identifier tid("object", bme->first_argument()->type(), location); + fields->push_back(Struct_field(tid)); + } + // The predeclared recover function has no argument. However, we // add an argument when building recover thunks. Handle that here. if (ce->is_recover_call()) @@ -2843,6 +2858,7 @@ Thunk_statement::build_thunk(Gogo* gogo, const std::string& thunk_name) Interface_field_reference_expression* interface_method = ce->fn()->interface_field_reference_expression(); + Bound_method_expression* bme = ce->fn()->bound_method_expression(); Expression* func_to_call; unsigned int next_index; @@ -2870,6 +2886,17 @@ Thunk_statement::build_thunk(Gogo* gogo, const std::string& thunk_name) next_index = 1; } + if (bme != NULL) + { + // This is a call to a method. + go_assert(next_index == 0); + Expression* r = Expression::make_field_reference(thunk_parameter, 0, + location); + func_to_call = Expression::make_bound_method(r, bme->method(), + bme->function(), location); + next_index = 1; + } + Expression_list* call_params = new Expression_list(); const Struct_field_list* fields = this->struct_type_->fields(); Struct_field_list::const_iterator p = fields->begin(); diff --git a/gcc/match.pd b/gcc/match.pd index a34c283..036f92f 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -2788,7 +2788,10 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (plus:c @0 (lshift:s @0 INTEGER_CST@1)) (if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (@0)) && tree_fits_uhwi_p (@1) - && tree_to_uhwi (@1) < element_precision (type)) + && tree_to_uhwi (@1) < element_precision (type) + && (INTEGRAL_TYPE_P (TREE_TYPE (@0)) + || optab_handler (smul_optab, + TYPE_MODE (type)) != CODE_FOR_nothing)) (with { tree t = type; if (!TYPE_OVERFLOW_WRAPS (t)) t = unsigned_type_for (t); wide_int w = wi::set_bit_in_zero (tree_to_uhwi (@1), @@ -2804,7 +2807,10 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) && tree_fits_uhwi_p (@1) && tree_to_uhwi (@1) < element_precision (type) && tree_fits_uhwi_p (@2) - && tree_to_uhwi (@2) < element_precision (type)) + && tree_to_uhwi (@2) < element_precision (type) + && (INTEGRAL_TYPE_P (TREE_TYPE (@0)) + || optab_handler (smul_optab, + TYPE_MODE (type)) != CODE_FOR_nothing)) (with { tree t = type; if (!TYPE_OVERFLOW_WRAPS (t)) t = unsigned_type_for (t); unsigned int prec = element_precision (type); diff --git a/gcc/optc-save-gen.awk b/gcc/optc-save-gen.awk index 14b8d03..19afa89 100644 --- a/gcc/optc-save-gen.awk +++ b/gcc/optc-save-gen.awk @@ -1445,6 +1445,7 @@ checked_options["TARGET_CASE_VECTOR_PC_RELATIVE"]++ checked_options["arc_size_opt_level"]++ # arm exceptions checked_options["arm_fp16_format"]++ +checked_options["flag_ipa_ra"]++ # s390 exceptions checked_options["param_max_completely_peel_times"]++ checked_options["param_max_completely_peeled_insns"]++ diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index 2fce3ac..6430bcf 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2021-03-15 Joseph Myers <joseph@codesourcery.com> + + * sv.po: Update. + 2021-03-08 Joseph Myers <joseph@codesourcery.com> * de.po, sv.po: Update. diff --git a/gcc/po/sv.po b/gcc/po/sv.po index 82601cc..97a5104 100644 --- a/gcc/po/sv.po +++ b/gcc/po/sv.po @@ -28,7 +28,7 @@ msgstr "" "Project-Id-Version: gcc 11.1-b20210207\n" "Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n" "POT-Creation-Date: 2021-02-05 21:38+0000\n" -"PO-Revision-Date: 2021-03-07 22:23+0100\n" +"PO-Revision-Date: 2021-03-14 21:14+0100\n" "Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" "Language: sv\n" @@ -33220,10 +33220,9 @@ msgid "previously declared as a variable length array %s" msgstr "tidigare deklarerad som en vektor %s med variabel längd" #: c-family/c-warn.c:3475 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "previously declared here" +#, gcc-internal-format, gfc-internal-format msgid "previously declared as an array %s" -msgstr "tidigare deklarerad här" +msgstr "tidigare deklarerad som en vektor %s" #: c-family/c-warn.c:3484 #, gcc-internal-format, gfc-internal-format @@ -33231,20 +33230,18 @@ msgid "argument %u of type %s declared as an ordinary array" msgstr "argument %u av typen %s deklarerat som en vanlig vektor" #: c-family/c-warn.c:3512 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "argument of type %qT not permitted with -mgeneral-regs-only" +#, gcc-internal-format, gfc-internal-format msgid "argument %u of type %s declared with %u variable bound" msgid_plural "argument %u of type %s declared with %u variable bounds" -msgstr[0] "argument av typen %qT är inte tillåtna med -mgeneral-regs-only" -msgstr[1] "argument av typen %qT är inte tillåtna med -mgeneral-regs-only" +msgstr[0] "argument %u av typen %s deklarerad med %u variabelgräns" +msgstr[1] "argument %u av typen %s deklarerad med %u variabelgränser" #: c-family/c-warn.c:3519 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "previously declared here" +#, gcc-internal-format, gfc-internal-format msgid "previously declared as %s with %u variable bound" msgid_plural "previously declared as %s with %u variable bounds" -msgstr[0] "tidigare deklarerad här" -msgstr[1] "tidigare deklarerad här" +msgstr[0] "tidigare deklarerad som %s med %u variabelgräns" +msgstr[1] "tidigare deklarerad som %s med %u variabelgränser" #: c-family/c-warn.c:3543 #, gcc-internal-format, gfc-internal-format @@ -33273,28 +33270,24 @@ msgid "argument %u of type %s declared with mismatched bound argument %E" msgstr "argument %u av typen %s deklarerat med gränsargument %E som inte stämmer" #: c-family/c-warn.c:3619 c-family/c-warn.c:3652 -#, fuzzy, gcc-internal-format -#| msgid "ignoring returned value of type %qT, declared with attribute %<nodiscard%>: %<%s%>" +#, gcc-internal-format msgid "argument %u of type %s declared with mismatched bound %<%s%>" -msgstr "ignorerar returnerat värde av typen %qT, deklarerat med attributet %<nodiscard%>: %<%s%>" +msgstr "argument %u av typen %s deklarerat med gräns %<%s%> inte stämmer" #: c-family/c-warn.c:3631 -#, fuzzy, gcc-internal-format -#| msgid "previously declared here" +#, gcc-internal-format msgid "previously declared as %s with bound argument %E" -msgstr "tidigare deklarerad här" +msgstr "tidigare deklarerad %s med bundet argument %E" #: c-family/c-warn.c:3636 -#, fuzzy, gcc-internal-format -#| msgid "previous declaration of %<%c%s%>" +#, gcc-internal-format msgid "previously declared as %s with bound %<%s%>" -msgstr "tidigare deklaration av %<%c%s%>" +msgstr "tidigare deklaration som %s med gränsen %<%s%>" #: c-family/c-warn.c:3655 -#, fuzzy, gcc-internal-format -#| msgid "previous declaration %qD" +#, gcc-internal-format msgid "previously declared as %s with bound %qs" -msgstr "tidigare deklaration %qD" +msgstr "tidigare deklaration som %s med gränsen %qs" #: c-family/c-warn.c:3674 #, gcc-internal-format, gfc-internal-format @@ -33307,16 +33300,14 @@ msgid "expression does not compute the number of elements in this array; element msgstr "uttrycket beräknar inte antalet element i denna vektor; elementtypen är %qT, inte %qT" #: c-family/c-warn.c:3715 -#, fuzzy, gcc-internal-format -#| msgid "add parentheses around left hand side expression to silence this warning" +#, gcc-internal-format msgid "add parentheses around %qE to silence this warning" -msgstr "lägg till parenteser runt uttrycket på vänster hand för att tysta denna varning" +msgstr "lägg till parenteser runt %qE för att tysta denna varning" #: c-family/c-warn.c:3719 -#, fuzzy, gcc-internal-format -#| msgid "add parentheses around left hand side expression to silence this warning" +#, gcc-internal-format msgid "add parentheses around the second %<sizeof%> to silence this warning" -msgstr "lägg till parenteser runt uttrycket på vänster hand för att tysta denna varning" +msgstr "lägg till parenteser runt den andra %<sizeof%> för att tysta denna varning" #: c-family/cppspec.c:94 #, gcc-internal-format @@ -33552,10 +33543,9 @@ msgid "%<-march=%s%>: ISA string is not in canonical order. %<%c%>" msgstr "%<-march=%s%>: ISA-strängen är inte i kanonisk ordning. %<%c%>" #: common/config/riscv/riscv-common.c:773 -#, fuzzy, gcc-internal-format -#| msgid "%<-march=%s%>: %s must separate with _" +#, gcc-internal-format msgid "%<-march=%s%>: name of %s must be more than 1 letter" -msgstr "%<-march=%s%>: %s måste separeras med _" +msgstr "%<-march=%s%>: namnet på %s måste vara mer än 1 bokstav" #: common/config/riscv/riscv-common.c:785 #, gcc-internal-format @@ -33573,10 +33563,9 @@ msgid "%<-march=%s%>: unexpected ISA string at end: %qs" msgstr "%<-march=%s%>: oväntad ISA-sträng på slutet: %qs" #: common/config/riscv/riscv-common.c:979 -#, fuzzy, gcc-internal-format -#| msgid "%<%s%> is unknown" +#, gcc-internal-format msgid "%<-mcpu=%s%>: unknown CPU" -msgstr "%<%s%> är okänd" +msgstr "%<-mcpu=%s%>: okänd CPU" #: common/config/rs6000/rs6000-common.c:184 config/sparc/sparc.c:1740 #, gcc-internal-format @@ -33690,8 +33679,7 @@ msgid "couldn%'t understand kern.osversion %q.*s" msgstr "kunde inte förstå kern.osversion %q.*s" #: config/darwin-driver.c:232 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "couldn%'t understand version %s" +#, gcc-internal-format, gfc-internal-format msgid "could not understand version %s" msgstr "kunde inte förstå version %s" @@ -33701,10 +33689,9 @@ msgid "this compiler does not support %s" msgstr "denna målarkitektur stödjer inte %s" #: config/darwin-driver.c:351 -#, fuzzy, gcc-internal-format -#| msgid "%qs is not valid for %<mmacosx-version-min%>" +#, gcc-internal-format msgid "%qs is not valid for %<-mmacosx-version-min%>" -msgstr "%qs är inte ett giltigt värde till %<mmacosx-version-min%>" +msgstr "%qs är inte ett giltigt värde till %<-mmacosx-version-min%>" #: config/darwin-driver.c:385 #, gcc-internal-format @@ -34105,22 +34092,19 @@ msgid "invalid feature modifier %qs in %<-mcpu=%s%>" msgstr "ogiltig funktionsmodifierare %qs i %<-mcpu=%s%>" #: config/aarch64/aarch64.c:14836 -#, fuzzy, gcc-internal-format -#| msgid "invalid argument %qs to %qs" +#, gcc-internal-format msgid "invalid argument given to %<-mharden-sls=%>" -msgstr "ogiltigt argument %qs till %qs" +msgstr "ogiltigt argument givet till %<-mharden-sls=%>" #: config/aarch64/aarch64.c:14847 -#, fuzzy, gcc-internal-format -#| msgid "%<-mmsa%> must be used with %<-mfp64%> and %<-mhard-float%>" +#, gcc-internal-format msgid "%<%s%> must be by itself for %<-mharden-sls=%>" -msgstr "%<-mmsa%> måste användas med %<-mfp64%> och %<-mhard-float%>" +msgstr "%<%s%> måste vara ensamt till %<-mharden-sls=%>" #: config/aarch64/aarch64.c:14852 -#, fuzzy, gcc-internal-format -#| msgid "invalid argument %<%s%> for %<-mbranch-protection=%>" +#, gcc-internal-format msgid "invalid argument %<%s%> for %<-mharden-sls=%>" -msgstr "ogiltigt argument %<%s%> till %<-mbranch-protection=%>" +msgstr "ogiltigt argument %<%s%> till %<-mharden-sls=%>" #: config/aarch64/aarch64.c:14958 #, gcc-internal-format @@ -34288,10 +34272,9 @@ msgstr "bana %wd utanför intervallet %wd - %wd" #: config/aarch64/aarch64.c:23369 config/i386/i386.c:22509 #: config/i386/i386.c:22637 -#, fuzzy, gcc-internal-format -#| msgid "unsupported simdlen %d" +#, gcc-internal-format msgid "unsupported simdlen %wd" -msgstr "ej stödd simdlen: %d" +msgstr "ej stödd simdlen %wd" #: config/aarch64/aarch64.c:23379 config/aarch64/aarch64.c:23400 #, gcc-internal-format @@ -34314,10 +34297,9 @@ msgid "GCC does not currently support argument type %qT for %<simd%> functions" msgstr "GCC stödjer för närvarande inte argumenttypen %qT för %<simd%>-funktioner" #: config/aarch64/aarch64.c:23429 -#, fuzzy, gcc-internal-format -#| msgid "GCC does not currently support simdlen %d for type %qT" +#, gcc-internal-format msgid "GCC does not currently support simdlen %wd for type %qT" -msgstr "GCC stödjer för närvarande inte simdlen %d för typen %qT" +msgstr "GCC stödjer för närvarande inte simdlen %wd för typen %qT" #: config/alpha/alpha.c:420 #, gcc-internal-format @@ -35143,10 +35125,9 @@ msgid "no low registers available for popping high registers" msgstr "inga låga register tillgängliga för att poppa höga register" #: config/arm/arm.c:26643 -#, fuzzy, gcc-internal-format -#| msgid "interrupt Service Routines cannot be coded in Thumb mode" +#, gcc-internal-format msgid "Interrupt Service Routines cannot be coded in Thumb-1 mode" -msgstr "avbrottshanteringsrutiner kan inte kodas i Thumb-läge" +msgstr "Avbrottshanteringsrutiner kan inte kodas i Thumb-läge" #: config/arm/arm.c:26889 #, gcc-internal-format @@ -35497,16 +35478,14 @@ msgid "can%'t apply both longcall and shortcall attributes to the same function" msgstr "det går inte att tillämpa både attributet longcall och shortcall på samma funktion" #: config/bpf/bpf.c:92 -#, fuzzy, gcc-internal-format -#| msgid "%qE attribute requires an integer constant argument" +#, gcc-internal-format msgid "%qE attribute requires an integer argument" -msgstr "attributet %qE kräver en heltalskonstant som argument" +msgstr "attributet %qE kräver ett heltalsargument" #: config/bpf/bpf.c:99 -#, fuzzy, gcc-internal-format -#| msgid "%qE attribute requires a string argument" +#, gcc-internal-format msgid "%qE requires an argument" -msgstr "attributet %qE behöver ett strängargument" +msgstr "%qE behöver ett argument" #: config/bpf/bpf.c:297 #, gcc-internal-format @@ -35603,10 +35582,9 @@ msgstr "okänd CRIS-cpu-version angiven i %<-mtune=%> : %s" #. detectable. Still change to the values we expect, to avoid #. further errors. #: config/cris/cris.c:2339 -#, fuzzy, gcc-internal-format -#| msgid "%<-fPIC%>/%<-fpic%> not supported for this target" +#, gcc-internal-format msgid "%<-fPIC%> and %<-fpic%> are not supported on this target" -msgstr "%<-fPIC%>/%<-fpic%> stödjs inte av denna målarkitektur" +msgstr "%<-fPIC%> och %<-fpic%> stödjs inte på denna målarkitektur" #: config/cris/cris.c:2540 #, gcc-internal-format @@ -36242,10 +36220,9 @@ msgid "%<-mstringop-strategy=rep_8byte%> not supported for 32-bit code" msgstr "%<-mstringop-strategy=rep_8byte%> stödjs inte för 32-bitarskod" #: config/i386/i386-options.c:1913 -#, fuzzy, gcc-internal-format -#| msgid "%<-mstringop-strategy=rep_8byte%> not supported for 32-bit code" +#, gcc-internal-format msgid "%<-muintr%> not supported for 32-bit code" -msgstr "%<-mstringop-strategy=rep_8byte%> stödjs inte för 32-bitarskod" +msgstr "%<-muintr%> stödjs inte för 32-bitarskod" #: config/i386/i386-options.c:1928 #, gcc-internal-format @@ -36509,10 +36486,9 @@ msgid "%qs is not a valid base register in %<-mstack-protector-guard-reg=%>" msgstr "%qs är inte ett giltigt basregister i %<-mstack-protector-guard-reg=%>" #: config/i386/i386-options.c:3022 -#, fuzzy, gcc-internal-format -#| msgid "%<-mnop-mcount%> is not compatible with this target" +#, gcc-internal-format msgid "%<-fcf-protection%> is not compatible with this target" -msgstr "%<-mnop-mcount%> är inte kompatibelt med denna målarkitektur" +msgstr "%<-fcf-protection%> är inte kompatibelt med denna målarkitektur" #: config/i386/i386-options.c:3149 #, gcc-internal-format @@ -36844,10 +36820,9 @@ msgid "the alignment of %<_Atomic %T%> fields changed in %{GCC 11.1%}" msgstr "justeringen av %<_Atomic %T%>-fält ändrades i %{GCC 11.1%}" #: config/i386/i386.c:20817 -#, fuzzy, gcc-internal-format -#| msgid "%<-mcmodel=%> is not supported in 32-bit mode" +#, gcc-internal-format msgid "profiling %<-mcmodel=large%> with PIC is not supported" -msgstr "%<-mcmodel=%> stödjs inte i 32-bitarsläge" +msgstr "profileringen %<-mcmodel=large%> med PIC stödjs inte" #: config/i386/i386.c:22470 #, gcc-internal-format @@ -37551,15 +37526,12 @@ msgid "MCU %qs supports %s hardware multiply, but %<-mhwmult%> is set to f5serie msgstr "MCU %qs stödjer %s-hårdvarumultiplikation, men %<-mhwmult%> är satt till f5series" #: config/msp430/msp430.c:225 -#, fuzzy, gcc-internal-format -#| msgid "" -#| "Unrecognized MCU name %qs, assuming that it is just a MSP430 with no hardware multiply.\n" -#| "Use the %<-mcpu%> and %<-mhwmult%> options to set these explicitly." +#, gcc-internal-format msgid "" "Unrecognized MCU name %qs, assuming that it is just a MSP430X with no hardware multiply.\n" "Use the %<-mcpu%> and %<-mhwmult%> options to set these explicitly." msgstr "" -"Okänt MCU-namn %qs, antar att det bara är en MSP430 utan hårdvarumultiplikation.\n" +"Okänt MCU-namn %qs, antar att det bara är en MSP430X utan hårdvarumultiplikation.\n" "Använd flaggorna %<-mcpu%> och %<-mhwmult%> för att sätta dessa explicit." #: config/msp430/msp430.c:232 @@ -37572,15 +37544,12 @@ msgstr "" "använd flaggan %<-mhwmult%> för att sätta detta explicit." #: config/msp430/msp430.c:244 -#, fuzzy, gcc-internal-format -#| msgid "" -#| "Unrecognized MCU name %qs, assuming that it just supports the MSP430 ISA.\n" -#| "Use the %<-mcpu%> option to set the ISA explicitly." +#, gcc-internal-format msgid "" "Unrecognized MCU name %qs, assuming that it just supports the MSP430X ISA.\n" "Use the %<-mcpu%> option to set the ISA explicitly." msgstr "" -"Okänt MCU-namn %qs, antar att den bara stödjer ISA:n MSP430.\n" +"Okänt MCU-namn %qs, antar att den bara stödjer ISA:n MSP430X.\n" "Använd flaggan %<-mcpu%> för att sätta ISA:n explicit." #: config/msp430/msp430.c:250 @@ -38383,10 +38352,9 @@ msgid "passing argument %d of %qE discards qualifiers from pointer target type" msgstr "att skicka argument %d till %qE kastar kvalificerare från pekarmåltyp" #: config/rs6000/rs6000-c.c:1837 -#, fuzzy, gcc-internal-format -#| msgid "builtin %qs requires builtin %qs" +#, gcc-internal-format msgid "builtin %qs requires 4 arguments" -msgstr "den inbyggda %qs behöver den inbyggda %qs" +msgstr "den inbyggda %qs behöver 4 argument" #: config/rs6000/rs6000-c.c:1913 #, gcc-internal-format @@ -38404,10 +38372,9 @@ msgid "invalid parameter combination for AltiVec intrinsic %qs" msgstr "ogiltig parameterkombination för inbyggd %qs i AltiVec" #: config/rs6000/rs6000-call.c:6385 -#, fuzzy, gcc-internal-format -#| msgid "deduced class type %qD in function return type" +#, gcc-internal-format msgid "invalid use of MMA type %qs as a function return value" -msgstr "härledd klasstyp %qD i funktionens returtyp" +msgstr "felaktig användning av MMA-typen %qs i funktionens returvärde" #: config/rs6000/rs6000-call.c:6437 #, gcc-internal-format @@ -38430,10 +38397,9 @@ msgid "cannot pass argument in vector register because altivec instructions are msgstr "det går inte att skicka argument i vektorregister för att altivec-instruktioner är avaktiverade, använd %qs för att aktivera dem" #: config/rs6000/rs6000-call.c:7598 -#, fuzzy, gcc-internal-format -#| msgid "invalid operands of types %qT and %qT to binary %qO" +#, gcc-internal-format msgid "invalid use of MMA operand of type %qs as a function parameter" -msgstr "ogiltiga operander av typ %qT och %qT till binär %qO" +msgstr "felaktig användning av MMA-operand av typ %qs som en funktionsparameter" #: config/rs6000/rs6000-call.c:7822 #, gcc-internal-format @@ -38511,10 +38477,9 @@ msgid "argument 2 must be a 2-bit unsigned literal" msgstr "argument 2 måste vara en 2-bitars litteral utan tecken" #: config/rs6000/rs6000-call.c:9537 -#, fuzzy, gcc-internal-format -#| msgid "argument %d must be an unsigned literal" +#, gcc-internal-format msgid "argument 2 must be unsigned literal between 2 and 7 inclusive" -msgstr "argument %d måste vara en litteral utan tecken" +msgstr "argument 2 måste vara en litteral utan tecken mellan 2 och 7" #: config/rs6000/rs6000-call.c:9549 #, gcc-internal-format @@ -38589,34 +38554,29 @@ msgid "builtin %qs needs GLIBC (2.23 and newer) that exports hardware capability msgstr "den inbyggda %qs behöver GLIBC (2.23 och nyare) som exporterar bitar om hårdvaruegenskaper" #: config/rs6000/rs6000-call.c:10530 -#, fuzzy, gcc-internal-format -#| msgid "argument 2 must be a 1-bit unsigned literal" +#, gcc-internal-format msgid "argument 4 must be an 8-bit unsigned literal" -msgstr "argument 2 måste vara en 1-bits litteral utan tecken" +msgstr "argument 4 måste vara en 8-bitars litteral utan tecken" #: config/rs6000/rs6000-call.c:10542 -#, fuzzy, gcc-internal-format -#| msgid "argument 2 must be a 3-bit unsigned literal" +#, gcc-internal-format msgid "argument 4 must be a 3-bit unsigned literal" -msgstr "argument 2 måste vara en 3-bitars litteral utan tecken" +msgstr "argument 4 måste vara en 3-bitars litteral utan tecken" #: config/rs6000/rs6000-call.c:10556 -#, fuzzy, gcc-internal-format -#| msgid "argument 3 must be in the range [0, 15]" +#, gcc-internal-format msgid "argument 3 must be in the range 0 to 3" -msgstr "argument 3 måste vara i intervallet [0, 15]" +msgstr "argument 3 måste vara i intervallet 0 till 3" #: config/rs6000/rs6000-call.c:10570 -#, fuzzy, gcc-internal-format -#| msgid "argument 3 must be in the range [0, 15]" +#, gcc-internal-format msgid "argument 3 must be in the range 0 to 12" -msgstr "argument 3 måste vara i intervallet [0, 15]" +msgstr "argument 3 måste vara i intervallet 0 till 12" #: config/rs6000/rs6000-call.c:10590 -#, fuzzy, gcc-internal-format -#| msgid "argument 3 must be in the range [0, 15]" +#, gcc-internal-format msgid "argument 3 must be a constant in the range 0 to 7" -msgstr "argument 3 måste vara i intervallet [0, 15]" +msgstr "argument 3 måste vara en konstant i intervallet 0 till 7" #: config/rs6000/rs6000-call.c:10660 #, gcc-internal-format @@ -38679,10 +38639,9 @@ msgid "third argument to %qs must be [0, 12]" msgstr "tredje argumentet till %qs måste vara [0, 12]" #: config/rs6000/rs6000-call.c:11269 -#, fuzzy, gcc-internal-format -#| msgid "argument 3 must be in the range [0, 15]" +#, gcc-internal-format msgid "Second argument of %qs must be in the range [0, 3]." -msgstr "argument 3 måste vara i intervallet [0, 15]" +msgstr "Andra argumentet till %qs måste vara i intervallet [0, 3]." #: config/rs6000/rs6000-call.c:11487 #, gcc-internal-format @@ -39129,10 +39088,9 @@ msgid "multiple fast interrupt routines seen: %qE and %qE" msgstr "flera snabba avbrottsrutiner sedda: %qE och %qE" #: config/rx/rx.c:2480 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "unrecognized control register number: %d - using %<psw%>" +#, gcc-internal-format, gfc-internal-format msgid "invalid control register for mvtc : %d - using 'psw'" -msgstr "okänt styrregisternummer: %d – använder %<psw%>" +msgstr "felaktigt styrregister för mvtc : %d – använder ”psw”" #: config/rx/rx.c:2602 #, gcc-internal-format @@ -39938,22 +39896,19 @@ msgid "prototype for %q+D follows non-prototype definition" msgstr "prototyp för %q+D följer på en icke-prototypdefinition" #: c/c-decl.c:1919 -#, fuzzy, gcc-internal-format -#| msgid "previous definition of %qD here" +#, gcc-internal-format msgid "previous definition of %q+D with type %qT" -msgstr "tidigare definition av %qD här" +msgstr "tidigare definition av %qD med typen %qT" #: c/c-decl.c:1923 -#, fuzzy, gcc-internal-format -#| msgid "previous implicit declaration of %q+D was here" +#, gcc-internal-format msgid "previous implicit declaration of %q+D with type %qT" -msgstr "tidigare implicit deklaration av %q+D var här" +msgstr "tidigare implicit deklaration av %q+D med typen %qT" #: c/c-decl.c:1927 -#, fuzzy, gcc-internal-format -#| msgid "previous declaration of %qD here" +#, gcc-internal-format msgid "previous declaration of %q+D with type %qT" -msgstr "tidigare deklaration av %qD här" +msgstr "tidigare deklaration av %q+D med typen %qT" #: c/c-decl.c:1967 #, gcc-internal-format @@ -40001,10 +39956,9 @@ msgid "conflicting types for %q+D" msgstr "motstridiga typer på %q+D" #: c/c-decl.c:2093 c/c-decl.c:2130 -#, fuzzy, gcc-internal-format -#| msgid "conflicting types for %q+D" +#, gcc-internal-format msgid "conflicting types for %q+D; have %qT" -msgstr "motstridiga typer på %q+D" +msgstr "motstridiga typer för %q+D; har %qT" #: c/c-decl.c:2110 #, gcc-internal-format @@ -40158,10 +40112,9 @@ msgid "implicit declaration of function %qE" msgstr "implicit deklaration av funktionen %qE" #: c/c-decl.c:3402 -#, fuzzy, gcc-internal-format -#| msgid "include %qs or provide a declaration of %qD" +#, gcc-internal-format msgid "include %qs or provide a declaration of %qE" -msgstr "inkludera %qs eller ge en deklaration av %qD" +msgstr "inkludera %qs eller ge en deklaration av %qE" #: c/c-decl.c:3672 #, gcc-internal-format @@ -40269,10 +40222,9 @@ msgid "%qE attribute applied to %qD with void return type" msgstr "attributet %qE tillämpat på %qD med returtypen void" #: c/c-decl.c:4430 -#, fuzzy, gcc-internal-format -#| msgid "%qE attribute can only be applied to functions or to class or enumeration types" +#, gcc-internal-format msgid "%qE attribute can only be applied to functions or to structure, union or enumeration types" -msgstr "attributet %qE kan bara användas på funktioner eller på klass- eller uppräkningstyper" +msgstr "attributet %qE kan bara användas på funktioner eller på struktur-, union- eller uppräkningstyper" #: c/c-decl.c:4695 #, gcc-internal-format @@ -41280,10 +41232,9 @@ msgid "traditional C rejects ISO C style function definitions" msgstr "traditionell C tillåter inte ISO C:s stil av funktionsdefinitioner" #: c/c-decl.c:9674 -#, fuzzy, gcc-internal-format -#| msgid "ISO C does not support decimal floating-point before C2X" +#, gcc-internal-format msgid "ISO C does not support omitting parameter names in function definitions before C2X" -msgstr "ISO C stödjer inte decimala flyttal före C2X" +msgstr "ISO C stödjer inte att utelämna parameternamn i funktionsdefinitioner före C2X" #: c/c-decl.c:9714 c/c-decl.c:9718 #, gcc-internal-format @@ -42532,22 +42483,19 @@ msgid "no type or storage class may be specified here," msgstr "ingen typ eller lagringsklass kan anges här," #: c/c-parser.c:11957 cp/parser.c:34642 -#, fuzzy, gcc-internal-format -#| msgid "unknown property attribute" +#, gcc-internal-format msgid "empty property attribute list" -msgstr "okänt egenskapsattribut" +msgstr "tom egenskapsattributslista" #: c/c-parser.c:11971 cp/parser.c:34655 -#, fuzzy, gcc-internal-format -#| msgid "unknown property attribute" +#, gcc-internal-format msgid "missing property attribute" -msgstr "okänt egenskapsattribut" +msgstr "saknat egenskapsattribut" #: c/c-parser.c:12010 -#, fuzzy, gcc-internal-format -#| msgid "unknown property attribute" +#, gcc-internal-format msgid "unknown property attribute %<%s%s%>" -msgstr "okänt egenskapsattribut" +msgstr "okänt egenskapsattribut %<%s%s%>" #: c/c-parser.c:12013 cp/parser.c:34692 #, gcc-internal-format @@ -42555,22 +42503,19 @@ msgid "unknown property attribute" msgstr "okänt egenskapsattribut" #: c/c-parser.c:12022 cp/parser.c:34701 -#, fuzzy, gcc-internal-format -#| msgid "repeated %<@%> before Objective-C string" +#, gcc-internal-format msgid "expected %<=%> after Objective-C %qE" -msgstr "upprepat %<@%> före Objective-C++-sträng" +msgstr "%<=%> förväntades efter Objective-C %qE" #: c/c-parser.c:12033 cp/parser.c:34715 -#, fuzzy, gcc-internal-format -#| msgid "expected trait selector name" +#, gcc-internal-format msgid "expected %qE selector name" -msgstr "trait-väljarnamn förväntades" +msgstr "%qE-väljarnamn förväntades" #: c/c-parser.c:12049 cp/parser.c:34734 -#, fuzzy, gcc-internal-format -#| msgid "setter name must terminate with %<:%>" +#, gcc-internal-format msgid "setter method names must terminate with %<:%>" -msgstr "setter-namn måste avslutas med %<:%>" +msgstr "setter-metodnamn måste avslutas med %<:%>" #: c/c-parser.c:12263 cp/parser.c:44770 #, gcc-internal-format @@ -42716,10 +42661,9 @@ msgid "%<priority%> value must be non-negative" msgstr "%<priority%>-värdet måste vara positivt" #: c/c-parser.c:13891 cp/parser.c:36297 -#, fuzzy, gcc-internal-format -#| msgid "expected constant integer expression" +#, gcc-internal-format msgid "expected constant integer expression with valid sync-hint value" -msgstr "konstant heltalsuttryck förväntades" +msgstr "konstant heltalsuttryck med giltigt sync-hint-värde förväntades" #: c/c-parser.c:13931 cp/parser.c:36339 #, gcc-internal-format @@ -42997,10 +42941,9 @@ msgid "%<#pragma acc update%> must contain at least one %<device%> or %<host%> o msgstr "%<#pragma acc update%> måste innehålla åtminstone en %<device%>- eller %<host%>- eller %<self%>-klausul" #: c/c-parser.c:17328 cp/parser.c:38672 -#, fuzzy, gcc-internal-format -#| msgid "expected %<operator%>" +#, gcc-internal-format msgid "expected %<allocator%>" -msgstr "%<operator%> förväntades" +msgstr "%<allocator%> förväntades" #: c/c-parser.c:17344 #, gcc-internal-format @@ -43008,16 +42951,14 @@ msgid "%<allocator%> clause allocator expression has type %qT rather than %<omp_ msgstr "%<allocator%>-klausulens allokeraruttryck har typen %qT istället för %<omp_allocator_handle_t%>" #: c/c-parser.c:17359 cp/parser.c:38687 -#, fuzzy, gcc-internal-format -#| msgid "%<#pragma vtable%> no longer supported" +#, gcc-internal-format msgid "%<#pragma omp allocate%> not yet supported" -msgstr "%<#pragma vtable%> stödjs inte längre" +msgstr "%<#pragma omp allocate%> stödjs inte ännu" #: c/c-parser.c:17458 cp/parser.c:38780 -#, fuzzy, gcc-internal-format -#| msgid "expected %<depend%>, %<destroy%> or %<update%> clause" +#, gcc-internal-format msgid "expected %<read%>, %<write%>, %<update%>, or %<capture%> clause" -msgstr "%<depend%>-, %<destroy%>- eller %<update%>-klausul förväntades" +msgstr "%<read%>-, %<write%>-, %<update%>- eller %<capture%>-klausul förväntades" #: c/c-parser.c:17480 cp/parser.c:38802 #, gcc-internal-format @@ -43924,28 +43865,24 @@ msgid "type mismatch in conditional expression" msgstr "typer stämmer inte i villkorsuttryck" #: c/c-typeck.c:5534 -#, fuzzy, gcc-internal-format -#| msgid "ignoring return value of %qD, declared with attribute %<nodiscard%>%s" +#, gcc-internal-format msgid "ignoring return value of %qD, declared with attribute %<nodiscard%>: %E" -msgstr "ignorerar returvärdet av %qD, deklarerad med attributet %<nodiscard%>%s" +msgstr "ignorerar returvärdet av %qD, deklarerad med attributet %<nodiscard%>: %E" #: c/c-typeck.c:5538 -#, fuzzy, gcc-internal-format -#| msgid "ignoring return value of %qD, declared with attribute %<nodiscard%>%s" +#, gcc-internal-format msgid "ignoring return value of %qD, declared with attribute %<nodiscard%>" -msgstr "ignorerar returvärdet av %qD, deklarerad med attributet %<nodiscard%>%s" +msgstr "ignorerar returvärdet av %qD, deklarerad med attributet %<nodiscard%>" #: c/c-typeck.c:5556 -#, fuzzy, gcc-internal-format -#| msgid "ignoring returned value of type %qT, declared with attribute %<nodiscard%>%s" +#, gcc-internal-format msgid "ignoring return value of type %qT, declared with attribute %<nodiscard%>: %E" -msgstr "ignorerar returnerat värde av typen %qT, deklarerat med attributet %<nodiscard%>%s" +msgstr "ignorerar returnerat värde av typen %qT, deklarerat med attributet %<nodiscard%>: %E" #: c/c-typeck.c:5561 -#, fuzzy, gcc-internal-format -#| msgid "ignoring returned value of type %qT, declared with attribute %<nodiscard%>%s" +#, gcc-internal-format msgid "ignoring return value of type %qT, declared with attribute %<nodiscard%>" -msgstr "ignorerar returnerat värde av typen %qT, deklarerat med attributet %<nodiscard%>%s" +msgstr "ignorerar returnerat värde av typen %qT, deklarerat med attributet %<nodiscard%>" #: c/c-typeck.c:5570 cp/cvt.c:1098 #, gcc-internal-format @@ -44203,28 +44140,24 @@ msgid "return type might be a candidate for a format attribute" msgstr "returtypen kan vara en kandidat för ett formatattribut" #: c/c-typeck.c:7245 -#, fuzzy, gcc-internal-format -#| msgid "passing argument %d of %qE from incompatible pointer type" +#, gcc-internal-format msgid "passing argument %d of %qE from incompatible scalar storage order" -msgstr "skickar argument %d till %qE från inkompatibel pekartyp" +msgstr "skickar argument %d till %qE från inkompatibel skalär lagringsordning" #: c/c-typeck.c:7250 -#, fuzzy, gcc-internal-format -#| msgid "assignment to %qT from pointer to %qD with incompatible type %qT" +#, gcc-internal-format msgid "assignment to %qT from pointer type %qT with incompatible scalar storage order" -msgstr "tilldelning till %qT från pekare till %qD med inkompatibel typ %qT" +msgstr "tilldelning till %qT från pekartypen %qT med inkompatibel skalär lagringsordning" #: c/c-typeck.c:7255 -#, fuzzy, gcc-internal-format -#| msgid "initialization of %qT from pointer to %qD with incompatible type %qT" +#, gcc-internal-format msgid "initialization of %qT from pointer type %qT with incompatible scalar storage order" -msgstr "initiering av %qT från pekare till %qD med inkompatibel typ %qT" +msgstr "initiering av %qT från pekartypen %qT med inkompatibel skalär lagringsordning" #: c/c-typeck.c:7260 -#, fuzzy, gcc-internal-format -#| msgid "returning %qT from a function with incompatible return type %qT" +#, gcc-internal-format msgid "returning %qT from pointer type with incompatible scalar storage order %qT" -msgstr "returnerar %qT från en funktion med inkompatibel returtyp %qT" +msgstr "returnerar %qT från en pekartyp med inkompatibel skalär lagringsordning %qT" #: c/c-typeck.c:7309 #, gcc-internal-format @@ -44846,10 +44779,9 @@ msgid "high bound %qE above array section size in %qs clause" msgstr "övre gräns %qE ovanför storleken på vektorsektionen i en %qs-klausul" #: c/c-typeck.c:13295 cp/semantics.c:5144 -#, fuzzy, gcc-internal-format -#| msgid "for unknown bound array type length expression must be specified" +#, gcc-internal-format msgid "for array function parameter length expression must be specified" -msgstr "för en vektor med okänd gräns måste ett längduttryck anges" +msgstr "för en vektorfunktionsparameter måste ett längduttryck anges" #: c/c-typeck.c:13299 cp/semantics.c:5148 #, gcc-internal-format @@ -45066,16 +44998,14 @@ msgid "%qE appears more than once in %<nontemporal%> clauses" msgstr "%qE förekommer mer än en gång i %<nontemporal%>-klausuler" #: c/c-typeck.c:14432 cp/semantics.c:7283 -#, fuzzy, gcc-internal-format -#| msgid "%qE is not a variable in %<aligned%> clause" +#, gcc-internal-format msgid "%qE is not a variable in %<allocate%> clause" -msgstr "%qE är inte en variabel i %<aligned%>-klausul" +msgstr "%qE är inte en variabel i %<allocate%>-klausul" #: c/c-typeck.c:14438 -#, fuzzy, gcc-internal-format -#| msgid "%qE appears more than once in %<aligned%> clauses" +#, gcc-internal-format msgid "%qE appears more than once in %<allocate%> clauses" -msgstr "%qE förekommer mer än en gång i %<aligned%>-klausuler" +msgstr "%qE förekommer mer än en gång i %<allocate%>-klausuler" #: c/c-typeck.c:14507 cp/semantics.c:7369 #, gcc-internal-format @@ -45161,10 +45091,9 @@ msgid "%<order%> clause must not be used together with %<ordered%>" msgstr "en %<order%>-klausul får inte användas tillsammans med %<ordered%>" #: c/c-typeck.c:14951 cp/semantics.c:7456 -#, fuzzy, gcc-internal-format -#| msgid "too many %qs clauses" +#, gcc-internal-format msgid "too many %qs clauses on a task construct" -msgstr "för många %qs-klausuler" +msgstr "för många %qs-klausuler på en task-konstruktion" #: c/c-typeck.c:15044 cp/semantics.c:8096 #, gcc-internal-format @@ -45208,10 +45137,9 @@ msgid "%<nogroup%> clause must not be used together with %<reduction%> clause" msgstr "en %<nogroup%>-klausul får inte användas tillsammans med en %<reduction%>-klausul" #: c/c-typeck.c:15263 cp/semantics.c:8281 -#, fuzzy, gcc-internal-format -#| msgid "%<order%> clause must not be used together with %<ordered%>" +#, gcc-internal-format msgid "%<detach%> clause must not be used together with %<mergeable%> clause" -msgstr "en %<order%>-klausul får inte användas tillsammans med %<ordered%>" +msgstr "en %<detach%>-klausul får inte användas tillsammans med en %<mergeable%>-klausul" #: c/c-typeck.c:15281 cp/semantics.c:8456 #, gcc-internal-format @@ -45703,16 +45631,14 @@ msgid "enumerated mismatch in conditional expression: %qT vs %qT" msgstr "uppräkningsmissmatch i villkorsuttryck: %qT kontra %qT" #: cp/call.c:5706 -#, fuzzy, gcc-internal-format -#| msgid "conditional expression between distinct pointer types %qT and %qT lacks a cast" +#, gcc-internal-format msgid "conditional expression between enumeration type %qT and floating-point type %qT is deprecated" -msgstr "villkorsuttryck mellan olika pekartyper %qT och %qT saknar en typkonvertering" +msgstr "villkorsuttryck mellan uppräkningstypen %qT och flyttalstypen %qT bör undvikas" #: cp/call.c:5711 -#, fuzzy, gcc-internal-format -#| msgid "conditional expression between distinct pointer types %qT and %qT lacks a cast" +#, gcc-internal-format msgid "conditional expression between floating-point type %qT and enumeration type %qT is deprecated" -msgstr "villkorsuttryck mellan olika pekartyper %qT och %qT saknar en typkonvertering" +msgstr "villkorsuttryck mellan flyttalstypen %qT och uppräkningstypen %qT bör undvikas" #: cp/call.c:5727 #, gcc-internal-format @@ -45830,10 +45756,9 @@ msgid " initializing argument %P of %qD" msgstr " initierar argument %P till %qD" #: cp/call.c:7379 -#, fuzzy, gcc-internal-format -#| msgid "conversions to arrays of unknown bound are only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "conversions to arrays of unknown bound are only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "konverteringar till vektorer med okänd gräns är endast tillgängliga med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "konverteringar till vektorer med okänd gräns är endast tillgängliga med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/call.c:7429 #, gcc-internal-format @@ -46849,10 +46774,9 @@ msgid "dynamic type %qT of its operand does not have a base class of type %qT" msgstr "den dynamiska typen %qT av sin operand har inte en basklass av typen %qT" #: cp/constexpr.c:2014 -#, fuzzy, gcc-internal-format -#| msgid "virtual table of type %qD violates one definition rule" +#, gcc-internal-format msgid "virtual table pointer is used uninitialized" -msgstr "den virtuella tabellen för typen %qD bryter mot endefinitionsregeln" +msgstr "den virtuella tabellpekaren används oinitierad" #: cp/constexpr.c:2045 cp/constexpr.c:2077 #, gcc-internal-format @@ -46885,10 +46809,9 @@ msgid "array deallocation of object allocated with non-array allocation" msgstr "vektordeallokering av objekt allokerade med icke-vektor-allokering" #: cp/constexpr.c:2366 cp/constexpr.c:2388 -#, fuzzy, gcc-internal-format -#| msgid "allocated here" +#, gcc-internal-format msgid "allocation performed here" -msgstr "allokerad här" +msgstr "allokeringen utförd här" #: cp/constexpr.c:2384 #, gcc-internal-format @@ -47007,70 +46930,59 @@ msgid "accessing %qD member instead of initialized %qD member in constant expres msgstr "använder medlem %qD istället för initierad medlem %qD i ett konstant uttryck" #: cp/constexpr.c:3983 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT is a union type" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT är en uniontyp" #: cp/constexpr.c:3986 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT contains a union type" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT innehåller en uniontyp" #: cp/constexpr.c:3997 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT is a pointer type" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT är en pekartyp" #: cp/constexpr.c:4000 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT contains a pointer type" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT innehåller en pekartyp" #: cp/constexpr.c:4011 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT is a reference type" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT är en referenstyp" #: cp/constexpr.c:4014 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT contains a reference type" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT innehåller en referenstyp" #: cp/constexpr.c:4025 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT is a pointer to member type" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT är en pekare-till-medlem-typ" #: cp/constexpr.c:4029 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT contains a pointer to member type" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT innehåller en pekare-till-medlem-typ" #: cp/constexpr.c:4040 -#, fuzzy, gcc-internal-format -#| msgid "%<typeid%> is not a constant expression because %qE is of polymorphic type" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT is volatile" -msgstr "%<typeid%> är inte ett konstant uttryck eftersom %qE har polymorf typ" +msgstr "%qs är inte ett konstant uttryck eftersom %qT är volatil" #: cp/constexpr.c:4043 -#, fuzzy, gcc-internal-format -#| msgid "%qE is not a constant expression because it refers to mutable subobjects of %qT" +#, gcc-internal-format msgid "%qs is not a constant expression because %qT contains a volatile subobject" -msgstr "%qE är inte ett konstant uttryck eftersom det har referenser till muterbara delobjekt av %qT" +msgstr "%qs är inte ett konstant uttryck eftersom %qT innehåller ett volatilt delobjekt" #: cp/constexpr.c:4084 -#, fuzzy, gcc-internal-format -#| msgid "%qs is not supported on this target" +#, gcc-internal-format msgid "%qs cannot be constant evaluated on the target" -msgstr "%qs stödjs inte på denna målarkitektur" +msgstr "%qs kan inte inte beräknas konstant på denna målarkitektur" #: cp/constexpr.c:4093 cp/constexpr.c:4103 #, gcc-internal-format @@ -47078,22 +46990,19 @@ msgid "%qs cannot be constant evaluated because the type is too large" msgstr "%qs kan inte vara konstant beräknat eftersom typen är för stor" #: cp/constexpr.c:4123 -#, fuzzy, gcc-internal-format -#| msgid "%qE is not a constant expression because allocated storage has not been deallocated" +#, gcc-internal-format msgid "%qs cannot be constant evaluated because the argument cannot be encoded" -msgstr "%qE är inte ett konstant uttryck eftersom allokerad lagring inte har avallokerats" +msgstr "%qs kan inte beräknas konstant eftersom argumentet inte kan kodas" #: cp/constexpr.c:4147 -#, fuzzy, gcc-internal-format -#| msgid "accessing uninitialized member %qD" +#, gcc-internal-format msgid "%qs accessing uninitialized byte at offset %d" -msgstr "använder oinitierad medlem %qD" +msgstr "%qs använder oinitierad byte vid avståndet %d" #: cp/constexpr.c:4159 -#, fuzzy, gcc-internal-format -#| msgid "%qE is not a constant expression because allocated storage has not been deallocated" +#, gcc-internal-format msgid "%qs cannot be constant evaluated because the argument cannot be interpreted" -msgstr "%qE är inte ett konstant uttryck eftersom allokerad lagring inte har avallokerats" +msgstr "%qs kan inte beräknas konstant eftersom argumentet inte kan tolkas" #: cp/constexpr.c:4882 cp/constexpr.c:6667 #, gcc-internal-format @@ -47186,10 +47095,9 @@ msgid "inline assembly is not a constant expression" msgstr "inline-assembler är inte ett konstant uttryck" #: cp/constexpr.c:5927 -#, fuzzy, gcc-internal-format -#| msgid "only unevaluated inline assembly is allowed in a %<constexpr%> function in C++2a" +#, gcc-internal-format msgid "only unevaluated inline assembly is allowed in a %<constexpr%> function in C++20" -msgstr "endast oevaluerad inline:ad assembler är tillåten i en %<constexpr%>-funktion i C++2a" +msgstr "endast oevaluerad inline:ad assembler är tillåten i en %<constexpr%>-funktion i C++20" #: cp/constexpr.c:5992 #, gcc-internal-format @@ -47242,10 +47150,9 @@ msgid "function concept must be called" msgstr "funktionskoncept måste anropas" #: cp/constexpr.c:6924 -#, fuzzy, gcc-internal-format -#| msgid "size of array %qE is not a constant expression" +#, gcc-internal-format msgid "address of a call to %qs is not a constant expression" -msgstr "storlek på vektorn %qE är inte ett konstant uttryck" +msgstr "adressen för ett anrop av %qs är inte ett konstant uttryck" #: cp/constexpr.c:6943 #, gcc-internal-format @@ -47313,10 +47220,9 @@ msgid "lambda-expression is not a constant expression before C++17" msgstr "lambdauttryck är inte ett konstant uttryck före C++17" #: cp/constexpr.c:8384 -#, fuzzy, gcc-internal-format -#| msgid "virtual functions cannot be %<constexpr%> before C++2a" +#, gcc-internal-format msgid "virtual functions cannot be %<constexpr%> before C++20" -msgstr "virtuella funktioner kan inte %<constexpr%> före C++2a" +msgstr "virtuella funktioner kan inte %<constexpr%> före C++20" #: cp/constexpr.c:8399 #, gcc-internal-format @@ -47359,10 +47265,9 @@ msgid "%<goto%> is not a constant expression" msgstr "%<goto%> är inte ett konstant uttryck" #: cp/constexpr.c:8795 -#, fuzzy, gcc-internal-format -#| msgid "statement is not a constant expression" +#, gcc-internal-format msgid "label definition is not a constant expression" -msgstr "satsen är inte ett konstant uttryck" +msgstr "etiketdefinitionen är inte ett konstant uttryck" # ast = abstract syntax tree #: cp/constexpr.c:8814 @@ -48011,34 +47916,29 @@ msgid "previous specification in %q#D here" msgstr "tidigare specifikation i %q#D här" #: cp/decl.c:2025 -#, fuzzy, gcc-internal-format -#| msgid "declaration of %q#D conflicts with built-in declaration %q#D" +#, gcc-internal-format msgid "declaration %qD conflicts with builtin" -msgstr "deklaration av %q#D står i konflikt med inbyggd deklaration %q#D" +msgstr "deklarationen %qD står i konflikt med inbyggd" #: cp/decl.c:2033 -#, fuzzy, gcc-internal-format -#| msgid "declaration of %q#D conflicts with built-in declaration %q#D" +#, gcc-internal-format msgid "declaration %qD conflicts with import" -msgstr "deklaration av %q#D står i konflikt med inbyggd deklaration %q#D" +msgstr "deklaration %qD står i konflikt med import" #: cp/decl.c:2034 -#, fuzzy, gcc-internal-format -#| msgid "%qT first declared as %qs here" +#, gcc-internal-format msgid "import declared %q#D here" -msgstr "%qT är först deklarerad som %qs här" +msgstr "importdeklarerad %q#D här" #: cp/decl.c:2042 -#, fuzzy, gcc-internal-format -#| msgid "conflicting declaration %q#D" +#, gcc-internal-format msgid "conflicting exporting declaration %qD" -msgstr "motstridande deklaration av %q#D" +msgstr "motstridande exporterande deklaration av %qD" #: cp/decl.c:2043 -#, fuzzy, gcc-internal-format -#| msgid "previous declaration of %qD here" +#, gcc-internal-format msgid "previous declaration %q#D here" -msgstr "tidigare deklaration av %qD här" +msgstr "tidigare deklaration %q#D här" #: cp/decl.c:2068 #, gcc-internal-format @@ -48061,10 +47961,9 @@ msgid "redundant redeclaration of %qD in same scope" msgstr "överflödig omdeklaration av %qD i samma definitionsområde" #: cp/decl.c:2144 -#, fuzzy, gcc-internal-format -#| msgid "deleted definition of %qD" +#, gcc-internal-format msgid "deleted definition of %qD is not first declaration" -msgstr "borttagen definition av %qD" +msgstr "borttagen definition av %qD är inte första deklarationen" #. From [temp.expl.spec]: #. @@ -48111,10 +48010,9 @@ msgid "%q+D redeclared inline without %<gnu_inline%> attribute" msgstr "%q+D omdeklarerad inline utan attributet %<gnu_inline%>" #: cp/decl.c:3080 cp/decl.c:3138 -#, fuzzy, gcc-internal-format -#| msgid "deduction guide %qD must be declared at namespace scope" +#, gcc-internal-format msgid "deduction guide %q+D redeclared" -msgstr "härledningsguiden %qD måste deklareras med namnrymdsräckvidd" +msgstr "härledningsguiden %q+D omdeklarerad" #: cp/decl.c:3087 #, gcc-internal-format @@ -48608,10 +48506,9 @@ msgid "missing braces around initializer for %qT" msgstr "klamrar saknas runt initierare för %qT" #: cp/decl.c:6779 -#, fuzzy, gcc-internal-format -#| msgid "structured binding refers to incomplete type %qT" +#, gcc-internal-format msgid "structured binding has incomplete type %qT" -msgstr "strukturerad bindning refererar till ofullständig typ %qT" +msgstr "strukturerad bindning har en ofullständig typ %qT" #: cp/decl.c:6793 #, gcc-internal-format @@ -49495,10 +49392,9 @@ msgid "member %qD cannot be declared both %<virtual%> and %<static%>" msgstr "medlem %qD kan inte deklareras både %<virtual%> och %<static%>" #: cp/decl.c:11866 -#, fuzzy, gcc-internal-format -#| msgid "member %qD can be declared both %<virtual%> and %<constexpr%> only in %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "member %qD can be declared both %<virtual%> and %<constexpr%> only in %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "medlem %qD kan deklareras både %<virtual%> och %<constexpr%> endast i %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "medlem %qD kan deklareras både %<virtual%> och %<constexpr%> endast i %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/decl.c:11879 #, gcc-internal-format @@ -49532,10 +49428,9 @@ msgid "structured binding declaration cannot be %qs" msgstr "deklaration av strukturerad bindning får inte vara %qs" #: cp/decl.c:11957 cp/decl.c:11979 -#, fuzzy, gcc-internal-format -#| msgid "structured binding declaration can be %qs only in %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "structured binding declaration can be %qs only in %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "strukturerade bindningsdeklarationer kan vara %qs endast i %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "strukturerade bindningsdeklarationer kan vara %qs endast i %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/decl.c:11967 #, gcc-internal-format @@ -49603,10 +49498,9 @@ msgid "unnecessary parentheses in declaration of %qs" msgstr "onödiga parenteser i deklaration av %qs" #: cp/decl.c:12203 -#, fuzzy, gcc-internal-format -#| msgid "Expected left parenthesis" +#, gcc-internal-format msgid "remove parentheses" -msgstr "Vänsterparentes förväntades" +msgstr "ta port parenteser" #: cp/decl.c:12252 #, gcc-internal-format @@ -49694,10 +49588,9 @@ msgid "%qT as type rather than plain %<decltype(auto)%>" msgstr "%qT som en typ snarare en enkel %<decltype(auto)%>" #: cp/decl.c:12418 cp/pt.c:29493 -#, fuzzy, gcc-internal-format -#| msgid "destructors may not be cv-qualified" +#, gcc-internal-format msgid "%<decltype(auto)%> cannot be cv-qualified" -msgstr "destruerare får inte vara cv-kvalificerade" +msgstr "%<decltype(auto)%> får inte vara cv-kvalificerad" #: cp/decl.c:12450 #, gcc-internal-format @@ -49980,16 +49873,14 @@ msgid "cannot declare a parameter with %<decltype(auto)%>" msgstr "det går inte att deklarera en parameter med %<decltype(auto)%>" #: cp/decl.c:13263 -#, fuzzy, gcc-internal-format -#| msgid "%<auto%> parameter not permitted in this context" +#, gcc-internal-format msgid "class template placeholder %qE not permitted in this context" -msgstr "en %<auto%>-parameter är tillåten i detta sammanhang" +msgstr "klassmallplatshållaren %qE är tillåten i detta sammanhang" #: cp/decl.c:13266 -#, fuzzy, gcc-internal-format -#| msgid "%qD is not a function template" +#, gcc-internal-format msgid "use %<auto%> for an abbreviated function template" -msgstr "%qD är inte en funktionsmall" +msgstr "använd %<auto%> för en förkortad funktionsmall" #: cp/decl.c:13271 #, gcc-internal-format @@ -50058,10 +49949,9 @@ msgid "a destructor cannot be %qs" msgstr "en destruerare kan inte vara %qs" #: cp/decl.c:13444 -#, fuzzy, gcc-internal-format -#| msgid "%<constexpr%> destructors only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "%<constexpr%> destructors only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "%<constexpr%>-destruerare är endast tillgängliga med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "%<constexpr%>-destruerare är endast tillgängliga med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/decl.c:13457 #, gcc-internal-format @@ -50284,8 +50174,7 @@ msgid "%qD may not be declared as static" msgstr "%qD får inte deklareras som statisk" #: cp/decl.c:14658 -#, fuzzy, gcc-internal-format -#| msgid "%qD must be a nonstatic member function" +#, gcc-internal-format msgid "%qD must be a non-static member function" msgstr "%qD måste vara en icke-statisk medlemsfunktion" @@ -50476,10 +50365,9 @@ msgid "redeclaration of %qT as a non-template" msgstr "omdeklaration av %qT som en icke-mall" #: cp/decl.c:15241 cp/semantics.c:3266 -#, fuzzy, gcc-internal-format -#| msgid "cannot declare %qD to be a bit-field type" +#, gcc-internal-format msgid "cannot declare %qD in a different module" -msgstr "det går inte att deklarera %qD att vara en bitfältstyp" +msgstr "det går inte att deklarera %qD i en annan modul" #: cp/decl.c:15369 #, gcc-internal-format @@ -50533,10 +50421,9 @@ msgid "different underlying type in enum %q#T" msgstr "olika underliggande typ i enum %q#T" #: cp/decl.c:15618 -#, fuzzy, gcc-internal-format -#| msgid "option %s with different values" +#, gcc-internal-format msgid "cannot define %qD in different module" -msgstr "flaggan %s med olika värden" +msgstr "det går inte att definiera %qD i en annan modul" #: cp/decl.c:15692 #, gcc-internal-format @@ -50608,10 +50495,9 @@ msgid "only plain %<auto%> return type can be deduced to %<void%>" msgstr "endast enkel returtyp %<auto%> kan härledas till %<void%>" #: cp/decl.c:17323 -#, fuzzy, gcc-internal-format -#| msgid "no return statement in function returning non-void" +#, gcc-internal-format msgid "no return statement in %<constexpr%> function returning non-void" -msgstr "ingen retursats i funktion som returnerar icke-void" +msgstr "ingen retursats i %<constexpr%>-funktion som returnerar icke-void" #: cp/decl.c:17505 #, gcc-internal-format @@ -51169,16 +51055,14 @@ msgid "cannot catch type %qT because it involves types of variable size" msgstr "det går inte att fånga typen %qT eftersom typer av variabel storlek är inblandade" #: cp/except.c:982 -#, fuzzy, gcc-internal-format -#| msgid "exception of type %qT will be caught" +#, gcc-internal-format msgid "exception of type %qT will be caught by earlier handler" -msgstr "undantag av typ %qT kommer att fångas" +msgstr "undantag av typ %qT kommer att fångas av en tidigare hanterare" #: cp/except.c:984 -#, fuzzy, gcc-internal-format -#| msgid "forming type of %qs" +#, gcc-internal-format msgid "for type %qT" -msgstr "formar typen av %qs" +msgstr "för typen %qT" #: cp/except.c:1013 #, gcc-internal-format @@ -51508,10 +51392,9 @@ msgid "placement new constructing an object of type %<%T [%wu]%> and size %qwu i msgstr "placerande new konstruerar ett objekt av typen %<%T [%wu]%> och storleken %qwu i en region av typen %qT och storleken %qwi" #: cp/init.c:2636 -#, fuzzy, gcc-internal-format -#| msgid "placement new constructing an object of type %<%T [%wu]%> and size %qwu in a region of type %qT and size %qwi" +#, gcc-internal-format msgid "placement new constructing an object of type %<%T [%wu]%> and size %qwu in a region of type %qT and size at most %qwu" -msgstr "placerande new konstruerar ett objekt av typen %<%T [%wu]%> och storleken %qwu i en region av typen %qT och storleken %qwi" +msgstr "placerande new konstruerar ett objekt av typen %<%T [%wu]%> och storleken %qwu i en region av typen %qT och storleken högst %qwu" #: cp/init.c:2646 #, gcc-internal-format @@ -51519,10 +51402,9 @@ msgid "placement new constructing an array of objects of type %qT and size %qwu msgstr "placerande new konstruerar en vektor av objekt av typen %qT och storleken %qwu i en region av typen %qT och storleken %qwi" #: cp/init.c:2649 -#, fuzzy, gcc-internal-format -#| msgid "placement new constructing an array of objects of type %qT and size %qwu in a region of type %qT and size %qwi" +#, gcc-internal-format msgid "placement new constructing an array of objects of type %qT and size %qwu in a region of type %qT and size at most %qwu" -msgstr "placerande new konstruerar en vektor av objekt av typen %qT och storleken %qwu i en region av typen %qT och storleken %qwi" +msgstr "placerande new konstruerar en vektor av objekt av typen %qT och storleken %qwu i en region av typen %qT och storleken högst %qwu" #: cp/init.c:2658 #, gcc-internal-format @@ -51530,22 +51412,19 @@ msgid "placement new constructing an object of type %qT and size %qwu in a regio msgstr "placerande new konstruerar ett objekt av typen %qT och storleken %qwu i en region av typen %qT och storleken %qwi" #: cp/init.c:2661 -#, fuzzy, gcc-internal-format -#| msgid "placement new constructing an object of type %qT and size %qwu in a region of type %qT and size %qwi" +#, gcc-internal-format msgid "placement new constructing an object of type %qT and size %qwu in a region of type %qT and size at most %qwu" -msgstr "placerande new konstruerar ett objekt av typen %qT och storleken %qwu i en region av typen %qT och storleken %qwi" +msgstr "placerande new konstruerar ett objekt av typen %qT och storleken %qwu i en region av typen %qT och storleken högst %qwu" #: cp/init.c:2678 -#, fuzzy, gcc-internal-format -#| msgid "at offset %s to object %qD declared here" +#, gcc-internal-format msgid "at offset %wi from %qD declared here" -msgstr "vid avstånd %s till objekt %qD deklarerat här" +msgstr "vid avståndet %wi från %qD deklarerad här" #: cp/init.c:2682 -#, fuzzy, gcc-internal-format -#| msgid "at offset %s to object %qD declared here" +#, gcc-internal-format msgid "at offset [%wi, %wi] from %qD declared here" -msgstr "vid avstånd %s till objekt %qD deklarerat här" +msgstr "vid avståndet [%wi, %wi] från %qD deklarerad här" #: cp/init.c:2897 #, gcc-internal-format @@ -51858,10 +51737,9 @@ msgid "forming type of %qs" msgstr "formar typen av %qs" #: cp/method.c:1140 -#, fuzzy, gcc-internal-format -#| msgid "defaulted %qD only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "defaulted %qD only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "standarddefinierad %qD är endast tillgänglig med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "standarddefinierad %qD är endast tillgänglig med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/method.c:1155 #, gcc-internal-format @@ -51914,10 +51792,9 @@ msgid "cannot default compare anonymous union member" msgstr "det går inte att standardjämföra en anonym unions medlem" #: cp/method.c:1436 -#, fuzzy, gcc-internal-format -#| msgid "cannot default compare reference member %qD" +#, gcc-internal-format msgid "cannot default compare flexible array member" -msgstr "det går inte att standardjämföra referensmedlemmen %qD" +msgstr "det går inte att standardjämföra en flexibel vektormedlem" #. Return type is auto, suggest changing it. #: cp/method.c:1487 @@ -51931,10 +51808,9 @@ msgid "three-way comparison of %qD has type %qT, not a comparison category type" msgstr "trevägsjämförelsen av %qD har typen %qT, inte en jämförelsekategorityp" #: cp/method.c:1522 -#, fuzzy, gcc-internal-format -#| msgid "three-way comparison of %qD has type %qT, not a comparison category type" +#, gcc-internal-format msgid "three-way comparison of %qD has type %qT, which does not convert to %qT" -msgstr "trevägsjämförelsen av %qD har typen %qT, inte en jämförelsekategorityp" +msgstr "trevägsjämförelsen av %qD har typen %qT, som inte konverterar till %qT" #: cp/method.c:1779 #, gcc-internal-format @@ -52097,10 +51973,9 @@ msgid "%s %s %p %d" msgstr "%s %s %p %d" #: cp/name-lookup.c:4962 -#, fuzzy, gcc-internal-format -#| msgid "%qD does not have integral type" +#, gcc-internal-format msgid "%q#D does not have external linkage" -msgstr "%qD har inte heltalstyp" +msgstr "%q#D har inte extern länkning" #: cp/name-lookup.c:4964 cp/parser.c:11125 cp/parser.c:11135 #: cp/semantics.c:3718 cp/semantics.c:3730 @@ -52109,10 +51984,9 @@ msgid "%q#D declared here" msgstr "%q#D är deklarerad här" #: cp/name-lookup.c:5706 -#, fuzzy, gcc-internal-format -#| msgid "%<%T::%D%> names destructor" +#, gcc-internal-format msgid "%<%T%s%D%> names destructor" -msgstr "%<%T::%D%> namnger en destruerare" +msgstr "%<%T%s%D%> namnger en destruerare" #: cp/name-lookup.c:5722 #, gcc-internal-format @@ -52120,22 +51994,19 @@ msgid "using-declaration for non-member at class scope" msgstr "using-deklaration för icke-medlem vid klassräckvidd" #: cp/name-lookup.c:5730 -#, fuzzy, gcc-internal-format -#| msgid "%<asm%> in %<constexpr%> function only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "%<using%> with enumeration scope %q#T only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "%<asm%> i en %<constexpr%>-funktion är endast tillgängligt med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "%<using%> med uppräkningsräckvidd %qT är endast tillgängligt med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/name-lookup.c:5746 cp/pt.c:18183 -#, fuzzy, gcc-internal-format -#| msgid "%qE is not a class, namespace, or enumeration" +#, gcc-internal-format msgid "%qT is not a class, namespace, or enumeration" -msgstr "%qE är inte en klass, namnrymd eller uppräkning" +msgstr "%qT är inte en klass, namnrymd eller uppräkning" #: cp/name-lookup.c:5756 -#, fuzzy, gcc-internal-format -#| msgid "non-member-template declaration of %qD" +#, gcc-internal-format msgid "non-member using-declaration names constructor of %qT" -msgstr "icke-medlemsmalldeklaration av %qD" +msgstr "icke-medlems using-deklaration namnger konstrueraren för %qT" #: cp/name-lookup.c:5767 cp/name-lookup.c:5825 #, gcc-internal-format @@ -52143,22 +52014,19 @@ msgid "using-declaration for member at non-class scope" msgstr "using-deklaration för medlem vid icke-klass-räckvidd" #: cp/name-lookup.c:5790 -#, fuzzy, gcc-internal-format -#| msgid "type %qT is not a direct base of %qT" +#, gcc-internal-format msgid "%qT is not a direct base of %qT" -msgstr "typ %qT är inte en direkt bas till %qT" +msgstr "%qT är inte en direkt bas till %qT" #: cp/name-lookup.c:5835 -#, fuzzy, gcc-internal-format -#| msgid "did you mean to use logical not (%<!%>)?" +#, gcc-internal-format msgid "did you mean %<using enum %T::%D%>?" -msgstr "tänkte du använda logiskt icke (%<!%>)?" +msgstr "menade du %<using enum %T::%D%>?" #: cp/name-lookup.c:5847 -#, fuzzy, gcc-internal-format -#| msgid "%qD has not been declared in %qE" +#, gcc-internal-format msgid "%qD has not been declared in %qD" -msgstr "%qD har inte deklarerats i %qE" +msgstr "%qD har inte deklarerats i %qD" #: cp/name-lookup.c:5861 #, gcc-internal-format @@ -52299,16 +52167,14 @@ msgid "%qD defined here" msgstr "%qD definierades här" #: cp/name-lookup.c:9063 -#, fuzzy, gcc-internal-format -#| msgid "%qD conflicts with used function" +#, gcc-internal-format msgid "%s namespace %qD conflicts with reachable definition" -msgstr "%qD står i konflikt med använd funktion" +msgstr "%s-namnrymd %qD står i konflikt med nåbar definition" #: cp/name-lookup.c:9065 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "previous definition here" +#, gcc-internal-format, gfc-internal-format msgid "reachable %s definition here" -msgstr "tidigare definition här" +msgstr "nåbar %s-definition här" #: cp/name-lookup.c:9145 #, gcc-internal-format @@ -52552,16 +52418,14 @@ msgid "C++11 %<noexcept%> only available with %<-std=c++11%> or %<-std=gnu++11%> msgstr "C++11 %<noexcept%> är endast tillgängligt med %<-std=c++11%> eller %<-std=gnu++11%>" #: cp/parser.c:3473 -#, fuzzy, gcc-internal-format -#| msgid "%<__GIMPLE%> only valid with %<-fgimple%>" +#, gcc-internal-format msgid "%qE only available with %<-fmodules-ts%>" -msgstr "%<__GIMPLE%> är endast giltigt med %<-fgimple%>" +msgstr "%qE är endast tillgängligt med %<-fmodules-ts%>" #: cp/parser.c:3475 -#, fuzzy, gcc-internal-format -#| msgid "%qE is an unrecognized format function type" +#, gcc-internal-format msgid "%qE was not recognized as a module control-line" -msgstr "%qE är en okänd funktionsformattyp" +msgstr "%qE kändes inte igen som en modulstyrrad" #: cp/parser.c:3481 #, gcc-internal-format @@ -52569,22 +52433,19 @@ msgid "C++11 %<thread_local%> only available with %<-std=c++11%> or %<-std=gnu++ msgstr "C++11 %<thread_local%> är endast tillgängligt med %<-std=c++11%> eller %<-std=gnu++11%>" #: cp/parser.c:3484 -#, fuzzy, gcc-internal-format -#| msgid "C++20 %<constinit%> only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "C++20 %<constinit%> only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "C++20 %<constinit%> är endast tillgängligt med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "C++20 %<constinit%> är endast tillgängligt med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/parser.c:3487 -#, fuzzy, gcc-internal-format -#| msgid "%<concept%> only available with %<-std=c++2a%> or %<-fconcepts%>" +#, gcc-internal-format msgid "%<concept%> only available with %<-std=c++20%> or %<-fconcepts%>" -msgstr "%<concept%> är endast tillgängligt med %<-std=c++2a%> eller %<-fconcepts%>" +msgstr "%<concept%> är endast tillgängligt med %<-std=c++20%> eller %<-fconcepts%>" #: cp/parser.c:3490 cp/parser.c:28654 -#, fuzzy, gcc-internal-format -#| msgid "%<requires%> only available with %<-std=c++2a%> or %<-fconcepts%>" +#, gcc-internal-format msgid "%<requires%> only available with %<-std=c++20%> or %<-fconcepts%>" -msgstr "%<requires%> är endast tillgängligt med %<-std=c++2a%> eller %<-fconcepts%>" +msgstr "%<requires%> är endast tillgängligt med %<-std=c++20%> eller %<-fconcepts%>" #: cp/parser.c:3512 #, gcc-internal-format @@ -52792,10 +52653,9 @@ msgid "%<~auto%> only available with %<-std=c++14%> or %<-std=gnu++14%>" msgstr "%<~auto%> är endast tillgängligt med %<-std=c++14%> eller %<-std=gnu++14%>" #: cp/parser.c:6334 -#, fuzzy, gcc-internal-format -#| msgid "keyword %<template%> not allowed in declarator-id" +#, gcc-internal-format msgid "template-id not allowed for destructor" -msgstr "nyckelordet %<template%> är inte tillåtet i deklarerar-id" +msgstr "mall-id är inte tillåtet för destruerare" #: cp/parser.c:6443 #, gcc-internal-format @@ -52978,16 +52838,14 @@ msgid "types may not be defined within %<__builtin_offsetof%>" msgstr "typer får inte definieras i %<__builtin_offsetof%>" #: cp/parser.c:10790 -#, fuzzy, gcc-internal-format -#| msgid "lambda-expression in unevaluated context only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "lambda-expression in unevaluated context only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "lambdauttryck i oberäknade sammanhang är endast tillgängliga med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "lambdauttryck i oberäknade sammanhang är endast tillgängliga med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/parser.c:10800 -#, fuzzy, gcc-internal-format -#| msgid "lambda-expression in template-argument only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "lambda-expression in template-argument only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "lambdauttryck i mallargument är endast tillgängliga med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "lambdauttryck i mallargument är endast tillgängliga med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/parser.c:10952 #, gcc-internal-format @@ -53020,10 +52878,9 @@ msgid "%<this%> cannot be captured by reference" msgstr "det går inte att fånga %<this%> via referens" #: cp/parser.c:11048 -#, fuzzy, gcc-internal-format -#| msgid "pack init-capture only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "pack init-capture only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "pack init-fångst är endast tillgängliga med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "pack init-fångst är endast tillgängliga med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/parser.c:11059 #, gcc-internal-format @@ -53071,10 +52928,9 @@ msgid "lambda templates are only available with %<-std=c++14%> or %<-std=gnu++14 msgstr "lambdamallar är endast tillgängliga med %<-std=c++14%> eller %<-std=gnu++14%>" #: cp/parser.c:11266 -#, fuzzy, gcc-internal-format -#| msgid "lambda templates are only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "lambda templates are only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "lambdamallar är endast tillgängliga med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "lambdamallar är endast tillgängliga med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/parser.c:11334 #, gcc-internal-format @@ -53169,10 +53025,9 @@ msgid "use non-reference type %qT to make the copy explicit or %qT to prevent co msgstr "användning av icke-referens-typ %qT för att göra kopieringen explicit eller %qT för att förhindra kopiering" #: cp/parser.c:12904 -#, fuzzy, gcc-internal-format -#| msgid "Loop variable at %C cannot be a coarray" +#, gcc-internal-format msgid "loop variable %qD creates a copy from type %qT" -msgstr "Slingvariabel vid %C får inte vara en co-vektor" +msgstr "slingvariabeln %qD skapar en kopia från typen %qT" #: cp/parser.c:12909 #, gcc-internal-format @@ -53195,10 +53050,9 @@ msgid "expected iteration-statement" msgstr "iterationssats förväntades" #: cp/parser.c:13325 -#, fuzzy, gcc-internal-format -#| msgid "range-based %<for%> loops with initializer only available with %<-std=c++2a%> or %<-std=gnu++2a%>" +#, gcc-internal-format msgid "range-based %<for%> loops with initializer only available with %<-std=c++20%> or %<-std=gnu++20%>" -msgstr "intervallbaserade %<for%>-slingor med initierare är endast tillgängliga med %<-std=c++2a%> eller %<-std=gnu++2a%>" +msgstr "intervallbaserade %<for%>-slingor med initierare är endast tillgängliga med %<-std=c++20%> eller %<-std=gnu++20%>" #: cp/parser.c:13349 #, gcc-internal-format @@ -53222,10 +53076,9 @@ msgid "expected jump-statement" msgstr "hoppsats förväntades" #: cp/parser.c:13678 -#, fuzzy, gcc-internal-format -#| msgid "expected template-name" +#, gcc-internal-format msgid "expected module-name" -msgstr "mallnamn förväntades" +msgstr "modulnamn förväntades" #: cp/parser.c:13732 #, gcc-internal-format diff --git a/gcc/spellcheck.c b/gcc/spellcheck.c index f76e094..c39c507 100644 --- a/gcc/spellcheck.c +++ b/gcc/spellcheck.c @@ -473,7 +473,7 @@ static const char * const test_data[] = { "foo", "food", "boo", - "1234567890123456789012345678901234567890123456789012345678901234567890" + "1234567890123456789012345678901234567890123456789012345678901234567890", "abc", "ac", "ca", diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7ed0052..5e6b536 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,214 @@ +2021-03-16 Christophe Lyon <christophe.lyon@linaro.org> + + PR target/99542 + * gcc.dg/declare-simd.c (fn2): Expect a warning only under lp64. + +2021-03-16 Jason Merrill <jason@redhat.com> + + * g++.dg/cpp2a/nontype-float1.C: New test. + +2021-03-16 Segher Boessenkool <segher@kernel.crashing.org> + + PR target/98092 + PR target/98092 + * gcc.target/powerpc/pr98092.c: New. + +2021-03-16 Jakub Jelinek <jakub@redhat.com> + + PR target/99600 + * gcc.target/i386/pr99600.c: New test. + +2021-03-16 Martin Liska <mliska@suse.cz> + Jason Merrill <jason@redhat.com> + + PR c++/99108 + * g++.target/i386/pr99108.C: New test. + +2021-03-16 Martin Liska <mliska@suse.cz> + + PR target/99592 + * gcc.target/arm/pr99592.c: New test. + +2021-03-16 Ilya Leoshkevich <iii@linux.ibm.com> + + * gcc.target/s390/vector/long-double-asm-fprvrmem.c: New test. + +2021-03-16 Nathan Sidwell <nathan@acm.org> + + PR c++/99496 + * g++.dg/modules/pr99496_a.H: New. + * g++.dg/modules/pr99496_b.C: New. + +2021-03-16 Jakub Jelinek <jakub@redhat.com> + + PR target/99563 + * gcc.target/i386/avx-pr99563.c: New test. + +2021-03-16 Jakub Jelinek <jakub@redhat.com> + + PR target/99542 + * gcc.dg/gomp/pr99542.c: New test. + * gcc.dg/gomp/pr59669-2.c (bar): Don't expect a warning on aarch64. + * gcc.dg/gomp/simd-clones-2.c (setArray): Likewise. + * g++.dg/vect/simd-clone-7.cc (bar): Likewise. + * g++.dg/gomp/declare-simd-1.C (f37): Expect a different warning + on aarch64. + * gcc.dg/declare-simd.c (fn2): Expect a new warning on aarch64. + +2021-03-15 Jakub Jelinek <jakub@redhat.com> + + PR c++/99601 + * g++.dg/modules/builtin-3_a.C: Fix target selector syntax errors. + * g++.dg/modules/builtin-3_b.C: Likewise. + +2021-03-15 Nathan Sidwell <nathan@acm.org> + + PR c++/99601 + * g++.dg/modules/builtin-3_a.C: Fix lp64 x86 detection. + * g++.dg/modules/builtin-3_b.C: Fix lp64 x86 detection. + +2021-03-15 Iain Sandoe <iain@sandoe.co.uk> + + PR c++/99047 + * g++.dg/coroutines/pr99047.C: New test. + +2021-03-15 Iain Sandoe <iain@sandoe.co.uk> + + PR c++/98704 + * g++.dg/coroutines/torture/pr98704.C: New test. + +2021-03-15 Iain Sandoe <iain@sandoe.co.uk> + + PR c++/98480 + * g++.dg/coroutines/pr98480.C: New test. + * g++.dg/coroutines/torture/co-await-24-for-init.C: New test. + * g++.dg/coroutines/torture/co-await-25-for-condition.C: New test. + * g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C: New test. + +2021-03-15 Iain Sandoe <iain@sandoe.co.uk> + + PR c++/96749 + * g++.dg/coroutines/pr96749-1.C: New test. + * g++.dg/coroutines/pr96749-2.C: New test. + +2021-03-15 Richard Biener <rguenther@suse.de> + + PR tree-optimization/98834 + * g++.dg/opt/pr98834.C: New testcase. + +2021-03-15 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/99345 + * gfortran.dg/do_check_16.f90: New test. + * gfortran.dg/do_check_17.f90: New test. + +2021-03-15 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/99545 + * gfortran.dg/pr99545.f90: New test. + +2021-03-15 David Edelsohn <dje.gcc@gmail.com> + + * gcc.target/powerpc/pr99492.c: Fix typo. + +2021-03-14 Harald Anlauf <anlauf@gmx.de> + Paul Thomas <pault@gcc.gnu.org> + + * gfortran.dg/pr99112.f90: New test. + +2021-03-13 Martin Sebor <msebor@redhat.com> + + PR tree-optimization/99489 + * gcc.dg/Wstringop-truncation-9.c: New test. + +2021-03-13 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/99125 + * gfortran.dg/alloc_deferred_comp_1.f90: New test. + +2021-03-13 Jakub Jelinek <jakub@redhat.com> + + PR tree-optimization/99544 + * gcc.dg/gomp/pr99544.c: New test. + +2021-03-12 Nathan Sidwell <nathan@acm.org> + + PR c++/99238 + * g++.dg/modules/pr99238.h: New. + * g++.dg/modules/pr99238_a.H: New. + * g++.dg/modules/pr99238_b.H: New. + +2021-03-12 Tobias Burnus <tobias@codesourcery.com> + + PR fortran/99514 + * gfortran.dg/gomp/threadprivate-1.f90: New test. + +2021-03-12 Jakub Jelinek <jakub@redhat.com> + + PR target/99321 + * gcc.target/i386/avx512vl-pr99321-2.c: New test. + +2021-03-12 Jakub Jelinek <jakub@redhat.com> + + PR c++/99507 + * g++.dg/cpp2a/consteval19.C: New test. + +2021-03-11 David Malcolm <dmalcolm@redhat.com> + + PR analyzer/96374 + * gcc.dg/analyzer/dot-output.c: Add -fdump-analyzer-feasibility + to options. + * gcc.dg/analyzer/feasibility-1.c (test_6): Remove xfail. + (test_7): New. + * gcc.dg/analyzer/pr93355-localealias-feasibility-2.c: Remove xfail. + * gcc.dg/analyzer/pr93355-localealias-feasibility-3.c: Remove xfails. + * gcc.dg/analyzer/pr93355-localealias-feasibility.c: Remove + -fno-analyzer-feasibility from options. + * gcc.dg/analyzer/pr93355-localealias.c: Likewise. + * gcc.dg/analyzer/unknown-fns-4.c: Remove xfail. + +2021-03-11 Nathan Sidwell <nathan@acm.org> + + PR c++/99248 + * g++.dg/modules/pr99248.h: New. + * g++.dg/modules/pr99248_a.H: New. + * g++.dg/modules/pr99248_b.H: New. + +2021-03-11 Nathan Sidwell <nathan@acm.org> + + PR c++/99528 + * g++.dg/modules/pr99528.h: New. + * g++.dg/modules/pr99528_a.H: New. + * g++.dg/modules/pr99528_b.H: New. + * g++.dg/modules/pr99528_c.C: New. + +2021-03-11 Richard Biener <rguenther@suse.de> + + PR testsuite/98245 + * gcc.dg/vect/bb-slp-46.c: Scan for the scalar compute + instead of verifying the total number of adds. + +2021-03-11 Richard Biener <rguenther@suse.de> + + PR testsuite/97494 + * gcc.dg/vect/pr97428.c: XFAIL on !vect_hw_misalign. + +2021-03-11 Richard Biener <rguenther@suse.de> + + PR testsuite/97494 + * gcc.dg/vect/vect-complex-5.c: XFAIL on !vect_hw_misalign. + +2021-03-11 Richard Biener <rguenther@suse.de> + + PR testsuite/97494 + * gcc.dg/vect/slp-21.c: Adjust for powerpc64*-*-*. + +2021-03-11 Jakub Jelinek <jakub@redhat.com> + + PR ipa/99517 + * gcc.target/i386/avx2-pr99517-1.c: New test. + * gcc.target/i386/avx2-pr99517-2.c: New test. + 2021-03-10 David Edelsohn <dje.gcc@gmail.com> PR target/99492 diff --git a/gcc/testsuite/c-c++-common/asan/memcmp-1.c b/gcc/testsuite/c-c++-common/asan/memcmp-1.c index 0403ad7..0d08c09 100644 --- a/gcc/testsuite/c-c++-common/asan/memcmp-1.c +++ b/gcc/testsuite/c-c++-common/asan/memcmp-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-fno-builtin-memcmp" } */ +/* { dg-additional-options "-D_FORTIFY_SOURCE=0 -gdwarf-3" { target *-*-darwin* } } */ /* { dg-shouldfail "asan" } */ #include <string.h> @@ -16,5 +17,8 @@ main () } /* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow.*(\n|\r\n|\r)" } */ -/* { dg-output " #\[1-9\] 0x\[0-9a-f\]+ +(in _*(interceptor_|wrap_|)memcmp|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ -/* { dg-output " #\[2-9\] 0x\[0-9a-f\]+ +(in _*main|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output " #\[1-9\] 0x\[0-9a-f\]+ +(in _*(interceptor_|wrap_|)memcmp|\[(\])\[^\n\r]*(\n|\r\n|\r)" { target { ! *-*-darwin* } } } */ +/* { dg-output " #\[2-9\] 0x\[0-9a-f\]+ +(in _*main|\[(\])\[^\n\r]*(\n|\r\n|\r)" { target { ! *-*-darwin* } } } */ + +/* { dg-output " #\[0-9\] 0x\[0-9a-f\]+ +(in MemcmpInterceptorCommon|\[(\])\[^\n\r]*(\n|\r\n|\r)" { target *-*-darwin* } } */ +/* { dg-output " #\[1-9\] 0x\[0-9a-f\]+ +(in wrap_(memcmp|bcmp)|\[(\])\[^\n\r]*(\n|\r\n|\r)" { target *-*-darwin* } } */ diff --git a/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c b/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c index a9c9b18..3d43916 100644 --- a/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c +++ b/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-fno-builtin-malloc -fno-builtin-strncpy" } */ +/* { dg-additional-options "-D_FORTIFY_SOURCE=0 -gdwarf-3" { target *-*-darwin* } } */ /* { dg-shouldfail "asan" } */ #include <string.h> @@ -14,8 +15,8 @@ int main(int argc, char **argv) { /* { dg-output "WRITE of size \[0-9\]* at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output " #0 0x\[0-9a-f\]+ +(in _*(interceptor_|wrap_|)strncpy|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ -/* { dg-output " #1 0x\[0-9a-f\]+ +(in _*main (\[^\n\r]*strncpy-overflow-1.c:11|\[^\n\r]*:0|\[^\n\r]*\\+0x\[0-9a-z\]*)|\[(\]).*(\n|\r\n|\r)" } */ +/* { dg-output " #1 0x\[0-9a-f\]+ +(in _*main (\[^\n\r]*strncpy-overflow-1.c:12|\[^\n\r]*:0|\[^\n\r]*\\+0x\[0-9a-z\]*)|\[(\]).*(\n|\r\n|\r)" } */ /* { dg-output "\[^\n\r]*0x\[0-9a-f\]+ is located 0 bytes to the right of 9-byte region\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output "\[^\n\r]*allocated by thread T0 here:\[^\n\r]*(\n|\r\n|\r)" } */ /* { dg-output " #0 0x\[0-9a-f\]+ +(in _*(interceptor_|wrap_|)malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ -/* { dg-output " #1 0x\[0-9a-f\]+ +(in _*main (\[^\n\r]*strncpy-overflow-1.c:10|\[^\n\r]*:0|\[^\n\r]*\\+0x\[0-9a-z\]*)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ +/* { dg-output " #1 0x\[0-9a-f\]+ +(in _*main (\[^\n\r]*strncpy-overflow-1.c:11|\[^\n\r]*:0|\[^\n\r]*\\+0x\[0-9a-z\]*)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */ diff --git a/gcc/testsuite/g++.dg/coroutines/pr96749-1.C b/gcc/testsuite/g++.dg/coroutines/pr96749-1.C new file mode 100644 index 0000000..941a64e --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/pr96749-1.C @@ -0,0 +1,42 @@ +// { dg-additional-options "-Wall" } + +#include <coroutine> + +template <typename _Tp> struct promise; +template <typename _Tp> struct task { + using promise_type = promise<_Tp>; + bool await_ready() noexcept { return false; } + void await_suspend(std::coroutine_handle<> awaiter) noexcept { m_a = awaiter; } + auto await_resume() { return _Tp(); } + std::coroutine_handle<> m_a; +}; + +template <typename _Tp> struct promise { + auto get_return_object() noexcept { return task<_Tp>(); } + auto initial_suspend() noexcept { return std::suspend_always(); } + auto final_suspend() noexcept { return std::suspend_always(); } + void return_value(_Tp value) noexcept { m_v = value; } + void unhandled_exception() noexcept {} + _Tp m_v; +}; + +task<int> test_coro(void) { + int r = 0; +#if 1 + // this code causes the unexpected warning below + r += co_await task<int>(); +#else + // this code causes no warning + auto b = co_await task<int>(); + r += b; +#endif + co_return r; + // test1.cpp: In function ‘task<int> test_coro(int)’: + // test1.cpp:36:1: warning: statement has no effect [-Wunused-value] + // 36 | } + // | ^ +} + +int main(void) { + return 0; +} diff --git a/gcc/testsuite/g++.dg/coroutines/pr96749-2.C b/gcc/testsuite/g++.dg/coroutines/pr96749-2.C new file mode 100644 index 0000000..43052b5 --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/pr96749-2.C @@ -0,0 +1,37 @@ +// { dg-additional-options "-Wall" } + +#include <coroutine> + +#if 1 +// with a struct, GCC emits "statement has no effect" +struct S {}; +#else +// no warning with built-in types +using S = int; +#endif + +S Func1(int); + +struct C { + auto operator co_await() { + struct Awaitable final { + bool await_ready() const { return true; } + std::coroutine_handle<> await_suspend(std::coroutine_handle<>) { return {}; } + int await_resume() { return 42; } + }; + return Awaitable{}; + } +}; + +struct Task { + struct promise_type { + auto initial_suspend() { return std::suspend_always{}; } + auto final_suspend() noexcept { return std::suspend_always{}; } + void get_return_object() {} + void unhandled_exception() {} + }; +}; + +Task Func2() { + Func1(co_await C()); +} diff --git a/gcc/testsuite/g++.dg/coroutines/pr98480.C b/gcc/testsuite/g++.dg/coroutines/pr98480.C new file mode 100644 index 0000000..2d87261 --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/pr98480.C @@ -0,0 +1,20 @@ +#include <coroutine> + +struct future { + struct promise_type { + void return_value(int) {} + auto initial_suspend() { return std::suspend_never{}; } + auto final_suspend() noexcept { return std::suspend_never{}; } + void unhandled_exception() {} + future get_return_object() { return {}; } + }; + bool await_ready() { return true; } + void await_suspend(std::coroutine_handle<>) {} + int await_resume() { return 0; } +}; + +future co_foo() { + for( int i = 0; i < co_await future{}; ++i ); + // ICE -------------^ + co_return 0; +} diff --git a/gcc/testsuite/g++.dg/coroutines/pr99047.C b/gcc/testsuite/g++.dg/coroutines/pr99047.C new file mode 100644 index 0000000..124633a --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/pr99047.C @@ -0,0 +1,83 @@ +#include <optional> +#include <coroutine> + +template <typename T> +struct [[nodiscard]] task { + struct promise_type { + std::suspend_always initial_suspend() { + return {}; + } + auto final_suspend() noexcept { + struct awaiter { +#if 1 + std::false_type await_ready() noexcept { + return {}; + } +#else + bool await_ready() noexcept { + return false; + } +#endif + std::coroutine_handle<> await_suspend(std::coroutine_handle<>) noexcept { + return next; + } + void await_resume() noexcept { + } + std::coroutine_handle<> next; + }; + return awaiter{next}; + } + + void unhandled_exception() noexcept { + std::terminate(); + } + auto get_return_object() { + return task(this); + } + auto coro() { + return std::coroutine_handle<promise_type>::from_promise(*this); + } + void return_value(T val) { + result.emplace(std::move(val)); + } + + std::coroutine_handle<> next; + std::optional<T> result; + }; + + task(task&& source) : p(std::exchange(source.p, nullptr)) {} + explicit task(promise_type* p) : p(p) {} + ~task() { + if (p) + p->coro().destroy(); + } + + bool await_ready() noexcept { + return p->coro().done(); + } + std::coroutine_handle<> await_suspend(std::coroutine_handle<> next) noexcept { + p->next = next; + return p->coro(); + } + const T& await_resume() const& noexcept { + return *p->result; + } + + promise_type* p; +}; + +task<int> five() { + co_return 5; +} + +task<int> six() { + co_return co_await five() + 1; +} + + +int main() { + auto task = six(); + task.p->next = std::noop_coroutine(); + task.p->coro().resume(); + return *task.p->result; +} diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-24-for-init.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-24-for-init.C new file mode 100644 index 0000000..1bf2f6d --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-24-for-init.C @@ -0,0 +1,101 @@ +// { dg-do run } + +// Test co-await in while condition. + +#include "../coro.h" + +// boiler-plate for tests of codegen +#include "../coro1-ret-int-yield-int.h" + +/* An awaiter that suspends always and returns an int as the + await_resume output. */ +struct IntAwaiter { + int v; + IntAwaiter (int _v) : v(_v) {} + bool await_ready () { return false; } + void await_suspend (coro::coroutine_handle<>) {} + int await_resume () { return v; } +}; + +struct coro1 +coro_a (bool t) +{ + int accum = 0; + for (int x = co_await IntAwaiter (3); x < 10; x++) + accum += x; + + co_return accum; +} + +struct coro1 +coro_b (bool t) +{ + int accum = 0; + int x; + for (x = co_await IntAwaiter (3); x < 10; x++) + accum += x; + + co_return accum; +} + +struct coro1 +coro_c (bool t) +{ + int accum = 0; + int x = 3; + for (co_await IntAwaiter (3); x < 10; x++) + accum += x; + + co_return accum; +} + +void +check_a_coro (struct coro1& x) +{ + if (x.handle.done()) + { + PRINT ("check_a_coro: apparently done when we shouldn't be..."); + abort (); + } + + PRINT ("check_a_coro: resume initial suspend"); + x.handle.resume(); + + // will be false - so no yield expected. + PRINT ("check_a_coro: resume for init"); + x.handle.resume(); + + int y = x.handle.promise().get_value(); + if ( y != 42 ) + { + PRINTF ("check_a_coro: apparently wrong value : %d\n", y); + abort (); + } + + if (!x.handle.done()) + { + PRINT ("check_a_coro: apparently not done..."); + abort (); + } +} + +int main () +{ + { + struct coro1 x = coro_a (false); + check_a_coro (x); + } + + { + struct coro1 x = coro_b (false); + check_a_coro (x); + } + + { + struct coro1 x = coro_c (false); + check_a_coro (x); + } + + PRINT ("main: done"); + return 0; +} diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-25-for-condition.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-25-for-condition.C new file mode 100644 index 0000000..2208e34 --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-25-for-condition.C @@ -0,0 +1,94 @@ +// { dg-do run } + +// Test co-await in while condition. + +#include "../coro.h" + +// boiler-plate for tests of codegen +#include "../coro1-ret-int-yield-int.h" + +/* An awaiter that suspends always and returns an int as the + await_resume output. */ +struct IntAwaiter { + int v; + IntAwaiter (int _v) : v(_v) {} + bool await_ready () { return false; } + void await_suspend (coro::coroutine_handle<>) {} + int await_resume () { return v; } +}; + +struct coro1 +coro_a (bool t) +{ + int accum = 0; + for (int x = 3; x < co_await IntAwaiter (10); x++) + accum += x; + + co_return accum; +} + +/* An awaiter that suspends always and returns an int as the + await_resume output. */ +struct TenAwaiter { + int v; + TenAwaiter (int _v) : v(_v) {} + bool await_ready () { return false; } + void await_suspend (coro::coroutine_handle<>) {} + bool await_resume () { return v < 10; } +}; + +struct coro1 +coro_b (bool t) +{ + int accum = 0; + for (int x = 3; co_await TenAwaiter (x); x++) + accum += x; + + co_return accum; +} + +void +check_a_coro (struct coro1& x) +{ + if (x.handle.done()) + { + PRINT ("check_a_coro: apparently done when we shouldn't be..."); + abort (); + } + + PRINT ("check_a_coro: resume initial suspend"); + x.handle.resume(); + + // will be false - so no yield expected. + PRINT ("check_a_coro: resume loops"); + while (!x.handle.done()) + x.handle.resume(); + + int y = x.handle.promise().get_value(); + if ( y != 42 ) + { + PRINTF ("check_a_coro: apparently wrong value : %d\n", y); + abort (); + } + + if (!x.handle.done()) + { + PRINT ("check_a_coro: apparently not done..."); + abort (); + } +} + +int main () +{ + { + struct coro1 x = coro_a (false); + check_a_coro (x); + } + { + struct coro1 x = coro_b (false); + check_a_coro (x); + } + + PRINT ("main: returning"); + return 0; +} diff --git a/gcc/testsuite/g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C b/gcc/testsuite/g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C new file mode 100644 index 0000000..f361fb5 --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/torture/co-await-26-for-iteration-expr.C @@ -0,0 +1,87 @@ +// { dg-do run } + +// Test co-await in while condition. + +#include "../coro.h" + +// boiler-plate for tests of codegen +#include "../coro1-ret-int-yield-int.h" + +/* An awaiter that suspends always and returns an int as the + await_resume output. */ +struct IntAwaiter { + int v; + IntAwaiter (int _v) : v(_v) {} + bool await_ready () { return false; } + void await_suspend (coro::coroutine_handle<>) {} + int await_resume () { return v; } +}; + +coro1 +coro_a (bool t) +{ + int accum = 0; + for (int x = 3; x < 10; x += co_await IntAwaiter (1)) + accum += x; + + co_return accum; +} + +coro1 +coro_b (bool t) +{ + int accum = 0; + for (int x = 3; x < 10; x += co_await IntAwaiter (1)) + { + if (x & 1) + continue; + accum += x; + } + + co_return accum; +} + +void check_a_coro (coro1& x, int expected_answer) +{ + if (x.handle.done()) + { + PRINT ("check_a_coro: apparently done when we shouldn't be..."); + abort (); + } + + PRINT ("check_a_coro: resume initial suspend"); + x.handle.resume(); + + // will be false - so no yield expected. + PRINT ("check_a_coro: resume for init"); + while (!x.handle.done()) + x.handle.resume(); + + int y = x.handle.promise().get_value(); + if ( y != expected_answer ) + { + PRINTF ("check_a_coro: apparently wrong value : %d\n", y); + abort (); + } + + if (!x.handle.done()) + { + PRINT ("check_a_coro: apparently not done..."); + abort (); + } +} + +int main () +{ + { + coro1 x = coro_a (false); + check_a_coro (x, 42); + } + { + coro1 x = coro_b (false); + check_a_coro (x, 18); + } + + PRINT ("main: done"); + return 0; +} diff --git a/gcc/testsuite/g++.dg/coroutines/torture/pr98704.C b/gcc/testsuite/g++.dg/coroutines/torture/pr98704.C new file mode 100644 index 0000000..15db250 --- /dev/null +++ b/gcc/testsuite/g++.dg/coroutines/torture/pr98704.C @@ -0,0 +1,91 @@ +// { dg-do run } +#include "../coro.h" + +#include <stdexcept> + +int frame_live = 0; +int promise_live = 0; +int task_live = 0; + +struct Task +{ + struct promise_type; + using handle = std::coroutine_handle<promise_type>; + + struct promise_type + { + promise_type () { promise_live++; PRINT ("promise_type ()"); } + ~promise_type () { promise_live--; PRINT ("~promise_type ()"); } + void* operator new(size_t sz) { + PRINT("operator new()"); + frame_live++; + return ::operator new(sz); + } + void operator delete(void* p, size_t sz) { + PRINT("operator delete"); + frame_live--; + return ::operator delete(p, sz); + } + + Task get_return_object() { return handle::from_promise(*this); } + auto initial_suspend() noexcept { return std::suspend_always{}; } + auto final_suspend() noexcept { return std::suspend_always{}; } + void return_void() noexcept {} + + auto yield_value(int x) noexcept + { + PRINTF ("yield_value(%d)\n", x); + return std::suspend_always{}; + } + + void unhandled_exception() + { + PRINT ("unhandled_exception()"); + throw; + } + }; + + Task(handle h) : coro(h) { task_live++; PRINT ("Task(handle h)"); } + ~Task() { task_live--; PRINT ("~Task()"); if (coro) coro.destroy(); } + + handle coro; +}; + +Task myco() +{ + co_yield 42; + throw std::out_of_range("TEST EXCEPTION"); +} + +int main() +{ + { + Task task = myco(); + PRINT ("START"); + try { + PRINTF ("done #0 = %d\n", task.coro.done()); + if (task.coro.done()) + abort(); + task.coro.resume(); // will yield 42 + PRINTF ("done #1 = %d\n", task.coro.done()); + if (task.coro.done()) + abort(); + task.coro.resume(); // will throw exception + PRINT ("should not be reached"); + abort (); + } + catch (const std::exception&) { + PRINTF ("done exc = %d\n", task.coro.done()); + if (!task.coro.done()) + abort(); + } + if (!task.coro.done()) + abort(); + } // should cause cause the destroy () to run. + if (task_live || promise_live || frame_live) + { + PRINTF ("task_live = %d, promise_live = %d, frame_live = %d\n", + task_live, promise_live, frame_live); + abort (); + } +} diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval19.C b/gcc/testsuite/g++.dg/cpp2a/consteval19.C new file mode 100644 index 0000000..d742f59 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/consteval19.C @@ -0,0 +1,6 @@ +// PR c++/99507 +// { dg-do compile { target c++20 } } + +constexpr int i{0}; +consteval const int &iref () { return i; } +const int *a{&iref ()}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-float1.C b/gcc/testsuite/g++.dg/cpp2a/nontype-float1.C new file mode 100644 index 0000000..4fafac1 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-float1.C @@ -0,0 +1,12 @@ +// { dg-do compile { target c++20 } } + +#include <cmath> + +template<auto> class MyClass { }; + +static_assert(__is_same(MyClass<NAN>, MyClass<NAN>)); + +constexpr auto mynan = NAN; +static_assert(__is_same(MyClass<mynan>, MyClass<mynan>)); + +static_assert(__is_same(MyClass<NAN>, MyClass<mynan>)); diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-1.C b/gcc/testsuite/g++.dg/gomp/declare-simd-1.C index dcffaec..00996b6 100644 --- a/gcc/testsuite/g++.dg/gomp/declare-simd-1.C +++ b/gcc/testsuite/g++.dg/gomp/declare-simd-1.C @@ -287,7 +287,7 @@ struct D int f37 (int a); int e; }; -// { dg-warning "GCC does not currently support simdlen 16 for type 'int'" "" { target aarch64*-*-* } .-3 } +// { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target aarch64*-*-* } .-3 } void f38 (D &d) diff --git a/gcc/testsuite/g++.dg/modules/builtin-3_a.C b/gcc/testsuite/g++.dg/modules/builtin-3_a.C index ad30ccf..fb7da61 100644 --- a/gcc/testsuite/g++.dg/modules/builtin-3_a.C +++ b/gcc/testsuite/g++.dg/modules/builtin-3_a.C @@ -30,8 +30,8 @@ export inline int count (int a, ...) // The implementation details of va_list's are target-specific. // Usually one of two patterns though // { dg-final { scan-lang-dump-not { Cluster members:\n \[0\]=decl declaration '::__builtin_va_list'\n \[1\]=binding '::__builtin_va_list'\n} module { target i?86-*-linux* x86_64-*-linux* } } } -// { dg-final { scan-lang-dump {Wrote GMF:-[0-9]* type_decl:'::__builtin_va_list'@builtins} module { target x86_64-*-linux* } } } -// { dg-final { scan-lang-dump {Writing:-[0-9]*'s named merge key \(decl\) type_decl:'::__builtin_va_list'} module { target x86_64-*-linux* } } } +// { dg-final { scan-lang-dump {Wrote GMF:-[0-9]* type_decl:'::__builtin_va_list'@builtins} module { target { { x86_64-*-linux* i?86-*-linux* } && lp64 } } } } +// { dg-final { scan-lang-dump {Writing:-[0-9]*'s named merge key \(decl\) type_decl:'::__builtin_va_list'} module { target { { x86_64-*-linux* i?86-*-linux* } && lp64 } } } } // { dg-final { scan-lang-dump {Writing:-1's named merge key \(decl\) type_decl:'::__gnuc_va_list'} module { target i?86-*-linux* *-*-darwin* } } } // { dg-final { scan-lang-dump {Wrote GMF:-3 type_decl:'::__gnuc_va_list'@builtins} module { target i?86-*-linux* *-*-darwin* } } } diff --git a/gcc/testsuite/g++.dg/modules/builtin-3_b.C b/gcc/testsuite/g++.dg/modules/builtin-3_b.C index 93489bd..e0e6306 100644 --- a/gcc/testsuite/g++.dg/modules/builtin-3_b.C +++ b/gcc/testsuite/g++.dg/modules/builtin-3_b.C @@ -8,6 +8,6 @@ int main () } // { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) function_decl:'::__builtin_strlen'} module } } -// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) type_decl:'::__builtin_va_list'} module { target { x86_64-*-linux* } } } } +// { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(matched\) type_decl:'::__builtin_va_list'} module { target { { x86_64-*-linux* i?86-*-linux* } && lp64 } } } } // { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(new\) type_decl:'::va_list'} module } } // { dg-final { scan-lang-dump {Read:-[0-9]*'s named merge key \(new\) type_decl:'::__gnuc_va_list'} module } } diff --git a/gcc/testsuite/g++.dg/modules/pr99238.h b/gcc/testsuite/g++.dg/modules/pr99238.h new file mode 100644 index 0000000..312641f --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/pr99238.h @@ -0,0 +1 @@ +struct tm; diff --git a/gcc/testsuite/g++.dg/modules/pr99238_a.H b/gcc/testsuite/g++.dg/modules/pr99238_a.H new file mode 100644 index 0000000..b594c09 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/pr99238_a.H @@ -0,0 +1,4 @@ +// PR 99238 ICE with using decl +// { dg-additional-options -fmodule-header } +// { dg-module-cmi {} } +#include "pr99238.h" diff --git a/gcc/testsuite/g++.dg/modules/pr99238_b.H b/gcc/testsuite/g++.dg/modules/pr99238_b.H new file mode 100644 index 0000000..070ee36 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/pr99238_b.H @@ -0,0 +1,8 @@ +// { dg-additional-options -fmodule-header } +// { dg-module-cmi {} } +#include "pr99238.h" +import "pr99238_a.H"; +namespace std +{ + using ::tm; +} diff --git a/gcc/testsuite/g++.dg/modules/pr99496_a.H b/gcc/testsuite/g++.dg/modules/pr99496_a.H new file mode 100644 index 0000000..71b77fb --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/pr99496_a.H @@ -0,0 +1,17 @@ +// PR 99496 different types with same canonical +// (requires spec hasher to be a constant, so we get collisions) +// { dg-additional-options -fmodule-header } +// { dg-module-cmi {} } + +template<typename...> using __void_t = void; + +template<typename _Tp, typename = void> +struct __is_referenceable +{ }; + +template<typename _Tp> +struct __is_referenceable<_Tp, __void_t<_Tp&>> +{ }; + +template<typename _Tp, bool = __is_referenceable<_Tp>::value> +struct __is_copy_constructible_impl; diff --git a/gcc/testsuite/g++.dg/modules/pr99496_b.C b/gcc/testsuite/g++.dg/modules/pr99496_b.C new file mode 100644 index 0000000..57b71d1 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/pr99496_b.C @@ -0,0 +1,3 @@ +// { dg-additional-options {-fmodules-ts -fno-module-lazy} } + +import "pr99496_a.H"; diff --git a/gcc/testsuite/g++.dg/opt/pr98834.C b/gcc/testsuite/g++.dg/opt/pr98834.C new file mode 100644 index 0000000..fafd322 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr98834.C @@ -0,0 +1,71 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target c++17 } */ +/* { dg-options "-O2 -fdump-tree-fre3" } */ + +struct _Base +{ + int _M_data = 0; +}; + +struct _Wrapper : _Base +{ + _Wrapper(int) {} + + bool _M_is_constprop() { return __builtin_constant_p(_M_data); } +}; + +struct _Impl +{ + _Wrapper _S_multiplies(_Wrapper __x, _Wrapper __y) + { + if (__x._M_is_constprop() || __y._M_is_constprop()) + return __y; + return 0; + } +}; + +struct _TupleData +{ + _Wrapper first; + int second; +}; + +struct _Tuple : _TupleData +{ + template <typename _Fp> + _Tuple _M_apply_per_chunk(_Fp __fun, _Tuple __y) + { + return {__fun(first, __y.first), second}; + } +}; + +struct _ImplFixed +{ + static _Tuple _S_multiplies(_Tuple __x, _Tuple __y) + { + return __x._M_apply_per_chunk( + []( auto __xx, auto __yy) { + return _Impl()._S_multiplies(__xx, __yy); + }, + __y); + } +}; + +class simd +{ +public: + [[__gnu__::__always_inline__]] friend simd operator*(simd __x, simd __y) + { return _ImplFixed::_S_multiplies(__x._M_data, __y._M_data); } + + simd(_Tuple __init) : _M_data(__init) {} + + _Tuple _M_data; +}; + +int main() +{ + simd({0, 0}) * simd({0, 0}); +} + +/* FRE3 should elide all conditionals in the remaining main. */ +/* { dg-final { scan-tree-dump-times "<bb" 1 "fre3" } } */ diff --git a/gcc/testsuite/g++.dg/vect/simd-clone-7.cc b/gcc/testsuite/g++.dg/vect/simd-clone-7.cc index 527bbd9..fd5751b 100644 --- a/gcc/testsuite/g++.dg/vect/simd-clone-7.cc +++ b/gcc/testsuite/g++.dg/vect/simd-clone-7.cc @@ -8,5 +8,3 @@ bar (float x, float *y, int) { return y[0] + y[1] * x; } -// { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target { { aarch64*-*-* } && lp64 } } .-4 } - diff --git a/gcc/testsuite/g++.target/i386/pr99108.C b/gcc/testsuite/g++.target/i386/pr99108.C new file mode 100644 index 0000000..b1f0a71 --- /dev/null +++ b/gcc/testsuite/g++.target/i386/pr99108.C @@ -0,0 +1,19 @@ +/* PR c++/99108 */ +/* { dg-require-ifunc "" } */ + +struct A { + template <class T> + void foo(T); +}; +template <class T> +void A::foo(T) +{ + int f(void) __attribute__((target("default"))); + int f(void) __attribute__((target("arch=atom"))); + int b = f(); +} +void bar(void) +{ + A c; + c.foo(7); +} diff --git a/gcc/testsuite/gcc.dg/Wstringop-truncation-9.c b/gcc/testsuite/gcc.dg/Wstringop-truncation-9.c new file mode 100644 index 0000000..6361480 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wstringop-truncation-9.c @@ -0,0 +1,41 @@ +/* PR tree-optimization/99489 - ICE calling strncat after strncat + { dg-do compile } + { dg-options "-O2 -Wall" } */ + +// Important -- see pr82429. +char *stpcpy (char *, const char *); + +void fchar (char *d, char c, char *s) +{ + __builtin_strcat (d, s); + __builtin_strncat (d, &c, 1); +} + +void fcstchar (char *d, char *s) +{ + __builtin_strcat (d, s); + + const char c = 'x'; + __builtin_strncat (d, &c, 1); // { dg-warning "-Wstringop-truncation" } +} + +void fstr (char *d, char *s) +{ + __builtin_strcat (d, s); + __builtin_strncat (d, s, 1); +} + +void farr (char *d, char *s) +{ + __builtin_strcat (d, s); + + char a[] = "x"; + __builtin_strncat (d, a, 1); // { dg-warning "-Wstringop-truncation" } +} + +void flit (char *d, char *s) +{ + __builtin_strcat (d, s); + __builtin_strncat (d, "x", 1); // { dg-warning "-Wstringop-truncation" "pr?????" { xfail *-*-*} } + // { dg-warning "-Wstringop-overflow" "actual" { target *-*-*} .-1 } +} diff --git a/gcc/testsuite/gcc.dg/declare-simd.c b/gcc/testsuite/gcc.dg/declare-simd.c index 1c71b60..2c8c1b7 100644 --- a/gcc/testsuite/gcc.dg/declare-simd.c +++ b/gcc/testsuite/gcc.dg/declare-simd.c @@ -3,6 +3,7 @@ #pragma omp declare simd linear (p2, p3) extern void fn2 (float p1, float *p2, float *p3); +/* { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target { { aarch64*-*-* } && lp64 } } .-1 } */ float *a, *b; void fn1 (float *p1) diff --git a/gcc/testsuite/gcc.dg/gomp/pr59669-2.c b/gcc/testsuite/gcc.dg/gomp/pr59669-2.c index 26a30f4..f6aad89 100644 --- a/gcc/testsuite/gcc.dg/gomp/pr59669-2.c +++ b/gcc/testsuite/gcc.dg/gomp/pr59669-2.c @@ -7,4 +7,3 @@ void bar (int *a) { } -/* { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target aarch64*-*-* } .-3 } */ diff --git a/gcc/testsuite/gcc.dg/gomp/pr99542.c b/gcc/testsuite/gcc.dg/gomp/pr99542.c new file mode 100644 index 0000000..b67ff5a --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/pr99542.c @@ -0,0 +1,17 @@ +/* PR middle-end/89246 */ +/* { dg-do compile { target int128 } } */ +/* { dg-options "-O0 -fopenmp-simd" } */ + +#pragma omp declare simd +extern int foo (__int128 x); /* { dg-warning "GCC does not currently support mixed size types for 'simd' function" "" { target aarch64*-*-* } } */ +/* { dg-warning "unsupported argument type '__int128' for simd" "" { target i?86-*-* x86_64-*-* } .-1 } */ + +#pragma omp declare simd uniform (x) +extern int baz (__int128 x); + +#pragma omp declare simd +int +bar (int x) +{ + return x + foo (0) + baz (0); +} diff --git a/gcc/testsuite/gcc.dg/gomp/pr99544.c b/gcc/testsuite/gcc.dg/gomp/pr99544.c new file mode 100644 index 0000000..4ea07cf --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/pr99544.c @@ -0,0 +1,13 @@ +/* PR tree-optimization/99544 */ +/* { dg-do compile } */ +/* { dg-options "-Os -fopenmp" } */ + +long +foo (long a, long b, long c) +{ + long d, e; + #pragma omp teams distribute parallel for simd firstprivate (a, b, c) lastprivate(e) + for (d = a; d < b; d++) + e = c + d * 5; + return e; +} diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c index 844b80b..75554de 100644 --- a/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c +++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c @@ -15,7 +15,6 @@ float setArray(float *a, float x, int k) return a[k]; } -/* { dg-warning "GCC does not currently support mixed size types for 'simd' functions" "" { target aarch64*-*-* } .-6 } */ /* { dg-final { scan-tree-dump "_ZGVbN4ua32vl_setArray" "optimized" { target i?86-*-* x86_64-*-* } } } */ /* { dg-final { scan-tree-dump "_ZGVbN4vvva32_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */ /* { dg-final { scan-tree-dump "_ZGVbM4vl66u_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */ diff --git a/gcc/testsuite/gcc.target/aarch64/acle/rng_2.c b/gcc/testsuite/gcc.target/aarch64/acle/rng_2.c new file mode 100644 index 0000000..206136c --- /dev/null +++ b/gcc/testsuite/gcc.target/aarch64/acle/rng_2.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=armv8.5-a+rng" } */ + +#include <arm_acle.h> + +int test_rndr (uint64_t *addr) +{ + return __rndr (addr); +} + +/* { dg-final { scan-assembler-times {cset\t...?, eq} 1 } } */ + diff --git a/gcc/testsuite/gcc.target/arm/pr99592.c b/gcc/testsuite/gcc.target/arm/pr99592.c new file mode 100644 index 0000000..23d6591 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr99592.c @@ -0,0 +1,7 @@ +/* PR target/99592 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -pg" } */ + +#pragma GCC push_options +#pragma GCC target "" +#pragma GCC pop_options diff --git a/gcc/testsuite/gcc.target/i386/avx-pr99563.c b/gcc/testsuite/gcc.target/i386/avx-pr99563.c new file mode 100644 index 0000000..e2e863b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx-pr99563.c @@ -0,0 +1,38 @@ +/* PR target/99563 */ +/* { dg-do run { target avx } } */ +/* { dg-options "-O2 -mavx -mno-vzeroupper" } */ + +#include "avx-check.h" +#include <immintrin.h> + + +__attribute__((noipa)) float +compute_generic (void) +{ + return 0.0f; +} + +static inline __attribute__((always_inline)) +float compute_avx (unsigned long block_count) +{ + __m128d mm_res = _mm_set1_pd (256.0); + float res = (float) (_mm_cvtsd_f64 (mm_res) / (double) block_count); + _mm256_zeroupper (); + return res; +} + +__attribute__((noipa)) float +compute (unsigned long block_count) +{ + if (block_count >= 64) + return compute_avx (block_count); + else + return compute_generic (); +} + +static void +avx_test (void) +{ + if (compute (128) != 2.0f || compute (32) != 0.0f) + abort (); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-pr99321-2.c b/gcc/testsuite/gcc.target/i386/avx512vl-pr99321-2.c new file mode 100644 index 0000000..8bb3a03 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/avx512vl-pr99321-2.c @@ -0,0 +1,94 @@ +/* PR target/99321 */ +/* { dg-do assemble { target lp64 } } */ +/* { dg-require-effective-target avx512vl } */ +/* { dg-require-effective-target assembler_march_noavx512bw } */ +/* { dg-options "-O2 -mavx512vl -mno-avx512bw -Wa,-march=+noavx512bw" } */ + +#include <x86intrin.h> + +typedef unsigned char V1 __attribute__((vector_size (16))); +typedef unsigned char V2 __attribute__((vector_size (32))); +typedef unsigned short V3 __attribute__((vector_size (16))); +typedef unsigned short V4 __attribute__((vector_size (32))); + +void f1 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_abs_epi8 ((__m128i) b); __asm ("" : : "v" (a)); } +void f2 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_abs_epi8 ((__m256i) b); __asm ("" : : "v" (a)); } +void f3 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_abs_epi16 ((__m128i) b); __asm ("" : : "v" (a)); } +void f4 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_abs_epi16 ((__m256i) b); __asm ("" : : "v" (a)); } +void f5 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_adds_epi8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f6 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_adds_epi8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f7 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_adds_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f8 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_adds_epi16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f9 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_subs_epi8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f10 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_subs_epi8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f11 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_subs_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f12 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_subs_epi16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f13 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_adds_epu8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f14 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_adds_epu8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f15 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_adds_epu16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f16 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_adds_epu16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f17 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_subs_epu8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f18 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_subs_epu8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f19 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_subs_epu16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f20 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_subs_epu16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f21 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_alignr_epi8 ((__m128i) a, (__m128i) b, 5); __asm ("" : : "v" (a)); } +void f22 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_alignr_epi8 ((__m256i) a, (__m256i) b, 5); __asm ("" : : "v" (a)); } +void f23 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_adds_epu16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f24 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_avg_epu8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f25 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_avg_epu8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f26 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_avg_epu16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f27 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_avg_epu16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f28 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_broadcastb_epi8 ((__m128i) b); __asm ("" : : "v" (a)); } +void f29 (void) { register V2 a __asm ("%xmm16"); register V1 b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_broadcastb_epi8 ((__m128i) b); __asm ("" : : "v" (a)); } +void f30 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_broadcastw_epi16 ((__m128i) b); __asm ("" : : "v" (a)); } +void f31 (void) { register V4 a __asm ("%xmm16"); register V3 b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_broadcastw_epi16 ((__m128i) b); __asm ("" : : "v" (a)); } +int f32 (void) { register V1 a __asm ("%xmm16"); __asm ("" : "=v" (a)); return _mm_extract_epi8 ((__m128i) a, 3); } +int f33 (void) { register V3 a __asm ("%xmm16"); __asm ("" : "=v" (a)); return _mm_extract_epi16 ((__m128i) a, 3); } +void f34 (int c) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_insert_epi8 ((__m128i) b, c, 5); __asm ("" : : "v" (a)); } +void f35 (int c) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_insert_epi16 ((__m128i) b, c, 5); __asm ("" : : "v" (a)); } +void f36 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_maddubs_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f37 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_maddubs_epi16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f38 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_madd_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f39 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_madd_epi16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f40 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_cvtepi8_epi16 ((__m128i) b); __asm ("" : : "v" (a)); } +void f41 (void) { register V4 a __asm ("%xmm16"); register V3 b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_cvtepi8_epi16 ((__m128i) b); __asm ("" : : "v" (a)); } +void f42 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_cvtepu8_epi16 ((__m128i) b); __asm ("" : : "v" (a)); } +void f43 (void) { register V4 a __asm ("%xmm16"); register V3 b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_cvtepu8_epi16 ((__m128i) b); __asm ("" : : "v" (a)); } +void f44 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_mulhrs_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f45 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_mulhrs_epi16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f46 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_mulhi_epu16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f47 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_mulhi_epu16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f48 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_mulhi_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f49 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_mulhi_epi16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f50 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_sad_epu8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f51 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_sad_epu8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f52 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_shuffle_epi8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f53 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_shuffle_epi8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f54 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_shufflehi_epi16 ((__m128i) b, 0x5b); __asm ("" : : "v" (a)); } +void f55 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_shufflehi_epi16 ((__m256i) b, 0x5b); __asm ("" : : "v" (a)); } +void f56 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_shufflelo_epi16 ((__m128i) b, 0x5b); __asm ("" : : "v" (a)); } +void f57 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_shufflelo_epi16 ((__m256i) b, 0x5b); __asm ("" : : "v" (a)); } +void f58 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_slli_si128 ((__m128i) b, 3); __asm ("" : : "v" (a)); } +void f59 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_slli_si256 ((__m256i) b, 3); __asm ("" : : "v" (a)); } +void f60 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_srli_si128 ((__m128i) b, 3); __asm ("" : : "v" (a)); } +void f61 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_srli_si256 ((__m256i) b, 3); __asm ("" : : "v" (a)); } +void f62 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_sll_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f63 (void) { register V4 a __asm ("%xmm16"); register V3 b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_sll_epi16 ((__m256i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f64 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_slli_epi16 ((__m128i) b, 7); __asm ("" : : "v" (a)); } +void f65 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_slli_epi16 ((__m256i) b, 7); __asm ("" : : "v" (a)); } +void f66 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_srl_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f67 (void) { register V4 a __asm ("%xmm16"); register V3 b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_srl_epi16 ((__m256i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f68 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_srli_epi16 ((__m128i) b, 7); __asm ("" : : "v" (a)); } +void f69 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_srli_epi16 ((__m256i) b, 7); __asm ("" : : "v" (a)); } +void f70 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_sra_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f71 (void) { register V4 a __asm ("%xmm16"); register V3 b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_sra_epi16 ((__m256i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f72 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_srai_epi16 ((__m128i) b, 7); __asm ("" : : "v" (a)); } +void f73 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_srai_epi16 ((__m256i) b, 7); __asm ("" : : "v" (a)); } +void f74 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_unpackhi_epi8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f75 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_unpackhi_epi8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f76 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_unpackhi_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f77 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_unpackhi_epi16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f78 (void) { register V1 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V1) _mm_unpacklo_epi8 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f79 (void) { register V2 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V2) _mm256_unpacklo_epi8 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } +void f80 (void) { register V3 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V3) _mm_unpacklo_epi16 ((__m128i) a, (__m128i) b); __asm ("" : : "v" (a)); } +void f81 (void) { register V4 a __asm ("%xmm16"), b __asm ("%xmm17"); __asm ("" : "=v" (a), "=v" (b)); a = (V4) _mm256_unpacklo_epi16 ((__m256i) a, (__m256i) b); __asm ("" : : "v" (a)); } diff --git a/gcc/testsuite/gcc.target/i386/pr99530-1.c b/gcc/testsuite/gcc.target/i386/pr99530-1.c new file mode 100644 index 0000000..080d7cc --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr99530-1.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } } */ +/* { dg-require-effective-target lp64 } */ +/* { dg-options "-O2 -fpic -mcmodel=large -fno-plt" } */ +/* { dg-final { scan-assembler-not "foo@GOTPCREL" } } */ + +extern void foo (void); +void +bar (void) +{ + asm ("call %P0" : : "X" (foo)); +} diff --git a/gcc/testsuite/gcc.target/i386/pr99530-2.c b/gcc/testsuite/gcc.target/i386/pr99530-2.c new file mode 100644 index 0000000..9808957 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr99530-2.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } } */ +/* { dg-require-effective-target lp64 } */ +/* { dg-options "-O2 -fno-pic -mcmodel=large -fno-plt" } */ +/* { dg-final { scan-assembler-not "foo@GOTPCREL" } } */ + +extern void foo (void); +void +bar (void) +{ + asm ("call %P0" : : "X" (foo)); +} diff --git a/gcc/testsuite/gcc.target/i386/pr99530-3.c b/gcc/testsuite/gcc.target/i386/pr99530-3.c new file mode 100644 index 0000000..22fe81b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr99530-3.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } } */ +/* { dg-options "-O2 -fno-pic -fno-plt" } */ +/* { dg-final { scan-assembler "call\[ \t\]+\[*\]foo@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]+\[*\]foo@GOT" { target { ia32 && got32x_reloc } } } } */ + +extern void foo (void); +void +bar (void) +{ + asm ("call %P0" : : "X" (foo)); +} diff --git a/gcc/testsuite/gcc.target/i386/pr99530-4.c b/gcc/testsuite/gcc.target/i386/pr99530-4.c new file mode 100644 index 0000000..aba0b5d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr99530-4.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } } */ +/* { dg-options "-O2 -fpic -fno-plt" } */ +/* { dg-final { scan-assembler "call\[ \t\]+\[*\]foo@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "foo@GOT" { target { ia32 } } } } */ + +extern void foo (void); +void +bar (void) +{ + asm ("call %P0" : : "X" (foo)); +} diff --git a/gcc/testsuite/gcc.target/i386/pr99530-5.c b/gcc/testsuite/gcc.target/i386/pr99530-5.c new file mode 100644 index 0000000..02c5799 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr99530-5.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } } */ +/* { dg-options "-O2 -fno-pic" } */ +/* { dg-final { scan-assembler "call\[ \t\]+\[*\]foo@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler "call\[ \t\]+\[*\]foo@GOT" { target { ia32 && got32x_reloc } } } } */ + +extern void foo (void) __attribute__ ((noplt)); +void +bar (void) +{ + asm ("call %P0" : : "X" (foo)); +} diff --git a/gcc/testsuite/gcc.target/i386/pr99530-6.c b/gcc/testsuite/gcc.target/i386/pr99530-6.c new file mode 100644 index 0000000..0dfdd37 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr99530-6.c @@ -0,0 +1,11 @@ +/* { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } } */ +/* { dg-options "-O2 -fpic" } */ +/* { dg-final { scan-assembler "call\[ \t\]+\[*\]foo@GOTPCREL" { target { ! ia32 } } } } */ +/* { dg-final { scan-assembler-not "foo@GOT" { target { ia32 } } } } */ + +extern void foo (void) __attribute__ ((noplt)); +void +bar (void) +{ + asm ("call %P0" : : "X" (foo)); +} diff --git a/gcc/testsuite/gcc.target/i386/pr99600.c b/gcc/testsuite/gcc.target/i386/pr99600.c new file mode 100644 index 0000000..c2f2b22 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr99600.c @@ -0,0 +1,16 @@ +/* PR target/99600 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=atom" } */ + +char a, b; +long c; + +long +foo (void) +{ + if (a) + c = b == 1 ? 1 << 3 : 1 << 2; + else + c = 0; + return 0; +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr98092.c b/gcc/testsuite/gcc.target/powerpc/pr98092.c new file mode 100644 index 0000000..03eab5a --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr98092.c @@ -0,0 +1,7 @@ +/* { dg-options "-mdejagnu-cpu=power9 -ffinite-math-only" } */ + +int +h9 (__attribute__ ((altivec (vector__))) char un) +{ + return (__builtin_vec_bcdinvalid (un)); +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr99492.c b/gcc/testsuite/gcc.target/powerpc/pr99492.c index ae36cb3..37a1d07 100644 --- a/gcc/testsuite/gcc.target/powerpc/pr99492.c +++ b/gcc/testsuite/gcc.target/powerpc/pr99492.c @@ -1,7 +1,7 @@ /* { dg-do run { target { powerpc*-ibm-aix* } } } */ /* { dg-options "" } */ -void abort (void); +extern void abort (void); struct A { double _Complex a[64]; @@ -26,10 +26,10 @@ int main() { abort(); if (__alignof(struct A) != 8) - abort; + abort(); if (__alignof(struct C) != 4) - abort; + abort(); if (__builtin_offsetof(struct C, c2) != 4) abort(); diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-asm-fprvrmem.c b/gcc/testsuite/gcc.target/s390/vector/long-double-asm-fprvrmem.c new file mode 100644 index 0000000..f95656c --- /dev/null +++ b/gcc/testsuite/gcc.target/s390/vector/long-double-asm-fprvrmem.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -march=z14 -mzarch" } */ + +long double +foo (long double x) +{ + x = x * x; + asm("# %0" : "+fvm"(x)); + x = x + x; + return x; +} diff --git a/gcc/testsuite/gfortran.dg/alloc_deferred_comp_1.f90 b/gcc/testsuite/gfortran.dg/alloc_deferred_comp_1.f90 new file mode 100644 index 0000000..0fc54d5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/alloc_deferred_comp_1.f90 @@ -0,0 +1,18 @@ +! { dg-do run } +! +! Test the fix for PR99125, where the array reference in the print +! statement caused an ICE because the gimplifier complained about '0' +! being used as an lvalue. +! +! Contributed by Gerhard Steinmetz <gscfq@t-online.de> +! +program p + type t + character(:), allocatable :: a(:) + end type + type(t) :: x + character(8) :: c(3) = ['12 45 78','23 56 89','34 67 90'] + x%a = c + if (any (x%a(2:3) .ne. ['23 56 89','34 67 90'])) stop 1 + if (any (x%a(2:3)(4:5) .ne. ['56','67'])) stop 2 ! Bizarrely this worked. +end diff --git a/gcc/testsuite/gfortran.dg/do_check_16.f90 b/gcc/testsuite/gfortran.dg/do_check_16.f90 new file mode 100644 index 0000000..db0d45c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/do_check_16.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +program main + implicit none + integer :: iq,nq,recl + DO iq = 1, nq + call foobar ! { dg-error "redefined" } + ENDDO +CONTAINS + + subroutine foobar + inquire (iolength=nq) iq ! { dg-error "redefined" } + end subroutine foobar +END program main diff --git a/gcc/testsuite/gfortran.dg/do_check_17.f90 b/gcc/testsuite/gfortran.dg/do_check_17.f90 new file mode 100644 index 0000000..02b8993 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/do_check_17.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! PR 99345 - this used to cause an ICE. +! Original test case by Matthias Klose +program main + implicit none + integer :: iq,nq,recl + DO iq = 1, nq + CALL calc_upper_fan (iq) + ENDDO +CONTAINS + SUBROUTINE calc_upper_fan (iq) + INTEGER :: iq + INTEGER :: recl + INQUIRE(IOLENGTH=recl) iq + END SUBROUTINE calc_upper_fan +END diff --git a/gcc/testsuite/gfortran.dg/gomp/threadprivate-1.f90 b/gcc/testsuite/gfortran.dg/gomp/threadprivate-1.f90 new file mode 100644 index 0000000..59656c2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/threadprivate-1.f90 @@ -0,0 +1,11 @@ +! PR fortran/99514 +! +! NTest in DATA is implicitly SAVE, unless in COMMON +! Was failing before as the implicit SAVE was not +! honoured by the threadprivate check. +! + +program main + DATA NTest /1/ + !$omp threadprivate(Ntest) +end program main diff --git a/gcc/testsuite/gfortran.dg/pr99112.f90 b/gcc/testsuite/gfortran.dg/pr99112.f90 new file mode 100644 index 0000000..9401061 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr99112.f90 @@ -0,0 +1,27 @@ +! { dg-do compile } +! { dg-options "-fcheck=pointer -fdump-tree-original" } +! PR99112 - ICE with runtime diagnostics for SIZE intrinsic function + +module m + type t + end type +contains + function f (x, y) result(z) + class(t) :: x(:) + class(t) :: y(size(x)) + type(t) :: z(size(x)) + end + function g (x) result(z) + class(*) :: x(:) + type(t) :: z(size(x)) + end + subroutine s () + class(t), allocatable :: a(:), b(:), c(:), d(:) + class(t), pointer :: p(:) + c = f (a, b) + d = g (p) + end +end +! { dg-final { scan-tree-dump-times "_gfortran_runtime_error_at" 3 "original" } } +! { dg-final { scan-tree-dump-times "Allocatable actual argument" 2 "original" } } +! { dg-final { scan-tree-dump-times "Pointer actual argument" 1 "original" } } diff --git a/gcc/testsuite/gfortran.dg/pr99545.f90 b/gcc/testsuite/gfortran.dg/pr99545.f90 new file mode 100644 index 0000000..1b5ed5d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr99545.f90 @@ -0,0 +1,40 @@ +! { dg-do compile } +! { dg-options "-fcheck=mem" } +! +! Test the fix for PR99545, in which the allocate statements caused an ICE. +! +! Contributed by Juergen Reuter <juergen.reuter@desy.de> +! +module commands + implicit none + private + + type, abstract :: range_t + integer :: step_mode = 0 + integer :: n_step = 0 + end type range_t + + type, extends (range_t) :: range_int_t + integer :: i_step = 0 + end type range_int_t + + type, extends (range_t) :: range_real_t + real :: lr_step = 0 +end type range_real_t + + type :: cmd_scan_t + private + class(range_t), dimension(:), allocatable :: range + contains + procedure :: compile => cmd_scan_compile + end type cmd_scan_t + +contains + + subroutine cmd_scan_compile (cmd) + class(cmd_scan_t), intent(inout) :: cmd + allocate (range_int_t :: cmd%range (3)) + allocate (range_real_t :: cmd%range (3)) + end subroutine cmd_scan_compile + +end module commands diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index 65b3967..99759a8 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -3215,7 +3215,17 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_, return (void *)-1; /* This can happen with bitfields. */ if (maybe_ne (ref->size, r.size)) - return (void *)-1; + { + /* If the access lacks some subsetting simply apply that by + shortening it. That in the end can only be successful + if we can pun the lookup result which in turn requires + exact offsets. */ + if (known_eq (r.size, r.max_size) + && known_lt (ref->size, r.size)) + r.size = r.max_size = ref->size; + else + return (void *)-1; + } *ref = r; /* Do not update last seen VUSE after translating. */ |