aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--MAINTAINERS1
-rw-r--r--Makefile.in1
-rw-r--r--Makefile.tpl1
-rw-r--r--gcc/ChangeLog306
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/builtin-types.def3
-rw-r--r--gcc/c-family/ChangeLog5
-rw-r--r--gcc/c-family/c.opt2
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-parser.cc6
-rw-r--r--gcc/cgraphunit.cc4
-rw-r--r--gcc/cobol/ChangeLog51
-rw-r--r--gcc/cobol/cdf.y3
-rw-r--r--gcc/cobol/cdfval.h2
-rw-r--r--gcc/cobol/cobol1.cc1
-rw-r--r--gcc/cobol/except.cc1
-rw-r--r--gcc/cobol/gcobolspec.cc12
-rw-r--r--gcc/cobol/genapi.cc2
-rw-r--r--gcc/cobol/gengen.cc1
-rw-r--r--gcc/cobol/genmath.cc1
-rw-r--r--gcc/cobol/genutil.cc1
-rw-r--r--gcc/cobol/parse.y24
-rw-r--r--gcc/cobol/scan.l13
-rw-r--r--gcc/cobol/structs.cc1
-rw-r--r--gcc/cobol/symbols.cc177
-rw-r--r--gcc/cobol/symbols.h5
-rw-r--r--gcc/cobol/symfind.cc3
-rw-r--r--gcc/cobol/token_names.h8
-rw-r--r--gcc/cobol/util.cc5
-rw-r--r--gcc/combine.cc46
-rw-r--r--gcc/common/config/avr/avr-common.cc1
-rw-r--r--gcc/common/config/i386/cpuinfo.h40
-rw-r--r--gcc/common/config/i386/i386-common.cc44
-rw-r--r--gcc/common/config/i386/i386-cpuinfo.h9
-rw-r--r--gcc/common/config/i386/i386-isas.h7
-rw-r--r--gcc/config.gcc9
-rw-r--r--gcc/config/aarch64/aarch64-cores.def3
-rw-r--r--gcc/config/aarch64/aarch64-tune.md2
-rw-r--r--gcc/config/avr/avr-mcus.def6
-rw-r--r--gcc/config/avr/avr-passes.cc71
-rw-r--r--gcc/config/avr/avr-passes.def12
-rw-r--r--gcc/config/avr/avr-protos.h2
-rw-r--r--gcc/config/avr/avr.cc152
-rw-r--r--gcc/config/avr/avr.md215
-rw-r--r--gcc/config/avr/avr.opt4
-rw-r--r--gcc/config/avr/avr.opt.urls3
-rw-r--r--gcc/config/darwin.h5
-rw-r--r--gcc/config/i386/avx10_2-512bf16intrin.h14
-rw-r--r--gcc/config/i386/avx10_2-512convertintrin.h14
-rw-r--r--gcc/config/i386/avx10_2-512mediaintrin.h14
-rw-r--r--gcc/config/i386/avx10_2-512minmaxintrin.h14
-rw-r--r--gcc/config/i386/avx10_2-512satcvtintrin.h14
-rw-r--r--gcc/config/i386/avx10_2bf16intrin.h12
-rw-r--r--gcc/config/i386/avx10_2convertintrin.h104
-rw-r--r--gcc/config/i386/avx10_2mediaintrin.h14
-rw-r--r--gcc/config/i386/avx10_2minmaxintrin.h330
-rw-r--r--gcc/config/i386/avx10_2roundingintrin.h6433
-rw-r--r--gcc/config/i386/avx10_2satcvtintrin.h1115
-rw-r--r--gcc/config/i386/cpuid.h5
-rw-r--r--gcc/config/i386/driver-i386.cc9
-rw-r--r--gcc/config/i386/i386-builtin-types.def41
-rw-r--r--gcc/config/i386/i386-builtin.def950
-rw-r--r--gcc/config/i386/i386-c.cc15
-rw-r--r--gcc/config/i386/i386-expand.cc75
-rw-r--r--gcc/config/i386/i386-isa.def5
-rw-r--r--gcc/config/i386/i386-options.cc31
-rw-r--r--gcc/config/i386/i386-rust-and-jit.inc93
-rw-r--r--gcc/config/i386/i386-rust.cc96
-rw-r--r--gcc/config/i386/i386.cc4
-rw-r--r--gcc/config/i386/i386.h6
-rw-r--r--gcc/config/i386/i386.md12
-rw-r--r--gcc/config/i386/i386.opt27
-rw-r--r--gcc/config/i386/i386.opt.urls9
-rw-r--r--gcc/config/i386/immintrin.h2
-rw-r--r--gcc/config/i386/mmx.md16
-rw-r--r--gcc/config/i386/movrsintrin.h19
-rw-r--r--gcc/config/i386/predicates.md2
-rw-r--r--gcc/config/i386/sm4intrin.h4
-rw-r--r--gcc/config/i386/sse.md494
-rw-r--r--gcc/config/i386/subst.md43
-rw-r--r--gcc/config/nvptx/nvptx.cc29
-rw-r--r--gcc/config/s390/s390.cc11
-rw-r--r--gcc/config/s390/s390.h2
-rw-r--r--gcc/config/s390/s390.opt2
-rw-r--r--gcc/cp/ChangeLog44
-rw-r--r--gcc/cp/decl2.cc4
-rw-r--r--gcc/cp/init.cc5
-rw-r--r--gcc/cp/module.cc69
-rw-r--r--gcc/cp/parser.cc1
-rw-r--r--gcc/cp/pt.cc5
-rw-r--r--gcc/cp/rtti.cc4
-rw-r--r--gcc/d/ChangeLog34
-rw-r--r--gcc/d/d-lang.cc7
-rw-r--r--gcc/d/dmd/MERGE2
-rw-r--r--gcc/d/dmd/VERSION2
-rw-r--r--gcc/d/dmd/expression.d1
-rw-r--r--gcc/d/dmd/globals.d1
-rw-r--r--gcc/d/dmd/globals.h3
-rw-r--r--gcc/d/dmd/typesem.d14
-rw-r--r--gcc/d/gdc.texi2
-rw-r--r--gcc/d/lang.opt3
-rw-r--r--gcc/d/runtime.def4
-rw-r--r--gcc/d/types.cc2
-rw-r--r--gcc/doc/avr-mmcu.texi4
-rw-r--r--gcc/doc/extend.texi5414
-rw-r--r--gcc/doc/invoke.texi32
-rw-r--r--gcc/doc/sourcebuild.texi11
-rw-r--r--gcc/fortran/ChangeLog66
-rw-r--r--gcc/fortran/check.cc159
-rw-r--r--gcc/fortran/gfortran.h3
-rw-r--r--gcc/fortran/interface.cc2
-rw-r--r--gcc/fortran/intrinsic.cc65
-rw-r--r--gcc/fortran/intrinsic.h4
-rw-r--r--gcc/fortran/iresolve.cc214
-rw-r--r--gcc/fortran/resolve.cc4
-rw-r--r--gcc/fortran/trans-array.cc2
-rw-r--r--gcc/fortran/trans-expr.cc36
-rw-r--r--gcc/fortran/trans-intrinsic.cc3
-rw-r--r--gcc/fortran/trans-openmp.cc20
-rw-r--r--gcc/fortran/types.def3
-rw-r--r--gcc/gimple-low.cc1
-rw-r--r--gcc/gimple-pretty-print.cc23
-rw-r--r--gcc/gimple-ssa-sccopy.cc4
-rw-r--r--gcc/gimple.cc18
-rw-r--r--gcc/gimple.def4
-rw-r--r--gcc/gimple.h33
-rw-r--r--gcc/gimplify.cc24
-rw-r--r--gcc/ipa-icf-gimple.cc3
-rw-r--r--gcc/ipa-split.cc2
-rw-r--r--gcc/lra-constraints.cc36
-rw-r--r--gcc/m2/ChangeLog29
-rw-r--r--gcc/m2/gm2-compiler/M2GenGCC.mod38
-rw-r--r--gcc/m2/gm2-gcc/m2builtins.cc22
-rw-r--r--gcc/m2/gm2-gcc/m2builtins.def13
-rw-r--r--gcc/m2/gm2-gcc/m2builtins.h2
-rw-r--r--gcc/m2/gm2-gcc/m2statement.cc115
-rw-r--r--gcc/m2/gm2-gcc/m2statement.def12
-rw-r--r--gcc/m2/gm2-gcc/m2statement.h1
-rw-r--r--gcc/m2/gm2-gcc/m2type.cc60
-rw-r--r--gcc/m2/gm2-gcc/m2type.def8
-rw-r--r--gcc/m2/gm2-gcc/m2type.h4
-rw-r--r--gcc/multiple_target.cc6
-rw-r--r--gcc/omp-builtins.def3
-rw-r--r--gcc/omp-low.cc233
-rw-r--r--gcc/po/ChangeLog8
-rw-r--r--gcc/po/de.po508
-rw-r--r--gcc/po/fr.po1353
-rw-r--r--gcc/po/hr.po1173
-rw-r--r--gcc/rust/ChangeLog1315
-rw-r--r--gcc/rust/Make-lang.in11
-rw-r--r--gcc/rust/ast/rust-ast-builder-type.cc1
-rw-r--r--gcc/rust/ast/rust-ast-builder.cc160
-rw-r--r--gcc/rust/ast/rust-ast-builder.h75
-rw-r--r--gcc/rust/ast/rust-ast-collector.cc72
-rw-r--r--gcc/rust/ast/rust-ast-collector.h3
-rw-r--r--gcc/rust/ast/rust-ast-full-decls.h1
-rw-r--r--gcc/rust/ast/rust-ast-visitor.cc38
-rw-r--r--gcc/rust/ast/rust-ast-visitor.h15
-rw-r--r--gcc/rust/ast/rust-ast.cc22
-rw-r--r--gcc/rust/ast/rust-ast.h94
-rw-r--r--gcc/rust/ast/rust-builtin-ast-nodes.h2
-rw-r--r--gcc/rust/ast/rust-collect-lang-items.cc104
-rw-r--r--gcc/rust/ast/rust-collect-lang-items.h60
-rw-r--r--gcc/rust/ast/rust-expr.h108
-rw-r--r--gcc/rust/ast/rust-item.h416
-rw-r--r--gcc/rust/ast/rust-macro.h39
-rw-r--r--gcc/rust/ast/rust-path.cc32
-rw-r--r--gcc/rust/ast/rust-path.h406
-rw-r--r--gcc/rust/ast/rust-stmt.h2
-rw-r--r--gcc/rust/backend/rust-compile-asm.cc9
-rw-r--r--gcc/rust/backend/rust-compile-asm.h2
-rw-r--r--gcc/rust/backend/rust-compile-base.cc61
-rw-r--r--gcc/rust/backend/rust-compile-base.h6
-rw-r--r--gcc/rust/backend/rust-compile-block.cc27
-rw-r--r--gcc/rust/backend/rust-compile-block.h8
-rw-r--r--gcc/rust/backend/rust-compile-context.cc15
-rw-r--r--gcc/rust/backend/rust-compile-expr.cc350
-rw-r--r--gcc/rust/backend/rust-compile-expr.h14
-rw-r--r--gcc/rust/backend/rust-compile-fnparam.cc39
-rw-r--r--gcc/rust/backend/rust-compile-fnparam.h8
-rw-r--r--gcc/rust/backend/rust-compile-implitem.cc53
-rw-r--r--gcc/rust/backend/rust-compile-intrinsic.cc124
-rw-r--r--gcc/rust/backend/rust-compile-item.cc34
-rw-r--r--gcc/rust/backend/rust-compile-pattern.cc227
-rw-r--r--gcc/rust/backend/rust-compile-pattern.h10
-rw-r--r--gcc/rust/backend/rust-compile-resolve-path.cc9
-rw-r--r--gcc/rust/backend/rust-compile-stmt.cc12
-rw-r--r--gcc/rust/backend/rust-compile-struct-field-expr.cc16
-rw-r--r--gcc/rust/backend/rust-compile-struct-field-expr.h2
-rw-r--r--gcc/rust/backend/rust-compile-type.cc74
-rw-r--r--gcc/rust/backend/rust-compile-var-decl.h4
-rw-r--r--gcc/rust/backend/rust-compile.cc10
-rw-r--r--gcc/rust/backend/rust-constexpr.cc8
-rw-r--r--gcc/rust/backend/rust-mangle-legacy.cc1
-rw-r--r--gcc/rust/backend/rust-mangle-v0.cc5
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc131
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h2
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h16
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc20
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.h1
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h6
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-bir-builder.h16
-rw-r--r--gcc/rust/checks/errors/borrowck/rust-function-collector.h6
-rw-r--r--gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc171
-rw-r--r--gcc/rust/checks/errors/privacy/rust-privacy-reporter.h4
-rw-r--r--gcc/rust/checks/errors/privacy/rust-reachability.cc2
-rw-r--r--gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc21
-rw-r--r--gcc/rust/checks/errors/rust-ast-validation.cc20
-rw-r--r--gcc/rust/checks/errors/rust-const-checker.cc140
-rw-r--r--gcc/rust/checks/errors/rust-const-checker.h2
-rw-r--r--gcc/rust/checks/errors/rust-hir-pattern-analysis.cc224
-rw-r--r--gcc/rust/checks/errors/rust-hir-pattern-analysis.h2
-rw-r--r--gcc/rust/checks/errors/rust-readonly-check.cc54
-rw-r--r--gcc/rust/checks/errors/rust-unsafe-checker.cc180
-rw-r--r--gcc/rust/checks/errors/rust-unsafe-checker.h4
-rw-r--r--gcc/rust/checks/lints/rust-lint-marklive.cc16
-rw-r--r--gcc/rust/checks/lints/rust-lint-marklive.h76
-rw-r--r--gcc/rust/expand/rust-derive-clone.cc225
-rw-r--r--gcc/rust/expand/rust-derive-clone.h15
-rw-r--r--gcc/rust/expand/rust-derive-copy.cc10
-rw-r--r--gcc/rust/expand/rust-derive.h2
-rw-r--r--gcc/rust/expand/rust-expand-format-args.cc2
-rw-r--r--gcc/rust/expand/rust-macro-builtins-asm.cc7
-rw-r--r--gcc/rust/expand/rust-macro-builtins-helpers.cc2
-rw-r--r--gcc/rust/expand/rust-macro-builtins-utility.cc4
-rw-r--r--gcc/rust/hir/rust-ast-lower-base.cc16
-rw-r--r--gcc/rust/hir/rust-ast-lower-base.h2
-rw-r--r--gcc/rust/hir/rust-ast-lower-block.h11
-rw-r--r--gcc/rust/hir/rust-ast-lower-expr.cc20
-rw-r--r--gcc/rust/hir/rust-ast-lower-item.cc6
-rw-r--r--gcc/rust/hir/rust-ast-lower-stmt.cc28
-rw-r--r--gcc/rust/hir/rust-ast-lower-stmt.h1
-rw-r--r--gcc/rust/hir/rust-ast-lower-type.cc80
-rw-r--r--gcc/rust/hir/rust-ast-lower-type.h3
-rw-r--r--gcc/rust/hir/rust-ast-lower.cc150
-rw-r--r--gcc/rust/hir/rust-ast-lower.h5
-rw-r--r--gcc/rust/hir/rust-hir-dump.cc112
-rw-r--r--gcc/rust/hir/rust-hir-dump.h3
-rw-r--r--gcc/rust/hir/tree/rust-hir-attrs.h56
-rw-r--r--gcc/rust/hir/tree/rust-hir-bound-abstract.h65
-rw-r--r--gcc/rust/hir/tree/rust-hir-bound.h94
-rw-r--r--gcc/rust/hir/tree/rust-hir-expr-abstract.h174
-rw-r--r--gcc/rust/hir/tree/rust-hir-expr.cc1484
-rw-r--r--gcc/rust/hir/tree/rust-hir-expr.h1644
-rw-r--r--gcc/rust/hir/tree/rust-hir-full-decls.h2
-rw-r--r--gcc/rust/hir/tree/rust-hir-generic-param.cc95
-rw-r--r--gcc/rust/hir/tree/rust-hir-generic-param.h190
-rw-r--r--gcc/rust/hir/tree/rust-hir-item.cc1020
-rw-r--r--gcc/rust/hir/tree/rust-hir-item.h1085
-rw-r--r--gcc/rust/hir/tree/rust-hir-literal.h78
-rw-r--r--gcc/rust/hir/tree/rust-hir-node.h63
-rw-r--r--gcc/rust/hir/tree/rust-hir-path.cc400
-rw-r--r--gcc/rust/hir/tree/rust-hir-path.h413
-rw-r--r--gcc/rust/hir/tree/rust-hir-pattern-abstract.h82
-rw-r--r--gcc/rust/hir/tree/rust-hir-pattern.h23
-rw-r--r--gcc/rust/hir/tree/rust-hir-simple-path.h64
-rw-r--r--gcc/rust/hir/tree/rust-hir-stmt.cc104
-rw-r--r--gcc/rust/hir/tree/rust-hir-stmt.h147
-rw-r--r--gcc/rust/hir/tree/rust-hir-trait-bound.h87
-rw-r--r--gcc/rust/hir/tree/rust-hir-type-abstract.cc (renamed from gcc/rust/util/rust-make-unique.h)19
-rw-r--r--gcc/rust/hir/tree/rust-hir-type-abstract.h80
-rw-r--r--gcc/rust/hir/tree/rust-hir-type-no-bounds.h58
-rw-r--r--gcc/rust/hir/tree/rust-hir-type.cc289
-rw-r--r--gcc/rust/hir/tree/rust-hir-type.h324
-rw-r--r--gcc/rust/hir/tree/rust-hir-visibility.h80
-rw-r--r--gcc/rust/hir/tree/rust-hir-visitable.h41
-rw-r--r--gcc/rust/hir/tree/rust-hir-visitor.h7
-rw-r--r--gcc/rust/hir/tree/rust-hir.cc121
-rw-r--r--gcc/rust/hir/tree/rust-hir.h817
-rw-r--r--gcc/rust/lang.opt13
-rw-r--r--gcc/rust/lex/rust-token.h7
-rw-r--r--gcc/rust/metadata/rust-import-archive.cc5
-rw-r--r--gcc/rust/metadata/rust-imports.cc5
-rw-r--r--gcc/rust/parse/rust-parse-impl.h123
-rw-r--r--gcc/rust/parse/rust-parse.h4
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-base.cc8
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-base.h2
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-expr.cc2
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-item.cc41
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-stmt.cc21
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-stmt.h1
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-type.cc142
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-type.h7
-rw-r--r--gcc/rust/resolve/rust-default-resolver.cc35
-rw-r--r--gcc/rust/resolve/rust-default-resolver.h3
-rw-r--r--gcc/rust/resolve/rust-early-name-resolver-2.0.cc4
-rw-r--r--gcc/rust/resolve/rust-early-name-resolver.cc12
-rw-r--r--gcc/rust/resolve/rust-forever-stack.cc318
-rw-r--r--gcc/rust/resolve/rust-forever-stack.h166
-rw-r--r--gcc/rust/resolve/rust-forever-stack.hxx59
-rw-r--r--gcc/rust/resolve/rust-late-name-resolver-2.0.cc74
-rw-r--r--gcc/rust/resolve/rust-late-name-resolver-2.0.h3
-rw-r--r--gcc/rust/resolve/rust-name-resolution-context.cc15
-rw-r--r--gcc/rust/resolve/rust-name-resolution-context.h9
-rw-r--r--gcc/rust/resolve/rust-name-resolver.cc16
-rw-r--r--gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc110
-rw-r--r--gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h4
-rw-r--r--gcc/rust/rust-backend.h6
-rw-r--r--gcc/rust/rust-gcc.cc30
-rw-r--r--gcc/rust/rust-lang.cc2
-rw-r--r--gcc/rust/rust-session-manager.cc6
-rw-r--r--gcc/rust/rust-session-manager.h14
-rw-r--r--gcc/rust/typecheck/rust-autoderef.cc2
-rw-r--r--gcc/rust/typecheck/rust-casts.cc43
-rw-r--r--gcc/rust/typecheck/rust-hir-dot-operator.cc181
-rw-r--r--gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h2
-rw-r--r--gcc/rust/typecheck/rust-hir-path-probe.cc9
-rw-r--r--gcc/rust/typecheck/rust-hir-path-probe.h2
-rw-r--r--gcc/rust/typecheck/rust-hir-trait-reference.h2
-rw-r--r--gcc/rust/typecheck/rust-hir-trait-resolve.cc43
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-base.cc30
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-base.h10
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-enumitem.cc58
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-enumitem.h2
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-expr.cc502
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-expr.h8
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-implitem.cc117
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-implitem.h14
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-item.cc111
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-path.cc59
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-pattern.cc73
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-pattern.h11
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-stmt.cc43
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-stmt.h2
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-struct-field.h4
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-struct.cc50
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-type.cc507
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check-type.h19
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check.cc67
-rw-r--r--gcc/rust/typecheck/rust-hir-type-check.h39
-rw-r--r--gcc/rust/typecheck/rust-type-util.cc5
-rw-r--r--gcc/rust/typecheck/rust-typecheck-context.cc54
-rw-r--r--gcc/rust/typecheck/rust-tyty-bounds.cc56
-rw-r--r--gcc/rust/typecheck/rust-tyty-call.cc44
-rw-r--r--gcc/rust/typecheck/rust-tyty-call.h4
-rw-r--r--gcc/rust/typecheck/rust-tyty-cmp.h6
-rw-r--r--gcc/rust/typecheck/rust-tyty-subst.cc7
-rw-r--r--gcc/rust/typecheck/rust-tyty.cc119
-rw-r--r--gcc/rust/typecheck/rust-tyty.h101
-rw-r--r--gcc/rust/typecheck/rust-unify.cc16
-rw-r--r--gcc/rust/util/rust-attribute-values.h1
-rw-r--r--gcc/rust/util/rust-attributes.cc10
-rw-r--r--gcc/rust/util/rust-attributes.h6
-rw-r--r--gcc/rust/util/rust-common.h1
-rw-r--r--gcc/rust/util/rust-hir-map.cc53
-rw-r--r--gcc/rust/util/rust-hir-map.h25
-rw-r--r--gcc/rust/util/rust-lang-item.cc57
-rw-r--r--gcc/rust/util/rust-lang-item.h18
-rw-r--r--gcc/rust/util/rust-operators.h8
-rw-r--r--gcc/rust/util/rust-stacked-contexts.h7
-rw-r--r--gcc/rust/util/rust-token-converter.cc3
-rw-r--r--gcc/rust/util/rust-token-converter.h2
-rw-r--r--gcc/sym-exec/sym-exec-state.cc2
-rw-r--r--gcc/testsuite/ChangeLog508
-rw-r--r--gcc/testsuite/c-c++-common/gomp/interop-1.c2
-rw-r--r--gcc/testsuite/c-c++-common/gomp/interop-2.c2
-rw-r--r--gcc/testsuite/c-c++-common/gomp/interop-3.c2
-rw-r--r--gcc/testsuite/c-c++-common/gomp/interop-4.c12
-rw-r--r--gcc/testsuite/c-c++-common/gomp/interop-5.c68
-rw-r--r--gcc/testsuite/c-c++-common/musttail26.c33
-rw-r--r--gcc/testsuite/c-c++-common/musttail27.c31
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/class-deduction-alias24.C16
-rw-r--r--gcc/testsuite/g++.dg/gomp/interop-5.C12
-rw-r--r--gcc/testsuite/g++.dg/modules/extern-tpl-3_a.C11
-rw-r--r--gcc/testsuite/g++.dg/modules/extern-tpl-3_b.C12
-rw-r--r--gcc/testsuite/g++.dg/modules/extern-tpl-4_a.H22
-rw-r--r--gcc/testsuite/g++.dg/modules/extern-tpl-4_b.C24
-rw-r--r--gcc/testsuite/g++.dg/modules/extern-tpl-4_c.C80
-rw-r--r--gcc/testsuite/g++.dg/modules/gnu-inline-1_a.C7
-rw-r--r--gcc/testsuite/g++.dg/modules/gnu-inline-1_b.C14
-rw-r--r--gcc/testsuite/g++.dg/modules/gnu-inline-1_c.C16
-rw-r--r--gcc/testsuite/g++.dg/modules/gnu-inline-1_d.C16
-rw-r--r--gcc/testsuite/g++.dg/modules/gnu-inline-2_a.C11
-rw-r--r--gcc/testsuite/g++.dg/modules/gnu-inline-2_b.C14
-rw-r--r--gcc/testsuite/g++.dg/modules/pr119154_a.C6
-rw-r--r--gcc/testsuite/g++.dg/modules/pr119154_b.C10
-rw-r--r--gcc/testsuite/g++.dg/opt/musttail1.C35
-rw-r--r--gcc/testsuite/g++.dg/other/i386-2.C2
-rw-r--r--gcc/testsuite/g++.dg/other/i386-3.C2
-rw-r--r--gcc/testsuite/g++.dg/template/friend85.C16
-rw-r--r--gcc/testsuite/g++.target/i386/mangling-alias1.C16
-rw-r--r--gcc/testsuite/g++.target/nvptx/alias-g++.dg_init_dtor2-2.C33
-rw-r--r--gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr10474.c3
-rw-r--r--gcc/testsuite/gcc.dg/pr118615.c24
-rw-r--r--gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c1
-rw-r--r--gcc/testsuite/gcc.target/arm/unaligned-memcpy-1.c34
-rw-r--r--gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c33
-rw-r--r--gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c33
-rw-r--r--gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c32
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/pr119421-sreg.c301
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-1.c187
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10-check.h7
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-10.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-11.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-12.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-13.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-15.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-16.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-18.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-19.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-2.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-20.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-21.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-22.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-23.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-24.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-25.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-26.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-3.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-4.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-5.c5
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-6.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-7.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-8.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_1-9.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-cmp-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-fma-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-operations-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-smaxmin-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-convert-1.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-media-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-minmax-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-movrs-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-satcvt-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vaddbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcmpbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ps2phx-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162ibs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162iubs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvthf82ph-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162ibs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162iubs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vdivbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclassbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexpbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vminbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vmulbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vrcpbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vreducebf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalebf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-512-vsubbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-bf16-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-cmp-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-fma-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-operations-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-smaxmin-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-comibf-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-comibf-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-comibf-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-comibf-4.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-compare-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-compare-1b.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-convert-1.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-media-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-minmax-1.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-movrs-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fast-math-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fma-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-operations-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-smaxmin-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-rounding-1.c252
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-rounding-2.c193
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-rounding-3.c601
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c106
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vaddbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcmpbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ps2phx-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162ibs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162iubs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvthf82ph-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8s-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2ibs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2iubs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2ibs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2iubs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162ibs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162iubs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2dqs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2qqs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2udqs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2uqqs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2ibs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2iubs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2dqs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2ibs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2iubs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2qqs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2udqs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2uqqs-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vdivbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vdpphps-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vfmaddXXXbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vfmsubXXXbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vfnmaddXXXbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vfnmsubXXXbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vfpclassbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vgetexpbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vgetmantbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vmaxbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vminbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vminmaxbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vminmaxpd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vminmaxph-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vminmaxps-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsh-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vminmaxss-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vmovd-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vmovd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vmovw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vmovw-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vmpsadbw-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vmulbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsud-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsuds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuud-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuuds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsud-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsuds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuud-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuuds-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vrcpbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vreducebf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vrndscalebf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vrsqrtbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vscalefbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vsqrtbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx10_2-vsubbf16-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-56.inc3
-rw-r--r--gcc/testsuite/gcc.target/i386/noevex512-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/noevex512-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/part-vect-vec_cmpbf.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr111068.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr111907.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/pr117240_avx512f.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/pr117304-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/pr117495.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr117946.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr118815.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sm4-avx10_2-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sm4-avx10_2-512-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sm4-check.h5
-rw-r--r--gcc/testsuite/gcc.target/i386/sm4key4-avx10_2-512-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/sm4rnds4-avx10_2-512-2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-12.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-13.c188
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-14.c414
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-22.c414
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-23.c187
-rw-r--r--gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-4.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-4.c4
-rw-r--r--gcc/testsuite/gcc.target/nvptx/alias-unsupported-1.c9
-rw-r--r--gcc/testsuite/gcc.target/nvptx/march-map=sm_30.c4
-rw-r--r--gcc/testsuite/gcc.target/nvptx/march-map=sm_32.c4
-rw-r--r--gcc/testsuite/gcc.target/nvptx/march-map=sm_35.c4
-rw-r--r--gcc/testsuite/gcc.target/nvptx/march-map=sm_37.c4
-rw-r--r--gcc/testsuite/gcc.target/nvptx/march-map=sm_50.c4
-rw-r--r--gcc/testsuite/gcc.target/nvptx/march=sm_30.c4
-rw-r--r--gcc/testsuite/gcc.target/nvptx/march=sm_35.c4
-rw-r--r--gcc/testsuite/gcc.target/nvptx/march=sm_37.c4
-rw-r--r--gcc/testsuite/gcc.target/s390/20020926-1.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/dwarfregtable-1.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/fp2int1.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/pr102222.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/pr106355-3.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/pr61078.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-10.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-12.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-14.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-18.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-2.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-20.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-22.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-24.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-26.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-28.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-30.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-32.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-4.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-6.c1
-rw-r--r--gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-8.c1
-rw-r--r--gcc/testsuite/gdc.dg/pr117621.d11
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail347.d4
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/ufcs.d36
-rw-r--r--gcc/testsuite/gdc.test/runnable/test21020.d11
-rw-r--r--gcc/testsuite/gfortran.dg/class_79.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/interop-4.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/interop-5.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_54.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/reduce_1.f90202
-rw-r--r--gcc/testsuite/gfortran.dg/reduce_2.f90145
-rw-r--r--gcc/testsuite/lib/target-supports.exp16
-rw-r--r--gcc/testsuite/rust/compile/additional-trait-bounds1.rs10
-rw-r--r--gcc/testsuite/rust/compile/additional-trait-bounds2.rs9
-rw-r--r--gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs11
-rw-r--r--gcc/testsuite/rust/compile/auto_traits1.rs27
-rw-r--r--gcc/testsuite/rust/compile/auto_traits2.rs26
-rw-r--r--gcc/testsuite/rust/compile/auto_traits3.rs34
-rw-r--r--gcc/testsuite/rust/compile/cast_float_as_integer.rs10
-rw-r--r--gcc/testsuite/rust/compile/cmp1.rs78
-rw-r--r--gcc/testsuite/rust/compile/derive_clone_enum1.rs16
-rw-r--r--gcc/testsuite/rust/compile/derive_clone_enum2.rs16
-rw-r--r--gcc/testsuite/rust/compile/derive_clone_enum3.rs16
-rw-r--r--gcc/testsuite/rust/compile/derive_macro1.rs1
-rw-r--r--gcc/testsuite/rust/compile/derive_macro3.rs1
-rw-r--r--gcc/testsuite/rust/compile/derive_macro4.rs8
-rw-r--r--gcc/testsuite/rust/compile/derive_macro6.rs7
-rw-r--r--gcc/testsuite/rust/compile/exhaustiveness1.rs4
-rw-r--r--gcc/testsuite/rust/compile/if_let_expr.rs5
-rw-r--r--gcc/testsuite/rust/compile/if_let_expr_simple.rs12
-rw-r--r--gcc/testsuite/rust/compile/iflet.rs32
-rw-r--r--gcc/testsuite/rust/compile/issue-1446.rs10
-rw-r--r--gcc/testsuite/rust/compile/issue-1525.rs4
-rw-r--r--gcc/testsuite/rust/compile/issue-1773.rs23
-rw-r--r--gcc/testsuite/rust/compile/issue-2323.rs9
-rw-r--r--gcc/testsuite/rust/compile/issue-2394.rs14
-rw-r--r--gcc/testsuite/rust/compile/issue-2423.rs14
-rw-r--r--gcc/testsuite/rust/compile/issue-2567-1.rs8
-rw-r--r--gcc/testsuite/rust/compile/issue-2567-2.rs8
-rw-r--r--gcc/testsuite/rust/compile/issue-2567-3.rs8
-rw-r--r--gcc/testsuite/rust/compile/issue-266.rs3
-rw-r--r--gcc/testsuite/rust/compile/issue-2847.rs8
-rw-r--r--gcc/testsuite/rust/compile/issue-2905-1.rs27
-rw-r--r--gcc/testsuite/rust/compile/issue-2905-2.rs136
-rw-r--r--gcc/testsuite/rust/compile/issue-2907.rs33
-rw-r--r--gcc/testsuite/rust/compile/issue-2953-1.rs27
-rw-r--r--gcc/testsuite/rust/compile/issue-2953-2.rs37
-rw-r--r--gcc/testsuite/rust/compile/issue-3009.rs24
-rw-r--r--gcc/testsuite/rust/compile/issue-3032-1.rs58
-rw-r--r--gcc/testsuite/rust/compile/issue-3032-2.rs49
-rw-r--r--gcc/testsuite/rust/compile/issue-3033.rs144
-rw-r--r--gcc/testsuite/rust/compile/issue-3046.rs4
-rw-r--r--gcc/testsuite/rust/compile/issue-3140.rs27
-rw-r--r--gcc/testsuite/rust/compile/issue-3231.rs8
-rw-r--r--gcc/testsuite/rust/compile/issue-3242.rs24
-rw-r--r--gcc/testsuite/rust/compile/issue-3261.rs18
-rw-r--r--gcc/testsuite/rust/compile/issue-3304.rs10
-rw-r--r--gcc/testsuite/rust/compile/issue-3350.rs10
-rw-r--r--gcc/testsuite/rust/compile/iterators1.rs18
-rw-r--r--gcc/testsuite/rust/compile/macros/builtin/eager1.rs2
-rw-r--r--gcc/testsuite/rust/compile/macros/builtin/recurse2.rs26
-rw-r--r--gcc/testsuite/rust/compile/multiline-string.rs14
-rw-r--r--gcc/testsuite/rust/compile/mutability_checks1.rs15
-rw-r--r--gcc/testsuite/rust/compile/nr2/compile.exp18
-rw-r--r--gcc/testsuite/rust/compile/nr2/exclude133
-rw-r--r--gcc/testsuite/rust/compile/ptr_int_cast.rs18
-rw-r--r--gcc/testsuite/rust/compile/try-catch-unwind-new.rs20
-rw-r--r--gcc/testsuite/rust/compile/try-catch-unwind-old.rs21
-rw-r--r--gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs2
-rw-r--r--gcc/testsuite/rust/execute/torture/derive_clone_enum1.rs51
-rw-r--r--gcc/testsuite/rust/execute/torture/derive_macro3.rs1
-rw-r--r--gcc/testsuite/rust/execute/torture/derive_macro4.rs1
-rw-r--r--gcc/testsuite/rust/execute/torture/iflet.rs84
-rw-r--r--gcc/testsuite/rust/execute/torture/multiline-string.rs15
-rw-r--r--gcc/testsuite/rust/link/generic_function_0.rs3
-rw-r--r--gcc/testsuite/rust/link/trait_import_0.rs3
-rw-r--r--gcc/testsuite/rust/link/trait_import_1.rs3
-rw-r--r--gcc/tree-inline.cc9
-rw-r--r--gcc/tree-ssa-sccvn.cc6
-rw-r--r--gcc/tree-vect-stmts.cc2
-rw-r--r--gcc/varasm.cc7
-rw-r--r--include/ChangeLog6
-rw-r--r--include/gomp-constants.h13
-rw-r--r--libcpp/po/ChangeLog4
-rw-r--r--libcpp/po/de.po18
-rw-r--r--libgcc/ChangeLog5
-rw-r--r--libgcc/config/avr/libf7/ChangeLog5
-rw-r--r--libgcc/config/avr/libf7/t-libf74
-rw-r--r--libgcc/config/avr/t-avr23
-rw-r--r--libgcobol/ChangeLog14
-rw-r--r--libgcobol/Makefile.am4
-rw-r--r--libgcobol/Makefile.in9
-rw-r--r--libgcobol/aclocal.m44
-rw-r--r--libgcobol/config.h.in6
-rwxr-xr-xlibgcobol/configure914
-rw-r--r--libgcobol/configure.ac3
-rw-r--r--libgfortran/ChangeLog14
-rw-r--r--libgfortran/Makefile.am1
-rw-r--r--libgfortran/Makefile.in7
-rw-r--r--libgfortran/gfortran.map4
-rw-r--r--libgfortran/intrinsics/reduce.c286
-rw-r--r--libgm2/ChangeLog7
-rw-r--r--libgm2/libm2iso/ErrnoCategory.cc12
-rw-r--r--libgomp/ChangeLog61
-rw-r--r--libgomp/icv-device.c7
-rw-r--r--libgomp/libgomp-plugin.h44
-rw-r--r--libgomp/libgomp.h17
-rw-r--r--libgomp/libgomp.map1
-rw-r--r--libgomp/libgomp_g.h4
-rw-r--r--libgomp/plugin/plugin-gcn.c464
-rw-r--r--libgomp/plugin/plugin-nvptx.c302
-rw-r--r--libgomp/target.c213
-rw-r--r--libgomp/testsuite/lib/libgomp.exp7
-rw-r--r--libgomp/testsuite/libgomp.c++/pr101544-1-O0.C4
-rw-r--r--libgomp/testsuite/libgomp.c++/pr101544-1.C83
-rw-r--r--libgomp/testsuite/libgomp.c++/pr96835-1-O0.C3
-rw-r--r--libgomp/testsuite/libgomp.c++/pr96835-1.C45
-rw-r--r--libgomp/testsuite/libgomp.c-c++-common/get-mapped-ptr-1.c2
-rw-r--r--libgomp/testsuite/libgomp.c-c++-common/interop-1.c43
-rw-r--r--libgomp/testsuite/libgomp.c/interop-fr-1.c577
-rw-r--r--libgomp/testsuite/libgomp.fortran/get-mapped-ptr-1.f902
-rw-r--r--libgomp/testsuite/libgomp.oacc-c++/pr101544-1.C7
-rw-r--r--libgomp/testsuite/libgomp.oacc-c++/pr96835-1.C6
-rw-r--r--libphobos/ChangeLog16
-rw-r--r--libphobos/libdruntime/MERGE2
-rw-r--r--libphobos/libdruntime/Makefile.am2
-rw-r--r--libphobos/libdruntime/Makefile.in6
-rw-r--r--libphobos/libdruntime/core/stdcpp/xutility.d1
-rw-r--r--libphobos/libdruntime/rt/invariant_.d (renamed from libphobos/libdruntime/rt/invariant.d)9
-rw-r--r--libphobos/src/MERGE2
-rw-r--r--libphobos/src/std/numeric.d2
-rw-r--r--libstdc++-v3/ChangeLog67
-rw-r--r--libstdc++-v3/config.h.in18
-rwxr-xr-xlibstdc++-v3/configure179
-rw-r--r--libstdc++-v3/configure.ac2
-rw-r--r--libstdc++-v3/include/bits/chrono_io.h60
-rw-r--r--libstdc++-v3/include/bits/stl_vector.h20
-rw-r--r--libstdc++-v3/src/c++23/std.cc.in23
-rw-r--r--libstdc++-v3/src/c++23/std.compat.cc.in11
-rw-r--r--libstdc++-v3/testsuite/std/time/format/localized.cc33
-rw-r--r--libstdc++-v3/testsuite/std/time/format/pr117214.cc99
805 files changed, 26802 insertions, 24455 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c17b4c..9c3c429 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-03-23 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR libitm/88319
+ * Makefile.in: Regenerate.
+ * Makefile.tpl: Add CXX_FOR_TARGET to NORMAL_TARGET_EXPORTS.
+
+2025-03-23 James K. Lowden <jklowden@cobolworx.com>
+
+ * MAINTAINERS: Add myself.
+
2025-03-17 Arthur Cohen <arthur.cohen@embecosm.com>
* .gitignore: Add libgrust target folders to the ignore list.
diff --git a/MAINTAINERS b/MAINTAINERS
index 5b3fe40..90c8e2a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -163,6 +163,7 @@ Ada front end Eric Botcazou <ebotcazou@libertysurf.fr>
Ada front end Marc PoulhiĂšs <poulhies@adacore.com>
Ada front end Pierre-Marie de Rodat <derodat@adacore.com>
COBOL front end Robert Dubner <rdubner@symas.com>
+COBOL front end James K. Lowden <jklowden@cobolworx.com>
c++ Jason Merrill <jason@redhat.com>
c++ Nathan Sidwell <nathan@acm.org>
D front end Iain Buclaw <ibuclaw@gdcproject.org>
diff --git a/Makefile.in b/Makefile.in
index 87880c6..a5e6e11 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -339,6 +339,7 @@ RAW_CXX_TARGET_EXPORTS = \
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
+ CXX_FOR_TARGET="$(CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
# Where to find GMP
diff --git a/Makefile.tpl b/Makefile.tpl
index da38dca..7dccf91 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -342,6 +342,7 @@ RAW_CXX_TARGET_EXPORTS = \
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
+ CXX_FOR_TARGET="$(CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
# Where to find GMP
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 86389dd..ade7488 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,309 @@
+2025-03-23 Sandra Loosemore <sloosemore@baylibre.com>
+
+ PR other/42270
+ * doc/extend.texi (Nonlocal Gotos): Group with other built-ins
+ sections.
+ (Constructing Calls): Likewise.
+ (Pragmas): Move earlier in the section, before the built-ins docs.
+ (Thread-Local): Likewise.
+ (OpenMP): Likewise.
+ (OpenACC): Likewise.
+
+2025-03-23 Sandra Loosemore <sloosemore@baylibre.com>
+
+ PR other/42270
+ * doc/extend.texi (Syntax Extensions): New section.
+ (Statement Exprs): Make it a subsection of the above.
+ (Local Labels): Likewise.
+ (Labels as Values): Likewise.
+ (Nested Functions): Likewise.
+ (Typeof): Likewise.
+ (Offsetof): Likewise.
+ (Alignment): Likewise.
+ (Incomplete Enums): Likewise.
+ (Variadic Macros): Likewise.
+ (Conditionals): Likewise.
+ (Case Ranges): Likewise.
+ (Mixed Labels and Declarations): Likewise.
+ (C++ Comments): Likewise.
+ (Escaped Newlines): Likewise.
+ (Hex Floats): Likewise.
+ (Binary constants): Likewise.
+ (Dollar Signs): Likewise.
+ (Character Escapes): Likewise.
+ (Alternate Keywords): Likewise.
+ (Function Names): Likewise.
+ (Semantic Extensions): New section.
+ (Function Prototypes): Make it a subsection of the above.
+ (Pointer Arith): Likewise.
+ (Variadic Pointer Args): Likewise.
+ (Pointers to Arrays): Likewise.
+ (Const and Volatile Functions): Likewise.
+
+2025-03-23 Sandra Loosemore <sloosemore@baylibre.com>
+
+ PR other/42270
+ * doc/extend.texi (Aggregate Types): New section.
+ (Variable Length): Make it a subsection of the above.
+ (Zero Length): Likewise.
+ (Empty Structures): Likewise.
+ (Flexible Array Members in Unions): Likewise.
+ (Flexible Array Members alone in Structures): Likewise.
+ (Unnamed Fields): Likewise.
+ (Cast to Union): Likewise.
+ (Subscripting): Likewise.
+ (Initializers): Likewise.
+ (Compound Literals): Likewise.
+ (Designated Inits): Likewise.
+
+2025-03-23 Sandra Loosemore <sloosemore@baylibre.com>
+
+ PR other/42270
+ * doc/extend.texi (Additional Numeric Types): New section.
+ (__int128): Make it a subsection of the above.
+ (Long Long): Likewise.
+ (Complex): Likewise.
+ (Floating Types): Likewise.
+ (Half-Precision): Likewise.
+ (Decimal Float): Likewise.
+ (Fixed-Point): Likewise.
+
+2025-03-23 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr-mcus.def: Add AVR32SD20, AVR32SD28, AVR32SD32,
+ AVR64SD28, AVR64SD32, AVR64SD48.
+ * doc/avr-mmcu.texi: Rebuild.
+
+2025-03-23 Georg-Johann Lay <avr@gjlay.de>
+
+ * doc/invoke.texi (AVR Optimization Options)
+ <-maccumulate-args>: Refer to -fdefer-pop.
+ <-muse-nonzero-bits>: Re-formulate what the option does.
+
+2025-03-22 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.cc (avr_option_override): Use
+ "avr-peep2-after-fuse-move" as dump name instead of "peephole2".
+
+2025-03-22 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.opt.urls: Add -muse-nonzero-bits.
+
+2025-03-22 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/119421
+ * config/avr/avr.opt (-muse-nonzero-bits): New option.
+ * config/avr/avr-protos.h (avr_nonzero_bits_lsr_operands_p): New.
+ (make_avr_pass_split_nzb): New.
+ * config/avr/avr.cc (avr_nonzero_bits_lsr_operands_p): New function.
+ (avr_rtx_costs_1): Return costs for the new insns.
+ * config/avr/avr.md (nzb): New insn attribute.
+ (*nzb=1.<code>...): New insns to better support some bit
+ operations for <code> in AND, IOR, XOR.
+ * config/avr/avr-passes.def (avr_pass_split_nzb): Insert pass
+ atfer combine.
+ * config/avr/avr-passes.cc (avr_pass_data_split_nzb). New pass data.
+ (avr_pass_split_nzb): New pass.
+ (make_avr_pass_split_nzb): New function.
+ * common/config/avr/avr-common.cc (avr_option_optimization_table):
+ Enable -muse-nonzero-bits for -O2 and higher.
+ * doc/invoke.texi (AVR Options): Document -muse-nonzero-bits.
+
+2025-03-22 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.cc (avr_attrs_section_name): New function.
+ (avr_insert_attributes): Add "used" attribute to functions
+ in .initN and .finiN.
+
+2025-03-22 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.h (DL_LIBRARY): New.
+
+2025-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ * gimplify.cc (warn_switch_unreachable_and_auto_init_r): Add missing
+ space in the middle of diagnostics.
+ * tree-vect-stmts.cc (vectorizable_load): Add missing space in the
+ middle of debug dump message.
+ * sym-exec/sym-exec-state.cc (state::check_args_compatibility):
+ Likewise.
+
+2025-03-21 Surya Kumari Jangala <jskumari@linux.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/116028
+ PR rtl-optimization/118615
+ * lra-constraints.cc (first_call_insn): New variable.
+ (split_reg): Spill register before first_call_insn if call_save_p
+ and the call is in a different bb in the ebb.
+ (split_if_necessary): Formatting fix.
+ (inherit_in_ebb): Set first_call_insn when handling a CALL_INSN.
+ For successful split_if_necessary with before_p, only change
+ use_insn if it emitted any new instructions before curr_insn.
+ Clear first_call_insn before returning.
+
+2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ * builtin-types.def
+ (BT_FN_VOID_INT_INT_PTR_PTR_PTR_INT_PTR_INT_PTR_UINT_PTR): New.
+ * gimple-low.cc (lower_stmt): Handle GIMPLE_OMP_INTEROP.
+ * gimple-pretty-print.cc (dump_gimple_omp_interop): New function.
+ (pp_gimple_stmt_1): Handle GIMPLE_OMP_INTEROP.
+ * gimple.cc (gimple_build_omp_interop): New function.
+ (gimple_copy): Handle GIMPLE_OMP_INTEROP.
+ * gimple.def (GIMPLE_OMP_INTEROP): Define.
+ * gimple.h (gimple_build_omp_interop): Declare.
+ (gimple_omp_interop_clauses): New function.
+ (gimple_omp_interop_clauses_ptr): Likewise.
+ (gimple_omp_interop_set_clauses): Likewise.
+ (gimple_return_set_retval): Handle GIMPLE_OMP_INTEROP.
+ * gimplify.cc (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_INIT,
+ OMP_CLAUSE_USE and OMP_CLAUSE_DESTROY.
+ (gimplify_omp_interop): New function.
+ (gimplify_expr): Replace sorry with call to gimplify_omp_interop.
+ * omp-builtins.def (BUILT_IN_GOMP_INTEROP): Define.
+ * omp-low.cc (scan_sharing_clauses): Handle OMP_CLAUSE_INIT,
+ OMP_CLAUSE_USE and OMP_CLAUSE_DESTROY.
+ (scan_omp_1_stmt): Handle GIMPLE_OMP_INTEROP.
+ (lower_omp_interop_action_clauses): New function.
+ (lower_omp_interop): Likewise.
+ (lower_omp_1): Handle GIMPLE_OMP_INTEROP.
+
+2025-03-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/114992
+ * multiple_target.cc (create_dispatcher_calls):
+ remove_from_same_comdat_group before add_to_same_comdat_group.
+
+2025-03-21 Dhruv Chawla <dhruvc@nvidia.com>
+
+ * config/aarch64/aarch64-cores.def (olympus): New entry.
+ * config/aarch64/aarch64-tune.md: Regenerate.
+ * doc/invoke.texi (AArch64 Options): Document the above.
+
+2025-03-21 Antoni Boucher <bouanto@zoho.com>
+
+ * config/i386/i386-rust-and-jit.inc: New file.
+ * config/i386/i386-rust.cc: Move code to i386-rust-and-jit.inc.
+
+2025-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/119376
+ * ipa-icf-gimple.cc (func_checker::compare_gimple_call): Return false
+ for gimple_call_must_tail_p mismatches.
+
+2025-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/119376
+ * ipa-split.cc (split_function): Call gimple_call_set_must_tail
+ on the call to outlined partition if has_musttail and
+ !add_tsan_func_exit.
+
+2025-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/119376
+ * tree-inline.cc (remap_gimple_stmt): Silently clear
+ gimple_call_must_tail_p on inlined call stmts if id->call_stmt
+ is a call without that flag set.
+
+2025-03-21 Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
+
+ PR target/119235
+ * config/s390/s390.cc (s390_hard_regno_mode_ok): Accept only
+ Pmode for registers AP/FP/RA.
+
+2025-03-21 Richard Biener <rguenther@suse.de>
+
+ * cgraphunit.cc (symbol_table::finalize_compilation_unit):
+ Put early debug generation under TV_SYMOUT.
+
+2025-03-21 Andrew Pinski <quic_apinski@quicinc.com>
+
+ PR rtl-optimization/118914
+ * combine.cc (recog_for_combine): Add old_nregs and new_nregs
+ argument (defaulting to 0). Update call to recog_for_combine_1.
+ (combine_split_insns): Add old_nregs and new_nregs arguments,
+ store the old and new max registers to them.
+ (try_combine): Update calls to combine_split_insns and
+ pass old_nregs and new_nregs for the i3 call to recog_for_combine.
+ (find_split_point): Update call to combine_split_insns; ignoring
+ the values there.
+ (recog_for_combine_1): Add old_nregs and new_nregs arguments,
+ if the insn was recognized (and not to no-op move), add the
+ REG_DEAD notes to pnotes argument.
+
+2025-03-20 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/119389
+ * tree-ssa-sccvn.cc (dominated_by_p_w_unex): Limit the number
+ of predecessors of a CFG merge we try to skip.
+
+2025-03-20 Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
+
+ Revert:
+ 2025-03-11 Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
+
+ * config.gcc: Fail in case of option --with-mode=esa.
+ * config/s390/s390.cc (s390_option_override_internal): Default
+ to z/Architecture mode.
+ * config/s390/s390.h (DRIVER_SELF_SPECS): Ditto.
+ * config/s390/s390.opt: Emit a warning for option -mesa.
+ * doc/invoke.texi: Document the change.
+
+2025-03-20 Filip Kastl <fkastl@suse.cz>
+
+ * gimple-ssa-sccopy.cc (scc_copy_prop::propagate): Don't
+ increment after vec::unordered_remove().
+
+2025-03-20 Richard Biener <rguenther@suse.de>
+
+ * tree-core.h (function_decl_type): Make a scoped enum.
+ * tree.h (set_function_decl_type): Adjust.
+ (DECL_IS_OPERATOR_NEW_P): Likewise.
+ (DECL_SET_IS_OPERATOR_NEW): Likewise.
+ (DECL_IS_OPERATOR_DELETE_P): Likewise.
+ (DECL_SET_IS_OPERATOR_DELETE): Likewise.
+ (DECL_LAMBDA_FUNCTION_P): Likewise.
+ (DECL_SET_LAMBDA_FUNCTION): Likewise.
+ * lto-streamer-out.cc (hash_tree): Hash all of
+ FUNCTION_DECL_DECL_TYPE.
+ * tree-streamer-out.cc (pack_ts_function_decl_value_fields):
+ Adjust.
+ * config/aarch64/aarch64-simd-pragma-builtins.def (vcombine_mf8):
+ Use literal zero instead of NONE.
+
+2025-03-20 liuhongt <hongtao.liu@intel.com>
+
+ PR target/117452
+ * config/i386/i386.md (cbranchbf4): Use
+ ix86_fp_comparison_operator instead of comparison_operator.
+
+2025-03-20 Hu, Lin1 <lin1.hu@intel.com>
+
+ * config/i386/avx10_2-512satcvtintrin.h: Add "s_" before
+ intrinsics' core name.
+ * config/i386/avx10_2satcvtintrin.h: Ditto.
+
+2025-03-20 Hu, Lin1 <lin1.hu@intel.com>
+
+ * config/i386/avx10_2-512satcvtintrin.h: Add new intrinsics.
+ * config/i386/avx10_2satcvtintrin.h: Ditto.
+ * config/i386/i386-builtin-types.def:
+ Add DEF_FUNCTION_TYPE (V32HI, V32HF, V32HI, USI),
+ (V16SI, V16SF, V16SI, UHI), (V8DI, V8SF, V8DI, UQI),
+ (V8DI, V8DF, V8DI, UQI), (V8SI, V8DF, V8SI, UQI).
+ * config/i386/i386-builtin.def: Add new builtins.
+ * config/i386/i386-expand.cc: Handle V16SI_FTYPE_V16SF_V16SI_UHI,
+ V32HI_FTYPE_V32HF_V32HI_USI, V8DI_FTYPE_V8SF_V8DI_UQI,
+ V8DI_FTYPE_V8DF_V8DI_UQI, V8SI_FTYPE_V8DF_V8SI_UQI.
+
+2025-03-20 Hu, Lin1 <lin1.hu@intel.com>
+
+ * config/i386/avx10_2-512satcvtintrin.h: Change *i[u]bs's type suffix
+ of intrin name.
+ * config/i386/avx10_2satcvtintrin.h: Ditto.
+
2025-03-19 Vladimir N. Makarov <vmakarov@redhat.com>
PR target/119270
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index b76e7dd..2b52eec 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20250320
+20250324
diff --git a/gcc/builtin-types.def b/gcc/builtin-types.def
index 9b7cc99..9583d30 100644
--- a/gcc/builtin-types.def
+++ b/gcc/builtin-types.def
@@ -1015,6 +1015,9 @@ DEF_FUNCTION_TYPE_11 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_
BT_PTR_FN_VOID_PTR_PTR, BT_LONG, BT_LONG,
BT_UINT, BT_LONG, BT_INT,
BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG)
+DEF_FUNCTION_TYPE_11 (BT_FN_VOID_INT_INT_PTR_PTR_PTR_INT_PTR_INT_PTR_UINT_PTR,
+ BT_VOID, BT_INT, BT_INT, BT_PTR, BT_PTR, BT_PTR, BT_INT,
+ BT_PTR, BT_INT, BT_PTR, BT_UINT, BT_PTR)
DEF_FUNCTION_TYPE_VAR_0 (BT_FN_VOID_VAR, BT_VOID)
DEF_FUNCTION_TYPE_VAR_0 (BT_FN_INT_VAR, BT_INT)
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 01ce574..8eea7b8 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,8 @@
+2025-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ * c.opt (Wdeprecated-literal-operator): Use \"\" rather than ""
+ in option description.
+
2025-03-18 Jakub Jelinek <jakub@redhat.com>
PR c/116545
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 6c6922a..ad21698 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -666,7 +666,7 @@ type and the other is of a floating-point type.
Wdeprecated-literal-operator
C++ ObjC++ Var(warn_deprecated_literal_operator) Warning
-Warn about deprecated space between "" and suffix in a user-defined literal operator.
+Warn about deprecated space between \"\" and suffix in a user-defined literal operator.
Wdeprecated-non-prototype
C ObjC Var(warn_deprecated_non_prototype) Init(-1) Warning
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 8e5c4f7..e6eb7f8 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ * c-parser.cc (c_parser_omp_clause_destroy): Make addressable.
+ (c_parser_omp_clause_init): Make addressable.
+
2025-03-19 Jakub Jelinek <jakub@redhat.com>
PR c/119350
diff --git a/gcc/c/c-parser.cc b/gcc/c/c-parser.cc
index d49d5c5..cfb1f60 100644
--- a/gcc/c/c-parser.cc
+++ b/gcc/c/c-parser.cc
@@ -20519,7 +20519,10 @@ c_parser_omp_clause_detach (c_parser *parser, tree list)
static tree
c_parser_omp_clause_destroy (c_parser *parser, tree list)
{
- return c_parser_omp_var_list_parens (parser, OMP_CLAUSE_DESTROY, list);
+ tree nl = c_parser_omp_var_list_parens (parser, OMP_CLAUSE_DESTROY, list);
+ for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
+ TREE_ADDRESSABLE (OMP_CLAUSE_DECL (c)) = 1;
+ return nl;
}
/* OpenMP 5.1:
@@ -20901,6 +20904,7 @@ c_parser_omp_clause_init (c_parser *parser, tree list)
for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
{
+ TREE_ADDRESSABLE (OMP_CLAUSE_DECL (c)) = 1;
if (target)
OMP_CLAUSE_INIT_TARGET (c) = 1;
if (targetsync)
diff --git a/gcc/cgraphunit.cc b/gcc/cgraphunit.cc
index 82f2054..fa54a59 100644
--- a/gcc/cgraphunit.cc
+++ b/gcc/cgraphunit.cc
@@ -2588,6 +2588,8 @@ symbol_table::finalize_compilation_unit (void)
if (!seen_error ())
{
+ timevar_push (TV_SYMOUT);
+
/* Give the frontends the chance to emit early debug based on
what is still reachable in the TU. */
(*lang_hooks.finalize_early_debug) ();
@@ -2597,6 +2599,8 @@ symbol_table::finalize_compilation_unit (void)
debuginfo_early_start ();
(*debug_hooks->early_finish) (main_input_filename);
debuginfo_early_stop ();
+
+ timevar_pop (TV_SYMOUT);
}
/* Finally drive the pass manager. */
diff --git a/gcc/cobol/ChangeLog b/gcc/cobol/ChangeLog
index be421d2..3067f24 100644
--- a/gcc/cobol/ChangeLog
+++ b/gcc/cobol/ChangeLog
@@ -1,3 +1,54 @@
+2025-03-21 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcobolspec.cc (lang_specific_driver): Add libstdc++
+ for any link line.
+
+2025-03-21 Iain Sandoe <iain@sandoe.co.uk>
+
+ * gcobolspec.cc (add_arg_lib): Fix typo.
+ (lang_specific_driver): Arrange to append both -lgcobol
+ and -static-libgcobol for targets without
+ HAVE_LD_STATIC_DYNAMIC.
+
+2025-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ * parse.y: Rename COB_BLOCK to BLOCK_kw, COB_SIGNED to SIGNED_kw and
+ COB_UNSIGNED to UNSIGNED_kw.
+ * scan.l: Likewise.
+ * token_names.h: Regenerate.
+
+2025-03-21 Richard Biener <rguenther@suse.de>
+
+ * symbols.cc (empty_float, empty_comp5, empty_literal,
+ empty_conditional, debug_registers, special_registers): Move
+ global cbl_field_t typed data to ...
+ (symbol_table_init): ... local scope here.
+
+2025-03-21 Richard Biener <rguenther@suse.de>
+
+ PR cobol/119241
+ * symbols.h: Do not typedef tree.
+ * cdf.y: Include coretypes.h and tree.h.
+ * symbols.cc: Likewise.
+ * symfind.cc: Likewise.
+ * util.cc: Likewise.
+ * parse.y: Include coretypes.h and tree.h where appropriate.
+ Rename BLOCK to COB_BLOCK, SIGNED to COB_SIGNED, UNSIGNED
+ to COB_UNSIGNED.
+ * scan.l: Likewise.
+ * token_names.h: Likewise.
+ * cobol1.cc: Do not define HOWEVER_GCC_DEFINES_TREE.
+ * except.cc: Likewise.
+ * genapi.cc: Likewise.
+ * gengen.cc: Likewise.
+ * genmath.cc: Likewise.
+ * genutil.cc: Likewise.
+ * structs.cc: Likewise.
+
+2025-03-20 Iain Sandoe <iain@sandoe.co.uk>
+
+ * cdfval.h (struct cdfval_t): Overload long instead of int64_t.
+
2025-03-18 Iain Sandoe <iain@sandoe.co.uk>
* gcobolspec.cc (append_rpath): Remove.
diff --git a/gcc/cobol/cdf.y b/gcc/cobol/cdf.y
index 12d11e7..c44ee5e 100644
--- a/gcc/cobol/cdf.y
+++ b/gcc/cobol/cdf.y
@@ -30,6 +30,9 @@
%{
#include "cobol-system.h"
+#include "coretypes.h"
+#include "tree.h"
+#undef yy_flex_debug
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/cdfval.h b/gcc/cobol/cdfval.h
index 1453f2a..4682db8 100644
--- a/gcc/cobol/cdfval.h
+++ b/gcc/cobol/cdfval.h
@@ -79,7 +79,7 @@ struct cdfval_t : public cdfval_base_t {
cdfval_base_t::string = NULL;
cdfval_base_t::number = value;
}
- cdfval_t( int64_t value )
+ cdfval_t( long value )
: lineno(yylineno), filename(cobol_filename())
{
cdfval_base_t::off = false;
diff --git a/gcc/cobol/cobol1.cc b/gcc/cobol/cobol1.cc
index 08af367..0d07c46 100644
--- a/gcc/cobol/cobol1.cc
+++ b/gcc/cobol/cobol1.cc
@@ -29,7 +29,6 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks-def.h"
#include "target.h"
#include "stringpool.h"
-#define HOWEVER_GCC_DEFINES_TREE 1
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/except.cc b/gcc/cobol/except.cc
index 5374201..ba49f78 100644
--- a/gcc/cobol/except.cc
+++ b/gcc/cobol/except.cc
@@ -32,7 +32,6 @@
#include "cobol-system.h"
#include "coretypes.h"
#include "tree.h"
-#define HOWEVER_GCC_DEFINES_TREE 1
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/gcobolspec.cc b/gcc/cobol/gcobolspec.cc
index 4ae8e2c..364c14c 100644
--- a/gcc/cobol/gcobolspec.cc
+++ b/gcc/cobol/gcobolspec.cc
@@ -116,8 +116,8 @@ add_arg_lib(const char *library, bool force_static ATTRIBUTE_UNUSED)
{
append_option (OPT_Wl_, LD_STATIC_OPTION, 1);
}
- append_option (OPT_l, library, 1);
#endif
+ append_option (OPT_l, library, 1);
#ifdef HAVE_LD_STATIC_DYNAMIC
if( force_static )
{
@@ -339,10 +339,8 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
break;
case OPT_static_libgcobol:
-#ifdef HAVE_LD_STATIC_DYNAMIC
static_libgcobol = true;
need_libgcobol = true;
-#endif
break;
case OPT_l:
@@ -548,7 +546,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
break;
case OPT_static_libgcobol:
- // Don't pass this one on to cobol1
+#if !defined (HAVE_LD_STATIC_DYNAMIC)
+ // Allow the target to use spec substitution.
+ append_arg(decoded_options[i]);
+#endif
+ // Else don't pass this one on to cobol1
break;
////#ifdef __x86_64__
@@ -598,7 +600,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
{
add_arg_lib(DL_LIBRARY, static_in_general);
}
- if( need_libstdc && static_in_general )
+ if( need_libstdc )
{
add_arg_lib(STDCPP_LIBRARY, static_in_general);
}
diff --git a/gcc/cobol/genapi.cc b/gcc/cobol/genapi.cc
index a4abbd1..8f4f9b2 100644
--- a/gcc/cobol/genapi.cc
+++ b/gcc/cobol/genapi.cc
@@ -35,8 +35,6 @@
#include "stringpool.h"
#include "diagnostic-core.h"
-#define HOWEVER_GCC_DEFINES_TREE 1
-
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/gengen.cc b/gcc/cobol/gengen.cc
index 2796b7f..ffb64c8 100644
--- a/gcc/cobol/gengen.cc
+++ b/gcc/cobol/gengen.cc
@@ -95,7 +95,6 @@
#include "toplev.h"
#include "function.h"
#include "fold-const.h"
-#define HOWEVER_GCC_DEFINES_TREE 1
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/genmath.cc b/gcc/cobol/genmath.cc
index 42f01cd..56254e8 100644
--- a/gcc/cobol/genmath.cc
+++ b/gcc/cobol/genmath.cc
@@ -30,7 +30,6 @@
#include "cobol-system.h"
#include "coretypes.h"
#include "tree.h"
-#define HOWEVER_GCC_DEFINES_TREE 1
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/genutil.cc b/gcc/cobol/genutil.cc
index c0e6631..f8bf7bc 100644
--- a/gcc/cobol/genutil.cc
+++ b/gcc/cobol/genutil.cc
@@ -30,7 +30,6 @@
#include "cobol-system.h"
#include "coretypes.h"
#include "tree.h"
-#define HOWEVER_GCC_DEFINES_TREE 1
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/parse.y b/gcc/cobol/parse.y
index c45dc33..c436469 100644
--- a/gcc/cobol/parse.y
+++ b/gcc/cobol/parse.y
@@ -30,6 +30,7 @@
%code requires {
#include <fstream> // Before cobol-system because it uses poisoned functions
#include "cobol-system.h"
+ #include "coretypes.h"
#include "../../libgcobol/io.h"
#include "../../libgcobol/ec.h"
@@ -279,6 +280,11 @@
%{
#include <fstream> // Before cobol-system because it uses poisoned functions
#include "cobol-system.h"
+#include "coretypes.h"
+#include "tree.h"
+#undef cobol_dialect
+#undef cobol_exceptions
+#undef yy_flex_debug
#include "cdfval.h"
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
@@ -402,7 +408,7 @@
BASED BASECONVERT
BEFORE BINARY BIT BIT_OF "BIT-OF" BIT_TO_CHAR "BIT-TO-CHAR"
- BLANK BLOCK
+ BLANK BLOCK_kw
BOOLEAN_OF_INTEGER "BOOLEAN-OF-INTEGER"
BOTTOM BY
BYTE BYTE_LENGTH "BYTE-LENGTH"
@@ -607,7 +613,7 @@
NONE NORMAL NUMBERS
PREFIXED PREVIOUS PROHIBITED RELATION REQUIRED
REVERSE_VIDEO ROUNDING
- SECONDS SECURE SHORT SIGNED
+ SECONDS SECURE SHORT SIGNED_kw
STANDARD_BINARY "STANDARD-BINARY"
STANDARD_DECIMAL "STANDARD-DECIMAL"
STATEMENT STEP STRUCTURE
@@ -615,7 +621,7 @@
TOWARD_LESSER "TOWARD-LESSER"
TRUNCATION
UCS_4 "UCS-4"
- UNDERLINE UNSIGNED
+ UNDERLINE UNSIGNED_kw
UTF_16 "UTF-16"
UTF_8 "UTF-8"
@@ -1008,7 +1014,7 @@
BACKWARD BASED BASECONVERT
BEFORE BINARY BIT BIT_OF BIT_TO_CHAR
- BLANK BLOCK
+ BLANK BLOCK_kw
BOOLEAN_OF_INTEGER
BOTTOM BY
BYTE BYTE_LENGTH
@@ -1222,7 +1228,7 @@
NONE NORMAL NUMBERS
PREFIXED PREVIOUS PROHIBITED RELATION REQUIRED
REVERSE_VIDEO ROUNDING
- SECONDS SECURE SHORT SIGNED
+ SECONDS SECURE SHORT SIGNED_kw
STANDARD_BINARY
STANDARD_DECIMAL
STATEMENT STEP STRUCTURE
@@ -1230,7 +1236,7 @@
TOWARD_LESSER
TRUNCATION
UCS_4
- UNDERLINE UNSIGNED
+ UNDERLINE UNSIGNED_kw
UTF_16
UTF_8
@@ -2901,7 +2907,7 @@ fd_clause: record_desc
}
;
-block_desc: BLOCK contains rec_contains chars_recs
+block_desc: BLOCK_kw contains rec_contains chars_recs
;
rec_contains: NUMSTR[min] {
ssize_t n;
@@ -6522,7 +6528,7 @@ context_word: APPLY { static char s[] ="APPLY";
$$ = s; } // screen description entry
| SHORT { static char s[] ="SHORT";
$$ = s; } // DYNAMIC LENGTH STRUCTURE clause
- | SIGNED { static char s[] ="SIGNED";
+ | SIGNED_kw { static char s[] ="SIGNED";
$$ = s; } // DYNAMIC LENGTH STRUCTURE clause and USAGE clause
| STANDARD_BINARY { static char s[] ="STANDARD-BINARY";
$$ = s; } // ARITHMETIC clause
@@ -6548,7 +6554,7 @@ context_word: APPLY { static char s[] ="APPLY";
$$ = s; } // ALPHABET clause
| UNDERLINE { static char s[] ="UNDERLINE";
$$ = s; } // screen description entry and SET attribute statement
- | UNSIGNED { static char s[] ="UNSIGNED";
+ | UNSIGNED_kw { static char s[] ="UNSIGNED";
$$ = s; } // USAGE clause
| UTF_8 { static char s[] ="UTF-8";
$$ = s; } // ALPHABET clause
diff --git a/gcc/cobol/scan.l b/gcc/cobol/scan.l
index 18d0d82..2cb7d30 100644
--- a/gcc/cobol/scan.l
+++ b/gcc/cobol/scan.l
@@ -30,6 +30,9 @@
%{
#include <fstream> // Before cobol-system because it uses poisoned functions
#include "cobol-system.h"
+#include "coretypes.h"
+#include "tree.h"
+#undef yy_flex_debug
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
@@ -371,7 +374,7 @@ ROUNDING { return ROUNDING; }
SECONDS { return SECONDS; }
SECURE { return SECURE; }
SHORT { return SHORT; }
-SIGNED { return SIGNED; }
+SIGNED { return SIGNED_kw; }
STANDARD-BINARY { return STANDARD_BINARY; }
STANDARD-DECIMAL { return STANDARD_DECIMAL; }
STATEMENT { return STATEMENT; }
@@ -391,7 +394,7 @@ TOWARD-LESSER { return TOWARD_LESSER; }
TRUNCATION { return TRUNCATION; }
UCS-4 { return UCS_4; }
UNDERLINE { return UNDERLINE; }
-UNSIGNED { return UNSIGNED; }
+UNSIGNED { return UNSIGNED_kw; }
UTF-16 { return UTF_16; }
UTF-8 { return UTF_8; }
@@ -834,7 +837,7 @@ CALL { return CALL; }
BY { return BY; }
BOTTOM { return BOTTOM; }
BEFORE { return BEFORE; }
-BLOCK { return BLOCK; }
+BLOCK { return BLOCK_kw; }
BACKWARD { return BACKWARD; }
AT { return AT; }
@@ -1039,7 +1042,7 @@ USE({SPC}FOR)? { return USE; }
AS { return AS; }
ASCENDING { return ASCENDING; }
BLANK { return BLANK; }
- BLOCK { return BLOCK; }
+ BLOCK { return BLOCK_kw; }
BY { return BY; }
BYTE-LENGTH { return BYTE_LENGTH; }
CHARACTER { return CHARACTER; }
@@ -2161,7 +2164,7 @@ BASIS { yy_push_state(basis); return BASIS; }
BINARY { return BINARY; }
BIT { return BIT; }
BLANK { return BLANK; }
- BLOCK { return BLOCK; }
+ BLOCK { return BLOCK_kw; }
BOTTOM { return BOTTOM; }
BY { return BY; }
CALL { return CALL; }
diff --git a/gcc/cobol/structs.cc b/gcc/cobol/structs.cc
index 39c8a42..1d2d984 100644
--- a/gcc/cobol/structs.cc
+++ b/gcc/cobol/structs.cc
@@ -55,7 +55,6 @@
#include "cobol-system.h"
#include "coretypes.h"
#include "tree.h"
-#define HOWEVER_GCC_DEFINES_TREE 1
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/symbols.cc b/gcc/cobol/symbols.cc
index 38c7a2e..b8d785f 100644
--- a/gcc/cobol/symbols.cc
+++ b/gcc/cobol/symbols.cc
@@ -30,6 +30,10 @@
#include <fstream> // Before cobol-system because it uses poisoned functions
#include "cobol-system.h"
+
+#include "coretypes.h"
+#include "tree.h"
+
#include <search.h>
#include <iconv.h>
#include "../../libgcobol/ec.h"
@@ -291,81 +295,12 @@ symbol_valid_udf_args( size_t function, std::list<cbl_refer_t> args ) {
static const struct cbl_occurs_t nonarray = cbl_occurs_t();
-static const struct cbl_field_t empty_float = {
- 0, FldFloat, FldInvalid,
- intermediate_e,
- 0, 0, 0, nonarray, 0, "",
- 0, cbl_field_t::linkage_t(),
- {16, 16, 32, 0, NULL}, NULL };
-
-static const struct cbl_field_t empty_comp5 = {
- 0, FldNumericBin5, FldInvalid,
- signable_e | intermediate_e,
- 0, 0, 0, nonarray, 0, "",
- 0, cbl_field_t::linkage_t(),
- {16, 16, MAX_FIXED_POINT_DIGITS, 0, NULL}, NULL };
-
#if 0
# define CONSTANT_E constant_e
#else
# define CONSTANT_E intermediate_e
#endif
-static struct cbl_field_t empty_literal = {
- 0, FldInvalid, FldInvalid, CONSTANT_E,
- 0, 0, 0, nonarray, 0, "",
- 0, cbl_field_t::linkage_t(),
- {}, NULL };
-
-static const struct cbl_field_t empty_conditional = {
- 0, FldConditional, FldInvalid, intermediate_e,
- 0, 0, 0, nonarray, 0, "",
- 0, cbl_field_t::linkage_t(),
- {}, NULL };
-
-
-/**
- * Debug register record
- 01 DEBUG-ITEM.
- 02 DEBUG-LINE PIC X(6).
- 02 FILLER PIC X VALUE SPACE.
- 02 DEBUG-NAME PIC X(30).
- 02 FILLER PIC X VALUE SPACE.
- 02 DEBUG-SUB-1 PIC S9999 SIGN IS LEADING SEPARATE CHARACTER.
- 02 FILLER PIC X VALUE SPACE.
- 02 DEBUG-SUB-2 PIC S9999 SIGN IS LEADING SEPARATE CHARACTER.
- 02 FILLER PIC X VALUE SPACE.
- 02 DEBUG-SUB-3 PIC S9999 SIGN IS LEADING SEPARATE CHARACTER.
- 02 FILLER PIC X VALUE SPACE.
- 02 DEBUG-CONTENTS PIC X(76).
- **/
-
-static cbl_field_t debug_registers[] = {
- { 0, FldGroup, FldInvalid, global_e, 0,0,1, nonarray, 0,
- "DEBUG-ITEM", 0, {}, {132,132,0,0, NULL}, NULL },
- { 0, FldAlphanumeric, FldInvalid, global_e, 0,0,2, nonarray, 0,
- "DEBUG-LINE", 0, {}, {6,6,0,0, " "}, NULL },
- { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
- "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
- { 0, FldAlphanumeric, FldInvalid, global_e, 0,0,2, nonarray, 0,
- "DEBUG-NAME", 0, {}, {30,30,0,0, NULL}, NULL },
- { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
- "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
- { 0, FldNumericDisplay, FldInvalid, signable_e | global_e | leading_e | separate_e, 0,0,2, nonarray, 0,
- "DEBUG-SUB-1", 0, {}, {5,5,3,0, NULL}, NULL },
- { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
- "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
- { 0, FldNumericDisplay, FldInvalid, signable_e | global_e | leading_e | separate_e, 0,0,2, nonarray, 0,
- "DEBUG-SUB-2", 0, {}, {5,5,3,0, NULL}, NULL },
- { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
- "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
- { 0, FldNumericDisplay, FldInvalid, signable_e | global_e | leading_e | separate_e, 0,0,2, nonarray, 0,
- "DEBUG-SUB-3", 0, {}, {5,5,3,0, NULL}, NULL },
- { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
- "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
- { 0, FldAlphanumeric, FldInvalid, signable_e | global_e, 0,0,2, nonarray, 0,
- "DEBUG-CONTENTS", 0, {}, {76,76,0,0, NULL}, NULL },
-};
class group_size_t {
size_t size;
@@ -380,26 +315,6 @@ class group_size_t {
enum { constq = constant_e | quoted_e };
-static cbl_field_t special_registers[] = {
- { 0, FldNumericDisplay, FldInvalid, 0, 0, 0, 0, nonarray, 0, "_FILE_STATUS",
- 0, {}, {2,2,2,0, NULL}, NULL },
- { 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "UPSI-0",
- 0, {}, {2,2,4,0, NULL}, NULL },
- { 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "RETURN-CODE",
- 0, {}, {2,2,4,0, NULL}, NULL },
- { 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "LINAGE-COUNTER",
- 0, {}, {2,2,4,0, NULL}, NULL },
- { 0, FldLiteralA, FldInvalid, 0, 0, 0, 0, nonarray, 0, "_dev_stdin",
- 0, {}, {0,0,0,0, "/dev/stdin"}, NULL },
- { 0, FldLiteralA, FldInvalid, constq, 0, 0, 0, nonarray, 0, "_dev_stdout",
- 0, {}, {0,0,0,0, "/dev/stdout"}, NULL },
- { 0, FldLiteralA, FldInvalid, constq, 0, 0, 0, nonarray, 0, "_dev_stderr",
- 0, {}, {0,0,0,0, "/dev/stderr"}, NULL },
- { 0, FldLiteralA, FldInvalid, constq, 0, 0, 0, nonarray, 0, "_dev_null",
- 0, {}, {0,0,0,0, "/dev/null"}, NULL },
-
-};
-
static symbol_elem_t
elementize( cbl_field_t& field ) {
symbol_elem_t sym (SymField);
@@ -2371,6 +2286,49 @@ symbol_table_init(void) {
assert(table.nelem < table.capacity);
+ /**
+ * Debug register record
+ 01 DEBUG-ITEM.
+ 02 DEBUG-LINE PIC X(6).
+ 02 FILLER PIC X VALUE SPACE.
+ 02 DEBUG-NAME PIC X(30).
+ 02 FILLER PIC X VALUE SPACE.
+ 02 DEBUG-SUB-1 PIC S9999 SIGN IS LEADING SEPARATE CHARACTER.
+ 02 FILLER PIC X VALUE SPACE.
+ 02 DEBUG-SUB-2 PIC S9999 SIGN IS LEADING SEPARATE CHARACTER.
+ 02 FILLER PIC X VALUE SPACE.
+ 02 DEBUG-SUB-3 PIC S9999 SIGN IS LEADING SEPARATE CHARACTER.
+ 02 FILLER PIC X VALUE SPACE.
+ 02 DEBUG-CONTENTS PIC X(76).
+ **/
+
+ static cbl_field_t debug_registers[] = {
+ { 0, FldGroup, FldInvalid, global_e, 0,0,1, nonarray, 0,
+ "DEBUG-ITEM", 0, {}, {132,132,0,0, NULL}, NULL },
+ { 0, FldAlphanumeric, FldInvalid, global_e, 0,0,2, nonarray, 0,
+ "DEBUG-LINE", 0, {}, {6,6,0,0, " "}, NULL },
+ { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
+ "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
+ { 0, FldAlphanumeric, FldInvalid, global_e, 0,0,2, nonarray, 0,
+ "DEBUG-NAME", 0, {}, {30,30,0,0, NULL}, NULL },
+ { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
+ "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
+ { 0, FldNumericDisplay, FldInvalid, signable_e | global_e | leading_e | separate_e, 0,0,2, nonarray, 0,
+ "DEBUG-SUB-1", 0, {}, {5,5,3,0, NULL}, NULL },
+ { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
+ "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
+ { 0, FldNumericDisplay, FldInvalid, signable_e | global_e | leading_e | separate_e, 0,0,2, nonarray, 0,
+ "DEBUG-SUB-2", 0, {}, {5,5,3,0, NULL}, NULL },
+ { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
+ "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
+ { 0, FldNumericDisplay, FldInvalid, signable_e | global_e | leading_e | separate_e, 0,0,2, nonarray, 0,
+ "DEBUG-SUB-3", 0, {}, {5,5,3,0, NULL}, NULL },
+ { 0, FldAlphanumeric, FldInvalid, 0, 0,0,2, nonarray, 0,
+ "FILLER", 0, {}, {1,1,0,0, " "}, NULL },
+ { 0, FldAlphanumeric, FldInvalid, signable_e | global_e, 0,0,2, nonarray, 0,
+ "DEBUG-CONTENTS", 0, {}, {76,76,0,0, NULL}, NULL },
+};
+
// debug registers
assert(table.nelem + COUNT_OF(debug_registers) < table.capacity);
@@ -2387,6 +2345,25 @@ symbol_table_init(void) {
assert(table.nelem < table.capacity);
std::for_each(debug_start+1, p, parent_elem_set(debug_start - table.elems));
+ static cbl_field_t special_registers[] = {
+ { 0, FldNumericDisplay, FldInvalid, 0, 0, 0, 0, nonarray, 0, "_FILE_STATUS",
+ 0, {}, {2,2,2,0, NULL}, NULL },
+ { 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "UPSI-0",
+ 0, {}, {2,2,4,0, NULL}, NULL },
+ { 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "RETURN-CODE",
+ 0, {}, {2,2,4,0, NULL}, NULL },
+ { 0, FldNumericBin5, FldInvalid, 0, 0, 0, 0, nonarray, 0, "LINAGE-COUNTER",
+ 0, {}, {2,2,4,0, NULL}, NULL },
+ { 0, FldLiteralA, FldInvalid, 0, 0, 0, 0, nonarray, 0, "_dev_stdin",
+ 0, {}, {0,0,0,0, "/dev/stdin"}, NULL },
+ { 0, FldLiteralA, FldInvalid, constq, 0, 0, 0, nonarray, 0, "_dev_stdout",
+ 0, {}, {0,0,0,0, "/dev/stdout"}, NULL },
+ { 0, FldLiteralA, FldInvalid, constq, 0, 0, 0, nonarray, 0, "_dev_stderr",
+ 0, {}, {0,0,0,0, "/dev/stderr"}, NULL },
+ { 0, FldLiteralA, FldInvalid, constq, 0, 0, 0, nonarray, 0, "_dev_null",
+ 0, {}, {0,0,0,0, "/dev/null"}, NULL },
+ };
+
// special registers
assert(table.nelem + COUNT_OF(special_registers) < table.capacity);
@@ -3261,6 +3238,28 @@ new_temporary_impl( enum cbl_field_type_t type )
intermediate_e, 0, 0, 0, nonarray, 0, "",
0, cbl_field_t::linkage_t(),
{}, NULL };
+ static const struct cbl_field_t empty_float = {
+ 0, FldFloat, FldInvalid,
+ intermediate_e,
+ 0, 0, 0, nonarray, 0, "",
+ 0, cbl_field_t::linkage_t(),
+ {16, 16, 32, 0, NULL}, NULL };
+ static const struct cbl_field_t empty_comp5 = {
+ 0, FldNumericBin5, FldInvalid,
+ signable_e | intermediate_e,
+ 0, 0, 0, nonarray, 0, "",
+ 0, cbl_field_t::linkage_t(),
+ {16, 16, MAX_FIXED_POINT_DIGITS, 0, NULL}, NULL };
+ static const struct cbl_field_t empty_conditional = {
+ 0, FldConditional, FldInvalid, intermediate_e,
+ 0, 0, 0, nonarray, 0, "",
+ 0, cbl_field_t::linkage_t(),
+ {}, NULL };
+ static struct cbl_field_t empty_literal = {
+ 0, FldInvalid, FldInvalid, CONSTANT_E,
+ 0, 0, 0, nonarray, 0, "",
+ 0, cbl_field_t::linkage_t(),
+ {}, NULL };
struct cbl_field_t *f = new cbl_field_t;
f->type = type;
diff --git a/gcc/cobol/symbols.h b/gcc/cobol/symbols.h
index c189412..fb7b60d 100644
--- a/gcc/cobol/symbols.h
+++ b/gcc/cobol/symbols.h
@@ -48,11 +48,6 @@
#define PICTURE_MAX 64
-// Define a tree type as void pointer outside the generator code.
-#ifndef HOWEVER_GCC_DEFINES_TREE
-typedef void *tree;
-#endif
-
#if ! (__HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT))
static_assert( sizeof(output) == sizeof(long double), "long doubles?" );
diff --git a/gcc/cobol/symfind.cc b/gcc/cobol/symfind.cc
index 38a8900..2687fdb 100644
--- a/gcc/cobol/symfind.cc
+++ b/gcc/cobol/symfind.cc
@@ -31,6 +31,9 @@
#include "cobol-system.h"
+#include "coretypes.h"
+#include "tree.h"
+
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "util.h"
diff --git a/gcc/cobol/token_names.h b/gcc/cobol/token_names.h
index 26dabc8..a082078 100644
--- a/gcc/cobol/token_names.h
+++ b/gcc/cobol/token_names.h
@@ -1,5 +1,5 @@
// generated by ./token_names.h.gen ../../build/gcc/cobol/parse.h
-// Fri Jan 31 05:52:10 EST 2025
+// Fri Mar 21 10:13:54 CET 2025
tokens = {
{ "identification", IDENTIFICATION_DIV }, // 258
{ "environment", ENVIRONMENT_DIV }, // 259
@@ -219,7 +219,7 @@ tokens = {
{ "bit-of", BIT_OF }, // 470
{ "bit-to-char", BIT_TO_CHAR }, // 471
{ "blank", BLANK }, // 472
- { "block", BLOCK }, // 473
+ { "block", BLOCK_kw }, // 473
{ "boolean-of-integer", BOOLEAN_OF_INTEGER }, // 474
{ "bottom", BOTTOM }, // 475
{ "by", BY }, // 476
@@ -642,7 +642,7 @@ tokens = {
{ "seconds", SECONDS }, // 891
{ "secure", SECURE }, // 892
{ "short", SHORT }, // 893
- { "signed", SIGNED }, // 894
+ { "signed", SIGNED_kw }, // 894
{ "standard-binary", STANDARD_BINARY }, // 895
{ "standard-decimal", STANDARD_DECIMAL }, // 896
{ "statement", STATEMENT }, // 897
@@ -653,7 +653,7 @@ tokens = {
{ "truncation", TRUNCATION }, // 902
{ "ucs-4", UCS_4 }, // 903
{ "underline", UNDERLINE }, // 904
- { "unsigned", UNSIGNED }, // 905
+ { "unsigned", UNSIGNED_kw }, // 905
{ "utf-16", UTF_16 }, // 906
{ "utf-8", UTF_8 }, // 907
{ "address", ADDRESS }, // 908
diff --git a/gcc/cobol/util.cc b/gcc/cobol/util.cc
index 101a0a0..1c0810b 100644
--- a/gcc/cobol/util.cc
+++ b/gcc/cobol/util.cc
@@ -35,6 +35,10 @@
*/
#include "cobol-system.h"
+#include "coretypes.h"
+#include "tree.h"
+#undef yy_flex_debug
+
#include <langinfo.h>
#include "coretypes.h"
@@ -55,7 +59,6 @@
#include "cbldiag.h"
#include "lexio.h"
-#define HOWEVER_GCC_DEFINES_TREE
#include "../../libgcobol/ec.h"
#include "../../libgcobol/common-defs.h"
#include "symbols.h"
diff --git a/gcc/combine.cc b/gcc/combine.cc
index 1b2bd34..ef13f5d 100644
--- a/gcc/combine.cc
+++ b/gcc/combine.cc
@@ -454,7 +454,7 @@ static bool merge_outer_ops (enum rtx_code *, HOST_WIDE_INT *, enum rtx_code,
static rtx simplify_shift_const_1 (enum rtx_code, machine_mode, rtx, int);
static rtx simplify_shift_const (rtx, enum rtx_code, machine_mode, rtx,
int);
-static int recog_for_combine (rtx *, rtx_insn *, rtx *);
+static int recog_for_combine (rtx *, rtx_insn *, rtx *, unsigned = 0, unsigned = 0);
static rtx gen_lowpart_for_combine (machine_mode, rtx);
static enum rtx_code simplify_compare_const (enum rtx_code, machine_mode,
rtx *, rtx *);
@@ -515,18 +515,22 @@ target_canonicalize_comparison (enum rtx_code *code, rtx *op0, rtx *op1,
/* Try to split PATTERN found in INSN. This returns NULL_RTX if
PATTERN cannot be split. Otherwise, it returns an insn sequence.
+ Updates OLD_NREGS with the max number of regs before the split
+ and NEW_NREGS after the split.
This is a wrapper around split_insns which ensures that the
reg_stat vector is made larger if the splitter creates a new
register. */
static rtx_insn *
-combine_split_insns (rtx pattern, rtx_insn *insn)
+combine_split_insns (rtx pattern, rtx_insn *insn,
+ unsigned int *old_nregs,
+ unsigned int *new_regs)
{
rtx_insn *ret;
unsigned int nregs;
-
+ *old_nregs = max_reg_num ();
ret = split_insns (pattern, insn);
- nregs = max_reg_num ();
+ *new_regs = nregs = max_reg_num ();
if (nregs > reg_stat.length ())
reg_stat.safe_grow_cleared (nregs, true);
return ret;
@@ -3566,12 +3570,13 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
{
rtx parallel, *split;
rtx_insn *m_split_insn;
+ unsigned int old_nregs, new_nregs;
/* See if the MD file can split NEWPAT. If it can't, see if letting it
use I2DEST as a scratch register will help. In the latter case,
convert I2DEST to the mode of the source of NEWPAT if we can. */
- m_split_insn = combine_split_insns (newpat, i3);
+ m_split_insn = combine_split_insns (newpat, i3, &old_nregs, &new_nregs);
/* We can only use I2DEST as a scratch reg if it doesn't overlap any
inputs of NEWPAT. */
@@ -3599,7 +3604,7 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
gen_rtvec (2, newpat,
gen_rtx_CLOBBER (VOIDmode,
i2dest)));
- m_split_insn = combine_split_insns (parallel, i3);
+ m_split_insn = combine_split_insns (parallel, i3, &old_nregs, &new_nregs);
/* If that didn't work, try changing the mode of I2DEST if
we can. */
@@ -3624,7 +3629,7 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
gen_rtvec (2, newpat,
gen_rtx_CLOBBER (VOIDmode,
ni2dest))));
- m_split_insn = combine_split_insns (parallel, i3);
+ m_split_insn = combine_split_insns (parallel, i3, &old_nregs, &new_nregs);
if (m_split_insn == 0
&& REGNO (i2dest) >= FIRST_PSEUDO_REGISTER)
@@ -3647,13 +3652,14 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
if (m_split_insn == 0 && newpat_vec_with_clobbers)
{
parallel = gen_rtx_PARALLEL (VOIDmode, newpat_vec_with_clobbers);
- m_split_insn = combine_split_insns (parallel, i3);
+ m_split_insn = combine_split_insns (parallel, i3, &old_nregs, &new_nregs);
}
if (m_split_insn && NEXT_INSN (m_split_insn) == NULL_RTX)
{
rtx m_split_pat = PATTERN (m_split_insn);
- insn_code_number = recog_for_combine (&m_split_pat, i3, &new_i3_notes);
+ insn_code_number = recog_for_combine (&m_split_pat, i3, &new_i3_notes,
+ old_nregs, new_nregs);
if (insn_code_number >= 0)
newpat = m_split_pat;
}
@@ -3678,7 +3684,8 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
&& (next_nonnote_nondebug_insn (i2) == i3
|| ! reg_used_between_p (SET_DEST (i2set), i2, i3)))
insn_code_number = recog_for_combine (&newi3pat, i3,
- &new_i3_notes);
+ &new_i3_notes,
+ old_nregs, new_nregs);
if (insn_code_number >= 0)
newpat = newi3pat;
@@ -4915,8 +4922,9 @@ find_split_point (rtx *loc, rtx_insn *insn, bool set_src)
MEM_ADDR_SPACE (x)))
{
rtx reg = regno_reg_rtx[FIRST_PSEUDO_REGISTER];
+ unsigned int old_nregs, new_nregs;
rtx_insn *seq = combine_split_insns (gen_rtx_SET (reg, XEXP (x, 0)),
- subst_insn);
+ subst_insn, &old_nregs, &new_nregs);
/* This should have produced two insns, each of which sets our
placeholder. If the source of the second is a valid address,
@@ -11418,7 +11426,8 @@ simplify_shift_const (rtx x, enum rtx_code code, machine_mode result_mode,
return value. */
static int
-recog_for_combine_1 (rtx *pnewpat, rtx_insn *insn, rtx *pnotes)
+recog_for_combine_1 (rtx *pnewpat, rtx_insn *insn, rtx *pnotes,
+ unsigned old_nregs, unsigned new_nregs)
{
rtx pat = *pnewpat;
rtx pat_without_clobbers;
@@ -11534,6 +11543,9 @@ recog_for_combine_1 (rtx *pnewpat, rtx_insn *insn, rtx *pnotes)
if (insn_code_number >= 0
&& insn_code_number != NOOP_MOVE_INSN_CODE)
{
+ /* Create the reg dead notes if needed for the regs that were created via split. */
+ for (; old_nregs < new_nregs; old_nregs++)
+ notes = alloc_reg_note (REG_DEAD, regno_reg_rtx[old_nregs], notes);
old_pat = PATTERN (insn);
old_notes = REG_NOTES (insn);
old_icode = INSN_CODE (insn);
@@ -11705,15 +11717,18 @@ change_zero_ext (rtx pat)
PNOTES is a pointer to a location where any REG_UNUSED notes added for
the CLOBBERs are placed.
+ If OLD_NREGS != NEW_NREGS, then PNOTES also includes REG_DEAD notes added.
The value is the final insn code from the pattern ultimately matched,
or -1. */
static int
-recog_for_combine (rtx *pnewpat, rtx_insn *insn, rtx *pnotes)
+recog_for_combine (rtx *pnewpat, rtx_insn *insn, rtx *pnotes,
+ unsigned int old_nregs, unsigned int new_nregs)
{
rtx pat = *pnewpat;
- int insn_code_number = recog_for_combine_1 (pnewpat, insn, pnotes);
+ int insn_code_number = recog_for_combine_1 (pnewpat, insn, pnotes,
+ old_nregs, new_nregs);
if (insn_code_number >= 0 || check_asm_operands (pat))
return insn_code_number;
@@ -11755,7 +11770,8 @@ recog_for_combine (rtx *pnewpat, rtx_insn *insn, rtx *pnotes)
if (changed)
{
- insn_code_number = recog_for_combine_1 (pnewpat, insn, pnotes);
+ insn_code_number = recog_for_combine_1 (pnewpat, insn, pnotes,
+ old_nregs, new_nregs);
if (insn_code_number < 0)
undo_to_marker (marker);
diff --git a/gcc/common/config/avr/avr-common.cc b/gcc/common/config/avr/avr-common.cc
index 06c6cc8..203a965 100644
--- a/gcc/common/config/avr/avr-common.cc
+++ b/gcc/common/config/avr/avr-common.cc
@@ -42,6 +42,7 @@ static const struct default_options avr_option_optimization_table[] =
{ OPT_LEVELS_2_PLUS, OPT_mfuse_move_, NULL, 23 },
{ OPT_LEVELS_2_PLUS, OPT_msplit_bit_shift, NULL, 1 },
{ OPT_LEVELS_2_PLUS, OPT_msplit_ldst, NULL, 1 },
+ { OPT_LEVELS_2_PLUS, OPT_muse_nonzero_bits, NULL, 1 },
// Stick to the "old" placement of the subreg lowering pass.
{ OPT_LEVELS_1_PLUS, OPT_fsplit_wide_types_early, NULL, 1 },
/* Allow optimizer to introduce store data races. This used to be the
diff --git a/gcc/common/config/i386/cpuinfo.h b/gcc/common/config/i386/cpuinfo.h
index a6ede14..e7e575c 100644
--- a/gcc/common/config/i386/cpuinfo.h
+++ b/gcc/common/config/i386/cpuinfo.h
@@ -1037,32 +1037,20 @@ get_available_features (struct __processor_model *cpu_model,
{
__cpuid_count (0x24, 0, eax, ebx, ecx, edx);
version = ebx & 0xff;
- if (ebx & bit_AVX10_256)
- switch (version)
- {
- case 2:
- set_feature (FEATURE_AVX10_2_256);
- /* Fall through. */
- case 1:
- set_feature (FEATURE_AVX10_1_256);
- break;
- default:
- set_feature (FEATURE_AVX10_1_256);
- break;
- }
- if (ebx & bit_AVX10_512)
- switch (version)
- {
- case 2:
- set_feature (FEATURE_AVX10_2_512);
- /* Fall through. */
- case 1:
- set_feature (FEATURE_AVX10_1_512);
- break;
- default:
- set_feature (FEATURE_AVX10_1_512);
- break;
- }
+ switch (version)
+ {
+ case 2:
+ set_feature (FEATURE_AVX10_2);
+ /* Fall through. */
+ case 1:
+ set_feature (FEATURE_AVX10_1);
+ set_feature (FEATURE_AVX10_1_256);
+ break;
+ default:
+ set_feature (FEATURE_AVX10_1);
+ set_feature (FEATURE_AVX10_1_256);
+ break;
+ }
}
/* Check cpuid level of extended features. */
diff --git a/gcc/common/config/i386/i386-common.cc b/gcc/common/config/i386/i386-common.cc
index 1788b57..80aec32 100644
--- a/gcc/common/config/i386/i386-common.cc
+++ b/gcc/common/config/i386/i386-common.cc
@@ -120,15 +120,12 @@ along with GCC; see the file COPYING3. If not see
#define OPTION_MASK_ISA2_EVEX512_SET OPTION_MASK_ISA2_EVEX512
#define OPTION_MASK_ISA2_USER_MSR_SET OPTION_MASK_ISA2_USER_MSR
#define OPTION_MASK_ISA2_AVX10_1_256_SET OPTION_MASK_ISA2_AVX10_1_256
-#define OPTION_MASK_ISA2_AVX10_1_512_SET \
- (OPTION_MASK_ISA2_AVX10_1_256_SET | OPTION_MASK_ISA2_AVX10_1_512)
-#define OPTION_MASK_ISA2_AVX10_2_256_SET \
- (OPTION_MASK_ISA2_AVX10_1_256_SET | OPTION_MASK_ISA2_AVX10_2_256)
-#define OPTION_MASK_ISA2_AVX10_2_512_SET \
- (OPTION_MASK_ISA2_AVX10_1_512_SET | OPTION_MASK_ISA2_AVX10_2_256_SET \
- | OPTION_MASK_ISA2_AVX10_2_512)
+#define OPTION_MASK_ISA2_AVX10_1_SET \
+ (OPTION_MASK_ISA2_AVX10_1_256_SET | OPTION_MASK_ISA2_AVX10_1)
+#define OPTION_MASK_ISA2_AVX10_2_SET \
+ (OPTION_MASK_ISA2_AVX10_1_SET | OPTION_MASK_ISA2_AVX10_2)
#define OPTION_MASK_ISA2_AMX_AVX512_SET \
- (OPTION_MASK_ISA2_AMX_TILE_SET | OPTION_MASK_ISA2_AVX10_2_512_SET \
+ (OPTION_MASK_ISA2_AMX_TILE_SET | OPTION_MASK_ISA2_AVX10_2_SET \
| OPTION_MASK_ISA2_AMX_AVX512)
#define OPTION_MASK_ISA2_AMX_TF32_SET \
(OPTION_MASK_ISA2_AMX_TILE_SET | OPTION_MASK_ISA2_AMX_TF32)
@@ -326,11 +323,10 @@ along with GCC; see the file COPYING3. If not see
#define OPTION_MASK_ISA2_EVEX512_UNSET OPTION_MASK_ISA2_EVEX512
#define OPTION_MASK_ISA2_USER_MSR_UNSET OPTION_MASK_ISA2_USER_MSR
#define OPTION_MASK_ISA2_AVX10_1_UNSET \
- (OPTION_MASK_ISA2_AVX10_1_256 | OPTION_MASK_ISA2_AVX10_1_512 \
+ (OPTION_MASK_ISA2_AVX10_1_256 | OPTION_MASK_ISA2_AVX10_1 \
| OPTION_MASK_ISA2_AVX10_2_UNSET)
#define OPTION_MASK_ISA2_AVX10_2_UNSET \
- (OPTION_MASK_ISA2_AVX10_2_256 | OPTION_MASK_ISA2_AVX10_2_512 \
- | OPTION_MASK_ISA2_AMX_AVX512_UNSET)
+ (OPTION_MASK_ISA2_AVX10_2 | OPTION_MASK_ISA2_AMX_AVX512_UNSET)
#define OPTION_MASK_ISA2_AMX_AVX512_UNSET OPTION_MASK_ISA2_AMX_AVX512
#define OPTION_MASK_ISA2_AMX_TF32_UNSET OPTION_MASK_ISA2_AMX_TF32
#define OPTION_MASK_ISA2_AMX_TRANSPOSE_UNSET OPTION_MASK_ISA2_AMX_TRANSPOSE
@@ -1382,11 +1378,11 @@ ix86_handle_option (struct gcc_options *opts,
}
return true;
- case OPT_mavx10_1_512:
+ case OPT_mavx10_1:
if (value)
{
- opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10_1_512_SET;
- opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10_1_512_SET;
+ opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10_1_SET;
+ opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10_1_SET;
opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AVX2_SET;
opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_AVX2_SET;
}
@@ -1398,21 +1394,11 @@ ix86_handle_option (struct gcc_options *opts,
}
return true;
- case OPT_mavx10_2_256:
- if (value)
- {
- opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10_2_256_SET;
- opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10_2_256_SET;
- opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AVX2_SET;
- opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_AVX2_SET;
- }
- return true;
-
case OPT_mavx10_2:
if (value)
{
- opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10_2_512_SET;
- opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10_2_512_SET;
+ opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_AVX10_2_SET;
+ opts->x_ix86_isa_flags2_explicit |= OPTION_MASK_ISA2_AVX10_2_SET;
opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AVX2_SET;
opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_AVX2_SET;
}
@@ -2325,10 +2311,10 @@ const pta processor_alias_table[] =
{"meteorlake", PROCESSOR_ALDERLAKE, CPU_HASWELL, PTA_ALDERLAKE,
M_CPU_SUBTYPE (INTEL_COREI7_ALDERLAKE), P_PROC_AVX2},
{"graniterapids", PROCESSOR_GRANITERAPIDS, CPU_HASWELL, PTA_GRANITERAPIDS,
- M_CPU_SUBTYPE (INTEL_COREI7_GRANITERAPIDS), P_PROC_AVX10_1_512},
+ M_CPU_SUBTYPE (INTEL_COREI7_GRANITERAPIDS), P_PROC_AVX10_1},
{"graniterapids-d", PROCESSOR_GRANITERAPIDS_D, CPU_HASWELL,
PTA_GRANITERAPIDS_D, M_CPU_SUBTYPE (INTEL_COREI7_GRANITERAPIDS_D),
- P_PROC_AVX10_1_512},
+ P_PROC_AVX10_1},
{"arrowlake", PROCESSOR_ARROWLAKE, CPU_HASWELL, PTA_ARROWLAKE,
M_CPU_SUBTYPE (INTEL_COREI7_ARROWLAKE), P_PROC_AVX2},
{"arrowlake-s", PROCESSOR_ARROWLAKE_S, CPU_HASWELL, PTA_ARROWLAKE_S,
@@ -2338,7 +2324,7 @@ const pta processor_alias_table[] =
{"pantherlake", PROCESSOR_PANTHERLAKE, CPU_HASWELL, PTA_PANTHERLAKE,
M_CPU_SUBTYPE (INTEL_COREI7_PANTHERLAKE), P_PROC_AVX2},
{"diamondrapids", PROCESSOR_DIAMONDRAPIDS, CPU_HASWELL, PTA_DIAMONDRAPIDS,
- M_CPU_SUBTYPE (INTEL_COREI7_DIAMONDRAPIDS), P_PROC_AVX512F},
+ M_CPU_SUBTYPE (INTEL_COREI7_DIAMONDRAPIDS), P_PROC_AVX10_1},
{"bonnell", PROCESSOR_BONNELL, CPU_ATOM, PTA_BONNELL,
M_CPU_TYPE (INTEL_BONNELL), P_PROC_SSSE3},
{"atom", PROCESSOR_BONNELL, CPU_ATOM, PTA_BONNELL,
diff --git a/gcc/common/config/i386/i386-cpuinfo.h b/gcc/common/config/i386/i386-cpuinfo.h
index 996eff2..6b2ab0a 100644
--- a/gcc/common/config/i386/i386-cpuinfo.h
+++ b/gcc/common/config/i386/i386-cpuinfo.h
@@ -149,8 +149,8 @@ enum feature_priority
P_PROC_AVX512F,
P_X86_64_V4,
P_AVX10_1_256,
- P_AVX10_1_512,
- P_PROC_AVX10_1_512,
+ P_AVX10_1,
+ P_PROC_AVX10_1,
P_PROC_DYNAMIC
};
@@ -267,9 +267,8 @@ enum processor_features
FEATURE_APX_F,
FEATURE_USER_MSR,
FEATURE_AVX10_1_256,
- FEATURE_AVX10_1_512,
- FEATURE_AVX10_2_256,
- FEATURE_AVX10_2_512,
+ FEATURE_AVX10_1,
+ FEATURE_AVX10_2 = 116,
FEATURE_AMX_AVX512,
FEATURE_AMX_TF32,
FEATURE_AMX_TRANSPOSE,
diff --git a/gcc/common/config/i386/i386-isas.h b/gcc/common/config/i386/i386-isas.h
index 9dbbc6a..55af985 100644
--- a/gcc/common/config/i386/i386-isas.h
+++ b/gcc/common/config/i386/i386-isas.h
@@ -184,10 +184,9 @@ ISA_NAMES_TABLE_START
ISA_NAMES_TABLE_ENTRY("apxf", FEATURE_APX_F, P_NONE, "-mapxf")
ISA_NAMES_TABLE_ENTRY("usermsr", FEATURE_USER_MSR, P_NONE, "-musermsr")
ISA_NAMES_TABLE_ENTRY("avx10.1-256", FEATURE_AVX10_1_256, P_AVX10_1_256, "-mavx10.1-256")
- ISA_NAMES_TABLE_ENTRY("avx10.1-512", FEATURE_AVX10_1_512, P_AVX10_1_512, "-mavx10.1-512")
- ISA_NAMES_TABLE_ENTRY("avx10.2", FEATURE_AVX10_2_512, P_NONE, "-mavx10.2")
- ISA_NAMES_TABLE_ENTRY("avx10.2-256", FEATURE_AVX10_2_256, P_NONE, "-mavx10.2-256")
- ISA_NAMES_TABLE_ENTRY("avx10.2-512", FEATURE_AVX10_2_512, P_NONE, NULL)
+ ISA_NAMES_TABLE_ENTRY("avx10.1", FEATURE_AVX10_1, P_AVX10_1, "-mavx10.1")
+ ISA_NAMES_TABLE_ENTRY("avx10.1-512", FEATURE_AVX10_1, P_AVX10_1, "-mavx10.1-512")
+ ISA_NAMES_TABLE_ENTRY("avx10.2", FEATURE_AVX10_2, P_NONE, "-mavx10.2")
ISA_NAMES_TABLE_ENTRY("amx-avx512", FEATURE_AMX_AVX512, P_NONE,
"-mamx-avx512")
ISA_NAMES_TABLE_ENTRY("amx-tf32", FEATURE_AMX_TF32, P_NONE, "-mamx-tf32")
diff --git a/gcc/config.gcc b/gcc/config.gcc
index c4816e2..f7f2002 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -450,8 +450,7 @@ i[34567]86-*-* | x86_64-*-*)
avxvnniint8intrin.h avxneconvertintrin.h
cmpccxaddintrin.h amxfp16intrin.h prfchiintrin.h
raointintrin.h amxcomplexintrin.h avxvnniint16intrin.h
- sm3intrin.h sha512intrin.h sm4intrin.h
- usermsrintrin.h avx10_2roundingintrin.h
+ sm3intrin.h sha512intrin.h sm4intrin.h usermsrintrin.h
avx10_2mediaintrin.h avx10_2-512mediaintrin.h
avx10_2convertintrin.h avx10_2-512convertintrin.h
avx10_2bf16intrin.h avx10_2-512bf16intrin.h
@@ -5768,13 +5767,9 @@ case "${target}" in
done
case ${with_mode} in
- "" | zarch)
+ "" | esa | zarch)
# OK
;;
- esa)
- echo "Support for ESA/390 is deprecated; use z/Architecture instead." 1>&2
- exit 1
- ;;
*)
echo "Unknown architecture mode used in --with-mode=$with_mode." 1>&2
exit 1
diff --git a/gcc/config/aarch64/aarch64-cores.def b/gcc/config/aarch64/aarch64-cores.def
index 5ac8133..0e22d72 100644
--- a/gcc/config/aarch64/aarch64-cores.def
+++ b/gcc/config/aarch64/aarch64-cores.def
@@ -207,6 +207,9 @@ AARCH64_CORE("neoverse-v3ae", neoversev3ae, cortexa57, V9_2A, (SVE2_BITPERM, RNG
AARCH64_CORE("demeter", demeter, cortexa57, V9A, (I8MM, BF16, SVE2_BITPERM, RNG, MEMTAG, PROFILE), neoversev2, 0x41, 0xd4f, -1)
+/* NVIDIA ('N') cores. */
+AARCH64_CORE("olympus", olympus, cortexa57, V9_2A, (SVE2_BITPERM, RNG, LS64, MEMTAG, PROFILE, FAMINMAX, FP8DOT2, LUT, SVE2_AES, SVE2_SHA3, SVE2_SM4), neoversev3, 0x4e, 0x10, -1)
+
/* Generic Architecture Processors. */
AARCH64_CORE("generic", generic, cortexa53, V8A, (), generic, 0x0, 0x0, -1)
AARCH64_CORE("generic-armv8-a", generic_armv8_a, cortexa53, V8A, (), generic_armv8_a, 0x0, 0x0, -1)
diff --git a/gcc/config/aarch64/aarch64-tune.md b/gcc/config/aarch64/aarch64-tune.md
index 54c65cb..56a914f 100644
--- a/gcc/config/aarch64/aarch64-tune.md
+++ b/gcc/config/aarch64/aarch64-tune.md
@@ -1,5 +1,5 @@
;; -*- buffer-read-only: t -*-
;; Generated automatically by gentune.sh from aarch64-cores.def
(define_attr "tune"
- "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88,thunderxt88p1,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,fujitsu_monaka,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,oryon1,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexr82ae,cortexa510,cortexa520,cortexa520ae,cortexa710,cortexa715,cortexa720,cortexa720ae,cortexa725,cortexx2,cortexx3,cortexx4,cortexx925,neoversen2,cobalt100,neoversen3,neoversev2,grace,neoversev3,neoversev3ae,demeter,generic,generic_armv8_a,generic_armv9_a"
+ "cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88,thunderxt88p1,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,fujitsu_monaka,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,oryon1,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexr82ae,cortexa510,cortexa520,cortexa520ae,cortexa710,cortexa715,cortexa720,cortexa720ae,cortexa725,cortexx2,cortexx3,cortexx4,cortexx925,neoversen2,cobalt100,neoversen3,neoversev2,grace,neoversev3,neoversev3ae,demeter,olympus,generic,generic_armv8_a,generic_armv9_a"
(const (symbol_ref "((enum attr_tune) aarch64_tune)")))
diff --git a/gcc/config/avr/avr-mcus.def b/gcc/config/avr/avr-mcus.def
index 9f79a9a..ad64050 100644
--- a/gcc/config/avr/avr-mcus.def
+++ b/gcc/config/avr/avr-mcus.def
@@ -326,6 +326,9 @@ AVR_MCU ("avr64du32", ARCH_AVRXMEGA2, AVR_CVT | AVR_ISA_FLMAP, "__AVR_AVR
AVR_MCU ("avr64ea28", ARCH_AVRXMEGA2, AVR_CVT | AVR_ISA_FLMAP, "__AVR_AVR64EA28__", 0x6800, 0x0, 0x10000, 0)
AVR_MCU ("avr64ea32", ARCH_AVRXMEGA2, AVR_CVT | AVR_ISA_FLMAP, "__AVR_AVR64EA32__", 0x6800, 0x0, 0x10000, 0)
AVR_MCU ("avr64ea48", ARCH_AVRXMEGA2, AVR_CVT | AVR_ISA_FLMAP, "__AVR_AVR64EA48__", 0x6800, 0x0, 0x10000, 0)
+AVR_MCU ("avr64sd28", ARCH_AVRXMEGA2, AVR_CVT | AVR_ISA_FLMAP, "__AVR_AVR64SD28__", 0x6000, 0x0, 0x10000, 0)
+AVR_MCU ("avr64sd32", ARCH_AVRXMEGA2, AVR_CVT | AVR_ISA_FLMAP, "__AVR_AVR64SD32__", 0x6000, 0x0, 0x10000, 0)
+AVR_MCU ("avr64sd48", ARCH_AVRXMEGA2, AVR_CVT | AVR_ISA_FLMAP, "__AVR_AVR64SD48__", 0x6000, 0x0, 0x10000, 0)
/* Xmega, Flash + RAM < 64K, flash visible in RAM address space */
AVR_MCU ("avrxmega3", ARCH_AVRXMEGA3, AVR_ISA_NONE, NULL, 0x3f00, 0x0, 0x8000, 0)
AVR_MCU ("attiny202", ARCH_AVRXMEGA3, AVR_CVT | AVR_ISA_RCALL, "__AVR_ATtiny202__", 0x3f80, 0x0, 0x800, 0x8000)
@@ -407,6 +410,9 @@ AVR_MCU ("avr16ea48", ARCH_AVRXMEGA3, AVR_CVT, "__AVR_AVR
AVR_MCU ("avr32ea28", ARCH_AVRXMEGA3, AVR_CVT, "__AVR_AVR32EA28__", 0x7000, 0x0, 0x8000, 0x8000)
AVR_MCU ("avr32ea32", ARCH_AVRXMEGA3, AVR_CVT, "__AVR_AVR32EA32__", 0x7000, 0x0, 0x8000, 0x8000)
AVR_MCU ("avr32ea48", ARCH_AVRXMEGA3, AVR_CVT, "__AVR_AVR32EA48__", 0x7000, 0x0, 0x8000, 0x8000)
+AVR_MCU ("avr32sd20", ARCH_AVRXMEGA3, AVR_CVT, "__AVR_AVR32SD20__", 0x7000, 0x0, 0x8000, 0x8000)
+AVR_MCU ("avr32sd28", ARCH_AVRXMEGA3, AVR_CVT, "__AVR_AVR32SD28__", 0x7000, 0x0, 0x8000, 0x8000)
+AVR_MCU ("avr32sd32", ARCH_AVRXMEGA3, AVR_CVT, "__AVR_AVR32SD32__", 0x7000, 0x0, 0x8000, 0x8000)
/* Xmega, 64K < Flash <= 128K, RAM <= 64K */
AVR_MCU ("avrxmega4", ARCH_AVRXMEGA4, AVR_ISA_NONE, NULL, 0x2000, 0x0, 0x11000, 0)
AVR_MCU ("atxmega64a3", ARCH_AVRXMEGA4, AVR_ISA_NONE, "__AVR_ATxmega64A3__", 0x2000, 0x0, 0x11000, 0)
diff --git a/gcc/config/avr/avr-passes.cc b/gcc/config/avr/avr-passes.cc
index 184619a..2c21e7b 100644
--- a/gcc/config/avr/avr-passes.cc
+++ b/gcc/config/avr/avr-passes.cc
@@ -29,6 +29,7 @@
#include "target.h"
#include "rtl.h"
#include "tree.h"
+#include "diagnostic-core.h"
#include "cfghooks.h"
#include "cfganal.h"
#include "df.h"
@@ -4848,6 +4849,70 @@ avr_pass_fuse_add::execute1 (function *func)
//////////////////////////////////////////////////////////////////////////////
+// Split insns with nonzero_bits() after combine.
+
+static const pass_data avr_pass_data_split_nzb =
+{
+ RTL_PASS, // type
+ "", // name (will be patched)
+ OPTGROUP_NONE, // optinfo_flags
+ TV_DF_SCAN, // tv_id
+ 0, // properties_required
+ 0, // properties_provided
+ 0, // properties_destroyed
+ 0, // todo_flags_start
+ 0 // todo_flags_finish
+};
+
+class avr_pass_split_nzb : public rtl_opt_pass
+{
+public:
+ avr_pass_split_nzb (gcc::context *ctxt, const char *name)
+ : rtl_opt_pass (avr_pass_data_split_nzb, ctxt)
+ {
+ this->name = name;
+ }
+
+ unsigned int execute (function *) final override
+ {
+ if (avropt_use_nonzero_bits)
+ split_nzb_insns ();
+ return 0;
+ }
+
+ void split_nzb_insns ();
+
+}; // avr_pass_split_nzb
+
+
+void
+avr_pass_split_nzb::split_nzb_insns ()
+{
+ rtx_insn *next;
+
+ for (rtx_insn *insn = get_insns (); insn; insn = next)
+ {
+ next = NEXT_INSN (insn);
+
+ if (INSN_P (insn)
+ && single_set (insn)
+ && get_attr_nzb (insn) == NZB_YES)
+ {
+ rtx_insn *last = try_split (PATTERN (insn), insn, 1 /*last*/);
+
+ // The nonzero_bits() insns *must* split. If not: ICE.
+ if (last == insn)
+ {
+ debug_rtx (insn);
+ internal_error ("failed to split insn");
+ }
+ }
+ }
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
// Split shift insns after peephole2 / befor avr-fuse-move.
static const pass_data avr_pass_data_split_after_peephole2 =
@@ -5645,6 +5710,12 @@ make_avr_pass_casesi (gcc::context *ctxt)
return new avr_pass_casesi (ctxt, "avr-casesi");
}
+rtl_opt_pass *
+make_avr_pass_split_nzb (gcc::context *ctxt)
+{
+ return new avr_pass_split_nzb (ctxt, "avr-split-nzb");
+}
+
// Try to replace 2 cbranch insns with 1 comparison and 2 branches.
rtl_opt_pass *
diff --git a/gcc/config/avr/avr-passes.def b/gcc/config/avr/avr-passes.def
index 091005e..eb60a93 100644
--- a/gcc/config/avr/avr-passes.def
+++ b/gcc/config/avr/avr-passes.def
@@ -74,6 +74,18 @@ INSERT_PASS_BEFORE (pass_free_cfg, 1, avr_pass_recompute_notes);
INSERT_PASS_AFTER (pass_expand, 1, avr_pass_casesi);
+/* Some combine insns have nonzero_bits() in their condition, though insns
+ should not use such stuff in their condition. Therefore, we split such
+ insn into something without nonzero_bits() in their condition right after
+ insn combine.
+
+ Since neither split_all_insns() nor split_all_insns_noflow() work at that
+ point (presumably since there are splits involving branches), we split
+ respective insns (and only such insns) by hand. Respective insns are
+ tagged with insn attribute nzb = "yes" so that they are easy to spot. */
+
+INSERT_PASS_AFTER (pass_combine, 1, avr_pass_split_nzb);
+
/* If-else decision trees generated for switch / case may produce sequences
like
diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h
index 83137c7..ca30136 100644
--- a/gcc/config/avr/avr-protos.h
+++ b/gcc/config/avr/avr-protos.h
@@ -136,6 +136,7 @@ extern bool reg_unused_after (rtx_insn *insn, rtx reg);
extern int avr_jump_mode (rtx x, rtx_insn *insn, int = 0);
extern bool test_hard_reg_class (enum reg_class rclass, rtx x);
extern bool jump_over_one_insn_p (rtx_insn *insn, rtx dest);
+extern bool avr_nonzero_bits_lsr_operands_p (rtx_code, rtx *);
extern void avr_final_prescan_insn (rtx_insn *insn, rtx *operand,
int num_operands);
@@ -205,6 +206,7 @@ extern rtl_opt_pass *make_avr_pass_pre_proep (gcc::context *);
extern rtl_opt_pass *make_avr_pass_recompute_notes (gcc::context *);
extern rtl_opt_pass *make_avr_pass_casesi (gcc::context *);
extern rtl_opt_pass *make_avr_pass_ifelse (gcc::context *);
+extern rtl_opt_pass *make_avr_pass_split_nzb (gcc::context *);
extern rtl_opt_pass *make_avr_pass_split_after_peephole2 (gcc::context *);
#ifdef RTX_CODE
extern bool avr_casei_sequence_check_operands (rtx *xop);
diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc
index 71c03b4..b192a12 100644
--- a/gcc/config/avr/avr.cc
+++ b/gcc/config/avr/avr.cc
@@ -567,6 +567,7 @@ avr_option_override (void)
{
opt_pass *extra_peephole2
= g->get_passes ()->get_pass_peephole2 ()->clone ();
+ extra_peephole2->name = "avr-peep2-after-fuse-move";
register_pass_info peep2_2_info
= { extra_peephole2, "avr-fuse-move", 1, PASS_POS_INSERT_AFTER };
@@ -11736,6 +11737,23 @@ avr_handle_isr_attribute (tree node, tree *attrs, const char *name)
}
+/* Helper for `avr_insert_attributes'.
+ Return the section name from attribute "section" in attribute list ATTRS.
+ When no "section" attribute is present, then return nullptr. */
+
+static const char *
+avr_attrs_section_name (tree attrs)
+{
+ if (tree a_sec = lookup_attribute ("section", attrs))
+ if (TREE_VALUE (a_sec))
+ if (tree t_section_name = TREE_VALUE (TREE_VALUE (a_sec)))
+ if (TREE_CODE (t_section_name) == STRING_CST)
+ return TREE_STRING_POINTER (t_section_name);
+
+ return nullptr;
+}
+
+
/* Implement `TARGET_INSERT_ATTRIBUTES'. */
static void
@@ -11768,25 +11786,31 @@ avr_insert_attributes (tree node, tree *attributes)
NULL, *attributes);
}
+ const char *section_name = avr_attrs_section_name (*attributes);
+
+ // When the function is in an .initN or .finiN section, then add "used"
+ // since such functions are never called.
+ if (section_name
+ && strlen (section_name) == strlen (".init*")
+ && IN_RANGE (section_name[5], '0', '9')
+ && (startswith (section_name, ".init")
+ || startswith (section_name, ".fini"))
+ && !lookup_attribute ("used", *attributes))
+ {
+ *attributes = tree_cons (get_identifier ("used"), NULL, *attributes);
+ }
+
#if defined WITH_AVRLIBC
if (avropt_call_main == 0
&& TREE_CODE (node) == FUNCTION_DECL
&& MAIN_NAME_P (DECL_NAME (node)))
{
- const char *s_section_name = nullptr;
+ bool in_init9_p = section_name && !strcmp (section_name, ".init9");
- if (tree a_sec = lookup_attribute ("section", *attributes))
- if (TREE_VALUE (a_sec))
- if (tree t_section_name = TREE_VALUE (TREE_VALUE (a_sec)))
- if (TREE_CODE (t_section_name) == STRING_CST)
- s_section_name = TREE_STRING_POINTER (t_section_name);
-
- bool in_init9_p = s_section_name && !strcmp (s_section_name, ".init9");
-
- if (s_section_name && !in_init9_p)
+ if (section_name && !in_init9_p)
{
warning (OPT_Wattributes, "%<section(\"%s\")%> attribute on main"
- " function inhibits %<-mno-call-main%>", s_section_name);
+ " function inhibits %<-mno-call-main%>", section_name);
}
else
{
@@ -12683,6 +12707,50 @@ avr_rtx_costs_1 (rtx x, machine_mode mode, int outer_code,
}
}
+ // Insns with nonzero_bits() == 1 in the condition.
+ if (avropt_use_nonzero_bits
+ && mode == QImode
+ && (code == AND || code == IOR || code == XOR)
+ && REG_P (XEXP (x, 1)))
+ {
+ // "*nzb=1.<code>.lsr_split"
+ // "*nzb=1.<code>.lsr.not_split"
+ bool is_nzb = (GET_CODE (XEXP (x, 0)) == LSHIFTRT
+ && (REG_P (XEXP (XEXP (x, 0), 0))
+ || GET_CODE (XEXP (XEXP (x, 0), 0)) == XOR)
+ && const_0_to_7_operand (XEXP (XEXP (x, 0), 1), QImode));
+ // "*nzb=1.<code>.zerox_split"
+ // "*nzb=1.<code>.zerox.not_split"
+ is_nzb |= (GET_CODE (XEXP (x, 0)) == ZERO_EXTRACT
+ && (REG_P (XEXP (XEXP (x, 0), 0))
+ || GET_CODE (XEXP (XEXP (x, 0), 0)) == XOR)
+ && const1_operand (XEXP (XEXP (x, 0), 1), QImode)
+ && const_0_to_7_operand (XEXP (XEXP (x, 0), 2), QImode));
+ // "*nzb=1.<code>.ge0_split"
+ is_nzb |= (GET_CODE (XEXP (x, 0)) == GE
+ && REG_P (XEXP (XEXP (x, 0), 0))
+ && const0_operand (XEXP (XEXP (x, 0), 1), QImode));
+ if (is_nzb)
+ {
+ *total = COSTS_N_INSNS (code == XOR ? 3 : 2);
+ return true;
+ }
+ }
+
+ // Insn "*nzb=1.ior.ashift_split" with nonzero_bits() == 1 in the condition.
+ if (avropt_use_nonzero_bits
+ && mode == QImode
+ && code == IOR
+ && REG_P (XEXP (x, 1))
+ && GET_CODE (XEXP (x, 0)) == ASHIFT
+ && REG_P (XEXP (XEXP (x, 0), 0))
+ && CONST_INT_P (XEXP (XEXP (x, 0), 1)))
+ {
+ *total = COSTS_N_INSNS (2);
+ return true;
+ }
+
+
switch (code)
{
case CONST_INT:
@@ -13661,6 +13729,28 @@ avr_rtx_costs_1 (rtx x, machine_mode mode, int outer_code,
*total += avr_operand_rtx_cost (XEXP (x, 0), mode, code, 0, speed);
return true;
+ case GE:
+ if (mode == QImode
+ && REG_P (XEXP (x, 0))
+ && XEXP (x, 1) == const0_rtx)
+ {
+ *total = COSTS_N_INSNS (3);
+ return true;
+ }
+ break;
+
+ case ZERO_EXTRACT:
+ if (mode == QImode
+ && REG_P (XEXP (x, 0))
+ && XEXP (x, 1) == const1_rtx
+ && CONST_INT_P (XEXP (x, 2)))
+ {
+ int bpos = INTVAL (XEXP (x, 2));
+ *total = COSTS_N_INSNS (bpos == 0 ? 1 : bpos == 1 ? 2 : 3);
+ return true;
+ }
+ break;
+
case COMPARE:
switch (GET_MODE (XEXP (x, 0)))
{
@@ -15148,6 +15238,46 @@ avr_emit3_fix_outputs (rtx (*gen)(rtx,rtx,rtx), rtx *op,
}
+/* A helper for the insn condition of "*nzb=1.<code>.lsr[.not]_split"
+ where <code> is AND, IOR or XOR. Return true when
+
+ OP[0] <code>= OP[1] >> OP[2]
+
+ can be performed by means of the code of "*nzb=1.<code>.zerox", i.e.
+
+ OP[0] <code>= OP[1].OP[2]
+
+ For example, when OP[0] is in { 0, 1 }, then R24 &= R10.4
+ can be performed by means of SBRS R10,4 $ CLR R24.
+ Notice that the constraint of OP[3] is "0". */
+
+bool
+avr_nonzero_bits_lsr_operands_p (rtx_code code, rtx *op)
+{
+ if (reload_completed)
+ return false;
+
+ const auto offs = INTVAL (op[2]);
+ const auto op1_non0 = nonzero_bits (op[1], QImode);
+ const auto op3_non0 = nonzero_bits (op[3], QImode);
+
+ switch (code)
+ {
+ default:
+ gcc_unreachable ();
+
+ case IOR:
+ case XOR:
+ return op1_non0 >> offs == 1;
+
+ case AND:
+ return op3_non0 == 1;
+ }
+
+ return false;
+}
+
+
/* Worker function for cpymemhi expander.
XOP[0] Destination as MEM:BLK
XOP[1] Source " "
diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md
index 06e31aa..1c4e44d 100644
--- a/gcc/config/avr/avr.md
+++ b/gcc/config/avr/avr.md
@@ -84,6 +84,7 @@
[UNSPEC_STRLEN
UNSPEC_CPYMEM
UNSPEC_INDEX_JMP
+ UNSPEC_NZB
UNSPEC_FMUL
UNSPEC_FMULS
UNSPEC_FMULSU
@@ -175,6 +176,10 @@
no"
(const_string "no"))
+(define_attr "nzb"
+ "yes, no"
+ (const_string "no"))
+
;; Flavours of instruction set architecture (ISA), used in enabled attribute
;; mov : ISA has no MOVW movw : ISA has MOVW
@@ -10916,6 +10921,216 @@
DONE;
})
+;; Patterns for -muse-nonzero-bits use nonzero_bits() in their condition,
+;; which makes possible some more optimizations.
+;; Since combine may add clobber of REG_CC, we must make sure that there are
+;; no other routes to synthesize such patterns. We use an UNSPEC for that.
+;; As insns are not supposed to use stuff like nonzero_bits() in their
+;; condition, we split the insns right after reload. For CFG reasons we have
+;; to do the splits by hand in avr_pass_split_nzb. All insns that must be
+;; split by that pass must have insn attribute "nzb" set to "yes". Moreover,
+;; the insns to split must be single_sets and must not touch control flow.
+
+(define_code_attr nzb_constr_rdr [(and "r") (ior "d") (xor "r")])
+(define_code_attr nzb_use1_nnr [(and "n") (ior "n") (xor "r")])
+
+(define_insn_and_split "*nzb=1.<code>.zerox_split"
+ [(set (match_operand:QI 0 "register_operand")
+ (bitop:QI (zero_extract:QI (match_operand:QI 1 "register_operand")
+ (const_int 1)
+ (match_operand:QI 2 "const_0_to_7_operand"))
+ (match_operand:QI 3 "register_operand")))]
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed
+ && (<CODE> == IOR || <CODE> == XOR
+ || nonzero_bits (operands[3], QImode) == 1)"
+ { gcc_unreachable (); }
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed"
+ [(parallel [(set (match_dup 0)
+ (bitop:QI (zero_extract:QI (match_dup 1)
+ (const_int 1)
+ (match_dup 2))
+ (unspec:QI [(match_dup 3)
+ ] UNSPEC_NZB)))
+ (use (const_int 1))
+ (clobber (reg:CC REG_CC))])]
+ ""
+ [(set_attr "nzb" "yes")])
+
+(define_insn "*nzb=1.<code>.zerox"
+ [(set (match_operand:QI 0 "register_operand" "=<nzb_constr_rdr>")
+ (bitop:QI (zero_extract:QI (match_operand:QI 1 "register_operand" "r")
+ (const_int 1)
+ (match_operand:QI 2 "const_0_to_7_operand" "n"))
+ (unspec:QI [(match_operand:QI 3 "register_operand" "0")
+ ] UNSPEC_NZB)))
+ (use (match_operand:QI 4 "nonmemory_operand" "<nzb_use1_nnr>"))
+ (clobber (reg:CC REG_CC))]
+ "optimize && avropt_use_nonzero_bits"
+ {
+ if (<CODE> == AND)
+ return "sbrs %1,%2\;clr %0";
+ else if (<CODE> == IOR)
+ return "sbrc %1,%2\;ori %0,1";
+ else if (<CODE> == XOR)
+ return "sbrc %1,%2\;eor %0,%4";
+ else
+ gcc_unreachable ();
+ }
+ [(set_attr "length" "2")])
+
+(define_insn_and_split "*nzb=1.<code>.lsr_split"
+ [(set (match_operand:QI 0 "register_operand")
+ (bitop:QI (lshiftrt:QI (match_operand:QI 1 "register_operand")
+ (match_operand:QI 2 "const_0_to_7_operand"))
+ (match_operand:QI 3 "register_operand")))]
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed
+ && avr_nonzero_bits_lsr_operands_p (<CODE>, operands)"
+ { gcc_unreachable (); }
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed"
+ [(parallel [(set (match_dup 0)
+ (bitop:QI (zero_extract:QI (match_dup 1)
+ (const_int 1)
+ (match_dup 2))
+ (unspec:QI [(match_dup 3)
+ ] UNSPEC_NZB)))
+ (use (const_int 1))
+ (clobber (reg:CC REG_CC))])]
+ ""
+ [(set_attr "nzb" "yes")])
+
+(define_insn_and_split "*nzb=1.<code>.zerox.not_split"
+ [(set (match_operand:QI 0 "register_operand")
+ (bitop:QI (zero_extract:QI (xor:QI (match_operand:QI 1 "register_operand")
+ (match_operand:QI 4 "const_int_operand"))
+ (const_int 1)
+ (match_operand:QI 2 "const_0_to_7_operand"))
+ (match_operand:QI 3 "register_operand")))]
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed
+ && INTVAL (operands[2]) == exact_log2 (0xff & INTVAL (operands[4]))
+ && (<CODE> == IOR
+ || nonzero_bits (operands[3], QImode) == 1)"
+ { gcc_unreachable (); }
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed"
+ ; "*nzb=1.<code>.zerox.not"
+ [(parallel [(set (match_dup 0)
+ (bitop:QI (zero_extract:QI (not:QI (match_dup 1))
+ (const_int 1)
+ (match_dup 2))
+ (unspec:QI [(match_dup 3)
+ ] UNSPEC_NZB)))
+ (use (const_int 1))
+ (clobber (reg:CC REG_CC))])]
+ ""
+ [(set_attr "nzb" "yes")])
+
+(define_insn_and_split "*nzb=1.<code>.lsr.not_split"
+ [(set (match_operand:QI 0 "register_operand")
+ (bitop:QI (lshiftrt:QI (xor:QI (match_operand:QI 1 "register_operand")
+ (match_operand:QI 4 "const_int_operand"))
+ (match_operand:QI 2 "const_0_to_7_operand"))
+ (match_operand:QI 3 "register_operand")))]
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed
+ && INTVAL (operands[2]) == exact_log2 (0xff & INTVAL (operands[4]))
+ && avr_nonzero_bits_lsr_operands_p (<CODE>, operands)"
+ { gcc_unreachable (); }
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed"
+ ; "*nzb=1.<code>.zerox.not"
+ [(parallel [(set (match_dup 0)
+ (bitop:QI (zero_extract:QI (not:QI (match_dup 1))
+ (const_int 1)
+ (match_dup 2))
+ (unspec:QI [(match_dup 3)
+ ] UNSPEC_NZB)))
+ (use (const_int 1))
+ (clobber (reg:CC REG_CC))])]
+ ""
+ [(set_attr "nzb" "yes")])
+
+(define_insn_and_split "*nzb=1.<code>.ge0_split"
+ [(set (match_operand:QI 0 "register_operand")
+ (bitop:QI (ge:QI (match_operand:QI 1 "register_operand")
+ (const_int 0))
+ (match_operand:QI 2 "register_operand")))]
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed
+ && (<CODE> == IOR || <CODE> == XOR
+ || nonzero_bits (operands[2], QImode) == 1)"
+ { gcc_unreachable (); }
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed"
+ ; "*nzb=1.<code>.zerox.not"
+ [(parallel [(set (match_dup 0)
+ (bitop:QI (zero_extract:QI (not:QI (match_dup 1))
+ (const_int 1)
+ (const_int 7))
+ (unspec:QI [(match_dup 2)
+ ] UNSPEC_NZB)))
+ (use (const_int 1))
+ (clobber (reg:CC REG_CC))])]
+ ""
+ [(set_attr "nzb" "yes")])
+
+(define_insn "*nzb=1.<code>.zerox.not"
+ [(set (match_operand:QI 0 "register_operand" "=<nzb_constr_rdr>")
+ (bitop:QI (zero_extract:QI (not:QI (match_operand:QI 1 "register_operand" "r"))
+ (const_int 1)
+ (match_operand:QI 2 "const_0_to_7_operand" "n"))
+ (unspec:QI [(match_operand:QI 3 "register_operand" "0")
+ ] UNSPEC_NZB)))
+ (use (match_operand:QI 4 "nonmemory_operand" "<nzb_use1_nnr>"))
+ (clobber (reg:CC REG_CC))]
+ "optimize && avropt_use_nonzero_bits"
+ {
+ if (<CODE> == AND)
+ return "sbrc %1,%2\;clr %0";
+ else if (<CODE> == IOR)
+ return "sbrs %1,%2\;ori %0,1";
+ else if (<CODE> == XOR)
+ return "sbrs %1,%2\;eor %0,%4";
+ else
+ gcc_unreachable ();
+ }
+ [(set_attr "length" "2")])
+
+(define_insn_and_split "*nzb=1.ior.ashift_split"
+ [(set (match_operand:QI 0 "register_operand" "=d")
+ (ior:QI (ashift:QI (match_operand:QI 1 "register_operand" "r")
+ (match_operand:QI 2 "const_0_to_7_operand" "n"))
+ (match_operand:QI 3 "register_operand" "0")))]
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed
+ && nonzero_bits (operands[1], QImode) == 1"
+ { gcc_unreachable (); }
+ "optimize && avropt_use_nonzero_bits
+ && !reload_completed"
+ [(parallel [(set (match_dup 0)
+ (unspec:QI [(ior:QI (ashift:QI (match_dup 1)
+ (match_dup 2))
+ (match_dup 3))
+ ] UNSPEC_NZB))
+ (clobber (reg:CC REG_CC))])]
+ ""
+ [(set_attr "nzb" "yes")])
+
+(define_insn "*nzb=1.ior.ashift"
+ [(set (match_operand:QI 0 "register_operand" "=d")
+ (unspec:QI [(ior:QI (ashift:QI (match_operand:QI 1 "register_operand" "r")
+ (match_operand:QI 2 "const_0_to_7_operand" "n"))
+ (match_operand:QI 3 "register_operand" "0"))
+ ] UNSPEC_NZB))
+ (clobber (reg:CC REG_CC))]
+ "optimize && avropt_use_nonzero_bits"
+ "sbrc %1,0\;ori %0,1<<%2"
+ [(set_attr "length" "2")])
+
;; Work around PR115307: Early passes expand isinf/f/l to a bloat.
;; These passes do not consider costs, and there is no way to
diff --git a/gcc/config/avr/avr.opt b/gcc/config/avr/avr.opt
index d22a118..fcd2bf6 100644
--- a/gcc/config/avr/avr.opt
+++ b/gcc/config/avr/avr.opt
@@ -65,6 +65,10 @@ mpr118012
Target Var(avropt_pr118012) UInteger Init(1) Undocumented
This option is on per default in order to work around PR118012.
+muse-nonzero-bits
+Target Var(avropt_use_nonzero_bits) UInteger Init(0) Optimization
+Optimization. Allow to use nonzero_bits() in some insn conditions.
+
mshort-calls
Target RejectNegative Mask(SHORT_CALLS)
This option is used internally for multilib generation and selection. Assume RJMP / RCALL can target all program memory.
diff --git a/gcc/config/avr/avr.opt.urls b/gcc/config/avr/avr.opt.urls
index 64cf060..662fdee 100644
--- a/gcc/config/avr/avr.opt.urls
+++ b/gcc/config/avr/avr.opt.urls
@@ -26,6 +26,9 @@ UrlSuffix(gcc/AVR-Options.html#index-mskip-bug)
mrmw
UrlSuffix(gcc/AVR-Options.html#index-mrmw)
+muse-nonzero-bits
+UrlSuffix(gcc/AVR-Options.html#index-muse-nonzero-bits)
+
mshort-calls
UrlSuffix(gcc/AVR-Options.html#index-mshort-calls)
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 3d2ced5..8c164fd 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -45,9 +45,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define OBJECT_FORMAT_MACHO 1
-/* Suppress g++ attempt to link in the math library automatically. */
+/* Suppress language-specific specs attempt to link in libm automatically. */
#define MATH_LIBRARY ""
+/* Likewise libdl. */
+#define DL_LIBRARY ""
+
/* We have atexit. */
#define HAVE_ATEXIT
diff --git a/gcc/config/i386/avx10_2-512bf16intrin.h b/gcc/config/i386/avx10_2-512bf16intrin.h
index 307b14a..21e4b36 100644
--- a/gcc/config/i386/avx10_2-512bf16intrin.h
+++ b/gcc/config/i386/avx10_2-512bf16intrin.h
@@ -28,11 +28,11 @@
#ifndef _AVX10_2_512BF16INTRIN_H_INCLUDED
#define _AVX10_2_512BF16INTRIN_H_INCLUDED
-#if !defined (__AVX10_2_512__)
+#if !defined (__AVX10_2__)
#pragma GCC push_options
-#pragma GCC target("avx10.2-512")
-#define __DISABLE_AVX10_2_512__
-#endif /* __AVX10_2_512__ */
+#pragma GCC target("avx10.2")
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
extern __inline__ __m512bh
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -673,9 +673,9 @@ _mm512_cmp_pbh_mask (__m512bh __A, __m512bh __B, const int __imm)
#endif /* __OPIMTIZE__ */
-#ifdef __DISABLE_AVX10_2_512__
-#undef __DISABLE_AVX10_2_512__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_512__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* _AVX10_2_512BF16INTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2-512convertintrin.h b/gcc/config/i386/avx10_2-512convertintrin.h
index a44481e..8007cf3 100644
--- a/gcc/config/i386/avx10_2-512convertintrin.h
+++ b/gcc/config/i386/avx10_2-512convertintrin.h
@@ -28,11 +28,11 @@
#ifndef __AVX10_2_512CONVERTINTRIN_H_INCLUDED
#define __AVX10_2_512CONVERTINTRIN_H_INCLUDED
-#ifndef __AVX10_2_512__
+#ifndef __AVX10_2__
#pragma GCC push_options
-#pragma GCC target("avx10.2-512")
-#define __DISABLE_AVX10_2_512__
-#endif /* __AVX10_2_512__ */
+#pragma GCC target("avx10.2")
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
extern __inline __m512h
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -564,9 +564,9 @@ _mm512_maskz_cvtbf8_ph (__mmask32 __U, __m256i __A)
(__m512i) _mm512_maskz_cvtepi8_epi16 (__U, __A), 8));
}
-#ifdef __DISABLE_AVX10_2_512__
-#undef __DISABLE_AVX10_2_512__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_512__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* __AVX10_2_512CONVERTINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2-512mediaintrin.h b/gcc/config/i386/avx10_2-512mediaintrin.h
index 5dedabc..43271e7 100644
--- a/gcc/config/i386/avx10_2-512mediaintrin.h
+++ b/gcc/config/i386/avx10_2-512mediaintrin.h
@@ -28,11 +28,11 @@
#ifndef _AVX10_2_512MEDIAINTRIN_H_INCLUDED
#define _AVX10_2_512MEDIAINTRIN_H_INCLUDED
-#if !defined(__AVX10_2_512__)
+#if !defined(__AVX10_2__)
#pragma GCC push_options
-#pragma GCC target("avx10.2-512")
-#define __DISABLE_AVX10_2_512__
-#endif /* __AVX10_2_512__ */
+#pragma GCC target("avx10.2")
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
extern __inline __m512i
__attribute__((__gnu_inline__, __always_inline__, __artificial__))
@@ -506,9 +506,9 @@ _mm512_maskz_mpsadbw_epu8 (__mmask32 __U, __m512i __X,
(__mmask32)(U))
#endif
-#ifdef __DISABLE_AVX10_2_512__
-#undef __DISABLE_AVX10_2_512__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_512__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* __AVX10_2_512MEDIAINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2-512minmaxintrin.h b/gcc/config/i386/avx10_2-512minmaxintrin.h
index 3acdc56..a743346 100644
--- a/gcc/config/i386/avx10_2-512minmaxintrin.h
+++ b/gcc/config/i386/avx10_2-512minmaxintrin.h
@@ -23,11 +23,11 @@
#ifndef _AVX10_2_512MINMAXINTRIN_H_INCLUDED
#define _AVX10_2_512MINMAXINTRIN_H_INCLUDED
-#if !defined (__AVX10_2_512__)
+#if !defined (__AVX10_2__)
#pragma GCC push_options
-#pragma GCC target("avx10.2-512")
-#define __DISABLE_AVX10_2_512__
-#endif /* __AVX10_2_512__ */
+#pragma GCC target("avx10.2")
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
#ifdef __OPTIMIZE__
extern __inline __m512bh
@@ -481,9 +481,9 @@ _mm512_maskz_minmax_round_ps (__mmask16 __U, __m512 __A, __m512 __B,
#endif
-#ifdef __DISABLE_AVX10_2_512__
-#undef __DISABLE_AVX10_2_512__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_512__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* _AVX10_2_512MINMAXINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2-512satcvtintrin.h b/gcc/config/i386/avx10_2-512satcvtintrin.h
index 255bacd..215b7fd 100644
--- a/gcc/config/i386/avx10_2-512satcvtintrin.h
+++ b/gcc/config/i386/avx10_2-512satcvtintrin.h
@@ -28,11 +28,11 @@
#ifndef _AVX10_2_512SATCVTINTRIN_H_INCLUDED
#define _AVX10_2_512SATCVTINTRIN_H_INCLUDED
-#if !defined (__AVX10_2_512__)
+#if !defined (__AVX10_2__)
#pragma GCC push_options
-#pragma GCC target("avx10.2-512")
-#define __DISABLE_AVX10_2_512__
-#endif /* __AVX10_2_512__ */
+#pragma GCC target("avx10.2")
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -1567,9 +1567,9 @@ _mm512_maskz_cvtts_roundps_epu64 (__mmask8 __U, __m256 __A, const int __R)
(R)))
#endif
-#ifdef __DISABLE_AVX10_2_512__
-#undef __DISABLE_AVX10_2_512__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_512__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* _AVX10_2_512SATCVTINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2bf16intrin.h b/gcc/config/i386/avx10_2bf16intrin.h
index af3b4af..e6890fc 100644
--- a/gcc/config/i386/avx10_2bf16intrin.h
+++ b/gcc/config/i386/avx10_2bf16intrin.h
@@ -28,11 +28,11 @@
#ifndef _AVX10_2BF16INTRIN_H_INCLUDED
#define _AVX10_2BF16INTRIN_H_INCLUDED
-#if !defined(__AVX10_2_256__)
+#if !defined(__AVX10_2__)
#pragma GCC push_options
#pragma GCC target("avx10.2")
-#define __DISABLE_AVX10_2_256__
-#endif /* __AVX10_2_256__ */
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
extern __inline__ __m256bh
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -1327,9 +1327,9 @@ _mm_comineq_sbh (__m128bh __A, __m128bh __B)
return __builtin_ia32_vcomisbf16neq (__A, __B);
}
-#ifdef __DISABLE_AVX10_2_256__
-#undef __DISABLE_AVX10_2_256__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_256__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* __AVX10_2BF16INTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2convertintrin.h b/gcc/config/i386/avx10_2convertintrin.h
index 7c9c238..6144723 100644
--- a/gcc/config/i386/avx10_2convertintrin.h
+++ b/gcc/config/i386/avx10_2convertintrin.h
@@ -28,10 +28,10 @@
#ifndef _AVX10_2CONVERTINTRIN_H_INCLUDED
#define _AVX10_2CONVERTINTRIN_H_INCLUDED
-#if !defined(__AVX10_2_256__)
+#if !defined(__AVX10_2__)
#pragma GCC push_options
#pragma GCC target("avx10.2")
-#define __DISABLE_AVX10_2_256__
+#define __DISABLE_AVX10_2__
#endif /* __AVX10_2__ */
extern __inline __m128h
@@ -70,100 +70,34 @@ extern __inline __m256h
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_cvtx2ps_ph (__m256 __A, __m256 __B)
{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) -1,
- _MM_FROUND_CUR_DIRECTION);
+ return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
+ (__v8sf) __B,
+ (__v16hf)
+ _mm256_setzero_ph (),
+ (__mmask16) -1);
}
extern __inline __m256h
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_cvtx2ps_ph (__m256h __W, __mmask16 __U, __m256 __A, __m256 __B)
{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- _MM_FROUND_CUR_DIRECTION);
+ return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
+ (__v8sf) __B,
+ (__v16hf) __W,
+ (__mmask16) __U);
}
extern __inline __m256h
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_maskz_cvtx2ps_ph ( __mmask16 __U, __m256 __A, __m256 __B)
{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- _MM_FROUND_CUR_DIRECTION);
-}
-
-#ifdef __OPTIMIZE__
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtx_round2ps_ph (__m256 __A, __m256 __B, const int __R)
-{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtx_round2ps_ph (__m256h __W, __mmask16 __U, __m256 __A,
- __m256 __B, const int __R)
-{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
+ return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask ((__v8sf) __A,
+ (__v8sf) __B,
+ (__v16hf)
+ _mm256_setzero_ph (),
+ (__mmask16) __U);
}
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtx_round2ps_ph (__mmask16 __U, __m256 __A,
- __m256 __B, const int __R)
-{
- return (__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-#else
-#define _mm256_cvtx_round2ps_ph(A, B, R) \
- ((__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_cvtx_round2ps_ph(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_cvtx_round2ps_ph(U, A, B, R) \
- ((__m256h) __builtin_ia32_vcvt2ps2phx256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-#endif /* __OPTIMIZE__ */
-
extern __inline__ __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtbiasph_bf8 (__m128i __A, __m128h __B)
@@ -1018,9 +952,9 @@ _mm256_maskz_cvtbf8_ph (__mmask16 __U, __m128i __A)
(__m256i) _mm256_maskz_cvtepi8_epi16 (__U, __A), 8));
}
-#ifdef __DISABLE_AVX10_2_256__
-#undef __DISABLE_AVX10_2_256__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_256__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* __AVX10_2CONVERTINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2mediaintrin.h b/gcc/config/i386/avx10_2mediaintrin.h
index 19578a7..0993e8e 100644
--- a/gcc/config/i386/avx10_2mediaintrin.h
+++ b/gcc/config/i386/avx10_2mediaintrin.h
@@ -28,11 +28,11 @@
#ifndef _AVX10_2MEDIAINTRIN_H_INCLUDED
#define _AVX10_2MEDIAINTRIN_H_INCLUDED
-#if !defined(__AVX10_2_256__)
+#if !defined(__AVX10_2__)
#pragma GCC push_options
-#pragma GCC target("avx10.2-256")
-#define __DISABLE_AVX10_2_256__
-#endif /* __AVX10_2_256__ */
+#pragma GCC target("avx10.2")
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
#define _mm_dpbssd_epi32(W, A, B) \
(__m128i) __builtin_ia32_vpdpbssd128 ((__v4si) (W), (__v4si) (A), (__v4si) (B))
@@ -831,9 +831,9 @@ _mm256_maskz_mpsadbw_epu8 (__mmask16 __U, __m256i __X,
#endif
-#ifdef __DISABLE_AVX10_2_256__
-#undef __DISABLE_AVX10_2_256__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_256__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* __AVX10_2MEDIAINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2minmaxintrin.h b/gcc/config/i386/avx10_2minmaxintrin.h
index 278ad05..0a4a253 100644
--- a/gcc/config/i386/avx10_2minmaxintrin.h
+++ b/gcc/config/i386/avx10_2minmaxintrin.h
@@ -23,11 +23,11 @@
#ifndef _AVX10_2MINMAXINTRIN_H_INCLUDED
#define _AVX10_2MINMAXINTRIN_H_INCLUDED
-#if !defined(__AVX10_2_256__)
+#if !defined(__AVX10_2__)
#pragma GCC push_options
#pragma GCC target("avx10.2")
-#define __DISABLE_AVX10_2_256__
-#endif /* __AVX10_2_256__ */
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
#ifdef __OPTIMIZE__
extern __inline __m128bh
@@ -143,10 +143,10 @@ extern __inline __m256d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_minmax_pd (__m256d __A, __m256d __B, const int __C)
{
- return (__m256d) __builtin_ia32_minmaxpd256_mask_round (
+ return (__m256d) __builtin_ia32_minmaxpd256_mask (
(__v4df) __A, (__v4df) __B, __C,
(__v4df) (__m256d) _mm256_undefined_pd (),
- (__mmask8) -1, _MM_FROUND_CUR_DIRECTION);
+ (__mmask8) -1);
}
extern __inline __m256d
@@ -154,50 +154,19 @@ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_minmax_pd (__m256d __W, __mmask8 __U, __m256d __A, __m256d __B,
const int __C)
{
- return (__m256d) __builtin_ia32_minmaxpd256_mask_round (
+ return (__m256d) __builtin_ia32_minmaxpd256_mask (
(__v4df) __A, (__v4df) __B, __C, (__v4df) __W,
- (__mmask8) __U, _MM_FROUND_CUR_DIRECTION);
+ (__mmask8) __U);
}
extern __inline __m256d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_maskz_minmax_pd (__mmask8 __U, __m256d __A, __m256d __B, const int __C)
{
- return (__m256d) __builtin_ia32_minmaxpd256_mask_round (
+ return (__m256d) __builtin_ia32_minmaxpd256_mask (
(__v4df) __A, (__v4df) __B, __C,
(__v4df) (__m256d) _mm256_setzero_pd (),
- (__mmask8) __U, _MM_FROUND_CUR_DIRECTION);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_minmax_round_pd (__m256d __A, __m256d __B, const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_minmaxpd256_mask_round (
- (__v4df) __A, (__v4df) __B, __C,
- (__v4df) (__m256d) _mm256_undefined_pd (),
- (__mmask8) -1, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_minmax_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_minmaxpd256_mask_round (
- (__v4df) __A, (__v4df) __B, __C, (__v4df) __W,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_minmax_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_minmaxpd256_mask_round (
- (__v4df) __A, (__v4df) __B, __C,
- (__v4df) (__m256d) _mm256_setzero_pd (),
- (__mmask8) __U, __R);
+ (__mmask8) __U);
}
extern __inline __m128h
@@ -240,10 +209,10 @@ extern __inline __m256h
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_minmax_ph (__m256h __A, __m256h __B, const int __C)
{
- return (__m256h) __builtin_ia32_minmaxph256_mask_round (
+ return (__m256h) __builtin_ia32_minmaxph256_mask (
(__v16hf) __A, (__v16hf) __B, __C,
(__v16hf) (__m256h) _mm256_undefined_ph (),
- (__mmask16) -1, _MM_FROUND_CUR_DIRECTION);
+ (__mmask16) -1);
}
extern __inline __m256h
@@ -251,50 +220,19 @@ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_minmax_ph (__m256h __W, __mmask16 __U, __m256h __A, __m256h __B,
const int __C)
{
- return (__m256h) __builtin_ia32_minmaxph256_mask_round (
+ return (__m256h) __builtin_ia32_minmaxph256_mask (
(__v16hf) __A, (__v16hf) __B, __C, (__v16hf) __W,
- (__mmask16) __U, _MM_FROUND_CUR_DIRECTION);
+ (__mmask16) __U);
}
extern __inline __m256h
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_maskz_minmax_ph (__mmask16 __U, __m256h __A, __m256h __B, const int __C)
{
- return (__m256h) __builtin_ia32_minmaxph256_mask_round (
+ return (__m256h) __builtin_ia32_minmaxph256_mask (
(__v16hf) __A, (__v16hf) __B, __C,
(__v16hf) (__m256h) _mm256_setzero_ph (),
- (__mmask16) __U, _MM_FROUND_CUR_DIRECTION);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_minmax_round_ph (__m256h __A, __m256h __B, const int __C, const int __R)
-{
- return (__m256h) __builtin_ia32_minmaxph256_mask_round (
- (__v16hf) __A, (__v16hf) __B, __C,
- (__v16hf) (__m256h) _mm256_undefined_ph (),
- (__mmask16) -1, __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_minmax_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- __m256h __B, const int __C, const int __R)
-{
- return (__m256h) __builtin_ia32_minmaxph256_mask_round (
- (__v16hf) __A, (__v16hf) __B, __C, (__v16hf) __W,
- (__mmask16) __U, __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_minmax_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- const int __C, const int __R)
-{
- return (__m256h) __builtin_ia32_minmaxph256_mask_round (
- (__v16hf) __A, (__v16hf) __B, __C,
- (__v16hf) (__m256h) _mm256_setzero_ph (),
- (__mmask16) __U, __R);
+ (__mmask16) __U);
}
extern __inline __m128
@@ -337,10 +275,10 @@ extern __inline __m256
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_minmax_ps (__m256 __A, __m256 __B, const int __C)
{
- return (__m256) __builtin_ia32_minmaxps256_mask_round (
+ return (__m256) __builtin_ia32_minmaxps256_mask (
(__v8sf) __A, (__v8sf) __B, __C,
(__v8sf) (__m256) _mm256_undefined_ps (),
- (__mmask8) -1, _MM_FROUND_CUR_DIRECTION);
+ (__mmask8) -1);
}
extern __inline __m256
@@ -348,50 +286,19 @@ __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_mask_minmax_ps (__m256 __W, __mmask8 __U, __m256 __A, __m256 __B,
const int __C)
{
- return (__m256) __builtin_ia32_minmaxps256_mask_round (
+ return (__m256) __builtin_ia32_minmaxps256_mask (
(__v8sf) __A, (__v8sf) __B, __C, (__v8sf) __W,
- (__mmask8) __U, _MM_FROUND_CUR_DIRECTION);
+ (__mmask8) __U);
}
extern __inline __m256
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_maskz_minmax_ps (__mmask8 __U, __m256 __A, __m256 __B, const int __C)
{
- return (__m256) __builtin_ia32_minmaxps256_mask_round (
+ return (__m256) __builtin_ia32_minmaxps256_mask (
(__v8sf) __A, (__v8sf) __B, __C,
(__v8sf) (__m256) _mm256_setzero_ps (),
- (__mmask8) __U, _MM_FROUND_CUR_DIRECTION);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_minmax_round_ps (__m256 __A, __m256 __B, const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_minmaxps256_mask_round (
- (__v8sf) __A, (__v8sf) __B, __C,
- (__v8sf) (__m256) _mm256_undefined_ps (),
- (__mmask8) -1, __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_minmax_round_ps (__m256 __W, __mmask8 __U, __m256 __A, __m256 __B,
- const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_minmaxps256_mask_round (
- (__v8sf) __A, (__v8sf) __B, __C, (__v8sf) __W,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_minmax_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_minmaxps256_mask_round (
- (__v8sf) __A, (__v8sf) __B, __C,
- (__v8sf) (__m256) _mm256_setzero_ps (),
- (__mmask8) __U, __R);
+ (__mmask8) __U);
}
extern __inline __m128d
@@ -697,56 +604,27 @@ _mm_maskz_minmax_round_ss (__mmask8 __U, __m128 __A, __m128 __B,
(__mmask8) (U)))
#define _mm256_minmax_pd(A, B, C) \
- ((__m256d) __builtin_ia32_minmaxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (int) (C), \
- (__v4df) (__m256d) \
- _mm256_undefined_pd (), \
- (__mmask8) (-1), \
- _MM_FROUND_CUR_DIRECTION))
+ ((__m256d) __builtin_ia32_minmaxpd256_mask ((__v4df) (A), \
+ (__v4df) (B), \
+ (int) (C), \
+ (__v4df) (__m256d) \
+ _mm256_undefined_pd (), \
+ (__mmask8) (-1)))
#define _mm256_mask_minmax_pd(W, U, A, B, C) \
- ((__m256d) __builtin_ia32_minmaxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (int) (C), \
- (__v4df) (__m256d) (W), \
- (__mmask8) (U), \
- _MM_FROUND_CUR_DIRECTION))
+ ((__m256d) __builtin_ia32_minmaxpd256_mask ((__v4df) (A), \
+ (__v4df) (B), \
+ (int) (C), \
+ (__v4df) (__m256d) (W), \
+ (__mmask8) (U)))
#define _mm256_maskz_minmax_pd(U, A, B, C) \
- ((__m256d) __builtin_ia32_minmaxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (int) (C), \
- (__v4df) (__m256d) \
- _mm256_setzero_pd (), \
- (__mmask8) (U), \
- _MM_FROUND_CUR_DIRECTION))
-
-#define _mm256_minmax_round_pd(A, B, C, R) \
- ((__m256d) __builtin_ia32_minmaxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (int) (C), \
- (__v4df) (__m256d) \
- _mm256_undefined_pd (), \
- (__mmask8) (-1), \
- (int) (R)))
-
-#define _mm256_mask_minmax_round_pd(W, U, A, B, C, R) \
- ((__m256d) __builtin_ia32_minmaxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (int) (C), \
- (__v4df) (__m256d) (W), \
- (__mmask8) (U), \
- (int) (R)))
-
-#define _mm256_maskz_minmax_round_pd(U, A, B, C, R) \
- ((__m256d) __builtin_ia32_minmaxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (int) (C), \
- (__v4df) (__m256d) \
- _mm256_setzero_pd (), \
- (__mmask8) (U), \
- (int) (R)))
+ ((__m256d) __builtin_ia32_minmaxpd256_mask ((__v4df) (A), \
+ (__v4df) (B), \
+ (int) (C), \
+ (__v4df) (__m256d) \
+ _mm256_setzero_pd (), \
+ (__mmask8) (U)))
#define _mm_minmax_ph(A, B, C) \
((__m128h) __builtin_ia32_minmaxph128_mask ((__v8hf) (A), \
@@ -772,56 +650,27 @@ _mm_maskz_minmax_round_ss (__mmask8 __U, __m128 __A, __m128 __B,
(__mmask8) (U)))
#define _mm256_minmax_ph(A, B, C) \
- ((__m256h) __builtin_ia32_minmaxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (int) (C), \
- (__v16hf) (__m256h) \
- _mm256_undefined_ph (), \
- (__mmask16) (-1), \
- _MM_FROUND_CUR_DIRECTION))
+ ((__m256h) __builtin_ia32_minmaxph256_mask ((__v16hf) (A), \
+ (__v16hf) (B), \
+ (int) (C), \
+ (__v16hf) (__m256h) \
+ _mm256_undefined_ph (), \
+ (__mmask16) (-1)))
#define _mm256_mask_minmax_ph(W, U, A, B, C) \
- ((__m256h) __builtin_ia32_minmaxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (int) (C), \
- (__v16hf) (__m256h) (W), \
- (__mmask16) (U), \
- _MM_FROUND_CUR_DIRECTION))
+ ((__m256h) __builtin_ia32_minmaxph256_mask ((__v16hf) (A), \
+ (__v16hf) (B), \
+ (int) (C), \
+ (__v16hf) (__m256h) (W), \
+ (__mmask16) (U)))
#define _mm256_maskz_minmax_ph(U, A, B, C) \
- ((__m256h) __builtin_ia32_minmaxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (int) (C), \
- (__v16hf) (__m256h) \
- _mm256_setzero_ph (), \
- (__mmask16) (U), \
- _MM_FROUND_CUR_DIRECTION))
-
-#define _mm256_minmax_round_ph(A, B, C, R) \
- ((__m256h) __builtin_ia32_minmaxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (int) (C), \
- (__v16hf) (__m256h) \
- _mm256_undefined_ph (), \
- (__mmask16) (-1), \
- (int) (R)))
-
-#define _mm256_mask_minmax_round_ph(W, U, A, B, C, R) \
- ((__m256h) __builtin_ia32_minmaxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (int) (C), \
- (__v16hf) (__m256h) (W), \
- (__mmask16) (U), \
- (int) (R)))
-
-#define _mm256_maskz_minmax_round_ph(U, A, B, C, R) \
- ((__m256h) __builtin_ia32_minmaxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (int) (C), \
- (__v16hf) (__m256h) \
- _mm256_setzero_ph (), \
- (__mmask16) (U), \
- (int) (R)))
+ ((__m256h) __builtin_ia32_minmaxph256_mask ((__v16hf) (A), \
+ (__v16hf) (B), \
+ (int) (C), \
+ (__v16hf) (__m256h) \
+ _mm256_setzero_ph (), \
+ (__mmask16) (U)))
#define _mm_minmax_ps(A, B, C) \
((__m128) __builtin_ia32_minmaxps128_mask ((__v4sf) (A), \
@@ -847,56 +696,27 @@ _mm_maskz_minmax_round_ss (__mmask8 __U, __m128 __A, __m128 __B,
(__mmask8) (U)))
#define _mm256_minmax_ps(A, B, C) \
- ((__m256) __builtin_ia32_minmaxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (int) (C), \
- (__v8sf) (__m256) \
- _mm256_undefined_ps (), \
- (__mmask8) (-1), \
- _MM_FROUND_CUR_DIRECTION))
+ ((__m256) __builtin_ia32_minmaxps256_mask ((__v8sf) (A), \
+ (__v8sf) (B), \
+ (int) (C), \
+ (__v8sf) (__m256) \
+ _mm256_undefined_ps (), \
+ (__mmask8) (-1)))
#define _mm256_mask_minmax_ps(W, U, A, B, C) \
- ((__m256) __builtin_ia32_minmaxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (int) (C), \
- (__v8sf) (__m256) (W), \
- (__mmask8) (U), \
- _MM_FROUND_CUR_DIRECTION))
+ ((__m256) __builtin_ia32_minmaxps256_mask ((__v8sf) (A), \
+ (__v8sf) (B), \
+ (int) (C), \
+ (__v8sf) (__m256) (W), \
+ (__mmask8) (U)))
#define _mm256_maskz_minmax_ps(U, A, B, C) \
- ((__m256) __builtin_ia32_minmaxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (int) (C), \
- (__v8sf) (__m256) \
- _mm256_setzero_ps (), \
- (__mmask8) (U), \
- _MM_FROUND_CUR_DIRECTION))
-
-#define _mm256_minmax_round_ps(A, B, C, R) \
- ((__m256) __builtin_ia32_minmaxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (int) (C), \
- (__v8sf) (__m256) \
- _mm256_undefined_ps (), \
- (__mmask8) (-1), \
- (int) (R)))
-
-#define _mm256_mask_minmax_round_ps(W, U, A, B, C, R) \
- ((__m256) __builtin_ia32_minmaxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (int) (C), \
- (__v8sf) (__m256) (W), \
- (__mmask8) (U), \
- (int) (R)))
-
-#define _mm256_maskz_minmax_round_ps(U, A, B, C, R) \
- ((__m256) __builtin_ia32_minmaxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (int) (C), \
- (__v8sf) (__m256) \
- _mm256_setzero_ps (), \
- (__mmask8) (U), \
- (int) (R)))
+ ((__m256) __builtin_ia32_minmaxps256_mask ((__v8sf) (A), \
+ (__v8sf) (B), \
+ (int) (C), \
+ (__v8sf) (__m256) \
+ _mm256_setzero_ps (), \
+ (__mmask8) (U)))
#define _mm_minmax_round_sd(A, B, C, R) \
((__m128d) __builtin_ia32_minmaxsd_mask_round ((__v2df) (A), \
@@ -1056,9 +876,9 @@ _mm_maskz_minmax_round_ss (__mmask8 __U, __m128 __A, __m128 __B,
#endif
-#ifdef __DISABLE_AVX10_2_256__
-#undef __DISABLE_AVX10_2_256__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_256__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* _AVX10_2MINMAXINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2roundingintrin.h b/gcc/config/i386/avx10_2roundingintrin.h
deleted file mode 100644
index e36843d..0000000
--- a/gcc/config/i386/avx10_2roundingintrin.h
+++ /dev/null
@@ -1,6433 +0,0 @@
-/* Copyright (C) 2024-2025 Free Software Foundation, Inc.
-
- This file is part of GCC.
-
- GCC is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3, or (at your option)
- any later version.
-
- GCC is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- Under Section 7 of GPL version 3, you are granted additional
- permissions described in the GCC Runtime Library Exception, version
- 3.1, as published by the Free Software Foundation.
-
- You should have received a copy of the GNU General Public License and
- a copy of the GCC Runtime Library Exception along with this program;
- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- <http://www.gnu.org/licenses/>. */
-
-#ifndef _IMMINTRIN_H_INCLUDED
-#error "Never use <avx10_2roundingintrin.h> directly; include <immintrin.h> instead."
-#endif
-
-#ifndef _AVX10_2ROUNDINGINTRIN_H_INCLUDED
-#define _AVX10_2ROUNDINGINTRIN_H_INCLUDED
-
-#ifndef __AVX10_2_256__
-#pragma GCC push_options
-#pragma GCC target("avx10.2-256")
-#define __DISABLE_AVX10_2_256__
-#endif /* __AVX10_2_256__ */
-
-#ifdef __OPTIMIZE__
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_add_round_pd (__m256d __A, __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_addpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_add_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_addpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_add_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __R)
-{
- return (__m256d) __builtin_ia32_addpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_add_round_ph (__m256h __A, __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_addph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_undefined_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_add_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_addph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_add_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- const int __R)
-{
- return (__m256h) __builtin_ia32_addph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_add_round_ps (__m256 __A, __m256 __B, const int __R)
-{
- return (__m256) __builtin_ia32_addps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_add_round_ps (__m256 __W, __mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_addps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_add_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_addps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __mmask8
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmp_round_pd_mask (__m256d __A, __m256d __B, const int __C,
- const int __R)
-{
- return (__mmask8) __builtin_ia32_cmppd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- __C,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __mmask8
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmp_round_pd_mask (__mmask8 __U, __m256d __A, __m256d __B,
- const int __C, const int __R)
-{
- return (__mmask8) __builtin_ia32_cmppd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- __C,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __mmask16
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmp_round_ph_mask (__m256h __A, __m256h __B, const int __C,
- const int __R)
-{
- return (__mmask16) __builtin_ia32_cmpph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- __C,
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __mmask16
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmp_round_ph_mask (__mmask16 __U, __m256h __A, __m256h __B,
- const int __C, const int __R)
-{
- return (__mmask16) __builtin_ia32_cmpph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- __C,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __mmask8
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cmp_round_ps_mask (__m256 __A, __m256 __B, const int __C, const int __R)
-{
- return (__mmask8) __builtin_ia32_cmpps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- __C,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __mmask8
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cmp_round_ps_mask (__mmask8 __U, __m256 __A, __m256 __B,
- const int __C, const int __R)
-{
- return (__mmask8) __builtin_ia32_cmpps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- __C,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepi32_ph (__m256i __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtdq2ph256_mask_round ((__v8si) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepi32_ph (__m128h __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtdq2ph256_mask_round ((__v8si) __A,
- (__v8hf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepi32_ph (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtdq2ph256_mask_round ((__v8si) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepi32_ps (__m256i __A, const int __R)
-{
- return (__m256) __builtin_ia32_cvtdq2ps256_mask_round ((__v8si) __A,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepi32_ps (__m256 __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m256) __builtin_ia32_cvtdq2ps256_mask_round ((__v8si) __A,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepi32_ps (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m256) __builtin_ia32_cvtdq2ps256_mask_round ((__v8si) __A,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundpd_ph (__m256d __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtpd2ph256_mask_round ((__v4df) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundpd_ph (__m128h __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtpd2ph256_mask_round ((__v4df) __A,
- (__v8hf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundpd_ph (__mmask8 __U, __m256d __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtpd2ph256_mask_round ((__v4df) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundpd_ps (__m256d __A, const int __R)
-{
- return (__m128) __builtin_ia32_cvtpd2ps256_mask_round ((__v4df) __A,
- (__v4sf)
- _mm_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundpd_ps (__m128 __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m128) __builtin_ia32_cvtpd2ps256_mask_round ((__v4df) __A,
- (__v4sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundpd_ps (__mmask8 __U, __m256d __A, const int __R)
-{
- return (__m128) __builtin_ia32_cvtpd2ps256_mask_round ((__v4df) __A,
- (__v4sf)
- _mm_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundpd_epi32 (__m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvtpd2dq256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_undefined_si128 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundpd_epi32 (__m128i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m128i) __builtin_ia32_cvtpd2dq256_mask_round ((__v4df) __A,
- (__v4si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundpd_epi32 (__mmask8 __U, __m256d __A, const int __R)
-{
- return (__m128i) __builtin_ia32_cvtpd2dq256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_setzero_si128 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundpd_epi64 (__m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtpd2qq256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundpd_epi64 (__m256i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtpd2qq256_mask_round ((__v4df) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundpd_epi64 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtpd2qq256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundpd_epu32 (__m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvtpd2udq256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_undefined_si128 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundpd_epu32 (__m128i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m128i) __builtin_ia32_cvtpd2udq256_mask_round ((__v4df) __A,
- (__v4si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundpd_epu32 (__mmask8 __U, __m256d __A, const int __R)
-{
- return (__m128i) __builtin_ia32_cvtpd2udq256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_setzero_si128 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundpd_epu64 (__m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtpd2uqq256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundpd_epu64 (__m256i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtpd2uqq256_mask_round ((__v4df) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundpd_epu64 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtpd2uqq256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundph_epi32 (__m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2dq256_mask_round ((__v8hf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundph_epi32 (__m256i __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvtph2dq256_mask_round ((__v8hf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundph_epi32 (__mmask8 __U, __m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2dq256_mask_round ((__v8hf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundph_pd (__m128h __A, const int __R)
-{
- return (__m256d) __builtin_ia32_vcvtph2pd256_mask_round ((__v8hf) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundph_pd (__m256d __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256d) __builtin_ia32_vcvtph2pd256_mask_round ((__v8hf) __A,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundph_pd (__mmask8 __U, __m128h __A, const int __R)
-{
- return (__m256d) __builtin_ia32_vcvtph2pd256_mask_round ((__v8hf) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundph_ps (__m128h __A, const int __R)
-{
- return
- (__m256) __builtin_ia32_vcvtph2ps256_mask_round ((__v8hf) __A,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundph_ps (__m256 __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256) __builtin_ia32_vcvtph2ps256_mask_round ((__v8hf) __A,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundph_ps (__mmask8 __U, __m128h __A, const int __R)
-{
- return (__m256) __builtin_ia32_vcvtph2ps256_mask_round ((__v8hf) __A,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtx_roundph_ps (__m128h __A, const int __R)
-{
- return (__m256) __builtin_ia32_vcvtph2psx256_mask_round ((__v8hf) __A,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtx_roundph_ps (__m256 __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256) __builtin_ia32_vcvtph2psx256_mask_round ((__v8hf) __A,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtx_roundph_ps (__mmask8 __U, __m128h __A, const int __R)
-{
- return (__m256) __builtin_ia32_vcvtph2psx256_mask_round ((__v8hf) __A,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundph_epi64 (__m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2qq256_mask_round ((__v8hf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundph_epi64 (__m256i __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvtph2qq256_mask_round ((__v8hf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundph_epi64 (__mmask8 __U, __m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2qq256_mask_round ((__v8hf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundph_epu32 (__m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2udq256_mask_round ((__v8hf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundph_epu32 (__m256i __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvtph2udq256_mask_round ((__v8hf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundph_epu32 (__mmask8 __U, __m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2udq256_mask_round ((__v8hf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundph_epu64 (__m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2uqq256_mask_round ((__v8hf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundph_epu64 (__m256i __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvtph2uqq256_mask_round ((__v8hf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundph_epu64 (__mmask8 __U, __m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2uqq256_mask_round ((__v8hf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundph_epu16 (__m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2uw256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_undefined_si256 (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundph_epu16 (__m256i __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvtph2uw256_mask_round ((__v16hf) __A,
- (__v16hi) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundph_epu16 (__mmask16 __U, __m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2uw256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundph_epi16 (__m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2w256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_undefined_si256 (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundph_epi16 (__m256i __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvtph2w256_mask_round ((__v16hf) __A,
- (__v16hi) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundph_epi16 (__mmask16 __U, __m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtph2w256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundps_pd (__m128 __A, const int __R)
-{
- return
- (__m256d) __builtin_ia32_vcvtps2pd256_mask_round ((__v4sf) __A,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundps_pd (__m256d __W, __mmask8 __U, __m128 __A,
- const int __R)
-{
- return (__m256d) __builtin_ia32_vcvtps2pd256_mask_round ((__v4sf) __A,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundps_pd (__mmask8 __U, __m128 __A, const int __R)
-{
- return (__m256d) __builtin_ia32_vcvtps2pd256_mask_round ((__v4sf) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtx_roundps_ph (__m256 __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtps2phx256_mask_round ((__v8sf) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtx_roundps_ph (__m128h __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtps2phx256_mask_round ((__v8sf) __A,
- (__v8hf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtx_roundps_ph (__mmask8 __U, __m256 __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtps2phx256_mask_round ((__v8sf) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundps_epi32 (__m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtps2dq256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundps_epi32 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvtps2dq256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundps_epi32 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvtps2dq256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundps_epi64 (__m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2qq256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundps_epi64 (__m256i __W, __mmask8 __U, __m128 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtps2qq256_mask_round ((__v4sf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundps_epi64 (__mmask8 __U, __m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2qq256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundps_epu32 (__m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2udq256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundps_epu32 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtps2udq256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundps_epu32 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2udq256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundps_epu64 (__m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2uqq256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundps_epu64 (__m256i __W, __mmask8 __U, __m128 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtps2uqq256_mask_round ((__v4sf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundps_epu64 (__mmask8 __U, __m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2uqq256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepi64_pd (__m256i __A, const int __R)
-{
- return (__m256d) __builtin_ia32_cvtqq2pd256_mask_round ((__v4di) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepi64_pd (__m256d __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m256d) __builtin_ia32_cvtqq2pd256_mask_round ((__v4di) __A,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepi64_pd (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m256d) __builtin_ia32_cvtqq2pd256_mask_round ((__v4di) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepi64_ph (__m256i __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtqq2ph256_mask_round ((__v4di) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepi64_ph (__m128h __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtqq2ph256_mask_round ((__v4di) __A,
- (__v8hf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepi64_ph (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtqq2ph256_mask_round ((__v4di) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepi64_ps (__m256i __A, const int __R)
-{
- return (__m128) __builtin_ia32_cvtqq2ps256_mask_round ((__v4di) __A,
- (__v4sf)
- _mm_setzero_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepi64_ps (__m128 __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m128) __builtin_ia32_cvtqq2ps256_mask_round ((__v4di) __A,
- (__v4sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepi64_ps (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m128) __builtin_ia32_cvtqq2ps256_mask_round ((__v4di) __A,
- (__v4sf)
- _mm_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundpd_epi32 (__m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvttpd2dq256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_undefined_si128 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundpd_epi32 (__m128i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m128i) __builtin_ia32_cvttpd2dq256_mask_round ((__v4df) __A,
- (__v4si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundpd_epi32 (__mmask8 __U, __m256d __A, const int __R)
-{
- return (__m128i) __builtin_ia32_cvttpd2dq256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_setzero_si128 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundpd_epi64 (__m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttpd2qq256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundpd_epi64 (__m256i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttpd2qq256_mask_round ((__v4df) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundpd_epi64 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttpd2qq256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundpd_epu32 (__m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvttpd2udq256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_undefined_si128 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundpd_epu32 (__m128i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m128i) __builtin_ia32_cvttpd2udq256_mask_round ((__v4df) __A,
- (__v4si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundpd_epu32 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvttpd2udq256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_setzero_si128 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundpd_epu64 (__m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttpd2uqq256_mask_round ((__v4df) __A,
- (__v4di) \
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundpd_epu64 (__m256i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttpd2uqq256_mask_round ((__v4df) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundpd_epu64 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttpd2uqq256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundph_epi32 (__m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2dq256_mask_round ((__v8hf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundph_epi32 (__m256i __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvttph2dq256_mask_round ((__v8hf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundph_epi32 (__mmask8 __U, __m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2dq256_mask_round ((__v8hf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundph_epi64 (__m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2qq256_mask_round ((__v8hf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundph_epi64 (__m256i __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvttph2qq256_mask_round ((__v8hf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundph_epi64 (__mmask8 __U, __m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2qq256_mask_round ((__v8hf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundph_epu32 (__m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2udq256_mask_round ((__v8hf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundph_epu32 (__m256i __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvttph2udq256_mask_round ((__v8hf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundph_epu32 (__mmask8 __U, __m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2udq256_mask_round ((__v8hf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundph_epu64 (__m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2uqq256_mask_round ((__v8hf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundph_epu64 (__m256i __W, __mmask8 __U, __m128h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvttph2uqq256_mask_round ((__v8hf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundph_epu64 (__mmask8 __U, __m128h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2uqq256_mask_round ((__v8hf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundph_epu16 (__m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundph_epu16 (__m256i __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) __A,
- (__v16hi) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundph_epu16 (__mmask16 __U, __m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundph_epi16 (__m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2w256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundph_epi16 (__m256i __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_vcvttph2w256_mask_round ((__v16hf) __A,
- (__v16hi) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundph_epi16 (__mmask16 __U, __m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_vcvttph2w256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundps_epi32 (__m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2dq256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundps_epi32 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2dq256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundps_epi32 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2dq256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundps_epi64 (__m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2qq256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundps_epi64 (__m256i __W, __mmask8 __U, __m128 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2qq256_mask_round ((__v4sf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundps_epi64 (__mmask8 __U, __m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2qq256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundps_epu32 (__m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2udq256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundps_epu32 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2udq256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundps_epu32 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2udq256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtt_roundps_epu64 (__m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2uqq256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtt_roundps_epu64 (__m256i __W, __mmask8 __U, __m128 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2uqq256_mask_round ((__v4sf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtt_roundps_epu64 (__mmask8 __U, __m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2uqq256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepu32_ph (__m256i __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtudq2ph256_mask_round ((__v8si) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepu32_ph (__m128h __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtudq2ph256_mask_round ((__v8si) __A,
- (__v8hf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepu32_ph (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtudq2ph256_mask_round ((__v8si) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepu32_ps (__m256i __A, const int __R)
-{
- return
- (__m256) __builtin_ia32_cvtudq2ps256_mask_round ((__v8si) __A,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepu32_ps (__m256 __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m256) __builtin_ia32_cvtudq2ps256_mask_round ((__v8si) __A,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepu32_ps (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m256) __builtin_ia32_cvtudq2ps256_mask_round ((__v8si) __A,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepu64_pd (__m256i __A, const int __R)
-{
- return (__m256d) __builtin_ia32_cvtuqq2pd256_mask_round ((__v4di) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepu64_pd (__m256d __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m256d) __builtin_ia32_cvtuqq2pd256_mask_round ((__v4di) __A,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepu64_pd (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m256d) __builtin_ia32_cvtuqq2pd256_mask_round ((__v4di) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepu64_ph (__m256i __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtuqq2ph256_mask_round ((__v4di) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepu64_ph (__m128h __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtuqq2ph256_mask_round ((__v4di) __A,
- (__v8hf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepu64_ph (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m128h) __builtin_ia32_vcvtuqq2ph256_mask_round ((__v4di) __A,
- (__v8hf)
- _mm_setzero_ph (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepu64_ps (__m256i __A, const int __R)
-{
- return (__m128) __builtin_ia32_cvtuqq2ps256_mask_round ((__v4di) __A,
- (__v4sf)
- _mm_setzero_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepu64_ps (__m128 __W, __mmask8 __U, __m256i __A,
- const int __R)
-{
- return (__m128) __builtin_ia32_cvtuqq2ps256_mask_round ((__v4di) __A,
- (__v4sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepu64_ps (__mmask8 __U, __m256i __A, const int __R)
-{
- return (__m128) __builtin_ia32_cvtuqq2ps256_mask_round ((__v4di) __A,
- (__v4sf)
- _mm_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepu16_ph (__m256i __A, const int __R)
-{
- return (__m256h) __builtin_ia32_vcvtuw2ph256_mask_round ((__v16hi) __A,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepu16_ph (__m256h __W, __mmask16 __U, __m256i __A,
- const int __R)
-{
- return (__m256h) __builtin_ia32_vcvtuw2ph256_mask_round ((__v16hi) __A,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepu16_ph (__mmask16 __U, __m256i __A, const int __R)
-{
- return (__m256h) __builtin_ia32_vcvtuw2ph256_mask_round ((__v16hi) __A,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvt_roundepi16_ph (__m256i __A, const int __R)
-{
- return (__m256h) __builtin_ia32_vcvtw2ph256_mask_round ((__v16hi) __A,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvt_roundepi16_ph (__m256h __W, __mmask16 __U, __m256i __A,
- const int __R)
-{
- return (__m256h) __builtin_ia32_vcvtw2ph256_mask_round ((__v16hi) __A,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvt_roundepi16_ph (__mmask16 __U, __m256i __A, const int __R)
-{
- return (__m256h) __builtin_ia32_vcvtw2ph256_mask_round ((__v16hi) __A,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_div_round_pd (__m256d __A, __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_divpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_div_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_divpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_div_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __R)
-{
- return (__m256d) __builtin_ia32_divpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_div_round_ph (__m256h __A, __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_divph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_div_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_divph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_div_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- const int __R)
-{
- return (__m256h) __builtin_ia32_divph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_div_round_ps (__m256 __A, __m256 __B, const int __R)
-{
- return (__m256) __builtin_ia32_divps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_div_round_ps (__m256 __W, __mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_divps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_div_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_divps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fcmadd_round_pch (__m256h __A, __m256h __B, __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfcmaddcph256_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fcmadd_round_pch (__m256h __A, __mmask8 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfcmaddcph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fcmadd_round_pch (__m256h __A, __m256h __B, __m256h __D,
- __mmask8 __U, const int __R)
-{
- return (__m256h) __builtin_ia32_vfcmaddcph256_mask3_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fcmadd_round_pch (__mmask8 __U, __m256h __A, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfcmaddcph256_maskz_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fcmul_round_pch (__m256h __A, __m256h __B, const int __R)
-{
- return
- (__m256h) __builtin_ia32_vfcmulcph256_round ((__v16hf) __A,
- (__v16hf) __B,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fcmul_round_pch (__m256h __W, __mmask8 __U, __m256h __A,
- __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_vfcmulcph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fcmul_round_pch (__mmask8 __U, __m256h __A, __m256h __B,
- const int __R)
-{
- return (__m256h) __builtin_ia32_vfcmulcph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fixupimm_round_pd (__m256d __A, __m256d __B, __m256i __D,
- const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_fixupimmpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4di) __D,
- __C,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fixupimm_round_pd (__m256d __A, __mmask8 __U, __m256d __B,
- __m256i __D, const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_fixupimmpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4di) __D,
- __C,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fixupimm_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- __m256i __D, const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_fixupimmpd256_maskz_round ((__v4df) __A,
- (__v4df) __B,
- (__v4di) __D,
- __C,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fixupimm_round_ps (__m256 __A, __m256 __B, __m256i __D, const int __C,
- const int __R)
-{
- return (__m256) __builtin_ia32_fixupimmps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8si) __D,
- __C,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fixupimm_round_ps (__m256 __A, __mmask8 __U, __m256 __B,
- __m256i __D, const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_fixupimmps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8si) __D,
- __C,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fixupimm_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- __m256i __D, const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_fixupimmps256_maskz_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8si) __D,
- __C,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmadd_round_pd (__m256d __A, __m256d __B, __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmaddpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmadd_round_pd (__m256d __A, __mmask8 __U, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmaddpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmadd_round_pd (__m256d __A, __m256d __B, __m256d __D,
- __mmask8 __U, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmaddpd256_mask3_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmadd_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmaddpd256_maskz_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmadd_round_ph (__m256h __A, __m256h __B, __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmadd_round_ph (__m256h __A, __mmask16 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmadd_round_ph (__m256h __A, __m256h __B, __m256h __D,
- __mmask16 __U, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddph256_mask3_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmadd_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddph256_maskz_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmadd_round_ps (__m256 __A, __m256 __B, __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmaddps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmadd_round_ps (__m256 __A, __mmask8 __U, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmaddps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmadd_round_ps (__m256 __A, __m256 __B, __m256 __D,
- __mmask8 __U, const int __R)
-{
- return (__m256) __builtin_ia32_vfmaddps256_mask3_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmadd_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmaddps256_maskz_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmadd_round_pch (__m256h __A, __m256h __B, __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddcph256_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmadd_round_pch (__m256h __A, __mmask16 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddcph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmadd_round_pch (__m256h __A, __m256h __B, __m256h __D,
- __mmask16 __U, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddcph256_mask3_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmadd_round_pch (__mmask16 __U, __m256h __A, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddcph256_maskz_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmaddsub_round_pd (__m256d __A, __m256d __B, __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmaddsubpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmaddsub_round_pd (__m256d __A, __mmask8 __U, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmaddsubpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmaddsub_round_pd (__m256d __A, __m256d __B, __m256d __D,
- __mmask8 __U, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmaddsubpd256_mask3_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmaddsub_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmaddsubpd256_maskz_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmaddsub_round_ph (__m256h __A, __m256h __B, __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddsubph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmaddsub_round_ph (__m256h __A, __mmask16 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddsubph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmaddsub_round_ph (__m256h __A, __m256h __B, __m256h __D,
- __mmask16 __U, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddsubph256_mask3_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmaddsub_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmaddsubph256_maskz_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmaddsub_round_ps (__m256 __A, __m256 __B, __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmaddsubps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmaddsub_round_ps (__m256 __A, __mmask8 __U, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmaddsubps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmaddsub_round_ps (__m256 __A, __m256 __B, __m256 __D,
- __mmask8 __U, const int __R)
-{
- return (__m256) __builtin_ia32_vfmaddsubps256_mask3_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmaddsub_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmaddsubps256_maskz_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmsub_round_pd (__m256d __A, __m256d __B, __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmsubpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) -1, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmsub_round_pd (__m256d __A, __mmask8 __U, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmsubpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmsub_round_pd (__m256d __A, __m256d __B, __m256d __D,
- __mmask8 __U, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmsubpd256_mask3_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmsub_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmsubpd256_maskz_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmsub_round_ph (__m256h __A, __m256h __B, __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfmsubph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) -1, __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmsub_round_ph (__m256h __A, __mmask16 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfmsubph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U, __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmsub_round_ph (__m256h __A, __m256h __B, __m256h __D,
- __mmask16 __U, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfmsubph256_mask3_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U, __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmsub_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfmsubph256_maskz_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U, __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmsub_round_ps (__m256 __A, __m256 __B, __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmsubps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) -1, __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmsub_round_ps (__m256 __A, __mmask8 __U, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmsubps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmsub_round_ps (__m256 __A, __m256 __B, __m256 __D,
- __mmask8 __U, const int __R)
-{
- return (__m256) __builtin_ia32_vfmsubps256_mask3_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmsub_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmsubps256_maskz_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmsubadd_round_pd (__m256d __A, __m256d __B, __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmsubaddpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmsubadd_round_pd (__m256d __A, __mmask8 __U, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmsubaddpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmsubadd_round_pd (__m256d __A, __m256d __B, __m256d __D,
- __mmask8 __U, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmsubaddpd256_mask3_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmsubadd_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfmsubaddpd256_maskz_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmsubadd_round_ph (__m256h __A, __m256h __B, __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfmsubaddph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmsubadd_round_ph (__m256h __A, __mmask16 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfmsubaddph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmsubadd_round_ph (__m256h __A, __m256h __B, __m256h __D,
- __mmask16 __U, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfmsubaddph256_mask3_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmsubadd_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfmsubaddph256_maskz_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmsubadd_round_ps (__m256 __A, __m256 __B, __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmsubaddps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmsubadd_round_ps (__m256 __A, __mmask8 __U, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmsubaddps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fmsubadd_round_ps (__m256 __A, __m256 __B, __m256 __D,
- __mmask8 __U, const int __R)
-{
- return (__m256) __builtin_ia32_vfmsubaddps256_mask3_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmsubadd_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfmsubaddps256_maskz_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fmul_round_pch (__m256h __B, __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmulcph256_round ((__v16hf) __B,
- (__v16hf) __D,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fmul_round_pch (__m256h __A, __mmask8 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h) __builtin_ia32_vfmulcph256_mask_round ((__v16hf) __B,
- (__v16hf) __D,
- (__v16hf) __A,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fmul_round_pch (__mmask8 __U, __m256h __B, __m256h __D,
- const int __R)
-{
- return (__m256h) __builtin_ia32_vfmulcph256_mask_round ((__v16hf) __B,
- (__v16hf) __D,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fnmadd_round_pd (__m256d __A, __m256d __B, __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfnmaddpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fnmadd_round_pd (__m256d __A, __mmask8 __U, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfnmaddpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fnmadd_round_pd (__m256d __A, __m256d __B, __m256d __D,
- __mmask8 __U, const int __R)
-{
- return (__m256d) __builtin_ia32_vfnmaddpd256_mask3_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fnmadd_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfnmaddpd256_maskz_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fnmadd_round_ph (__m256h __A, __m256h __B, __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfnmaddph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fnmadd_round_ph (__m256h __A, __mmask16 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfnmaddph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fnmadd_round_ph (__m256h __A, __m256h __B, __m256h __D,
- __mmask16 __U, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfnmaddph256_mask3_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fnmadd_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfnmaddph256_maskz_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fnmadd_round_ps (__m256 __A, __m256 __B, __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfnmaddps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fnmadd_round_ps (__m256 __A, __mmask8 __U, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfnmaddps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fnmadd_round_ps (__m256 __A, __m256 __B, __m256 __D,
- __mmask8 __U, const int __R)
-{
- return (__m256) __builtin_ia32_vfnmaddps256_mask3_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fnmadd_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfnmaddps256_maskz_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fnmsub_round_pd (__m256d __A, __m256d __B, __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfnmsubpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fnmsub_round_pd (__m256d __A, __mmask8 __U, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfnmsubpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fnmsub_round_pd (__m256d __A, __m256d __B, __m256d __D,
- __mmask8 __U, const int __R)
-{
- return (__m256d) __builtin_ia32_vfnmsubpd256_mask3_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fnmsub_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- __m256d __D, const int __R)
-{
- return (__m256d) __builtin_ia32_vfnmsubpd256_maskz_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fnmsub_round_ph (__m256h __A, __m256h __B, __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfnmsubph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fnmsub_round_ph (__m256h __A, __mmask16 __U, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfnmsubph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fnmsub_round_ph (__m256h __A, __m256h __B, __m256h __D,
- __mmask16 __U, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfnmsubph256_mask3_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fnmsub_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- __m256h __D, const int __R)
-{
- return (__m256h)
- __builtin_ia32_vfnmsubph256_maskz_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __D,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_fnmsub_round_ps (__m256 __A, __m256 __B, __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfnmsubps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_fnmsub_round_ps (__m256 __A, __mmask8 __U, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfnmsubps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask3_fnmsub_round_ps (__m256 __A, __m256 __B, __m256 __D,
- __mmask8 __U, const int __R)
-{
- return (__m256) __builtin_ia32_vfnmsubps256_mask3_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_fnmsub_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- __m256 __D, const int __R)
-{
- return (__m256) __builtin_ia32_vfnmsubps256_maskz_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __D,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_getexp_round_pd (__m256d __A, const int __R)
-{
- return
- (__m256d) __builtin_ia32_getexppd256_mask_round ((__v4df) __A,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_getexp_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m256d) __builtin_ia32_getexppd256_mask_round ((__v4df) __A,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_getexp_round_pd (__mmask8 __U, __m256d __A, const int __R)
-{
- return (__m256d) __builtin_ia32_getexppd256_mask_round ((__v4df) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_getexp_round_ph (__m256h __A, const int __R)
-{
- return (__m256h) __builtin_ia32_getexpph256_mask_round ((__v16hf) __A,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_getexp_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256h) __builtin_ia32_getexpph256_mask_round ((__v16hf) __A,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_getexp_round_ph (__mmask16 __U, __m256h __A, const int __R)
-{
- return (__m256h) __builtin_ia32_getexpph256_mask_round ((__v16hf) __A,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_getexp_round_ps (__m256 __A, const int __R)
-{
- return (__m256) __builtin_ia32_getexpps256_mask_round ((__v8sf) __A,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_getexp_round_ps (__m256 __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256) __builtin_ia32_getexpps256_mask_round ((__v8sf) __A,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_getexp_round_ps (__mmask8 __U, __m256 __A, const int __R)
-{
- return (__m256) __builtin_ia32_getexpps256_mask_round ((__v8sf) __A,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_getmant_round_pd (__m256d __A, _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return
- (__m256d) __builtin_ia32_getmantpd256_mask_round ((__v4df) __A,
- (__C << 2) | __B,
- _mm256_undefined_pd (),
- (__mmask8) -1, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_getmant_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return (__m256d) __builtin_ia32_getmantpd256_mask_round ((__v4df) __A,
- (__C << 2) | __B,
- (__v4df) __W, __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_getmant_round_pd (__mmask8 __U, __m256d __A,
- _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return (__m256d) __builtin_ia32_getmantpd256_mask_round ((__v4df) __A,
- (__C << 2) | __B,
- (__v4df)
- _mm256_setzero_pd (),
- __U, __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_getmant_round_ph (__m256h __A, _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return
- (__m256h) __builtin_ia32_getmantph256_mask_round ((__v16hf) __A,
- (__C << 2) | __B,
- _mm256_undefined_ph (),
- (__mmask16) -1, __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_getmant_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return (__m256h) __builtin_ia32_getmantph256_mask_round ((__v16hf) __A,
- (__C << 2) | __B,
- (__v16hf) __W, __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_getmant_round_ph (__mmask8 __U, __m256h __A,
- _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return (__m256h) __builtin_ia32_getmantph256_mask_round ((__v16hf) __A,
- (__C << 2) | __B,
- (__v16hf)
- _mm256_setzero_ph (),
- __U, __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_getmant_round_ps (__m256 __A, _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return
- (__m256) __builtin_ia32_getmantps256_mask_round ((__v8sf) __A,
- (__C << 2) | __B,
- _mm256_undefined_ps (),
- (__mmask8) -1, __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_getmant_round_ps (__m256 __W, __mmask8 __U, __m256 __A,
- _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return (__m256) __builtin_ia32_getmantps256_mask_round ((__v8sf) __A,
- (__C << 2) | __B,
- (__v8sf) __W, __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_getmant_round_ps (__mmask8 __U, __m256 __A,
- _MM_MANTISSA_NORM_ENUM __B,
- _MM_MANTISSA_SIGN_ENUM __C, const int __R)
-{
- return (__m256) __builtin_ia32_getmantps256_mask_round ((__v8sf) __A,
- (__C << 2) | __B,
- (__v8sf)
- _mm256_setzero_ps (),
- __U, __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_max_round_pd (__m256d __A, __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_maxpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_max_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_maxpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_max_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __R)
-{
- return (__m256d) __builtin_ia32_maxpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_max_round_ph (__m256h __A, __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_maxph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_undefined_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_max_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_maxph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_max_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- const int __R)
-{
- return (__m256h) __builtin_ia32_maxph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_max_round_ps (__m256 __A, __m256 __B, const int __R)
-{
- return (__m256) __builtin_ia32_maxps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_max_round_ps (__m256 __W, __mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_maxps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_max_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_maxps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_min_round_pd (__m256d __A, __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_minpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_min_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_minpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_min_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __R)
-{
- return (__m256d) __builtin_ia32_minpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_min_round_ph (__m256h __A, __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_minph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_undefined_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_min_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_minph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_min_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- const int __R)
-{
- return (__m256h) __builtin_ia32_minph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_min_round_ps (__m256 __A, __m256 __B, const int __R)
-{
- return (__m256) __builtin_ia32_minps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_min_round_ps (__m256 __W, __mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_minps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_min_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_minps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mul_round_pd (__m256d __A, __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_mulpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_mul_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_mulpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_mul_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __R)
-{
- return (__m256d) __builtin_ia32_mulpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mul_round_ph (__m256h __A, __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_mulph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_undefined_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_mul_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_mulph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_mul_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- const int __R)
-{
- return (__m256h) __builtin_ia32_mulph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mul_round_ps (__m256 __A, __m256 __B, const int __R)
-{
- return (__m256) __builtin_ia32_mulps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_mul_round_ps (__m256 __W, __mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_mulps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_mul_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_mulps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_range_round_pd (__m256d __A, __m256d __B, const int __C,
- const int __R)
-{
- return (__m256d) __builtin_ia32_rangepd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- __C,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_range_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_rangepd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- __C,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_range_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_rangepd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- __C,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_range_round_ps (__m256 __A, __m256 __B, const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_rangeps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- __C,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_range_round_ps (__m256 __W, __mmask8 __U, __m256 __A,
- __m256 __B, const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_rangeps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- __C,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_range_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_rangeps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- __C,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_reduce_round_pd (__m256d __A, const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_reducepd256_mask_round ((__v4df) __A,
- __C,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_reduce_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_reducepd256_mask_round ((__v4df) __A,
- __C,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_reduce_round_pd (__mmask8 __U, __m256d __A, const int __C,
- const int __R)
-{
- return (__m256d) __builtin_ia32_reducepd256_mask_round ((__v4df) __A,
- __C,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_reduce_round_ph (__m256h __A, const int __C, const int __R)
-{
- return (__m256h) __builtin_ia32_reduceph256_mask_round ((__v16hf) __A,
- __C,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_reduce_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- const int __C, const int __R)
-{
- return (__m256h) __builtin_ia32_reduceph256_mask_round ((__v16hf) __A,
- __C,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_reduce_round_ph (__mmask16 __U, __m256h __A, const int __C,
- const int __R)
-{
- return (__m256h) __builtin_ia32_reduceph256_mask_round ((__v16hf) __A,
- __C,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_reduce_round_ps (__m256 __A, const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_reduceps256_mask_round ((__v8sf) __A,
- __C,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_reduce_round_ps (__m256 __W, __mmask8 __U, __m256 __A,
- const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_reduceps256_mask_round ((__v8sf) __A,
- __C,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_reduce_round_ps (__mmask8 __U, __m256 __A, const int __C,
- const int __R)
-{
- return (__m256) __builtin_ia32_reduceps256_mask_round ((__v8sf) __A,
- __C,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_roundscale_round_pd (__m256d __A, const int __C, const int __R)
-{
- return
- (__m256d) __builtin_ia32_rndscalepd256_mask_round ((__v4df) __A,
- __C,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_roundscale_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- const int __C, const int __R)
-{
- return (__m256d) __builtin_ia32_rndscalepd256_mask_round ((__v4df) __A,
- __C,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_roundscale_round_pd (__mmask8 __U, __m256d __A, const int __C,
- const int __R)
-{
- return
- (__m256d) __builtin_ia32_rndscalepd256_mask_round ((__v4df) __A,
- __C,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_roundscale_round_ph (__m256h __A, const int __C, const int __R)
-{
- return
- (__m256h) __builtin_ia32_rndscaleph256_mask_round ((__v16hf) __A,
- __C,
- (__v16hf)
- _mm256_undefined_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_roundscale_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- const int __C, const int __R)
-{
- return (__m256h) __builtin_ia32_rndscaleph256_mask_round ((__v16hf) __A,
- __C,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_roundscale_round_ph (__mmask16 __U, __m256h __A, const int __C,
- const int __R)
-{
- return
- (__m256h) __builtin_ia32_rndscaleph256_mask_round ((__v16hf) __A,
- __C,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_roundscale_round_ps (__m256 __A, const int __C, const int __R)
-{
- return
- (__m256) __builtin_ia32_rndscaleps256_mask_round ((__v8sf) __A,
- __C,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_roundscale_round_ps (__m256 __W, __mmask8 __U, __m256 __A,
- const int __C, const int __R)
-{
- return (__m256) __builtin_ia32_rndscaleps256_mask_round ((__v8sf) __A,
- __C,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_roundscale_round_ps (__mmask8 __U, __m256 __A, const int __C,
- const int __R)
-{
- return (__m256) __builtin_ia32_rndscaleps256_mask_round ((__v8sf) __A,
- __C,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_scalef_round_pd (__m256d __A, __m256d __B, const int __R)
-{
- return
- (__m256d) __builtin_ia32_scalefpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_scalef_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_scalefpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_scalef_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __R)
-{
- return (__m256d) __builtin_ia32_scalefpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_scalef_round_ph (__m256h __A, __m256h __B, const int __R)
-{
- return
- (__m256h) __builtin_ia32_scalefph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_undefined_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_scalef_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_scalefph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_scalef_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- const int __R)
-{
- return (__m256h) __builtin_ia32_scalefph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_scalef_round_ps (__m256 __A, __m256 __B, const int __R)
-{
- return (__m256) __builtin_ia32_scalefps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_scalef_round_ps (__m256 __W, __mmask8 __U, __m256 __A,
- __m256 __B, const int __R)
-{
- return (__m256) __builtin_ia32_scalefps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_scalef_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_scalefps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_sqrt_round_pd (__m256d __A, const int __R)
-{
- return (__m256d) __builtin_ia32_sqrtpd256_mask_round ((__v4df) __A,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_sqrt_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m256d) __builtin_ia32_sqrtpd256_mask_round ((__v4df) __A,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_sqrt_round_pd (__mmask8 __U, __m256d __A, const int __R)
-{
- return (__m256d) __builtin_ia32_sqrtpd256_mask_round ((__v4df) __A,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_sqrt_round_ph (__m256h __A, const int __R)
-{
- return (__m256h) __builtin_ia32_sqrtph256_mask_round ((__v16hf) __A,
- (__v16hf)
- _mm256_undefined_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_sqrt_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256h) __builtin_ia32_sqrtph256_mask_round ((__v16hf) __A,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_sqrt_round_ph (__mmask16 __U, __m256h __A, const int __R)
-{
- return (__m256h) __builtin_ia32_sqrtph256_mask_round ((__v16hf) __A,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_sqrt_round_ps (__m256 __A, const int __R)
-{
- return (__m256) __builtin_ia32_sqrtps256_mask_round ((__v8sf) __A,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_sqrt_round_ps (__m256 __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256) __builtin_ia32_sqrtps256_mask_round ((__v8sf) __A,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_sqrt_round_ps (__mmask8 __U, __m256 __A, const int __R)
-{
- return (__m256) __builtin_ia32_sqrtps256_mask_round ((__v8sf) __A,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_sub_round_pd (__m256d __A, __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_subpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_undefined_pd (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_sub_round_pd (__m256d __W, __mmask8 __U, __m256d __A,
- __m256d __B, const int __R)
-{
- return (__m256d) __builtin_ia32_subpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256d
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_sub_round_pd (__mmask8 __U, __m256d __A, __m256d __B,
- const int __R)
-{
- return (__m256d) __builtin_ia32_subpd256_mask_round ((__v4df) __A,
- (__v4df) __B,
- (__v4df)
- _mm256_setzero_pd (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_sub_round_ph (__m256h __A, __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_subph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_undefined_ph (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_sub_round_ph (__m256h __W, __mmask16 __U, __m256h __A,
- __m256h __B, const int __R)
-{
- return (__m256h) __builtin_ia32_subph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256h
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_sub_round_ph (__mmask16 __U, __m256h __A, __m256h __B,
- const int __R)
-{
- return (__m256h) __builtin_ia32_subph256_mask_round ((__v16hf) __A,
- (__v16hf) __B,
- (__v16hf)
- _mm256_setzero_ph (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_sub_round_ps (__m256 __A, __m256 __B, const int __R)
-{
- return (__m256) __builtin_ia32_subps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_undefined_ps (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_sub_round_ps (__m256 __W, __mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_subps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_sub_round_ps (__mmask8 __U, __m256 __A, __m256 __B,
- const int __R)
-{
- return (__m256) __builtin_ia32_subps256_mask_round ((__v8sf) __A,
- (__v8sf) __B,
- (__v8sf)
- _mm256_setzero_ps (),
- (__mmask8) __U,
- __R);
-}
-#else
-#define _mm256_add_round_pd(A, B, R) \
- ((__m256d) __builtin_ia32_addpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_add_round_pd(W, U, A, B, R) \
- ((__m256d) __builtin_ia32_addpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_add_round_pd(U, A, B, R) \
- ((__m256d) __builtin_ia32_addpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_add_round_ph(A, B, R) \
- ((__m256h) __builtin_ia32_addph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_undefined_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_add_round_ph(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_addph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_add_round_ph(U, A, B, R) \
- ((__m256h) __builtin_ia32_addph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_add_round_ps(A, B, R) \
- ((__m256) __builtin_ia32_addps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_add_round_ps(W, U, A, B, R) \
- ((__m256) __builtin_ia32_addps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_add_round_ps(U, A, B, R)\
- ((__m256) __builtin_ia32_addps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cmp_round_pd_mask(A, B, C, R) \
- ((__mmask8) __builtin_ia32_cmppd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (C), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cmp_round_pd_mask(U, A, B, C, R) \
- ((__mmask8) __builtin_ia32_cmppd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (C), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cmp_round_ph_mask(A, B, C, R) \
- ((__mmask16) __builtin_ia32_cmpph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (C), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_cmp_round_ph_mask(U, A, B, C, R) \
- ((__mmask16) __builtin_ia32_cmpph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (C), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_cmp_round_ps_mask(A, B, C, R) \
- ((__mmask8) __builtin_ia32_cmpps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (C), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cmp_round_ps_mask(U, A, B, C, R) \
- ((__mmask8) __builtin_ia32_cmpps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (C), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepi32_ph(A, R) \
- ((__m128h) __builtin_ia32_vcvtdq2ph256_mask_round ((__v8si) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepi32_ph(W, U, A, R) \
- ((__m128h) __builtin_ia32_vcvtdq2ph256_mask_round ((__v8si) (A), \
- (__v8hf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepi32_ph(U, A, R) \
- ((__m128h) __builtin_ia32_vcvtdq2ph256_mask_round ((__v8si) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepi32_ps(A, R) \
- ((__m256) __builtin_ia32_cvtdq2ps256_mask_round ((__v8si) (A), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepi32_ps(W, U, A, R) \
- ((__m256) __builtin_ia32_cvtdq2ps256_mask_round ((__v8si) (A), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepi32_ps(U, A, R) \
- ((__m256) __builtin_ia32_cvtdq2ps256_mask_round ((__v8si) (A), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundpd_ph(A, R) \
- ((__m128h) __builtin_ia32_vcvtpd2ph256_mask_round ((__v4df) (A), \
- (_mm_setzero_ph ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundpd_ph(W, U, A, R) \
- ((__m128h) __builtin_ia32_vcvtpd2ph256_mask_round ((__v4df) (A), \
- (__v8hf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundpd_ph(U, A, R) \
- ((__m128h) __builtin_ia32_vcvtpd2ph256_mask_round ((__v4df) (A), \
- (_mm_setzero_ph ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundpd_ps(A, R) \
- ((__m128) __builtin_ia32_cvtpd2ps256_mask_round ((__v4df) (A), \
- (__v4sf) \
- (_mm_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundpd_ps(W, U, A, R) \
- ((__m128) __builtin_ia32_cvtpd2ps256_mask_round ((__v4df) (A), \
- (__v4sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundpd_ps(U, A, R) \
- ((__m128) __builtin_ia32_cvtpd2ps256_mask_round ((__v4df) (A), \
- (__v4sf) \
- (_mm_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundpd_epi32(A, R) \
- ((__m128i) __builtin_ia32_cvtpd2dq256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_undefined_si128 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundpd_epi32(W, U, A, R) \
- ((__m128i) __builtin_ia32_cvtpd2dq256_mask_round ((__v4df) (A), \
- (__v4si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundpd_epi32(U, A, R)\
- ((__m128i) __builtin_ia32_cvtpd2dq256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_setzero_si128 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundpd_epi64(A, R) \
- ((__m256i) __builtin_ia32_cvtpd2qq256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundpd_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtpd2qq256_mask_round ((__v4df) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundpd_epi64(U, A, R) \
- ((__m256i) __builtin_ia32_cvtpd2qq256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundpd_epu32(A, R) \
- ((__m128i) __builtin_ia32_cvtpd2udq256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_undefined_si128 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundpd_epu32(W, U, A, R) \
- ((__m128i) __builtin_ia32_cvtpd2udq256_mask_round ((__v4df) (A), \
- (__v4si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundpd_epu32(U, A, R) \
- ((__m128i) __builtin_ia32_cvtpd2udq256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_setzero_si128 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundpd_epu64(A, R) \
- ((__m256i) __builtin_ia32_cvtpd2uqq256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()),\
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundpd_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtpd2uqq256_mask_round ((__v4df) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundpd_epu64(U, A, R) \
- ((__m256i) __builtin_ia32_cvtpd2uqq256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()),\
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundph_epi32(A, R) \
- ((__m256i) __builtin_ia32_vcvtph2dq256_mask_round ((__v8hf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()),\
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundph_epi32(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2dq256_mask_round ((__v8hf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundph_epi32(U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2dq256_mask_round ((__v8hf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()),\
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundph_pd(A, R) \
- ((__m256d) __builtin_ia32_vcvtph2pd256_mask_round ((__v8hf) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundph_pd(W, U, A, R) \
- ((__m256d) __builtin_ia32_vcvtph2pd256_mask_round ((__v8hf) (A), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundph_pd(U, A, R) \
- ((__m256d) __builtin_ia32_vcvtph2pd256_mask_round ((__v8hf) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundph_ps(A, R) \
- ((__m256) __builtin_ia32_vcvtph2ps256_mask_round ((__v8hf) (A), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundph_ps(W, U, A, R) \
- ((__m256) __builtin_ia32_vcvtph2ps256_mask_round ((__v8hf) (A), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundph_ps(U, A, R) \
- ((__m256) __builtin_ia32_vcvtph2ps256_mask_round ((__v8hf) (A), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtx_roundph_ps(A, R) \
- ((__m256) __builtin_ia32_vcvtph2psx256_mask_round ((__v8hf) (A), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtx_roundph_ps(W, U, A, R) \
- ((__m256) __builtin_ia32_vcvtph2psx256_mask_round ((__v8hf) (A), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtx_roundph_ps(U, A, R) \
- ((__m256) __builtin_ia32_vcvtph2psx256_mask_round ((__v8hf) (A), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundph_epi64(A, R) \
- ((__m256i) __builtin_ia32_vcvtph2qq256_mask_round ((__v8hf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()),\
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundph_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2qq256_mask_round ((__v8hf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundph_epi64(U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2qq256_mask_round ((__v8hf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()),\
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundph_epu32(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtph2udq256_mask_round ((__v8hf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundph_epu32(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2udq256_mask_round ((__v8hf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundph_epu32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtph2udq256_mask_round ((__v8hf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundph_epu64(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtph2uqq256_mask_round ((__v8hf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundph_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2uqq256_mask_round ((__v8hf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundph_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtph2uqq256_mask_round ((__v8hf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundph_epu16(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_undefined_si256 ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundph_epu16(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundph_epu16(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_cvt_roundph_epi16(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtph2w256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_undefined_si256 ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundph_epi16(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2w256_mask_round ((__v16hf) (A), \
- (__v16hi) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundph_epi16(U, A, R) \
- ((__m256i) __builtin_ia32_vcvtph2w256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_cvt_roundps_pd(A, R) \
- ((__m256d) __builtin_ia32_vcvtps2pd256_mask_round ((__v4sf) (A), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundps_pd(W, U, A, R) \
- ((__m256d) __builtin_ia32_vcvtps2pd256_mask_round ((__v4sf) (A), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundps_pd(U, A, R) \
- ((__m256d) __builtin_ia32_vcvtps2pd256_mask_round ((__v4sf) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtx_roundps_ph(A, R) \
- ((__m128h) __builtin_ia32_vcvtps2phx256_mask_round ((__v8sf) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtx_roundps_ph(W, U, A, R) \
- ((__m128h) __builtin_ia32_vcvtps2phx256_mask_round ((__v8sf) (A), \
- (__v8hf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtx_roundps_ph(U, A, R) \
- ((__m128h) __builtin_ia32_vcvtps2phx256_mask_round ((__v8sf) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundps_epi32(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtps2dq256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundps_epi32(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvtps2dq256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundps_epi32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvtps2dq256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundps_epi64(A, R) \
- ((__m256i) __builtin_ia32_cvtps2qq256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundps_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtps2qq256_mask_round ((__v4sf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundps_epi64(U, A, R) \
- ((__m256i) __builtin_ia32_cvtps2qq256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundps_epu32(A, R) \
- ((__m256i) \
- __builtin_ia32_cvtps2udq256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundps_epu32(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtps2udq256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundps_epu32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvtps2udq256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundps_epu64(B, R) \
- ((__m256i) \
- __builtin_ia32_cvtps2uqq256_mask_round ((__v4sf) (B), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundps_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtps2uqq256_mask_round ((__v4sf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundps_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvtps2uqq256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepi64_pd(A, R) \
- ((__m256d) __builtin_ia32_cvtqq2pd256_mask_round ((__v4di) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepi64_pd(W, U, A, R) \
- ((__m256d) __builtin_ia32_cvtqq2pd256_mask_round ((__v4di) (A), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepi64_pd(U, A, R) \
- ((__m256d) __builtin_ia32_cvtqq2pd256_mask_round ((__v4di) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepi64_ph(A, R) \
- ((__m128h) __builtin_ia32_vcvtqq2ph256_mask_round ((__v4di) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepi64_ph(W, U, A, R) \
- ((__m128h) __builtin_ia32_vcvtqq2ph256_mask_round ((__v4di) (A), \
- (__v8hf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepi64_ph(U, A, R) \
- ((__m128h) __builtin_ia32_vcvtqq2ph256_mask_round ((__v4di) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepi64_ps(A, R) \
- ((__m128) __builtin_ia32_cvtqq2ps256_mask_round ((__v4di) (A), \
- (__v4sf) \
- (_mm_setzero_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepi64_ps(W, U, A, R) \
- ((__m128) __builtin_ia32_cvtqq2ps256_mask_round ((__v4di) (A), \
- (__v4sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepi64_ps(U, A, R) \
- ((__m128) __builtin_ia32_cvtqq2ps256_mask_round ((__v4di) (A), \
- (__v4sf) \
- (_mm_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundpd_epi32(A, R) \
- ((__m128i) __builtin_ia32_cvttpd2dq256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_undefined_si128 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundpd_epi32(W, U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2dq256_mask_round ((__v4df) (A), \
- (__v4si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundpd_epi32(U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2dq256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_setzero_si128 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundpd_epi64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2qq256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundpd_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttpd2qq256_mask_round ((__v4df) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundpd_epi64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2qq256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundpd_epu32(A, R) \
- ((__m128i) \
- __builtin_ia32_cvttpd2udq256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_undefined_si128 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundpd_epu32(W, U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2udq256_mask_round ((__v4df) (A), \
- (__v4si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundpd_epu32(U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2udq256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_setzero_si128 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundpd_epu64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2uqq256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundpd_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttpd2uqq256_mask_round ((__v4df) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundpd_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2uqq256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundph_epi32(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2dq256_mask_round ((__v8hf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundph_epi32(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvttph2dq256_mask_round ((__v8hf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundph_epi32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2dq256_mask_round ((__v8hf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundph_epi64(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2qq256_mask_round ((__v8hf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundph_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvttph2qq256_mask_round ((__v8hf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundph_epi64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2qq256_mask_round ((__v8hf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundph_epu32(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2udq256_mask_round ((__v8hf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundph_epu32(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvttph2udq256_mask_round ((__v8hf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundph_epu32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2udq256_mask_round ((__v8hf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundph_epu64(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2uqq256_mask_round ((__v8hf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundph_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvttph2uqq256_mask_round ((__v8hf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundph_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2uqq256_mask_round ((__v8hf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundph_epu16(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundph_epu16(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundph_epu16(U, A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_cvtt_roundph_epi16(A, R) \
- ((__m256i) \
- __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundph_epi16(W, U, A, R) \
- ((__m256i) __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundph_epi16(U, A, R)\
- ((__m256i) \
- __builtin_ia32_vcvttph2uw256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_cvtt_roundps_epi32(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2dq256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundps_epi32(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2dq256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundps_epi32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2dq256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundps_epi64(A, R) \
- ((__m256i) __builtin_ia32_cvttps2qq256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()),\
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundps_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2qq256_mask_round ((__v4sf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundps_epi64(U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2qq256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()),\
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundps_epu32(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2udq256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundps_epu32(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2udq256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundps_epu32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2udq256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtt_roundps_epu64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2uqq256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtt_roundps_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2uqq256_mask_round ((__v4sf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtt_roundps_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2uqq256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepu32_ph(A, R) \
- ((__m128h) __builtin_ia32_vcvtudq2ph256_mask_round ((__v8si) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepu32_ph(W, U, A, R) \
- ((__m128h) __builtin_ia32_vcvtudq2ph256_mask_round ((__v8si) (A), \
- (__v8hf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepu32_ph(U, A, R) \
- ((__m128h) __builtin_ia32_vcvtudq2ph256_mask_round ((__v8si) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepu32_ps(A, R) \
- ((__m256) __builtin_ia32_cvtudq2ps256_mask_round ((__v8si) (A), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepu32_ps(W, U, A, R) \
- ((__m256) __builtin_ia32_cvtudq2ps256_mask_round ((__v8si) (A), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepu32_ps(U, A, R) \
- ((__m256) __builtin_ia32_cvtudq2ps256_mask_round ((__v8si) (A), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepu64_pd(A, R) \
- ((__m256d) __builtin_ia32_cvtuqq2pd256_mask_round ((__v4di) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepu64_pd(W, U, A, R) \
- ((__m256d) __builtin_ia32_cvtuqq2pd256_mask_round ((__v4di) (A), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepu64_pd(U, A, R) \
- ((__m256d) __builtin_ia32_cvtuqq2pd256_mask_round ((__v4di) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepu64_ph(A, R) \
- ((__m128h) __builtin_ia32_vcvtuqq2ph256_mask_round ((__v4di) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepu64_ph(W, U, A, R) \
- ((__m128h) __builtin_ia32_vcvtuqq2ph256_mask_round ((__v4di) (A), \
- (__v8hf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepu64_ph(U, A, R) \
- ((__m128h) __builtin_ia32_vcvtuqq2ph256_mask_round ((__v4di) (A), \
- (__v8hf) \
- (_mm_setzero_ph ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepu64_ps(A, R) \
- ((__m128) __builtin_ia32_cvtuqq2ps256_mask_round ((__v4di) (A), \
- (__v4sf) \
- (_mm_setzero_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepu64_ps(W, U, A, R) \
- ((__m128) __builtin_ia32_cvtuqq2ps256_mask_round ((__v4di) (A), \
- (__v4sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepu64_ps(U, A, R) \
- ((__m128) __builtin_ia32_cvtuqq2ps256_mask_round ((__v4di) (A), \
- (__v4sf) \
- (_mm_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvt_roundepu16_ph(A, R) \
- ((__m256h) __builtin_ia32_vcvtuw2ph256_mask_round ((__v16hi) (A), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepu16_ph(W, U, A, R) \
- ((__m256h) __builtin_ia32_vcvtuw2ph256_mask_round ((__v16hi) (A), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepu16_ph(U, A, R) \
- ((__m256h) __builtin_ia32_vcvtuw2ph256_mask_round ((__v16hi) (A), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_cvt_roundepi16_ph(A, R) \
- ((__m256h) __builtin_ia32_vcvtw2ph256_mask_round ((__v16hi) (A), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_cvt_roundepi16_ph(W, U, A, R) \
- ((__m256h) __builtin_ia32_vcvtw2ph256_mask_round ((__v16hi) (A), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_cvt_roundepi16_ph(U, A, R) \
- ((__m256h) __builtin_ia32_vcvtw2ph256_mask_round ((__v16hi) (A), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_div_round_pd(A, B, R) \
- ((__m256d) __builtin_ia32_divpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_div_round_pd(W, U, A, B, R) \
- ((__m256d) __builtin_ia32_divpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_div_round_pd(U, A, B, R) \
- ((__m256d) __builtin_ia32_divpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_div_round_ph(A, B, R) \
- ((__m256h) __builtin_ia32_divph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_div_round_ph(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_divph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_div_round_ph(U, A, B, R) \
- ((__m256h) __builtin_ia32_divph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_div_round_ps(A, B, R) \
- ((__m256) __builtin_ia32_divps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_div_round_ps(W, U, A, B, R) \
- ((__m256) __builtin_ia32_divps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_div_round_ps(U, A, B, R) \
- ((__m256) __builtin_ia32_divps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_fcmadd_round_pch(A, B, D, R) \
- (__m256h) __builtin_ia32_vfcmaddcph256_round ((A), (B), (D), (R))
-
-#define _mm256_mask_fcmadd_round_pch(A, U, B, D, R) \
- ((__m256h) __builtin_ia32_vfcmaddcph256_mask_round ((__v16hf)(A), \
- (__v16hf)(B), \
- (__v16hf)(D), \
- (U), (R)))
-
-#define _mm256_mask3_fcmadd_round_pch(A, B, D, U, R) \
- ((__m256h) __builtin_ia32_vfcmaddcph256_mask3_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_maskz_fcmadd_round_pch(U, A, B, D, R) \
- ((__m256h) __builtin_ia32_vfcmaddcph256_maskz_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_fcmul_round_pch(A, B, R) \
- ((__m256h) __builtin_ia32_vfcmulcph256_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (R)))
-
-#define _mm256_mask_fcmul_round_pch(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_vfcmulcph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_fcmul_round_pch(U, A, B, R) \
- ((__m256h) __builtin_ia32_vfcmulcph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_fixupimm_round_pd(A, B, D, C, R) \
- ((__m256d) __builtin_ia32_fixupimmpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4di) (D), \
- (C), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_fixupimm_round_pd(A, U, B, D, C, R)\
- ((__m256d) __builtin_ia32_fixupimmpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4di) (D), \
- (C), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_fixupimm_round_pd(U, A, B, D, C, R)\
- ((__m256d) __builtin_ia32_fixupimmpd256_maskz_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4di) (D), \
- (C), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_fixupimm_round_ps(A, B, D, C, R)\
- ((__m256) __builtin_ia32_fixupimmps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8si) (D), \
- (C), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_fixupimm_round_ps(A, U, B, D, C, R)\
- ((__m256) __builtin_ia32_fixupimmps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8si) (D), \
- (C), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_fixupimm_round_ps(U, A, B, D, C, R)\
- ((__m256) __builtin_ia32_fixupimmps256_maskz_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8si) (D), \
- (C), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_fmadd_round_pd(A, B, D, R) \
- ((__m256d) __builtin_ia32_vfmaddpd256_mask_round (A, B, D, -1, R))
-
-#define _mm256_mask_fmadd_round_pd(A, U, B, D, R) \
- ((__m256d) __builtin_ia32_vfmaddpd256_mask_round (A, B, D, U, R))
-
-#define _mm256_mask3_fmadd_round_pd(A, B, D, U, R) \
- ((__m256d) __builtin_ia32_vfmaddpd256_mask3_round (A, B, D, U, R))
-
-#define _mm256_maskz_fmadd_round_pd(U, A, B, D, R) \
- ((__m256d) __builtin_ia32_vfmaddpd256_maskz_round (A, B, D, U, R))
-
-#define _mm256_fmadd_round_ph(A, B, D, R) \
- ((__m256h) __builtin_ia32_vfmaddph256_mask_round (A, B, D, -1, R))
-
-#define _mm256_mask_fmadd_round_ph(A, U, B, D, R) \
- ((__m256h) __builtin_ia32_vfmaddph256_mask_round (A, B, D, U, R))
-
-#define _mm256_mask3_fmadd_round_ph(A, B, D, U, R) \
- ((__m256h) __builtin_ia32_vfmaddph256_mask3_round (A, B, D, U, R))
-
-#define _mm256_maskz_fmadd_round_ph(U, A, B, D, R) \
- ((__m256h) __builtin_ia32_vfmaddph256_maskz_round (A, B, D, U, R))
-
-#define _mm256_fmadd_round_ps(A, B, D, R) \
- ((__m256)__builtin_ia32_vfmaddps256_mask_round (A, B, D, -1, R))
-
-#define _mm256_mask_fmadd_round_ps(A, U, B, D, R) \
- ((__m256)__builtin_ia32_vfmaddps256_mask_round (A, B, D, U, R))
-
-#define _mm256_mask3_fmadd_round_ps(A, B, D, U, R) \
- ((__m256)__builtin_ia32_vfmaddps256_mask3_round (A, B, D, U, R))
-
-#define _mm256_maskz_fmadd_round_ps(U, A, B, D, R) \
- ((__m256)__builtin_ia32_vfmaddps256_maskz_round (A, B, D, U, R))
-
-#define _mm256_fmadd_round_pch(A, B, D, R) \
- (__m256h) __builtin_ia32_vfmaddcph256_round ((A), (B), (D), (R))
-
-#define _mm256_mask_fmadd_round_pch(A, U, B, D, R) \
- ((__m256h) __builtin_ia32_vfmaddcph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (D), \
- (U), (R)))
-
-#define _mm256_mask3_fmadd_round_pch(A, B, D, U, R) \
- (__m256h) __builtin_ia32_vfmaddcph256_mask3_round ((A), (B), (D), (U), (R))
-
-#define _mm256_maskz_fmadd_round_pch(U, A, B, D, R) \
- (__m256h) __builtin_ia32_vfmaddcph256_maskz_round ((A), (B), (D), (U), (R))
-
-#define _mm256_fmaddsub_round_pd(A, B, D, R) \
- (__m256d) __builtin_ia32_vfmaddsubpd256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fmaddsub_round_pd(A, U, B, D, R) \
- (__m256d) __builtin_ia32_vfmaddsubpd256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fmaddsub_round_pd(A, B, D, U, R) \
- (__m256d)__builtin_ia32_vfmaddsubpd256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fmaddsub_round_pd(U, A, B, D, R) \
- (__m256d)__builtin_ia32_vfmaddsubpd256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fmaddsub_round_ph(A, B, D, R) \
- ((__m256h)__builtin_ia32_vfmaddsubph256_mask_round ((A), (B), (D), -1, (R)))
-
-#define _mm256_mask_fmaddsub_round_ph(A, U, B, D, R) \
- ((__m256h)__builtin_ia32_vfmaddsubph256_mask_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_mask3_fmaddsub_round_ph(A, B, D, U, R) \
- ((__m256h)__builtin_ia32_vfmaddsubph256_mask3_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_maskz_fmaddsub_round_ph(U, A, B, D, R) \
- ((__m256h)__builtin_ia32_vfmaddsubph256_maskz_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_fmaddsub_round_ps(A, B, D, R) \
- (__m256)__builtin_ia32_vfmaddsubps256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fmaddsub_round_ps(A, U, B, D, R) \
- (__m256)__builtin_ia32_vfmaddsubps256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fmaddsub_round_ps(A, B, D, U, R) \
- (__m256)__builtin_ia32_vfmaddsubps256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fmaddsub_round_ps(U, A, B, D, R) \
- (__m256)__builtin_ia32_vfmaddsubps256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fmsub_round_pd(A, B, D, R) \
- (__m256d)__builtin_ia32_vfmsubpd256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fmsub_round_pd(A, U, B, D, R) \
- (__m256d)__builtin_ia32_vfmsubpd256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fmsub_round_pd(A, B, D, U, R) \
- (__m256d)__builtin_ia32_vfmsubpd256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fmsub_round_pd(U, A, B, D, R) \
- (__m256d)__builtin_ia32_vfmsubpd256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fmsub_round_ph(A, B, D, R) \
- ((__m256h)__builtin_ia32_vfmsubph256_mask_round ((A), (B), (D), -1, (R)))
-
-#define _mm256_mask_fmsub_round_ph(A, U, B, D, R) \
- ((__m256h)__builtin_ia32_vfmsubph256_mask_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_mask3_fmsub_round_ph(A, B, D, U, R) \
- ((__m256h)__builtin_ia32_vfmsubph256_mask3_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_maskz_fmsub_round_ph(U, A, B, D, R) \
- ((__m256h)__builtin_ia32_vfmsubph256_maskz_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_fmsub_round_ps(A, B, D, R) \
- (__m256)__builtin_ia32_vfmsubps256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fmsub_round_ps(A, U, B, D, R) \
- (__m256)__builtin_ia32_vfmsubps256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fmsub_round_ps(A, B, D, U, R) \
- (__m256)__builtin_ia32_vfmsubps256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fmsub_round_ps(U, A, B, D, R) \
- (__m256)__builtin_ia32_vfmsubps256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fmsubadd_round_pd(A, B, D, R) \
- (__m256d)__builtin_ia32_vfmsubaddpd256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fmsubadd_round_pd(A, U, B, D, R) \
- (__m256d)__builtin_ia32_vfmsubaddpd256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fmsubadd_round_pd(A, B, D, U, R) \
- (__m256d)__builtin_ia32_vfmsubaddpd256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fmsubadd_round_pd(U, A, B, D, R) \
- (__m256d)__builtin_ia32_vfmsubaddpd256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fmsubadd_round_ph(A, B, D, R) \
- ((__m256h)__builtin_ia32_vfmsubaddph256_mask_round ((A), (B), (D), -1, (R)))
-
-#define _mm256_mask_fmsubadd_round_ph(A, U, B, D, R) \
- ((__m256h)__builtin_ia32_vfmsubaddph256_mask_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_mask3_fmsubadd_round_ph(A, B, D, U, R) \
- ((__m256h)__builtin_ia32_vfmsubaddph256_mask3_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_maskz_fmsubadd_round_ph(U, A, B, D, R) \
- ((__m256h)__builtin_ia32_vfmsubaddph256_maskz_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_fmsubadd_round_ps(A, B, D, R) \
- (__m256)__builtin_ia32_vfmsubaddps256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fmsubadd_round_ps(A, U, B, D, R) \
- (__m256)__builtin_ia32_vfmsubaddps256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fmsubadd_round_ps(A, B, D, U, R) \
- (__m256)__builtin_ia32_vfmsubaddps256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fmsubadd_round_ps(U, A, B, D, R) \
- (__m256)__builtin_ia32_vfmsubaddps256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fmul_round_pch(B, D, R) \
- ((__m256h) __builtin_ia32_vfmulcph256_round ((__v16hf) (B), \
- (__v16hf) (D), \
- (R)))
-
-#define _mm256_mask_fmul_round_pch(A, U, B, D, R) \
- ((__m256h) __builtin_ia32_vfmulcph256_mask_round ((__v16hf) (B), \
- (__v16hf) (D), \
- (__v16hf) (A), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_fmul_round_pch(U, B, D, R) \
- ((__m256h) __builtin_ia32_vfmulcph256_mask_round ((__v16hf) (B), \
- (__v16hf) (D), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_fnmadd_round_pd(A, B, D, R) \
- (__m256d)__builtin_ia32_vfnmaddpd256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fnmadd_round_pd(A, U, B, D, R) \
- (__m256d)__builtin_ia32_vfnmaddpd256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fnmadd_round_pd(A, B, D, U, R) \
- (__m256d)__builtin_ia32_vfnmaddpd256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fnmadd_round_pd(U, A, B, D, R) \
- (__m256d)__builtin_ia32_vfnmaddpd256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fnmadd_round_ph(A, B, D, R) \
- ((__m256h)__builtin_ia32_vfnmaddph256_mask_round ((A), (B), (D), -1, (R)))
-
-#define _mm256_mask_fnmadd_round_ph(A, U, B, D, R) \
- ((__m256h)__builtin_ia32_vfnmaddph256_mask_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_mask3_fnmadd_round_ph(A, B, D, U, R) \
- ((__m256h)__builtin_ia32_vfnmaddph256_mask3_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_maskz_fnmadd_round_ph(U, A, B, D, R) \
- ((__m256h)__builtin_ia32_vfnmaddph256_maskz_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_fnmadd_round_ps(A, B, D, R) \
- (__m256)__builtin_ia32_vfnmaddps256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fnmadd_round_ps(A, U, B, D, R) \
- (__m256)__builtin_ia32_vfnmaddps256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fnmadd_round_ps(A, B, D, U, R) \
- (__m256)__builtin_ia32_vfnmaddps256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fnmadd_round_ps(U, A, B, D, R) \
- (__m256)__builtin_ia32_vfnmaddps256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fnmsub_round_pd(A, B, D, R) \
- (__m256d)__builtin_ia32_vfnmsubpd256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fnmsub_round_pd(A, U, B, D, R) \
- (__m256d)__builtin_ia32_vfnmsubpd256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fnmsub_round_pd(A, B, D, U, R) \
- (__m256d)__builtin_ia32_vfnmsubpd256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fnmsub_round_pd(U, A, B, D, R) \
- (__m256d)__builtin_ia32_vfnmsubpd256_maskz_round (A, B, D, U, R)
-
-#define _mm256_fnmsub_round_ph(A, B, D, R) \
- ((__m256h)__builtin_ia32_vfnmsubph256_mask_round ((A), (B), (D), -1, (R)))
-
-#define _mm256_mask_fnmsub_round_ph(A, U, B, D, R) \
- ((__m256h)__builtin_ia32_vfnmsubph256_mask_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_mask3_fnmsub_round_ph(A, B, D, U, R) \
- ((__m256h)__builtin_ia32_vfnmsubph256_mask3_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_maskz_fnmsub_round_ph(U, A, B, D, R) \
- ((__m256h)__builtin_ia32_vfnmsubph256_maskz_round ((A), (B), (D), (U), (R)))
-
-#define _mm256_fnmsub_round_ps(A, B, D, R) \
- (__m256)__builtin_ia32_vfnmsubps256_mask_round (A, B, D, -1, R)
-
-#define _mm256_mask_fnmsub_round_ps(A, U, B, D, R) \
- (__m256)__builtin_ia32_vfnmsubps256_mask_round (A, B, D, U, R)
-
-#define _mm256_mask3_fnmsub_round_ps(A, B, D, U, R) \
- (__m256)__builtin_ia32_vfnmsubps256_mask3_round (A, B, D, U, R)
-
-#define _mm256_maskz_fnmsub_round_ps(U, A, B, D, R) \
- (__m256)__builtin_ia32_vfnmsubps256_maskz_round (A, B, D, U, R)
-
-#define _mm256_getexp_round_pd(A, R) \
- ((__m256d) __builtin_ia32_getexppd256_mask_round ((__v4df) (A), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_getexp_round_pd(W, U, A, R) \
- ((__m256d) __builtin_ia32_getexppd256_mask_round ((__v4df) (A), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_getexp_round_pd(U, A, R) \
- ((__m256d) __builtin_ia32_getexppd256_mask_round ((__v4df) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_getexp_round_ph(A, R)\
- ((__m256h) __builtin_ia32_getexpph256_mask_round ((__v16hf) (A), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_getexp_round_ph(W, U, A, R)\
- ((__m256h) __builtin_ia32_getexpph256_mask_round ((__v16hf) (A), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_getexp_round_ph(U, A, R)\
- ((__m256h) __builtin_ia32_getexpph256_mask_round ((__v16hf) (A), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_getexp_round_ps(A, R)\
- ((__m256) __builtin_ia32_getexpps256_mask_round ((__v8sf) (A), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_getexp_round_ps(W, U, A, R)\
- ((__m256) __builtin_ia32_getexpps256_mask_round ((__v8sf) (A), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_getexp_round_ps(U, A, R)\
- ((__m256) __builtin_ia32_getexpps256_mask_round ((__v8sf) (A), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_getmant_round_pd(A, B, C, R) \
- ((__m256d)__builtin_ia32_getmantpd256_mask_round ((__v4df) (__m256d) (A), \
- (int) (((C) << 2) | (B)), \
- (__v4df) (__m256d) \
- _mm256_undefined_pd (), \
- (__mmask8)-1, \
- (R)))
-
-#define _mm256_mask_getmant_round_pd(W, U, A, B, C, R) \
- ((__m256d)__builtin_ia32_getmantpd256_mask_round ((__v4df) (__m256d) (A), \
- (int) (((C) << 2) | (B)), \
- (__v4df) (__m256d) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_getmant_round_pd(U, A, B, C, R) \
- ((__m256d)__builtin_ia32_getmantpd256_mask_round ((__v4df) (__m256d) (A), \
- (int) (((C) << 2) | (B)), \
- (__v4df) (__m256d) \
- _mm256_setzero_pd (), \
- (__mmask8) (U), \
- (R)))
-
-
-#define _mm256_getmant_round_ph(A, B, C, R) \
- ((__m256h)__builtin_ia32_getmantph256_mask_round ((__v16hf) (__m256h) (A), \
- (int) (((C)<<2) | (B)), \
- (__v16hf) (__m256h) \
- _mm256_undefined_ph (), \
- (__mmask16)-1, \
- (R)))
-
-#define _mm256_mask_getmant_round_ph(W, U, A, B, C, R) \
- ((__m256h)__builtin_ia32_getmantph256_mask_round ((__v16hf) (__m256h) (A), \
- (int) (((C)<<2) | (B)), \
- (__v16hf) (__m256h) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_getmant_round_ph(U, A, B, C, R) \
- ((__m256h)__builtin_ia32_getmantph256_mask_round ((__v16hf) (__m256h) (A), \
- (int) (((C)<<2) | (B)), \
- (__v16hf) (__m256h) \
- _mm256_setzero_ph (), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_getmant_round_ps(A, B, C, R) \
- ((__m256)__builtin_ia32_getmantps256_mask_round ((__v8sf) (__m256) (A), \
- (int) (((C)<<2) | (B)), \
- (__v8sf) (__m256) \
- _mm256_undefined_ps (), \
- (__mmask8)-1, \
- (R)))
-
-#define _mm256_mask_getmant_round_ps(W, U, A, B, C, R) \
- ((__m256)__builtin_ia32_getmantps256_mask_round ((__v8sf) (__m256) (A), \
- (int) (((C)<<2) | (B)), \
- (__v8sf) (__m256) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_getmant_round_ps(U, A, B, C, R) \
- ((__m256)__builtin_ia32_getmantps256_mask_round ((__v8sf) (__m256) (A), \
- (int) (((C)<<2) | (B)), \
- (__v8sf) (__m256) \
- _mm256_setzero_ps (), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_max_round_pd(A, B, R) \
- ((__m256d) __builtin_ia32_maxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_max_round_pd(W, U, A, B, R) \
- ((__m256d) __builtin_ia32_maxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_max_round_pd(U, A, B, R) \
- ((__m256d) __builtin_ia32_maxpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_max_round_ph(A, B, R) \
- ((__m256h) __builtin_ia32_maxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_undefined_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_max_round_ph(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_maxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_max_round_ph(U, A, B, R) \
- ((__m256h) __builtin_ia32_maxph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_max_round_ps(A, B, R) \
- ((__m256) __builtin_ia32_maxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_max_round_ps(W, U, A, B, R) \
- ((__m256) __builtin_ia32_maxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_max_round_ps(U, A, B, R) \
- ((__m256) __builtin_ia32_maxps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_min_round_pd(A, B, R) \
- ((__m256d) __builtin_ia32_minpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_min_round_pd(W, U, A, B, R) \
- ((__m256d) __builtin_ia32_minpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_min_round_pd(U, A, B, R) \
- ((__m256d) __builtin_ia32_minpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_min_round_ph(A, B, R) \
- ((__m256h) __builtin_ia32_minph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_undefined_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_min_round_ph(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_minph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_min_round_ph(U, A, B, R) \
- ((__m256h) __builtin_ia32_minph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_min_round_ps(A, B, R) \
- ((__m256) __builtin_ia32_minps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_min_round_ps(W, U, A, B, R) \
- ((__m256) __builtin_ia32_minps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_min_round_ps(U, A, B, R) \
- ((__m256) __builtin_ia32_minps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_mul_round_pd(A, B, R) \
- ((__m256d) __builtin_ia32_mulpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_mul_round_pd(W, U, A, B, R) \
- ((__m256d) __builtin_ia32_mulpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_mul_round_pd(U, A, B, R) \
- ((__m256d) __builtin_ia32_mulpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_mul_round_ph(A, B, R) \
- ((__m256h) __builtin_ia32_mulph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_undefined_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_mul_round_ph(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_mulph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_mul_round_ph(U, A, B, R) \
- ((__m256h) __builtin_ia32_mulph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_mul_round_ps(A, B, R) \
- ((__m256) __builtin_ia32_mulps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_mul_round_ps(W, U, A, B, R) \
- ((__m256) __builtin_ia32_mulps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_mul_round_ps(U, A, B, R) \
- ((__m256) __builtin_ia32_mulps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_range_round_pd(A, B, C, R) \
- ((__m256d) __builtin_ia32_rangepd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (C), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_range_round_pd(W, U, A, B, C, R) \
- ((__m256d) __builtin_ia32_rangepd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (C), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_range_round_pd(U, A, B, C, R) \
- ((__m256d) __builtin_ia32_rangepd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (C), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_range_round_ps(A, B, C, R) \
- ((__m256) __builtin_ia32_rangeps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (C), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_range_round_ps(W, U, A, B, C, R) \
- ((__m256) __builtin_ia32_rangeps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (C), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_range_round_ps(U, A, B, C, R) \
- ((__m256) __builtin_ia32_rangeps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (C), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_reduce_round_pd(A, C, R) \
- ((__m256d) __builtin_ia32_reducepd256_mask_round ((__v4df) (A), \
- (C), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_reduce_round_pd(W, U, A, C, R) \
- ((__m256d) __builtin_ia32_reducepd256_mask_round ((__v4df) (A), \
- (C), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_reduce_round_pd(U, A, C, R) \
- ((__m256d) __builtin_ia32_reducepd256_mask_round ((__v4df) (A), \
- (C), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_reduce_round_ph(A, C, R) \
- ((__m256h) __builtin_ia32_reduceph256_mask_round ((__v16hf) (A), \
- (C), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_reduce_round_ph(W, U, A, C, R) \
- ((__m256h) __builtin_ia32_reduceph256_mask_round ((__v16hf) (A), \
- (C), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_reduce_round_ph(U, A, C, R) \
- ((__m256h) __builtin_ia32_reduceph256_mask_round ((__v16hf) (A), \
- (C), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_reduce_round_ps(A, C, R) \
- ((__m256) __builtin_ia32_reduceps256_mask_round ((__v8sf) (A), \
- (C), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_reduce_round_ps(W, U, A, C, R) \
- ((__m256) __builtin_ia32_reduceps256_mask_round ((__v8sf) (A), \
- (C), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_reduce_round_ps(U, A, C, R) \
- ((__m256) __builtin_ia32_reduceps256_mask_round ((__v8sf) (A), \
- (C), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_roundscale_round_pd(A, C, R) \
- ((__m256d) \
- __builtin_ia32_rndscalepd256_mask_round ((__v4df) (A), \
- (C), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_roundscale_round_pd(W, U, A, C, R) \
- ((__m256d) __builtin_ia32_rndscalepd256_mask_round ((__v4df) (A), \
- (C), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_roundscale_round_pd(U, A, C, R) \
- ((__m256d) __builtin_ia32_rndscalepd256_mask_round ((__v4df) (A), \
- (C), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_roundscale_round_ph(A, C, R) \
- ((__m256h) \
- __builtin_ia32_rndscaleph256_mask_round ((__v16hf) (A), \
- (C), \
- (__v16hf) \
- (_mm256_undefined_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_roundscale_round_ph(W, U, A, C, R) \
- ((__m256h) __builtin_ia32_rndscaleph256_mask_round ((__v16hf) (A), \
- (C), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_roundscale_round_ph(U, A, C, R) \
- ((__m256h) __builtin_ia32_rndscaleph256_mask_round ((__v16hf) (A), \
- (C), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_roundscale_round_ps(A, C, R) \
- ((__m256) __builtin_ia32_rndscaleps256_mask_round ((__v8sf) (A), \
- (C), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_roundscale_round_ps(W, U, A, C, R) \
- ((__m256) __builtin_ia32_rndscaleps256_mask_round ((__v8sf) (A), \
- (C), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_roundscale_round_ps(U, A, C, R) \
- ((__m256) __builtin_ia32_rndscaleps256_mask_round ((__v8sf) (A), \
- (C), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_scalef_round_pd(A, B, R) \
- ((__m256d) __builtin_ia32_scalefpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_scalef_round_pd(W, U, A, B, R) \
- ((__m256d) __builtin_ia32_scalefpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_scalef_round_pd(U, A, B, R) \
- ((__m256d) __builtin_ia32_scalefpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_scalef_round_ph(A, B, R) \
- ((__m256h) __builtin_ia32_scalefph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_undefined_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_scalef_round_ph(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_scalefph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_scalef_round_ph(U, A, B, R) \
- ((__m256h) __builtin_ia32_scalefph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_scalef_round_ps(A, B, R) \
- ((__m256) __builtin_ia32_scalefps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_scalef_round_ps(W, U, A, B, R) \
- ((__m256) __builtin_ia32_scalefps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_scalef_round_ps(U, A, B, R) \
- ((__m256) __builtin_ia32_scalefps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_sqrt_round_pd(A, R) \
- ((__m256d) __builtin_ia32_sqrtpd256_mask_round ((__v4df) (A), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_sqrt_round_pd(W, U, A, R) \
- ((__m256d) __builtin_ia32_sqrtpd256_mask_round ((__v4df) (A), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_sqrt_round_pd(U, A, R) \
- ((__m256d) __builtin_ia32_sqrtpd256_mask_round ((__v4df) (A), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_sqrt_round_ph(A, R) \
- ((__m256h) __builtin_ia32_sqrtph256_mask_round ((__v16hf) (A), \
- (__v16hf) \
- (_mm256_undefined_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_sqrt_round_ph(W, U, A, R) \
- ((__m256h) __builtin_ia32_sqrtph256_mask_round ((__v16hf) (A), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_sqrt_round_ph(U, A, R) \
- ((__m256h) __builtin_ia32_sqrtph256_mask_round ((__v16hf) (A), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_sqrt_round_ps(A, R) \
- ((__m256) __builtin_ia32_sqrtps256_mask_round ((__v8sf) (A), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_sqrt_round_ps(W, U, A, R) \
- ((__m256) __builtin_ia32_sqrtps256_mask_round ((__v8sf) (A), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_sqrt_round_ps(U, A, R) \
- ((__m256) __builtin_ia32_sqrtps256_mask_round ((__v8sf) (A), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_sub_round_pd(A, B, R) \
- ((__m256d) __builtin_ia32_subpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_undefined_pd ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_sub_round_pd(W, U, A, B, R) \
- ((__m256d) __builtin_ia32_subpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_sub_round_pd(U, A, B, R) \
- ((__m256d) __builtin_ia32_subpd256_mask_round ((__v4df) (A), \
- (__v4df) (B), \
- (__v4df) \
- (_mm256_setzero_pd ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_sub_round_ph(A, B, R) \
- ((__m256h) __builtin_ia32_subph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_undefined_ph ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_sub_round_ph(W, U, A, B, R) \
- ((__m256h) __builtin_ia32_subph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_sub_round_ph(U, A, B, R) \
- ((__m256h) __builtin_ia32_subph256_mask_round ((__v16hf) (A), \
- (__v16hf) (B), \
- (__v16hf) \
- (_mm256_setzero_ph ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_sub_round_ps(A, B, R) \
- ((__m256) __builtin_ia32_subps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_undefined_ps ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_sub_round_ps(W, U, A, B, R) \
- ((__m256) __builtin_ia32_subps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_sub_round_ps(U, A, B, R) \
- ((__m256) __builtin_ia32_subps256_mask_round ((__v8sf) (A), \
- (__v8sf) (B), \
- (__v8sf) \
- (_mm256_setzero_ps ()), \
- (__mmask8) (U), \
- (R)))
-#endif
-
-#define _mm256_cmul_round_pch(A, B, R) _mm256_fcmul_round_pch ((A), (B), (R))
-#define _mm256_mask_cmul_round_pch(W, U, A, B, R) \
- _mm256_mask_fcmul_round_pch ((W), (U), (A), (B), (R))
-#define _mm256_maskz_cmul_round_pch(U, A, B, R) \
- _mm256_maskz_fcmul_round_pch ((U), (A), (B), (R))
-
-#define _mm256_mul_round_pch(A, B, R) _mm256_fmul_round_pch ((A), (B), (R))
-#define _mm256_mask_mul_round_pch(W, U, A, B, R) \
- _mm256_mask_fmul_round_pch ((W), (U), (A), (B), (R))
-#define _mm256_maskz_mul_round_pch(U, A, B, R) \
- _mm256_maskz_fmul_round_pch ((U), (A), (B), (R))
-
-#ifdef __DISABLE_AVX10_2_256__
-#undef __DISABLE_AVX10_2_256__
-#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_256__ */
-
-#endif /* _AVX10_2ROUNDINGINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/avx10_2satcvtintrin.h b/gcc/config/i386/avx10_2satcvtintrin.h
index c662c4b..78bcd72 100644
--- a/gcc/config/i386/avx10_2satcvtintrin.h
+++ b/gcc/config/i386/avx10_2satcvtintrin.h
@@ -28,11 +28,11 @@
#ifndef _AVX10_2SATCVTINTRIN_H_INCLUDED
#define _AVX10_2SATCVTINTRIN_H_INCLUDED
-#if !defined (__AVX10_2_256__)
+#if !defined (__AVX10_2__)
#pragma GCC push_options
#pragma GCC target("avx10.2")
-#define __DISABLE_AVX10_2_256__
-#endif /* __AVX10_2_256__ */
+#define __DISABLE_AVX10_2__
+#endif /* __AVX10_2__ */
extern __inline __m128i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -1267,566 +1267,6 @@ _mm_cvtts_ss_epu32 (__m128 __A)
}
#ifdef __OPTIMIZE__
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_ipcvts_roundph_epi8 (__m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtph2ibs256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_undefined_si256 (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_ipcvts_roundph_epi8 (__m256i __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtph2ibs256_mask_round ((__v16hf) __A,
- (__v16hi) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_ipcvts_roundph_epi8 (__mmask16 __U, __m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtph2ibs256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_ipcvts_roundph_epu8 (__m256h __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvtph2iubs256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_undefined_si256 (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_ipcvts_roundph_epu8 (__m256i __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtph2iubs256_mask_round ((__v16hf) __A,
- (__v16hi) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_ipcvts_roundph_epu8 (__mmask16 __U, __m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtph2iubs256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_ipcvts_roundps_epi8 (__m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2ibs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_ipcvts_roundps_epi8 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtps2ibs256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_ipcvts_roundps_epi8 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2ibs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_ipcvts_roundps_epu8 (__m256 __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvtps2iubs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_ipcvts_roundps_epu8 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvtps2iubs256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_ipcvts_roundps_epu8 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvtps2iubs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_ipcvtts_roundph_epi8 (__m256h __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttph2ibs256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_undefined_si256 (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_ipcvtts_roundph_epi8 (__m256i __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttph2ibs256_mask_round ((__v16hf) __A,
- (__v16hi) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_ipcvtts_roundph_epi8 (__mmask16 __U, __m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttph2ibs256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_ipcvtts_roundph_epu8 (__m256h __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttph2iubs256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_undefined_si256 (),
- (__mmask16) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_ipcvtts_roundph_epu8 (__m256i __W, __mmask16 __U, __m256h __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttph2iubs256_mask_round ((__v16hf) __A,
- (__v16hi) __W,
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_ipcvtts_roundph_epu8 (__mmask16 __U, __m256h __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttph2iubs256_mask_round ((__v16hf) __A,
- (__v16hi)
- _mm256_setzero_si256 (),
- (__mmask16) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_ipcvtts_roundps_epi8 (__m256 __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttps2ibs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_ipcvtts_roundps_epi8 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2ibs256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_ipcvtts_roundps_epi8 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2ibs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_ipcvtts_roundps_epu8 (__m256 __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttps2iubs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_ipcvtts_roundps_epu8 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2iubs256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_ipcvtts_roundps_epu8 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2iubs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtts_roundpd_epi32 (__m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_undefined_si128 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtts_roundpd_epi32 (__m128i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m128i) __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) __A,
- (__v4si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtts_roundpd_epi32 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_setzero_si128 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtts_roundpd_epi64 (__m256d __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtts_roundpd_epi64 (__m256i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtts_roundpd_epi64 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtts_roundpd_epu32 (__m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_undefined_si128 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtts_roundpd_epu32 (__m128i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m128i) __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) __A,
- (__v4si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m128i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtts_roundpd_epu32 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m128i) __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) __A,
- (__v4si)
- _mm_setzero_si128 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtts_roundpd_epu64 (__m256d __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtts_roundpd_epu64 (__m256i __W, __mmask8 __U, __m256d __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtts_roundpd_epu64 (__mmask8 __U, __m256d __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtts_roundps_epi32 (__m256 __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtts_roundps_epi32 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtts_roundps_epi32 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtts_roundps_epi64 (__m128 __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtts_roundps_epi64 (__m256i __W, __mmask8 __U, __m128 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtts_roundps_epi64 (__mmask8 __U, __m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtts_roundps_epu32 (__m256 __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtts_roundps_epu32 (__m256i __W, __mmask8 __U, __m256 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) __A,
- (__v8si) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtts_roundps_epu32 (__mmask8 __U, __m256 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) __A,
- (__v8si)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_cvtts_roundps_epu64 (__m128 __A, const int __R)
-{
- return (__m256i)
- __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_undefined_si256 (),
- (__mmask8) -1,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_mask_cvtts_roundps_epu64 (__m256i __W, __mmask8 __U, __m128 __A,
- const int __R)
-{
- return (__m256i) __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) __A,
- (__v4di) __W,
- (__mmask8) __U,
- __R);
-}
-
-extern __inline __m256i
-__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
-_mm256_maskz_cvtts_roundps_epu64 (__mmask8 __U, __m128 __A, const int __R)
-{
- return
- (__m256i) __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) __A,
- (__v4di)
- _mm256_setzero_si256 (),
- (__mmask8) __U,
- __R);
-}
-
extern __inline int
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtts_roundsd_epi32 (__m128d __A, const int __R)
@@ -1859,546 +1299,6 @@ _mm_cvtts_roundss_epu32 (__m128 __A, const int __R)
__R);
}
#else
-
-#define _mm256_ipcvts_roundph_epi8(A, R) \
- ((__m256i) \
- __builtin_ia32_cvtph2ibs256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_undefined_si256 ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_ipcvts_roundph_epi8(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtph2ibs256_mask_round ((__v16hf) (A), \
- (__v16hi) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_ipcvts_roundph_epi8(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvtph2ibs256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_ipcvts_roundph_epu8(A, R) \
- ((__m256i) \
- __builtin_ia32_cvtph2iubs256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_undefined_si256 ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_ipcvts_roundph_epu8(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtph2iubs256_mask_round ((__v16hf) (A), \
- (__v16hi) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_ipcvts_roundph_epu8(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvtph2iubs256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_ipcvts_roundps_epi8(A, R) \
- ((__m256i) \
- __builtin_ia32_cvtps2ibs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_ipcvts_roundps_epi8(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtps2ibs256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_ipcvts_roundps_epi8(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvtps2ibs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_ipcvts_roundps_epu8(A, R) \
- ((__m256i) \
- __builtin_ia32_cvtps2iubs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_ipcvts_roundps_epu8(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvtps2iubs256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_ipcvts_roundps_epu8(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvtps2iubs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_ipcvtts_roundph_epi8(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttph2ibs256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_undefined_si256 ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_ipcvtts_roundph_epi8(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttph2ibs256_mask_round ((__v16hf) (A), \
- (__v16hi) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_ipcvtts_roundph_epi8(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttph2ibs256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_ipcvtts_roundph_epu8(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttph2iubs256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_undefined_si256 ()), \
- (__mmask16) (-1), \
- (R)))
-
-#define _mm256_mask_ipcvtts_roundph_epu8(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttph2iubs256_mask_round ((__v16hf) (A), \
- (__v16hi) (W), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_maskz_ipcvtts_roundph_epu8(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttph2iubs256_mask_round ((__v16hf) (A), \
- (__v16hi) \
- (_mm256_setzero_si256 ()), \
- (__mmask16) (U), \
- (R)))
-
-#define _mm256_ipcvtts_roundps_epi8(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2ibs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_ipcvtts_roundps_epi8(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2ibs256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_ipcvtts_roundps_epi8(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2ibs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_ipcvtts_roundps_epu8(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2iubs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_ipcvtts_roundps_epu8(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2iubs256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_ipcvtts_roundps_epu8(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2iubs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundpd_epi32(A, R) \
- ((__m128i) \
- __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_undefined_si128 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundpd_epi32(W, U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) (A), \
- (__v4si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundpd_epi32(U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_setzero_si128 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundpd_epi64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundpd_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundpd_epi64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundpd_epu32(A, R) \
- ((__m128i) \
- __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_undefined_si128 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundpd_epu32(W, U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) (A), \
- (__v4si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundpd_epu32(U, A, R) \
- ((__m128i) \
- __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) (A), \
- (__v4si) (_mm_setzero_si128 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundpd_epu64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundpd_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundpd_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundps_epi32(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundps_epi32(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundps_epi32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundps_epi64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundps_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundps_epi64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundps_epu32(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundps_epu32(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundps_epu32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundps_epu64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundps_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundps_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm_cvtts_roundsd_epi32(A, R) \
- ((int) __builtin_ia32_cvttsd2sis32_round ((__v2df) (A), \
- (R)))
-
-#define _mm_cvtts_roundsd_epu32(A, R) \
- ((unsigned int) __builtin_ia32_cvttsd2usis32_round ((__v2df) (A), \
- (R)))
-
-#define _mm_cvtts_roundss_epi32(A, R) \
- ((int) __builtin_ia32_cvttss2sis32_round ((__v4sf) (A), \
- (R)))
-
-#define _mm_cvtts_roundss_epu32(A, R) \
- ((unsigned int) __builtin_ia32_cvttss2usis32_round ((__v4sf) (A), \
- (R)))
-#define _mm256_cvtts_roundpd_epi32(A, R) \
- ((__m128i) \
- __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_undefined_si128 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundpd_epi32(W, U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) (A), \
- (__v4si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundpd_epi32(U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2dqs256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_setzero_si128 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundpd_epi64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundpd_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundpd_epi64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2qqs256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundpd_epu32(A, R) \
- ((__m128i) \
- __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) (A), \
- (__v4si) \
- (_mm_undefined_si128 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundpd_epu32(W, U, A, R) \
- ((__m128i) __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) (A), \
- (__v4si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundpd_epu32(U, A, R) \
- ((__m128i) \
- __builtin_ia32_cvttpd2udqs256_mask_round ((__v4df) (A), \
- (__v4si) (_mm_setzero_si128 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundpd_epu64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundpd_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundpd_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttpd2uqqs256_mask_round ((__v4df) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundps_epi32(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundps_epi32(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundps_epi32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2dqs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundps_epi64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundps_epi64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundps_epi64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2qqs256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundps_epu32(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundps_epu32(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) (A), \
- (__v8si) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundps_epu32(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2udqs256_mask_round ((__v8sf) (A), \
- (__v8si) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_cvtts_roundps_epu64(A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_undefined_si256 ()), \
- (__mmask8) (-1), \
- (R)))
-
-#define _mm256_mask_cvtts_roundps_epu64(W, U, A, R) \
- ((__m256i) __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) (A), \
- (__v4di) (W), \
- (__mmask8) (U), \
- (R)))
-
-#define _mm256_maskz_cvtts_roundps_epu64(U, A, R) \
- ((__m256i) \
- __builtin_ia32_cvttps2uqqs256_mask_round ((__v4sf) (A), \
- (__v4di) \
- (_mm256_setzero_si256 ()), \
- (__mmask8) (U), \
- (R)))
-
#define _mm_cvtts_roundsd_epi32(A, R) \
((int) __builtin_ia32_cvttsd2sis32_round ((__v2df) (A), \
(R)))
@@ -2449,6 +1349,7 @@ _mm_cvtts_ss_epu64 (__m128 __A)
return (unsigned long long) __builtin_ia32_cvttss2usis64_round ((__v4sf) __A,
_MM_FROUND_CUR_DIRECTION);
}
+
#ifdef __OPTIMIZE__
extern __inline long long
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
@@ -2474,7 +1375,6 @@ _mm_cvtts_roundss_epi64 (__m128 __A, const int __R)
__R);
}
-
extern __inline unsigned long long
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_cvtts_roundss_epu64 (__m128 __A, const int __R)
@@ -2483,7 +1383,6 @@ _mm_cvtts_roundss_epu64 (__m128 __A, const int __R)
__R);
}
#else
-
#define _mm_cvtts_roundsd_epi64(A, R) \
((long long) __builtin_ia32_cvttsd2sis64_round ((__v2df) (A), \
(R)))
@@ -2502,9 +1401,9 @@ _mm_cvtts_roundss_epu64 (__m128 __A, const int __R)
#endif
#endif /* __x86_64__ */
-#ifdef __DISABLE_AVX10_2_256__
-#undef __DISABLE_AVX10_2_256__
+#ifdef __DISABLE_AVX10_2__
+#undef __DISABLE_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_AVX10_2_256__ */
+#endif /* __DISABLE_AVX10_2__ */
#endif /* _AVX10_2SATCVTINTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/cpuid.h b/gcc/config/i386/cpuid.h
index 1a31ceb..afd4ef0 100644
--- a/gcc/config/i386/cpuid.h
+++ b/gcc/config/i386/cpuid.h
@@ -171,11 +171,6 @@
#define bit_AMX_AVX512 (1 << 7)
#define bit_AMX_MOVRS (1 << 8)
-/* AVX10 sub leaf (%eax == 0x24) */
-/* %ebx */
-#define bit_AVX10_256 (1 << 17)
-#define bit_AVX10_512 (1 << 18)
-
/* Signatures for different CPU implementations as returned in uses
of cpuid with level 0. */
#define signature_AMD_ebx 0x68747541
diff --git a/gcc/config/i386/driver-i386.cc b/gcc/config/i386/driver-i386.cc
index ba13138..1ff05e5 100644
--- a/gcc/config/i386/driver-i386.cc
+++ b/gcc/config/i386/driver-i386.cc
@@ -627,7 +627,7 @@ const char *host_detect_local_cpu (int argc, const char **argv)
if (has_feature (FEATURE_AVX512F))
{
/* Assume Diamond Rapids. */
- if (has_feature (FEATURE_AVX10_2_512))
+ if (has_feature (FEATURE_AMX_TRANSPOSE))
cpu = "diamondrapids";
/* Assume Granite Rapids D. */
else if (has_feature (FEATURE_AMX_COMPLEX))
@@ -910,12 +910,9 @@ const char *host_detect_local_cpu (int argc, const char **argv)
isa_names_table[i].option, NULL);
}
/* Never push -mno-avx10.1-{256,512} under -march=native to
- avoid unnecessary warnings when building libraries.
- Never push -mno-avx10.x-256 under -march=native since
- there are no such options. */
+ avoid unnecessary warnings when building libraries. */
else if (isa_names_table[i].feature != FEATURE_AVX10_1_256
- && isa_names_table[i].feature != FEATURE_AVX10_1_512
- && isa_names_table[i].feature != FEATURE_AVX10_2_256
+ && isa_names_table[i].feature != FEATURE_AVX10_1
&& check_avx512_features (cpu_model, cpu_features2,
isa_names_table[i].feature))
options = concat (options, neg_option,
diff --git a/gcc/config/i386/i386-builtin-types.def b/gcc/config/i386/i386-builtin-types.def
index 1559c6a..64bde02 100644
--- a/gcc/config/i386/i386-builtin-types.def
+++ b/gcc/config/i386/i386-builtin-types.def
@@ -1416,46 +1416,7 @@ DEF_FUNCTION_TYPE (V4DI, V4DI, V4DI, V2DI)
DEF_FUNCTION_TYPE (VOID, UINT64, UINT64)
# AVX10.2 builtins
-DEF_FUNCTION_TYPE (V4DF, V4DF, V4DF, V4DF, UQI, INT)
-DEF_FUNCTION_TYPE (V16HF, V16HF, V16HF, V16HF, UHI, INT)
-DEF_FUNCTION_TYPE (V8SF, V8SF, V8SF, V8SF, UQI, INT)
-DEF_FUNCTION_TYPE (UQI, V4DF, V4DF, INT, UQI, INT)
-DEF_FUNCTION_TYPE (UHI, V16HF, V16HF, INT, UHI, INT)
-DEF_FUNCTION_TYPE (UQI, V8SF, V8SF, INT, UQI, INT)
-DEF_FUNCTION_TYPE (V8HF, V8SI, V8HF, UQI, INT)
-DEF_FUNCTION_TYPE (V8SF, V8SI, V8SF, UQI, INT)
-DEF_FUNCTION_TYPE (V8HF, V4DF, V8HF, UQI, INT)
-DEF_FUNCTION_TYPE (V4SF, V4DF, V4SF, UQI, INT)
-DEF_FUNCTION_TYPE (V4SI, V4DF, V4SI, UQI, INT)
-DEF_FUNCTION_TYPE (V4DI, V4DF, V4DI, UQI, INT)
-DEF_FUNCTION_TYPE (V8SI, V8HF, V8SI, UQI, INT)
-DEF_FUNCTION_TYPE (V4DF, V8HF, V4DF, UQI, INT)
-DEF_FUNCTION_TYPE (V8SF, V8HF, V8SF, UQI, INT)
-DEF_FUNCTION_TYPE (V4DI, V8HF, V4DI, UQI, INT)
-DEF_FUNCTION_TYPE (V16HI, V16HF, V16HI, UHI, INT)
-DEF_FUNCTION_TYPE (V4DF, V4SF, V4DF, UQI, INT)
-DEF_FUNCTION_TYPE (V8HF, V8SF, V8HF, UQI, INT)
-DEF_FUNCTION_TYPE (V8SI, V8SF, V8SI, UQI, INT)
-DEF_FUNCTION_TYPE (V4DI, V4SF, V4DI, UQI, INT)
-DEF_FUNCTION_TYPE (V4DF, V4DI, V4DF, UQI, INT)
-DEF_FUNCTION_TYPE (V8HF, V4DI, V8HF, UQI, INT)
-DEF_FUNCTION_TYPE (V4SF, V4DI, V4SF, UQI, INT)
-DEF_FUNCTION_TYPE (V16HF, V16HI, V16HF, UHI, INT)
-DEF_FUNCTION_TYPE (V16HF, V16HF, V16HF, V16HF, INT)
-DEF_FUNCTION_TYPE (V16HF, V16HF, V16HF, V16HF, UQI, INT)
-DEF_FUNCTION_TYPE (V4DF, V4DF, V4DF, V4DI, INT, UQI, INT)
-DEF_FUNCTION_TYPE (V8SF, V8SF, V8SF, V8SI, INT, UQI, INT)
-DEF_FUNCTION_TYPE (V16HF, V16HF, V16HF, INT)
-DEF_FUNCTION_TYPE (V4DF, V4DF, V4DF, UQI, INT)
-DEF_FUNCTION_TYPE (V16HF, V16HF, V16HF, UHI, INT)
-DEF_FUNCTION_TYPE (V8SF, V8SF, V8SF, UQI, INT)
-DEF_FUNCTION_TYPE (V4DF, V4DF, INT, V4DF, UQI, INT)
-DEF_FUNCTION_TYPE (V16HF, V16HF, INT, V16HF, UHI, INT)
-DEF_FUNCTION_TYPE (V8SF, V8SF, INT, V8SF, UQI, INT)
-DEF_FUNCTION_TYPE (V4DF, V4DF, V4DF, INT, V4DF, UQI, INT)
-DEF_FUNCTION_TYPE (V8SF, V8SF, V8SF, INT, V8SF, UQI, INT)
DEF_FUNCTION_TYPE (V32HF, V16SF, V16SF, V32HF, USI, INT)
-DEF_FUNCTION_TYPE (V16HF, V8SF, V8SF, V16HF, UHI, INT)
DEF_FUNCTION_TYPE (V32HF, V16SF, V16SF, V32HF, USI)
DEF_FUNCTION_TYPE (V16HF, V8SF, V8SF, V16HF, UHI)
DEF_FUNCTION_TYPE (V8HF, V4SF, V4SF, V8HF, UQI)
@@ -1507,7 +1468,7 @@ DEF_FUNCTION_TYPE (V32BF, V32BF, V32BF, INT, V32BF, USI)
DEF_FUNCTION_TYPE (V8HF, V8HF, V8HF, INT, V8HF, UQI)
DEF_FUNCTION_TYPE (V8DF, V8DF, V8DF, INT, V8DF, UQI, INT)
DEF_FUNCTION_TYPE (V32HF, V32HF, V32HF, INT, V32HF, USI, INT)
-DEF_FUNCTION_TYPE (V16HF, V16HF, V16HF, INT, V16HF, UHI, INT)
+DEF_FUNCTION_TYPE (V16HF, V16HF, V16HF, INT, V16HF, UHI)
DEF_FUNCTION_TYPE (V16SF, V16SF, V16SF, INT, V16SF, UHI, INT)
DEF_FUNCTION_TYPE (V8DI, V8SF, V8DI, UQI)
DEF_FUNCTION_TYPE (V8DI, V8DF, V8DI, UQI)
diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def
index e6f5b12..a142711 100644
--- a/gcc/config/i386/i386-builtin.def
+++ b/gcc/config/i386/i386-builtin.def
@@ -510,18 +510,18 @@ BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS, CODE_FOR_movrsqi, "__built
BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS, CODE_FOR_movrshi, "__builtin_ia32_movrshi", IX86_BUILTIN_MOVRSHI, UNKNOWN, (int) SHORT_FTYPE_PCSHORT)
BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS, CODE_FOR_movrssi, "__builtin_ia32_movrssi", IX86_BUILTIN_MOVRSSI, UNKNOWN, (int) INT_FTYPE_PCINT)
BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS, CODE_FOR_movrsdi, "__builtin_ia32_movrsdi", IX86_BUILTIN_MOVRSDI, UNKNOWN, (int) INT64_FTYPE_PCINT64)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vmovrsbv64qi_mask, "__builtin_ia32_vmovrsb512_mask", IX86_BUILTIN_VMOVRSB_512, UNKNOWN, (int) V64QI_FTYPE_PCV64QI_V64QI_UDI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vmovrsdv16si_mask, "__builtin_ia32_vmovrsd512_mask", IX86_BUILTIN_VMOVRSD_512, UNKNOWN, (int) V16SI_FTYPE_PCV16SI_V16SI_UHI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vmovrsqv8di_mask, "__builtin_ia32_vmovrsq512_mask", IX86_BUILTIN_VMOVRSQ_512, UNKNOWN, (int) V8DI_FTYPE_PCV8DI_V8DI_UQI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vmovrswv32hi_mask, "__builtin_ia32_vmovrsw512_mask", IX86_BUILTIN_VMOVRSW_512, UNKNOWN, (int) V32HI_FTYPE_PCV32HI_V32HI_USI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vmovrsbv32qi_mask, "__builtin_ia32_vmovrsb256_mask", IX86_BUILTIN_VMOVRSB_256, UNKNOWN, (int) V32QI_FTYPE_PCV32QI_V32QI_USI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vmovrsdv8si_mask, "__builtin_ia32_vmovrsd256_mask", IX86_BUILTIN_VMOVRSD_256, UNKNOWN, (int) V8SI_FTYPE_PCV8SI_V8SI_UQI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vmovrsqv4di_mask, "__builtin_ia32_vmovrsq256_mask", IX86_BUILTIN_VMOVRSQ_256, UNKNOWN, (int) V4DI_FTYPE_PCV4DI_V4DI_UQI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vmovrswv16hi_mask, "__builtin_ia32_vmovrsw256_mask", IX86_BUILTIN_VMOVRSW_256, UNKNOWN, (int) V16HI_FTYPE_PCV16HI_V16HI_UHI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vmovrsbv16qi_mask, "__builtin_ia32_vmovrsb128_mask", IX86_BUILTIN_VMOVRSB_128, UNKNOWN, (int) V16QI_FTYPE_PCV16QI_V16QI_UHI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vmovrsdv4si_mask, "__builtin_ia32_vmovrsd128_mask", IX86_BUILTIN_VMOVRSD_128, UNKNOWN, (int) V4SI_FTYPE_PCV4SI_V4SI_UQI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vmovrsqv2di_mask, "__builtin_ia32_vmovrsq128_mask", IX86_BUILTIN_VMOVRSQ_128, UNKNOWN, (int) V2DI_FTYPE_PCV2DI_V2DI_UQI)
-BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vmovrswv8hi_mask, "__builtin_ia32_vmovrsw128_mask", IX86_BUILTIN_VMOVRSW_128, UNKNOWN, (int) V8HI_FTYPE_PCV8HI_V8HI_UQI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsbv64qi_mask, "__builtin_ia32_vmovrsb512_mask", IX86_BUILTIN_VMOVRSB_512, UNKNOWN, (int) V64QI_FTYPE_PCV64QI_V64QI_UDI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsdv16si_mask, "__builtin_ia32_vmovrsd512_mask", IX86_BUILTIN_VMOVRSD_512, UNKNOWN, (int) V16SI_FTYPE_PCV16SI_V16SI_UHI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsqv8di_mask, "__builtin_ia32_vmovrsq512_mask", IX86_BUILTIN_VMOVRSQ_512, UNKNOWN, (int) V8DI_FTYPE_PCV8DI_V8DI_UQI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrswv32hi_mask, "__builtin_ia32_vmovrsw512_mask", IX86_BUILTIN_VMOVRSW_512, UNKNOWN, (int) V32HI_FTYPE_PCV32HI_V32HI_USI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsbv32qi_mask, "__builtin_ia32_vmovrsb256_mask", IX86_BUILTIN_VMOVRSB_256, UNKNOWN, (int) V32QI_FTYPE_PCV32QI_V32QI_USI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsdv8si_mask, "__builtin_ia32_vmovrsd256_mask", IX86_BUILTIN_VMOVRSD_256, UNKNOWN, (int) V8SI_FTYPE_PCV8SI_V8SI_UQI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsqv4di_mask, "__builtin_ia32_vmovrsq256_mask", IX86_BUILTIN_VMOVRSQ_256, UNKNOWN, (int) V4DI_FTYPE_PCV4DI_V4DI_UQI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrswv16hi_mask, "__builtin_ia32_vmovrsw256_mask", IX86_BUILTIN_VMOVRSW_256, UNKNOWN, (int) V16HI_FTYPE_PCV16HI_V16HI_UHI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsbv16qi_mask, "__builtin_ia32_vmovrsb128_mask", IX86_BUILTIN_VMOVRSB_128, UNKNOWN, (int) V16QI_FTYPE_PCV16QI_V16QI_UHI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsdv4si_mask, "__builtin_ia32_vmovrsd128_mask", IX86_BUILTIN_VMOVRSD_128, UNKNOWN, (int) V4SI_FTYPE_PCV4SI_V4SI_UQI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrsqv2di_mask, "__builtin_ia32_vmovrsq128_mask", IX86_BUILTIN_VMOVRSQ_128, UNKNOWN, (int) V2DI_FTYPE_PCV2DI_V2DI_UQI)
+BDESC (OPTION_MASK_ISA_64BIT, OPTION_MASK_ISA2_MOVRS | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vmovrswv8hi_mask, "__builtin_ia32_vmovrsw128_mask", IX86_BUILTIN_VMOVRSW_128, UNKNOWN, (int) V8HI_FTYPE_PCV8HI_V8HI_UQI)
BDESC_END (SPECIAL_ARGS, PURE_ARGS)
@@ -1686,10 +1686,10 @@ BDESC (OPTION_MASK_ISA_AVX, OPTION_MASK_ISA2_SM3, CODE_FOR_vsm3rnds2, "__builtin
/* SM4 */
BDESC (0, OPTION_MASK_ISA2_SM4, CODE_FOR_vsm4key4_v4si, "__builtin_ia32_vsm4key4128", IX86_BUILTIN_VSM4KEY4128, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI)
BDESC (0, OPTION_MASK_ISA2_SM4, CODE_FOR_vsm4key4_v8si, "__builtin_ia32_vsm4key4256", IX86_BUILTIN_VSM4KEY4256, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_SM4 | OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vsm4key4_v16si, "__builtin_ia32_vsm4key4512", IX86_BUILTIN_VSM4KEY4512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_SM4 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vsm4key4_v16si, "__builtin_ia32_vsm4key4512", IX86_BUILTIN_VSM4KEY4512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI)
BDESC (0, OPTION_MASK_ISA2_SM4, CODE_FOR_vsm4rnds4_v4si, "__builtin_ia32_vsm4rnds4128", IX86_BUILTIN_VSM4RNDS4128, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI)
BDESC (0, OPTION_MASK_ISA2_SM4, CODE_FOR_vsm4rnds4_v8si, "__builtin_ia32_vsm4rnds4256", IX86_BUILTIN_VSM4RNDS4256, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_SM4 | OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vsm4rnds4_v16si, "__builtin_ia32_vsm4rnds4512", IX86_BUILTIN_VSM4RNDS4512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_SM4 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vsm4rnds4_v16si, "__builtin_ia32_vsm4rnds4512", IX86_BUILTIN_VSM4RNDS4512, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI)
/* SHA512 */
BDESC (0, OPTION_MASK_ISA2_SHA512, CODE_FOR_vsha512msg1, "__builtin_ia32_vsha512msg1", IX86_BUILTIN_VSHA512MSG1, UNKNOWN, (int) V4DI_FTYPE_V4DI_V2DI)
@@ -2768,32 +2768,32 @@ BDESC (OPTION_MASK_ISA_AVX512VNNI | OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_vpdpws
BDESC (OPTION_MASK_ISA_AVX512VNNI | OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_vpdpwssds_v4si_maskz, "__builtin_ia32_vpdpwssds_v4si_maskz", IX86_BUILTIN_VPDPWSSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
/* AVXVNNIINT8 */
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssd_v8si, "__builtin_ia32_vpdpbssd256", IX86_BUILTIN_VPDPBSSDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssds_v8si, "__builtin_ia32_vpdpbssds256", IX86_BUILTIN_VPDPBSSDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsud_v8si, "__builtin_ia32_vpdpbsud256", IX86_BUILTIN_VPDPBSUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsuds_v8si, "__builtin_ia32_vpdpbsuds256", IX86_BUILTIN_VPDPBSUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuud_v8si, "__builtin_ia32_vpdpbuud256", IX86_BUILTIN_VPDPBUUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuuds_v8si, "__builtin_ia32_vpdpbuuds256", IX86_BUILTIN_VPDPBUUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssd_v4si, "__builtin_ia32_vpdpbssd128", IX86_BUILTIN_VPDPBSSDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssds_v4si, "__builtin_ia32_vpdpbssds128", IX86_BUILTIN_VPDPBSSDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsud_v4si, "__builtin_ia32_vpdpbsud128", IX86_BUILTIN_VPDPBSUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsuds_v4si, "__builtin_ia32_vpdpbsuds128", IX86_BUILTIN_VPDPBSUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuud_v4si, "__builtin_ia32_vpdpbuud128", IX86_BUILTIN_VPDPBUUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuuds_v4si, "__builtin_ia32_vpdpbuuds128", IX86_BUILTIN_VPDPBUUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v8si, "__builtin_ia32_vpdpbssd256", IX86_BUILTIN_VPDPBSSDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v8si, "__builtin_ia32_vpdpbssds256", IX86_BUILTIN_VPDPBSSDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v8si, "__builtin_ia32_vpdpbsud256", IX86_BUILTIN_VPDPBSUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v8si, "__builtin_ia32_vpdpbsuds256", IX86_BUILTIN_VPDPBSUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v8si, "__builtin_ia32_vpdpbuud256", IX86_BUILTIN_VPDPBUUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v8si, "__builtin_ia32_vpdpbuuds256", IX86_BUILTIN_VPDPBUUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v4si, "__builtin_ia32_vpdpbssd128", IX86_BUILTIN_VPDPBSSDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v4si, "__builtin_ia32_vpdpbssds128", IX86_BUILTIN_VPDPBSSDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v4si, "__builtin_ia32_vpdpbsud128", IX86_BUILTIN_VPDPBSUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v4si, "__builtin_ia32_vpdpbsuds128", IX86_BUILTIN_VPDPBSUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v4si, "__builtin_ia32_vpdpbuud128", IX86_BUILTIN_VPDPBUUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT8 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v4si, "__builtin_ia32_vpdpbuuds128", IX86_BUILTIN_VPDPBUUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
/* AVXVNNIINT16 */
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusd_v8si, "__builtin_ia32_vpdpwusd256", IX86_BUILTIN_VPDPWUSDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusds_v8si, "__builtin_ia32_vpdpwusds256", IX86_BUILTIN_VPDPWUSDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsud_v8si, "__builtin_ia32_vpdpwsud256", IX86_BUILTIN_VPDPWSUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsuds_v8si, "__builtin_ia32_vpdpwsuds256", IX86_BUILTIN_VPDPWSUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuud_v8si, "__builtin_ia32_vpdpwuud256", IX86_BUILTIN_VPDPWUUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuuds_v8si, "__builtin_ia32_vpdpwuuds256", IX86_BUILTIN_VPDPWUUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusd_v4si, "__builtin_ia32_vpdpwusd128", IX86_BUILTIN_VPDPWUSDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusds_v4si, "__builtin_ia32_vpdpwusds128", IX86_BUILTIN_VPDPWUSDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsud_v4si, "__builtin_ia32_vpdpwsud128", IX86_BUILTIN_VPDPWSUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsuds_v4si, "__builtin_ia32_vpdpwsuds128", IX86_BUILTIN_VPDPWSUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuud_v4si, "__builtin_ia32_vpdpwuud128", IX86_BUILTIN_VPDPWUUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
-BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuuds_v4si, "__builtin_ia32_vpdpwuuds128", IX86_BUILTIN_VPDPWUUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v8si, "__builtin_ia32_vpdpwusd256", IX86_BUILTIN_VPDPWUSDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v8si, "__builtin_ia32_vpdpwusds256", IX86_BUILTIN_VPDPWUSDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v8si, "__builtin_ia32_vpdpwsud256", IX86_BUILTIN_VPDPWSUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v8si, "__builtin_ia32_vpdpwsuds256", IX86_BUILTIN_VPDPWSUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v8si, "__builtin_ia32_vpdpwuud256", IX86_BUILTIN_VPDPWUUDV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v8si, "__builtin_ia32_vpdpwuuds256", IX86_BUILTIN_VPDPWUUDSV8SI, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v4si, "__builtin_ia32_vpdpwusd128", IX86_BUILTIN_VPDPWUSDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v4si, "__builtin_ia32_vpdpwusds128", IX86_BUILTIN_VPDPWUSDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v4si, "__builtin_ia32_vpdpwsud128", IX86_BUILTIN_VPDPWSUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v4si, "__builtin_ia32_vpdpwsuds128", IX86_BUILTIN_VPDPWSUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v4si, "__builtin_ia32_vpdpwuud128", IX86_BUILTIN_VPDPWUUDV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
+BDESC (0, OPTION_MASK_ISA2_AVXVNNIINT16 | OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v4si, "__builtin_ia32_vpdpwuuds128", IX86_BUILTIN_VPDPWUUDSV4SI, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI)
/* VPCLMULQDQ */
BDESC (OPTION_MASK_ISA_VPCLMULQDQ | OPTION_MASK_ISA_AVX512VL, 0, CODE_FOR_vpclmulqdq_v2di, "__builtin_ia32_vpclmulqdq_v2di", IX86_BUILTIN_VPCLMULQDQ2, UNKNOWN, (int) V2DI_FTYPE_V2DI_V2DI_INT)
@@ -3041,321 +3041,325 @@ BDESC (OPTION_MASK_ISA_AVX512VL, OPTION_MASK_ISA2_AVX512FP16, CODE_FOR_avx512vl_
BDESC (OPTION_MASK_ISA_AVX512VL, OPTION_MASK_ISA2_AVX512FP16, CODE_FOR_avx512vl_fmulc_v16hf_mask, "__builtin_ia32_vfmulcph256_mask", IX86_BUILTIN_VFMULCPH256_MASK, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UQI)
/* AVX10.2. */
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbssd_v16si, "__builtin_ia32_vpdpbssd512", IX86_BUILTIN_VPDPBSSDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbssds_v16si, "__builtin_ia32_vpdpbssds512", IX86_BUILTIN_VPDPBSSDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbsud_v16si, "__builtin_ia32_vpdpbsud512", IX86_BUILTIN_VPDPBSUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbsuds_v16si, "__builtin_ia32_vpdpbsuds512", IX86_BUILTIN_VPDPBSUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbuud_v16si, "__builtin_ia32_vpdpbuud512", IX86_BUILTIN_VPDPBUUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbuuds_v16si, "__builtin_ia32_vpdpbuuds512", IX86_BUILTIN_VPDPBUUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbssd_v16si_mask, "__builtin_ia32_vpdpbssd_v16si_mask", IX86_BUILTIN_VPDPBSSDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbssd_v16si_maskz, "__builtin_ia32_vpdpbssd_v16si_maskz", IX86_BUILTIN_VPDPBSSDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbssds_v16si_mask, "__builtin_ia32_vpdpbssds_v16si_mask", IX86_BUILTIN_VPDPBSSDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbssds_v16si_maskz, "__builtin_ia32_vpdpbssds_v16si_maskz", IX86_BUILTIN_VPDPBSSDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbsud_v16si_mask, "__builtin_ia32_vpdpbsud_v16si_mask", IX86_BUILTIN_VPDPBSUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbsud_v16si_maskz, "__builtin_ia32_vpdpbsud_v16si_maskz", IX86_BUILTIN_VPDPBSUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbsuds_v16si_mask, "__builtin_ia32_vpdpbsuds_v16si_mask", IX86_BUILTIN_VPDPBSUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbsuds_v16si_maskz, "__builtin_ia32_vpdpbsuds_v16si_maskz", IX86_BUILTIN_VPDPBSUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbuud_v16si_mask, "__builtin_ia32_vpdpbuud_v16si_mask", IX86_BUILTIN_VPDPBUUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbuud_v16si_maskz, "__builtin_ia32_vpdpbuud_v16si_maskz", IX86_BUILTIN_VPDPBUUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbuuds_v16si_mask, "__builtin_ia32_vpdpbuuds_v16si_mask", IX86_BUILTIN_VPDPBUUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpbuuds_v16si_maskz, "__builtin_ia32_vpdpbuuds_v16si_maskz", IX86_BUILTIN_VPDPBUUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssd_v8si_mask, "__builtin_ia32_vpdpbssd_v8si_mask", IX86_BUILTIN_VPDPBSSDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssd_v8si_maskz, "__builtin_ia32_vpdpbssd_v8si_maskz", IX86_BUILTIN_VPDPBSSDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssds_v8si_mask, "__builtin_ia32_vpdpbssds_v8si_mask", IX86_BUILTIN_VPDPBSSDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssds_v8si_maskz, "__builtin_ia32_vpdpbssds_v8si_maskz", IX86_BUILTIN_VPDPBSSDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsud_v8si_mask, "__builtin_ia32_vpdpbsud_v8si_mask", IX86_BUILTIN_VPDPBSUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsud_v8si_maskz, "__builtin_ia32_vpdpbsud_v8si_maskz", IX86_BUILTIN_VPDPBSUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsuds_v8si_mask, "__builtin_ia32_vpdpbsuds_v8si_mask", IX86_BUILTIN_VPDPBSUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsuds_v8si_maskz, "__builtin_ia32_vpdpbsuds_v8si_maskz", IX86_BUILTIN_VPDPBSUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuud_v8si_mask, "__builtin_ia32_vpdpbuud_v8si_mask", IX86_BUILTIN_VPDPBUUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuud_v8si_maskz, "__builtin_ia32_vpdpbuud_v8si_maskz", IX86_BUILTIN_VPDPBUUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuuds_v8si_mask, "__builtin_ia32_vpdpbuuds_v8si_mask", IX86_BUILTIN_VPDPBUUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuuds_v8si_maskz, "__builtin_ia32_vpdpbuuds_v8si_maskz", IX86_BUILTIN_VPDPBUUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssd_v4si_mask, "__builtin_ia32_vpdpbssd_v4si_mask", IX86_BUILTIN_VPDPBSSDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssd_v4si_maskz, "__builtin_ia32_vpdpbssd_v4si_maskz", IX86_BUILTIN_VPDPBSSDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssds_v4si_mask, "__builtin_ia32_vpdpbssds_v4si_mask", IX86_BUILTIN_VPDPBSSDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbssds_v4si_maskz, "__builtin_ia32_vpdpbssds_v4si_maskz", IX86_BUILTIN_VPDPBSSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsud_v4si_mask, "__builtin_ia32_vpdpbsud_v4si_mask", IX86_BUILTIN_VPDPBSUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsud_v4si_maskz, "__builtin_ia32_vpdpbsud_v4si_maskz", IX86_BUILTIN_VPDPBSUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsuds_v4si_mask, "__builtin_ia32_vpdpbsuds_v4si_mask", IX86_BUILTIN_VPDPBSUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbsuds_v4si_maskz, "__builtin_ia32_vpdpbsuds_v4si_maskz", IX86_BUILTIN_VPDPBSUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuud_v4si_mask, "__builtin_ia32_vpdpbuud_v4si_mask", IX86_BUILTIN_VPDPBUUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuud_v4si_maskz, "__builtin_ia32_vpdpbuud_v4si_maskz", IX86_BUILTIN_VPDPBUUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuuds_v4si_mask, "__builtin_ia32_vpdpbuuds_v4si_mask", IX86_BUILTIN_VPDPBUUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpbuuds_v4si_maskz, "__builtin_ia32_vpdpbuuds_v4si_maskz", IX86_BUILTIN_VPDPBUUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwsud_v16si, "__builtin_ia32_vpdpwsud512", IX86_BUILTIN_VPDPWSUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwsuds_v16si, "__builtin_ia32_vpdpwsuds512", IX86_BUILTIN_VPDPWSUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwusd_v16si, "__builtin_ia32_vpdpwusd512", IX86_BUILTIN_VPDPWUSDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwusds_v16si, "__builtin_ia32_vpdpwusds512", IX86_BUILTIN_VPDPWUSDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwuud_v16si, "__builtin_ia32_vpdpwuud512", IX86_BUILTIN_VPDPWUUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwuuds_v16si, "__builtin_ia32_vpdpwuuds512", IX86_BUILTIN_VPDPWUUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwsud_v16si_mask, "__builtin_ia32_vpdpwsud_v16si_mask", IX86_BUILTIN_VPDPWSUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwsud_v16si_maskz, "__builtin_ia32_vpdpwsud_v16si_maskz", IX86_BUILTIN_VPDPWSUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwsuds_v16si_mask, "__builtin_ia32_vpdpwsuds_v16si_mask", IX86_BUILTIN_VPDPWSUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwsuds_v16si_maskz, "__builtin_ia32_vpdpwsuds_v16si_maskz", IX86_BUILTIN_VPDPWSUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwusd_v16si_mask, "__builtin_ia32_vpdpwusd_v16si_mask", IX86_BUILTIN_VPDPWUSDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwusd_v16si_maskz, "__builtin_ia32_vpdpwusd_v16si_maskz", IX86_BUILTIN_VPDPWUSDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwusds_v16si_mask, "__builtin_ia32_vpdpwusds_v16si_mask", IX86_BUILTIN_VPDPWUSDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwusds_v16si_maskz, "__builtin_ia32_vpdpwusds_v16si_maskz", IX86_BUILTIN_VPDPWUSDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwuud_v16si_mask, "__builtin_ia32_vpdpwuud_v16si_mask", IX86_BUILTIN_VPDPWUUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwuud_v16si_maskz, "__builtin_ia32_vpdpwuud_v16si_maskz", IX86_BUILTIN_VPDPWUUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwuuds_v16si_mask, "__builtin_ia32_vpdpwuuds_v16si_mask", IX86_BUILTIN_VPDPWUUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vpdpwuuds_v16si_maskz, "__builtin_ia32_vpdpwuuds_v16si_maskz", IX86_BUILTIN_VPDPWUUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsud_v8si_mask, "__builtin_ia32_vpdpwsud_v8si_mask", IX86_BUILTIN_VPDPWSUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsud_v8si_maskz, "__builtin_ia32_vpdpwsud_v8si_maskz", IX86_BUILTIN_VPDPWSUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsuds_v8si_mask, "__builtin_ia32_vpdpwsuds_v8si_mask", IX86_BUILTIN_VPDPWSUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsuds_v8si_maskz, "__builtin_ia32_vpdpwsuds_v8si_maskz", IX86_BUILTIN_VPDPWSUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusd_v8si_mask, "__builtin_ia32_vpdpwusd_v8si_mask", IX86_BUILTIN_VPDPWUSDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusd_v8si_maskz, "__builtin_ia32_vpdpwusd_v8si_maskz", IX86_BUILTIN_VPDPWUSDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusds_v8si_mask, "__builtin_ia32_vpdpwusds_v8si_mask", IX86_BUILTIN_VPDPWUSDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusds_v8si_maskz, "__builtin_ia32_vpdpwusds_v8si_maskz", IX86_BUILTIN_VPDPWUSDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuud_v8si_mask, "__builtin_ia32_vpdpwuud_v8si_mask", IX86_BUILTIN_VPDPWUUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuud_v8si_maskz, "__builtin_ia32_vpdpwuud_v8si_maskz", IX86_BUILTIN_VPDPWUUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuuds_v8si_mask, "__builtin_ia32_vpdpwuuds_v8si_mask", IX86_BUILTIN_VPDPWUUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuuds_v8si_maskz, "__builtin_ia32_vpdpwuuds_v8si_maskz", IX86_BUILTIN_VPDPWUUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsud_v4si_mask, "__builtin_ia32_vpdpwsud_v4si_mask", IX86_BUILTIN_VPDPWSUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsud_v4si_maskz, "__builtin_ia32_vpdpwsud_v4si_maskz", IX86_BUILTIN_VPDPWSUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsuds_v4si_mask, "__builtin_ia32_vpdpwsuds_v4si_mask", IX86_BUILTIN_VPDPWSUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwsuds_v4si_maskz, "__builtin_ia32_vpdpwsuds_v4si_maskz", IX86_BUILTIN_VPDPWSUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusd_v4si_mask, "__builtin_ia32_vpdpwusd_v4si_mask", IX86_BUILTIN_VPDPWUSDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusd_v4si_maskz, "__builtin_ia32_vpdpwusd_v4si_maskz", IX86_BUILTIN_VPDPWUSDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusds_v4si_mask, "__builtin_ia32_vpdpwusds_v4si_mask", IX86_BUILTIN_VPDPWUSDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwusds_v4si_maskz, "__builtin_ia32_vpdpwusds_v4si_maskz", IX86_BUILTIN_VPDPWUSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuud_v4si_mask, "__builtin_ia32_vpdpwuud_v4si_mask", IX86_BUILTIN_VPDPWUUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuud_v4si_maskz, "__builtin_ia32_vpdpwuud_v4si_maskz", IX86_BUILTIN_VPDPWUUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuuds_v4si_mask, "__builtin_ia32_vpdpwuuds_v4si_mask", IX86_BUILTIN_VPDPWUUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vpdpwuuds_v4si_maskz, "__builtin_ia32_vpdpwuuds_v4si_maskz", IX86_BUILTIN_VPDPWUUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vdpphps_v16sf_mask, "__builtin_ia32_vdpphps512_mask", IX86_BUILTIN_VDPPHPS512_MASK, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_V16SF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vdpphps_v16sf_maskz, "__builtin_ia32_vdpphps512_maskz", IX86_BUILTIN_VDPPHPS512_MASKZ, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_V16SF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vdpphps_v8sf_mask, "__builtin_ia32_vdpphps256_mask", IX86_BUILTIN_VDPPHPS256_MASK, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vdpphps_v8sf_maskz, "__builtin_ia32_vdpphps256_maskz", IX86_BUILTIN_VDPPHPS256_MASKZ, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vdpphps_v4sf_mask, "__builtin_ia32_vdpphps128_mask", IX86_BUILTIN_VDPPHPS128_MASK, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_V4SF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vdpphps_v4sf_maskz, "__builtin_ia32_vdpphps128_maskz", IX86_BUILTIN_VDPPHPS128_MASKZ, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_V4SF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_mpsadbw, "__builtin_ia32_mpsadbw512", IX86_BUILTIN_AVX10_2_MPSADBW, UNKNOWN, (int) V64QI_FTYPE_V64QI_V64QI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_mpsadbw_mask, "__builtin_ia32_mpsadbw512_mask", IX86_BUILTIN_VMPSADBW_V32HI_MASK, UNKNOWN, (int) V32HI_FTYPE_V64QI_V64QI_INT_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx2_mpsadbw_mask, "__builtin_ia32_mpsadbw256_mask", IX86_BUILTIN_VMPSADBW_V16HI_MASK, UNKNOWN, (int) V16HI_FTYPE_V32QI_V32QI_INT_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_sse4_1_mpsadbw_mask, "__builtin_ia32_mpsadbw128_mask", IX86_BUILTIN_VMPSADBW_V8HI_MASK, UNKNOWN, (int) V8HI_FTYPE_V16QI_V16QI_INT_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvt2ps2phx_v8hf_mask, "__builtin_ia32_vcvt2ps2phx128_mask", IX86_BUILTIN_VCVT2PS2PHX_V8HF_MASK, UNKNOWN, (int) V8HF_FTYPE_V4SF_V4SF_V8HF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2bf8v8hf, "__builtin_ia32_vcvtbiasph2bf8128", IX86_BUILTIN_VCVTBIASPH2BF8128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2bf8v8hf_mask, "__builtin_ia32_vcvtbiasph2bf8128_mask", IX86_BUILTIN_VCVTBIASPH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2bf8v16hf_mask, "__builtin_ia32_vcvtbiasph2bf8256_mask", IX86_BUILTIN_VCVTBIASPH2BF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvtbiasph2bf8v32hf_mask, "__builtin_ia32_vcvtbiasph2bf8512_mask", IX86_BUILTIN_VCVTBIASPH2BF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2bf8sv8hf, "__builtin_ia32_vcvtbiasph2bf8s128", IX86_BUILTIN_VCVTBIASPH2BF8S128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2bf8sv8hf_mask, "__builtin_ia32_vcvtbiasph2bf8s128_mask", IX86_BUILTIN_VCVTBIASPH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2bf8sv16hf_mask, "__builtin_ia32_vcvtbiasph2bf8s256_mask", IX86_BUILTIN_VCVTBIASPH2BF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvtbiasph2bf8sv32hf_mask, "__builtin_ia32_vcvtbiasph2bf8s512_mask", IX86_BUILTIN_VCVTBIASPH2BF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2hf8v8hf, "__builtin_ia32_vcvtbiasph2hf8128", IX86_BUILTIN_VCVTBIASPH2HF8128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2hf8v8hf_mask, "__builtin_ia32_vcvtbiasph2hf8128_mask", IX86_BUILTIN_VCVTBIASPH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2hf8v16hf_mask, "__builtin_ia32_vcvtbiasph2hf8256_mask", IX86_BUILTIN_VCVTBIASPH2HF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvtbiasph2hf8v32hf_mask, "__builtin_ia32_vcvtbiasph2hf8512_mask", IX86_BUILTIN_VCVTBIASPH2HF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2hf8sv8hf, "__builtin_ia32_vcvtbiasph2hf8s128", IX86_BUILTIN_VCVTBIASPH2HF8S128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2hf8sv8hf_mask, "__builtin_ia32_vcvtbiasph2hf8s128_mask", IX86_BUILTIN_VCVTBIASPH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtbiasph2hf8sv16hf_mask, "__builtin_ia32_vcvtbiasph2hf8s256_mask", IX86_BUILTIN_VCVTBIASPH2HF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvtbiasph2hf8sv32hf_mask, "__builtin_ia32_vcvtbiasph2hf8s512_mask", IX86_BUILTIN_VCVTBIASPH2HF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvt2ph2bf8v8hf_mask, "__builtin_ia32_vcvt2ph2bf8128_mask", IX86_BUILTIN_VCVT2PH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvt2ph2bf8v16hf_mask, "__builtin_ia32_vcvt2ph2bf8256_mask", IX86_BUILTIN_VCVT2PH2BF8256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvt2ph2bf8v32hf_mask, "__builtin_ia32_vcvt2ph2bf8512_mask", IX86_BUILTIN_VCVT2PH2BF8512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvt2ph2bf8sv8hf_mask, "__builtin_ia32_vcvt2ph2bf8s128_mask", IX86_BUILTIN_VCVT2PH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvt2ph2bf8sv16hf_mask, "__builtin_ia32_vcvt2ph2bf8s256_mask", IX86_BUILTIN_VCVT2PH2BF8S256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvt2ph2bf8sv32hf_mask, "__builtin_ia32_vcvt2ph2bf8s512_mask", IX86_BUILTIN_VCVT2PH2BF8S512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvt2ph2hf8v8hf_mask, "__builtin_ia32_vcvt2ph2hf8128_mask", IX86_BUILTIN_VCVT2PH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvt2ph2hf8v16hf_mask, "__builtin_ia32_vcvt2ph2hf8256_mask", IX86_BUILTIN_VCVT2PH2HF8256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvt2ph2hf8v32hf_mask, "__builtin_ia32_vcvt2ph2hf8512_mask", IX86_BUILTIN_VCVT2PH2HF8512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvt2ph2hf8sv8hf_mask, "__builtin_ia32_vcvt2ph2hf8s128_mask", IX86_BUILTIN_VCVT2PH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvt2ph2hf8sv16hf_mask, "__builtin_ia32_vcvt2ph2hf8s256_mask", IX86_BUILTIN_VCVT2PH2HF8S256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvt2ph2hf8sv32hf_mask, "__builtin_ia32_vcvt2ph2hf8s512_mask", IX86_BUILTIN_VCVT2PH2HF8S512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2bf8v8hf_mask, "__builtin_ia32_vcvtph2bf8128_mask", IX86_BUILTIN_VCVTPH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2bf8v16hf_mask, "__builtin_ia32_vcvtph2bf8256_mask", IX86_BUILTIN_VCVTPH2BF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvtph2bf8v32hf_mask, "__builtin_ia32_vcvtph2bf8512_mask", IX86_BUILTIN_VCVTPH2BF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2bf8sv8hf_mask, "__builtin_ia32_vcvtph2bf8s128_mask", IX86_BUILTIN_VCVTPH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2bf8sv16hf_mask, "__builtin_ia32_vcvtph2bf8s256_mask", IX86_BUILTIN_VCVTPH2BF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvtph2bf8sv32hf_mask, "__builtin_ia32_vcvtph2bf8s512_mask", IX86_BUILTIN_VCVTPH2BF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2hf8v8hf_mask, "__builtin_ia32_vcvtph2hf8128_mask", IX86_BUILTIN_VCVTPH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2hf8v16hf_mask, "__builtin_ia32_vcvtph2hf8256_mask", IX86_BUILTIN_VCVTPH2HF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvtph2hf8v32hf_mask, "__builtin_ia32_vcvtph2hf8512_mask", IX86_BUILTIN_VCVTPH2HF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2hf8sv8hf_mask, "__builtin_ia32_vcvtph2hf8s128_mask", IX86_BUILTIN_VCVTPH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2hf8sv16hf_mask, "__builtin_ia32_vcvtph2hf8s256_mask", IX86_BUILTIN_VCVTPH2HF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvtph2hf8sv32hf_mask, "__builtin_ia32_vcvtph2hf8s512_mask", IX86_BUILTIN_VCVTPH2HF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvthf82phv8hf_mask, "__builtin_ia32_vcvthf82ph128_mask", IX86_BUILTIN_VCVTHF82PH128_MASK, UNKNOWN, (int) V8HF_FTYPE_V16QI_V8HF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvthf82phv16hf_mask, "__builtin_ia32_vcvthf82ph256_mask", IX86_BUILTIN_VCVTHF82PH256_MASK, UNKNOWN, (int) V16HF_FTYPE_V16QI_V16HF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_vcvthf82phv32hf_mask, "__builtin_ia32_vcvthf82ph512_mask", IX86_BUILTIN_VCVTHF82PH512_MASK, UNKNOWN, (int) V32HF_FTYPE_V32QI_V32HF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_addbf16_v32bf, "__builtin_ia32_addbf16512", IX86_BUILTIN_ADDBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_addbf16_v32bf_mask, "__builtin_ia32_addbf16512_mask", IX86_BUILTIN_ADDBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_addbf16_v16bf, "__builtin_ia32_addbf16256", IX86_BUILTIN_ADDBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_addbf16_v16bf_mask, "__builtin_ia32_addbf16256_mask", IX86_BUILTIN_ADDBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_addbf16_v8bf, "__builtin_ia32_addbf16128", IX86_BUILTIN_ADDBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_addbf16_v8bf_mask, "__builtin_ia32_addbf16128_mask", IX86_BUILTIN_ADDBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_subbf16_v32bf, "__builtin_ia32_subbf16512", IX86_BUILTIN_SUBBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_subbf16_v32bf_mask, "__builtin_ia32_subbf16512_mask", IX86_BUILTIN_SUBBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_subbf16_v16bf, "__builtin_ia32_subbf16256", IX86_BUILTIN_SUBBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_subbf16_v16bf_mask, "__builtin_ia32_subbf16256_mask", IX86_BUILTIN_SUBBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_subbf16_v8bf, "__builtin_ia32_subbf16128", IX86_BUILTIN_SUBBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_subbf16_v8bf_mask, "__builtin_ia32_subbf16128_mask", IX86_BUILTIN_SUBBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_mulbf16_v32bf, "__builtin_ia32_mulbf16512", IX86_BUILTIN_MULBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_mulbf16_v32bf_mask, "__builtin_ia32_mulbf16512_mask", IX86_BUILTIN_MULBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_mulbf16_v16bf, "__builtin_ia32_mulbf16256", IX86_BUILTIN_MULBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_mulbf16_v16bf_mask, "__builtin_ia32_mulbf16256_mask", IX86_BUILTIN_MULBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_mulbf16_v8bf, "__builtin_ia32_mulbf16128", IX86_BUILTIN_MULBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_mulbf16_v8bf_mask, "__builtin_ia32_mulbf16128_mask", IX86_BUILTIN_MULBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_divbf16_v32bf, "__builtin_ia32_divbf16512", IX86_BUILTIN_DIVBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_divbf16_v32bf_mask, "__builtin_ia32_divbf16512_mask", IX86_BUILTIN_DIVBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_divbf16_v16bf, "__builtin_ia32_divbf16256", IX86_BUILTIN_DIVBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_divbf16_v16bf_mask, "__builtin_ia32_divbf16256_mask", IX86_BUILTIN_DIVBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_divbf16_v8bf, "__builtin_ia32_divbf16128", IX86_BUILTIN_DIVBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_divbf16_v8bf_mask, "__builtin_ia32_divbf16128_mask", IX86_BUILTIN_DIVBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_smaxbf16_v32bf, "__builtin_ia32_maxbf16512", IX86_BUILTIN_MAXBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_smaxbf16_v32bf_mask, "__builtin_ia32_maxbf16512_mask", IX86_BUILTIN_MAXBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_smaxbf16_v16bf, "__builtin_ia32_maxbf16256", IX86_BUILTIN_MAXBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_smaxbf16_v16bf_mask, "__builtin_ia32_maxbf16256_mask", IX86_BUILTIN_MAXBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_smaxbf16_v8bf, "__builtin_ia32_maxbf16128", IX86_BUILTIN_MAXBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_smaxbf16_v8bf_mask, "__builtin_ia32_maxbf16128_mask", IX86_BUILTIN_MAXBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_sminbf16_v32bf, "__builtin_ia32_minbf16512", IX86_BUILTIN_MINBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_sminbf16_v32bf_mask, "__builtin_ia32_minbf16512_mask", IX86_BUILTIN_MINBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_sminbf16_v16bf, "__builtin_ia32_minbf16256", IX86_BUILTIN_MINBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_sminbf16_v16bf_mask, "__builtin_ia32_minbf16256_mask", IX86_BUILTIN_MINBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_sminbf16_v8bf, "__builtin_ia32_minbf16128", IX86_BUILTIN_MINBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_sminbf16_v8bf_mask, "__builtin_ia32_minbf16128_mask", IX86_BUILTIN_MINBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_scalefbf16_v32bf, "__builtin_ia32_scalefbf16512", IX86_BUILTIN_SCALEFBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_scalefbf16_v32bf_mask, "__builtin_ia32_scalefbf16512_mask", IX86_BUILTIN_SCALEFBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_scalefbf16_v16bf, "__builtin_ia32_scalefbf16256", IX86_BUILTIN_SCALEFBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_scalefbf16_v16bf_mask, "__builtin_ia32_scalefbf16256_mask", IX86_BUILTIN_SCALEFBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_scalefbf16_v8bf, "__builtin_ia32_scalefbf16128", IX86_BUILTIN_SCALEFBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_scalefbf16_v8bf_mask, "__builtin_ia32_scalefbf16128_mask", IX86_BUILTIN_SCALEFBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fmaddbf16_v32bf_mask, "__builtin_ia32_fmaddbf16512_mask", IX86_BUILTIN_FMADDBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fmaddbf16_v32bf_mask3, "__builtin_ia32_fmaddbf16512_mask3", IX86_BUILTIN_FMADDBF16512_MASK3, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fmaddbf16_v32bf_maskz, "__builtin_ia32_fmaddbf16512_maskz", IX86_BUILTIN_FMADDBF16512_MASKZ, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmaddbf16_v16bf_mask, "__builtin_ia32_fmaddbf16256_mask", IX86_BUILTIN_FMADDBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmaddbf16_v16bf_mask3, "__builtin_ia32_fmaddbf16256_mask3", IX86_BUILTIN_FMADDBF16256_MASK3, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmaddbf16_v16bf_maskz, "__builtin_ia32_fmaddbf16256_maskz", IX86_BUILTIN_FMADDBF16256_MASKZ, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmaddbf16_v8bf_mask, "__builtin_ia32_fmaddbf16128_mask", IX86_BUILTIN_FMADDBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmaddbf16_v8bf_mask3, "__builtin_ia32_fmaddbf16128_mask3", IX86_BUILTIN_FMADDBF16128_MASK3, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmaddbf16_v8bf_maskz, "__builtin_ia32_fmaddbf16128_maskz", IX86_BUILTIN_FMADDBF16128_MASKZ, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fmsubbf16_v32bf_mask, "__builtin_ia32_fmsubbf16512_mask", IX86_BUILTIN_FMSUBBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fmsubbf16_v32bf_mask3, "__builtin_ia32_fmsubbf16512_mask3", IX86_BUILTIN_FMSUBBF16512_MASK3, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fmsubbf16_v32bf_maskz, "__builtin_ia32_fmsubbf16512_maskz", IX86_BUILTIN_FMSUBBF16512_MASKZ, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmsubbf16_v16bf_mask, "__builtin_ia32_fmsubbf16256_mask", IX86_BUILTIN_FMSUBBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmsubbf16_v16bf_mask3, "__builtin_ia32_fmsubbf16256_mask3", IX86_BUILTIN_FMSUBBF16256_MASK3, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmsubbf16_v16bf_maskz, "__builtin_ia32_fmsubbf16256_maskz", IX86_BUILTIN_FMSUBBF16256_MASKZ, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmsubbf16_v8bf_mask, "__builtin_ia32_fmsubbf16128_mask", IX86_BUILTIN_FMSUBBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmsubbf16_v8bf_mask3, "__builtin_ia32_fmsubbf16128_mask3", IX86_BUILTIN_FMSUBBF16128_MASK3, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fmsubbf16_v8bf_maskz, "__builtin_ia32_fmsubbf16128_maskz", IX86_BUILTIN_FMSUBBF16128_MASKZ, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fnmaddbf16_v32bf_mask, "__builtin_ia32_fnmaddbf16512_mask", IX86_BUILTIN_FNMADDBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fnmaddbf16_v32bf_mask3, "__builtin_ia32_fnmaddbf16512_mask3", IX86_BUILTIN_FNMADDBF16512_MASK3, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fnmaddbf16_v32bf_maskz, "__builtin_ia32_fnmaddbf16512_maskz", IX86_BUILTIN_FNMADDBF16512_MASKZ, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmaddbf16_v16bf_mask, "__builtin_ia32_fnmaddbf16256_mask", IX86_BUILTIN_FNMADDBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmaddbf16_v16bf_mask3, "__builtin_ia32_fnmaddbf16256_mask3", IX86_BUILTIN_FNMADDBF16256_MASK3, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmaddbf16_v16bf_maskz, "__builtin_ia32_fnmaddbf16256_maskz", IX86_BUILTIN_FNMADDBF16256_MASKZ, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmaddbf16_v8bf_mask, "__builtin_ia32_fnmaddbf16128_mask", IX86_BUILTIN_FNMADDBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmaddbf16_v8bf_mask3, "__builtin_ia32_fnmaddbf16128_mask3", IX86_BUILTIN_FNMADDBF16128_MASK3, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmaddbf16_v8bf_maskz, "__builtin_ia32_fnmaddbf16128_maskz", IX86_BUILTIN_FNMADDBF16128_MASKZ, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fnmsubbf16_v32bf_mask, "__builtin_ia32_fnmsubbf16512_mask", IX86_BUILTIN_FNMSUBBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fnmsubbf16_v32bf_mask3, "__builtin_ia32_fnmsubbf16512_mask3", IX86_BUILTIN_FNMSUBBF16512_MASK3, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fnmsubbf16_v32bf_maskz, "__builtin_ia32_fnmsubbf16512_maskz", IX86_BUILTIN_FNMSUBBF16512_MASKZ, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmsubbf16_v16bf_mask, "__builtin_ia32_fnmsubbf16256_mask", IX86_BUILTIN_FNMSUBBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmsubbf16_v16bf_mask3, "__builtin_ia32_fnmsubbf16256_mask3", IX86_BUILTIN_FNMSUBBF16256_MASK3, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmsubbf16_v16bf_maskz, "__builtin_ia32_fnmsubbf16256_maskz", IX86_BUILTIN_FNMSUBBF16256_MASKZ, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmsubbf16_v8bf_mask, "__builtin_ia32_fnmsubbf16128_mask", IX86_BUILTIN_FNMSUBBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmsubbf16_v8bf_mask3, "__builtin_ia32_fnmsubbf16128_mask3", IX86_BUILTIN_FNMSUBBF16128_MASK3, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fnmsubbf16_v8bf_maskz, "__builtin_ia32_fnmsubbf16128_maskz", IX86_BUILTIN_FNMSUBBF16128_MASKZ, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_rsqrtbf16_v32bf_mask, "__builtin_ia32_rsqrtbf16512_mask", IX86_BUILTIN_RSQRTBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_rsqrtbf16_v16bf_mask, "__builtin_ia32_rsqrtbf16256_mask", IX86_BUILTIN_RSQRTBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_rsqrtbf16_v8bf_mask, "__builtin_ia32_rsqrtbf16128_mask", IX86_BUILTIN_RSQRTBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_sqrtbf16_v32bf_mask, "__builtin_ia32_sqrtbf16512_mask", IX86_BUILTIN_SQRTBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_sqrtbf16_v16bf_mask, "__builtin_ia32_sqrtbf16256_mask", IX86_BUILTIN_SQRTBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_sqrtbf16_v8bf_mask, "__builtin_ia32_sqrtbf16128_mask", IX86_BUILTIN_SQRTBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_rcpbf16_v32bf_mask, "__builtin_ia32_rcpbf16512_mask", IX86_BUILTIN_RCPBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_rcpbf16_v16bf_mask, "__builtin_ia32_rcpbf16256_mask", IX86_BUILTIN_RCPBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_rcpbf16_v8bf_mask, "__builtin_ia32_rcpbf16128_mask", IX86_BUILTIN_RCPBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_getexpbf16_v32bf_mask, "__builtin_ia32_getexpbf16512_mask", IX86_BUILTIN_GETEXPBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_getexpbf16_v16bf_mask, "__builtin_ia32_getexpbf16256_mask", IX86_BUILTIN_GETEXPBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_getexpbf16_v8bf_mask, "__builtin_ia32_getexpbf16128_mask", IX86_BUILTIN_GETEXPBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_rndscalebf16_v32bf_mask, "__builtin_ia32_rndscalebf16512_mask", IX86_BUILTIN_RNDSCALEBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_INT_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_rndscalebf16_v16bf_mask, "__builtin_ia32_rndscalebf16256_mask", IX86_BUILTIN_RNDSCALEBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_INT_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_rndscalebf16_v8bf_mask, "__builtin_ia32_rndscalebf16128_mask", IX86_BUILTIN_RNDSCALEBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_INT_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_reducebf16_v32bf_mask, "__builtin_ia32_reducebf16512_mask", IX86_BUILTIN_REDUCEBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_INT_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_reducebf16_v16bf_mask, "__builtin_ia32_reducebf16256_mask", IX86_BUILTIN_REDUCEBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_INT_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_reducebf16_v8bf_mask, "__builtin_ia32_reducebf16128_mask", IX86_BUILTIN_REDUCEBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_INT_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_getmantbf16_v32bf_mask, "__builtin_ia32_getmantbf16512_mask", IX86_BUILTIN_GETMANTBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_INT_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_getmantbf16_v16bf_mask, "__builtin_ia32_getmantbf16256_mask", IX86_BUILTIN_GETMANTBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_INT_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_getmantbf16_v8bf_mask, "__builtin_ia32_getmantbf16128_mask", IX86_BUILTIN_GETMANTBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_INT_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_fpclassbf16_v32bf_mask, "__builtin_ia32_fpclassbf16512_mask", IX86_BUILTIN_FPCLASSBF16512_MASK, UNKNOWN, (int) SI_FTYPE_V32BF_INT_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fpclassbf16_v16bf_mask, "__builtin_ia32_fpclassbf16256_mask", IX86_BUILTIN_FPCLASSBF16256_MASK, UNKNOWN, (int) HI_FTYPE_V16BF_INT_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_fpclassbf16_v8bf_mask, "__builtin_ia32_fpclassbf16128_mask", IX86_BUILTIN_FPCLASSBF16128_MASK, UNKNOWN, (int) QI_FTYPE_V8BF_INT_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cmpbf16_v32bf_mask, "__builtin_ia32_cmpbf16512_mask", IX86_BUILTIN_CMPBF16512_MASK, UNKNOWN, (int) USI_FTYPE_V32BF_V32BF_INT_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cmpbf16_v16bf_mask, "__builtin_ia32_cmpbf16256_mask", IX86_BUILTIN_CMPBF16256_MASK, UNKNOWN, (int) UHI_FTYPE_V16BF_V16BF_INT_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cmpbf16_v8bf_mask, "__builtin_ia32_cmpbf16128_mask", IX86_BUILTIN_CMPBF16128_MASK, UNKNOWN, (int) UQI_FTYPE_V8BF_V8BF_INT_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16eq", IX86_BUILTIN_VCOMISBF16EQ, EQ, (int) INT_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16gt", IX86_BUILTIN_VCOMISBF16GT, GT, (int) INT_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16ge", IX86_BUILTIN_VCOMISBF16GE, GE, (int) INT_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16le", IX86_BUILTIN_VCOMISBF16LE, LE, (int) INT_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16lt", IX86_BUILTIN_VCOMISBF16LT, LT, (int) INT_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16neq", IX86_BUILTIN_VCOMISBF16NE, NE, (int) INT_FTYPE_V8BF_V8BF)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtbf162ibsv8bf_mask, "__builtin_ia32_cvtbf162ibs128_mask", IX86_BUILTIN_CVTBF162IBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8BF_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtbf162ibsv16bf_mask, "__builtin_ia32_cvtbf162ibs256_mask", IX86_BUILTIN_CVTBF162IBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16BF_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtbf162ibsv32bf_mask, "__builtin_ia32_cvtbf162ibs512_mask", IX86_BUILTIN_CVTBF162IBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32BF_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtbf162iubsv8bf_mask, "__builtin_ia32_cvtbf162iubs128_mask", IX86_BUILTIN_CVTBF162IUBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8BF_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtbf162iubsv16bf_mask, "__builtin_ia32_cvtbf162iubs256_mask", IX86_BUILTIN_CVTBF162IUBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16BF_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtbf162iubsv32bf_mask, "__builtin_ia32_cvtbf162iubs512_mask", IX86_BUILTIN_CVTBF162IUBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32BF_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtph2ibsv8hf_mask, "__builtin_ia32_cvtph2ibs128_mask", IX86_BUILTIN_CVTPH2IBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8HF_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtph2ibsv16hf_mask, "__builtin_ia32_cvtph2ibs256_mask", IX86_BUILTIN_CVTPH2IBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtph2ibsv32hf_mask, "__builtin_ia32_cvtph2ibs512_mask", IX86_BUILTIN_CVTPH2IBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtph2iubsv8hf_mask, "__builtin_ia32_cvtph2iubs128_mask", IX86_BUILTIN_CVTPH2IUBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8HF_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtph2iubsv16hf_mask, "__builtin_ia32_cvtph2iubs256_mask", IX86_BUILTIN_CVTPH2IUBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtph2iubsv32hf_mask, "__builtin_ia32_cvtph2iubs512_mask", IX86_BUILTIN_CVTPH2IUBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtps2ibsv4sf_mask, "__builtin_ia32_cvtps2ibs128_mask", IX86_BUILTIN_CVTPS2IBS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtps2ibsv8sf_mask, "__builtin_ia32_cvtps2ibs256_mask", IX86_BUILTIN_CVTPS2IBS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtps2ibsv16sf_mask, "__builtin_ia32_cvtps2ibs512_mask", IX86_BUILTIN_CVTPS2IBS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtps2iubsv4sf_mask, "__builtin_ia32_cvtps2iubs128_mask", IX86_BUILTIN_CVTPS2IUBS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtps2iubsv8sf_mask, "__builtin_ia32_cvtps2iubs256_mask", IX86_BUILTIN_CVTPS2IUBS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtps2iubsv16sf_mask, "__builtin_ia32_cvtps2iubs512_mask", IX86_BUILTIN_CVTPS2IUBS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttbf162ibsv8bf_mask, "__builtin_ia32_cvttbf162ibs128_mask", IX86_BUILTIN_CVTTBF162IBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8BF_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttbf162ibsv16bf_mask, "__builtin_ia32_cvttbf162ibs256_mask", IX86_BUILTIN_CVTTBF162IBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16BF_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttbf162ibsv32bf_mask, "__builtin_ia32_cvttbf162ibs512_mask", IX86_BUILTIN_CVTTBF162IBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32BF_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttbf162iubsv8bf_mask, "__builtin_ia32_cvttbf162iubs128_mask", IX86_BUILTIN_CVTTBF162IUBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8BF_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttbf162iubsv16bf_mask, "__builtin_ia32_cvttbf162iubs256_mask", IX86_BUILTIN_CVTTBF162IUBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16BF_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttbf162iubsv32bf_mask, "__builtin_ia32_cvttbf162iubs512_mask", IX86_BUILTIN_CVTTBF162IUBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32BF_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttph2ibsv8hf_mask, "__builtin_ia32_cvttph2ibs128_mask", IX86_BUILTIN_CVTTPH2IBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8HF_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttph2ibsv16hf_mask, "__builtin_ia32_cvttph2ibs256_mask", IX86_BUILTIN_CVTTPH2IBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttph2ibsv32hf_mask, "__builtin_ia32_cvttph2ibs512_mask", IX86_BUILTIN_CVTTPH2IBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttph2iubsv8hf_mask, "__builtin_ia32_cvttph2iubs128_mask", IX86_BUILTIN_CVTTPH2IUBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8HF_V8HI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttph2iubsv16hf_mask, "__builtin_ia32_cvttph2iubs256_mask", IX86_BUILTIN_CVTTPH2IUBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttph2iubsv32hf_mask, "__builtin_ia32_cvttph2iubs512_mask", IX86_BUILTIN_CVTTPH2IUBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttps2ibsv4sf_mask, "__builtin_ia32_cvttps2ibs128_mask", IX86_BUILTIN_CVTTPS2IBS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttps2ibsv8sf_mask, "__builtin_ia32_cvttps2ibs256_mask", IX86_BUILTIN_CVTTPS2IBS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttps2ibsv16sf_mask, "__builtin_ia32_cvttps2ibs512_mask", IX86_BUILTIN_CVTTPS2IBS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttps2iubsv4sf_mask, "__builtin_ia32_cvttps2iubs128_mask", IX86_BUILTIN_CVTTPS2IUBS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttps2iubsv8sf_mask, "__builtin_ia32_cvttps2iubs256_mask", IX86_BUILTIN_CVTTPS2IUBS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttps2iubsv16sf_mask, "__builtin_ia32_cvttps2iubs512_mask", IX86_BUILTIN_CVTTPS2IUBS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2dqsv2df_mask, "__builtin_ia32_cvttpd2dqs128_mask", IX86_BUILTIN_VCVTTPD2DQS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V2DF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2dqsv4df_mask, "__builtin_ia32_cvttpd2dqs256_mask", IX86_BUILTIN_VCVTTPD2DQS256_MASK, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttpd2dqsv8df_mask, "__builtin_ia32_cvttpd2dqs512_mask", IX86_BUILTIN_VCVTTPD2DQS512_MASK, UNKNOWN, (int) V8SI_FTYPE_V8DF_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2qqsv2df_mask, "__builtin_ia32_cvttpd2qqs128_mask", IX86_BUILTIN_VCVTTPD2QQS128_MASK, UNKNOWN, (int) V2DI_FTYPE_V2DF_V2DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2qqsv4df_mask, "__builtin_ia32_cvttpd2qqs256_mask", IX86_BUILTIN_VCVTTPD2QQS256_MASK, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttpd2qqsv8df_mask, "__builtin_ia32_cvttpd2qqs512_mask", IX86_BUILTIN_VCVTTPD2QQS512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8DF_V8DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2udqsv2df_mask, "__builtin_ia32_cvttpd2udqs128_mask", IX86_BUILTIN_VCVTTPD2UDQS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V2DF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2udqsv4df_mask, "__builtin_ia32_cvttpd2udqs256_mask", IX86_BUILTIN_VCVTTPD2UDQS256_MASK, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttpd2udqsv8df_mask, "__builtin_ia32_cvttpd2udqs512_mask", IX86_BUILTIN_VCVTTPD2UDQS512_MASK, UNKNOWN, (int) V8SI_FTYPE_V8DF_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2uqqsv2df_mask, "__builtin_ia32_cvttpd2uqqs128_mask", IX86_BUILTIN_VCVTTPD2UQQS128_MASK, UNKNOWN, (int) V2DI_FTYPE_V2DF_V2DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2uqqsv4df_mask, "__builtin_ia32_cvttpd2uqqs256_mask", IX86_BUILTIN_VCVTTPD2UQQS256_MASK, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttpd2uqqsv8df_mask, "__builtin_ia32_cvttpd2uqqs512_mask", IX86_BUILTIN_VCVTTPD2UQQS512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8DF_V8DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2dqsv4sf_mask, "__builtin_ia32_cvttps2dqs128_mask", IX86_BUILTIN_VCVTTPS2DQS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2dqsv8sf_mask, "__builtin_ia32_cvttps2dqs256_mask", IX86_BUILTIN_VCVTTPS2DQS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttps2dqsv16sf_mask, "__builtin_ia32_cvttps2dqs512_mask", IX86_BUILTIN_VCVTTPS2DQS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2qqsv2di_mask, "__builtin_ia32_cvttps2qqs128_mask", IX86_BUILTIN_VCVTTPS2QQS128_MASK, UNKNOWN, (int) V2DI_FTYPE_V4SF_V2DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2qqsv4di_mask, "__builtin_ia32_cvttps2qqs256_mask", IX86_BUILTIN_VCVTTPS2QQS256_MASK, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttps2qqsv8di_mask, "__builtin_ia32_cvttps2qqs512_mask", IX86_BUILTIN_VCVTTPS2QQS512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8SF_V8DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2udqsv4sf_mask, "__builtin_ia32_cvttps2udqs128_mask", IX86_BUILTIN_VCVTTPS2UDQS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2udqsv8sf_mask, "__builtin_ia32_cvttps2udqs256_mask", IX86_BUILTIN_VCVTTPS2UDQS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttps2udqsv16sf_mask, "__builtin_ia32_cvttps2udqs512_mask", IX86_BUILTIN_VCVTTPS2UDQS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2uqqsv2di_mask, "__builtin_ia32_cvttps2uqqs128_mask", IX86_BUILTIN_VCVTTPS2UQQS128_MASK, UNKNOWN, (int) V2DI_FTYPE_V4SF_V2DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2uqqsv4di_mask, "__builtin_ia32_cvttps2uqqs256_mask", IX86_BUILTIN_VCVTTPS2UQQS256_MASK, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttps2uqqsv8di_mask, "__builtin_ia32_cvttps2uqqs512_mask", IX86_BUILTIN_VCVTTPS2UQQS512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8SF_V8DI_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxbf16_v8bf_mask, "__builtin_ia32_minmaxbf16128_mask", IX86_BUILTIN_MINMAXBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_INT_V8BF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxbf16_v16bf_mask, "__builtin_ia32_minmaxbf16256_mask", IX86_BUILTIN_MINMAXBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_INT_V16BF_UHI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_minmaxbf16_v32bf_mask, "__builtin_ia32_minmaxbf16512_mask", IX86_BUILTIN_MINMAXBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_INT_V32BF_USI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxpv2df_mask, "__builtin_ia32_minmaxpd128_mask", IX86_BUILTIN_MINMAXPD128_MASK, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxpv8hf_mask, "__builtin_ia32_minmaxph128_mask", IX86_BUILTIN_MINMAXPH128_MASK, UNKNOWN, (int) V8HF_FTYPE_V8HF_V8HF_INT_V8HF_UQI)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxpv4sf_mask, "__builtin_ia32_minmaxps128_mask", IX86_BUILTIN_MINMAXPS128_MASK, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v16si, "__builtin_ia32_vpdpbssd512", IX86_BUILTIN_VPDPBSSDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v16si, "__builtin_ia32_vpdpbssds512", IX86_BUILTIN_VPDPBSSDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v16si, "__builtin_ia32_vpdpbsud512", IX86_BUILTIN_VPDPBSUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v16si, "__builtin_ia32_vpdpbsuds512", IX86_BUILTIN_VPDPBSUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v16si, "__builtin_ia32_vpdpbuud512", IX86_BUILTIN_VPDPBUUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v16si, "__builtin_ia32_vpdpbuuds512", IX86_BUILTIN_VPDPBUUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v16si_mask, "__builtin_ia32_vpdpbssd_v16si_mask", IX86_BUILTIN_VPDPBSSDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v16si_maskz, "__builtin_ia32_vpdpbssd_v16si_maskz", IX86_BUILTIN_VPDPBSSDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v16si_mask, "__builtin_ia32_vpdpbssds_v16si_mask", IX86_BUILTIN_VPDPBSSDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v16si_maskz, "__builtin_ia32_vpdpbssds_v16si_maskz", IX86_BUILTIN_VPDPBSSDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v16si_mask, "__builtin_ia32_vpdpbsud_v16si_mask", IX86_BUILTIN_VPDPBSUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v16si_maskz, "__builtin_ia32_vpdpbsud_v16si_maskz", IX86_BUILTIN_VPDPBSUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v16si_mask, "__builtin_ia32_vpdpbsuds_v16si_mask", IX86_BUILTIN_VPDPBSUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v16si_maskz, "__builtin_ia32_vpdpbsuds_v16si_maskz", IX86_BUILTIN_VPDPBSUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v16si_mask, "__builtin_ia32_vpdpbuud_v16si_mask", IX86_BUILTIN_VPDPBUUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v16si_maskz, "__builtin_ia32_vpdpbuud_v16si_maskz", IX86_BUILTIN_VPDPBUUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v16si_mask, "__builtin_ia32_vpdpbuuds_v16si_mask", IX86_BUILTIN_VPDPBUUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v16si_maskz, "__builtin_ia32_vpdpbuuds_v16si_maskz", IX86_BUILTIN_VPDPBUUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v8si_mask, "__builtin_ia32_vpdpbssd_v8si_mask", IX86_BUILTIN_VPDPBSSDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v8si_maskz, "__builtin_ia32_vpdpbssd_v8si_maskz", IX86_BUILTIN_VPDPBSSDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v8si_mask, "__builtin_ia32_vpdpbssds_v8si_mask", IX86_BUILTIN_VPDPBSSDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v8si_maskz, "__builtin_ia32_vpdpbssds_v8si_maskz", IX86_BUILTIN_VPDPBSSDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v8si_mask, "__builtin_ia32_vpdpbsud_v8si_mask", IX86_BUILTIN_VPDPBSUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v8si_maskz, "__builtin_ia32_vpdpbsud_v8si_maskz", IX86_BUILTIN_VPDPBSUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v8si_mask, "__builtin_ia32_vpdpbsuds_v8si_mask", IX86_BUILTIN_VPDPBSUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v8si_maskz, "__builtin_ia32_vpdpbsuds_v8si_maskz", IX86_BUILTIN_VPDPBSUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v8si_mask, "__builtin_ia32_vpdpbuud_v8si_mask", IX86_BUILTIN_VPDPBUUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v8si_maskz, "__builtin_ia32_vpdpbuud_v8si_maskz", IX86_BUILTIN_VPDPBUUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v8si_mask, "__builtin_ia32_vpdpbuuds_v8si_mask", IX86_BUILTIN_VPDPBUUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v8si_maskz, "__builtin_ia32_vpdpbuuds_v8si_maskz", IX86_BUILTIN_VPDPBUUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v4si_mask, "__builtin_ia32_vpdpbssd_v4si_mask", IX86_BUILTIN_VPDPBSSDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssd_v4si_maskz, "__builtin_ia32_vpdpbssd_v4si_maskz", IX86_BUILTIN_VPDPBSSDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v4si_mask, "__builtin_ia32_vpdpbssds_v4si_mask", IX86_BUILTIN_VPDPBSSDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbssds_v4si_maskz, "__builtin_ia32_vpdpbssds_v4si_maskz", IX86_BUILTIN_VPDPBSSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v4si_mask, "__builtin_ia32_vpdpbsud_v4si_mask", IX86_BUILTIN_VPDPBSUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsud_v4si_maskz, "__builtin_ia32_vpdpbsud_v4si_maskz", IX86_BUILTIN_VPDPBSUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v4si_mask, "__builtin_ia32_vpdpbsuds_v4si_mask", IX86_BUILTIN_VPDPBSUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbsuds_v4si_maskz, "__builtin_ia32_vpdpbsuds_v4si_maskz", IX86_BUILTIN_VPDPBSUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v4si_mask, "__builtin_ia32_vpdpbuud_v4si_mask", IX86_BUILTIN_VPDPBUUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuud_v4si_maskz, "__builtin_ia32_vpdpbuud_v4si_maskz", IX86_BUILTIN_VPDPBUUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v4si_mask, "__builtin_ia32_vpdpbuuds_v4si_mask", IX86_BUILTIN_VPDPBUUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpbuuds_v4si_maskz, "__builtin_ia32_vpdpbuuds_v4si_maskz", IX86_BUILTIN_VPDPBUUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v16si, "__builtin_ia32_vpdpwsud512", IX86_BUILTIN_VPDPWSUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v16si, "__builtin_ia32_vpdpwsuds512", IX86_BUILTIN_VPDPWSUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v16si, "__builtin_ia32_vpdpwusd512", IX86_BUILTIN_VPDPWUSDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v16si, "__builtin_ia32_vpdpwusds512", IX86_BUILTIN_VPDPWUSDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v16si, "__builtin_ia32_vpdpwuud512", IX86_BUILTIN_VPDPWUUDV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v16si, "__builtin_ia32_vpdpwuuds512", IX86_BUILTIN_VPDPWUUDSV16SI, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v16si_mask, "__builtin_ia32_vpdpwsud_v16si_mask", IX86_BUILTIN_VPDPWSUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v16si_maskz, "__builtin_ia32_vpdpwsud_v16si_maskz", IX86_BUILTIN_VPDPWSUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v16si_mask, "__builtin_ia32_vpdpwsuds_v16si_mask", IX86_BUILTIN_VPDPWSUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v16si_maskz, "__builtin_ia32_vpdpwsuds_v16si_maskz", IX86_BUILTIN_VPDPWSUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v16si_mask, "__builtin_ia32_vpdpwusd_v16si_mask", IX86_BUILTIN_VPDPWUSDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v16si_maskz, "__builtin_ia32_vpdpwusd_v16si_maskz", IX86_BUILTIN_VPDPWUSDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v16si_mask, "__builtin_ia32_vpdpwusds_v16si_mask", IX86_BUILTIN_VPDPWUSDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v16si_maskz, "__builtin_ia32_vpdpwusds_v16si_maskz", IX86_BUILTIN_VPDPWUSDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v16si_mask, "__builtin_ia32_vpdpwuud_v16si_mask", IX86_BUILTIN_VPDPWUUDV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v16si_maskz, "__builtin_ia32_vpdpwuud_v16si_maskz", IX86_BUILTIN_VPDPWUUDV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v16si_mask, "__builtin_ia32_vpdpwuuds_v16si_mask", IX86_BUILTIN_VPDPWUUDSV16SI_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v16si_maskz, "__builtin_ia32_vpdpwuuds_v16si_maskz", IX86_BUILTIN_VPDPWUUDSV16SI_MASKZ, UNKNOWN, (int) V16SI_FTYPE_V16SI_V16SI_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v8si_mask, "__builtin_ia32_vpdpwsud_v8si_mask", IX86_BUILTIN_VPDPWSUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v8si_maskz, "__builtin_ia32_vpdpwsud_v8si_maskz", IX86_BUILTIN_VPDPWSUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v8si_mask, "__builtin_ia32_vpdpwsuds_v8si_mask", IX86_BUILTIN_VPDPWSUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v8si_maskz, "__builtin_ia32_vpdpwsuds_v8si_maskz", IX86_BUILTIN_VPDPWSUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v8si_mask, "__builtin_ia32_vpdpwusd_v8si_mask", IX86_BUILTIN_VPDPWUSDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v8si_maskz, "__builtin_ia32_vpdpwusd_v8si_maskz", IX86_BUILTIN_VPDPWUSDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v8si_mask, "__builtin_ia32_vpdpwusds_v8si_mask", IX86_BUILTIN_VPDPWUSDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v8si_maskz, "__builtin_ia32_vpdpwusds_v8si_maskz", IX86_BUILTIN_VPDPWUSDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v8si_mask, "__builtin_ia32_vpdpwuud_v8si_mask", IX86_BUILTIN_VPDPWUUDV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v8si_maskz, "__builtin_ia32_vpdpwuud_v8si_maskz", IX86_BUILTIN_VPDPWUUDV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v8si_mask, "__builtin_ia32_vpdpwuuds_v8si_mask", IX86_BUILTIN_VPDPWUUDSV8SI_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v8si_maskz, "__builtin_ia32_vpdpwuuds_v8si_maskz", IX86_BUILTIN_VPDPWUUDSV8SI_MASKZ, UNKNOWN, (int) V8SI_FTYPE_V8SI_V8SI_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v4si_mask, "__builtin_ia32_vpdpwsud_v4si_mask", IX86_BUILTIN_VPDPWSUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsud_v4si_maskz, "__builtin_ia32_vpdpwsud_v4si_maskz", IX86_BUILTIN_VPDPWSUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v4si_mask, "__builtin_ia32_vpdpwsuds_v4si_mask", IX86_BUILTIN_VPDPWSUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwsuds_v4si_maskz, "__builtin_ia32_vpdpwsuds_v4si_maskz", IX86_BUILTIN_VPDPWSUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v4si_mask, "__builtin_ia32_vpdpwusd_v4si_mask", IX86_BUILTIN_VPDPWUSDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusd_v4si_maskz, "__builtin_ia32_vpdpwusd_v4si_maskz", IX86_BUILTIN_VPDPWUSDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v4si_mask, "__builtin_ia32_vpdpwusds_v4si_mask", IX86_BUILTIN_VPDPWUSDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwusds_v4si_maskz, "__builtin_ia32_vpdpwusds_v4si_maskz", IX86_BUILTIN_VPDPWUSDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v4si_mask, "__builtin_ia32_vpdpwuud_v4si_mask", IX86_BUILTIN_VPDPWUUDV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuud_v4si_maskz, "__builtin_ia32_vpdpwuud_v4si_maskz", IX86_BUILTIN_VPDPWUUDV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v4si_mask, "__builtin_ia32_vpdpwuuds_v4si_mask", IX86_BUILTIN_VPDPWUUDSV4SI_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vpdpwuuds_v4si_maskz, "__builtin_ia32_vpdpwuuds_v4si_maskz", IX86_BUILTIN_VPDPWUUDSV4SI_MASKZ, UNKNOWN, (int) V4SI_FTYPE_V4SI_V4SI_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v16sf_mask, "__builtin_ia32_vdpphps512_mask", IX86_BUILTIN_VDPPHPS512_MASK, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_V16SF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v16sf_maskz, "__builtin_ia32_vdpphps512_maskz", IX86_BUILTIN_VDPPHPS512_MASKZ, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_V16SF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v8sf_mask, "__builtin_ia32_vdpphps256_mask", IX86_BUILTIN_VDPPHPS256_MASK, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v8sf_maskz, "__builtin_ia32_vdpphps256_maskz", IX86_BUILTIN_VDPPHPS256_MASKZ, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v4sf_mask, "__builtin_ia32_vdpphps128_mask", IX86_BUILTIN_VDPPHPS128_MASK, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_V4SF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vdpphps_v4sf_maskz, "__builtin_ia32_vdpphps128_maskz", IX86_BUILTIN_VDPPHPS128_MASKZ, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_V4SF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mpsadbw, "__builtin_ia32_mpsadbw512", IX86_BUILTIN_AVX10_2_MPSADBW, UNKNOWN, (int) V64QI_FTYPE_V64QI_V64QI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mpsadbw_mask, "__builtin_ia32_mpsadbw512_mask", IX86_BUILTIN_VMPSADBW_V32HI_MASK, UNKNOWN, (int) V32HI_FTYPE_V64QI_V64QI_INT_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx2_mpsadbw_mask, "__builtin_ia32_mpsadbw256_mask", IX86_BUILTIN_VMPSADBW_V16HI_MASK, UNKNOWN, (int) V16HI_FTYPE_V32QI_V32QI_INT_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_sse4_1_mpsadbw_mask, "__builtin_ia32_mpsadbw128_mask", IX86_BUILTIN_VMPSADBW_V8HI_MASK, UNKNOWN, (int) V8HI_FTYPE_V16QI_V16QI_INT_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvt2ps2phx_v16hf_mask, "__builtin_ia32_vcvt2ps2phx256_mask", IX86_BUILTIN_VCVT2PS2PHX_V16HF_MASK, UNKNOWN, (int) V16HF_FTYPE_V8SF_V8SF_V16HF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvt2ps2phx_v8hf_mask, "__builtin_ia32_vcvt2ps2phx128_mask", IX86_BUILTIN_VCVT2PS2PHX_V8HF_MASK, UNKNOWN, (int) V8HF_FTYPE_V4SF_V4SF_V8HF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8v8hf, "__builtin_ia32_vcvtbiasph2bf8128", IX86_BUILTIN_VCVTBIASPH2BF8128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8v8hf_mask, "__builtin_ia32_vcvtbiasph2bf8128_mask", IX86_BUILTIN_VCVTBIASPH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8v16hf_mask, "__builtin_ia32_vcvtbiasph2bf8256_mask", IX86_BUILTIN_VCVTBIASPH2BF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8v32hf_mask, "__builtin_ia32_vcvtbiasph2bf8512_mask", IX86_BUILTIN_VCVTBIASPH2BF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8sv8hf, "__builtin_ia32_vcvtbiasph2bf8s128", IX86_BUILTIN_VCVTBIASPH2BF8S128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8sv8hf_mask, "__builtin_ia32_vcvtbiasph2bf8s128_mask", IX86_BUILTIN_VCVTBIASPH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8sv16hf_mask, "__builtin_ia32_vcvtbiasph2bf8s256_mask", IX86_BUILTIN_VCVTBIASPH2BF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2bf8sv32hf_mask, "__builtin_ia32_vcvtbiasph2bf8s512_mask", IX86_BUILTIN_VCVTBIASPH2BF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8v8hf, "__builtin_ia32_vcvtbiasph2hf8128", IX86_BUILTIN_VCVTBIASPH2HF8128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8v8hf_mask, "__builtin_ia32_vcvtbiasph2hf8128_mask", IX86_BUILTIN_VCVTBIASPH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8v16hf_mask, "__builtin_ia32_vcvtbiasph2hf8256_mask", IX86_BUILTIN_VCVTBIASPH2HF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8v32hf_mask, "__builtin_ia32_vcvtbiasph2hf8512_mask", IX86_BUILTIN_VCVTBIASPH2HF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8sv8hf, "__builtin_ia32_vcvtbiasph2hf8s128", IX86_BUILTIN_VCVTBIASPH2HF8S128, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8sv8hf_mask, "__builtin_ia32_vcvtbiasph2hf8s128_mask", IX86_BUILTIN_VCVTBIASPH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V16QI_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8sv16hf_mask, "__builtin_ia32_vcvtbiasph2hf8s256_mask", IX86_BUILTIN_VCVTBIASPH2HF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V32QI_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtbiasph2hf8sv32hf_mask, "__builtin_ia32_vcvtbiasph2hf8s512_mask", IX86_BUILTIN_VCVTBIASPH2HF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V64QI_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8v8hf_mask, "__builtin_ia32_vcvt2ph2bf8128_mask", IX86_BUILTIN_VCVT2PH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8v16hf_mask, "__builtin_ia32_vcvt2ph2bf8256_mask", IX86_BUILTIN_VCVT2PH2BF8256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8v32hf_mask, "__builtin_ia32_vcvt2ph2bf8512_mask", IX86_BUILTIN_VCVT2PH2BF8512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8sv8hf_mask, "__builtin_ia32_vcvt2ph2bf8s128_mask", IX86_BUILTIN_VCVT2PH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8sv16hf_mask, "__builtin_ia32_vcvt2ph2bf8s256_mask", IX86_BUILTIN_VCVT2PH2BF8S256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2bf8sv32hf_mask, "__builtin_ia32_vcvt2ph2bf8s512_mask", IX86_BUILTIN_VCVT2PH2BF8S512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8v8hf_mask, "__builtin_ia32_vcvt2ph2hf8128_mask", IX86_BUILTIN_VCVT2PH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8v16hf_mask, "__builtin_ia32_vcvt2ph2hf8256_mask", IX86_BUILTIN_VCVT2PH2HF8256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8v32hf_mask, "__builtin_ia32_vcvt2ph2hf8512_mask", IX86_BUILTIN_VCVT2PH2HF8512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8sv8hf_mask, "__builtin_ia32_vcvt2ph2hf8s128_mask", IX86_BUILTIN_VCVT2PH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V8HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8sv16hf_mask, "__builtin_ia32_vcvt2ph2hf8s256_mask", IX86_BUILTIN_VCVT2PH2HF8S256_MASK, UNKNOWN, (int) V32QI_FTYPE_V16HF_V16HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvt2ph2hf8sv32hf_mask, "__builtin_ia32_vcvt2ph2hf8s512_mask", IX86_BUILTIN_VCVT2PH2HF8S512_MASK, UNKNOWN, (int) V64QI_FTYPE_V32HF_V32HF_V64QI_UDI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8v8hf_mask, "__builtin_ia32_vcvtph2bf8128_mask", IX86_BUILTIN_VCVTPH2BF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8v16hf_mask, "__builtin_ia32_vcvtph2bf8256_mask", IX86_BUILTIN_VCVTPH2BF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8v32hf_mask, "__builtin_ia32_vcvtph2bf8512_mask", IX86_BUILTIN_VCVTPH2BF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8sv8hf_mask, "__builtin_ia32_vcvtph2bf8s128_mask", IX86_BUILTIN_VCVTPH2BF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8sv16hf_mask, "__builtin_ia32_vcvtph2bf8s256_mask", IX86_BUILTIN_VCVTPH2BF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2bf8sv32hf_mask, "__builtin_ia32_vcvtph2bf8s512_mask", IX86_BUILTIN_VCVTPH2BF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8v8hf_mask, "__builtin_ia32_vcvtph2hf8128_mask", IX86_BUILTIN_VCVTPH2HF8128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8v16hf_mask, "__builtin_ia32_vcvtph2hf8256_mask", IX86_BUILTIN_VCVTPH2HF8256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8v32hf_mask, "__builtin_ia32_vcvtph2hf8512_mask", IX86_BUILTIN_VCVTPH2HF8512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8sv8hf_mask, "__builtin_ia32_vcvtph2hf8s128_mask", IX86_BUILTIN_VCVTPH2HF8S128_MASK, UNKNOWN, (int) V16QI_FTYPE_V8HF_V16QI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8sv16hf_mask, "__builtin_ia32_vcvtph2hf8s256_mask", IX86_BUILTIN_VCVTPH2HF8S256_MASK, UNKNOWN, (int) V16QI_FTYPE_V16HF_V16QI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvtph2hf8sv32hf_mask, "__builtin_ia32_vcvtph2hf8s512_mask", IX86_BUILTIN_VCVTPH2HF8S512_MASK, UNKNOWN, (int) V32QI_FTYPE_V32HF_V32QI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvthf82phv8hf_mask, "__builtin_ia32_vcvthf82ph128_mask", IX86_BUILTIN_VCVTHF82PH128_MASK, UNKNOWN, (int) V8HF_FTYPE_V16QI_V8HF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvthf82phv16hf_mask, "__builtin_ia32_vcvthf82ph256_mask", IX86_BUILTIN_VCVTHF82PH256_MASK, UNKNOWN, (int) V16HF_FTYPE_V16QI_V16HF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_vcvthf82phv32hf_mask, "__builtin_ia32_vcvthf82ph512_mask", IX86_BUILTIN_VCVTHF82PH512_MASK, UNKNOWN, (int) V32HF_FTYPE_V32QI_V32HF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v32bf, "__builtin_ia32_addbf16512", IX86_BUILTIN_ADDBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v32bf_mask, "__builtin_ia32_addbf16512_mask", IX86_BUILTIN_ADDBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v16bf, "__builtin_ia32_addbf16256", IX86_BUILTIN_ADDBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v16bf_mask, "__builtin_ia32_addbf16256_mask", IX86_BUILTIN_ADDBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v8bf, "__builtin_ia32_addbf16128", IX86_BUILTIN_ADDBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_addbf16_v8bf_mask, "__builtin_ia32_addbf16128_mask", IX86_BUILTIN_ADDBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_subbf16_v32bf, "__builtin_ia32_subbf16512", IX86_BUILTIN_SUBBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_subbf16_v32bf_mask, "__builtin_ia32_subbf16512_mask", IX86_BUILTIN_SUBBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_subbf16_v16bf, "__builtin_ia32_subbf16256", IX86_BUILTIN_SUBBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_subbf16_v16bf_mask, "__builtin_ia32_subbf16256_mask", IX86_BUILTIN_SUBBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_subbf16_v8bf, "__builtin_ia32_subbf16128", IX86_BUILTIN_SUBBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_subbf16_v8bf_mask, "__builtin_ia32_subbf16128_mask", IX86_BUILTIN_SUBBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mulbf16_v32bf, "__builtin_ia32_mulbf16512", IX86_BUILTIN_MULBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mulbf16_v32bf_mask, "__builtin_ia32_mulbf16512_mask", IX86_BUILTIN_MULBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mulbf16_v16bf, "__builtin_ia32_mulbf16256", IX86_BUILTIN_MULBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mulbf16_v16bf_mask, "__builtin_ia32_mulbf16256_mask", IX86_BUILTIN_MULBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mulbf16_v8bf, "__builtin_ia32_mulbf16128", IX86_BUILTIN_MULBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_mulbf16_v8bf_mask, "__builtin_ia32_mulbf16128_mask", IX86_BUILTIN_MULBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_divbf16_v32bf, "__builtin_ia32_divbf16512", IX86_BUILTIN_DIVBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_divbf16_v32bf_mask, "__builtin_ia32_divbf16512_mask", IX86_BUILTIN_DIVBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_divbf16_v16bf, "__builtin_ia32_divbf16256", IX86_BUILTIN_DIVBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_divbf16_v16bf_mask, "__builtin_ia32_divbf16256_mask", IX86_BUILTIN_DIVBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_divbf16_v8bf, "__builtin_ia32_divbf16128", IX86_BUILTIN_DIVBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_divbf16_v8bf_mask, "__builtin_ia32_divbf16128_mask", IX86_BUILTIN_DIVBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_smaxbf16_v32bf, "__builtin_ia32_maxbf16512", IX86_BUILTIN_MAXBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_smaxbf16_v32bf_mask, "__builtin_ia32_maxbf16512_mask", IX86_BUILTIN_MAXBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_smaxbf16_v16bf, "__builtin_ia32_maxbf16256", IX86_BUILTIN_MAXBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_smaxbf16_v16bf_mask, "__builtin_ia32_maxbf16256_mask", IX86_BUILTIN_MAXBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_smaxbf16_v8bf, "__builtin_ia32_maxbf16128", IX86_BUILTIN_MAXBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_smaxbf16_v8bf_mask, "__builtin_ia32_maxbf16128_mask", IX86_BUILTIN_MAXBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sminbf16_v32bf, "__builtin_ia32_minbf16512", IX86_BUILTIN_MINBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sminbf16_v32bf_mask, "__builtin_ia32_minbf16512_mask", IX86_BUILTIN_MINBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sminbf16_v16bf, "__builtin_ia32_minbf16256", IX86_BUILTIN_MINBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sminbf16_v16bf_mask, "__builtin_ia32_minbf16256_mask", IX86_BUILTIN_MINBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sminbf16_v8bf, "__builtin_ia32_minbf16128", IX86_BUILTIN_MINBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sminbf16_v8bf_mask, "__builtin_ia32_minbf16128_mask", IX86_BUILTIN_MINBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_scalefbf16_v32bf, "__builtin_ia32_scalefbf16512", IX86_BUILTIN_SCALEFBF16512, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_scalefbf16_v32bf_mask, "__builtin_ia32_scalefbf16512_mask", IX86_BUILTIN_SCALEFBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_scalefbf16_v16bf, "__builtin_ia32_scalefbf16256", IX86_BUILTIN_SCALEFBF16256, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_scalefbf16_v16bf_mask, "__builtin_ia32_scalefbf16256_mask", IX86_BUILTIN_SCALEFBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_scalefbf16_v8bf, "__builtin_ia32_scalefbf16128", IX86_BUILTIN_SCALEFBF16128, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_scalefbf16_v8bf_mask, "__builtin_ia32_scalefbf16128_mask", IX86_BUILTIN_SCALEFBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v32bf_mask, "__builtin_ia32_fmaddbf16512_mask", IX86_BUILTIN_FMADDBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v32bf_mask3, "__builtin_ia32_fmaddbf16512_mask3", IX86_BUILTIN_FMADDBF16512_MASK3, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v32bf_maskz, "__builtin_ia32_fmaddbf16512_maskz", IX86_BUILTIN_FMADDBF16512_MASKZ, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v16bf_mask, "__builtin_ia32_fmaddbf16256_mask", IX86_BUILTIN_FMADDBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v16bf_mask3, "__builtin_ia32_fmaddbf16256_mask3", IX86_BUILTIN_FMADDBF16256_MASK3, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v16bf_maskz, "__builtin_ia32_fmaddbf16256_maskz", IX86_BUILTIN_FMADDBF16256_MASKZ, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v8bf_mask, "__builtin_ia32_fmaddbf16128_mask", IX86_BUILTIN_FMADDBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v8bf_mask3, "__builtin_ia32_fmaddbf16128_mask3", IX86_BUILTIN_FMADDBF16128_MASK3, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmaddbf16_v8bf_maskz, "__builtin_ia32_fmaddbf16128_maskz", IX86_BUILTIN_FMADDBF16128_MASKZ, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v32bf_mask, "__builtin_ia32_fmsubbf16512_mask", IX86_BUILTIN_FMSUBBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v32bf_mask3, "__builtin_ia32_fmsubbf16512_mask3", IX86_BUILTIN_FMSUBBF16512_MASK3, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v32bf_maskz, "__builtin_ia32_fmsubbf16512_maskz", IX86_BUILTIN_FMSUBBF16512_MASKZ, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v16bf_mask, "__builtin_ia32_fmsubbf16256_mask", IX86_BUILTIN_FMSUBBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v16bf_mask3, "__builtin_ia32_fmsubbf16256_mask3", IX86_BUILTIN_FMSUBBF16256_MASK3, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v16bf_maskz, "__builtin_ia32_fmsubbf16256_maskz", IX86_BUILTIN_FMSUBBF16256_MASKZ, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v8bf_mask, "__builtin_ia32_fmsubbf16128_mask", IX86_BUILTIN_FMSUBBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v8bf_mask3, "__builtin_ia32_fmsubbf16128_mask3", IX86_BUILTIN_FMSUBBF16128_MASK3, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fmsubbf16_v8bf_maskz, "__builtin_ia32_fmsubbf16128_maskz", IX86_BUILTIN_FMSUBBF16128_MASKZ, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v32bf_mask, "__builtin_ia32_fnmaddbf16512_mask", IX86_BUILTIN_FNMADDBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v32bf_mask3, "__builtin_ia32_fnmaddbf16512_mask3", IX86_BUILTIN_FNMADDBF16512_MASK3, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v32bf_maskz, "__builtin_ia32_fnmaddbf16512_maskz", IX86_BUILTIN_FNMADDBF16512_MASKZ, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v16bf_mask, "__builtin_ia32_fnmaddbf16256_mask", IX86_BUILTIN_FNMADDBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v16bf_mask3, "__builtin_ia32_fnmaddbf16256_mask3", IX86_BUILTIN_FNMADDBF16256_MASK3, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v16bf_maskz, "__builtin_ia32_fnmaddbf16256_maskz", IX86_BUILTIN_FNMADDBF16256_MASKZ, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v8bf_mask, "__builtin_ia32_fnmaddbf16128_mask", IX86_BUILTIN_FNMADDBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v8bf_mask3, "__builtin_ia32_fnmaddbf16128_mask3", IX86_BUILTIN_FNMADDBF16128_MASK3, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmaddbf16_v8bf_maskz, "__builtin_ia32_fnmaddbf16128_maskz", IX86_BUILTIN_FNMADDBF16128_MASKZ, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v32bf_mask, "__builtin_ia32_fnmsubbf16512_mask", IX86_BUILTIN_FNMSUBBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v32bf_mask3, "__builtin_ia32_fnmsubbf16512_mask3", IX86_BUILTIN_FNMSUBBF16512_MASK3, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v32bf_maskz, "__builtin_ia32_fnmsubbf16512_maskz", IX86_BUILTIN_FNMSUBBF16512_MASKZ, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v16bf_mask, "__builtin_ia32_fnmsubbf16256_mask", IX86_BUILTIN_FNMSUBBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v16bf_mask3, "__builtin_ia32_fnmsubbf16256_mask3", IX86_BUILTIN_FNMSUBBF16256_MASK3, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v16bf_maskz, "__builtin_ia32_fnmsubbf16256_maskz", IX86_BUILTIN_FNMSUBBF16256_MASKZ, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v8bf_mask, "__builtin_ia32_fnmsubbf16128_mask", IX86_BUILTIN_FNMSUBBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v8bf_mask3, "__builtin_ia32_fnmsubbf16128_mask3", IX86_BUILTIN_FNMSUBBF16128_MASK3, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fnmsubbf16_v8bf_maskz, "__builtin_ia32_fnmsubbf16128_maskz", IX86_BUILTIN_FNMSUBBF16128_MASKZ, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rsqrtbf16_v32bf_mask, "__builtin_ia32_rsqrtbf16512_mask", IX86_BUILTIN_RSQRTBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rsqrtbf16_v16bf_mask, "__builtin_ia32_rsqrtbf16256_mask", IX86_BUILTIN_RSQRTBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rsqrtbf16_v8bf_mask, "__builtin_ia32_rsqrtbf16128_mask", IX86_BUILTIN_RSQRTBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sqrtbf16_v32bf_mask, "__builtin_ia32_sqrtbf16512_mask", IX86_BUILTIN_SQRTBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sqrtbf16_v16bf_mask, "__builtin_ia32_sqrtbf16256_mask", IX86_BUILTIN_SQRTBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_sqrtbf16_v8bf_mask, "__builtin_ia32_sqrtbf16128_mask", IX86_BUILTIN_SQRTBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rcpbf16_v32bf_mask, "__builtin_ia32_rcpbf16512_mask", IX86_BUILTIN_RCPBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rcpbf16_v16bf_mask, "__builtin_ia32_rcpbf16256_mask", IX86_BUILTIN_RCPBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rcpbf16_v8bf_mask, "__builtin_ia32_rcpbf16128_mask", IX86_BUILTIN_RCPBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_getexpbf16_v32bf_mask, "__builtin_ia32_getexpbf16512_mask", IX86_BUILTIN_GETEXPBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_getexpbf16_v16bf_mask, "__builtin_ia32_getexpbf16256_mask", IX86_BUILTIN_GETEXPBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_getexpbf16_v8bf_mask, "__builtin_ia32_getexpbf16128_mask", IX86_BUILTIN_GETEXPBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rndscalebf16_v32bf_mask, "__builtin_ia32_rndscalebf16512_mask", IX86_BUILTIN_RNDSCALEBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_INT_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rndscalebf16_v16bf_mask, "__builtin_ia32_rndscalebf16256_mask", IX86_BUILTIN_RNDSCALEBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_INT_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_rndscalebf16_v8bf_mask, "__builtin_ia32_rndscalebf16128_mask", IX86_BUILTIN_RNDSCALEBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_INT_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_reducebf16_v32bf_mask, "__builtin_ia32_reducebf16512_mask", IX86_BUILTIN_REDUCEBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_INT_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_reducebf16_v16bf_mask, "__builtin_ia32_reducebf16256_mask", IX86_BUILTIN_REDUCEBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_INT_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_reducebf16_v8bf_mask, "__builtin_ia32_reducebf16128_mask", IX86_BUILTIN_REDUCEBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_INT_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_getmantbf16_v32bf_mask, "__builtin_ia32_getmantbf16512_mask", IX86_BUILTIN_GETMANTBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_INT_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_getmantbf16_v16bf_mask, "__builtin_ia32_getmantbf16256_mask", IX86_BUILTIN_GETMANTBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_INT_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_getmantbf16_v8bf_mask, "__builtin_ia32_getmantbf16128_mask", IX86_BUILTIN_GETMANTBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_INT_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fpclassbf16_v32bf_mask, "__builtin_ia32_fpclassbf16512_mask", IX86_BUILTIN_FPCLASSBF16512_MASK, UNKNOWN, (int) SI_FTYPE_V32BF_INT_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fpclassbf16_v16bf_mask, "__builtin_ia32_fpclassbf16256_mask", IX86_BUILTIN_FPCLASSBF16256_MASK, UNKNOWN, (int) HI_FTYPE_V16BF_INT_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_fpclassbf16_v8bf_mask, "__builtin_ia32_fpclassbf16128_mask", IX86_BUILTIN_FPCLASSBF16128_MASK, UNKNOWN, (int) QI_FTYPE_V8BF_INT_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cmpbf16_v32bf_mask, "__builtin_ia32_cmpbf16512_mask", IX86_BUILTIN_CMPBF16512_MASK, UNKNOWN, (int) USI_FTYPE_V32BF_V32BF_INT_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cmpbf16_v16bf_mask, "__builtin_ia32_cmpbf16256_mask", IX86_BUILTIN_CMPBF16256_MASK, UNKNOWN, (int) UHI_FTYPE_V16BF_V16BF_INT_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cmpbf16_v8bf_mask, "__builtin_ia32_cmpbf16128_mask", IX86_BUILTIN_CMPBF16128_MASK, UNKNOWN, (int) UQI_FTYPE_V8BF_V8BF_INT_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16eq", IX86_BUILTIN_VCOMISBF16EQ, EQ, (int) INT_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16gt", IX86_BUILTIN_VCOMISBF16GT, GT, (int) INT_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16ge", IX86_BUILTIN_VCOMISBF16GE, GE, (int) INT_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16le", IX86_BUILTIN_VCOMISBF16LE, LE, (int) INT_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16lt", IX86_BUILTIN_VCOMISBF16LT, LT, (int) INT_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_comisbf16_v8bf, "__builtin_ia32_vcomisbf16neq", IX86_BUILTIN_VCOMISBF16NE, NE, (int) INT_FTYPE_V8BF_V8BF)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtbf162ibsv8bf_mask, "__builtin_ia32_cvtbf162ibs128_mask", IX86_BUILTIN_CVTBF162IBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8BF_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtbf162ibsv16bf_mask, "__builtin_ia32_cvtbf162ibs256_mask", IX86_BUILTIN_CVTBF162IBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16BF_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtbf162ibsv32bf_mask, "__builtin_ia32_cvtbf162ibs512_mask", IX86_BUILTIN_CVTBF162IBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32BF_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtbf162iubsv8bf_mask, "__builtin_ia32_cvtbf162iubs128_mask", IX86_BUILTIN_CVTBF162IUBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8BF_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtbf162iubsv16bf_mask, "__builtin_ia32_cvtbf162iubs256_mask", IX86_BUILTIN_CVTBF162IUBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16BF_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtbf162iubsv32bf_mask, "__builtin_ia32_cvtbf162iubs512_mask", IX86_BUILTIN_CVTBF162IUBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32BF_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2ibsv8hf_mask, "__builtin_ia32_cvtph2ibs128_mask", IX86_BUILTIN_CVTPH2IBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8HF_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2ibsv16hf_mask, "__builtin_ia32_cvtph2ibs256_mask", IX86_BUILTIN_CVTPH2IBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2ibsv32hf_mask, "__builtin_ia32_cvtph2ibs512_mask", IX86_BUILTIN_CVTPH2IBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2iubsv8hf_mask, "__builtin_ia32_cvtph2iubs128_mask", IX86_BUILTIN_CVTPH2IUBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8HF_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2iubsv16hf_mask, "__builtin_ia32_cvtph2iubs256_mask", IX86_BUILTIN_CVTPH2IUBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2iubsv32hf_mask, "__builtin_ia32_cvtph2iubs512_mask", IX86_BUILTIN_CVTPH2IUBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2ibsv4sf_mask, "__builtin_ia32_cvtps2ibs128_mask", IX86_BUILTIN_CVTPS2IBS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2ibsv8sf_mask, "__builtin_ia32_cvtps2ibs256_mask", IX86_BUILTIN_CVTPS2IBS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2ibsv16sf_mask, "__builtin_ia32_cvtps2ibs512_mask", IX86_BUILTIN_CVTPS2IBS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2iubsv4sf_mask, "__builtin_ia32_cvtps2iubs128_mask", IX86_BUILTIN_CVTPS2IUBS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2iubsv8sf_mask, "__builtin_ia32_cvtps2iubs256_mask", IX86_BUILTIN_CVTPS2IUBS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2iubsv16sf_mask, "__builtin_ia32_cvtps2iubs512_mask", IX86_BUILTIN_CVTPS2IUBS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttbf162ibsv8bf_mask, "__builtin_ia32_cvttbf162ibs128_mask", IX86_BUILTIN_CVTTBF162IBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8BF_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttbf162ibsv16bf_mask, "__builtin_ia32_cvttbf162ibs256_mask", IX86_BUILTIN_CVTTBF162IBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16BF_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttbf162ibsv32bf_mask, "__builtin_ia32_cvttbf162ibs512_mask", IX86_BUILTIN_CVTTBF162IBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32BF_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttbf162iubsv8bf_mask, "__builtin_ia32_cvttbf162iubs128_mask", IX86_BUILTIN_CVTTBF162IUBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8BF_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttbf162iubsv16bf_mask, "__builtin_ia32_cvttbf162iubs256_mask", IX86_BUILTIN_CVTTBF162IUBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16BF_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttbf162iubsv32bf_mask, "__builtin_ia32_cvttbf162iubs512_mask", IX86_BUILTIN_CVTTBF162IUBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32BF_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttph2ibsv8hf_mask, "__builtin_ia32_cvttph2ibs128_mask", IX86_BUILTIN_CVTTPH2IBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8HF_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttph2ibsv16hf_mask, "__builtin_ia32_cvttph2ibs256_mask", IX86_BUILTIN_CVTTPH2IBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttph2ibsv32hf_mask, "__builtin_ia32_cvttph2ibs512_mask", IX86_BUILTIN_CVTTPH2IBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttph2iubsv8hf_mask, "__builtin_ia32_cvttph2iubs128_mask", IX86_BUILTIN_CVTTPH2IUBS128_MASK, UNKNOWN, (int) V8HI_FTYPE_V8HF_V8HI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttph2iubsv16hf_mask, "__builtin_ia32_cvttph2iubs256_mask", IX86_BUILTIN_CVTTPH2IUBS256_MASK, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttph2iubsv32hf_mask, "__builtin_ia32_cvttph2iubs512_mask", IX86_BUILTIN_CVTTPH2IUBS512_MASK, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttps2ibsv4sf_mask, "__builtin_ia32_cvttps2ibs128_mask", IX86_BUILTIN_CVTTPS2IBS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttps2ibsv8sf_mask, "__builtin_ia32_cvttps2ibs256_mask", IX86_BUILTIN_CVTTPS2IBS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttps2ibsv16sf_mask, "__builtin_ia32_cvttps2ibs512_mask", IX86_BUILTIN_CVTTPS2IBS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttps2iubsv4sf_mask, "__builtin_ia32_cvttps2iubs128_mask", IX86_BUILTIN_CVTTPS2IUBS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttps2iubsv8sf_mask, "__builtin_ia32_cvttps2iubs256_mask", IX86_BUILTIN_CVTTPS2IUBS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttps2iubsv16sf_mask, "__builtin_ia32_cvttps2iubs512_mask", IX86_BUILTIN_CVTTPS2IUBS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2dqsv2df_mask, "__builtin_ia32_cvttpd2dqs128_mask", IX86_BUILTIN_VCVTTPD2DQS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V2DF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2dqsv4df_mask, "__builtin_ia32_cvttpd2dqs256_mask", IX86_BUILTIN_VCVTTPD2DQS256_MASK, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2dqsv8df_mask, "__builtin_ia32_cvttpd2dqs512_mask", IX86_BUILTIN_VCVTTPD2DQS512_MASK, UNKNOWN, (int) V8SI_FTYPE_V8DF_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2qqsv2df_mask, "__builtin_ia32_cvttpd2qqs128_mask", IX86_BUILTIN_VCVTTPD2QQS128_MASK, UNKNOWN, (int) V2DI_FTYPE_V2DF_V2DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2qqsv4df_mask, "__builtin_ia32_cvttpd2qqs256_mask", IX86_BUILTIN_VCVTTPD2QQS256_MASK, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2qqsv8df_mask, "__builtin_ia32_cvttpd2qqs512_mask", IX86_BUILTIN_VCVTTPD2QQS512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8DF_V8DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2udqsv2df_mask, "__builtin_ia32_cvttpd2udqs128_mask", IX86_BUILTIN_VCVTTPD2UDQS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V2DF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2udqsv4df_mask, "__builtin_ia32_cvttpd2udqs256_mask", IX86_BUILTIN_VCVTTPD2UDQS256_MASK, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2udqsv8df_mask, "__builtin_ia32_cvttpd2udqs512_mask", IX86_BUILTIN_VCVTTPD2UDQS512_MASK, UNKNOWN, (int) V8SI_FTYPE_V8DF_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2uqqsv2df_mask, "__builtin_ia32_cvttpd2uqqs128_mask", IX86_BUILTIN_VCVTTPD2UQQS128_MASK, UNKNOWN, (int) V2DI_FTYPE_V2DF_V2DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2uqqsv4df_mask, "__builtin_ia32_cvttpd2uqqs256_mask", IX86_BUILTIN_VCVTTPD2UQQS256_MASK, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2uqqsv8df_mask, "__builtin_ia32_cvttpd2uqqs512_mask", IX86_BUILTIN_VCVTTPD2UQQS512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8DF_V8DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2dqsv4sf_mask, "__builtin_ia32_cvttps2dqs128_mask", IX86_BUILTIN_VCVTTPS2DQS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2dqsv8sf_mask, "__builtin_ia32_cvttps2dqs256_mask", IX86_BUILTIN_VCVTTPS2DQS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2dqsv16sf_mask, "__builtin_ia32_cvttps2dqs512_mask", IX86_BUILTIN_VCVTTPS2DQS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2qqsv2di_mask, "__builtin_ia32_cvttps2qqs128_mask", IX86_BUILTIN_VCVTTPS2QQS128_MASK, UNKNOWN, (int) V2DI_FTYPE_V4SF_V2DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2qqsv4di_mask, "__builtin_ia32_cvttps2qqs256_mask", IX86_BUILTIN_VCVTTPS2QQS256_MASK, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2qqsv8di_mask, "__builtin_ia32_cvttps2qqs512_mask", IX86_BUILTIN_VCVTTPS2QQS512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8SF_V8DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2udqsv4sf_mask, "__builtin_ia32_cvttps2udqs128_mask", IX86_BUILTIN_VCVTTPS2UDQS128_MASK, UNKNOWN, (int) V4SI_FTYPE_V4SF_V4SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2udqsv8sf_mask, "__builtin_ia32_cvttps2udqs256_mask", IX86_BUILTIN_VCVTTPS2UDQS256_MASK, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2udqsv16sf_mask, "__builtin_ia32_cvttps2udqs512_mask", IX86_BUILTIN_VCVTTPS2UDQS512_MASK, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2uqqsv2di_mask, "__builtin_ia32_cvttps2uqqs128_mask", IX86_BUILTIN_VCVTTPS2UQQS128_MASK, UNKNOWN, (int) V2DI_FTYPE_V4SF_V2DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2uqqsv4di_mask, "__builtin_ia32_cvttps2uqqs256_mask", IX86_BUILTIN_VCVTTPS2UQQS256_MASK, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2uqqsv8di_mask, "__builtin_ia32_cvttps2uqqs512_mask", IX86_BUILTIN_VCVTTPS2UQQS512_MASK, UNKNOWN, (int) V8DI_FTYPE_V8SF_V8DI_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxbf16_v8bf_mask, "__builtin_ia32_minmaxbf16128_mask", IX86_BUILTIN_MINMAXBF16128_MASK, UNKNOWN, (int) V8BF_FTYPE_V8BF_V8BF_INT_V8BF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxbf16_v16bf_mask, "__builtin_ia32_minmaxbf16256_mask", IX86_BUILTIN_MINMAXBF16256_MASK, UNKNOWN, (int) V16BF_FTYPE_V16BF_V16BF_INT_V16BF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxbf16_v32bf_mask, "__builtin_ia32_minmaxbf16512_mask", IX86_BUILTIN_MINMAXBF16512_MASK, UNKNOWN, (int) V32BF_FTYPE_V32BF_V32BF_INT_V32BF_USI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv4df_mask, "__builtin_ia32_minmaxpd256_mask", IX86_BUILTIN_MINMAXPD256_MASK, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_INT_V4DF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv16hf_mask, "__builtin_ia32_minmaxph256_mask", IX86_BUILTIN_MINMAXPH256_MASK, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_INT_V16HF_UHI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv8sf_mask, "__builtin_ia32_minmaxps256_mask", IX86_BUILTIN_MINMAXPS256_MASK, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_INT_V8SF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv2df_mask, "__builtin_ia32_minmaxpd128_mask", IX86_BUILTIN_MINMAXPD128_MASK, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv8hf_mask, "__builtin_ia32_minmaxph128_mask", IX86_BUILTIN_MINMAXPH128_MASK, UNKNOWN, (int) V8HF_FTYPE_V8HF_V8HF_INT_V8HF_UQI)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv4sf_mask, "__builtin_ia32_minmaxps128_mask", IX86_BUILTIN_MINMAXPS128_MASK, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI)
/* Builtins with rounding support. */
BDESC_END (ARGS, ROUND_ARGS)
@@ -3656,215 +3660,37 @@ BDESC (0, OPTION_MASK_ISA2_AVX512FP16, CODE_FOR_avx512fp16_fmulcsh_v8hf_round, "
BDESC (0, OPTION_MASK_ISA2_AVX512FP16, CODE_FOR_avx512fp16_fmulcsh_v8hf_mask_round, "__builtin_ia32_vfmulcsh_mask_round", IX86_BUILTIN_VFMULCSH_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V8HF_V8HF_V8HF_UQI_INT)
/* AVX10.2. */
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_addv4df3_mask_round, "__builtin_ia32_addpd256_mask_round", IX86_BUILTIN_ADDPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_addv16hf3_mask_round, "__builtin_ia32_addph256_mask_round", IX86_BUILTIN_ADDPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_addv8sf3_mask_round, "__builtin_ia32_addps256_mask_round", IX86_BUILTIN_ADDPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_cmpv4df3_mask_round, "__builtin_ia32_cmppd256_mask_round", IX86_BUILTIN_CMPPD256_MASK_ROUND, UNKNOWN, (int) UQI_FTYPE_V4DF_V4DF_INT_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_cmpv16hf3_mask_round, "__builtin_ia32_cmpph256_mask_round", IX86_BUILTIN_CMPPH256_MASK_ROUND, UNKNOWN, (int) UHI_FTYPE_V16HF_V16HF_INT_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_cmpv8sf3_mask_round, "__builtin_ia32_cmpps256_mask_round", IX86_BUILTIN_CMPPS256_MASK_ROUND, UNKNOWN, (int) UQI_FTYPE_V8SF_V8SF_INT_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtdq2ph_v8si_mask_round, "__builtin_ia32_vcvtdq2ph256_mask_round", IX86_BUILTIN_VCVTDQ2PH256_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V8SI_V8HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_floatv8siv8sf2_mask_round, "__builtin_ia32_cvtdq2ps256_mask_round", IX86_BUILTIN_VCVTDQ2PS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SI_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtpd2ph_v4df_mask_round, "__builtin_ia32_vcvtpd2ph256_mask_round", IX86_BUILTIN_VCVTPD2PH256_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V4DF_V8HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx_cvtpd2ps256_mask_round, "__builtin_ia32_cvtpd2ps256_mask_round", IX86_BUILTIN_CVTPD2PS256_MASK_ROUND, UNKNOWN, (int) V4SF_FTYPE_V4DF_V4SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx_cvtpd2dq256_mask_round, "__builtin_ia32_cvtpd2dq256_mask_round", IX86_BUILTIN_CVTPD2DQ256_MASK_ROUND, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_fix_notruncv4dfv4di2_mask_round, "__builtin_ia32_cvtpd2qq256_mask_round", IX86_BUILTIN_CVTPD2QQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_fixuns_notruncv4dfv4si2_mask_round, "__builtin_ia32_cvtpd2udq256_mask_round", IX86_BUILTIN_CVTPD2UDQ256_MASK_ROUND, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_fixuns_notruncv4dfv4di2_mask_round, "__builtin_ia32_cvtpd2uqq256_mask_round", IX86_BUILTIN_CVTPD2UQQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtph2dq_v8si_mask_round, "__builtin_ia32_vcvtph2dq256_mask_round", IX86_BUILTIN_VCVTPH2DQ256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8HF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_float_extend_phv4df2_mask_round, "__builtin_ia32_vcvtph2pd256_mask_round", IX86_BUILTIN_VCVTPH2PD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V8HF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_vcvtph2ps256_mask_round, "__builtin_ia32_vcvtph2ps256_mask_round", IX86_BUILTIN_VCVTPH2PS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8HF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_float_extend_phv8sf2_mask_round, "__builtin_ia32_vcvtph2psx256_mask_round", IX86_BUILTIN_VCVTPH2PSX256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8HF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtph2qq_v4di_mask_round, "__builtin_ia32_vcvtph2qq256_mask_round", IX86_BUILTIN_VCVTPH2QQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V8HF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtph2udq_v8si_mask_round, "__builtin_ia32_vcvtph2udq256_mask_round", IX86_BUILTIN_VCVTPH2UDQ256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8HF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtph2uqq_v4di_mask_round, "__builtin_ia32_vcvtph2uqq256_mask_round", IX86_BUILTIN_VCVTPH2UQQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V8HF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtph2uw_v16hi_mask_round, "__builtin_ia32_vcvtph2uw256_mask_round", IX86_BUILTIN_VCVTPH2UW256_MASK_ROUND, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtph2w_v16hi_mask_round, "__builtin_ia32_vcvtph2w256_mask_round", IX86_BUILTIN_VCVTPH2W256_MASK_ROUND, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx_cvtps2pd256_mask_round, "__builtin_ia32_vcvtps2pd256_mask_round", IX86_BUILTIN_VCVTPS2PD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4SF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtps2ph_v8sf_mask_round, "__builtin_ia32_vcvtps2phx256_mask_round", IX86_BUILTIN_VCVTPS2PHX256_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V8SF_V8HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx_fix_notruncv8sfv8si_mask_round, "__builtin_ia32_vcvtps2dq256_mask_round", IX86_BUILTIN_VCVTPS2DQ256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512dq_cvtps2qqv4di_mask_round, "__builtin_ia32_cvtps2qq256_mask_round", IX86_BUILTIN_VCVTPS2QQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fixuns_notruncv8sfv8si_mask_round, "__builtin_ia32_cvtps2udq256_mask_round", IX86_BUILTIN_VCVTPS2UDQ256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512dq_cvtps2uqqv4di_mask_round, "__builtin_ia32_cvtps2uqq256_mask_round", IX86_BUILTIN_VCVTPS2UQQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_floatv4div4df2_mask_round, "__builtin_ia32_cvtqq2pd256_mask_round", IX86_BUILTIN_VCVTQQ2PD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DI_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtqq2ph_v4di_mask_round, "__builtin_ia32_vcvtqq2ph256_mask_round", IX86_BUILTIN_VCVTQQ2PH256_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V4DI_V8HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_floatv4div4sf2_mask_round, "__builtin_ia32_cvtqq2ps256_mask_round", IX86_BUILTIN_VCVTQQ2PS256_MASK_ROUND, UNKNOWN, (int) V4SF_FTYPE_V4DI_V4SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_fix_truncv4dfv4si2_mask_round, "__builtin_ia32_cvttpd2dq256_mask_round", IX86_BUILTIN_VCVTTPD2DQ256_MASK_ROUND, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_fix_truncv4dfv4di2_mask_round, "__builtin_ia32_cvttpd2qq256_mask_round", IX86_BUILTIN_VCVTTPD2QQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_fixuns_truncv4dfv4si2_mask_round, "__builtin_ia32_cvttpd2udq256_mask_round", IX86_BUILTIN_VCVTTPD2UDQ256_MASK_ROUND, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_fixuns_truncv4dfv4di2_mask_round, "__builtin_ia32_cvttpd2uqq256_mask_round", IX86_BUILTIN_VCVTTPD2UQQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_avx512fp16_fix_truncv8si2_mask_round, "__builtin_ia32_vcvttph2dq256_mask_round", IX86_BUILTIN_VCVTTPH2DQ256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8HF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_avx512fp16_fix_truncv4di2_mask_round, "__builtin_ia32_vcvttph2qq256_mask_round", IX86_BUILTIN_VCVTTPH2QQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V8HF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_avx512fp16_fixuns_truncv8si2_mask_round, "__builtin_ia32_vcvttph2udq256_mask_round", IX86_BUILTIN_VCVTTPH2UDQ256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8HF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_avx512fp16_fixuns_truncv4di2_mask_round, "__builtin_ia32_vcvttph2uqq256_mask_round", IX86_BUILTIN_VCVTTPH2UQQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V8HF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_avx512fp16_fixuns_truncv16hi2_mask_round, "__builtin_ia32_vcvttph2uw256_mask_round", IX86_BUILTIN_VCVTTPH2UW256_MASK_ROUND, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_avx512fp16_fix_truncv16hi2_mask_round, "__builtin_ia32_vcvttph2w256_mask_round", IX86_BUILTIN_VCVTTPH2W256_MASK_ROUND, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_fix_truncv8sfv8si2_mask_round, "__builtin_ia32_cvttps2dq256_mask_round", IX86_BUILTIN_VCVTTPS2DQ256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_fix_truncv4sfv4di2_mask_round, "__builtin_ia32_cvttps2qq256_mask_round", IX86_BUILTIN_VCVTTPS2QQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_fixuns_truncv8sfv8si2_mask_round, "__builtin_ia32_cvttps2udq256_mask_round", IX86_BUILTIN_VCVTTPS2UDQ256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_unspec_fixuns_truncv4sfv4di2_mask_round, "__builtin_ia32_cvttps2uqq256_mask_round", IX86_BUILTIN_VCVTTPS2UQQ256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtudq2ph_v8si_mask_round, "__builtin_ia32_vcvtudq2ph256_mask_round", IX86_BUILTIN_VCVTUDQ2PH256_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V8SI_V8HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_floatunsv8siv8sf2_mask_round, "__builtin_ia32_cvtudq2ps256_mask_round", IX86_BUILTIN_VCVTUDQ2PS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SI_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_floatunsv4div4df2_mask_round, "__builtin_ia32_cvtuqq2pd256_mask_round", IX86_BUILTIN_VCVTUQQ2PD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DI_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtuqq2ph_v4di_mask_round, "__builtin_ia32_vcvtuqq2ph256_mask_round", IX86_BUILTIN_VCVTUQQ2PH256_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V4DI_V8HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_floatunsv4div4sf2_mask_round, "__builtin_ia32_cvtuqq2ps256_mask_round", IX86_BUILTIN_VCVTUQQ2PS256_MASK_ROUND, UNKNOWN, (int) V4SF_FTYPE_V4DI_V4SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtuw2ph_v16hi_mask_round, "__builtin_ia32_vcvtuw2ph256_mask_round", IX86_BUILTIN_VCVTUW2PH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HI_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_vcvtw2ph_v16hi_mask_round, "__builtin_ia32_vcvtw2ph256_mask_round", IX86_BUILTIN_VCVTW2PH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HI_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx_divv4df3_mask_round, "__builtin_ia32_divpd256_mask_round", IX86_BUILTIN_VDIVPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_divv16hf3_mask_round, "__builtin_ia32_divph256_mask_round", IX86_BUILTIN_VDIVPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx_divv8sf3_mask_round, "__builtin_ia32_divps256_mask_round", IX86_BUILTIN_VDIVPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_fma_fcmaddc_v16hf_round, "__builtin_ia32_vfcmaddcph256_round", IX86_BUILTIN_VFCMADDCPH256_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fcmaddc_v16hf_mask1_round, "__builtin_ia32_vfcmaddcph256_mask_round", IX86_BUILTIN_VFCMADDCPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fcmaddc_v16hf_mask_round, "__builtin_ia32_vfcmaddcph256_mask3_round", IX86_BUILTIN_VFCMADDCPH256_MASK3_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fcmaddc_v16hf_maskz_round, "__builtin_ia32_vfcmaddcph256_maskz_round", IX86_BUILTIN_VFCMADDCPH256_MASKZ_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fcmulc_v16hf_round, "__builtin_ia32_vfcmulcph256_round", IX86_BUILTIN_VFCMULCPH256_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fcmulc_v16hf_mask_round, "__builtin_ia32_vfcmulcph256_mask_round", IX86_BUILTIN_VFCMULCPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fixupimmv4df_mask_round, "__builtin_ia32_fixupimmpd256_mask_round", IX86_BUILTIN_VFIXUPIMMPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DI_INT_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fixupimmv4df_maskz_round, "__builtin_ia32_fixupimmpd256_maskz_round", IX86_BUILTIN_VFIXUPIMMPD256_MASKZ_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DI_INT_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fixupimmv8sf_mask_round, "__builtin_ia32_fixupimmps256_mask_round", IX86_BUILTIN_VFIXUPIMMPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SI_INT_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fixupimmv8sf_maskz_round, "__builtin_ia32_fixupimmps256_maskz_round", IX86_BUILTIN_VFIXUPIMMPS256_MASKZ_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SI_INT_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v4df_mask_round, "__builtin_ia32_vfmaddpd256_mask_round", IX86_BUILTIN_VFMADDPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v4df_mask3_round, "__builtin_ia32_vfmaddpd256_mask3_round", IX86_BUILTIN_VFMADDPD256_MASK3_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v4df_maskz_round, "__builtin_ia32_vfmaddpd256_maskz_round", IX86_BUILTIN_VFMADDPD256_MASKZ_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v16hf_mask_round, "__builtin_ia32_vfmaddph256_mask_round", IX86_BUILTIN_VFMADDPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v16hf_mask3_round, "__builtin_ia32_vfmaddph256_mask3_round", IX86_BUILTIN_VFMADDPH512_MASK3_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v16hf_maskz_round, "__builtin_ia32_vfmaddph256_maskz_round", IX86_BUILTIN_VFMADDPH256_MASKZ_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v8sf_mask_round, "__builtin_ia32_vfmaddps256_mask_round", IX86_BUILTIN_VFMADDPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v8sf_mask3_round, "__builtin_ia32_vfmaddps256_mask3_round", IX86_BUILTIN_VFMADDPS512_MASK3_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmadd_v8sf_maskz_round, "__builtin_ia32_vfmaddps256_maskz_round", IX86_BUILTIN_VFMADDPS256_MASKZ_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_fma_fmaddc_v16hf_round, "__builtin_ia32_vfmaddcph256_round", IX86_BUILTIN_VFMADDCPH256_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddc_v16hf_mask1_round, "__builtin_ia32_vfmaddcph256_mask_round", IX86_BUILTIN_VFMADDCPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddc_v16hf_mask_round, "__builtin_ia32_vfmaddcph256_mask3_round", IX86_BUILTIN_VFMADDCPH256_MASK3_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddc_v16hf_maskz_round, "__builtin_ia32_vfmaddcph256_maskz_round", IX86_BUILTIN_VFMADDCPH256_MASKZ_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v4df_mask_round, "__builtin_ia32_vfmaddsubpd256_mask_round", IX86_BUILTIN_VFMADDSUBPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v4df_mask3_round, "__builtin_ia32_vfmaddsubpd256_mask3_round", IX86_BUILTIN_VFMADDSUBPD256_MASK3_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v4df_maskz_round, "__builtin_ia32_vfmaddsubpd256_maskz_round", IX86_BUILTIN_VFMADDSUBPD256_MASKZ_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v16hf_mask_round, "__builtin_ia32_vfmaddsubph256_mask_round", IX86_BUILTIN_VFMADDSUBPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v16hf_mask3_round, "__builtin_ia32_vfmaddsubph256_mask3_round", IX86_BUILTIN_VFMADDSUBPH256_MASK3_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v16hf_maskz_round, "__builtin_ia32_vfmaddsubph256_maskz_round", IX86_BUILTIN_VFMADDSUBPH256_MASKZ_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v8sf_mask_round, "__builtin_ia32_vfmaddsubps256_mask_round", IX86_BUILTIN_VFMADDSUBPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v8sf_mask3_round, "__builtin_ia32_vfmaddsubps256_mask3_round", IX86_BUILTIN_VFMADDSUBPS512_MASK3_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmaddsub_v8sf_maskz_round, "__builtin_ia32_vfmaddsubps256_maskz_round", IX86_BUILTIN_VFMADDSUBPS256_MASKZ_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v4df_mask_round, "__builtin_ia32_vfmsubpd256_mask_round", IX86_BUILTIN_VFMSUBPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v4df_mask3_round, "__builtin_ia32_vfmsubpd256_mask3_round", IX86_BUILTIN_VFMSUBPD256_MASK3_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v4df_maskz_round, "__builtin_ia32_vfmsubpd256_maskz_round", IX86_BUILTIN_VFMSUBPD256_MASKZ_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v16hf_mask_round, "__builtin_ia32_vfmsubph256_mask_round", IX86_BUILTIN_VFMSUBPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v16hf_mask3_round, "__builtin_ia32_vfmsubph256_mask3_round", IX86_BUILTIN_VFMSUBPH256_MASK3_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v16hf_maskz_round, "__builtin_ia32_vfmsubph256_maskz_round", IX86_BUILTIN_VFMSUBPH256_MASKZ_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v8sf_mask_round, "__builtin_ia32_vfmsubps256_mask_round", IX86_BUILTIN_VFMSUBPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v8sf_mask3_round, "__builtin_ia32_vfmsubps256_mask3_round", IX86_BUILTIN_VFMSUBPS512_MASK3_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsub_v8sf_maskz_round, "__builtin_ia32_vfmsubps256_maskz_round", IX86_BUILTIN_VFMSUBPS256_MASKZ_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v4df_mask_round, "__builtin_ia32_vfmsubaddpd256_mask_round", IX86_BUILTIN_VFMSUBADDPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v4df_mask3_round, "__builtin_ia32_vfmsubaddpd256_mask3_round", IX86_BUILTIN_VFMSUBADDPD256_MASK3_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v4df_maskz_round, "__builtin_ia32_vfmsubaddpd256_maskz_round", IX86_BUILTIN_VFMSUBADDPD256_MASKZ_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v16hf_mask_round, "__builtin_ia32_vfmsubaddph256_mask_round", IX86_BUILTIN_VFMSUBADDPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v16hf_mask3_round, "__builtin_ia32_vfmsubaddph256_mask3_round", IX86_BUILTIN_VFMSUBADDPH256_MASK3_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v16hf_maskz_round, "__builtin_ia32_vfmsubaddph256_maskz_round", IX86_BUILTIN_VFMSUBADDPH256_MASKZ_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v8sf_mask_round, "__builtin_ia32_vfmsubaddps256_mask_round", IX86_BUILTIN_VFMSUBADDPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v8sf_mask3_round, "__builtin_ia32_vfmsubaddps256_mask3_round", IX86_BUILTIN_VFMSUBADDPS512_MASK3_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmsubadd_v8sf_maskz_round, "__builtin_ia32_vfmsubaddps256_maskz_round", IX86_BUILTIN_VFMSUBADDPS256_MASKZ_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmulc_v16hf_round, "__builtin_ia32_vfmulcph256_round", IX86_BUILTIN_VFMULCPH256_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fmulc_v16hf_mask_round, "__builtin_ia32_vfmulcph256_mask_round", IX86_BUILTIN_VFMULCPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v4df_mask_round, "__builtin_ia32_vfnmaddpd256_mask_round", IX86_BUILTIN_VFNMADDPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v4df_mask3_round, "__builtin_ia32_vfnmaddpd256_mask3_round", IX86_BUILTIN_VFNMADDPD256_MASK3_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v4df_maskz_round, "__builtin_ia32_vfnmaddpd256_maskz_round", IX86_BUILTIN_VFNMADDPD256_MASKZ_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v16hf_mask_round, "__builtin_ia32_vfnmaddph256_mask_round", IX86_BUILTIN_VFNMADDPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v16hf_mask3_round, "__builtin_ia32_vfnmaddph256_mask3_round", IX86_BUILTIN_VFNMADDPH256_MASK3_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v16hf_maskz_round, "__builtin_ia32_vfnmaddph256_maskz_round", IX86_BUILTIN_VFNMADDPH256_MASKZ_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v8sf_mask_round, "__builtin_ia32_vfnmaddps256_mask_round", IX86_BUILTIN_VFNMADDPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v8sf_mask3_round, "__builtin_ia32_vfnmaddps256_mask3_round", IX86_BUILTIN_VFNMADDPS512_MASK3_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmadd_v8sf_maskz_round, "__builtin_ia32_vfnmaddps256_maskz_round", IX86_BUILTIN_VFNMADDPS256_MASKZ_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v4df_mask_round, "__builtin_ia32_vfnmsubpd256_mask_round", IX86_BUILTIN_VFNMSUBPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v4df_mask3_round, "__builtin_ia32_vfnmsubpd256_mask3_round", IX86_BUILTIN_VFNMSUBPD256_MASK3_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v4df_maskz_round, "__builtin_ia32_vfnmsubpd256_maskz_round", IX86_BUILTIN_VFNMSUBPD256_MASKZ_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v16hf_mask_round, "__builtin_ia32_vfnmsubph256_mask_round", IX86_BUILTIN_VFNMSUBPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v16hf_mask3_round, "__builtin_ia32_vfnmsubph256_mask3_round", IX86_BUILTIN_VFNMSUBPH256_MASK3_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v16hf_maskz_round, "__builtin_ia32_vfnmsubph256_maskz_round", IX86_BUILTIN_VFNMSUBPH256_MASKZ_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v8sf_mask_round, "__builtin_ia32_vfnmsubps256_mask_round", IX86_BUILTIN_VFNMSUBPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v8sf_mask3_round, "__builtin_ia32_vfnmsubps256_mask3_round", IX86_BUILTIN_VFNMSUBPS512_MASK3_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_fnmsub_v8sf_maskz_round, "__builtin_ia32_vfnmsubps256_maskz_round", IX86_BUILTIN_VFNMSUBPS256_MASKZ_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_getexpv4df_mask_round, "__builtin_ia32_getexppd256_mask_round", IX86_BUILTIN_VGETEXPPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_getexpv16hf_mask_round, "__builtin_ia32_getexpph256_mask_round", IX86_BUILTIN_VGETEXPPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_getexpv8sf_mask_round, "__builtin_ia32_getexpps256_mask_round", IX86_BUILTIN_VGETEXPPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_getmantv4df_mask_round, "__builtin_ia32_getmantpd256_mask_round", IX86_BUILTIN_VGETMANTPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_INT_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_getmantv16hf_mask_round, "__builtin_ia32_getmantph256_mask_round", IX86_BUILTIN_VGETMANTPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_INT_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_getmantv8sf_mask_round, "__builtin_ia32_getmantps256_mask_round", IX86_BUILTIN_VGETMANTPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_INT_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_smaxv4df3_mask_round, "__builtin_ia32_maxpd256_mask_round", IX86_BUILTIN_VMAXPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_smaxv16hf3_mask_round, "__builtin_ia32_maxph256_mask_round", IX86_BUILTIN_VMAXPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_smaxv8sf3_mask_round, "__builtin_ia32_maxps256_mask_round", IX86_BUILTIN_VMAXPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_sminv4df3_mask_round, "__builtin_ia32_minpd256_mask_round", IX86_BUILTIN_VMINPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_sminv16hf3_mask_round, "__builtin_ia32_minph256_mask_round", IX86_BUILTIN_VMINPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_sminv8sf3_mask_round, "__builtin_ia32_minps256_mask_round", IX86_BUILTIN_VMINPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_mulv4df3_mask_round, "__builtin_ia32_mulpd256_mask_round", IX86_BUILTIN_VMULPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_mulv16hf3_mask_round, "__builtin_ia32_mulph256_mask_round", IX86_BUILTIN_VMULPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_mulv8sf3_mask_round, "__builtin_ia32_mulps256_mask_round", IX86_BUILTIN_VMULPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512dq_rangepv4df_mask_round, "__builtin_ia32_rangepd256_mask_round", IX86_BUILTIN_VRANGEPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_INT_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512dq_rangepv8sf_mask_round, "__builtin_ia32_rangeps256_mask_round", IX86_BUILTIN_VRANGEPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_INT_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_reducepv4df_mask_round, "__builtin_ia32_reducepd256_mask_round", IX86_BUILTIN_VREDUCEPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_INT_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_reducepv16hf_mask_round, "__builtin_ia32_reduceph256_mask_round", IX86_BUILTIN_VREDUCEPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_INT_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_reducepv8sf_mask_round, "__builtin_ia32_reduceps256_mask_round", IX86_BUILTIN_VREDUCEPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_INT_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_rndscalev4df_mask_round, "__builtin_ia32_rndscalepd256_mask_round", IX86_BUILTIN_VRNDSCALEPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_INT_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_rndscalev16hf_mask_round, "__builtin_ia32_rndscaleph256_mask_round", IX86_BUILTIN_VRNDSCALEPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_INT_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_rndscalev8sf_mask_round, "__builtin_ia32_rndscaleps256_mask_round", IX86_BUILTIN_VRNDSCALEPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_INT_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_scalefv4df_mask_round, "__builtin_ia32_scalefpd256_mask_round", IX86_BUILTIN_VSCALEFPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_scalefv16hf_mask_round, "__builtin_ia32_scalefph256_mask_round", IX86_BUILTIN_VSCALEFPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512vl_scalefv8sf_mask_round, "__builtin_ia32_scalefps256_mask_round", IX86_BUILTIN_VSCALEFPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx_sqrtv4df2_mask_round, "__builtin_ia32_sqrtpd256_mask_round", IX86_BUILTIN_VSQRTPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx512fp16_sqrtv16hf2_mask_round, "__builtin_ia32_sqrtph256_mask_round", IX86_BUILTIN_VSQRTPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx_sqrtv8sf2_mask_round, "__builtin_ia32_sqrtps256_mask_round", IX86_BUILTIN_VSQRTPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_subv4df3_mask_round, "__builtin_ia32_subpd256_mask_round", IX86_BUILTIN_VSUBPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_subv16hf3_mask_round, "__builtin_ia32_subph256_mask_round", IX86_BUILTIN_VSUBPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_subv8sf3_mask_round, "__builtin_ia32_subps256_mask_round", IX86_BUILTIN_VSUBPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvt2ps2phx_v32hf_mask_round, "__builtin_ia32_vcvt2ps2phx512_mask_round", IX86_BUILTIN_VCVT2PS2PHX_V32HF_MASK_ROUND, UNKNOWN, (int) V32HF_FTYPE_V16SF_V16SF_V32HF_USI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvt2ps2phx_v16hf_mask_round, "__builtin_ia32_vcvt2ps2phx256_mask_round", IX86_BUILTIN_VCVT2PS2PHX_V16HF_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V8SF_V8SF_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtph2ibsv16hf_mask_round, "__builtin_ia32_cvtph2ibs256_mask_round", IX86_BUILTIN_CVTPH2IBS256_MASK_ROUND, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtph2ibsv32hf_mask_round, "__builtin_ia32_cvtph2ibs512_mask_round", IX86_BUILTIN_CVTPH2IBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtph2iubsv16hf_mask_round, "__builtin_ia32_cvtph2iubs256_mask_round", IX86_BUILTIN_CVTPH2IUBS256_MASK_ROUND, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtph2iubsv32hf_mask_round, "__builtin_ia32_cvtph2iubs512_mask_round", IX86_BUILTIN_CVTPH2IUBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtps2ibsv8sf_mask_round, "__builtin_ia32_cvtps2ibs256_mask_round", IX86_BUILTIN_CVTPS2IBS256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtps2ibsv16sf_mask_round, "__builtin_ia32_cvtps2ibs512_mask_round", IX86_BUILTIN_CVTPS2IBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvtps2iubsv8sf_mask_round, "__builtin_ia32_cvtps2iubs256_mask_round", IX86_BUILTIN_CVTPS2IUBS256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvtps2iubsv16sf_mask_round, "__builtin_ia32_cvtps2iubs512_mask_round", IX86_BUILTIN_CVTPS2IUBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttph2ibsv16hf_mask_round, "__builtin_ia32_cvttph2ibs256_mask_round", IX86_BUILTIN_CVTTPH2IBS256_MASK_ROUND, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttph2ibsv32hf_mask_round, "__builtin_ia32_cvttph2ibs512_mask_round", IX86_BUILTIN_CVTTPH2IBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttph2iubsv16hf_mask_round, "__builtin_ia32_cvttph2iubs256_mask_round", IX86_BUILTIN_CVTTPH2IUBS256_MASK_ROUND, UNKNOWN, (int) V16HI_FTYPE_V16HF_V16HI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttph2iubsv32hf_mask_round, "__builtin_ia32_cvttph2iubs512_mask_round", IX86_BUILTIN_CVTTPH2IUBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttps2ibsv8sf_mask_round, "__builtin_ia32_cvttps2ibs256_mask_round", IX86_BUILTIN_CVTTPS2IBS256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttps2ibsv16sf_mask_round, "__builtin_ia32_cvttps2ibs512_mask_round", IX86_BUILTIN_CVTTPS2IBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_cvttps2iubsv8sf_mask_round, "__builtin_ia32_cvttps2iubs256_mask_round", IX86_BUILTIN_CVTTPS2IUBS256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_cvttps2iubsv16sf_mask_round, "__builtin_ia32_cvttps2iubs512_mask_round", IX86_BUILTIN_CVTTPS2IUBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2dqsv4df_mask_round, "__builtin_ia32_cvttpd2dqs256_mask_round", IX86_BUILTIN_VCVTTPD2DQS256_MASK_ROUND, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttpd2dqsv8df_mask_round, "__builtin_ia32_cvttpd2dqs512_mask_round", IX86_BUILTIN_VCVTTPD2DQS512_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8DF_V8SI_QI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2qqsv4df_mask_round, "__builtin_ia32_cvttpd2qqs256_mask_round", IX86_BUILTIN_VCVTTPD2QQS256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttpd2qqsv8df_mask_round, "__builtin_ia32_cvttpd2qqs512_mask_round", IX86_BUILTIN_VCVTTPD2QQS512_MASK_ROUND, UNKNOWN, (int) V8DI_FTYPE_V8DF_V8DI_QI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2udqsv4df_mask_round, "__builtin_ia32_cvttpd2udqs256_mask_round", IX86_BUILTIN_VCVTTPD2UDQS256_MASK_ROUND, UNKNOWN, (int) V4SI_FTYPE_V4DF_V4SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttpd2udqsv8df_mask_round, "__builtin_ia32_cvttpd2udqs512_mask_round", IX86_BUILTIN_VCVTTPD2UDQS512_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8DF_V8SI_QI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttpd2uqqsv4df_mask_round, "__builtin_ia32_cvttpd2uqqs256_mask_round", IX86_BUILTIN_VCVTTPD2UQQS256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4DF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttpd2uqqsv8df_mask_round, "__builtin_ia32_cvttpd2uqqs512_mask_round", IX86_BUILTIN_VCVTTPD2UQQS512_MASK_ROUND, UNKNOWN, (int) V8DI_FTYPE_V8DF_V8DI_QI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2dqsv8sf_mask_round, "__builtin_ia32_cvttps2dqs256_mask_round", IX86_BUILTIN_VCVTTPS2DQS256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttps2dqsv16sf_mask_round, "__builtin_ia32_cvttps2dqs512_mask_round", IX86_BUILTIN_VCVTTPS2DQS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_HI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2qqsv4di_mask_round, "__builtin_ia32_cvttps2qqs256_mask_round", IX86_BUILTIN_VCVTTPS2QQS256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttps2qqsv8di_mask_round, "__builtin_ia32_cvttps2qqs512_mask_round", IX86_BUILTIN_VCVTTPS2QQS512_MASK_ROUND, UNKNOWN, (int) V8DI_FTYPE_V8SF_V8DI_QI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2udqsv8sf_mask_round, "__builtin_ia32_cvttps2udqs256_mask_round", IX86_BUILTIN_VCVTTPS2UDQS256_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8SF_V8SI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttps2udqsv16sf_mask_round, "__builtin_ia32_cvttps2udqs512_mask_round", IX86_BUILTIN_VCVTTPS2UDQS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_HI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttps2uqqsv4di_mask_round, "__builtin_ia32_cvttps2uqqs256_mask_round", IX86_BUILTIN_VCVTTPS2UQQS256_MASK_ROUND, UNKNOWN, (int) V4DI_FTYPE_V4SF_V4DI_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_vcvttps2uqqsv8di_mask_round, "__builtin_ia32_cvttps2uqqs512_mask_round", IX86_BUILTIN_VCVTTPS2UQQS512_MASK_ROUND, UNKNOWN, (int) V8DI_FTYPE_V8SF_V8DI_QI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttsd2sissi_round, "__builtin_ia32_cvttsd2sis32_round", IX86_BUILTIN_VCVTTSD2SIS32_ROUND, UNKNOWN, (int) INT_FTYPE_V2DF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttsd2sisdi_round, "__builtin_ia32_cvttsd2sis64_round", IX86_BUILTIN_VCVTTSD2SIS64_ROUND, UNKNOWN, (int) INT64_FTYPE_V2DF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttsd2usissi_round, "__builtin_ia32_cvttsd2usis32_round", IX86_BUILTIN_VCVTTSD2USIS32_ROUND, UNKNOWN, (int) INT_FTYPE_V2DF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttsd2usisdi_round, "__builtin_ia32_cvttsd2usis64_round", IX86_BUILTIN_VCVTTSD2USIS64_ROUND, UNKNOWN, (int) INT64_FTYPE_V2DF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttss2sissi_round, "__builtin_ia32_cvttss2sis32_round", IX86_BUILTIN_VCVTTSS2SIS32_ROUND, UNKNOWN, (int) INT_FTYPE_V4SF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttss2sisdi_round, "__builtin_ia32_cvttss2sis64_round", IX86_BUILTIN_VCVTTSS2SIS64_ROUND, UNKNOWN, (int) INT64_FTYPE_V4SF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttss2usissi_round, "__builtin_ia32_cvttss2usis32_round", IX86_BUILTIN_VCVTTSS2USIS32_ROUND, UNKNOWN, (int) INT_FTYPE_V4SF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_vcvttss2usisdi_round, "__builtin_ia32_cvttss2usis64_round", IX86_BUILTIN_VCVTTSS2USIS64_ROUND, UNKNOWN, (int) INT64_FTYPE_V4SF_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_minmaxpv8df_mask_round, "__builtin_ia32_minmaxpd512_mask_round", IX86_BUILTIN_MINMAXPD512_MASK_ROUND, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_INT_V8DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_minmaxpv32hf_mask_round, "__builtin_ia32_minmaxph512_mask_round", IX86_BUILTIN_MINMAXPH512_MASK_ROUND, UNKNOWN, (int) V32HF_FTYPE_V32HF_V32HF_INT_V32HF_USI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_512, CODE_FOR_avx10_2_minmaxpv16sf_mask_round, "__builtin_ia32_minmaxps512_mask_round", IX86_BUILTIN_MINMAXPS512_MASK_ROUND, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_INT_V16SF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxpv4df_mask_round, "__builtin_ia32_minmaxpd256_mask_round", IX86_BUILTIN_MINMAXPD256_MASK_ROUND, UNKNOWN, (int) V4DF_FTYPE_V4DF_V4DF_INT_V4DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxpv16hf_mask_round, "__builtin_ia32_minmaxph256_mask_round", IX86_BUILTIN_MINMAXPH256_MASK_ROUND, UNKNOWN, (int) V16HF_FTYPE_V16HF_V16HF_INT_V16HF_UHI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxpv8sf_mask_round, "__builtin_ia32_minmaxps256_mask_round", IX86_BUILTIN_MINMAXPS256_MASK_ROUND, UNKNOWN, (int) V8SF_FTYPE_V8SF_V8SF_INT_V8SF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxsv2df_mask_round, "__builtin_ia32_minmaxsd_mask_round", IX86_BUILTIN_MINMAXSD_MASK_ROUND, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxsv8hf_mask_round, "__builtin_ia32_minmaxsh_mask_round", IX86_BUILTIN_MINMAXSH_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V8HF_V8HF_INT_V8HF_UQI_INT)
-BDESC (0, OPTION_MASK_ISA2_AVX10_2_256, CODE_FOR_avx10_2_minmaxsv4sf_mask_round, "__builtin_ia32_minmaxss_mask_round", IX86_BUILTIN_MINMAXSS_MASK_ROUND, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvt2ps2phx_v32hf_mask_round, "__builtin_ia32_vcvt2ps2phx512_mask_round", IX86_BUILTIN_VCVT2PS2PHX_V32HF_MASK_ROUND, UNKNOWN, (int) V32HF_FTYPE_V16SF_V16SF_V32HF_USI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2ibsv32hf_mask_round, "__builtin_ia32_cvtph2ibs512_mask_round", IX86_BUILTIN_CVTPH2IBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtph2iubsv32hf_mask_round, "__builtin_ia32_cvtph2iubs512_mask_round", IX86_BUILTIN_CVTPH2IUBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2ibsv16sf_mask_round, "__builtin_ia32_cvtps2ibs512_mask_round", IX86_BUILTIN_CVTPS2IBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvtps2iubsv16sf_mask_round, "__builtin_ia32_cvtps2iubs512_mask_round", IX86_BUILTIN_CVTPS2IUBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttph2ibsv32hf_mask_round, "__builtin_ia32_cvttph2ibs512_mask_round", IX86_BUILTIN_CVTTPH2IBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttph2iubsv32hf_mask_round, "__builtin_ia32_cvttph2iubs512_mask_round", IX86_BUILTIN_CVTTPH2IUBS512_MASK_ROUND, UNKNOWN, (int) V32HI_FTYPE_V32HF_V32HI_USI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttps2ibsv16sf_mask_round, "__builtin_ia32_cvttps2ibs512_mask_round", IX86_BUILTIN_CVTTPS2IBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_cvttps2iubsv16sf_mask_round, "__builtin_ia32_cvttps2iubs512_mask_round", IX86_BUILTIN_CVTTPS2IUBS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_UHI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2dqsv8df_mask_round, "__builtin_ia32_cvttpd2dqs512_mask_round", IX86_BUILTIN_VCVTTPD2DQS512_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8DF_V8SI_QI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2qqsv8df_mask_round, "__builtin_ia32_cvttpd2qqs512_mask_round", IX86_BUILTIN_VCVTTPD2QQS512_MASK_ROUND, UNKNOWN, (int) V8DI_FTYPE_V8DF_V8DI_QI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2udqsv8df_mask_round, "__builtin_ia32_cvttpd2udqs512_mask_round", IX86_BUILTIN_VCVTTPD2UDQS512_MASK_ROUND, UNKNOWN, (int) V8SI_FTYPE_V8DF_V8SI_QI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttpd2uqqsv8df_mask_round, "__builtin_ia32_cvttpd2uqqs512_mask_round", IX86_BUILTIN_VCVTTPD2UQQS512_MASK_ROUND, UNKNOWN, (int) V8DI_FTYPE_V8DF_V8DI_QI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2dqsv16sf_mask_round, "__builtin_ia32_cvttps2dqs512_mask_round", IX86_BUILTIN_VCVTTPS2DQS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_HI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2qqsv8di_mask_round, "__builtin_ia32_cvttps2qqs512_mask_round", IX86_BUILTIN_VCVTTPS2QQS512_MASK_ROUND, UNKNOWN, (int) V8DI_FTYPE_V8SF_V8DI_QI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2udqsv16sf_mask_round, "__builtin_ia32_cvttps2udqs512_mask_round", IX86_BUILTIN_VCVTTPS2UDQS512_MASK_ROUND, UNKNOWN, (int) V16SI_FTYPE_V16SF_V16SI_HI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttps2uqqsv8di_mask_round, "__builtin_ia32_cvttps2uqqs512_mask_round", IX86_BUILTIN_VCVTTPS2UQQS512_MASK_ROUND, UNKNOWN, (int) V8DI_FTYPE_V8SF_V8DI_QI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttsd2sissi_round, "__builtin_ia32_cvttsd2sis32_round", IX86_BUILTIN_VCVTTSD2SIS32_ROUND, UNKNOWN, (int) INT_FTYPE_V2DF_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttsd2sisdi_round, "__builtin_ia32_cvttsd2sis64_round", IX86_BUILTIN_VCVTTSD2SIS64_ROUND, UNKNOWN, (int) INT64_FTYPE_V2DF_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttsd2usissi_round, "__builtin_ia32_cvttsd2usis32_round", IX86_BUILTIN_VCVTTSD2USIS32_ROUND, UNKNOWN, (int) INT_FTYPE_V2DF_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttsd2usisdi_round, "__builtin_ia32_cvttsd2usis64_round", IX86_BUILTIN_VCVTTSD2USIS64_ROUND, UNKNOWN, (int) INT64_FTYPE_V2DF_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttss2sissi_round, "__builtin_ia32_cvttss2sis32_round", IX86_BUILTIN_VCVTTSS2SIS32_ROUND, UNKNOWN, (int) INT_FTYPE_V4SF_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttss2sisdi_round, "__builtin_ia32_cvttss2sis64_round", IX86_BUILTIN_VCVTTSS2SIS64_ROUND, UNKNOWN, (int) INT64_FTYPE_V4SF_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttss2usissi_round, "__builtin_ia32_cvttss2usis32_round", IX86_BUILTIN_VCVTTSS2USIS32_ROUND, UNKNOWN, (int) INT_FTYPE_V4SF_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_vcvttss2usisdi_round, "__builtin_ia32_cvttss2usis64_round", IX86_BUILTIN_VCVTTSS2USIS64_ROUND, UNKNOWN, (int) INT64_FTYPE_V4SF_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv8df_mask_round, "__builtin_ia32_minmaxpd512_mask_round", IX86_BUILTIN_MINMAXPD512_MASK_ROUND, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_INT_V8DF_UQI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv32hf_mask_round, "__builtin_ia32_minmaxph512_mask_round", IX86_BUILTIN_MINMAXPH512_MASK_ROUND, UNKNOWN, (int) V32HF_FTYPE_V32HF_V32HF_INT_V32HF_USI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxpv16sf_mask_round, "__builtin_ia32_minmaxps512_mask_round", IX86_BUILTIN_MINMAXPS512_MASK_ROUND, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_INT_V16SF_UHI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxsv2df_mask_round, "__builtin_ia32_minmaxsd_mask_round", IX86_BUILTIN_MINMAXSD_MASK_ROUND, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxsv8hf_mask_round, "__builtin_ia32_minmaxsh_mask_round", IX86_BUILTIN_MINMAXSH_MASK_ROUND, UNKNOWN, (int) V8HF_FTYPE_V8HF_V8HF_INT_V8HF_UQI_INT)
+BDESC (0, OPTION_MASK_ISA2_AVX10_2, CODE_FOR_avx10_2_minmaxsv4sf_mask_round, "__builtin_ia32_minmaxss_mask_round", IX86_BUILTIN_MINMAXSS_MASK_ROUND, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT)
BDESC_END (ROUND_ARGS, MULTI_ARG)
diff --git a/gcc/config/i386/i386-c.cc b/gcc/config/i386/i386-c.cc
index 7e310c3..0a320ca 100644
--- a/gcc/config/i386/i386-c.cc
+++ b/gcc/config/i386/i386-c.cc
@@ -734,20 +734,15 @@ ix86_target_macros_internal (HOST_WIDE_INT isa_flag,
if (isa_flag2 & OPTION_MASK_ISA2_USER_MSR)
def_or_undef (parse_in, "__USER_MSR__");
if (isa_flag2 & OPTION_MASK_ISA2_AVX10_1_256)
- {
- def_or_undef (parse_in, "__AVX10_1_256__");
- def_or_undef (parse_in, "__AVX10_1__");
- }
- if (isa_flag2 & OPTION_MASK_ISA2_AVX10_1_512)
- def_or_undef (parse_in, "__AVX10_1_512__");
+ def_or_undef (parse_in, "__AVX10_1_256__");
+ if (isa_flag2 & OPTION_MASK_ISA2_AVX10_1)
+ def_or_undef (parse_in, "__AVX10_1__");
if (isa_flag2 & OPTION_MASK_ISA2_APX_F)
def_or_undef (parse_in, "__APX_F__");
if (ix86_apx_inline_asm_use_gpr32)
def_or_undef (parse_in, "__APX_INLINE_ASM_USE_GPR32__");
- if (isa_flag2 & OPTION_MASK_ISA2_AVX10_2_256)
- def_or_undef (parse_in, "__AVX10_2_256__");
- if (isa_flag2 & OPTION_MASK_ISA2_AVX10_2_512)
- def_or_undef (parse_in, "__AVX10_2_512__");
+ if (isa_flag2 & OPTION_MASK_ISA2_AVX10_2)
+ def_or_undef (parse_in, "__AVX10_2__");
if (isa_flag2 & OPTION_MASK_ISA2_AMX_AVX512)
def_or_undef (parse_in, "__AMX_AVX512__");
if (isa_flag2 & OPTION_MASK_ISA2_AMX_TF32)
diff --git a/gcc/config/i386/i386-expand.cc b/gcc/config/i386/i386-expand.cc
index b4d8bd9..cdfd94d 100644
--- a/gcc/config/i386/i386-expand.cc
+++ b/gcc/config/i386/i386-expand.cc
@@ -2531,7 +2531,7 @@ ix86_expand_branch (enum rtx_code code, rtx op0, rtx op1, rtx label)
return;
case E_BFmode:
- gcc_assert (TARGET_AVX10_2_256 && !flag_trapping_math);
+ gcc_assert (TARGET_AVX10_2 && !flag_trapping_math);
goto simple;
case E_DImode:
@@ -2802,7 +2802,7 @@ ix86_prepare_fp_compare_args (enum rtx_code code, rtx *pop0, rtx *pop1)
machine_mode op_mode = GET_MODE (op0);
bool is_sse = SSE_FLOAT_MODE_SSEMATH_OR_HFBF_P (op_mode);
- if (op_mode == BFmode && (!TARGET_AVX10_2_256 || flag_trapping_math))
+ if (op_mode == BFmode && (!TARGET_AVX10_2 || flag_trapping_math))
{
rtx op = gen_lowpart (HImode, op0);
if (CONST_INT_P (op))
@@ -2924,7 +2924,7 @@ ix86_expand_fp_compare (enum rtx_code code, rtx op0, rtx op1)
/* We only have vcomisbf16, No vcomubf16 nor vcomxbf16 */
if (GET_MODE (op0) != E_BFmode)
{
- if (TARGET_AVX10_2_256 && (code == EQ || code == NE))
+ if (TARGET_AVX10_2 && (code == EQ || code == NE))
tmp = gen_rtx_UNSPEC (CCFPmode, gen_rtvec (1, tmp), UNSPEC_OPTCOMX);
if (unordered_compare)
tmp = gen_rtx_UNSPEC (CCFPmode, gen_rtvec (1, tmp), UNSPEC_NOTRAP);
@@ -10779,7 +10779,7 @@ ix86_ssecom_setcc (const enum rtx_code comparison,
/* NB: For ordered EQ or unordered NE, check ZF alone isn't sufficient
with NAN operands.
- Under TARGET_AVX10_2_256, VCOMX/VUCOMX are generated instead of
+ Under TARGET_AVX10_2, VCOMX/VUCOMX are generated instead of
COMI/UCOMI. VCOMX/VUCOMX will not set ZF for NAN operands. */
if (check_unordered)
{
@@ -10852,12 +10852,12 @@ ix86_expand_sse_comi (const struct builtin_description *d, tree exp,
case GE:
break;
case EQ:
- if (!TARGET_AVX10_2_256 || !comx_ok)
+ if (!TARGET_AVX10_2 || !comx_ok)
check_unordered = true;
mode = CCZmode;
break;
case NE:
- if (!TARGET_AVX10_2_256 || !comx_ok)
+ if (!TARGET_AVX10_2 || !comx_ok)
check_unordered = true;
mode = CCZmode;
const_val = const1_rtx;
@@ -10878,7 +10878,7 @@ ix86_expand_sse_comi (const struct builtin_description *d, tree exp,
op1 = copy_to_mode_reg (mode1, op1);
if ((comparison == EQ || comparison == NE)
- && TARGET_AVX10_2_256 && comx_ok)
+ && TARGET_AVX10_2 && comx_ok)
{
switch (icode)
{
@@ -12103,6 +12103,7 @@ ix86_expand_args_builtin (const struct builtin_description *d,
case V8BF_FTYPE_V8BF_V8BF_INT_V8BF_UQI:
case V16BF_FTYPE_V16BF_V16BF_INT_V16BF_UHI:
case V32BF_FTYPE_V32BF_V32BF_INT_V32BF_USI:
+ case V16HF_FTYPE_V16HF_V16HF_INT_V16HF_UHI:
case V8HF_FTYPE_V8HF_V8HF_INT_V8HF_UQI:
nargs = 5;
mask_pos = 1;
@@ -12473,7 +12474,7 @@ ix86_expand_sse_comi_round (const struct builtin_description *d,
case ORDERED:
if (!ordered)
{
- if (TARGET_AVX10_2_256 && comx_ok)
+ if (TARGET_AVX10_2 && comx_ok)
{
/* Unlike VCOMI{SH,SS,SD}, VCOMX{SH,SS,SD} will set SF
differently. So directly return true here. */
@@ -12501,7 +12502,7 @@ ix86_expand_sse_comi_round (const struct builtin_description *d,
case UNORDERED:
if (ordered)
{
- if (TARGET_AVX10_2_256 && comx_ok)
+ if (TARGET_AVX10_2 && comx_ok)
{
/* Unlike VCOMI{SH,SS,SD}, VCOMX{SH,SS,SD} will set SF
differently. So directly return false here. */
@@ -12548,20 +12549,20 @@ ix86_expand_sse_comi_round (const struct builtin_description *d,
break;
/* NB: COMI/UCOMI will set ZF with NAN operands. Use CCZmode for
_CMP_EQ_OQ/_CMP_EQ_OS.
- Under TARGET_AVX10_2_256, VCOMX/VUCOMX are always generated instead
+ Under TARGET_AVX10_2, VCOMX/VUCOMX are always generated instead
of COMI/UCOMI, VCOMX/VUCOMX will not set ZF with NAN. */
case EQ:
- if (!TARGET_AVX10_2_256 || !comx_ok)
+ if (!TARGET_AVX10_2 || !comx_ok)
check_unordered = true;
mode = CCZmode;
break;
case NE:
/* NB: COMI/UCOMI will set ZF with NAN operands. Use CCZmode for
_CMP_NEQ_UQ/_CMP_NEQ_US.
- Under TARGET_AVX10_2_256, VCOMX/VUCOMX are always generated instead
+ Under TARGET_AVX10_2, VCOMX/VUCOMX are always generated instead
of COMI/UCOMI, VCOMX/VUCOMX will not set ZF with NAN. */
gcc_assert (!ordered);
- if (!TARGET_AVX10_2_256 || !comx_ok)
+ if (!TARGET_AVX10_2 || !comx_ok)
check_unordered = true;
mode = CCZmode;
const_val = const1_rtx;
@@ -12584,7 +12585,7 @@ ix86_expand_sse_comi_round (const struct builtin_description *d,
/* Generate comx instead of comi when EQ/NE to avoid NAN checks.
Use orig_comp to exclude ORDERED/UNORDERED cases. */
if ((orig_comp == EQ || orig_comp == NE)
- && TARGET_AVX10_2_256 && comx_ok)
+ && TARGET_AVX10_2 && comx_ok)
{
switch (icode)
{
@@ -12605,7 +12606,7 @@ ix86_expand_sse_comi_round (const struct builtin_description *d,
/* Generate comi instead of comx when UNEQ/LTGT to avoid NAN checks. */
if ((comparison == UNEQ || comparison == LTGT)
- && TARGET_AVX10_2_256 && comx_ok)
+ && TARGET_AVX10_2 && comx_ok)
{
switch (icode)
{
@@ -12708,7 +12709,6 @@ ix86_expand_round_builtin (const struct builtin_description *d,
nargs = 2;
break;
case V32HF_FTYPE_V32HF_V32HF_INT:
- case V16HF_FTYPE_V16HF_V16HF_INT:
case V8HF_FTYPE_V8HF_V8HF_INT:
case V8HF_FTYPE_V8HF_INT_INT:
case V8HF_FTYPE_V8HF_UINT_INT:
@@ -12746,37 +12746,14 @@ ix86_expand_round_builtin (const struct builtin_description *d,
case V16SI_FTYPE_V16SF_V16SI_HI_INT:
case V16SI_FTYPE_V16SF_V16SI_UHI_INT:
case V16SI_FTYPE_V16HF_V16SI_UHI_INT:
- case V16HF_FTYPE_V16HF_V16HF_V16HF_INT:
case V16HF_FTYPE_V16SI_V16HF_UHI_INT:
- case V16HI_FTYPE_V16HF_V16HI_UHI_INT:
case V8DF_FTYPE_V8SF_V8DF_QI_INT:
case V16SF_FTYPE_V16HI_V16SF_HI_INT:
- case V8SF_FTYPE_V8SF_V8SF_UQI_INT:
- case V8SF_FTYPE_V8SI_V8SF_UQI_INT:
- case V8SF_FTYPE_V8HF_V8SF_UQI_INT:
- case V8SI_FTYPE_V8SF_V8SI_UQI_INT:
- case V8SI_FTYPE_V8HF_V8SI_UQI_INT:
- case V4DF_FTYPE_V4DF_V4DF_UQI_INT:
- case V4DF_FTYPE_V4DI_V4DF_UQI_INT:
- case V4DF_FTYPE_V4SF_V4DF_UQI_INT:
- case V4DF_FTYPE_V8HF_V4DF_UQI_INT:
- case V4DI_FTYPE_V8HF_V4DI_UQI_INT:
- case V4DI_FTYPE_V4DF_V4DI_UQI_INT:
- case V4DI_FTYPE_V4SF_V4DI_UQI_INT:
case V2DF_FTYPE_V2DF_V2DF_V2DF_INT:
- case V4SI_FTYPE_V4DF_V4SI_UQI_INT:
- case V4SF_FTYPE_V4DF_V4SF_UQI_INT:
- case V4SF_FTYPE_V4DI_V4SF_UQI_INT:
case V4SF_FTYPE_V4SF_V4SF_V4SF_INT:
case V8HF_FTYPE_V8DI_V8HF_UQI_INT:
case V8HF_FTYPE_V8DF_V8HF_UQI_INT:
- case V8HF_FTYPE_V8SF_V8HF_UQI_INT:
- case V8HF_FTYPE_V8SI_V8HF_UQI_INT:
- case V8HF_FTYPE_V4DF_V8HF_UQI_INT:
- case V8HF_FTYPE_V4DI_V8HF_UQI_INT:
case V16HF_FTYPE_V16SF_V16HF_UHI_INT:
- case V16HF_FTYPE_V16HF_V16HF_UHI_INT:
- case V16HF_FTYPE_V16HI_V16HF_UHI_INT:
case V16HI_FTYPE_V16BF_V16HI_UHI_INT:
case V8HF_FTYPE_V8HF_V8HF_V8HF_INT:
nargs = 4;
@@ -12789,15 +12766,11 @@ ix86_expand_round_builtin (const struct builtin_description *d,
case INT_FTYPE_V4SF_V4SF_INT_INT:
case INT_FTYPE_V2DF_V2DF_INT_INT:
return ix86_expand_sse_comi_round (d, exp, target, true);
- case V4DF_FTYPE_V4DF_V4DF_V4DF_UQI_INT:
case V8DF_FTYPE_V8DF_V8DF_V8DF_UQI_INT:
case V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT:
case V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT:
case V4SF_FTYPE_V8HF_V4SF_V4SF_UQI_INT:
- case V8SF_FTYPE_V8SF_V8SF_V8SF_UQI_INT:
case V16SF_FTYPE_V16SF_V16SF_V16SF_HI_INT:
- case V16HF_FTYPE_V16HF_V16HF_V16HF_UHI_INT:
- case V16HF_FTYPE_V16HF_V16HF_V16HF_UQI_INT:
case V32HF_FTYPE_V32HF_V32HF_V32HF_UHI_INT:
case V32HF_FTYPE_V32HF_V32HF_V32HF_USI_INT:
case V2DF_FTYPE_V8HF_V2DF_V2DF_UQI_INT:
@@ -12810,7 +12783,6 @@ ix86_expand_round_builtin (const struct builtin_description *d,
case V8HF_FTYPE_V8HF_V8HF_V8HF_UQI_INT:
case V8HF_FTYPE_V2DF_V8HF_V8HF_UQI_INT:
case V8HF_FTYPE_V4SF_V8HF_V8HF_UQI_INT:
- case V16HF_FTYPE_V8SF_V8SF_V16HF_UHI_INT:
case V32HF_FTYPE_V16SF_V16SF_V32HF_USI_INT:
nargs = 5;
break;
@@ -12819,18 +12791,12 @@ ix86_expand_round_builtin (const struct builtin_description *d,
case V8DF_FTYPE_V8DF_INT_V8DF_QI_INT:
case V8DF_FTYPE_V8DF_INT_V8DF_UQI_INT:
case V16SF_FTYPE_V16SF_INT_V16SF_UHI_INT:
- case V16HF_FTYPE_V16HF_INT_V16HF_UHI_INT:
- case V4DF_FTYPE_V4DF_INT_V4DF_UQI_INT:
- case V8SF_FTYPE_V8SF_INT_V8SF_UQI_INT:
nargs_constant = 4;
nargs = 5;
break;
case UQI_FTYPE_V8DF_V8DF_INT_UQI_INT:
- case UQI_FTYPE_V4DF_V4DF_INT_UQI_INT:
case UQI_FTYPE_V2DF_V2DF_INT_UQI_INT:
case UHI_FTYPE_V16SF_V16SF_INT_UHI_INT:
- case UHI_FTYPE_V16HF_V16HF_INT_UHI_INT:
- case UQI_FTYPE_V8SF_V8SF_INT_UQI_INT:
case UQI_FTYPE_V4SF_V4SF_INT_UQI_INT:
case USI_FTYPE_V32HF_V32HF_INT_USI_INT:
case UQI_FTYPE_V8HF_V8HF_INT_UQI_INT:
@@ -12839,8 +12805,6 @@ ix86_expand_round_builtin (const struct builtin_description *d,
break;
case V16SF_FTYPE_V16SF_V16SF_INT_V16SF_HI_INT:
case V8DF_FTYPE_V8DF_V8DF_INT_V8DF_QI_INT:
- case V8SF_FTYPE_V8SF_V8SF_INT_V8SF_UQI_INT:
- case V4DF_FTYPE_V4DF_V4DF_INT_V4DF_UQI_INT:
case V4SF_FTYPE_V4SF_V4SF_INT_V4SF_QI_INT:
case V2DF_FTYPE_V2DF_V2DF_INT_V2DF_QI_INT:
case V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT:
@@ -12848,15 +12812,12 @@ ix86_expand_round_builtin (const struct builtin_description *d,
case V8HF_FTYPE_V8HF_V8HF_INT_V8HF_UQI_INT:
case V8DF_FTYPE_V8DF_V8DF_INT_V8DF_UQI_INT:
case V32HF_FTYPE_V32HF_V32HF_INT_V32HF_USI_INT:
- case V16HF_FTYPE_V16HF_V16HF_INT_V16HF_UHI_INT:
case V16SF_FTYPE_V16SF_V16SF_INT_V16SF_UHI_INT:
nargs = 6;
nargs_constant = 4;
break;
case V8DF_FTYPE_V8DF_V8DF_V8DI_INT_QI_INT:
- case V4DF_FTYPE_V4DF_V4DF_V4DI_INT_UQI_INT:
case V16SF_FTYPE_V16SF_V16SF_V16SI_INT_HI_INT:
- case V8SF_FTYPE_V8SF_V8SF_V8SI_INT_UQI_INT:
case V2DF_FTYPE_V2DF_V2DF_V2DI_INT_QI_INT:
case V4SF_FTYPE_V4SF_V4SF_V4SI_INT_QI_INT:
nargs = 6;
@@ -13621,9 +13582,9 @@ ix86_check_builtin_isa_match (unsigned int fcode,
SHARE_BUILTIN (OPTION_MASK_ISA_AES, 0, OPTION_MASK_ISA_AVX512VL,
OPTION_MASK_ISA2_VAES);
SHARE_BUILTIN (0, OPTION_MASK_ISA2_AVXVNNIINT8, 0,
- OPTION_MASK_ISA2_AVX10_2_256);
+ OPTION_MASK_ISA2_AVX10_2);
SHARE_BUILTIN (0, OPTION_MASK_ISA2_AVXVNNIINT16, 0,
- OPTION_MASK_ISA2_AVX10_2_256);
+ OPTION_MASK_ISA2_AVX10_2);
isa = tmp_isa;
isa2 = tmp_isa2;
diff --git a/gcc/config/i386/i386-isa.def b/gcc/config/i386/i386-isa.def
index 5d8db36..19d78d7 100644
--- a/gcc/config/i386/i386-isa.def
+++ b/gcc/config/i386/i386-isa.def
@@ -120,9 +120,8 @@ DEF_PTA(APX_F)
DEF_PTA(USER_MSR)
DEF_PTA(EVEX512)
DEF_PTA(AVX10_1_256)
-DEF_PTA(AVX10_1_512)
-DEF_PTA(AVX10_2_256)
-DEF_PTA(AVX10_2_512)
+DEF_PTA(AVX10_1)
+DEF_PTA(AVX10_2)
DEF_PTA(AMX_AVX512)
DEF_PTA(AMX_TF32)
DEF_PTA(AMX_TRANSPOSE)
diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc
index fc4d2d2..91f59e1 100644
--- a/gcc/config/i386/i386-options.cc
+++ b/gcc/config/i386/i386-options.cc
@@ -262,9 +262,8 @@ static struct ix86_target_opts isa2_opts[] =
{ "-mevex512", OPTION_MASK_ISA2_EVEX512 },
{ "-musermsr", OPTION_MASK_ISA2_USER_MSR },
{ "-mavx10.1-256", OPTION_MASK_ISA2_AVX10_1_256 },
- { "-mavx10.1-512", OPTION_MASK_ISA2_AVX10_1_512 },
- { "-mavx10.2-256", OPTION_MASK_ISA2_AVX10_2_256 },
- { "-mavx10.2-512", OPTION_MASK_ISA2_AVX10_2_512 },
+ { "-mavx10.1", OPTION_MASK_ISA2_AVX10_1 },
+ { "-mavx10.2", OPTION_MASK_ISA2_AVX10_2 },
{ "-mamx-avx512", OPTION_MASK_ISA2_AMX_AVX512 },
{ "-mamx-tf32", OPTION_MASK_ISA2_AMX_TF32 },
{ "-mamx-transpose", OPTION_MASK_ISA2_AMX_TRANSPOSE },
@@ -1135,10 +1134,9 @@ ix86_valid_target_attribute_inner_p (tree fndecl, tree args, char *p_strings[],
IX86_ATTR_ISA ("evex512", OPT_mevex512),
IX86_ATTR_ISA ("usermsr", OPT_musermsr),
IX86_ATTR_ISA ("avx10.1-256", OPT_mavx10_1_256),
- IX86_ATTR_ISA ("avx10.1-512", OPT_mavx10_1_512),
- IX86_ATTR_ISA ("avx10.2-256", OPT_mavx10_2_256),
+ IX86_ATTR_ISA ("avx10.1", OPT_mavx10_1),
+ IX86_ATTR_ISA ("avx10.1-512", OPT_mavx10_1),
IX86_ATTR_ISA ("avx10.2", OPT_mavx10_2),
- IX86_ATTR_ISA ("avx10.2-512", OPT_mavx10_2),
IX86_ATTR_ISA ("amx-avx512", OPT_mamx_avx512),
IX86_ATTR_ISA ("amx-tf32", OPT_mamx_tf32),
IX86_ATTR_ISA ("amx-transpose", OPT_mamx_transpose),
@@ -2676,7 +2674,7 @@ ix86_option_override_internal (bool main_args_p,
2. Both AVX10.1-256 and AVX512 w/o 512 bit vector width are enabled with no
explicit disable on other AVX512 features.
3. Both AVX10.1 and AVX512 are disabled. */
- if (TARGET_AVX10_1_512_P (opts->x_ix86_isa_flags2))
+ if (TARGET_AVX10_1_P (opts->x_ix86_isa_flags2))
{
if (opts->x_ix86_no_avx512_explicit
&& (((~(avx512_isa_flags & opts->x_ix86_isa_flags)
@@ -2686,7 +2684,9 @@ ix86_option_override_internal (bool main_args_p,
& ((avx512_isa_flags2 | OPTION_MASK_ISA2_EVEX512)
& opts->x_ix86_isa_flags2_explicit)))))
warning (0, "%<-mno-evex512%> or %<-mno-avx512XXX%> cannot disable "
- "AVX10 instructions when AVX10.1-512 is available");
+ "AVX10 instructions when AVX10.1-512 is available in GCC 15, "
+ "behavior will change to it will disable that part of "
+ "AVX512 instructions since GCC 16");
}
else if (TARGET_AVX10_1_256_P (opts->x_ix86_isa_flags2))
{
@@ -2722,18 +2722,21 @@ ix86_option_override_internal (bool main_args_p,
& (avx512_isa_flags2
& opts->x_ix86_isa_flags2_explicit)))))
warning (0, "%<-mno-avx512XXX%> cannot disable AVX10 instructions "
- "when AVX10 is available");
+ "when AVX10 is available in GCC 15, behavior will change "
+ "to it will disable that part of AVX512 instructions since "
+ "GCC 16");
}
else if (TARGET_AVX512F_P (opts->x_ix86_isa_flags)
&& (OPTION_MASK_ISA_AVX512F & opts->x_ix86_isa_flags_explicit))
{
if (opts->x_ix86_no_avx10_1_explicit
- && ((OPTION_MASK_ISA2_AVX10_1_256 | OPTION_MASK_ISA2_AVX10_1_512)
+ && ((OPTION_MASK_ISA2_AVX10_1_256 | OPTION_MASK_ISA2_AVX10_1)
& opts->x_ix86_isa_flags2_explicit))
{
- warning (0, "%<-mno-avx10.1-256, -mno-avx10.1-512%> "
- "cannot disable AVX512 instructions when "
- "%<-mavx512XXX%>");
+ warning (0, "%<-mno-avx10.1-256, -mno-avx10.1-512%> cannot disable "
+ "AVX512 instructions when %<-mavx512XXX%> in GCC 15, "
+ "behavior will change to it will disable all the "
+ "instructions in GCC 16");
/* Reset those unset AVX512 flags set by AVX10 options when AVX10 is
disabled. */
if (OPTION_MASK_ISA2_AVX10_1_256 & opts->x_ix86_isa_flags2_explicit)
@@ -2753,7 +2756,7 @@ ix86_option_override_internal (bool main_args_p,
/* Set EVEX512 if one of the following conditions meets:
1. AVX512 is enabled while EVEX512 is not explicitly set/unset.
2. AVX10.1-512 is enabled. */
- if (TARGET_AVX10_1_512_P (opts->x_ix86_isa_flags2)
+ if (TARGET_AVX10_1_P (opts->x_ix86_isa_flags2)
|| (TARGET_AVX512F_P (opts->x_ix86_isa_flags)
&& !(opts->x_ix86_isa_flags2_explicit & OPTION_MASK_ISA2_EVEX512)))
opts->x_ix86_isa_flags2 |= OPTION_MASK_ISA2_EVEX512;
diff --git a/gcc/config/i386/i386-rust-and-jit.inc b/gcc/config/i386/i386-rust-and-jit.inc
new file mode 100644
index 0000000..998f44c
--- /dev/null
+++ b/gcc/config/i386/i386-rust-and-jit.inc
@@ -0,0 +1,93 @@
+if (TARGET_64BIT)
+ ADD_TARGET_INFO ("target_arch", "x86_64");
+else
+ ADD_TARGET_INFO ("target_arch", "x86");
+
+// features officially "stabilised" in rustc
+if (TARGET_MMX)
+ ADD_TARGET_INFO ("target_feature", "mmx");
+if (TARGET_SSE)
+ ADD_TARGET_INFO ("target_feature", "sse");
+if (TARGET_SSE2)
+ ADD_TARGET_INFO ("target_feature", "sse2");
+if (TARGET_SSE3)
+ ADD_TARGET_INFO ("target_feature", "sse3");
+if (TARGET_SSSE3)
+ ADD_TARGET_INFO ("target_feature", "ssse3");
+if (TARGET_SSE4_1)
+ ADD_TARGET_INFO ("target_feature", "sse4.1");
+if (TARGET_SSE4_2)
+ ADD_TARGET_INFO ("target_feature", "sse4.2");
+if (TARGET_AES)
+ ADD_TARGET_INFO ("target_feature", "aes");
+if (TARGET_SHA)
+ ADD_TARGET_INFO ("target_feature", "sha");
+if (TARGET_AVX)
+ ADD_TARGET_INFO ("target_feature", "avx");
+if (TARGET_AVX2)
+ ADD_TARGET_INFO ("target_feature", "avx2");
+if (TARGET_AVX512F)
+ ADD_TARGET_INFO ("target_feature", "avx512f");
+if (TARGET_AVX512CD)
+ ADD_TARGET_INFO ("target_feature", "avx512cd");
+if (TARGET_AVX512DQ)
+ ADD_TARGET_INFO ("target_feature", "avx512dq");
+if (TARGET_AVX512BW)
+ ADD_TARGET_INFO ("target_feature", "avx512bw");
+if (TARGET_AVX512VL)
+ ADD_TARGET_INFO ("target_feature", "avx512vl");
+if (TARGET_AVX512VBMI)
+ ADD_TARGET_INFO ("target_feature", "avx512vbmi");
+if (TARGET_AVX512IFMA)
+ ADD_TARGET_INFO ("target_feature", "avx512ifma");
+if (TARGET_AVX512VPOPCNTDQ)
+ ADD_TARGET_INFO ("target_feature", "avx512vpopcntdq");
+if (TARGET_FMA)
+ ADD_TARGET_INFO ("target_feature", "fma");
+if (TARGET_RTM)
+ ADD_TARGET_INFO ("target_feature", "rtm");
+if (TARGET_SSE4A)
+ ADD_TARGET_INFO ("target_feature", "sse4a");
+if (TARGET_BMI)
+ {
+ ADD_TARGET_INFO ("target_feature", "bmi1");
+ ADD_TARGET_INFO ("target_feature", "bmi");
+ }
+if (TARGET_BMI2)
+ ADD_TARGET_INFO ("target_feature", "bmi2");
+if (TARGET_LZCNT)
+ ADD_TARGET_INFO ("target_feature", "lzcnt");
+if (TARGET_TBM)
+ ADD_TARGET_INFO ("target_feature", "tbm");
+if (TARGET_POPCNT)
+ ADD_TARGET_INFO ("target_feature", "popcnt");
+if (TARGET_RDRND)
+ {
+ ADD_TARGET_INFO ("target_feature", "rdrand");
+ ADD_TARGET_INFO ("target_feature", "rdrnd");
+ }
+if (TARGET_F16C)
+ ADD_TARGET_INFO ("target_feature", "f16c");
+if (TARGET_RDSEED)
+ ADD_TARGET_INFO ("target_feature", "rdseed");
+if (TARGET_ADX)
+ ADD_TARGET_INFO ("target_feature", "adx");
+if (TARGET_FXSR)
+ ADD_TARGET_INFO ("target_feature", "fxsr");
+if (TARGET_XSAVE)
+ ADD_TARGET_INFO ("target_feature", "xsave");
+if (TARGET_XSAVEOPT)
+ ADD_TARGET_INFO ("target_feature", "xsaveopt");
+if (TARGET_XSAVEC)
+ ADD_TARGET_INFO ("target_feature", "xsavec");
+if (TARGET_XSAVES)
+ ADD_TARGET_INFO ("target_feature", "xsaves");
+if (TARGET_VPCLMULQDQ)
+ {
+ ADD_TARGET_INFO ("target_feature", "pclmulqdq");
+ ADD_TARGET_INFO ("target_feature", "vpclmulqdq");
+ }
+if (TARGET_CMPXCHG16B)
+ ADD_TARGET_INFO ("target_feature", "cmpxchg16b");
+if (TARGET_MOVBE)
+ ADD_TARGET_INFO ("target_feature", "movbe");
diff --git a/gcc/config/i386/i386-rust.cc b/gcc/config/i386/i386-rust.cc
index b9099d3..de00076 100644
--- a/gcc/config/i386/i386-rust.cc
+++ b/gcc/config/i386/i386-rust.cc
@@ -29,97 +29,7 @@ along with GCC; see the file COPYING3. If not see
void
ix86_rust_target_cpu_info (void)
{
- if (TARGET_64BIT)
- rust_add_target_info ("target_arch", "x86_64");
- else
- rust_add_target_info ("target_arch", "x86");
-
- // features officially "stabilised" in rustc
- if (TARGET_MMX)
- rust_add_target_info ("target_feature", "mmx");
- if (TARGET_SSE)
- rust_add_target_info ("target_feature", "sse");
- if (TARGET_SSE2)
- rust_add_target_info ("target_feature", "sse2");
- if (TARGET_SSE3)
- rust_add_target_info ("target_feature", "sse3");
- if (TARGET_SSSE3)
- rust_add_target_info ("target_feature", "ssse3");
- if (TARGET_SSE4_1)
- rust_add_target_info ("target_feature", "sse4.1");
- if (TARGET_SSE4_2)
- rust_add_target_info ("target_feature", "sse4.2");
- if (TARGET_AES)
- rust_add_target_info ("target_feature", "aes");
- if (TARGET_SHA)
- rust_add_target_info ("target_feature", "sha");
- if (TARGET_AVX)
- rust_add_target_info ("target_feature", "avx");
- if (TARGET_AVX2)
- rust_add_target_info ("target_feature", "avx2");
- if (TARGET_AVX512F)
- rust_add_target_info ("target_feature", "avx512f");
- if (TARGET_AVX512CD)
- rust_add_target_info ("target_feature", "avx512cd");
- if (TARGET_AVX512DQ)
- rust_add_target_info ("target_feature", "avx512dq");
- if (TARGET_AVX512BW)
- rust_add_target_info ("target_feature", "avx512bw");
- if (TARGET_AVX512VL)
- rust_add_target_info ("target_feature", "avx512vl");
- if (TARGET_AVX512VBMI)
- rust_add_target_info ("target_feature", "avx512vbmi");
- if (TARGET_AVX512IFMA)
- rust_add_target_info ("target_feature", "avx512ifma");
- if (TARGET_AVX512VPOPCNTDQ)
- rust_add_target_info ("target_feature", "avx512vpopcntdq");
- if (TARGET_FMA)
- rust_add_target_info ("target_feature", "fma");
- if (TARGET_RTM)
- rust_add_target_info ("target_feature", "rtm");
- if (TARGET_SSE4A)
- rust_add_target_info ("target_feature", "sse4a");
- if (TARGET_BMI)
- {
- rust_add_target_info ("target_feature", "bmi1");
- rust_add_target_info ("target_feature", "bmi");
- }
- if (TARGET_BMI2)
- rust_add_target_info ("target_feature", "bmi2");
- if (TARGET_LZCNT)
- rust_add_target_info ("target_feature", "lzcnt");
- if (TARGET_TBM)
- rust_add_target_info ("target_feature", "tbm");
- if (TARGET_POPCNT)
- rust_add_target_info ("target_feature", "popcnt");
- if (TARGET_RDRND)
- {
- rust_add_target_info ("target_feature", "rdrand");
- rust_add_target_info ("target_feature", "rdrnd");
- }
- if (TARGET_F16C)
- rust_add_target_info ("target_feature", "f16c");
- if (TARGET_RDSEED)
- rust_add_target_info ("target_feature", "rdseed");
- if (TARGET_ADX)
- rust_add_target_info ("target_feature", "adx");
- if (TARGET_FXSR)
- rust_add_target_info ("target_feature", "fxsr");
- if (TARGET_XSAVE)
- rust_add_target_info ("target_feature", "xsave");
- if (TARGET_XSAVEOPT)
- rust_add_target_info ("target_feature", "xsaveopt");
- if (TARGET_XSAVEC)
- rust_add_target_info ("target_feature", "xsavec");
- if (TARGET_XSAVES)
- rust_add_target_info ("target_feature", "xsaves");
- if (TARGET_VPCLMULQDQ)
- {
- rust_add_target_info ("target_feature", "pclmulqdq");
- rust_add_target_info ("target_feature", "vpclmulqdq");
- }
- if (TARGET_CMPXCHG16B)
- rust_add_target_info ("target_feature", "cmpxchg16b");
- if (TARGET_MOVBE)
- rust_add_target_info ("target_feature", "movbe");
+#define ADD_TARGET_INFO rust_add_target_info
+#include "i386-rust-and-jit.inc"
+#undef ADD_TARGET_INFO
}
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index be5e27f..18127bc 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -16668,7 +16668,7 @@ ix86_fp_compare_code_to_integer (enum rtx_code code)
return NE;
case EQ:
case NE:
- if (TARGET_AVX10_2_256)
+ if (TARGET_AVX10_2)
return code;
/* FALLTHRU. */
default:
@@ -25055,7 +25055,7 @@ ix86_get_mask_mode (machine_mode data_mode)
to kmask for _Float16. */
|| (TARGET_AVX512VL && TARGET_AVX512FP16
&& GET_MODE_INNER (data_mode) == E_HFmode)
- || (TARGET_AVX10_2_256 && GET_MODE_INNER (data_mode) == E_BFmode))
+ || (TARGET_AVX10_2 && GET_MODE_INNER (data_mode) == E_BFmode))
{
if (elem_size == 4
|| elem_size == 8
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index ce29c27..13da3d8 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1176,7 +1176,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#define SSE_FLOAT_MODE_SSEMATH_OR_HFBF_P(MODE) \
((SSE_FLOAT_MODE_P (MODE) && TARGET_SSE_MATH) \
|| (TARGET_AVX512FP16 && (MODE) == HFmode) \
- || (TARGET_AVX10_2_256 && (MODE) == BFmode))
+ || (TARGET_AVX10_2 && (MODE) == BFmode))
#define FMA4_VEC_FLOAT_MODE_P(MODE) \
(TARGET_FMA4 && ((MODE) == V4SFmode || (MODE) == V2DFmode \
@@ -2449,9 +2449,9 @@ constexpr wide_int_bitmask PTA_DIAMONDRAPIDS = PTA_SKYLAKE | PTA_PKU | PTA_SHA
| PTA_WBNOINVD | PTA_CLWB | PTA_MOVDIRI | PTA_MOVDIR64B | PTA_ENQCMD
| PTA_CLDEMOTE | PTA_PTWRITE | PTA_WAITPKG | PTA_SERIALIZE | PTA_TSXLDTRK
| PTA_AMX_TILE | PTA_AMX_INT8 | PTA_AMX_BF16 | PTA_UINTR | PTA_AVXVNNI
- | PTA_AMX_FP16 | PTA_PREFETCHI | PTA_AMX_COMPLEX | PTA_AVX10_1_512
+ | PTA_AMX_FP16 | PTA_PREFETCHI | PTA_AMX_COMPLEX | PTA_AVX10_1
| PTA_AVXIFMA | PTA_AVXNECONVERT | PTA_AVXVNNIINT16 | PTA_AVXVNNIINT8
- | PTA_CMPCCXADD | PTA_SHA512 | PTA_SM3 | PTA_SM4 | PTA_AVX10_2_512
+ | PTA_CMPCCXADD | PTA_SHA512 | PTA_SM3 | PTA_SM4 | PTA_AVX10_2
| PTA_APX_F | PTA_AMX_AVX512 | PTA_AMX_FP8 | PTA_AMX_TF32 | PTA_AMX_TRANSPOSE
| PTA_MOVRS | PTA_AMX_MOVRS | PTA_USER_MSR;
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 8c7beaf..2b3cffc 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -984,7 +984,7 @@
(symbol_ref "TARGET_APX_NDD && Pmode == DImode")
(eq_attr "isa" "vaes_avx512vl")
(symbol_ref "TARGET_VAES && TARGET_AVX512VL")
- (eq_attr "isa" "avx10_2") (symbol_ref "TARGET_AVX10_2_256")
+ (eq_attr "isa" "avx10_2") (symbol_ref "TARGET_AVX10_2")
(eq_attr "mmx_isa" "native")
(symbol_ref "!TARGET_MMX_WITH_SSE")
@@ -1819,7 +1819,7 @@
(pc)))]
"TARGET_80387 || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH)"
{
- if (TARGET_AVX10_2_256 && !flag_trapping_math)
+ if (TARGET_AVX10_2 && !flag_trapping_math)
ix86_expand_branch (GET_CODE (operands[0]),
operands[1], operands[2], operands[3]);
else
@@ -1861,7 +1861,7 @@
"TARGET_80387 || (SSE_FLOAT_MODE_P (SFmode) && TARGET_SSE_MATH)"
{
rtx op2 = operands[2], op3 = operands[3];
- if (!TARGET_AVX10_2_256 || flag_trapping_math)
+ if (!TARGET_AVX10_2 || flag_trapping_math)
{
op2 = ix86_expand_fast_convert_bf_to_sf (operands[2]);
op3 = ix86_expand_fast_convert_bf_to_sf (operands[3]);
@@ -2042,7 +2042,7 @@
(match_operand:MODEF 0 "register_operand" "v")
(match_operand:MODEF 1 "nonimmediate_operand" "vm"))]
UNSPEC_OPTCOMX))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"%v<unord>comx<MODEF:ssemodesuffix>\t{%1, %0|%0, %1}"
[(set_attr "type" "ssecomi")
(set_attr "prefix" "evex")
@@ -2055,7 +2055,7 @@
(match_operand:HF 0 "register_operand" "v")
(match_operand:HF 1 "nonimmediate_operand" "vm"))]
UNSPEC_OPTCOMX))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"v<unord>comxsh\t{%1, %0|%0, %1}"
[(set_attr "type" "ssecomi")
(set_attr "prefix" "evex")
@@ -2114,7 +2114,7 @@
(compare:CCFP
(match_operand:BF 0 "register_operand" "v")
(match_operand:BF 1 "nonimmediate_operand" "vm")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcomisbf16\t{%1, %0|%0, %1}"
[(set_attr "type" "ssecomi")
(set_attr "prefix" "evex")
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index 9dc6073..27d34bd 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -1356,7 +1356,7 @@ Target Var(ix86_apx_inline_asm_use_gpr32) Init(0)
Enable GPR32 in inline asm when APX_F enabled.
mevex512
-Target Mask(ISA2_EVEX512) Var(ix86_isa_flags2) Save
+Target Mask(ISA2_EVEX512) Var(ix86_isa_flags2) Save Warn(%<-mevex512%> will be deprecated in GCC 16 due to all machines 512 bit vector size supported)
Support 512 bit vector built-in functions and code generation.
musermsr
@@ -1364,34 +1364,29 @@ Target Mask(ISA2_USER_MSR) Var(ix86_isa_flags2) Save
Support USER_MSR built-in functions and code generation.
mavx10.1-256
-Target Mask(ISA2_AVX10_1_256) Var(ix86_isa_flags2) Save
+Target Mask(ISA2_AVX10_1_256) Var(ix86_isa_flags2) Save Warn(%<-mavx10.1%> is aliased to 512 bit since GCC14.3 and GCC15.1 while %<-mavx10.1-256%> and %<-mavx10.1-512%> will be deprecated in GCC 16 due to all machines 512 bit vector size supported)
Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
-and AVX10.1 built-in functions and code generation.
+and AVX10.1-256 built-in functions and code generation.
-mavx10.1-512
-Target Mask(ISA2_AVX10_1_512) Var(ix86_isa_flags2) Save
+mavx10.1
+Target Mask(ISA2_AVX10_1) Var(ix86_isa_flags2) Save Warn(%<-mavx10.1%> is aliased to 512 bit since GCC14.3 and GCC15.1 while %<-mavx10.1-256%> and %<-mavx10.1-512%> will be deprecated in GCC 16 due to all machines 512 bit vector size supported)
Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
and AVX10.1-512 built-in functions and code generation.
-mavx10.2-256
-Target RejectNegative Mask(ISA2_AVX10_2_256) Var(ix86_isa_flags2) Save
+mavx10.1-512
+Target Alias(mavx10.1)
Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
-AVX10.1 and AVX10.2 built-in functions and code generation.
+and AVX10.1-512 built-in functions and code generation.
mavx10.2
-Target Mask(ISA2_AVX10_2_512) Var(ix86_isa_flags2) Save
-Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
-AVX10.1-512 and AVX10.2-512 built-in functions and code generation.
-
-mavx10.2-512
-Target RejectNegative Alias(mavx10.2)
+Target Mask(ISA2_AVX10_2) Var(ix86_isa_flags2) Save
Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2,
-AVX10.1-512 and AVX10.2-512 built-in functions and code generation.
+AVX10.1-512 and AVX10.2 built-in functions and code generation.
mamx-avx512
Target Mask(ISA2_AMX_AVX512) Var(ix86_isa_flags2) Save
Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX10.1-512,
-AVX10.2-512 and AMX-AVX512 built-in functions and code generation.
+AVX10.2 and AMX-AVX512 built-in functions and code generation.
mamx-tf32
Target Mask(ISA2_AMX_TF32) Var(ix86_isa_flags2) Save
diff --git a/gcc/config/i386/i386.opt.urls b/gcc/config/i386/i386.opt.urls
index ee68061..0d5a5a1 100644
--- a/gcc/config/i386/i386.opt.urls
+++ b/gcc/config/i386/i386.opt.urls
@@ -599,18 +599,15 @@ UrlSuffix(gcc/x86-Options.html#index-musermsr)
mavx10.1-256
UrlSuffix(gcc/x86-Options.html#index-mavx10_002e1-256)
+mavx10.1
+UrlSuffix(gcc/x86-Options.html#index-mavx10_002e1)
+
mavx10.1-512
UrlSuffix(gcc/x86-Options.html#index-mavx10_002e1-512)
-mavx10.2-256
-UrlSuffix(gcc/x86-Options.html#index-mavx10_002e2-256)
-
mavx10.2
UrlSuffix(gcc/x86-Options.html#index-mavx10_002e2)
-mavx10.2-512
-UrlSuffix(gcc/x86-Options.html#index-mavx10_002e2-512)
-
mamx-avx512
UrlSuffix(gcc/x86-Options.html#index-mamx-avx512)
diff --git a/gcc/config/i386/immintrin.h b/gcc/config/i386/immintrin.h
index 6907a2c..c30a4e0 100644
--- a/gcc/config/i386/immintrin.h
+++ b/gcc/config/i386/immintrin.h
@@ -146,8 +146,6 @@
#include <amxfp16intrin.h>
-#include <avx10_2roundingintrin.h>
-
#include <avx10_2mediaintrin.h>
#include <avx10_2-512mediaintrin.h>
diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md
index e518999..7920232 100644
--- a/gcc/config/i386/mmx.md
+++ b/gcc/config/i386/mmx.md
@@ -2117,7 +2117,7 @@
(plusminusmultdiv:VBF_32_64
(match_operand:VBF_32_64 1 "nonimmediate_operand")
(match_operand:VBF_32_64 2 "nonimmediate_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
rtx op0 = gen_reg_rtx (V8BFmode);
rtx op1 = lowpart_subreg (V8BFmode,
@@ -2176,7 +2176,7 @@
(smaxmin:VBF_32_64
(match_operand:VBF_32_64 1 "nonimmediate_operand")
(match_operand:VBF_32_64 2 "nonimmediate_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
rtx op0 = gen_reg_rtx (V8BFmode);
rtx op1 = lowpart_subreg (V8BFmode,
@@ -2208,7 +2208,7 @@
(define_expand "sqrt<mode>2"
[(set (match_operand:VBF_32_64 0 "register_operand")
(sqrt:VBF_32_64 (match_operand:VBF_32_64 1 "vector_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
rtx op0 = gen_reg_rtx (V8BFmode);
rtx op1 = lowpart_subreg (V8BFmode,
@@ -2369,7 +2369,7 @@
(match_operator:QI 1 ""
[(match_operand:VBF_32_64 2 "register_operand")
(match_operand:VBF_32_64 3 "nonimmediate_operand")]))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
rtx op2 = lowpart_subreg (V8BFmode,
force_reg (<MODE>mode, operands[2]), <MODE>mode);
@@ -2788,7 +2788,7 @@
(match_operand:VBF_32_64 1 "nonimmediate_operand")
(match_operand:VBF_32_64 2 "nonimmediate_operand")
(match_operand:VBF_32_64 3 "nonimmediate_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
rtx op0 = gen_reg_rtx (V8BFmode);
rtx op1 = lowpart_subreg (V8BFmode, force_reg (<MODE>mode, operands[1]), <MODE>mode);
@@ -2808,7 +2808,7 @@
(match_operand:VBF_32_64 2 "nonimmediate_operand")
(neg:VBF_32_64
(match_operand:VBF_32_64 3 "nonimmediate_operand"))))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
rtx op0 = gen_reg_rtx (V8BFmode);
rtx op1 = lowpart_subreg (V8BFmode, force_reg (<MODE>mode, operands[1]), <MODE>mode);
@@ -2828,7 +2828,7 @@
(match_operand:VBF_32_64 1 "nonimmediate_operand"))
(match_operand:VBF_32_64 2 "nonimmediate_operand")
(match_operand:VBF_32_64 3 "nonimmediate_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
rtx op0 = gen_reg_rtx (V8BFmode);
rtx op1 = lowpart_subreg (V8BFmode, force_reg (<MODE>mode, operands[1]), <MODE>mode);
@@ -2849,7 +2849,7 @@
(match_operand:VBF_32_64 2 "nonimmediate_operand")
(neg:VBF_32_64
(match_operand:VBF_32_64 3 "nonimmediate_operand"))))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
rtx op0 = gen_reg_rtx (V8BFmode);
rtx op1 = lowpart_subreg (V8BFmode, force_reg (<MODE>mode, operands[1]), <MODE>mode);
diff --git a/gcc/config/i386/movrsintrin.h b/gcc/config/i386/movrsintrin.h
index b29d643..9127442 100644
--- a/gcc/config/i386/movrsintrin.h
+++ b/gcc/config/i386/movrsintrin.h
@@ -79,7 +79,7 @@ _movrs_i64 (void const * __P)
#ifdef __x86_64__
-#if !defined (__AVX10_2_256__) || !defined (__MOVRS__)
+#if !defined (__AVX10_2__) || !defined (__MOVRS__)
#pragma GCC push_options
#pragma GCC target("avx10.2,movrs")
#define __DISABLE_MOVRS_AVX10_2__
@@ -317,17 +317,6 @@ _mm_maskz_loadrs_epi16 (__mmask8 __U, void const *__A)
(__mmask8) __U);
}
-#ifdef __DISABLE_MOVRS_AVX10_2__
-#undef __DISABLE_MOVRS_AVX10_2__
-#pragma GCC pop_options
-#endif /* __DISABLE_MOVRS_AVX10_2__ */
-
-#if !defined (__AVX10_2_512__) || !defined (__MOVRS__)
-#pragma GCC push_options
-#pragma GCC target("avx10.2-512,movrs")
-#define __DISABLE_MOVRS_AVX10_2_512__
-#endif /* __MOVRS_AVX10_2_512__ */
-
extern __inline __m512i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm512_loadrs_epi8 (void const *__A)
@@ -443,10 +432,10 @@ _mm512_maskz_loadrs_epi16 (__mmask32 __U, void const *__A)
(__mmask32) __U);
}
-#ifdef __DISABLE_MOVRS_AVX10_2_512__
-#undef __DISABLE_MOVRS_AVX10_2_512__
+#ifdef __DISABLE_MOVRS_AVX10_2__
+#undef __DISABLE_MOVRS_AVX10_2__
#pragma GCC pop_options
-#endif /* __DISABLE_MOVRS_AVX10_2_512__ */
+#endif /* __DISABLE_MOVRS_AVX10_2__ */
#endif /* __x86_64__ */
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index 8631588..3d3848c 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -1629,7 +1629,7 @@
;; Return true if this comparison only requires testing one flag bit.
;; VCOMX/VUCOMX set ZF, SF, OF, differently from COMI/UCOMI.
(define_predicate "ix86_trivial_fp_comparison_operator"
- (if_then_else (match_test "TARGET_AVX10_2_256")
+ (if_then_else (match_test "TARGET_AVX10_2")
(match_code "gt,ge,unlt,unle,eq,uneq,ne,ltgt,ordered,unordered")
(match_code "gt,ge,unlt,unle,uneq,ltgt,ordered,unordered")))
diff --git a/gcc/config/i386/sm4intrin.h b/gcc/config/i386/sm4intrin.h
index 29d1d4c..af7a1c3 100644
--- a/gcc/config/i386/sm4intrin.h
+++ b/gcc/config/i386/sm4intrin.h
@@ -67,9 +67,9 @@ _mm256_sm4rnds4_epi32 (__m256i __A, __m256i __B)
#pragma GCC pop_options
#endif /* __DISABLE_SM4__ */
-#if !defined (__SM4__) || !defined (__AVX10_2_512__)
+#if !defined (__SM4__) || !defined (__AVX10_2__)
#pragma GCC push_options
-#pragma GCC target("sm4,avx10.2-512")
+#pragma GCC target("sm4,avx10.2")
#define __DISABLE_SM4_512__
#endif /* __SM4_512__ */
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index 70c2cf3..ee2a482 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -382,8 +382,8 @@
(V2DF "TARGET_AVX512DQ && TARGET_AVX512VL")])
(define_mode_iterator VF1_VF2_AVX10_2
- [(V16SF "TARGET_AVX10_2_512") V8SF V4SF
- (V8DF "TARGET_AVX10_2_512") V4DF V2DF])
+ [(V16SF "TARGET_AVX10_2") V8SF V4SF
+ (V8DF "TARGET_AVX10_2") V4DF V2DF])
(define_mode_iterator VFH
[(V32HF "TARGET_AVX512FP16 && TARGET_EVEX512")
@@ -401,9 +401,9 @@
(V8SF "TARGET_AVX") V4SF
(V8DF "TARGET_AVX512F && TARGET_EVEX512")
(V4DF "TARGET_AVX") (V2DF "TARGET_SSE2")
- (V32BF "TARGET_AVX10_2_512")
- (V16BF "TARGET_AVX10_2_256")
- (V8BF "TARGET_AVX10_2_256")
+ (V32BF "TARGET_AVX10_2")
+ (V16BF "TARGET_AVX10_2")
+ (V8BF "TARGET_AVX10_2")
])
;; 128-, 256- and 512-bit float vector modes for bitwise operations
@@ -447,13 +447,13 @@
[(V8DF "TARGET_AVX512F && TARGET_EVEX512") (V4DF "TARGET_AVX") V2DF])
(define_mode_iterator VF2_AVX10_2
- [(V8DF "TARGET_AVX10_2_512") V4DF V2DF])
+ [(V8DF "TARGET_AVX10_2") V4DF V2DF])
;; All DFmode & HFmode & BFmode vector float modes
(define_mode_iterator VF2HB
- [(V32BF "TARGET_AVX10_2_512")
- (V16BF "TARGET_AVX10_2_256")
- (V8BF "TARGET_AVX10_2_256")
+ [(V32BF "TARGET_AVX10_2")
+ (V16BF "TARGET_AVX10_2")
+ (V8BF "TARGET_AVX10_2")
(V32HF "TARGET_AVX512FP16 && TARGET_EVEX512")
(V16HF "TARGET_AVX512FP16 && TARGET_AVX512VL")
(V8HF "TARGET_AVX512FP16 && TARGET_AVX512VL")
@@ -511,10 +511,10 @@
(V8DI "TARGET_EVEX512") (V4DI "TARGET_AVX512VL") (V2DI "TARGET_AVX512VL")])
(define_mode_iterator VI1248_AVX10_2
- [(V64QI "TARGET_AVX10_2_512") V32QI V16QI
- (V32HI "TARGET_AVX10_2_512") V16HI V8HI
- (V16SI "TARGET_AVX10_2_512") V8SI V4SI
- (V8DI "TARGET_AVX10_2_512") V4DI V2DI])
+ [(V64QI "TARGET_AVX10_2") V32QI V16QI
+ (V32HI "TARGET_AVX10_2") V16HI V8HI
+ (V16SI "TARGET_AVX10_2") V8SI V4SI
+ (V8DI "TARGET_AVX10_2") V4DI V2DI])
(define_mode_iterator VF_AVX512VL
[(V16SF "TARGET_EVEX512") (V8SF "TARGET_AVX512VL") (V4SF "TARGET_AVX512VL")
@@ -528,9 +528,9 @@
(V8DF "TARGET_EVEX512") (V4DF "TARGET_AVX512VL") (V2DF "TARGET_AVX512VL")])
(define_mode_iterator VFH_AVX10_2
- [(V32HF "TARGET_AVX10_2_512") V16HF V8HF
- (V16SF "TARGET_AVX10_2_512") V8SF V4SF
- (V8DF "TARGET_AVX10_2_512") V4DF V2DF])
+ [(V32HF "TARGET_AVX10_2") V16HF V8HF
+ (V16SF "TARGET_AVX10_2") V8SF V4SF
+ (V8DF "TARGET_AVX10_2") V4DF V2DF])
(define_mode_iterator VF2_AVX512VL
[(V8DF "TARGET_EVEX512") (V4DF "TARGET_AVX512VL") (V2DF "TARGET_AVX512VL")])
@@ -542,7 +542,7 @@
[(V16SF "TARGET_AVX512BW && TARGET_EVEX512") (V8SF "TARGET_AVX2") V4SF])
(define_mode_iterator VF1_AVX10_2
- [(V16SF "TARGET_AVX10_2_512") V8SF V4SF])
+ [(V16SF "TARGET_AVX10_2") V8SF V4SF])
(define_mode_iterator VHFBF
[(V32HF "TARGET_EVEX512") V16HF V8HF
@@ -558,10 +558,10 @@
(V32BF "TARGET_EVEX512") (V16BF "TARGET_AVX512VL") (V8BF "TARGET_AVX512VL")])
(define_mode_iterator VHF_AVX10_2
- [(V32HF "TARGET_AVX10_2_512") V16HF V8HF])
+ [(V32HF "TARGET_AVX10_2") V16HF V8HF])
(define_mode_iterator VBF_AVX10_2
- [(V32BF "TARGET_AVX10_2_512") V16BF V8BF])
+ [(V32BF "TARGET_AVX10_2") V16BF V8BF])
;; All vector integer modes
(define_mode_iterator VI
@@ -614,7 +614,7 @@
[(V8DI "TARGET_AVX512F && TARGET_EVEX512") (V4DI "TARGET_AVX") V2DI])
(define_mode_iterator VI8_AVX10_2
- [(V8DI "TARGET_AVX10_2_512") V4DI V2DI])
+ [(V8DI "TARGET_AVX10_2") V4DI V2DI])
(define_mode_iterator VI8_FVL
[(V8DI "TARGET_AVX512F && TARGET_EVEX512") V4DI (V2DI "TARGET_AVX512VL")])
@@ -659,7 +659,7 @@
(V16HI "TARGET_AVX2") V8HI])
(define_mode_iterator VI2_AVX10_2
- [(V32HI "TARGET_AVX10_2_512") V16HI V8HI])
+ [(V32HI "TARGET_AVX10_2") V16HI V8HI])
(define_mode_iterator VI4_AVX
[(V8SI "TARGET_AVX") V4SI])
@@ -674,7 +674,7 @@
[(V16SI "TARGET_EVEX512") (V8SI "TARGET_AVX512VL") (V4SI "TARGET_AVX512VL")])
(define_mode_iterator VI4_AVX10_2
- [(V16SI "TARGET_AVX10_2_512") V8SI V4SI])
+ [(V16SI "TARGET_AVX10_2") V8SI V4SI])
(define_mode_iterator VI48_AVX512F_AVX512VL
[V4SI V8SI (V16SI "TARGET_AVX512F && TARGET_EVEX512")
@@ -2649,7 +2649,7 @@
(plusminus:VF_BHSD
(match_operand:VF_BHSD 1 "<round_nimm_predicate>")
(match_operand:VF_BHSD 2 "<round_nimm_predicate>")))]
- "TARGET_SSE && <mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_SSE && <mask_mode512bit_condition> && <round_mode512bit_condition>"
"ix86_fixup_binary_operands_no_copy (<CODE>, <MODE>mode, operands);")
(define_insn "*<insn><mode>3<mask_name><round_name>"
@@ -2658,7 +2658,7 @@
(match_operand:VFH 1 "<bcst_round_nimm_predicate>" "<comm>0,v")
(match_operand:VFH 2 "<bcst_round_nimm_predicate>" "xBm,<bcst_round_constraint>")))]
"TARGET_SSE && ix86_binary_operator_ok (<CODE>, <MODE>mode, operands)
- && <mask_mode512bit_condition> && <round_mode_condition>"
+ && <mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
<plusminus_mnemonic><ssemodesuffix>\t{%2, %0|%0, %2}
v<plusminus_mnemonic><ssemodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2<round_mask_op3>}"
@@ -2738,7 +2738,7 @@
(mult:VF_BHSD
(match_operand:VF_BHSD 1 "<round_nimm_predicate>")
(match_operand:VF_BHSD 2 "<round_nimm_predicate>")))]
- "TARGET_SSE && <mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_SSE && <mask_mode512bit_condition> && <round_mode512bit_condition>"
"ix86_fixup_binary_operands_no_copy (MULT, <MODE>mode, operands);")
(define_insn "*mul<mode>3<mask_name><round_name>"
@@ -2747,7 +2747,7 @@
(match_operand:VFH 1 "<bcst_round_nimm_predicate>" "%0,v")
(match_operand:VFH 2 "<bcst_round_nimm_predicate>" "xBm,<bcst_round_constraint>")))]
"TARGET_SSE && ix86_binary_operator_ok (MULT, <MODE>mode, operands)
- && <mask_mode512bit_condition> && <round_mode_condition>"
+ && <mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
mul<ssemodesuffix>\t{%2, %0|%0, %2}
vmul<ssemodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2<round_mask_op3>}"
@@ -2857,7 +2857,7 @@
(div:VBF_AVX10_2
(match_operand:VBF_AVX10_2 1 "register_operand")
(match_operand:VBF_AVX10_2 2 "vector_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
if (TARGET_RECIP_VEC_DIV
&& optimize_insn_for_speed_p ()
@@ -2895,7 +2895,7 @@
(div:VFH
(match_operand:VFH 1 "register_operand" "0,v")
(match_operand:VFH 2 "<bcst_round_nimm_predicate>" "xBm,<bcst_round_constraint>")))]
- "TARGET_SSE && <mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_SSE && <mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
div<ssemodesuffix>\t{%2, %0|%0, %2}
vdiv<ssemodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2<round_mask_op3>}"
@@ -3061,7 +3061,7 @@
(define_insn "<sse>_sqrt<mode>2<mask_name><round_name>"
[(set (match_operand:VFH 0 "register_operand" "=x,v")
(sqrt:VFH (match_operand:VFH 1 "<round_nimm_predicate>" "xBm,<round_constraint>")))]
- "TARGET_SSE && <mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_SSE && <mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
sqrt<ssemodesuffix>\t{%1, %0|%0, %1}
vsqrt<ssemodesuffix>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
@@ -3277,7 +3277,7 @@
(match_operand:VFH 1 "<round_saeonly_nimm_predicate>")
(match_operand:VFH 2 "<round_saeonly_nimm_predicate>")))]
"TARGET_SSE && <mask_mode512bit_condition>
- && <round_saeonly_mode_condition>"
+ && <round_saeonly_mode512bit_condition>"
{
if (!flag_finite_math_only || flag_signed_zeros)
{
@@ -3305,7 +3305,7 @@
"TARGET_SSE
&& !(MEM_P (operands[1]) && MEM_P (operands[2]))
&& <mask_mode512bit_condition>
- && <round_saeonly_mode_condition>"
+ && <round_saeonly_mode512bit_condition>"
"@
<maxmin_float><ssemodesuffix>\t{%2, %0|%0, %2}
v<maxmin_float><ssemodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2<round_saeonly_mask_op3>}"
@@ -3392,7 +3392,7 @@
IEEE_MAXMIN))]
"TARGET_SSE
&& <mask_mode512bit_condition>
- && <round_saeonly_mode_condition>"
+ && <round_saeonly_mode512bit_condition>"
"@
<ieee_maxmin><ssemodesuffix>\t{%2, %0|%0, %2}
v<ieee_maxmin><ssemodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2<round_saeonly_mask_op3>}"
@@ -4021,7 +4021,7 @@
[(match_operand:VFH_AVX512VL 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")
(match_operand:SI 2 "const_0_to_255_operand")]
UNSPEC_REDUCE))]
- "(TARGET_AVX512DQ || (VALID_AVX512FP16_REG_MODE (<MODE>mode))) && <round_saeonly_mode_condition>"
+ "TARGET_AVX512DQ || (VALID_AVX512FP16_REG_MODE (<MODE>mode))"
"vreduce<ssemodesuffix>\t{%2, <round_saeonly_mask_op3>%1, %0<mask_operand3>|%0<mask_operand3>, %1<round_saeonly_mask_op3>, %2}"
[(set_attr "type" "sse")
(set_attr "prefix" "evex")
@@ -4391,7 +4391,7 @@
(match_operand:V48H_AVX512VL 2 "nonimmediate_operand" "<round_saeonly_constraint>")
(match_operand:SI 3 "<cmp_imm_predicate>" "n")]
UNSPEC_PCMP))]
- "TARGET_AVX512F && <round_saeonly_mode_condition>"
+ "TARGET_AVX512F && <round_saeonly_mode512bit_condition>"
"v<ssecmpintprefix>cmp<ssemodesuffix>\t{%3, <round_saeonly_mask_scalar_merge_op4>%2, %1, %0<mask_scalar_merge_operand4>|%0<mask_scalar_merge_operand4>, %1, %2<round_saeonly_mask_scalar_merge_op4>, %3}"
[(set_attr "type" "ssecmp")
(set_attr "length_immediate" "1")
@@ -4850,7 +4850,7 @@
(match_operand:<ssevecmode> 1 "<round_saeonly_nimm_scalar_predicate>" "<round_saeonly_constraint>")
(parallel [(const_int 0)]))]
UNSPEC_COMX))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"v<unord>comx<ssemodesuffix>\t{<round_saeonly_op2>%1, %0|%0, %<iptr>1<round_saeonly_op2>}"
[(set_attr "type" "ssecomi")
(set_attr "prefix" "evex")
@@ -4885,7 +4885,7 @@
(vec_select:BF
(match_operand:V8BF 1 "nonimmediate_operand" "vm")
(parallel [(const_int 0)]))))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcomisbf16\t{%1, %0|%0, %1}"
[(set_attr "prefix" "evex")
(set_attr "type" "ssecomi")])
@@ -4921,7 +4921,7 @@
(match_operator:<avx512fmaskmode> 1 ""
[(match_operand:VBF_AVX10_2 2 "register_operand")
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand")]))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
bool ok = ix86_expand_mask_vec_cmp (operands[0], GET_CODE (operands[1]),
operands[2], operands[3]);
@@ -5813,9 +5813,9 @@
(V8HF "TARGET_AVX512FP16 && TARGET_AVX512VL")
(V16HF "TARGET_AVX512FP16 && TARGET_AVX512VL")
(V32HF "TARGET_AVX512FP16 && TARGET_EVEX512")
- (V8BF "TARGET_AVX10_2_256")
- (V16BF "TARGET_AVX10_2_256")
- (V32BF "TARGET_AVX10_2_512")])
+ (V8BF "TARGET_AVX10_2")
+ (V16BF "TARGET_AVX10_2")
+ (V32BF "TARGET_AVX10_2")])
(define_expand "fma<mode>4"
[(set (match_operand:FMAMODEM 0 "register_operand")
@@ -5897,7 +5897,7 @@
(match_operand:VFH_AVX512VL 2 "<round_expand_nimm_predicate>")
(match_operand:VFH_AVX512VL 3 "<round_expand_nimm_predicate>")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
{
emit_insn (gen_fma_fmadd_<mode>_maskz_1<round_expand_name> (
operands[0], operands[1], operands[2], operands[3],
@@ -5939,7 +5939,7 @@
(match_operand:VFH_SF_AVX512VL 1 "<bcst_round_nimm_predicate>" "%0,0,v")
(match_operand:VFH_SF_AVX512VL 2 "<bcst_round_nimm_predicate>" "<bcst_round_constraint>,v,<bcst_round_constraint>")
(match_operand:VFH_SF_AVX512VL 3 "<bcst_round_nimm_predicate>" "v,<bcst_round_constraint>,0")))]
- "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfmadd132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
vfmadd213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
@@ -5980,7 +5980,7 @@
(match_operand:VFH_AVX512VL 3 "<round_nimm_predicate>" "v,<round_constraint>"))
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
"@
vfmadd132<ssemodesuffix>\t{<round_op5>%2, %3, %0%{%4%}|%0%{%4%}, %3, %2<round_op5>}
vfmadd213<ssemodesuffix>\t{<round_op5>%3, %2, %0%{%4%}|%0%{%4%}, %2, %3<round_op5>}"
@@ -5997,7 +5997,7 @@
(match_operand:VFH_AVX512VL 3 "nonimmediate_operand" "0"))
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F"
"vfmadd231<ssemodesuffix>\t{<round_op5>%2, %1, %0%{%4%}|%0%{%4%}, %1, %2<round_op5>}"
[(set_attr "type" "ssemuladd")
(set_attr "prefix" "evex")
@@ -6027,7 +6027,7 @@
(match_operand:VFH_AVX512VL 2 "<round_expand_nimm_predicate>")
(match_operand:VFH_AVX512VL 3 "<round_expand_nimm_predicate>")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
{
emit_insn (gen_fma_fmsub_<mode>_maskz_1<round_expand_name> (
operands[0], operands[1], operands[2], operands[3],
@@ -6042,7 +6042,7 @@
(match_operand:VFH_SF_AVX512VL 2 "<bcst_round_nimm_predicate>" "<bcst_round_constraint>,v,<bcst_round_constraint>")
(neg:VFH_SF_AVX512VL
(match_operand:VFH_SF_AVX512VL 3 "<bcst_round_nimm_predicate>" "v,<bcst_round_constraint>,0"))))]
- "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfmsub132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
vfmsub213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
@@ -6085,7 +6085,7 @@
(match_operand:VFH_AVX512VL 3 "<round_nimm_predicate>" "v,<round_constraint>")))
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F"
"@
vfmsub132<ssemodesuffix>\t{<round_op5>%2, %3, %0%{%4%}|%0%{%4%}, %3, %2<round_op5>}
vfmsub213<ssemodesuffix>\t{<round_op5>%3, %2, %0%{%4%}|%0%{%4%}, %2, %3<round_op5>}"
@@ -6103,7 +6103,7 @@
(match_operand:VFH_AVX512VL 3 "nonimmediate_operand" "0")))
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
"vfmsub231<ssemodesuffix>\t{<round_op5>%2, %1, %0%{%4%}|%0%{%4%}, %1, %2<round_op5>}"
[(set_attr "type" "ssemuladd")
(set_attr "prefix" "evex")
@@ -6133,7 +6133,7 @@
(match_operand:VFH_AVX512VL 2 "<round_expand_nimm_predicate>")
(match_operand:VFH_AVX512VL 3 "<round_expand_nimm_predicate>")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
{
emit_insn (gen_fma_fnmadd_<mode>_maskz_1<round_expand_name> (
operands[0], operands[1], operands[2], operands[3],
@@ -6148,7 +6148,7 @@
(match_operand:VFH_SF_AVX512VL 1 "<bcst_round_nimm_predicate>" "%0,0,v"))
(match_operand:VFH_SF_AVX512VL 2 "<bcst_round_nimm_predicate>" "<bcst_round_constraint>,v,<bcst_round_constraint>")
(match_operand:VFH_SF_AVX512VL 3 "<bcst_round_nimm_predicate>" "v,<bcst_round_constraint>,0")))]
- "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfnmadd132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
vfnmadd213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
@@ -6191,7 +6191,7 @@
(match_operand:VFH_AVX512VL 3 "<round_nimm_predicate>" "v,<round_constraint>"))
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
"@
vfnmadd132<ssemodesuffix>\t{<round_op5>%2, %3, %0%{%4%}|%0%{%4%}, %3, %2<round_op5>}
vfnmadd213<ssemodesuffix>\t{<round_op5>%3, %2, %0%{%4%}|%0%{%4%}, %2, %3<round_op5>}"
@@ -6209,7 +6209,7 @@
(match_operand:VFH_AVX512VL 3 "nonimmediate_operand" "0"))
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
"vfnmadd231<ssemodesuffix>\t{<round_op5>%2, %1, %0%{%4%}|%0%{%4%}, %1, %2<round_op5>}"
[(set_attr "type" "ssemuladd")
(set_attr "prefix" "evex")
@@ -6240,7 +6240,7 @@
(match_operand:VFH_AVX512VL 2 "<round_expand_nimm_predicate>")
(match_operand:VFH_AVX512VL 3 "<round_expand_nimm_predicate>")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
{
emit_insn (gen_fma_fnmsub_<mode>_maskz_1<round_expand_name> (
operands[0], operands[1], operands[2], operands[3],
@@ -6256,7 +6256,7 @@
(match_operand:VFH_SF_AVX512VL 2 "<bcst_round_nimm_predicate>" "<bcst_round_constraint>,v,<bcst_round_constraint>")
(neg:VFH_SF_AVX512VL
(match_operand:VFH_SF_AVX512VL 3 "<bcst_round_nimm_predicate>" "v,<bcst_round_constraint>,0"))))]
- "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfnmsub132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
vfnmsub213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
@@ -6301,7 +6301,7 @@
(match_operand:VFH_AVX512VL 3 "<round_nimm_predicate>" "v,<round_constraint>")))
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F && <round_mode512bit_condition>"
"@
vfnmsub132<ssemodesuffix>\t{<round_op5>%2, %3, %0%{%4%}|%0%{%4%}, %3, %2<round_op5>}
vfnmsub213<ssemodesuffix>\t{<round_op5>%3, %2, %0%{%4%}|%0%{%4%}, %2, %3<round_op5>}"
@@ -6320,7 +6320,7 @@
(match_operand:VFH_AVX512VL 3 "nonimmediate_operand" "0")))
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F"
"vfnmsub231<ssemodesuffix>\t{<round_op5>%2, %1, %0%{%4%}|%0%{%4%}, %1, %2<round_op5>}"
[(set_attr "type" "ssemuladd")
(set_attr "prefix" "evex")
@@ -6418,7 +6418,7 @@
(match_operand:VFH_AVX512VL 2 "<round_nimm_predicate>" "<round_constraint>,v,<round_constraint>")
(match_operand:VFH_AVX512VL 3 "<round_nimm_predicate>" "v,<round_constraint>,0")]
UNSPEC_FMADDSUB))]
- "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfmaddsub132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
vfmaddsub213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
@@ -6437,7 +6437,7 @@
UNSPEC_FMADDSUB)
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F"
"@
vfmaddsub132<ssemodesuffix>\t{<round_op5>%2, %3, %0%{%4%}|%0%{%4%}, %3, %2<round_op5>}
vfmaddsub213<ssemodesuffix>\t{<round_op5>%3, %2, %0%{%4%}|%0%{%4%}, %2, %3<round_op5>}"
@@ -6455,7 +6455,7 @@
UNSPEC_FMADDSUB)
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F"
"vfmaddsub231<ssemodesuffix>\t{<round_op5>%2, %1, %0%{%4%}|%0%{%4%}, %1, %2<round_op5>}"
[(set_attr "type" "ssemuladd")
(set_attr "prefix" "evex")
@@ -6488,7 +6488,7 @@
(neg:VFH_AVX512VL
(match_operand:VFH_AVX512VL 3 "<round_nimm_predicate>" "v,<round_constraint>,0"))]
UNSPEC_FMADDSUB))]
- "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_AVX512F && <sd_mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
vfmsubadd132<ssemodesuffix>\t{<round_sd_mask_op4>%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2<round_sd_mask_op4>}
vfmsubadd213<ssemodesuffix>\t{<round_sd_mask_op4>%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3<round_sd_mask_op4>}
@@ -7057,7 +7057,7 @@
(match_operand:VHF_AVX512VL 2 "<round_expand_nimm_predicate>")
(match_operand:VHF_AVX512VL 3 "<round_expand_nimm_predicate>")
(match_operand:<avx512fmaskcmode> 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
rtx op0, op1, dest;
if (<round_embedded_complex>)
@@ -7087,7 +7087,7 @@
(match_operand:VHF_AVX512VL 2 "<round_expand_nimm_predicate>")
(match_operand:VHF_AVX512VL 3 "<round_expand_nimm_predicate>")
(match_operand:<avx512fmaskcmode> 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
emit_insn (gen_fma_fmaddc_<mode>_maskz_1<round_expand_name> (
operands[0], operands[1], operands[2], operands[3],
@@ -7101,7 +7101,7 @@
(match_operand:VHF_AVX512VL 2 "<round_expand_nimm_predicate>")
(match_operand:VHF_AVX512VL 3 "<round_expand_nimm_predicate>")
(match_operand:<avx512fmaskcmode> 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
rtx op0, op1, dest;
if (<round_embedded_complex>)
@@ -7133,7 +7133,7 @@
(match_operand:VHF_AVX512VL 2 "<round_expand_nimm_predicate>")
(match_operand:VHF_AVX512VL 3 "<round_expand_nimm_predicate>")
(match_operand:<avx512fmaskcmode> 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
emit_insn (gen_fma_fcmaddc_<mode>_maskz_1<round_expand_name> (
operands[0], operands[1], operands[2], operands[3],
@@ -7157,7 +7157,7 @@
(match_operand:VHF_AVX512VL 2 "<round_nimm_predicate>" "<round_constraint>")
(match_operand:VHF_AVX512VL 3 "<round_nimm_predicate>" "0")]
UNSPEC_COMPLEX_F_C_MA))]
- "TARGET_AVX512FP16 && <sdc_mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <sdc_mask_mode512bit_condition> && <round_mode512bit_condition>"
"v<complexopname><ssemodesuffix>\t{<round_sdc_mask_op4>%2, %1, %0<sdc_mask_op4>|%0<sdc_mask_op4>, %1, %2<round_sdc_mask_op4>}"
[(set_attr "type" "ssemuladd")
(set_attr "prefix" "evex")
@@ -7295,7 +7295,7 @@
(unspec:<avx512fmaskmode>
[(match_operand:<avx512fmaskcmode> 4 "register_operand" "Yk")]
UNSPEC_COMPLEX_MASK)))]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
"v<complexopname><ssemodesuffix>\t{<round_op5>%2, %1, %0%{%4%}|%0%{%4%}, %1, %2<round_op5>}"
[(set_attr "type" "ssemuladd")
(set_attr "prefix" "evex")
@@ -7315,7 +7315,7 @@
[(match_operand:VHF_AVX512VL 1 "<round_nimm_predicate>" "<int_comm>v")
(match_operand:VHF_AVX512VL 2 "<round_nimm_predicate>" "<round_constraint>")]
UNSPEC_COMPLEX_F_C_MUL))]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
if (TARGET_DEST_FALSE_DEP_FOR_GLC
&& <maskc_dest_false_dep_for_glc_cond>)
@@ -7332,7 +7332,7 @@
(match_operand:V8HF 2 "<round_expand_nimm_predicate>")
(match_operand:V8HF 3 "<round_expand_nimm_predicate>")
(match_operand:QI 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
emit_insn (gen_avx512fp16_fma_fmaddcsh_v8hf_maskz<round_expand_name> (
operands[0], operands[1], operands[2], operands[3],
@@ -7346,7 +7346,7 @@
(match_operand:V8HF 2 "<round_expand_nimm_predicate>")
(match_operand:V8HF 3 "<round_expand_nimm_predicate>")
(match_operand:QI 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
rtx op0, op1, dest;
@@ -7376,7 +7376,7 @@
(match_operand:V8HF 2 "<round_expand_nimm_predicate>")
(match_operand:V8HF 3 "<round_expand_nimm_predicate>")
(match_operand:QI 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
emit_insn (gen_avx512fp16_fma_fcmaddcsh_v8hf_maskz<round_expand_name> (
operands[0], operands[1], operands[2], operands[3],
@@ -7390,7 +7390,7 @@
(match_operand:V8HF 2 "<round_expand_nimm_predicate>")
(match_operand:V8HF 3 "<round_expand_nimm_predicate>")
(match_operand:QI 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
rtx op0, op1, dest;
@@ -7420,7 +7420,7 @@
(match_operand:V8HF 2 "<round_expand_nimm_predicate>")
(match_operand:V8HF 3 "<round_expand_nimm_predicate>")
(match_operand:QI 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
rtx dest, op0, op1;
@@ -7450,7 +7450,7 @@
(match_operand:V8HF 2 "<round_expand_nimm_predicate>")
(match_operand:V8HF 3 "<round_expand_nimm_predicate>")
(match_operand:QI 4 "register_operand")]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16 && <round_mode512bit_condition>"
{
rtx dest, op0, op1;
@@ -7627,7 +7627,7 @@
(unspec:VI248_AVX512VL
[(match_operand:<ssePHmode> 1 "<round_nimm_predicate>" "<round_constraint>")]
UNSPEC_US_FIX_NOTRUNC))]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16"
"vcvtph2<sseintconvertsignprefix><sseintconvert>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %<iptrh>1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -7643,7 +7643,7 @@
[(set (match_operand:<ssePHmode> 0 "register_operand" "=v")
(any_float:<ssePHmode>
(match_operand:VI2H_AVX512VL 1 "<round_nimm_predicate>" "<round_constraint>")))]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16"
"vcvt<floatsuffix><sseintconvert>2ph<round_qq2phsuff>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -7681,19 +7681,6 @@
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
-(define_expand "avx512fp16_vcvt<floatsuffix>qq2ph_v4di_mask_round"
- [(match_operand:V8HF 0 "register_operand")
- (any_float:V4HF (match_operand:V4DI 1 "register_operand"))
- (match_operand:V8HF 2 "nonimm_or_0_operand")
- (match_operand:QI 3 "register_operand")
- (unspec [(match_operand:SI 4 "const_4_or_8_to_11_operand")] UNSPEC_EMBEDDED_ROUNDING)]
- "TARGET_AVX10_2_256"
-{
- emit_insn (gen_avx512fp16_vcvt<floatsuffix>qq2ph_v4di_mask_round_1 (
- operands[0], operands[1], operands[2], operands[3], CONST0_RTX (V4HFmode), operands[4]));
- DONE;
-})
-
(define_expand "avx512fp16_vcvt<floatsuffix><sseintconvert>2ph_<mode>_mask"
[(set (match_operand:V8HF 0 "register_operand" "=v")
(vec_concat:V8HF
@@ -7707,18 +7694,18 @@
"TARGET_AVX512FP16 && TARGET_AVX512VL"
"operands[4] = CONST0_RTX (V4HFmode);")
-(define_insn "avx512fp16_vcvt<floatsuffix><sseintconvert>2ph_<mode>_mask<round_name>_1"
+(define_insn "*avx512fp16_vcvt<floatsuffix><sseintconvert>2ph_<mode>_mask"
[(set (match_operand:V8HF 0 "register_operand" "=v")
(vec_concat:V8HF
(vec_merge:V4HF
- (any_float:V4HF (match_operand:VI4_128_8_256 1 "<round_nimm_predicate>" "<round_constraint>"))
+ (any_float:V4HF (match_operand:VI4_128_8_256 1 "vector_operand" "vm"))
(vec_select:V4HF
(match_operand:V8HF 2 "nonimm_or_0_operand" "0C")
(parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)]))
(match_operand:QI 3 "register_operand" "Yk"))
(match_operand:V4HF 4 "const0_operand")))]
- "TARGET_AVX512FP16 && TARGET_AVX512VL && <round_mode_condition>"
- "vcvt<floatsuffix><sseintconvert>2ph<round_qq2phsuff>\t{<round_op5>%1, %0%{%3%}%N2|%0%{%3%}%N2, %1<round_op5>}"
+ "TARGET_AVX512FP16 && TARGET_AVX512VL"
+ "vcvt<floatsuffix><sseintconvert>2ph<qq2phsuff>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
@@ -7865,7 +7852,7 @@
(unspec:VI2H_AVX512VL
[(match_operand:<ssePHmode> 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_VCVTT_U))]
- "TARGET_AVX512FP16 && <round_saeonly_mode_condition>"
+ "TARGET_AVX512FP16"
"vcvttph2<vcvtt_suffix><sseintconvert>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -7875,7 +7862,7 @@
[(set (match_operand:VI2H_AVX512VL 0 "register_operand" "=v")
(any_fix:VI2H_AVX512VL
(match_operand:<ssePHmode> 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")))]
- "TARGET_AVX512FP16 && <round_saeonly_mode_condition>"
+ "TARGET_AVX512FP16"
"vcvttph2<fixsuffix><sseintconvert>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -7898,13 +7885,13 @@
}
})
-(define_insn "unspec_avx512fp16_fix<vcvtt_uns_suffix>_trunc<mode>2<mask_name><round_saeonly_name>"
+(define_insn "unspec_avx512fp16_fix<vcvtt_uns_suffix>_trunc<mode>2<mask_name>"
[(set (match_operand:VI4_128_8_256 0 "register_operand" "=v")
(unspec:VI4_128_8_256
[(match_operand:V8HF 1 "register_operand" "v")]
UNSPEC_VCVTT_U))]
- "TARGET_AVX512FP16 && TARGET_AVX512VL && <round_saeonly_mode_condition>"
- "vcvttph2<vcvtt_suffix><sseintconvert>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
+ "TARGET_AVX512FP16 && TARGET_AVX512VL"
+ "vcvttph2<vcvtt_suffix><sseintconvert>\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
@@ -8028,7 +8015,7 @@
[(set (match_operand:VF48H_AVX512VL 0 "register_operand" "=v")
(float_extend:VF48H_AVX512VL
(match_operand:<ssePHmode> 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")))]
- "TARGET_AVX512FP16 && <round_saeonly_mode_condition>"
+ "TARGET_AVX512FP16"
"vcvtph2<castmode><ph2pssuffix>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -8051,14 +8038,14 @@
}
})
-(define_insn "avx512fp16_float_extend_ph<mode>2<mask_name><round_saeonly_name>"
+(define_insn "avx512fp16_float_extend_ph<mode>2<mask_name>"
[(set (match_operand:VF4_128_8_256 0 "register_operand" "=v")
(float_extend:VF4_128_8_256
(vec_select:V4HF
(match_operand:V8HF 1 "register_operand" "v")
(parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)]))))]
- "TARGET_AVX512FP16 && TARGET_AVX512VL && <round_saeonly_mode_condition>"
- "vcvtph2<castmode><ph2pssuffix>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %q1<round_saeonly_mask_op2>}"
+ "TARGET_AVX512FP16 && TARGET_AVX512VL"
+ "vcvtph2<castmode><ph2pssuffix>\t{%1, %0<mask_operand2>|%0<mask_operand2>, %q1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
@@ -8122,7 +8109,7 @@
[(set (match_operand:<ssePHmode> 0 "register_operand" "=v")
(float_truncate:<ssePHmode>
(match_operand:VF48H_AVX512VL 1 "<round_nimm_predicate>" "<round_constraint>")))]
- "TARGET_AVX512FP16 && <round_mode_condition>"
+ "TARGET_AVX512FP16"
"vcvt<castmode>2ph<ph2pssuffix><round_qq2phsuff>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -8161,19 +8148,6 @@
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
-(define_expand "avx512fp16_vcvtpd2ph_v4df_mask_round"
- [(match_operand:V8HF 0 "register_operand")
- (match_operand:V4DF 1 "register_operand")
- (match_operand:V8HF 2 "nonimm_or_0_operand")
- (match_operand:QI 3 "register_operand")
- (unspec [(match_operand:SI 4 "const_4_or_8_to_11_operand")] UNSPEC_EMBEDDED_ROUNDING)]
- "TARGET_AVX10_2_256"
-{
- emit_insn (gen_avx512fp16_vcvtpd2ph_v4df_mask_round_1 (
- operands[0], operands[1], operands[2], operands[3], CONST0_RTX (V4HFmode), operands[4]));
- DONE;
-})
-
(define_expand "avx512fp16_vcvt<castmode>2ph_<mode>_mask"
[(set (match_operand:V8HF 0 "register_operand" "=v")
(vec_concat:V8HF
@@ -8189,20 +8163,20 @@
"TARGET_AVX512FP16 && TARGET_AVX512VL"
"operands[4] = CONST0_RTX (V4HFmode);")
-(define_insn "avx512fp16_vcvt<castmode>2ph_<mode>_mask<round_name>_1"
+(define_insn "*avx512fp16_vcvt<castmode>2ph_<mode>_mask"
[(set (match_operand:V8HF 0 "register_operand" "=v")
(vec_concat:V8HF
(vec_merge:V4HF
(float_truncate:V4HF
- (match_operand:VF4_128_8_256 1 "<round_nimm_predicate>" "<round_constraint>"))
+ (match_operand:VF4_128_8_256 1 "vector_operand" "vm"))
(vec_select:V4HF
(match_operand:V8HF 2 "nonimm_or_0_operand" "0C")
(parallel [(const_int 0) (const_int 1)
(const_int 2) (const_int 3)]))
(match_operand:QI 3 "register_operand" "Yk"))
(match_operand:V4HF 4 "const0_operand")))]
- "TARGET_AVX512FP16 && TARGET_AVX512VL && <round_mode_condition>"
- "vcvt<castmode>2ph<ph2pssuffix><round_qq2phsuff>\t{<round_op5>%1, %0%{%3%}%N2|%0%{%3%}%N2, %1<round_op5>}"
+ "TARGET_AVX512FP16 && TARGET_AVX512VL"
+ "vcvt<castmode>2ph<ph2pssuffix><qq2phsuff>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
@@ -8647,7 +8621,7 @@
[(set (match_operand:VF1 0 "register_operand" "=x,v")
(float:VF1
(match_operand:<sseintvecmode> 1 "<round_nimm_predicate>" "xBm,<round_constraint>")))]
- "TARGET_SSE2 && <mask_mode512bit_condition> && <round_mode_condition>"
+ "TARGET_SSE2 && <mask_mode512bit_condition> && <round_mode512bit_condition>"
"@
cvtdq2ps\t{%1, %0|%0, %1}
vcvtdq2ps\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
@@ -8660,7 +8634,7 @@
[(set (match_operand:VF1_AVX512VL 0 "register_operand" "=v")
(unsigned_float:VF1_AVX512VL
(match_operand:<sseintvecmode> 1 "nonimmediate_operand" "<round_constraint>")))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F"
"vcvtudq2ps\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -8684,13 +8658,13 @@
(define_mode_attr sf2simodelower
[(V16SI "v16sf") (V8SI "v8sf") (V4SI "v4sf")])
-(define_insn "<sse2_avx_avx512f>_fix_notrunc<sf2simodelower><mode><mask_name><round_name>"
+(define_insn "<sse2_avx_avx512f>_fix_notrunc<sf2simodelower><mode><mask_name>"
[(set (match_operand:VI4_AVX 0 "register_operand" "=v")
(unspec:VI4_AVX
- [(match_operand:<ssePSmode> 1 "<round_nimm_predicate>" "<round_constraint4>")]
+ [(match_operand:<ssePSmode> 1 "vector_operand" "vBm")]
UNSPEC_FIX_NOTRUNC))]
- "TARGET_SSE2 && <mask_mode512bit_condition> && <round_mode_condition>"
- "%vcvtps2dq\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
+ "TARGET_SSE2 && <mask_mode512bit_condition>"
+ "%vcvtps2dq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set (attr "prefix_data16")
(if_then_else
@@ -8716,7 +8690,7 @@
(unspec:VI4_AVX512VL
[(match_operand:<ssePSmode> 1 "nonimmediate_operand" "<round_constraint>")]
UNSPEC_UNSIGNED_FIX_NOTRUNC))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F"
"vcvtps2udq\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -8726,7 +8700,7 @@
[(set (match_operand:VI8_256_512 0 "register_operand" "=v")
(unspec:VI8_256_512 [(match_operand:<ssePSmode2> 1 "nonimmediate_operand" "<round_constraint>")]
UNSPEC_FIX_NOTRUNC))]
- "TARGET_AVX512DQ && <round_mode_condition>"
+ "TARGET_AVX512DQ && <round_mode512bit_condition>"
"vcvtps2qq\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -8749,7 +8723,7 @@
[(set (match_operand:VI8_256_512 0 "register_operand" "=v")
(unspec:VI8_256_512 [(match_operand:<ssePSmode2> 1 "nonimmediate_operand" "<round_constraint>")]
UNSPEC_UNSIGNED_FIX_NOTRUNC))]
- "TARGET_AVX512DQ && <round_mode_condition>"
+ "TARGET_AVX512DQ && <round_mode512bit_condition>"
"vcvtps2uqq\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -8789,13 +8763,12 @@
(set_attr "prefix" "evex")
(set_attr "mode" "XI")])
-(define_insn "unspec_fix_truncv8sfv8si2<mask_name><round_saeonly_name>"
+(define_insn "unspec_fix_truncv8sfv8si2<mask_name>"
[(set (match_operand:V8SI 0 "register_operand" "=v")
- (unspec:V8SI [(match_operand:V8SF 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
+ (unspec:V8SI [(match_operand:V8SF 1 "nonimmediate_operand" "vm")]
UNSPEC_VCVTT))]
- "TARGET_AVX && <mask_avx512vl_condition>
- && (!<round_saeonly_applied> || TARGET_AVX10_2_256)"
- "vcvttps2dq\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
+ "TARGET_AVX && <mask_avx512vl_condition>"
+ "vcvttps2dq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "<mask_prefix>")
(set_attr "mode" "OI")])
@@ -9181,7 +9154,7 @@
[(set (match_operand:VF2_AVX512VL 0 "register_operand" "=v")
(any_float:VF2_AVX512VL
(match_operand:<sseintvecmode> 1 "nonimmediate_operand" "<round_constraint>")))]
- "TARGET_AVX512DQ && <round_mode_condition>"
+ "TARGET_AVX512DQ"
"vcvt<floatsuffix>qq2pd\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -9195,8 +9168,8 @@
[(set (match_operand:<ssePSmode2> 0 "register_operand" "=v")
(any_float:<ssePSmode2>
(match_operand:VI8_256_512 1 "nonimmediate_operand" "<round_constraint>")))]
- "TARGET_AVX512DQ && <round_mode_condition>"
- "vcvt<floatsuffix>qq2ps<round_qq2pssuff>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
+ "TARGET_AVX512DQ && <round_mode512bit_condition>"
+ "vcvt<floatsuffix>qq2ps<qq2pssuff>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
@@ -9414,13 +9387,12 @@
(set_attr "prefix" "evex")
(set_attr "mode" "OI")])
-(define_insn "avx_cvtpd2dq256<mask_name><round_name>"
+(define_insn "avx_cvtpd2dq256<mask_name>"
[(set (match_operand:V4SI 0 "register_operand" "=v")
- (unspec:V4SI [(match_operand:V4DF 1 "<round_nimm_predicate>" "<round_constraint>")]
+ (unspec:V4SI [(match_operand:V4DF 1 "nonimmediate_operand" "vm")]
UNSPEC_FIX_NOTRUNC))]
- "TARGET_AVX && <mask_avx512vl_condition>
- && (!<round_applied> || TARGET_AVX10_2_256)"
- "vcvtpd2dq<round_suff>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
+ "TARGET_AVX && <mask_avx512vl_condition>"
+ "vcvtpd2dq{y}\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "<mask_prefix>")
(set_attr "mode" "OI")])
@@ -9510,8 +9482,8 @@
(unspec:<si2dfmode>
[(match_operand:VF2_512_256VL 1 "nonimmediate_operand" "<round_constraint>")]
UNSPEC_UNSIGNED_FIX_NOTRUNC))]
- "TARGET_AVX512F && <round_mode_condition>"
- "vcvtpd2udq<round_pd2udqsuff>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
+ "TARGET_AVX512F"
+ "vcvtpd2udq<pd2udqsuff>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
@@ -9654,13 +9626,12 @@
(set_attr "prefix" "evex")
(set_attr "mode" "TI")])
-(define_insn "unspec_fix_truncv4dfv4si2<mask_name><round_saeonly_name>"
+(define_insn "unspec_fix_truncv4dfv4si2<mask_name>"
[(set (match_operand:V4SI 0 "register_operand" "=v")
- (unspec:V4SI [(match_operand:V4DF 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
+ (unspec:V4SI [(match_operand:V4DF 1 "nonimmediate_operand" "vm")]
UNSPEC_VCVTT))]
- "TARGET_AVX && <mask_avx512vl_condition>
- && (!<round_saeonly_applied> || TARGET_AVX10_2_256)"
- "vcvttpd2dq<round_saeonly_suff>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
+ "TARGET_AVX || (TARGET_AVX512VL && TARGET_AVX512F)"
+ "vcvttpd2dq{y}\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "maybe_evex")
(set_attr "mode" "OI")])
@@ -9674,13 +9645,12 @@
(set_attr "prefix" "maybe_evex")
(set_attr "mode" "OI")])
-(define_insn "unspec_fixuns_truncv4dfv4si2<mask_name><round_saeonly_name>"
+(define_insn "unspec_fixuns_truncv4dfv4si2<mask_name>"
[(set (match_operand:V4SI 0 "register_operand" "=v")
- (unspec:V4SI [(match_operand:V4DF 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
+ (unspec:V4SI [(match_operand:V4DF 1 "nonimmediate_operand" "vm")]
UNSPEC_VCVTTU))]
- "TARGET_AVX512VL && TARGET_AVX512F
- && (!<round_saeonly_applied> || TARGET_AVX10_2_256)"
- "vcvttpd2udq<round_saeonly_suff>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
+ "TARGET_AVX512VL && TARGET_AVX512F"
+ "vcvttpd2udq{y}\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "maybe_evex")
(set_attr "mode" "OI")])
@@ -9699,7 +9669,7 @@
(unspec:<sseintvecmode>
[(match_operand:VF2_AVX512VL 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_VCVTT_U))]
- "TARGET_AVX512DQ && <round_saeonly_mode_condition>"
+ "TARGET_AVX512DQ && <round_saeonly_mode512bit_condition>"
"vcvttpd2<vcvtt_suffix>qq\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -9709,7 +9679,7 @@
[(set (match_operand:<sseintvecmode> 0 "register_operand" "=v")
(any_fix:<sseintvecmode>
(match_operand:VF2_AVX512VL 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")))]
- "TARGET_AVX512DQ && <round_saeonly_mode_condition>"
+ "TARGET_AVX512DQ && <round_saeonly_mode512bit_condition>"
"vcvttpd2<fixsuffix>qq\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -9720,7 +9690,7 @@
(unspec:<sseintvecmode>
[(match_operand:VF2_AVX512VL 1 "<round_nimm_predicate>" "<round_constraint>")]
UNSPEC_FIX_NOTRUNC))]
- "TARGET_AVX512DQ && <round_mode_condition>"
+ "TARGET_AVX512DQ && <round_mode512bit_condition>"
"vcvtpd2qq\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -9731,7 +9701,7 @@
(unspec:<sseintvecmode>
[(match_operand:VF2_AVX512VL 1 "nonimmediate_operand" "<round_constraint>")]
UNSPEC_UNSIGNED_FIX_NOTRUNC))]
- "TARGET_AVX512DQ && <round_mode_condition>"
+ "TARGET_AVX512DQ && <round_mode512bit_condition>"
"vcvtpd2uqq\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -9742,18 +9712,18 @@
(unspec:VI8_256_512
[(match_operand:<ssePSmode2> 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_VCVTT_U))]
- "TARGET_AVX512DQ && <round_saeonly_mode_condition>"
+ "TARGET_AVX512DQ && <round_saeonly_mode512bit_condition>"
"vcvttps2<vcvtt_suffix>qq\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
-(define_insn "fix<fixunssuffix>_trunc<ssePSmode2lower><mode>2<mask_name>"
+(define_insn "fix<fixunssuffix>_trunc<ssePSmode2lower><mode>2<mask_name><round_saeonly_name>"
[(set (match_operand:VI8_256_512 0 "register_operand" "=v")
(any_fix:VI8_256_512
- (match_operand:<ssePSmode2> 1 "nonimmediate_operand" "vm")))]
- "TARGET_AVX512DQ"
- "vcvttps2<fixsuffix>qq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
+ (match_operand:<ssePSmode2> 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")))]
+ "TARGET_AVX512DQ && <round_saeonly_mode512bit_condition>"
+ "vcvttps2<fixsuffix>qq\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
@@ -9908,13 +9878,13 @@
DONE;
})
-(define_insn "<mask_codefor>unspec_fixuns_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>"
+(define_insn "<mask_codefor>unspec_fixuns_trunc<mode><sseintvecmodelower>2<mask_name>"
[(set (match_operand:<sseintvecmode> 0 "register_operand" "=v")
(unspec:<sseintvecmode>
- [(match_operand:VF1_128_256 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
+ [(match_operand:VF1_128_256 1 "nonimmediate_operand" "vm")]
UNSPEC_VCVTTU))]
- "TARGET_AVX512VL && <round_saeonly_mode_condition>"
- "vcvttps2udq\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
+ "TARGET_AVX512VL"
+ "vcvttps2udq\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
(set_attr "mode" "<sseintvecmode2>")])
@@ -10102,13 +10072,12 @@
(set_attr "prefix" "evex")
(set_attr "mode" "V8SF")])
-(define_insn "avx_cvtpd2ps256<mask_name><round_name>"
+(define_insn "avx_cvtpd2ps256<mask_name>"
[(set (match_operand:V4SF 0 "register_operand" "=v")
(float_truncate:V4SF
- (match_operand:V4DF 1 "<round_nimm_predicate>" "<round_constraint>")))]
- "TARGET_AVX && <mask_avx512vl_condition>
- && (!<round_applied> || TARGET_AVX10_2_256)"
- "vcvtpd2ps<round_suff>\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
+ (match_operand:V4DF 1 "nonimmediate_operand" "vm")))]
+ "TARGET_AVX && <mask_avx512vl_condition>"
+ "vcvtpd2ps{y}\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "maybe_evex")
(set_attr "btver2_decode" "vector")
@@ -10231,7 +10200,7 @@
[(set (match_operand:VF2_512_256 0 "register_operand" "=v")
(float_extend:VF2_512_256
(match_operand:<sf2dfmode> 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")))]
- "TARGET_AVX && <mask_mode512bit_condition> && <round_saeonly_mode_condition>"
+ "TARGET_AVX && <mask_mode512bit_condition> && <round_saeonly_mode512bit_condition>"
"vcvtps2pd\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "maybe_vex")
@@ -12126,7 +12095,7 @@
(match_operand:V8_128 1 "reg_or_0_operand" "v,C")
(const_int 1)))]
"TARGET_AVX512FP16
- || (TARGET_AVX10_2_256 && const0_operand (operands[1], <MODE>mode))"
+ || (TARGET_AVX10_2 && const0_operand (operands[1], <MODE>mode))"
"@
vmovsh\t{%2, %1, %0|%0, %1, %2}
vmovw\t{%2, %0|%2, %0}"
@@ -13633,7 +13602,7 @@
[(match_operand:VFH_AVX512VL 1 "register_operand" "v")
(match_operand:VFH_AVX512VL 2 "nonimmediate_operand" "<round_constraint>")]
UNSPEC_SCALEF))]
- "TARGET_AVX512F && <round_mode_condition>"
+ "TARGET_AVX512F"
"vscalef<ssemodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2<round_mask_op3>}"
[(set_attr "prefix" "evex")
(set_attr "mode" "<MODE>")])
@@ -14041,7 +14010,7 @@
[(set (match_operand:VFH_AVX512VL 0 "register_operand" "=v")
(unspec:VFH_AVX512VL [(match_operand:VFH_AVX512VL 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_GETEXP))]
- "TARGET_AVX512F && <round_saeonly_mode_condition>"
+ "TARGET_AVX512F"
"vgetexp<ssemodesuffix>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}";
[(set_attr "prefix" "evex")
(set_attr "mode" "<MODE>")])
@@ -14156,7 +14125,7 @@
(match_operand:<sseintvecmode> 3 "nonimmediate_operand" "<round_saeonly_constraint>")
(match_operand:SI 4 "const_0_to_255_operand")]
UNSPEC_FIXUPIMM))]
- "TARGET_AVX512F && <round_saeonly_mode_condition>"
+ "TARGET_AVX512F"
"vfixupimm<ssemodesuffix>\t{%4, <round_saeonly_sd_mask_op5>%3, %2, %0<sd_mask_op5>|%0<sd_mask_op5>, %2, %3<round_saeonly_sd_mask_op5>, %4}";
[(set_attr "prefix" "evex")
(set_attr "mode" "<MODE>")])
@@ -14172,7 +14141,7 @@
UNSPEC_FIXUPIMM)
(match_dup 1)
(match_operand:<avx512fmaskmode> 5 "register_operand" "Yk")))]
- "TARGET_AVX512F && <round_saeonly_mode_condition>"
+ "TARGET_AVX512F"
"vfixupimm<ssemodesuffix>\t{%4, <round_saeonly_op6>%3, %2, %0%{%5%}|%0%{%5%}, %2, %3<round_saeonly_op6>, %4}";
[(set_attr "prefix" "evex")
(set_attr "mode" "<MODE>")])
@@ -14234,7 +14203,7 @@
[(match_operand:VFH_AVX512VL 1 "nonimmediate_operand" "<round_saeonly_constraint>")
(match_operand:SI 2 "const_0_to_255_operand")]
UNSPEC_ROUND))]
- "TARGET_AVX512F && <round_saeonly_mode_condition>"
+ "TARGET_AVX512F"
"vrndscale<ssemodesuffix>\t{%2, <round_saeonly_mask_op3>%1, %0<mask_operand3>|%0<mask_operand3>, %1<round_saeonly_mask_op3>, %2}"
[(set_attr "length_immediate" "1")
(set_attr "prefix" "evex")
@@ -23829,7 +23798,7 @@
(match_operand:V64QI 2 "vector_operand" "vm")
(match_operand:SI 3 "const_0_to_255_operand" "n")]
UNSPEC_MPSADBW))]
- "TARGET_AVX10_2_512"
+ "TARGET_AVX10_2"
"vmpsadbw\t{%3, %2, %1, %0<mask_operand4>|%0<mask_operand4>, %1, %2, %3}"
[(set_attr "length_immediate" "1")
(set_attr "prefix" "evex")])
@@ -23841,7 +23810,7 @@
(match_operand:VI1 2 "vector_operand" "vm")
(match_operand:SI 3 "const_0_to_255_operand" "n")]
UNSPEC_MPSADBW))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vmpsadbw\t{%3, %2, %1, %0<mask_operand4>|%0<mask_operand4>, %1, %2, %3}"
[(set_attr "length_immediate" "1")
(set_attr "prefix" "evex")
@@ -29104,13 +29073,12 @@
(set_attr "prefix" "vex")
(set_attr "mode" "V8SF")])
-(define_insn "vcvtph2ps256<mask_name><round_saeonly_name>"
+(define_insn "vcvtph2ps256<mask_name>"
[(set (match_operand:V8SF 0 "register_operand" "=v")
- (unspec:V8SF [(match_operand:V8HI 1 "<round_saeonly_nimm_scalar_predicate>" "<round_saeonly_constraint>")]
+ (unspec:V8SF [(match_operand:V8HI 1 "nonimmediate_operand" "vm")]
UNSPEC_VCVTPH2PS))]
- "(TARGET_F16C || TARGET_AVX512VL)
- && (!<round_saeonly_applied> || TARGET_AVX10_2_256)"
- "vcvtph2ps\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
+ "TARGET_F16C || TARGET_AVX512VL"
+ "vcvtph2ps\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "vex")
(set_attr "btver2_decode" "double")
@@ -29824,7 +29792,7 @@
(match_operand:VF_AVX512VL 2 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")
(match_operand:SI 3 "const_0_to_15_operand")]
UNSPEC_RANGE))]
- "TARGET_AVX512DQ && <round_saeonly_mode_condition>"
+ "TARGET_AVX512DQ && <round_saeonly_mode512bit_condition>"
{
if (TARGET_DEST_FALSE_DEP_FOR_GLC
&& <mask4_dest_false_dep_for_glc_cond>
@@ -29894,7 +29862,7 @@
[(match_operand:VFH_AVX512VL 1 "nonimmediate_operand" "<round_saeonly_constraint>")
(match_operand:SI 2 "const_0_to_15_operand")]
UNSPEC_GETMANT))]
- "TARGET_AVX512F && <round_saeonly_mode_condition>"
+ "TARGET_AVX512F"
{
if (TARGET_DEST_FALSE_DEP_FOR_GLC
&& <mask3_dest_false_dep_for_glc_cond>
@@ -31477,8 +31445,8 @@
(match_operand:<ssedvecmode> 3 "register_operand")]
"TARGET_SSE2"
{
- if ((<MODE_SIZE> == 64 && TARGET_AVX10_2_512)
- || (<MODE_SIZE> < 64 && (TARGET_AVXVNNIINT8 || TARGET_AVX10_2_256)))
+ if ((<MODE_SIZE> == 64 && TARGET_AVX10_2)
+ || (<MODE_SIZE> < 64 && (TARGET_AVXVNNIINT8 || TARGET_AVX10_2)))
{
operands[1] = lowpart_subreg (<ssedvecmode>mode,
force_reg (<MODE>mode, operands[1]),
@@ -31525,8 +31493,8 @@
(match_operand:<ssedvecmode> 3 "register_operand")]
"TARGET_SSE2"
{
- if ((<MODE_SIZE> == 64 && TARGET_AVX10_2_512)
- || (<MODE_SIZE> < 64 && (TARGET_AVXVNNIINT8 || TARGET_AVX10_2_256)))
+ if ((<MODE_SIZE> == 64 && TARGET_AVX10_2)
+ || (<MODE_SIZE> < 64 && (TARGET_AVXVNNIINT8 || TARGET_AVX10_2)))
{
operands[1] = lowpart_subreg (<ssedvecmode>mode,
force_reg (<MODE>mode, operands[1]),
@@ -31573,7 +31541,7 @@
(match_operand:VI4_AVX 2 "register_operand" "v")
(match_operand:VI4_AVX 3 "nonimmediate_operand" "vm")]
VPDOTPROD))]
- "TARGET_AVXVNNIINT8 || TARGET_AVX10_2_256"
+ "TARGET_AVXVNNIINT8 || TARGET_AVX10_2"
"vpdp<vpdotprodtype>\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "maybe_evex")])
@@ -31584,7 +31552,7 @@
(match_operand:V16SI 2 "register_operand" "v")
(match_operand:V16SI 3 "nonimmediate_operand" "vm")]
VPDOTPROD))]
- "TARGET_AVX10_2_512"
+ "TARGET_AVX10_2"
"vpdp<vpdotprodtype>\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -31598,7 +31566,7 @@
VPDOTPROD)
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vpdp<vpdotprodtype>\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -31612,7 +31580,7 @@
VPDOTPROD)
(match_dup 5)
(match_operand:<avx512fmaskmode> 4 "register_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"operands[5] = CONST0_RTX (<MODE>mode);")
(define_insn "*vpdp<vpdotprodtype>_<mode>_maskz"
@@ -31625,7 +31593,7 @@
VPDOTPROD)
(match_operand:VI4_AVX10_2 5 "const0_operand" "C")
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vpdp<vpdotprodtype>\t{%3, %2, %0%{%4%}%N5|%0%{%4%}%N5, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -31718,7 +31686,7 @@
(match_operand:<ssePSmode> 2 "<round_nimm_predicate>" "<round_constraint>"))
(float_truncate:<ssehalfvecmode>
(match_operand:<ssePSmode> 1 "register_operand" "v"))))]
- "TARGET_AVX10_2_256 && <round_mode_condition>"
+ "TARGET_AVX10_2 && <round_mode512bit_condition>"
"vcvt2ps2phx\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2<round_mask_op3>}")
(define_mode_attr ssebvecmode
@@ -31740,7 +31708,7 @@
[(match_operand:VHF_AVX10_2 1 "register_operand" "v")
(match_operand:VHF_AVX10_2 2 "nonimmediate_operand" "vm")]
UNSPEC_CONVERTFP8_PACK))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvt<convertfp8_pack>\t{%2, %1, %0<mask_operand3>|%0<mask_operand2>, %1, %2}"
[(set_attr "prefix" "evex")])
@@ -31765,7 +31733,7 @@
(match_operand:V8HF 2 "nonimmediate_operand")]
UNSPEC_VCVTBIASPH2FP8_PACK)
(match_dup 3)))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"operands[3] = CONST0_RTX (V8QImode);")
(define_insn "*vcvt<biasph2fp8_pack>v8hf"
@@ -31776,7 +31744,7 @@
(match_operand:V8HF 2 "nonimmediate_operand" "vm")]
UNSPEC_VCVTBIASPH2FP8_PACK)
(match_operand:V8QI 3 "const0_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvt<biasph2fp8_pack>\t{%2, %1, %0|%0, %1, %2}"
[(set_attr "prefix" "evex")
(set_attr "mode" "HF")])
@@ -31797,7 +31765,7 @@
(const_int 6) (const_int 7)]))
(match_operand:QI 4 "register_operand" "C"))
(match_dup 5)))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"operands[5] = CONST0_RTX (V8QImode);")
(define_insn "*vcvt<biasph2fp8_pack>v8hf_mask"
@@ -31816,12 +31784,12 @@
(const_int 6) (const_int 7)]))
(match_operand:QI 4 "register_operand" "Yk"))
(match_operand:V8QI 5 "const0_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvt<biasph2fp8_pack>\t{%2, %1, %0%{%4%}%N3|%0%{%4%}%N3, %1, %2}"
[(set_attr "prefix" "evex")])
(define_mode_iterator VHF_AVX10_2_2
- [(V32HF "TARGET_AVX10_2_512") V16HF])
+ [(V32HF "TARGET_AVX10_2") V16HF])
(define_insn "vcvt<biasph2fp8_pack><mode><mask_name>"
[(set (match_operand:<ssebvecmode_2> 0 "register_operand" "=v")
@@ -31829,12 +31797,12 @@
[(match_operand:<ssebvecmode> 1 "register_operand" "v")
(match_operand:VHF_AVX10_2_2 2 "nonimmediate_operand" "vm")]
UNSPEC_VCVTBIASPH2FP8_PACK))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvt<biasph2fp8_pack>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
[(set_attr "prefix" "evex")])
(define_mode_iterator VHF_256_512
- [V16HF (V32HF "TARGET_AVX10_2_512")])
+ [V16HF (V32HF "TARGET_AVX10_2")])
(define_mode_attr ph2fp8suff
[(V32HF "") (V16HF "{y}") (V8HF "{x}")])
@@ -31856,7 +31824,7 @@
[(match_operand:V8HF 1 "nonimmediate_operand")]
UNSPEC_CONVERTPH2FP8)
(match_dup 2)))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"operands[2] = CONST0_RTX (V8QImode);")
(define_insn "*vcvt<convertph2fp8>v8hf"
@@ -31866,7 +31834,7 @@
[(match_operand:V8HF 1 "nonimmediate_operand" "vm")]
UNSPEC_CONVERTPH2FP8)
(match_operand:V8QI 2 "const0_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvt<convertph2fp8>{x}\t{%1, %0|%0, %1}"
[(set_attr "prefix" "evex")
(set_attr "mode" "HF")])
@@ -31886,7 +31854,7 @@
(const_int 6) (const_int 7)]))
(match_operand:QI 3 "register_operand"))
(match_dup 4)))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"operands[4] = CONST0_RTX (V8QImode);")
(define_insn "*vcvt<convertph2fp8>v8hf_mask"
@@ -31904,7 +31872,7 @@
(const_int 6) (const_int 7)]))
(match_operand:QI 3 "register_operand" "Yk"))
(match_operand:V8QI 4 "const0_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvt<convertph2fp8>{x}\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}"
[(set_attr "prefix" "evex")])
@@ -31913,7 +31881,7 @@
(unspec:<ssebvecmode_2>
[(match_operand:VHF_256_512 1 "nonimmediate_operand" "vm")]
UNSPEC_CONVERTPH2FP8))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvt<convertph2fp8><ph2fp8suff>\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "prefix" "evex")])
@@ -31922,7 +31890,7 @@
(unspec:VHF_AVX10_2
[(match_operand:<ssebvecmode_2> 1 "nonimmediate_operand" "vm")]
UNSPEC_VCVTHF82PH))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvthf82ph\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "prefix" "evex")])
@@ -31944,7 +31912,7 @@
(match_operand:VI2_AVX10_2 1 "register_operand")
(match_operand:VI2_AVX10_2 2 "register_operand")
(match_operand:<sseunpackmode> 3 "register_operand")]
- "TARGET_AVXVNNIINT16 || TARGET_AVX10_2_256"
+ "TARGET_AVXVNNIINT16 || TARGET_AVX10_2"
{
operands[1] = lowpart_subreg (<sseunpackmode>mode,
force_reg (<MODE>mode, operands[1]),
@@ -31962,7 +31930,7 @@
(match_operand:VI2_AVX10_2 1 "register_operand")
(match_operand:VI2_AVX10_2 2 "register_operand")
(match_operand:<sseunpackmode> 3 "register_operand")]
- "TARGET_AVXVNNIINT16 || TARGET_AVX10_2_256"
+ "TARGET_AVXVNNIINT16 || TARGET_AVX10_2"
{
operands[1] = lowpart_subreg (<sseunpackmode>mode,
force_reg (<MODE>mode, operands[1]),
@@ -31982,7 +31950,7 @@
(match_operand:VI4_AVX 2 "register_operand" "v")
(match_operand:VI4_AVX 3 "nonimmediate_operand" "vm")]
VPDPWPROD))]
- "TARGET_AVXVNNIINT16 || TARGET_AVX10_2_256"
+ "TARGET_AVXVNNIINT16 || TARGET_AVX10_2"
"vpdp<vpdpwprodtype>\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "maybe_evex")])
@@ -31993,7 +31961,7 @@
(match_operand:V16SI 2 "register_operand" "v")
(match_operand:V16SI 3 "nonimmediate_operand" "vm")]
VPDPWPROD))]
- "TARGET_AVX10_2_512"
+ "TARGET_AVX10_2"
"vpdp<vpdpwprodtype>\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -32007,7 +31975,7 @@
VPDPWPROD)
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vpdp<vpdpwprodtype>\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -32021,7 +31989,7 @@
VPDPWPROD)
(match_dup 5)
(match_operand:<avx512fmaskmode> 4 "register_operand")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"operands[5] = CONST0_RTX (<MODE>mode);")
(define_insn "*vpdp<vpdpwprodtype>_<mode>_maskz"
@@ -32034,7 +32002,7 @@
VPDPWPROD)
(match_operand:VI4_AVX10_2 5 "const0_operand" "C")
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vpdp<vpdpwprodtype>\t{%3, %2, %0%{%4%}%N5|%0%{%4%}%N5, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -32045,7 +32013,7 @@
(match_operand:VF1_AVX10_2 2 "register_operand" "v")
(match_operand:VF1_AVX10_2 3 "nonimmediate_operand" "vm")]
UNSPEC_VDPPHPS))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vdpphps\t{%3, %2, %0|%0, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -32059,7 +32027,7 @@
UNSPEC_VDPPHPS)
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vdpphps\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -32069,7 +32037,7 @@
(match_operand:VF1_AVX10_2 2 "register_operand")
(match_operand:VF1_AVX10_2 3 "nonimmediate_operand")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
emit_insn (gen_vdpphps_<mode>_maskz_1 (operands[0], operands[1],
operands[2], operands[3], CONST0_RTX(<MODE>mode), operands[4]));
@@ -32086,7 +32054,7 @@
UNSPEC_VDPPHPS)
(match_operand:VF1_AVX10_2 4 "const0_operand" "C")
(match_operand:<avx512fmaskmode> 5 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vdpphps\t{%3, %2, %0%{%5%}%N4|%0%{%5%}%N4, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -32096,7 +32064,7 @@
[(match_operand:VBF_AVX10_2 1 "register_operand" "v")
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand" "vm")]
UNSPEC_VSCALEFBF16))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vscalefbf16\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
[(set_attr "prefix" "evex")])
@@ -32105,14 +32073,14 @@
(smaxmin:VBF_AVX10_2
(match_operand:VBF_AVX10_2 1 "register_operand")
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand")))]
- "TARGET_AVX10_2_256")
+ "TARGET_AVX10_2")
(define_insn "avx10_2_<code>bf16_<mode><mask_name>"
[(set (match_operand:VBF_AVX10_2 0 "register_operand" "=v")
(smaxmin:VBF_AVX10_2
(match_operand:VBF_AVX10_2 1 "register_operand" "v")
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand" "vm")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"v<maxmin_float>bf16\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
[(set_attr "prefix" "evex")
(set_attr "mode" "<MODE>")])
@@ -32122,7 +32090,7 @@
(plusminusmultdiv:VBF_AVX10_2
(match_operand:VBF_AVX10_2 1 "register_operand" "v")
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand" "vm")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"v<insn>bf16\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
[(set_attr "prefix" "evex")])
@@ -32132,7 +32100,7 @@
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand")
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
emit_insn (gen_avx10_2_fmaddbf16_<mode>_maskz_1 (operands[0], operands[1],
operands[2], operands[3],
@@ -32147,7 +32115,7 @@
(match_operand:VBF_AVX10_2 1 "nonimmediate_operand" "%0,0,v")
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand" "vm,v,vm")
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "v,vm,0")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"@
vfmadd132bf16\t{%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2}
vfmadd213bf16\t{%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3}
@@ -32165,7 +32133,7 @@
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "v,vm"))
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"@
vfmadd132bf16\t{%2, %3, %0%{%4%}|%0%{%4%}, %3, %2}
vfmadd213bf16\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
@@ -32182,7 +32150,7 @@
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "0"))
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vfmadd231bf16\t{%2, %1, %0%{%4%}|%0%{%4%}, %1, %2}"
[(set_attr "prefix" "evex")
(set_attr "type" "ssemuladd")
@@ -32194,7 +32162,7 @@
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand")
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
emit_insn (gen_avx10_2_fnmaddbf16_<mode>_maskz_1 (operands[0], operands[1],
operands[2], operands[3],
@@ -32210,7 +32178,7 @@
(match_operand:VBF_AVX10_2 1 "nonimmediate_operand" "%0,0,v"))
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand" "vm,v,vm")
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "v,vm,0")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"@
vfnmadd132bf16\t{%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2}
vfnmadd213bf16\t{%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3}
@@ -32229,7 +32197,7 @@
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "v,vm"))
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"@
vfnmadd132bf16\t{%2, %3, %0%{%4%}|%0%{%4%}, %3, %2}
vfnmadd213bf16\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
@@ -32247,7 +32215,7 @@
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "0"))
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vfnmadd231bf16\t{%2, %1, %0%{%4%}|%0%{%4%}, %1, %2}"
[(set_attr "prefix" "evex")
(set_attr "type" "ssemuladd")
@@ -32259,7 +32227,7 @@
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand")
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
emit_insn (gen_avx10_2_fmsubbf16_<mode>_maskz_1 (operands[0], operands[1],
operands[2], operands[3],
@@ -32275,7 +32243,7 @@
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand" "vm,v,vm")
(neg:VBF_AVX10_2
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "v,vm,0"))))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"@
vfmsub132bf16\t{%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2}
vfmsub213bf16\t{%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3}
@@ -32294,7 +32262,7 @@
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "v,vm")))
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"@
vfmsub132bf16\t{%2, %3, %0%{%4%}|%0%{%4%}, %3, %2}
vfmsub213bf16\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
@@ -32312,7 +32280,7 @@
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "0")))
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vfmsub231bf16\t{%2, %1, %0%{%4%}|%0%{%4%}, %1, %2}"
[(set_attr "prefix" "evex")
(set_attr "type" "ssemuladd")
@@ -32324,7 +32292,7 @@
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand")
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand")
(match_operand:<avx512fmaskmode> 4 "register_operand")]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
{
emit_insn (gen_avx10_2_fnmsubbf16_<mode>_maskz_1 (operands[0], operands[1],
operands[2], operands[3],
@@ -32341,7 +32309,7 @@
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand" "vm,v,vm")
(neg:VBF_AVX10_2
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "v,vm,0"))))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"@
vfnmsub132bf16\t{%2, %3, %0<sd_mask_op4>|%0<sd_mask_op4>, %3, %2}
vfnmsub213bf16\t{%3, %2, %0<sd_mask_op4>|%0<sd_mask_op4>, %2, %3}
@@ -32361,7 +32329,7 @@
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "v,vm")))
(match_dup 1)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk,Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"@
vfnmsub132bf16\t{%2, %3, %0%{%4%}|%0%{%4%}, %3, %2}
vfnmsub213bf16\t{%3, %2, %0%{%4%}|%0%{%4%}, %2, %3}"
@@ -32380,7 +32348,7 @@
(match_operand:VBF_AVX10_2 3 "nonimmediate_operand" "0")))
(match_dup 3)
(match_operand:<avx512fmaskmode> 4 "register_operand" "Yk")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vfnmsub231bf16\t{%2, %1, %0%{%4%}|%0%{%4%}, %1, %2}"
[(set_attr "prefix" "evex")
(set_attr "type" "ssemuladd")
@@ -32391,7 +32359,7 @@
(unspec:VBF_AVX10_2
[(match_operand:VBF_AVX10_2 1 "nonimmediate_operand" "vm")]
UNSPEC_RSQRT))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vrsqrtbf16\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "prefix" "evex")])
@@ -32399,7 +32367,7 @@
[(set (match_operand:VBF_AVX10_2 0 "register_operand" "=v")
(sqrt:VBF_AVX10_2
(match_operand:VBF_AVX10_2 1 "nonimmediate_operand" "vm")))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vsqrtbf16\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "prefix" "evex")])
@@ -32408,7 +32376,7 @@
(unspec:VBF_AVX10_2
[(match_operand:VBF_AVX10_2 1 "nonimmediate_operand" "vm")]
UNSPEC_RCP))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vrcpbf16\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "prefix" "evex")])
@@ -32417,7 +32385,7 @@
(unspec:VBF_AVX10_2
[(match_operand:VBF_AVX10_2 1 "nonimmediate_operand" "vm")]
UNSPEC_GETEXP))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vgetexpbf16\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "prefix" "evex")])
@@ -32437,7 +32405,7 @@
[(match_operand:VBF_AVX10_2 1 "nonimmediate_operand" "vm")
(match_operand:SI 2 "const_0_to_255_operand")]
BF16IMMOP))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"v<bf16immop>bf16\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %2}"
[(set_attr "prefix" "evex")])
@@ -32447,7 +32415,7 @@
[(match_operand:VBF_AVX10_2 1 "nonimmediate_operand" "vm")
(match_operand 2 "const_0_to_255_operand")]
UNSPEC_VFPCLASSBF16))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vfpclassbf16<vecmemsuffix>\t{%2, %1, %0<mask_scalar_merge_operand3>|%0<mask_scalar_merge_operand3>, %1, %2}"
[(set_attr "prefix" "evex")])
@@ -32458,7 +32426,7 @@
(match_operand:VBF_AVX10_2 2 "nonimmediate_operand" "vm")
(match_operand 3 "const_0_to_31_operand" "n")]
UNSPEC_PCMP))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcmpbf16\t{%3, %2, %1, %0<mask_scalar_merge_operand4>|%0<mask_scalar_merge_operand4>, %1, %2, %3}"
[(set_attr "prefix" "evex")])
@@ -32495,7 +32463,7 @@
(unspec:<sseintvecmode>
[(match_operand:VBF_AVX10_2 1 "vector_operand" "vm")]
UNSPEC_CVT_BF16_IBS_ITER))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvt<sat_cvt_trunc_prefix>bf162i<sat_cvt_sign_prefix>bs\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32510,7 +32478,7 @@
(unspec:<sseintvecmode>
[(match_operand:VHF_AVX10_2 1 "<round_nimm_predicate>" "<round_constraint>")]
UNSPEC_CVT_PH_IBS_ITER))]
- "TARGET_AVX10_2_256 && <round_mode_condition>"
+ "TARGET_AVX10_2 && <round_mode512bit_condition>"
"vcvtph2i<sat_cvt_sign_prefix>bs\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32525,7 +32493,7 @@
(unspec:<sseintvecmode>
[(match_operand:VHF_AVX10_2 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_CVTT_PH_IBS_ITER))]
- "TARGET_AVX10_2_256 && <round_saeonly_mode_condition>"
+ "TARGET_AVX10_2 && <round_saeonly_mode512bit_condition>"
"vcvttph2i<sat_cvt_sign_prefix>bs\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32540,7 +32508,7 @@
(unspec:<sseintvecmode>
[(match_operand:VF1_AVX10_2 1 "<round_nimm_predicate>" "<round_constraint>")]
UNSPEC_CVT_PS_IBS_ITER))]
- "TARGET_AVX10_2_256 && <round_mode_condition>"
+ "TARGET_AVX10_2 && <round_mode512bit_condition>"
"vcvtps2i<sat_cvt_sign_prefix>bs\t{<round_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32555,7 +32523,7 @@
(unspec:<sseintvecmode>
[(match_operand:VF1_AVX10_2 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_CVTT_PS_IBS_ITER))]
- "TARGET_AVX10_2_256 && <round_saeonly_mode_condition>"
+ "TARGET_AVX10_2 && <round_saeonly_mode512bit_condition>"
"vcvttps2i<sat_cvt_sign_prefix>bs\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32574,7 +32542,7 @@
(unspec:<VEC_GATHER_IDXSI>
[(match_operand:VF1_VF2_AVX10_2 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_SAT_CVT_DS_SIGN_ITER))]
- "TARGET_AVX10_2_256 && <round_saeonly_mode_condition>"
+ "TARGET_AVX10_2 && <round_saeonly_mode512bit_condition>"
"vcvtt<castmode>2<sat_cvt_sign_prefix>dqs<pd2dqssuff>\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32585,7 +32553,7 @@
(unspec:<VEC_GATHER_IDXDI>
[(match_operand:VF2_AVX10_2 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_SAT_CVT_DS_SIGN_ITER))]
- "TARGET_AVX10_2_256 && <round_saeonly_mode_condition>"
+ "TARGET_AVX10_2 && <round_saeonly_mode512bit_condition>"
"vcvttpd2<sat_cvt_sign_prefix>qqs\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32596,7 +32564,7 @@
(unspec:VI8_AVX10_2
[(match_operand:<vpckfloat_temp_mode> 1 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")]
UNSPEC_SAT_CVT_DS_SIGN_ITER))]
- "TARGET_AVX10_2_256 && <round_saeonly_mode_condition>"
+ "TARGET_AVX10_2 && <round_saeonly_mode512bit_condition>"
"vcvttps2<sat_cvt_sign_prefix>qqs\t{<round_saeonly_mask_op2>%1, %0<mask_operand2>|%0<mask_operand2>, %1<round_saeonly_mask_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32609,7 +32577,7 @@
(match_operand:V2DF 1 "<round_saeonly_nimm_scalar_predicate>" "<round_saeonly_constraint>")
(parallel [(const_int 0)]))]
UNSPEC_SAT_CVT_DS_SIGN_ITER))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvttsd2<sat_cvt_sign_prefix>sis\t{<round_saeonly_op2>%1, %0|%0, %1<round_saeonly_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32622,7 +32590,7 @@
(match_operand:V4SF 1 "<round_saeonly_nimm_scalar_predicate>" "<round_saeonly_constraint>")
(parallel [(const_int 0)]))]
UNSPEC_SAT_CVT_DS_SIGN_ITER))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vcvttss2<sat_cvt_sign_prefix>sis\t{<round_saeonly_op2>%1, %0|%0, %1<round_saeonly_op2>}"
[(set_attr "type" "ssecvt")
(set_attr "prefix" "evex")
@@ -32635,7 +32603,7 @@
(match_operand:VBF_AVX10_2 2 "bcst_vector_operand" "vmBr")
(match_operand:SI 3 "const_0_to_255_operand")]
UNSPEC_MINMAXBF16))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vminmaxbf16\t{%3, %2, %1, %0<mask_operand4>|%0<mask_operand4>, %1, %2, %3}"
[(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
@@ -32647,7 +32615,7 @@
(match_operand:VFH_AVX10_2 2 "<round_saeonly_nimm_predicate>" "<round_saeonly_constraint>")
(match_operand:SI 3 "const_0_to_255_operand")]
UNSPEC_MINMAX))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vminmax<ssemodesuffix>\t{%3, <round_saeonly_mask_op4>%2, %1, %0<mask_operand4>|%0<mask_operand4>, %1, %2<round_saeonly_mask_op4>, %3}"
[(set_attr "prefix" "evex")
(set_attr "mode" "<MODE>")])
@@ -32662,7 +32630,7 @@
UNSPEC_MINMAX)
(match_dup 1)
(const_int 1)))]
- "TARGET_AVX10_2_256"
+ "TARGET_AVX10_2"
"vminmax<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1, %2<round_saeonly_scalar_mask_op4>, %3}"
[(set_attr "prefix" "evex")
(set_attr "mode" "<ssescalarmode>")])
@@ -32672,7 +32640,7 @@
(unspec:VI1248_AVX10_2
[(match_operand:VI1248_AVX10_2 1 "memory_operand" "m")]
UNSPEC_VMOVRS))]
- "TARGET_AVX10_2_256 && TARGET_MOVRS"
+ "TARGET_AVX10_2 && TARGET_MOVRS"
"vmovrs<ssemodesuffix>\t{%1, %0<mask_operand2>|%0<mask_operand2>, %1}"
[(set_attr "type" "ssemov")
(set_attr "prefix" "evex")
diff --git a/gcc/config/i386/subst.md b/gcc/config/i386/subst.md
index c47c5d5..c30b274 100644
--- a/gcc/config/i386/subst.md
+++ b/gcc/config/i386/subst.md
@@ -197,32 +197,19 @@
(define_subst_attr "round_sd_mask_op4" "round" "" "<round_sd_mask_operand4>")
(define_subst_attr "round_sdc_mask_op4" "round" "" "<round_sdc_mask_operand4>")
(define_subst_attr "round_constraint" "round" "vm" "v")
-(define_subst_attr "round_suff" "round" "{y}" "")
(define_subst_attr "round_qq2phsuff" "round" "<qq2phsuff>" "")
-(define_subst_attr "round_qq2pssuff" "round" "<qq2pssuff>" "")
-(define_subst_attr "round_pd2udqsuff" "round" "<pd2udqsuff>" "")
(define_subst_attr "bcst_round_constraint" "round" "vmBr" "v")
(define_subst_attr "round_constraint2" "round" "m" "v")
(define_subst_attr "round_constraint3" "round" "rm" "r")
-(define_subst_attr "round_constraint4" "round" "vBm" "v")
(define_subst_attr "round_nimm_predicate" "round" "vector_operand" "register_operand")
(define_subst_attr "bcst_round_nimm_predicate" "round" "bcst_vector_operand" "register_operand")
(define_subst_attr "round_nimm_scalar_predicate" "round" "nonimmediate_operand" "register_operand")
(define_subst_attr "round_prefix" "round" "vex" "evex")
-(define_subst_attr "round_mode_condition" "round" "1" "((<MODE>mode == V16SFmode
- || <MODE>mode == V8DFmode
- || <MODE>mode == V8DImode
- || <MODE>mode == V16SImode
- || <MODE>mode == V32HImode
- || <MODE>mode == V32HFmode)
- || (TARGET_AVX10_2_256
- && (<MODE>mode == V8SFmode
- || <MODE>mode == V4DFmode
- || <MODE>mode == V4DImode
- || <MODE>mode == V8SImode
- || <MODE>mode == V16HImode
- || <MODE>mode == V16HFmode)))")
-(define_subst_attr "round_applied" "round" "false" "true")
+(define_subst_attr "round_mode512bit_condition" "round" "1" "(<MODE>mode == V16SFmode
+ || <MODE>mode == V8DFmode
+ || <MODE>mode == V8DImode
+ || <MODE>mode == V16SImode
+ || <MODE>mode == V32HFmode)")
(define_subst_attr "round_modev4sf_condition" "round" "1" "(<MODE>mode == V4SFmode)")
(define_subst_attr "round_codefor" "round" "*" "")
@@ -263,21 +250,11 @@
(define_subst_attr "round_saeonly_constraint2" "round_saeonly" "m" "v")
(define_subst_attr "round_saeonly_nimm_predicate" "round_saeonly" "vector_operand" "register_operand")
(define_subst_attr "round_saeonly_nimm_scalar_predicate" "round_saeonly" "nonimmediate_operand" "register_operand")
-(define_subst_attr "round_saeonly_suff" "round_saeonly" "{y}" "")
-(define_subst_attr "round_saeonly_mode_condition" "round_saeonly" "1" "((<MODE>mode == V16SFmode
- || <MODE>mode == V8DFmode
- || <MODE>mode == V8DImode
- || <MODE>mode == V16SImode
- || <MODE>mode == V32HImode
- || <MODE>mode == V32HFmode)
- || (TARGET_AVX10_2_256
- && (<MODE>mode == V8SFmode
- || <MODE>mode == V4DFmode
- || <MODE>mode == V4DImode
- || <MODE>mode == V8SImode
- || <MODE>mode == V16HImode
- || <MODE>mode == V16HFmode)))")
-(define_subst_attr "round_saeonly_applied" "round_saeonly" "false" "true")
+(define_subst_attr "round_saeonly_mode512bit_condition" "round_saeonly" "1" "(<MODE>mode == V16SFmode
+ || <MODE>mode == V8DFmode
+ || <MODE>mode == V8DImode
+ || <MODE>mode == V16SImode
+ || <MODE>mode == V32HFmode)")
(define_subst "round_saeonly"
diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
index d1648d5..022037f 100644
--- a/gcc/config/nvptx/nvptx.cc
+++ b/gcc/config/nvptx/nvptx.cc
@@ -245,6 +245,9 @@ default_ptx_version_option (void)
warp convergence. */
res = MAX (res, PTX_VERSION_6_0);
+ /* Pick at least 6.3, to enable PTX '.alias'. */
+ res = MAX (res, PTX_VERSION_6_3);
+
/* For sm_52+, pick at least 7.3, to enable PTX 'alloca'. */
if (ptx_isa_option >= PTX_ISA_SM52)
res = MAX (res, PTX_VERSION_7_3);
@@ -7710,6 +7713,30 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree name,
{
if (nvptx_alias == 0 || !TARGET_PTX_6_3)
{
+ /* Symbol aliases are not supported here. */
+
+#ifdef ACCEL_COMPILER
+ if (DECL_CXX_CONSTRUCTOR_P (name)
+ || DECL_CXX_DESTRUCTOR_P (name))
+ {
+ /* ..., but symbol aliases are supported and used in the host system,
+ via 'gcc/cp/optimize.cc:can_alias_cdtor'. */
+
+ gcc_assert (!lookup_attribute ("weak", DECL_ATTRIBUTES (name)));
+ gcc_assert (TREE_CODE (name) == FUNCTION_DECL);
+
+ /* In this specific case, use PTX '.alias', if available, even for
+ (default) '-mno-alias'. */
+ if (TARGET_PTX_6_3)
+ {
+ DECL_ATTRIBUTES (name)
+ = tree_cons (get_identifier ("symbol alias handled"),
+ NULL_TREE, DECL_ATTRIBUTES (name));
+ goto emit_ptx_alias;
+ }
+ }
+#endif
+
/* Copied from assemble_alias. */
error_at (DECL_SOURCE_LOCATION (name),
"alias definitions not supported in this configuration");
@@ -7741,6 +7768,8 @@ nvptx_asm_output_def_from_decls (FILE *stream, tree name,
return;
}
+ emit_ptx_alias:
+
cgraph_node *cnode = cgraph_node::get (name);
if (!cnode->referred_to_p ())
/* Prevent "Internal error: reference to deleted section". */
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index d4e849b..0ff3fd5 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -11173,8 +11173,8 @@ s390_hard_regno_mode_ok (unsigned int regno, machine_mode mode)
}
break;
case ADDR_REGS:
- if (FRAME_REGNO_P (regno) && mode == Pmode)
- return true;
+ if (FRAME_REGNO_P (regno))
+ return mode == Pmode;
/* fallthrough */
case GENERAL_REGS:
@@ -16246,7 +16246,12 @@ s390_option_override_internal (struct gcc_options *opts,
{
/* Architecture mode defaults according to ABI. */
if (!(opts_set->x_target_flags & MASK_ZARCH))
- opts->x_target_flags |= MASK_ZARCH;
+ {
+ if (TARGET_64BIT)
+ opts->x_target_flags |= MASK_ZARCH;
+ else
+ opts->x_target_flags &= ~MASK_ZARCH;
+ }
/* Set the march default in case it hasn't been specified on cmdline. */
if (!opts_set->x_s390_arch)
diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h
index 5731ae9..6f7195d 100644
--- a/gcc/config/s390/s390.h
+++ b/gcc/config/s390/s390.h
@@ -302,7 +302,7 @@ extern const char *s390_host_detect_local_cpu (int argc, const char **argv);
#define DRIVER_SELF_SPECS \
MARCH_MTUNE_NATIVE_SPECS, \
"%{!m31:%{!m64:-m" S390_TARGET_BITS_STRING "}}", \
- "%{!mesa:%{!mzarch:-mzarch}}", \
+ "%{!mesa:%{!mzarch:%{m31:-mesa}%{m64:-mzarch}}}", \
"%{!march=*:-march=z900}"
/* Target machine storage layout. */
diff --git a/gcc/config/s390/s390.opt b/gcc/config/s390/s390.opt
index f0cb07a..f064597 100644
--- a/gcc/config/s390/s390.opt
+++ b/gcc/config/s390/s390.opt
@@ -136,7 +136,7 @@ Target Mask(DEBUG_ARG) Save
Additional debug prints.
mesa
-Target RejectNegative Negative(mzarch) InverseMask(ZARCH) Warn(%<-mesa%> is deprecated and support for ESA/390 will be removed; use %<-mzarch%> instead)
+Target RejectNegative Negative(mzarch) InverseMask(ZARCH)
ESA/390 architecture.
mhard-dfp
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6e35a7b..6787916 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,47 @@
+2025-03-23 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/119154
+ * decl2.cc (vague_linkage_p): Revert gnu_linkage handling.
+ * module.cc (importer_interface): New enumeration.
+ (get_importer_interface): New function.
+ (trees_out::core_bools): Use it to determine interface.
+ (trees_in::is_matching_decl): Propagate gnu_inline handling onto
+ existing forward declarations.
+ (trees_in::read_var_def): Also note explicit instantiation
+ definitions of variable templates to be emitted.
+
+2025-03-22 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/119379
+ * pt.cc (tsubst_decl) <case TYPE_DECL>: Preserve structural-ness
+ of a partially instantiated typedef.
+
+2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ * parser.cc (cp_parser_omp_clause_init): Make addressable.
+
+2025-03-21 Jason Merrill <jason@redhat.com>
+
+ * init.cc (throw_bad_array_new_length): Returns void.
+
+2025-03-21 Thomas Schwinge <tschwinge@baylibre.com>
+
+ * rtti.cc (throw_bad_cast): Adjust implicit '__cxa_bad_cast'
+ prototype to reality.
+
+2025-03-20 Richard Biener <rguenther@suse.de>
+
+ * module.cc (trees_out::core_bools): Convert scoped enum
+ explicitly.
+
+2025-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/119370
+ * decl2.cc (set_context_for_auto_vars_r): New function.
+ (emit_partial_init_fini_fn): Call walk_tree with that function
+ on &init before walk_tree with copy_tree_body_r.
+
2025-03-19 Jason Merrill <jason@redhat.com>
PR c++/119316
diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc
index 4987987..21156f1 100644
--- a/gcc/cp/decl2.cc
+++ b/gcc/cp/decl2.cc
@@ -2482,9 +2482,7 @@ vague_linkage_p (tree decl)
DECL_COMDAT. */
if (DECL_COMDAT (decl)
|| (TREE_CODE (decl) == FUNCTION_DECL
- && DECL_DECLARED_INLINE_P (decl)
- /* But gnu_inline functions are always external. */
- && !lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl)))
+ && DECL_DECLARED_INLINE_P (decl))
|| (DECL_LANG_SPECIFIC (decl)
&& DECL_TEMPLATE_INSTANTIATION (decl))
|| (VAR_P (decl) && DECL_INLINE_VAR_P (decl)))
diff --git a/gcc/cp/init.cc b/gcc/cp/init.cc
index ce6e58e..e589e45 100644
--- a/gcc/cp/init.cc
+++ b/gcc/cp/init.cc
@@ -2810,8 +2810,7 @@ diagnose_uninitialized_cst_or_ref_member (tree type, bool using_new, bool compla
}
/* Call __cxa_bad_array_new_length to indicate that the size calculation
- overflowed. Pretend it returns sizetype so that it plays nicely in the
- COND_EXPR. */
+ overflowed. */
tree
throw_bad_array_new_length (void)
@@ -2823,7 +2822,7 @@ throw_bad_array_new_length (void)
fn = get_global_binding (name);
if (!fn)
fn = push_throw_library_fn
- (name, build_function_type_list (sizetype, NULL_TREE));
+ (name, build_function_type_list (void_type_node, NULL_TREE));
}
return build_cxx_call (fn, 0, NULL, tf_warning_or_error);
diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc
index beceafe..2cded87 100644
--- a/gcc/cp/module.cc
+++ b/gcc/cp/module.cc
@@ -5541,6 +5541,50 @@ trees_in::start (unsigned code)
return t;
}
+/* The kinds of interface an importer could have for a decl. */
+
+enum class importer_interface {
+ unknown, /* The definition may or may not need to be emitted. */
+ always_import, /* The definition can always be found in another TU. */
+ always_emit, /* The definition must be emitted in the importer's TU. */
+};
+
+/* Returns what kind of interface an importer will have of DECL. */
+
+static importer_interface
+get_importer_interface (tree decl)
+{
+ /* Internal linkage entities must be emitted in each importer if
+ there is a definition available. */
+ if (!TREE_PUBLIC (decl))
+ return importer_interface::always_emit;
+
+ /* Entities that aren't vague linkage are either not definitions or
+ will be emitted in this TU, so importers can just refer to an
+ external definition. */
+ if (!vague_linkage_p (decl))
+ return importer_interface::always_import;
+
+ /* For explicit instantiations, importers can always rely on there
+ being a definition in another TU, unless this is a definition
+ in a header module: in which case the importer will always need
+ to emit it. */
+ if (DECL_LANG_SPECIFIC (decl)
+ && DECL_EXPLICIT_INSTANTIATION (decl))
+ return (header_module_p () && !DECL_EXTERNAL (decl)
+ ? importer_interface::always_emit
+ : importer_interface::always_import);
+
+ /* A gnu_inline function is never emitted in any TU. */
+ if (TREE_CODE (decl) == FUNCTION_DECL
+ && DECL_DECLARED_INLINE_P (decl)
+ && lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (decl)))
+ return importer_interface::always_import;
+
+ /* Everything else has vague linkage. */
+ return importer_interface::unknown;
+}
+
/* The structure streamers access the raw fields, because the
alternative, of using the accessor macros can require using
different accessors for the same underlying field, depending on the
@@ -5660,7 +5704,8 @@ trees_out::core_bools (tree t, bits_out& bits)
we need to import or export any vague-linkage entities on
stream-in. */
bool interface_known = t->decl_common.lang_flag_5;
- if (interface_known && vague_linkage_p (t))
+ if (interface_known
+ && get_importer_interface (t) == importer_interface::unknown)
interface_known = false;
WB (interface_known);
}
@@ -5694,8 +5739,8 @@ trees_out::core_bools (tree t, bits_out& bits)
is_external = true;
gcc_fallthrough ();
case FUNCTION_DECL:
- if (TREE_PUBLIC (t)
- && !vague_linkage_p (t))
+ if (get_importer_interface (t)
+ == importer_interface::always_import)
is_external = true;
break;
}
@@ -12159,7 +12204,21 @@ trees_in::is_matching_decl (tree existing, tree decl, bool is_typedef)
if (TREE_CODE (d_inner) == FUNCTION_DECL
&& DECL_DECLARED_INLINE_P (d_inner))
- DECL_DECLARED_INLINE_P (e_inner) = true;
+ {
+ DECL_DECLARED_INLINE_P (e_inner) = true;
+ if (!DECL_SAVED_TREE (e_inner)
+ && lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (d_inner))
+ && !lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (e_inner)))
+ {
+ DECL_INTERFACE_KNOWN (e_inner)
+ |= DECL_INTERFACE_KNOWN (d_inner);
+ DECL_DISREGARD_INLINE_LIMITS (e_inner)
+ |= DECL_DISREGARD_INLINE_LIMITS (d_inner);
+ // TODO: we will eventually want to merge all decl attributes
+ duplicate_one_attribute (&DECL_ATTRIBUTES (e_inner),
+ DECL_ATTRIBUTES (d_inner), "gnu_inline");
+ }
+ }
if (!DECL_EXTERNAL (d_inner))
DECL_EXTERNAL (e_inner) = false;
@@ -12626,6 +12685,8 @@ trees_in::read_var_def (tree decl, tree maybe_template)
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl) = true;
tentative_decl_linkage (decl);
if (DECL_IMPLICIT_INSTANTIATION (decl)
+ || (DECL_EXPLICIT_INSTANTIATION (decl)
+ && !DECL_EXTERNAL (decl))
|| (DECL_CLASS_SCOPE_P (decl)
&& !DECL_VTABLE_OR_VTT_P (decl)
&& !DECL_TEMPLATE_INFO (decl)))
diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc
index 2fb1dc5..57a4610 100644
--- a/gcc/cp/parser.cc
+++ b/gcc/cp/parser.cc
@@ -43183,6 +43183,7 @@ cp_parser_omp_clause_init (cp_parser *parser, tree list)
NULL, false);
for (tree c = nl; c != list; c = OMP_CLAUSE_CHAIN (c))
{
+ TREE_ADDRESSABLE (OMP_CLAUSE_DECL (c)) = 1;
if (target)
OMP_CLAUSE_INIT_TARGET (c) = 1;
if (targetsync)
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index 538ff22..39c0ee6 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -15920,6 +15920,11 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain,
if (TYPE_USER_ALIGN (TREE_TYPE (t)))
TREE_TYPE (r) = build_aligned_type (TREE_TYPE (r),
TYPE_ALIGN (TREE_TYPE (t)));
+
+ /* Preserve structural-ness of a partially instantiated typedef. */
+ if (TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (t))
+ && dependent_type_p (TREE_TYPE (r)))
+ SET_TYPE_STRUCTURAL_EQUALITY (TREE_TYPE (r));
}
layout_decl (r, 0);
diff --git a/gcc/cp/rtti.cc b/gcc/cp/rtti.cc
index dcf84f1..158b5ba 100644
--- a/gcc/cp/rtti.cc
+++ b/gcc/cp/rtti.cc
@@ -186,7 +186,7 @@ build_headof (tree exp)
/* Get a bad_cast node for the program to throw...
- See libstdc++/exception.cc for __throw_bad_cast */
+ See 'libstdc++-v3/libsupc++/eh_aux_runtime.cc' for '__cxa_bad_cast'. */
static tree
throw_bad_cast (void)
@@ -198,7 +198,7 @@ throw_bad_cast (void)
fn = get_global_binding (name);
if (!fn)
fn = push_throw_library_fn
- (name, build_function_type_list (ptr_type_node, NULL_TREE));
+ (name, build_function_type_list (void_type_node, NULL_TREE));
}
return build_cxx_call (fn, 0, NULL, tf_warning_or_error);
diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog
index cfa41f2..0c7d0ee 100644
--- a/gcc/d/ChangeLog
+++ b/gcc/d/ChangeLog
@@ -1,3 +1,37 @@
+2025-03-23 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/117621
+ * types.cc (finish_aggregate_type): Propagate TYPE_PACKED to variants.
+
+2025-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd 032e24446b.
+ * dmd/VERSION: Bump version to v2.111.0-rc.1.
+
+2025-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd 9d2f034398.
+
+2025-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd 94950cae58.
+ * d-lang.cc (d_handle_option): Add case for CppStdRevisionCpp23.
+ * gdc.texi: Document -fextern-std=c++23.
+ * lang.opt (fextern-std=): Add c++23.
+
+2025-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * dmd/MERGE: Merge upstream dmd 8db14cf846.
+
+2025-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * runtime.def (INVARIANT): Update signature of run-time function.
+
+2025-03-20 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/118545
+ * d-lang.cc (d_handle_option): Adjust quoted options.
+
2025-03-18 Iain Buclaw <ibuclaw@gdcproject.org>
* dmd/MERGE: Merge upstream dmd fde0f8c40a.
diff --git a/gcc/d/d-lang.cc b/gcc/d/d-lang.cc
index 8e37fed..b3786be 100644
--- a/gcc/d/d-lang.cc
+++ b/gcc/d/d-lang.cc
@@ -460,7 +460,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
break;
}
- error ("bad argument for %<-fdebug%>: %qs", arg);
+ error ("bad argument for %<-fdebug=%>: %qs", arg);
break;
case OPT_fdoc:
@@ -510,6 +510,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
case CppStdRevisionCpp14:
case CppStdRevisionCpp17:
case CppStdRevisionCpp20:
+ case CppStdRevisionCpp23:
global.params.cplusplus = (CppStdRevision) value;
break;
@@ -533,7 +534,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
case OPT_fmodule_file_:
global.params.modFileAliasStrings.push (arg);
if (!strchr (arg, '='))
- error ("bad argument for %<-fmodule-file%>: %qs", arg);
+ error ("bad argument for %<-fmodule-file=%>: %qs", arg);
break;
case OPT_fmoduleinfo:
@@ -700,7 +701,7 @@ d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
break;
}
- error ("bad argument for %<-fversion%>: %qs", arg);
+ error ("bad argument for %<-fversion=%>: %qs", arg);
break;
case OPT_H:
diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE
index 1be4da4..1160749 100644
--- a/gcc/d/dmd/MERGE
+++ b/gcc/d/dmd/MERGE
@@ -1,4 +1,4 @@
-fde0f8c40a1b8eb78c3485cb0e940035bfe6fb00
+032e24446b3d8c6cfe3043d62534d5ce6d004c34
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
diff --git a/gcc/d/dmd/VERSION b/gcc/d/dmd/VERSION
index 2f668e5..0172d7d 100644
--- a/gcc/d/dmd/VERSION
+++ b/gcc/d/dmd/VERSION
@@ -1 +1 @@
-v2.111.0-beta.1
+v2.111.0-rc.1
diff --git a/gcc/d/dmd/expression.d b/gcc/d/dmd/expression.d
index ef5c0b0..4bf1f9f 100644
--- a/gcc/d/dmd/expression.d
+++ b/gcc/d/dmd/expression.d
@@ -3632,6 +3632,7 @@ extern (C++) final class CastExp : UnaExp
if (rvalue || !e1.isLvalue())
return false;
return (to.ty == Tsarray && (e1.type.ty == Tvector || e1.type.ty == Tsarray)) ||
+ (to.ty == Taarray && e1.type.ty == Taarray) ||
e1.type.mutableOf.unSharedOf().equals(to.mutableOf().unSharedOf());
}
diff --git a/gcc/d/dmd/globals.d b/gcc/d/dmd/globals.d
index 4a637b5..900c554 100644
--- a/gcc/d/dmd/globals.d
+++ b/gcc/d/dmd/globals.d
@@ -62,6 +62,7 @@ enum CppStdRevision : uint
cpp14 = 2014_02,
cpp17 = 2017_03,
cpp20 = 2020_02,
+ cpp23 = 2023_02,
}
/// Trivalent boolean to represent the state of a `revert`able change
diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h
index cdb0663..69fe709 100644
--- a/gcc/d/dmd/globals.h
+++ b/gcc/d/dmd/globals.h
@@ -73,7 +73,8 @@ enum CppStdRevision
CppStdRevisionCpp11 = 201103,
CppStdRevisionCpp14 = 201402,
CppStdRevisionCpp17 = 201703,
- CppStdRevisionCpp20 = 202002
+ CppStdRevisionCpp20 = 202002,
+ CppStdRevisionCpp23 = 202302,
};
/// Trivalent boolean to represent the state of a `revert`able change
diff --git a/gcc/d/dmd/typesem.d b/gcc/d/dmd/typesem.d
index 65bad38..c5a3b83 100644
--- a/gcc/d/dmd/typesem.d
+++ b/gcc/d/dmd/typesem.d
@@ -3444,8 +3444,16 @@ Expression getProperty(Type t, Scope* scope_, Loc loc, Identifier ident, int fla
auto s2 = scope_.search_correct(ident);
// UFCS
if (s2 && s2.isFuncDeclaration)
- errorSupplemental(loc, "did you mean %s `%s`?",
- s2.kind(), s2.toChars());
+ {
+ if (s2.ident == ident)
+ {
+ errorSupplemental(s2.loc, "cannot call %s `%s` with UFCS because it is not declared at module scope",
+ s2.kind(), s2.toChars());
+ }
+ else
+ errorSupplemental(s2.loc, "did you mean %s `%s`?",
+ s2.kind(), s2.toChars());
+ }
else if (src.type.ty == Tpointer)
{
// structPtr.field
@@ -3454,7 +3462,7 @@ Expression getProperty(Type t, Scope* scope_, Loc loc, Identifier ident, int fla
{
if (auto s3 = as.search_correct(ident))
{
- errorSupplemental(loc, "did you mean %s `%s`?",
+ errorSupplemental(s3.loc, "did you mean %s `%s`?",
s3.kind(), s3.toChars());
}
}
diff --git a/gcc/d/gdc.texi b/gcc/d/gdc.texi
index 1a84d6d..2cb0c4a62 100644
--- a/gcc/d/gdc.texi
+++ b/gcc/d/gdc.texi
@@ -273,6 +273,8 @@ Sets @code{__traits(getTargetInfo, "cppStd")} to @code{201703}.
This is the default.
@item c++20
Sets @code{__traits(getTargetInfo, "cppStd")} to @code{202002}.
+@item c++23
+Sets @code{__traits(getTargetInfo, "cppStd")} to @code{202302}.
@end table
@opindex finvariants
diff --git a/gcc/d/lang.opt b/gcc/d/lang.opt
index f769a71..50c6f2f 100644
--- a/gcc/d/lang.opt
+++ b/gcc/d/lang.opt
@@ -320,6 +320,9 @@ Enum(extern_stdcpp) String(c++17) Value(201703)
EnumValue
Enum(extern_stdcpp) String(c++20) Value(202002)
+EnumValue
+Enum(extern_stdcpp) String(c++23) Value(202302)
+
fignore-unknown-pragmas
D
Ignore unsupported pragmas.
diff --git a/gcc/d/runtime.def b/gcc/d/runtime.def
index e426194..4aff0a6 100644
--- a/gcc/d/runtime.def
+++ b/gcc/d/runtime.def
@@ -142,8 +142,8 @@ DEF_D_RUNTIME (CXA_END_CATCH, "__cxa_end_catch", RT(VOID), P0(), 0)
/* When invariant() contracts are turned on, used after testing whether a
class != null for validating the state of a class. */
-DEF_D_RUNTIME (INVARIANT, "_D9invariant12_d_invariantFC6ObjectZv", RT(VOID),
- P1(OBJECT), 0)
+DEF_D_RUNTIME (INVARIANT, "_D2rt10invariant_12_d_invariantFC6ObjectZv",
+ RT(VOID), P1(OBJECT), 0)
#undef P0
#undef P1
diff --git a/gcc/d/types.cc b/gcc/d/types.cc
index 47ef66c..98074f1 100644
--- a/gcc/d/types.cc
+++ b/gcc/d/types.cc
@@ -704,7 +704,7 @@ finish_aggregate_type (unsigned structsize, unsigned alignsize, tree type)
TYPE_LANG_SPECIFIC (t) = TYPE_LANG_SPECIFIC (type);
TYPE_SIZE (t) = TYPE_SIZE (type);
TYPE_SIZE_UNIT (t) = TYPE_SIZE_UNIT (type);
- TYPE_PACKED (type) = TYPE_PACKED (type);
+ TYPE_PACKED (t) = TYPE_PACKED (type);
SET_TYPE_ALIGN (t, TYPE_ALIGN (type));
TYPE_USER_ALIGN (t) = TYPE_USER_ALIGN (type);
}
diff --git a/gcc/doc/avr-mmcu.texi b/gcc/doc/avr-mmcu.texi
index 18101a8..feb7725 100644
--- a/gcc/doc/avr-mmcu.texi
+++ b/gcc/doc/avr-mmcu.texi
@@ -50,11 +50,11 @@
@item @anchor{avrxmega2}avrxmega2
``XMEGA'' devices with more than 8@tie{}KiB and up to 64@tie{}KiB of program memory.
-@*@var{mcu}@tie{}= @code{atxmega8e5}, @code{atxmega16a4}, @code{atxmega16a4u}, @code{atxmega16c4}, @code{atxmega16d4}, @code{atxmega16e5}, @code{atxmega32a4}, @code{atxmega32a4u}, @code{atxmega32c3}, @code{atxmega32c4}, @code{atxmega32d3}, @code{atxmega32d4}, @code{atxmega32e5}, @code{avr64da28}, @code{avr64da32}, @code{avr64da48}, @code{avr64da64}, @code{avr64db28}, @code{avr64db32}, @code{avr64db48}, @code{avr64db64}, @code{avr64dd14}, @code{avr64dd20}, @code{avr64dd28}, @code{avr64dd32}, @code{avr64du28}, @code{avr64du32}, @code{avr64ea28}, @code{avr64ea32}, @code{avr64ea48}.
+@*@var{mcu}@tie{}= @code{atxmega8e5}, @code{atxmega16a4}, @code{atxmega16a4u}, @code{atxmega16c4}, @code{atxmega16d4}, @code{atxmega16e5}, @code{atxmega32a4}, @code{atxmega32a4u}, @code{atxmega32c3}, @code{atxmega32c4}, @code{atxmega32d3}, @code{atxmega32d4}, @code{atxmega32e5}, @code{avr64da28}, @code{avr64da32}, @code{avr64da48}, @code{avr64da64}, @code{avr64db28}, @code{avr64db32}, @code{avr64db48}, @code{avr64db64}, @code{avr64dd14}, @code{avr64dd20}, @code{avr64dd28}, @code{avr64dd32}, @code{avr64du28}, @code{avr64du32}, @code{avr64ea28}, @code{avr64ea32}, @code{avr64ea48}, @code{avr64sd28}, @code{avr64sd32}, @code{avr64sd48}.
@item @anchor{avrxmega3}avrxmega3
``XMEGA'' devices with up to 64@tie{}KiB of combined program memory and RAM, and with program memory visible in the RAM address space.
-@*@var{mcu}@tie{}= @code{attiny202}, @code{attiny204}, @code{attiny212}, @code{attiny214}, @code{attiny402}, @code{attiny404}, @code{attiny406}, @code{attiny412}, @code{attiny414}, @code{attiny416}, @code{attiny416auto}, @code{attiny417}, @code{attiny424}, @code{attiny426}, @code{attiny427}, @code{attiny804}, @code{attiny806}, @code{attiny807}, @code{attiny814}, @code{attiny816}, @code{attiny817}, @code{attiny824}, @code{attiny826}, @code{attiny827}, @code{attiny1604}, @code{attiny1606}, @code{attiny1607}, @code{attiny1614}, @code{attiny1616}, @code{attiny1617}, @code{attiny1624}, @code{attiny1626}, @code{attiny1627}, @code{attiny3214}, @code{attiny3216}, @code{attiny3217}, @code{attiny3224}, @code{attiny3226}, @code{attiny3227}, @code{atmega808}, @code{atmega809}, @code{atmega1608}, @code{atmega1609}, @code{atmega3208}, @code{atmega3209}, @code{atmega4808}, @code{atmega4809}, @code{avr16dd14}, @code{avr16dd20}, @code{avr16dd28}, @code{avr16dd32}, @code{avr16du14}, @code{avr16du20}, @code{avr16du28}, @code{avr16du32}, @code{avr16ea28}, @code{avr16ea32}, @code{avr16ea48}, @code{avr16eb14}, @code{avr16eb20}, @code{avr16eb28}, @code{avr16eb32}, @code{avr32da28}, @code{avr32da32}, @code{avr32da48}, @code{avr32db28}, @code{avr32db32}, @code{avr32db48}, @code{avr32dd14}, @code{avr32dd20}, @code{avr32dd28}, @code{avr32dd32}, @code{avr32du14}, @code{avr32du20}, @code{avr32du28}, @code{avr32du32}, @code{avr32ea28}, @code{avr32ea32}, @code{avr32ea48}.
+@*@var{mcu}@tie{}= @code{attiny202}, @code{attiny204}, @code{attiny212}, @code{attiny214}, @code{attiny402}, @code{attiny404}, @code{attiny406}, @code{attiny412}, @code{attiny414}, @code{attiny416}, @code{attiny416auto}, @code{attiny417}, @code{attiny424}, @code{attiny426}, @code{attiny427}, @code{attiny804}, @code{attiny806}, @code{attiny807}, @code{attiny814}, @code{attiny816}, @code{attiny817}, @code{attiny824}, @code{attiny826}, @code{attiny827}, @code{attiny1604}, @code{attiny1606}, @code{attiny1607}, @code{attiny1614}, @code{attiny1616}, @code{attiny1617}, @code{attiny1624}, @code{attiny1626}, @code{attiny1627}, @code{attiny3214}, @code{attiny3216}, @code{attiny3217}, @code{attiny3224}, @code{attiny3226}, @code{attiny3227}, @code{atmega808}, @code{atmega809}, @code{atmega1608}, @code{atmega1609}, @code{atmega3208}, @code{atmega3209}, @code{atmega4808}, @code{atmega4809}, @code{avr16dd14}, @code{avr16dd20}, @code{avr16dd28}, @code{avr16dd32}, @code{avr16du14}, @code{avr16du20}, @code{avr16du28}, @code{avr16du32}, @code{avr16ea28}, @code{avr16ea32}, @code{avr16ea48}, @code{avr16eb14}, @code{avr16eb20}, @code{avr16eb28}, @code{avr16eb32}, @code{avr32da28}, @code{avr32da32}, @code{avr32da48}, @code{avr32db28}, @code{avr32db32}, @code{avr32db48}, @code{avr32dd14}, @code{avr32dd20}, @code{avr32dd28}, @code{avr32dd32}, @code{avr32du14}, @code{avr32du20}, @code{avr32du28}, @code{avr32du32}, @code{avr32ea28}, @code{avr32ea32}, @code{avr32ea48}, @code{avr32sd20}, @code{avr32sd28}, @code{avr32sd32}.
@item @anchor{avrxmega4}avrxmega4
``XMEGA'' devices with more than 64@tie{}KiB and up to 128@tie{}KiB of program memory.
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index b919df9..ed766e5 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -23,41 +23,9 @@ Some features that are in ISO C99 but not C90 or C++ are also, as
extensions, accepted by GCC in C90 mode and in C++.
@menu
-* Statement Exprs:: Putting statements and declarations inside expressions.
-* Local Labels:: Labels local to a block.
-* Labels as Values:: Getting pointers to labels, and computed gotos.
-* Nested Functions:: Nested function in GNU C.
-* Nonlocal Gotos:: Nonlocal gotos.
-* Constructing Calls:: Dispatching a call to another function.
-* Typeof:: @code{typeof}: referring to the type of an expression.
-* Conditionals:: Omitting the middle operand of a @samp{?:} expression.
-* __int128:: 128-bit integers---@code{__int128}.
-* Long Long:: Double-word integers---@code{long long int}.
-* Complex:: Data types for complex numbers.
-* Floating Types:: Additional Floating Types.
-* Half-Precision:: Half-Precision Floating Point.
-* Decimal Float:: Decimal Floating Types.
-* Hex Floats:: Hexadecimal floating-point constants.
-* Fixed-Point:: Fixed-Point Types.
+* Additional Numeric Types:: Additional sizes and formats, plus complex numbers.
+* Aggregate Types:: Extensions to arrays, structs, and unions.
* Named Address Spaces::Named address spaces.
-* Zero Length:: Zero-length arrays.
-* Empty Structures:: Structures with no members.
-* Flexible Array Members in Unions:: Unions with Flexible Array Members.
-* Flexible Array Members alone in Structures:: Structures with only Flexible Array Members.
-* Variable Length:: Arrays whose length is computed at run time.
-* Variadic Macros:: Macros with a variable number of arguments.
-* Escaped Newlines:: Slightly looser rules for escaped newlines.
-* Subscripting:: Any array can be subscripted, even if not an lvalue.
-* Pointer Arith:: Arithmetic on @code{void}-pointers and function pointers.
-* Variadic Pointer Args:: Pointer arguments to variadic functions.
-* Pointers to Arrays:: Pointers to arrays with qualifiers work as expected.
-* Initializers:: Non-constant initializers.
-* Compound Literals:: Compound literals give structures, unions
- or arrays as values.
-* Designated Inits:: Labeling elements of initializers.
-* Case Ranges:: `case 1 ... 9' and such.
-* Cast to Union:: Casting to union type from any member of the union.
-* Mixed Labels and Declarations:: Mixing declarations, labels and code.
* Function Attributes:: Declaring that functions have no side effects,
or that they can never return.
* Variable Attributes:: Specifying attributes of variables.
@@ -66,23 +34,20 @@ extensions, accepted by GCC in C90 mode and in C++.
* Enumerator Attributes:: Specifying attributes on enumerators.
* Statement Attributes:: Specifying attributes on statements.
* Attribute Syntax:: Formal syntax for attributes.
-* Function Prototypes:: Prototype declarations and old-style definitions.
-* C++ Comments:: C++ comments are recognized.
-* Dollar Signs:: Dollar sign is allowed in identifiers.
-* Character Escapes:: @samp{\e} stands for the character @key{ESC}.
-* Alignment:: Determining the alignment of a function, type or variable.
+* Pragmas:: Pragmas accepted by GCC.
+* Thread-Local:: Per-thread variables.
+* OpenMP:: Multiprocessing extensions.
+* OpenACC:: Extensions for offloading code to accelerator devices.
* Inline:: Defining inline functions (as fast as macros).
-* Const and Volatile Functions :: GCC interprets these specially in C.
* Volatiles:: What constitutes an access to a volatile object.
* Using Assembly Language with C:: Instructions and extensions for interfacing C with assembler.
-* Alternate Keywords:: @code{__const__}, @code{__asm__}, etc., for header files.
-* Incomplete Enums:: @code{enum foo;}, with details to follow.
-* Function Names:: Printable strings which are the name of the current
- function.
+* Syntax Extensions:: Other extensions to C syntax.
+* Semantic Extensions:: GNU C defines behavior for some non-standard constructs.
+* Nonlocal Gotos:: Built-ins for nonlocal gotos.
+* Constructing Calls:: Built-ins for dispatching a call to another function.
* Return Address:: Getting the return or frame address of a function.
* Stack Scrubbing:: Stack scrubbing internal interfaces.
* Vector Extensions:: Using vector instructions through built-in functions.
-* Offsetof:: Special syntax for implementing @code{offsetof}.
* __sync Builtins:: Legacy built-in functions for atomic memory access.
* __atomic Builtins:: Atomic built-in functions with memory model.
* Integer Overflow Builtins:: Built-in functions to perform arithmetics and
@@ -94,842 +59,28 @@ extensions, accepted by GCC in C90 mode and in C++.
* Other Builtins:: Other built-in functions.
* Target Builtins:: Built-in functions specific to particular targets.
* Target Format Checks:: Format checks specific to particular targets.
-* Pragmas:: Pragmas accepted by GCC.
-* Unnamed Fields:: Unnamed struct/union fields within structs/unions.
-* Thread-Local:: Per-thread variables.
-* Binary constants:: Binary constants using the @samp{0b} prefix.
-* OpenMP:: Multiprocessing extensions.
-* OpenACC:: Extensions for offloading code to accelerator devices.
@end menu
-@node Statement Exprs
-@section Statements and Declarations in Expressions
-@cindex statements inside expressions
-@cindex declarations inside expressions
-@cindex expressions containing statements
-@cindex macros, statements in expressions
-
-@c the above section title wrapped and causes an underfull hbox.. i
-@c changed it from "within" to "in". --mew 4feb93
-A compound statement enclosed in parentheses may appear as an expression
-in GNU C@. This allows you to use loops, switches, and local variables
-within an expression.
-
-Recall that a compound statement is a sequence of statements surrounded
-by braces; in this construct, parentheses go around the braces. For
-example:
-
-@smallexample
-(@{ int y = foo (); int z;
- if (y > 0) z = y;
- else z = - y;
- z; @})
-@end smallexample
-
-@noindent
-is a valid (though slightly more complex than necessary) expression
-for the absolute value of @code{foo ()}.
-
-The last thing in the compound statement should be an expression
-followed by a semicolon; the value of this subexpression serves as the
-value of the entire construct. (If you use some other kind of statement
-last within the braces, the construct has type @code{void}, and thus
-effectively no value.)
-
-This feature is especially useful in making macro definitions ``safe'' (so
-that they evaluate each operand exactly once). For example, the
-``maximum'' function is commonly defined as a macro in standard C as
-follows:
-
-@smallexample
-#define max(a,b) ((a) > (b) ? (a) : (b))
-@end smallexample
-
-@noindent
-@cindex side effects, macro argument
-But this definition computes either @var{a} or @var{b} twice, with bad
-results if the operand has side effects. In GNU C, if you know the
-type of the operands (here taken as @code{int}), you can avoid this
-problem by defining the macro as follows:
-
-@smallexample
-#define maxint(a,b) \
- (@{int _a = (a), _b = (b); _a > _b ? _a : _b; @})
-@end smallexample
-
-Note that introducing variable declarations (as we do in @code{maxint}) can
-cause variable shadowing, so while this example using the @code{max} macro
-produces correct results:
-@smallexample
-int _a = 1, _b = 2, c;
-c = max (_a, _b);
-@end smallexample
-@noindent
-this example using maxint will not:
-@smallexample
-int _a = 1, _b = 2, c;
-c = maxint (_a, _b);
-@end smallexample
-
-This problem may for instance occur when we use this pattern recursively, like
-so:
-
-@smallexample
-#define maxint3(a, b, c) \
- (@{int _a = (a), _b = (b), _c = (c); maxint (maxint (_a, _b), _c); @})
-@end smallexample
-
-Embedded statements are not allowed in constant expressions, such as
-the value of an enumeration constant, the width of a bit-field, or
-the initial value of a static variable.
-
-If you don't know the type of the operand, you can still do this, but you
-must use @code{typeof} or @code{__auto_type} (@pxref{Typeof}).
-
-In G++, the result value of a statement expression undergoes array and
-function pointer decay, and is returned by value to the enclosing
-expression. For instance, if @code{A} is a class, then
-
-@smallexample
- A a;
-
- (@{a;@}).Foo ()
-@end smallexample
-
-@noindent
-constructs a temporary @code{A} object to hold the result of the
-statement expression, and that is used to invoke @code{Foo}.
-Therefore the @code{this} pointer observed by @code{Foo} is not the
-address of @code{a}.
-
-In a statement expression, any temporaries created within a statement
-are destroyed at that statement's end. This makes statement
-expressions inside macros slightly different from function calls. In
-the latter case temporaries introduced during argument evaluation are
-destroyed at the end of the statement that includes the function
-call. In the statement expression case they are destroyed during
-the statement expression. For instance,
-
-@smallexample
-#define macro(a) (@{__typeof__(a) b = (a); b + 3; @})
-template<typename T> T function(T a) @{ T b = a; return b + 3; @}
-
-void foo ()
-@{
- macro (X ());
- function (X ());
-@}
-@end smallexample
-
-@noindent
-has different places where temporaries are destroyed. For the
-@code{macro} case, the temporary @code{X} is destroyed just after
-the initialization of @code{b}. In the @code{function} case that
-temporary is destroyed when the function returns.
-
-These considerations mean that it is probably a bad idea to use
-statement expressions of this form in header files that are designed to
-work with C++. (Note that some versions of the GNU C Library contained
-header files using statement expressions that lead to precisely this
-bug.)
-
-Jumping into a statement expression with @code{goto} or using a
-@code{switch} statement outside the statement expression with a
-@code{case} or @code{default} label inside the statement expression is
-not permitted. Jumping into a statement expression with a computed
-@code{goto} (@pxref{Labels as Values}) has undefined behavior.
-Jumping out of a statement expression is permitted, but if the
-statement expression is part of a larger expression then it is
-unspecified which other subexpressions of that expression have been
-evaluated except where the language definition requires certain
-subexpressions to be evaluated before or after the statement
-expression. A @code{break} or @code{continue} statement inside of
-a statement expression used in @code{while}, @code{do} or @code{for}
-loop or @code{switch} statement condition
-or @code{for} statement init or increment expressions jumps to an
-outer loop or @code{switch} statement if any (otherwise it is an error),
-rather than to the loop or @code{switch} statement in whose condition
-or init or increment expression it appears.
-In any case, as with a function call, the evaluation of a
-statement expression is not interleaved with the evaluation of other
-parts of the containing expression. For example,
-
-@smallexample
- foo (), ((@{ bar1 (); goto a; 0; @}) + bar2 ()), baz();
-@end smallexample
-
-@noindent
-calls @code{foo} and @code{bar1} and does not call @code{baz} but
-may or may not call @code{bar2}. If @code{bar2} is called, it is
-called after @code{foo} and before @code{bar1}.
-
-@node Local Labels
-@section Locally Declared Labels
-@cindex local labels
-@cindex macros, local labels
-
-GCC allows you to declare @dfn{local labels} in any nested block
-scope. A local label is just like an ordinary label, but you can
-only reference it (with a @code{goto} statement, or by taking its
-address) within the block in which it is declared.
-
-A local label declaration looks like this:
-
-@smallexample
-__label__ @var{label};
-@end smallexample
-
-@noindent
-or
-
-@smallexample
-__label__ @var{label1}, @var{label2}, /* @r{@dots{}} */;
-@end smallexample
-
-Local label declarations must come at the beginning of the block,
-before any ordinary declarations or statements.
-
-The label declaration defines the label @emph{name}, but does not define
-the label itself. You must do this in the usual way, with
-@code{@var{label}:}, within the statements of the statement expression.
-
-The local label feature is useful for complex macros. If a macro
-contains nested loops, a @code{goto} can be useful for breaking out of
-them. However, an ordinary label whose scope is the whole function
-cannot be used: if the macro can be expanded several times in one
-function, the label is multiply defined in that function. A
-local label avoids this problem. For example:
-
-@smallexample
-#define SEARCH(value, array, target) \
-do @{ \
- __label__ found; \
- typeof (target) _SEARCH_target = (target); \
- typeof (*(array)) *_SEARCH_array = (array); \
- int i, j; \
- int value; \
- for (i = 0; i < max; i++) \
- for (j = 0; j < max; j++) \
- if (_SEARCH_array[i][j] == _SEARCH_target) \
- @{ (value) = i; goto found; @} \
- (value) = -1; \
- found:; \
-@} while (0)
-@end smallexample
-
-This could also be written using a statement expression:
-
-@smallexample
-#define SEARCH(array, target) \
-(@{ \
- __label__ found; \
- typeof (target) _SEARCH_target = (target); \
- typeof (*(array)) *_SEARCH_array = (array); \
- int i, j; \
- int value; \
- for (i = 0; i < max; i++) \
- for (j = 0; j < max; j++) \
- if (_SEARCH_array[i][j] == _SEARCH_target) \
- @{ value = i; goto found; @} \
- value = -1; \
- found: \
- value; \
-@})
-@end smallexample
-
-Local label declarations also make the labels they declare visible to
-nested functions, if there are any. @xref{Nested Functions}, for details.
-
-@node Labels as Values
-@section Labels as Values
-@cindex labels as values
-@cindex computed gotos
-@cindex goto with computed label
-@cindex address of a label
-
-You can get the address of a label defined in the current function
-(or a containing function) with the unary operator @samp{&&}. The
-value has type @code{void *}. This value is a constant and can be used
-wherever a constant of that type is valid. For example:
-
-@smallexample
-void *ptr;
-/* @r{@dots{}} */
-ptr = &&foo;
-@end smallexample
-
-To use these values, you need to be able to jump to one. This is done
-with the computed goto statement@footnote{The analogous feature in
-Fortran is called an assigned goto, but that name seems inappropriate in
-C, where one can do more than simply store label addresses in label
-variables.}, @code{goto *@var{exp};}. For example,
-
-@smallexample
-goto *ptr;
-@end smallexample
-
-@noindent
-Any expression of type @code{void *} is allowed.
-
-One way of using these constants is in initializing a static array that
-serves as a jump table:
-
-@smallexample
-static void *array[] = @{ &&foo, &&bar, &&hack @};
-@end smallexample
-
-@noindent
-Then you can select a label with indexing, like this:
-
-@smallexample
-goto *array[i];
-@end smallexample
-
-@noindent
-Note that this does not check whether the subscript is in bounds---array
-indexing in C never does that.
-
-Such an array of label values serves a purpose much like that of the
-@code{switch} statement. The @code{switch} statement is cleaner, so
-use that rather than an array unless the problem does not fit a
-@code{switch} statement very well.
-
-Another use of label values is in an interpreter for threaded code.
-The labels within the interpreter function can be stored in the
-threaded code for super-fast dispatching.
-
-You may not use this mechanism to jump to code in a different function.
-If you do that, totally unpredictable things happen. The best way to
-avoid this is to store the label address only in automatic variables and
-never pass it as an argument.
-
-An alternate way to write the above example is
-
-@smallexample
-static const int array[] = @{ &&foo - &&foo, &&bar - &&foo,
- &&hack - &&foo @};
-goto *(&&foo + array[i]);
-@end smallexample
-
-@noindent
-This is more friendly to code living in shared libraries, as it reduces
-the number of dynamic relocations that are needed, and by consequence,
-allows the data to be read-only.
-This alternative with label differences is not supported for the AVR target,
-please use the first approach for AVR programs.
+@node Additional Numeric Types
+@section Additional Numeric Types
-The @code{&&foo} expressions for the same label might have different
-values if the containing function is inlined or cloned. If a program
-relies on them being always the same,
-@code{__attribute__((__noinline__,__noclone__))} should be used to
-prevent inlining and cloning. If @code{&&foo} is used in a static
-variable initializer, inlining and cloning is forbidden.
-
-Unlike a normal goto, in GNU C++ a computed goto will not call
-destructors for objects that go out of scope.
+GCC supports additional numeric types, including larger integer types,
+integer and floating-point complex types,
+additional floating-point sizes and formats, decimal floating types,
+and fixed-point types.
-@node Nested Functions
-@section Nested Functions
-@cindex nested functions
-@cindex downward funargs
-@cindex thunks
-
-A @dfn{nested function} is a function defined inside another function.
-Nested functions are supported as an extension in GNU C, but are not
-supported by GNU C++.
-
-The nested function's name is local to the block where it is defined.
-For example, here we define a nested function named @code{square}, and
-call it twice:
-
-@smallexample
-@group
-foo (double a, double b)
-@{
- double square (double z) @{ return z * z; @}
-
- return square (a) + square (b);
-@}
-@end group
-@end smallexample
-
-The nested function can access all the variables of the containing
-function that are visible at the point of its definition. This is
-called @dfn{lexical scoping}. For example, here we show a nested
-function which uses an inherited variable named @code{offset}:
-
-@smallexample
-@group
-bar (int *array, int offset, int size)
-@{
- int access (int *array, int index)
- @{ return array[index + offset]; @}
- int i;
- /* @r{@dots{}} */
- for (i = 0; i < size; i++)
- /* @r{@dots{}} */ access (array, i) /* @r{@dots{}} */
-@}
-@end group
-@end smallexample
-
-Nested function definitions are permitted within functions in the places
-where variable definitions are allowed; that is, in any block, mixed
-with the other declarations and statements in the block.
-
-It is possible to call the nested function from outside the scope of its
-name by storing its address or passing the address to another function:
-
-@smallexample
-hack (int *array, int size)
-@{
- void store (int index, int value)
- @{ array[index] = value; @}
-
- intermediate (store, size);
-@}
-@end smallexample
-
-Here, the function @code{intermediate} receives the address of
-@code{store} as an argument. If @code{intermediate} calls @code{store},
-the arguments given to @code{store} are used to store into @code{array}.
-But this technique works only so long as the containing function
-(@code{hack}, in this example) does not exit.
-
-If you try to call the nested function through its address after the
-containing function exits, all hell breaks loose. If you try
-to call it after a containing scope level exits, and if it refers
-to some of the variables that are no longer in scope, you may be lucky,
-but it's not wise to take the risk. If, however, the nested function
-does not refer to anything that has gone out of scope, you should be
-safe.
-
-GCC implements taking the address of a nested function using a technique
-called @dfn{trampolines}. This technique was described in
-@cite{Lexical Closures for C++} (Thomas M. Breuel, USENIX
-C++ Conference Proceedings, October 17-21, 1988).
-
-A nested function can jump to a label inherited from a containing
-function, provided the label is explicitly declared in the containing
-function (@pxref{Local Labels}). Such a jump returns instantly to the
-containing function, exiting the nested function that did the
-@code{goto} and any intermediate functions as well. Here is an example:
-
-@smallexample
-@group
-bar (int *array, int offset, int size)
-@{
- __label__ failure;
- int access (int *array, int index)
- @{
- if (index > size)
- goto failure;
- return array[index + offset];
- @}
- int i;
- /* @r{@dots{}} */
- for (i = 0; i < size; i++)
- /* @r{@dots{}} */ access (array, i) /* @r{@dots{}} */
- /* @r{@dots{}} */
- return 0;
-
- /* @r{Control comes here from @code{access}
- if it detects an error.} */
- failure:
- return -1;
-@}
-@end group
-@end smallexample
-
-A nested function always has no linkage. Declaring one with
-@code{extern} or @code{static} is erroneous. If you need to declare the nested function
-before its definition, use @code{auto} (which is otherwise meaningless
-for function declarations).
-
-@smallexample
-bar (int *array, int offset, int size)
-@{
- __label__ failure;
- auto int access (int *, int);
- /* @r{@dots{}} */
- int access (int *array, int index)
- @{
- if (index > size)
- goto failure;
- return array[index + offset];
- @}
- /* @r{@dots{}} */
-@}
-@end smallexample
-
-@node Nonlocal Gotos
-@section Nonlocal Gotos
-@cindex nonlocal gotos
-
-GCC provides the built-in functions @code{__builtin_setjmp} and
-@code{__builtin_longjmp} which are similar to, but not interchangeable
-with, the C library functions @code{setjmp} and @code{longjmp}.
-The built-in versions are used internally by GCC's libraries
-to implement exception handling on some targets. You should use the
-standard C library functions declared in @code{<setjmp.h>} in user code
-instead of the builtins.
-
-The built-in versions of these functions use GCC's normal
-mechanisms to save and restore registers using the stack on function
-entry and exit. The jump buffer argument @var{buf} holds only the
-information needed to restore the stack frame, rather than the entire
-set of saved register values.
-
-An important caveat is that GCC arranges to save and restore only
-those registers known to the specific architecture variant being
-compiled for. This can make @code{__builtin_setjmp} and
-@code{__builtin_longjmp} more efficient than their library
-counterparts in some cases, but it can also cause incorrect and
-mysterious behavior when mixing with code that uses the full register
-set.
-
-You should declare the jump buffer argument @var{buf} to the
-built-in functions as:
-
-@smallexample
-#include <stdint.h>
-intptr_t @var{buf}[5];
-@end smallexample
-
-@defbuiltin{{int} __builtin_setjmp (intptr_t *@var{buf})}
-This function saves the current stack context in @var{buf}.
-@code{__builtin_setjmp} returns 0 when returning directly,
-and 1 when returning from @code{__builtin_longjmp} using the same
-@var{buf}.
-@enddefbuiltin
-
-@defbuiltin{{void} __builtin_longjmp (intptr_t *@var{buf}, int @var{val})}
-This function restores the stack context in @var{buf},
-saved by a previous call to @code{__builtin_setjmp}. After
-@code{__builtin_longjmp} is finished, the program resumes execution as
-if the matching @code{__builtin_setjmp} returns the value @var{val},
-which must be 1.
-
-Because @code{__builtin_longjmp} depends on the function return
-mechanism to restore the stack context, it cannot be called
-from the same function calling @code{__builtin_setjmp} to
-initialize @var{buf}. It can only be called from a function called
-(directly or indirectly) from the function calling @code{__builtin_setjmp}.
-@enddefbuiltin
-
-@node Constructing Calls
-@section Constructing Function Calls
-@cindex constructing calls
-@cindex forwarding calls
-
-Using the built-in functions described below, you can record
-the arguments a function received, and call another function
-with the same arguments, without knowing the number or types
-of the arguments.
-
-You can also record the return value of that function call,
-and later return that value, without knowing what data type
-the function tried to return (as long as your caller expects
-that data type).
-
-However, these built-in functions may interact badly with some
-sophisticated features or other extensions of the language. It
-is, therefore, not recommended to use them outside very simple
-functions acting as mere forwarders for their arguments.
-
-@defbuiltin{{void *} __builtin_apply_args ()}
-This built-in function returns a pointer to data
-describing how to perform a call with the same arguments as are passed
-to the current function.
-
-The function saves the arg pointer register, structure value address,
-and all registers that might be used to pass arguments to a function
-into a block of memory allocated on the stack. Then it returns the
-address of that block.
-@enddefbuiltin
-
-@defbuiltin{{void *} __builtin_apply (void (*@var{function})(), void *@var{arguments}, size_t @var{size})}
-This built-in function invokes @var{function}
-with a copy of the parameters described by @var{arguments}
-and @var{size}.
-
-The value of @var{arguments} should be the value returned by
-@code{__builtin_apply_args}. The argument @var{size} specifies the size
-of the stack argument data, in bytes.
-
-This function returns a pointer to data describing
-how to return whatever value is returned by @var{function}. The data
-is saved in a block of memory allocated on the stack.
-
-It is not always simple to compute the proper value for @var{size}. The
-value is used by @code{__builtin_apply} to compute the amount of data
-that should be pushed on the stack and copied from the incoming argument
-area.
-@enddefbuiltin
-
-@defbuiltin{{void} __builtin_return (void *@var{result})}
-This built-in function returns the value described by @var{result} from
-the containing function. You should specify, for @var{result}, a value
-returned by @code{__builtin_apply}.
-@enddefbuiltin
-
-@defbuiltin{{} __builtin_va_arg_pack ()}
-This built-in function represents all anonymous arguments of an inline
-function. It can be used only in inline functions that are always
-inlined, never compiled as a separate function, such as those using
-@code{__attribute__ ((__always_inline__))} or
-@code{__attribute__ ((__gnu_inline__))} extern inline functions.
-It must be only passed as last argument to some other function
-with variable arguments. This is useful for writing small wrapper
-inlines for variable argument functions, when using preprocessor
-macros is undesirable. For example:
-@smallexample
-extern int myprintf (FILE *f, const char *format, ...);
-extern inline __attribute__ ((__gnu_inline__)) int
-myprintf (FILE *f, const char *format, ...)
-@{
- int r = fprintf (f, "myprintf: ");
- if (r < 0)
- return r;
- int s = fprintf (f, format, __builtin_va_arg_pack ());
- if (s < 0)
- return s;
- return r + s;
-@}
-@end smallexample
-@enddefbuiltin
-
-@defbuiltin{int __builtin_va_arg_pack_len ()}
-This built-in function returns the number of anonymous arguments of
-an inline function. It can be used only in inline functions that
-are always inlined, never compiled as a separate function, such
-as those using @code{__attribute__ ((__always_inline__))} or
-@code{__attribute__ ((__gnu_inline__))} extern inline functions.
-For example following does link- or run-time checking of open
-arguments for optimized code:
-@smallexample
-#ifdef __OPTIMIZE__
-extern inline __attribute__((__gnu_inline__)) int
-myopen (const char *path, int oflag, ...)
-@{
- if (__builtin_va_arg_pack_len () > 1)
- warn_open_too_many_arguments ();
-
- if (__builtin_constant_p (oflag))
- @{
- if ((oflag & O_CREAT) != 0 && __builtin_va_arg_pack_len () < 1)
- @{
- warn_open_missing_mode ();
- return __open_2 (path, oflag);
- @}
- return open (path, oflag, __builtin_va_arg_pack ());
- @}
-
- if (__builtin_va_arg_pack_len () < 1)
- return __open_2 (path, oflag);
-
- return open (path, oflag, __builtin_va_arg_pack ());
-@}
-#endif
-@end smallexample
-@enddefbuiltin
-
-@node Typeof
-@section Referring to a Type with @code{typeof}
-@findex typeof
-@findex sizeof
-@cindex macros, types of arguments
-
-Another way to refer to the type of an expression is with @code{typeof}.
-The syntax of using of this keyword looks like @code{sizeof}, but the
-construct acts semantically like a type name defined with @code{typedef}.
-
-There are two ways of writing the argument to @code{typeof}: with an
-expression or with a type. Here is an example with an expression:
-
-@smallexample
-typeof (x[0](1))
-@end smallexample
-
-@noindent
-This assumes that @code{x} is an array of pointers to functions;
-the type described is that of the values of the functions.
-
-Here is an example with a typename as the argument:
-
-@smallexample
-typeof (int *)
-@end smallexample
-
-@noindent
-Here the type described is that of pointers to @code{int}.
-
-If you are writing a header file that must work when included in ISO C
-programs, write @code{__typeof__} instead of @code{typeof}.
-@xref{Alternate Keywords}.
-
-A @code{typeof} construct can be used anywhere a typedef name can be
-used. For example, you can use it in a declaration, in a cast, or inside
-of @code{sizeof} or @code{typeof}.
-
-The operand of @code{typeof} is evaluated for its side effects if and
-only if it is an expression of variably modified type or the name of
-such a type.
-
-@code{typeof} is often useful in conjunction with
-statement expressions (@pxref{Statement Exprs}).
-Here is how the two together can
-be used to define a safe ``maximum'' macro which operates on any
-arithmetic type and evaluates each of its arguments exactly once:
-
-@smallexample
-#define max(a,b) \
- (@{ typeof (a) _a = (a); \
- typeof (b) _b = (b); \
- _a > _b ? _a : _b; @})
-@end smallexample
-
-@cindex underscores in variables in macros
-@cindex @samp{_} in variables in macros
-@cindex local variables in macros
-@cindex variables, local, in macros
-@cindex macros, local variables in
-
-The reason for using names that start with underscores for the local
-variables is to avoid conflicts with variable names that occur within the
-expressions that are substituted for @code{a} and @code{b}. Eventually we
-hope to design a new form of declaration syntax that allows you to declare
-variables whose scopes start only after their initializers; this will be a
-more reliable way to prevent such conflicts.
-
-@noindent
-Some more examples of the use of @code{typeof}:
-
-@itemize @bullet
-@item
-This declares @code{y} with the type of what @code{x} points to.
-
-@smallexample
-typeof (*x) y;
-@end smallexample
-
-@item
-This declares @code{y} as an array of such values.
-
-@smallexample
-typeof (*x) y[4];
-@end smallexample
-
-@item
-This declares @code{y} as an array of pointers to characters:
-
-@smallexample
-typeof (typeof (char *)[4]) y;
-@end smallexample
-
-@noindent
-It is equivalent to the following traditional C declaration:
-
-@smallexample
-char *y[4];
-@end smallexample
-
-To see the meaning of the declaration using @code{typeof}, and why it
-might be a useful way to write, rewrite it with these macros:
-
-@smallexample
-#define pointer(T) typeof(T *)
-#define array(T, N) typeof(T [N])
-@end smallexample
-
-@noindent
-Now the declaration can be rewritten this way:
-
-@smallexample
-array (pointer (char), 4) y;
-@end smallexample
-
-@noindent
-Thus, @code{array (pointer (char), 4)} is the type of arrays of 4
-pointers to @code{char}.
-@end itemize
-
-The ISO C23 operator @code{typeof_unqual} is available in ISO C23 mode
-and its result is the non-atomic unqualified version of what @code{typeof}
-operator returns. Alternate spelling @code{__typeof_unqual__} is
-available in all C modes and provides non-atomic unqualified version of
-what @code{__typeof__} operator returns.
-@xref{Alternate Keywords}.
-
-@cindex @code{__auto_type} in GNU C
-In GNU C, but not GNU C++, you may also declare the type of a variable
-as @code{__auto_type}. In that case, the declaration must declare
-only one variable, whose declarator must just be an identifier, the
-declaration must be initialized, and the type of the variable is
-determined by the initializer; the name of the variable is not in
-scope until after the initializer. (In C++, you should use C++11
-@code{auto} for this purpose.) Using @code{__auto_type}, the
-``maximum'' macro above could be written as:
-
-@smallexample
-#define max(a,b) \
- (@{ __auto_type _a = (a); \
- __auto_type _b = (b); \
- _a > _b ? _a : _b; @})
-@end smallexample
-
-Using @code{__auto_type} instead of @code{typeof} has two advantages:
-
-@itemize @bullet
-@item Each argument to the macro appears only once in the expansion of
-the macro. This prevents the size of the macro expansion growing
-exponentially when calls to such macros are nested inside arguments of
-such macros.
-
-@item If the argument to the macro has variably modified type, it is
-evaluated only once when using @code{__auto_type}, but twice if
-@code{typeof} is used.
-@end itemize
-
-@node Conditionals
-@section Conditionals with Omitted Operands
-@cindex conditional expressions, extensions
-@cindex omitted middle-operands
-@cindex middle-operands, omitted
-@cindex extensions, @code{?:}
-@cindex @code{?:} extensions
-
-The middle operand in a conditional expression may be omitted. Then
-if the first operand is nonzero, its value is the value of the conditional
-expression.
-
-Therefore, the expression
-
-@smallexample
-x ? : y
-@end smallexample
-
-@noindent
-has the value of @code{x} if that is nonzero; otherwise, the value of
-@code{y}.
-
-This example is perfectly equivalent to
-
-@smallexample
-x ? x : y
-@end smallexample
-
-@cindex side effect in @code{?:}
-@cindex @code{?:} side effect
-@noindent
-In this simple case, the ability to omit the middle operand is not
-especially useful. When it becomes useful is when the first operand does,
-or may (if it is a macro argument), contain a side effect. Then repeating
-the operand in the middle would perform the side effect twice. Omitting
-the middle operand uses the value already computed without the undesirable
-effects of recomputing it.
+@menu
+* __int128:: 128-bit integers---@code{__int128}.
+* Long Long:: Double-word integers---@code{long long int}.
+* Complex:: Data types for complex numbers.
+* Floating Types:: Additional Floating Types.
+* Half-Precision:: Half-Precision Floating Point.
+* Decimal Float:: Decimal Floating Types.
+* Fixed-Point:: Fixed-Point Types.
+@end menu
@node __int128
-@section 128-bit Integers
+@subsection 128-bit Integers
@cindex @code{__int128} data types
As an extension the integer scalar type @code{__int128} is supported for
@@ -940,7 +91,7 @@ support in GCC for expressing an integer constant of type @code{__int128}
for targets with @code{long long} integer less than 128 bits wide.
@node Long Long
-@section Double-Word Integers
+@subsection Double-Word Integers
@cindex @code{long long} data types
@cindex double-word arithmetic
@cindex multiprecision arithmetic
@@ -972,7 +123,7 @@ Likewise, if the function expects @code{long long int} and you pass
@code{int}. The best way to avoid such problems is to use prototypes.
@node Complex
-@section Complex Numbers
+@subsection Complex Numbers
@cindex complex numbers
@cindex @code{_Complex} keyword
@cindex @code{__complex__} keyword
@@ -1083,7 +234,7 @@ infinities, NaNs and negative zeros are involved.
@enddefbuiltin
@node Floating Types
-@section Additional Floating Types
+@subsection Additional Floating Types
@cindex additional floating types
@cindex @code{_Float@var{n}} data types
@cindex @code{_Float@var{n}x} data types
@@ -1169,7 +320,7 @@ typedef _Complex float __attribute__((mode(IC))) _Complex_ibm128;
@end smallexample
@node Half-Precision
-@section Half-Precision Floating Point
+@subsection Half-Precision Floating Point
@cindex half-precision floating point
@cindex @code{__fp16} data type
@cindex @code{__Float16} data type
@@ -1240,7 +391,7 @@ It is useful for code that does not have @code{_Float16} and runs on the x87
FPU.
@node Decimal Float
-@section Decimal Floating Types
+@subsection Decimal Floating Types
@cindex decimal floating types
@cindex @code{_Decimal32} data type
@cindex @code{_Decimal64} data type
@@ -1292,35 +443,8 @@ the technical report.
Types @code{_Decimal32}, @code{_Decimal64}, and @code{_Decimal128}
are supported by the DWARF debug information format.
-@node Hex Floats
-@section Hex Floats
-@cindex hex floats
-
-ISO C99 and ISO C++17 support floating-point numbers written not only in
-the usual decimal notation, such as @code{1.55e1}, but also numbers such as
-@code{0x1.fp3} written in hexadecimal format. As a GNU extension, GCC
-supports this in C90 mode (except in some cases when strictly
-conforming) and in C++98, C++11 and C++14 modes. In that format the
-@samp{0x} hex introducer and the @samp{p} or @samp{P} exponent field are
-mandatory. The exponent is a decimal number that indicates the power of
-2 by which the significant part is multiplied. Thus @samp{0x1.f} is
-@tex
-$1 {15\over16}$,
-@end tex
-@ifnottex
-1 15/16,
-@end ifnottex
-@samp{p3} multiplies it by 8, and the value of @code{0x1.fp3}
-is the same as @code{1.55e1}.
-
-Unlike for floating-point numbers in the decimal notation the exponent
-is always required in the hexadecimal notation. Otherwise the compiler
-would not be able to resolve the ambiguity of, e.g., @code{0x1.f}. This
-could mean @code{1.0f} or @code{1.9375} since @samp{f} is also the
-extension for floating-point constants of type @code{float}.
-
@node Fixed-Point
-@section Fixed-Point Types
+@subsection Fixed-Point Types
@cindex fixed-point types
@cindex @code{_Fract} data type
@cindex @code{_Accum} data type
@@ -1466,257 +590,121 @@ Pragmas to control overflow and rounding behaviors are not implemented.
Fixed-point types are supported by the DWARF debug information format.
-@node Named Address Spaces
-@section Named Address Spaces
-@cindex Named Address Spaces
-
-As an extension, GNU C supports named address spaces as
-defined in the N1275 draft of ISO/IEC DTR 18037. Support for named
-address spaces in GCC will evolve as the draft technical report
-changes. Calling conventions for any target might also change. At
-present, only the AVR, M32C, PRU, RL78, and x86 targets support
-address spaces other than the generic address space.
-
-Address space identifiers may be used exactly like any other C type
-qualifier (e.g., @code{const} or @code{volatile}). See the N1275
-document for more details.
-
-@anchor{AVR Named Address Spaces}
-@subsection AVR Named Address Spaces
-
-On the AVR target, there are several address spaces that can be used
-in order to put read-only data into the flash memory and access that
-data by means of the special instructions @code{LPM} or @code{ELPM}
-needed to read from flash.
-
-Devices belonging to @code{avrtiny} and @code{avrxmega3} can access
-flash memory by means of @code{LD*} instructions because the flash
-memory is mapped into the RAM address space. There is @emph{no need}
-for language extensions like @code{__flash} or attribute
-@ref{AVR Variable Attributes,,@code{progmem}}.
-The default linker description files for these devices cater for that
-feature and @code{.rodata} stays in flash: The compiler just generates
-@code{LD*} instructions, and the linker script adds core specific
-offsets to all @code{.rodata} symbols: @code{0x4000} in the case of
-@code{avrtiny} and @code{0x8000} in the case of @code{avrxmega3}.
-See @ref{AVR Options} for a list of respective devices.
-
-For devices not in @code{avrtiny} or @code{avrxmega3},
-any data including read-only data is located in RAM (the generic
-address space) because flash memory is not visible in the RAM address
-space. In order to locate read-only data in flash memory @emph{and}
-to generate the right instructions to access this data without
-using (inline) assembler code, special address spaces are needed.
-
-@table @code
-@cindex @code{__flash} AVR Named Address Spaces
-@item __flash
-The @code{__flash} qualifier locates data in the
-@code{.progmem.data} section. Data is read using the @code{LPM}
-instruction. Pointers to this address space are 16 bits wide.
-
-@cindex @code{__flash1} AVR Named Address Spaces
-@cindex @code{__flash2} AVR Named Address Spaces
-@cindex @code{__flash3} AVR Named Address Spaces
-@cindex @code{__flash4} AVR Named Address Spaces
-@cindex @code{__flash5} AVR Named Address Spaces
-@item __flash1
-@itemx __flash2
-@itemx __flash3
-@itemx __flash4
-@itemx __flash5
-These are 16-bit address spaces locating data in section
-@code{.progmem@var{N}.data} where @var{N} refers to
-address space @code{__flash@var{N}}.
-The compiler sets the @code{RAMPZ} segment register appropriately
-before reading data by means of the @code{ELPM} instruction.
-
-@cindex @code{__flashx} AVR Named Address Spaces
-@item __flashx
+@node Aggregate Types
+@section Array, Union, and Struct Extensions
-This is a 24-bit flash address space locating data in section
-@code{.progmemx.data}.
-The compiler sets the @code{RAMPZ} segment register appropriately
-before reading data by means of the @code{ELPM} instruction.
+GCC supports several extensions relating to array, union, and struct types,
+including extensions for aggregate initializers for objects of these types.
-@cindex @code{__memx} AVR Named Address Spaces
-@item __memx
-This is a 24-bit address space that linearizes flash and RAM:
-If the high bit of the address is set, data is read from
-RAM using the lower two bytes as RAM address.
-If the high bit of the address is clear, data is read from flash
-with @code{RAMPZ} set according to the high byte of the address.
-@xref{AVR Built-in Functions,,@code{__builtin_avr_flash_segment}}.
+@menu
+* Variable Length:: Arrays whose length is computed at run time.
+* Zero Length:: Zero-length arrays.
+* Empty Structures:: Structures with no members.
+* Flexible Array Members in Unions:: Unions with Flexible Array Members.
+* Flexible Array Members alone in Structures:: Structures with only Flexible Array Members.
+* Unnamed Fields:: Unnamed struct/union fields within structs/unions.
+* Cast to Union:: Casting to union type from any member of the union.
+* Subscripting:: Any array can be subscripted, even if not an lvalue.
+* Initializers:: Non-constant initializers.
+* Compound Literals:: Compound literals give structures, unions
+ or arrays as values.
+* Designated Inits:: Labeling elements of initializers.
+@end menu
-Objects in this address space are located in @code{.progmemx.data}.
-@end table
+@node Variable Length
+@subsection Arrays of Variable Length
+@cindex variable-length arrays
+@cindex arrays of variable length
+@cindex VLAs
-@b{Example}
+Variable-length automatic arrays are allowed in ISO C99, and as an
+extension GCC accepts them in C90 mode and in C++. These arrays are
+declared like any other automatic arrays, but with a length that is not
+a constant expression. The storage is allocated at the point of
+declaration and deallocated when the block scope containing the declaration
+exits. For
+example:
@smallexample
-char my_read (const __flash char ** p)
-@{
- /* p is a pointer to RAM that points to a pointer to flash.
- The first indirection of p reads that flash pointer
- from RAM and the second indirection reads a char from this
- flash address. */
-
- return **p;
-@}
-
-/* Locate array[] in flash memory */
-const __flash int array[] = @{ 3, 5, 7, 11, 13, 17, 19 @};
-
-int i = 1;
-
-int main (void)
+FILE *
+concat_fopen (char *s1, char *s2, char *mode)
@{
- /* Return 17 by reading from flash memory */
- return array[array[i]];
+ char str[strlen (s1) + strlen (s2) + 1];
+ strcpy (str, s1);
+ strcat (str, s2);
+ return fopen (str, mode);
@}
@end smallexample
-@noindent
-For each named address space supported by avr-gcc there is an equally
-named but uppercase built-in macro defined.
-The purpose is to facilitate testing if respective address space
-support is available or not:
-
-@smallexample
-#ifdef __FLASH
-const __flash int var = 1;
-
-int read_var (void)
-@{
- return var;
-@}
-#else
-#include <avr/pgmspace.h> /* From AVR-LibC */
+@cindex scope of a variable length array
+@cindex variable-length array scope
+@cindex deallocating variable length arrays
+Jumping or breaking out of the scope of the array name deallocates the
+storage. Jumping into the scope is not allowed; you get an error
+message for it.
-const int var PROGMEM = 1;
+@cindex variable-length array in a structure
+As an extension, GCC accepts variable-length arrays as a member of
+a structure or a union. For example:
-int read_var (void)
+@smallexample
+void
+foo (int n)
@{
- return (int) pgm_read_word (&var);
+ struct S @{ int x[n]; @};
@}
-#endif /* __FLASH */
@end smallexample
-@noindent
-Notice that attribute @ref{AVR Variable Attributes,,@code{progmem}}
-locates data in flash but
-accesses to these data read from generic address space, i.e.@:
-from RAM,
-so that you need special accessors like @code{pgm_read_byte}
-from @w{@uref{https://avrdudes.github.io/avr-libc/avr-libc-user-manual/,AVR-LibC}}
-together with attribute @code{progmem}.
-
-@noindent
-@b{Limitations and Caveats}
-
-@itemize
-@item
-Reading across the 64@tie{}KiB section boundary of
-the @code{__flash} or @code{__flash@var{N}} address spaces
-is not supported. The only address spaces that
-support reading across the 64@tie{}KiB flash segment boundaries are
-@code{__memx} and @code{__flashx}.
+@cindex @code{alloca} vs variable-length arrays
+You can use the function @code{alloca} to get an effect much like
+variable-length arrays. The function @code{alloca} is available in
+many other C implementations (but not in all). On the other hand,
+variable-length arrays are more elegant.
-@item
-If you use one of the @code{__flash@var{N}} address spaces
-you must arrange your linker script to locate the
-@code{.progmem@var{N}.data} sections according to your needs.
-For an example, see the
-@w{@uref{https://gcc.gnu.org/wiki/avr-gcc#Address_Spaces,avr-gcc wiki}}
+There are other differences between these two methods. Space allocated
+with @code{alloca} exists until the containing @emph{function} returns.
+The space for a variable-length array is deallocated as soon as the array
+name's scope ends, unless you also use @code{alloca} in this scope.
-@item
-Any data or pointers to the non-generic address spaces must
-be qualified as @code{const}, i.e.@: as read-only data.
-This still applies if the data in one of these address
-spaces like software version number or calibration lookup table are intended to
-be changed after load time by, say, a boot loader. In this case
-the right qualification is @code{const} @code{volatile} so that the compiler
-must not optimize away known values or insert them
-as immediates into operands of instructions.
+You can also use variable-length arrays as arguments to functions:
-@item
-The following code initializes a variable @code{pfoo}
-located in static storage with a 24-bit address:
@smallexample
-extern const __memx char foo;
-const __memx void *pfoo = &foo;
+struct entry
+tester (int len, char data[len][len])
+@{
+ /* @r{@dots{}} */
+@}
@end smallexample
-@item
-On the reduced Tiny devices like ATtiny40, no address spaces are supported.
-Just use vanilla C / C++ code without overhead as outlined above.
-Attribute @code{progmem} is supported but works differently,
-see @ref{AVR Variable Attributes}.
-
-@end itemize
-
-@subsection M32C Named Address Spaces
-@cindex @code{__far} M32C Named Address Spaces
-
-On the M32C target, with the R8C and M16C CPU variants, variables
-qualified with @code{__far} are accessed using 32-bit addresses in
-order to access memory beyond the first 64@tie{}Ki bytes. If
-@code{__far} is used with the M32CM or M32C CPU variants, it has no
-effect.
-
-@subsection PRU Named Address Spaces
-@cindex @code{__regio_symbol} PRU Named Address Spaces
+The length of an array is computed once when the storage is allocated
+and is remembered for the scope of the array in case you access it with
+@code{sizeof}.
-On the PRU target, variables qualified with @code{__regio_symbol} are
-aliases used to access the special I/O CPU registers. They must be
-declared as @code{extern} because such variables will not be allocated in
-any data memory. They must also be marked as @code{volatile}, and can
-only be 32-bit integer types. The only names those variables can have
-are @code{__R30} and @code{__R31}, representing respectively the
-@code{R30} and @code{R31} special I/O CPU registers. Hence the following
-example is the only valid usage of @code{__regio_symbol}:
+If you want to pass the array first and the length afterward, you can
+use a forward declaration in the parameter list---another GNU extension.
@smallexample
-extern volatile __regio_symbol uint32_t __R30;
-extern volatile __regio_symbol uint32_t __R31;
+struct entry
+tester (int len; char data[len][len], int len)
+@{
+ /* @r{@dots{}} */
+@}
@end smallexample
-@subsection RL78 Named Address Spaces
-@cindex @code{__far} RL78 Named Address Spaces
-
-On the RL78 target, variables qualified with @code{__far} are accessed
-with 32-bit pointers (20-bit addresses) rather than the default 16-bit
-addresses. Non-far variables are assumed to appear in the topmost
-64@tie{}KiB of the address space.
-
-@subsection x86 Named Address Spaces
-@cindex x86 named address spaces
-
-On the x86 target, variables may be declared as being relative
-to the @code{%fs} or @code{%gs} segments.
-
-@table @code
-@cindex @code{__seg_fs} x86 named address space
-@cindex @code{__seg_gs} x86 named address space
-@item __seg_fs
-@itemx __seg_gs
-The object is accessed with the respective segment override prefix.
-
-The respective segment base must be set via some method specific to
-the operating system. Rather than require an expensive system call
-to retrieve the segment base, these address spaces are not considered
-to be subspaces of the generic (flat) address space. This means that
-explicit casts are required to convert pointers between these address
-spaces and the generic address space. In practice the application
-should cast to @code{uintptr_t} and apply the segment base offset
-that it installed previously.
+@cindex parameter forward declaration
+The @samp{int len} before the semicolon is a @dfn{parameter forward
+declaration}, and it serves the purpose of making the name @code{len}
+known when the declaration of @code{data} is parsed.
-The preprocessor symbols @code{__SEG_FS} and @code{__SEG_GS} are
-defined when these address spaces are supported.
-@end table
+You can write any number of such parameter forward declarations in the
+parameter list. They can be separated by commas or semicolons, but the
+last one must end with a semicolon, which is followed by the ``real''
+parameter declarations. Each forward declaration must match a ``real''
+declaration in parameter name and data type. ISO C99 does not support
+parameter forward declarations.
@node Zero Length
-@section Arrays of Length Zero
+@subsection Arrays of Length Zero
@cindex arrays of length zero
@cindex zero-length arrays
@cindex length-zero arrays
@@ -1875,7 +863,7 @@ struct foo d[1] = @{ @{ 1, @{ 2, 3, 4 @} @} @}; // @r{Invalid.}
@end smallexample
@node Empty Structures
-@section Structures with No Members
+@subsection Structures with No Members
@cindex empty structures
@cindex zero-size structures
@@ -1891,7 +879,7 @@ of the language. G++ treats empty structures as if they had a single
member of type @code{char}.
@node Flexible Array Members in Unions
-@section Unions with Flexible Array Members
+@subsection Unions with Flexible Array Members
@cindex unions with flexible array members
@cindex unions with FAMs
@@ -1908,7 +896,7 @@ If every member of a union is a flexible array member, the size of
such a union is zero.
@node Flexible Array Members alone in Structures
-@section Structures with only Flexible Array Members
+@subsection Structures with only Flexible Array Members
@cindex structures with only flexible array members
@cindex structures with only FAMs
@@ -1922,184 +910,150 @@ struct only_fam @{
The size of such a structure is zero.
-@node Variable Length
-@section Arrays of Variable Length
-@cindex variable-length arrays
-@cindex arrays of variable length
-@cindex VLAs
+@node Unnamed Fields
+@subsection Unnamed Structure and Union Fields
+@cindex @code{struct}
+@cindex @code{union}
-Variable-length automatic arrays are allowed in ISO C99, and as an
-extension GCC accepts them in C90 mode and in C++. These arrays are
-declared like any other automatic arrays, but with a length that is not
-a constant expression. The storage is allocated at the point of
-declaration and deallocated when the block scope containing the declaration
-exits. For
-example:
+As permitted by ISO C11 and for compatibility with other compilers,
+GCC allows you to define
+a structure or union that contains, as fields, structures and unions
+without names. For example:
@smallexample
-FILE *
-concat_fopen (char *s1, char *s2, char *mode)
-@{
- char str[strlen (s1) + strlen (s2) + 1];
- strcpy (str, s1);
- strcat (str, s2);
- return fopen (str, mode);
-@}
+struct @{
+ int a;
+ union @{
+ int b;
+ float c;
+ @};
+ int d;
+@} foo;
@end smallexample
-@cindex scope of a variable length array
-@cindex variable-length array scope
-@cindex deallocating variable length arrays
-Jumping or breaking out of the scope of the array name deallocates the
-storage. Jumping into the scope is not allowed; you get an error
-message for it.
+@noindent
+In this example, you are able to access members of the unnamed
+union with code like @samp{foo.b}. Note that only unnamed structs and
+unions are allowed, you may not have, for example, an unnamed
+@code{int}.
-@cindex variable-length array in a structure
-As an extension, GCC accepts variable-length arrays as a member of
-a structure or a union. For example:
+You must never create such structures that cause ambiguous field definitions.
+For example, in this structure:
@smallexample
-void
-foo (int n)
-@{
- struct S @{ int x[n]; @};
-@}
+struct @{
+ int a;
+ struct @{
+ int a;
+ @};
+@} foo;
@end smallexample
-@cindex @code{alloca} vs variable-length arrays
-You can use the function @code{alloca} to get an effect much like
-variable-length arrays. The function @code{alloca} is available in
-many other C implementations (but not in all). On the other hand,
-variable-length arrays are more elegant.
+@noindent
+it is ambiguous which @code{a} is being referred to with @samp{foo.a}.
+The compiler gives errors for such constructs.
-There are other differences between these two methods. Space allocated
-with @code{alloca} exists until the containing @emph{function} returns.
-The space for a variable-length array is deallocated as soon as the array
-name's scope ends, unless you also use @code{alloca} in this scope.
+@opindex fms-extensions
+Unless @option{-fms-extensions} is used, the unnamed field must be a
+structure or union definition without a tag (for example, @samp{struct
+@{ int a; @};}). If @option{-fms-extensions} is used, the field may
+also be a definition with a tag such as @samp{struct foo @{ int a;
+@};}, a reference to a previously defined structure or union such as
+@samp{struct foo;}, or a reference to a @code{typedef} name for a
+previously defined structure or union type.
-You can also use variable-length arrays as arguments to functions:
+@opindex fplan9-extensions
+The option @option{-fplan9-extensions} enables
+@option{-fms-extensions} as well as two other extensions. First, a
+pointer to a structure is automatically converted to a pointer to an
+anonymous field for assignments and function calls. For example:
@smallexample
-struct entry
-tester (int len, char data[len][len])
-@{
- /* @r{@dots{}} */
-@}
+struct s1 @{ int a; @};
+struct s2 @{ struct s1; @};
+extern void f1 (struct s1 *);
+void f2 (struct s2 *p) @{ f1 (p); @}
@end smallexample
-The length of an array is computed once when the storage is allocated
-and is remembered for the scope of the array in case you access it with
-@code{sizeof}.
+@noindent
+In the call to @code{f1} inside @code{f2}, the pointer @code{p} is
+converted into a pointer to the anonymous field.
-If you want to pass the array first and the length afterward, you can
-use a forward declaration in the parameter list---another GNU extension.
+Second, when the type of an anonymous field is a @code{typedef} for a
+@code{struct} or @code{union}, code may refer to the field using the
+name of the @code{typedef}.
@smallexample
-struct entry
-tester (int len; char data[len][len], int len)
-@{
- /* @r{@dots{}} */
-@}
+typedef struct @{ int a; @} s1;
+struct s2 @{ s1; @};
+s1 f1 (struct s2 *p) @{ return p->s1; @}
@end smallexample
-@cindex parameter forward declaration
-The @samp{int len} before the semicolon is a @dfn{parameter forward
-declaration}, and it serves the purpose of making the name @code{len}
-known when the declaration of @code{data} is parsed.
+These usages are only permitted when they are not ambiguous.
-You can write any number of such parameter forward declarations in the
-parameter list. They can be separated by commas or semicolons, but the
-last one must end with a semicolon, which is followed by the ``real''
-parameter declarations. Each forward declaration must match a ``real''
-declaration in parameter name and data type. ISO C99 does not support
-parameter forward declarations.
+@node Cast to Union
+@subsection Cast to a Union Type
+@cindex cast to a union
+@cindex union, casting to a
-@node Variadic Macros
-@section Macros with a Variable Number of Arguments.
-@cindex variable number of arguments
-@cindex macro with variable arguments
-@cindex rest argument (in macro)
-@cindex variadic macros
+A cast to a union type is a C extension not available in C++. It looks
+just like ordinary casts with the constraint that the type specified is
+a union type. You can specify the type either with the @code{union}
+keyword or with a @code{typedef} name that refers to a union. The result
+of a cast to a union is a temporary rvalue of the union type with a member
+whose type matches that of the operand initialized to the value of
+the operand. The effect of a cast to a union is similar to a compound
+literal except that it yields an rvalue like standard casts do.
+@xref{Compound Literals}.
-In the ISO C standard of 1999, a macro can be declared to accept a
-variable number of arguments much as a function can. The syntax for
-defining the macro is similar to that of a function. Here is an
-example:
+Expressions that may be cast to the union type are those whose type matches
+at least one of the members of the union. Thus, given the following union
+and variables:
@smallexample
-#define debug(format, ...) fprintf (stderr, format, __VA_ARGS__)
+union foo @{ int i; double d; @};
+int x;
+double y;
+union foo z;
@end smallexample
@noindent
-Here @samp{@dots{}} is a @dfn{variable argument}. In the invocation of
-such a macro, it represents the zero or more tokens until the closing
-parenthesis that ends the invocation, including any commas. This set of
-tokens replaces the identifier @code{__VA_ARGS__} in the macro body
-wherever it appears. See the CPP manual for more information.
-
-GCC has long supported variadic macros, and used a different syntax that
-allowed you to give a name to the variable arguments just like any other
-argument. Here is an example:
-
+both @code{x} and @code{y} can be cast to type @code{union foo} and
+the following assignments
@smallexample
-#define debug(format, args...) fprintf (stderr, format, args)
+ z = (union foo) x;
+ z = (union foo) y;
@end smallexample
-
-@noindent
-This is in all ways equivalent to the ISO C example above, but arguably
-more readable and descriptive.
-
-GNU CPP has two further variadic macro extensions, and permits them to
-be used with either of the above forms of macro definition.
-
-In standard C, you are not allowed to leave the variable argument out
-entirely; but you are allowed to pass an empty argument. For example,
-this invocation is invalid in ISO C, because there is no comma after
-the string:
-
+are shorthand equivalents of these
@smallexample
-debug ("A message")
+ z = (union foo) @{ .i = x @};
+ z = (union foo) @{ .d = y @};
@end smallexample
-GNU CPP permits you to completely omit the variable arguments in this
-way. In the above examples, the compiler would complain, though since
-the expansion of the macro still has the extra comma after the format
-string.
+However, @code{(union foo) FLT_MAX;} is not a valid cast because the union
+has no member of type @code{float}.
-To help solve this problem, CPP behaves specially for variable arguments
-used with the token paste operator, @samp{##}. If instead you write
+Using the cast as the right-hand side of an assignment to a variable of
+union type is equivalent to storing in a member of the union with
+the same type
@smallexample
-#define debug(format, ...) fprintf (stderr, format, ## __VA_ARGS__)
+union foo u;
+/* @r{@dots{}} */
+u = (union foo) x @equiv{} u.i = x
+u = (union foo) y @equiv{} u.d = y
@end smallexample
-@noindent
-and if the variable arguments are omitted or empty, the @samp{##}
-operator causes the preprocessor to remove the comma before it. If you
-do provide some variable arguments in your macro invocation, GNU CPP
-does not complain about the paste operation and instead places the
-variable arguments after the comma. Just like any other pasted macro
-argument, these arguments are not macro expanded.
-
-@node Escaped Newlines
-@section Slightly Looser Rules for Escaped Newlines
-@cindex escaped newlines
-@cindex newlines (escaped)
+You can also use the union cast as a function argument:
-The preprocessor treatment of escaped newlines is more relaxed
-than that specified by the C90 standard, which requires the newline
-to immediately follow a backslash.
-GCC's implementation allows whitespace in the form
-of spaces, horizontal and vertical tabs, and form feeds between the
-backslash and the subsequent newline. The preprocessor issues a
-warning, but treats it as a valid escaped newline and combines the two
-lines to form a single logical line. This works within comments and
-tokens, as well as between tokens. Comments are @emph{not} treated as
-whitespace for the purposes of this relaxation, since they have not
-yet been replaced with spaces.
+@smallexample
+void hack (union foo);
+/* @r{@dots{}} */
+hack ((union foo) x);
+@end smallexample
@node Subscripting
-@section Non-Lvalue Arrays May Have Subscripts
+@subsection Non-Lvalue Arrays May Have Subscripts
@cindex subscripting
@cindex arrays, non-lvalue
@@ -2125,63 +1079,8 @@ bar (int index)
@end group
@end smallexample
-@node Pointer Arith
-@section Arithmetic on @code{void}- and Function-Pointers
-@cindex void pointers, arithmetic
-@cindex void, size of pointer to
-@cindex function pointers, arithmetic
-@cindex function, size of pointer to
-
-In GNU C, addition and subtraction operations are supported on pointers to
-@code{void} and on pointers to functions. This is done by treating the
-size of a @code{void} or of a function as 1.
-
-A consequence of this is that @code{sizeof} is also allowed on @code{void}
-and on function types, and returns 1.
-
-@opindex Wpointer-arith
-The option @option{-Wpointer-arith} requests a warning if these extensions
-are used.
-
-@node Variadic Pointer Args
-@section Pointer Arguments in Variadic Functions
-@cindex pointer arguments in variadic functions
-@cindex variadic functions, pointer arguments
-
-Standard C requires that pointer types used with @code{va_arg} in
-functions with variable argument lists either must be compatible with
-that of the actual argument, or that one type must be a pointer to
-@code{void} and the other a pointer to a character type. GNU C
-implements the POSIX XSI extension that additionally permits the use
-of @code{va_arg} with a pointer type to receive arguments of any other
-pointer type.
-
-In particular, in GNU C @samp{va_arg (ap, void *)} can safely be used
-to consume an argument of any pointer type.
-
-@node Pointers to Arrays
-@section Pointers to Arrays with Qualifiers Work as Expected
-@cindex pointers to arrays
-@cindex const qualifier
-
-In GNU C, pointers to arrays with qualifiers work similar to pointers
-to other qualified types. For example, a value of type @code{int (*)[5]}
-can be used to initialize a variable of type @code{const int (*)[5]}.
-These types are incompatible in ISO C because the @code{const} qualifier
-is formally attached to the element type of the array and not the
-array itself.
-
-@smallexample
-extern void
-transpose (int N, int M, double out[M][N], const double in[N][M]);
-double x[3][2];
-double y[2][3];
-@r{@dots{}}
-transpose(3, 2, y, x);
-@end smallexample
-
@node Initializers
-@section Non-Constant Initializers
+@subsection Non-Constant Initializers
@cindex initializers, non-constant
@cindex non-constant initializers
@@ -2198,7 +1097,7 @@ foo (float f, float g)
@end smallexample
@node Compound Literals
-@section Compound Literals
+@subsection Compound Literals
@cindex constructor expressions
@cindex initializations in expressions
@cindex structures, constructor expression
@@ -2300,7 +1199,7 @@ duration. But it is probably safest just to avoid the use of array
compound literals in C++ code.
@node Designated Inits
-@section Designated Initializers
+@subsection Designated Initializers
@cindex initializers with labeled elements
@cindex labeled elements in initializers
@cindex case labels in initializers
@@ -2442,131 +1341,260 @@ struct point ptarray[10] = @{ [2].y = yv2, [2].x = xv2, [0].x = xv0 @};
If the same field is initialized multiple times, or overlapping
fields of a union are initialized, the value from the last
-initialization is used. When a field of a union is itself a structure,
+initialization is used. When a field of a union is itself a structure,
the entire structure from the last field initialized is used. If any previous
initializer has side effect, it is unspecified whether the side effect
happens or not. Currently, GCC discards the side-effecting
initializer expressions and issues a warning.
-@node Case Ranges
-@section Case Ranges
-@cindex case ranges
-@cindex ranges in case statements
+@node Named Address Spaces
+@section Named Address Spaces
+@cindex Named Address Spaces
-You can specify a range of consecutive values in a single @code{case} label,
-like this:
+As an extension, GNU C supports named address spaces as
+defined in the N1275 draft of ISO/IEC DTR 18037. Support for named
+address spaces in GCC will evolve as the draft technical report
+changes. Calling conventions for any target might also change. At
+present, only the AVR, M32C, PRU, RL78, and x86 targets support
+address spaces other than the generic address space.
-@smallexample
-case @var{low} ... @var{high}:
-@end smallexample
+Address space identifiers may be used exactly like any other C type
+qualifier (e.g., @code{const} or @code{volatile}). See the N1275
+document for more details.
-@noindent
-This has the same effect as the proper number of individual @code{case}
-labels, one for each integer value from @var{low} to @var{high}, inclusive.
+@anchor{AVR Named Address Spaces}
+@subsection AVR Named Address Spaces
-This feature is especially useful for ranges of ASCII character codes:
+On the AVR target, there are several address spaces that can be used
+in order to put read-only data into the flash memory and access that
+data by means of the special instructions @code{LPM} or @code{ELPM}
+needed to read from flash.
-@smallexample
-case 'A' ... 'Z':
-@end smallexample
+Devices belonging to @code{avrtiny} and @code{avrxmega3} can access
+flash memory by means of @code{LD*} instructions because the flash
+memory is mapped into the RAM address space. There is @emph{no need}
+for language extensions like @code{__flash} or attribute
+@ref{AVR Variable Attributes,,@code{progmem}}.
+The default linker description files for these devices cater for that
+feature and @code{.rodata} stays in flash: The compiler just generates
+@code{LD*} instructions, and the linker script adds core specific
+offsets to all @code{.rodata} symbols: @code{0x4000} in the case of
+@code{avrtiny} and @code{0x8000} in the case of @code{avrxmega3}.
+See @ref{AVR Options} for a list of respective devices.
-@strong{Be careful:} Write spaces around the @code{...}, for otherwise
-it may be parsed wrong when you use it with integer values. For example,
-write this:
+For devices not in @code{avrtiny} or @code{avrxmega3},
+any data including read-only data is located in RAM (the generic
+address space) because flash memory is not visible in the RAM address
+space. In order to locate read-only data in flash memory @emph{and}
+to generate the right instructions to access this data without
+using (inline) assembler code, special address spaces are needed.
-@smallexample
-case 1 ... 5:
-@end smallexample
+@table @code
+@cindex @code{__flash} AVR Named Address Spaces
+@item __flash
+The @code{__flash} qualifier locates data in the
+@code{.progmem.data} section. Data is read using the @code{LPM}
+instruction. Pointers to this address space are 16 bits wide.
-@noindent
-rather than this:
+@cindex @code{__flash1} AVR Named Address Spaces
+@cindex @code{__flash2} AVR Named Address Spaces
+@cindex @code{__flash3} AVR Named Address Spaces
+@cindex @code{__flash4} AVR Named Address Spaces
+@cindex @code{__flash5} AVR Named Address Spaces
+@item __flash1
+@itemx __flash2
+@itemx __flash3
+@itemx __flash4
+@itemx __flash5
+These are 16-bit address spaces locating data in section
+@code{.progmem@var{N}.data} where @var{N} refers to
+address space @code{__flash@var{N}}.
+The compiler sets the @code{RAMPZ} segment register appropriately
+before reading data by means of the @code{ELPM} instruction.
-@smallexample
-case 1...5:
-@end smallexample
+@cindex @code{__flashx} AVR Named Address Spaces
+@item __flashx
-@node Cast to Union
-@section Cast to a Union Type
-@cindex cast to a union
-@cindex union, casting to a
+This is a 24-bit flash address space locating data in section
+@code{.progmemx.data}.
+The compiler sets the @code{RAMPZ} segment register appropriately
+before reading data by means of the @code{ELPM} instruction.
-A cast to a union type is a C extension not available in C++. It looks
-just like ordinary casts with the constraint that the type specified is
-a union type. You can specify the type either with the @code{union}
-keyword or with a @code{typedef} name that refers to a union. The result
-of a cast to a union is a temporary rvalue of the union type with a member
-whose type matches that of the operand initialized to the value of
-the operand. The effect of a cast to a union is similar to a compound
-literal except that it yields an rvalue like standard casts do.
-@xref{Compound Literals}.
+@cindex @code{__memx} AVR Named Address Spaces
+@item __memx
+This is a 24-bit address space that linearizes flash and RAM:
+If the high bit of the address is set, data is read from
+RAM using the lower two bytes as RAM address.
+If the high bit of the address is clear, data is read from flash
+with @code{RAMPZ} set according to the high byte of the address.
+@xref{AVR Built-in Functions,,@code{__builtin_avr_flash_segment}}.
-Expressions that may be cast to the union type are those whose type matches
-at least one of the members of the union. Thus, given the following union
-and variables:
+Objects in this address space are located in @code{.progmemx.data}.
+@end table
+
+@b{Example}
@smallexample
-union foo @{ int i; double d; @};
-int x;
-double y;
-union foo z;
+char my_read (const __flash char ** p)
+@{
+ /* p is a pointer to RAM that points to a pointer to flash.
+ The first indirection of p reads that flash pointer
+ from RAM and the second indirection reads a char from this
+ flash address. */
+
+ return **p;
+@}
+
+/* Locate array[] in flash memory */
+const __flash int array[] = @{ 3, 5, 7, 11, 13, 17, 19 @};
+
+int i = 1;
+
+int main (void)
+@{
+ /* Return 17 by reading from flash memory */
+ return array[array[i]];
+@}
@end smallexample
@noindent
-both @code{x} and @code{y} can be cast to type @code{union foo} and
-the following assignments
-@smallexample
- z = (union foo) x;
- z = (union foo) y;
-@end smallexample
-are shorthand equivalents of these
+For each named address space supported by avr-gcc there is an equally
+named but uppercase built-in macro defined.
+The purpose is to facilitate testing if respective address space
+support is available or not:
+
@smallexample
- z = (union foo) @{ .i = x @};
- z = (union foo) @{ .d = y @};
-@end smallexample
+#ifdef __FLASH
+const __flash int var = 1;
-However, @code{(union foo) FLT_MAX;} is not a valid cast because the union
-has no member of type @code{float}.
+int read_var (void)
+@{
+ return var;
+@}
+#else
+#include <avr/pgmspace.h> /* From AVR-LibC */
-Using the cast as the right-hand side of an assignment to a variable of
-union type is equivalent to storing in a member of the union with
-the same type
+const int var PROGMEM = 1;
-@smallexample
-union foo u;
-/* @r{@dots{}} */
-u = (union foo) x @equiv{} u.i = x
-u = (union foo) y @equiv{} u.d = y
+int read_var (void)
+@{
+ return (int) pgm_read_word (&var);
+@}
+#endif /* __FLASH */
@end smallexample
-You can also use the union cast as a function argument:
+@noindent
+Notice that attribute @ref{AVR Variable Attributes,,@code{progmem}}
+locates data in flash but
+accesses to these data read from generic address space, i.e.@:
+from RAM,
+so that you need special accessors like @code{pgm_read_byte}
+from @w{@uref{https://avrdudes.github.io/avr-libc/avr-libc-user-manual/,AVR-LibC}}
+together with attribute @code{progmem}.
+
+@noindent
+@b{Limitations and Caveats}
+
+@itemize
+@item
+Reading across the 64@tie{}KiB section boundary of
+the @code{__flash} or @code{__flash@var{N}} address spaces
+is not supported. The only address spaces that
+support reading across the 64@tie{}KiB flash segment boundaries are
+@code{__memx} and @code{__flashx}.
+
+@item
+If you use one of the @code{__flash@var{N}} address spaces
+you must arrange your linker script to locate the
+@code{.progmem@var{N}.data} sections according to your needs.
+For an example, see the
+@w{@uref{https://gcc.gnu.org/wiki/avr-gcc#Address_Spaces,avr-gcc wiki}}
+
+@item
+Any data or pointers to the non-generic address spaces must
+be qualified as @code{const}, i.e.@: as read-only data.
+This still applies if the data in one of these address
+spaces like software version number or calibration lookup table are intended to
+be changed after load time by, say, a boot loader. In this case
+the right qualification is @code{const} @code{volatile} so that the compiler
+must not optimize away known values or insert them
+as immediates into operands of instructions.
+@item
+The following code initializes a variable @code{pfoo}
+located in static storage with a 24-bit address:
@smallexample
-void hack (union foo);
-/* @r{@dots{}} */
-hack ((union foo) x);
+extern const __memx char foo;
+const __memx void *pfoo = &foo;
@end smallexample
-@node Mixed Labels and Declarations
-@section Mixed Declarations, Labels and Code
-@cindex mixed declarations and code
-@cindex declarations, mixed with code
-@cindex code, mixed with declarations
+@item
+On the reduced Tiny devices like ATtiny40, no address spaces are supported.
+Just use vanilla C / C++ code without overhead as outlined above.
+Attribute @code{progmem} is supported but works differently,
+see @ref{AVR Variable Attributes}.
-ISO C99 and ISO C++ allow declarations and code to be freely mixed
-within compound statements. ISO C23 allows labels to be
-placed before declarations and at the end of a compound statement.
-As an extension, GNU C also allows all this in C90 mode. For example,
-you could do:
+@end itemize
+
+@subsection M32C Named Address Spaces
+@cindex @code{__far} M32C Named Address Spaces
+
+On the M32C target, with the R8C and M16C CPU variants, variables
+qualified with @code{__far} are accessed using 32-bit addresses in
+order to access memory beyond the first 64@tie{}Ki bytes. If
+@code{__far} is used with the M32CM or M32C CPU variants, it has no
+effect.
+
+@subsection PRU Named Address Spaces
+@cindex @code{__regio_symbol} PRU Named Address Spaces
+
+On the PRU target, variables qualified with @code{__regio_symbol} are
+aliases used to access the special I/O CPU registers. They must be
+declared as @code{extern} because such variables will not be allocated in
+any data memory. They must also be marked as @code{volatile}, and can
+only be 32-bit integer types. The only names those variables can have
+are @code{__R30} and @code{__R31}, representing respectively the
+@code{R30} and @code{R31} special I/O CPU registers. Hence the following
+example is the only valid usage of @code{__regio_symbol}:
@smallexample
-int i;
-/* @r{@dots{}} */
-i++;
-int j = i + 2;
+extern volatile __regio_symbol uint32_t __R30;
+extern volatile __regio_symbol uint32_t __R31;
@end smallexample
-Each identifier is visible from where it is declared until the end of
-the enclosing block.
+@subsection RL78 Named Address Spaces
+@cindex @code{__far} RL78 Named Address Spaces
+
+On the RL78 target, variables qualified with @code{__far} are accessed
+with 32-bit pointers (20-bit addresses) rather than the default 16-bit
+addresses. Non-far variables are assumed to appear in the topmost
+64@tie{}KiB of the address space.
+
+@subsection x86 Named Address Spaces
+@cindex x86 named address spaces
+
+On the x86 target, variables may be declared as being relative
+to the @code{%fs} or @code{%gs} segments.
+
+@table @code
+@cindex @code{__seg_fs} x86 named address space
+@cindex @code{__seg_gs} x86 named address space
+@item __seg_fs
+@itemx __seg_gs
+The object is accessed with the respective segment override prefix.
+
+The respective segment base must be set via some method specific to
+the operating system. Rather than require an expensive system call
+to retrieve the segment base, these address spaces are not considered
+to be subspaces of the generic (flat) address space. This means that
+explicit casts are required to convert pointers between these address
+spaces and the generic address space. In practice the application
+should cast to @code{uintptr_t} and apply the segment base offset
+that it installed previously.
+
+The preprocessor symbols @code{__SEG_FS} and @code{__SEG_GS} are
+defined when these address spaces are supported.
+@end table
@node Function Attributes
@section Declaring Attributes of Functions
@@ -7611,6 +6639,12 @@ EGPR, PUSH2POP2, NDD and PPX.
Enable the generation of the AVX10.1 instructions with 256 bit support.
Disable the generation of the AVX10.1 instructions.
+@cindex @code{target("avx10.1")} function attribute, x86
+@item avx10.1
+@itemx no-avx10.1
+Enable the generation of the AVX10.1 instructions with 512 bit support.
+Disable the generation of the AVX10.1 instructions.
+
@cindex @code{target("avx10.1-512")} function attribute, x86
@item avx10.1-512
@itemx no-avx10.1-512
@@ -7620,16 +6654,7 @@ Disable the generation of the AVX10.1 instructions.
@cindex @code{target("avx10.2")} function attribute, x86
@item avx10.2
@itemx no-avx10.2
-Enable the generation of the AVX10.2 instructions with 512 bit support.
-Disable the generation of the AVX10.2 instructions.
-
-@cindex @code{target("avx10.2-256")} function attribute, x86
-@item avx10.2-256
-Enable the generation of the AVX10.2 instructions with 256 bit support.
-
-@cindex @code{target("avx10.2-512")} function attribute, x86
-@item avx10.2-512
-Enable the generation of the AVX10.2 instructions with 512 bit support.
+Enable/Disable the generation of the AVX10.2 instructions.
@cindex @code{target("amx-avx512")} function attribute, x86
@item amx-avx512
@@ -10551,134 +9576,989 @@ target type; if such an attribute is applied to a function return type
that is not a pointer-to-function type, it is treated as applying
to the function type.
-@node Function Prototypes
-@section Prototypes and Old-Style Function Definitions
-@cindex function prototype declarations
-@cindex old-style function definitions
-@cindex promotion of formal parameters
+@node Pragmas
+@section Pragmas Accepted by GCC
+@cindex pragmas
+@cindex @code{#pragma}
-GNU C extends ISO C to allow a function prototype to override a later
-old-style non-prototype definition. Consider the following example:
+GCC supports several types of pragmas, primarily in order to compile
+code originally written for other compilers. Note that in general
+we do not recommend the use of pragmas; @xref{Function Attributes},
+for further explanation.
+
+The GNU C preprocessor recognizes several pragmas in addition to the
+compiler pragmas documented here. Refer to the CPP manual for more
+information.
+
+GCC additionally recognizes OpenMP pragmas when the @option{-fopenmp}
+option is specified, and OpenACC pragmas when the @option{-fopenacc}
+option is specified. @xref{OpenMP}, and @ref{OpenACC}.
+
+@menu
+* AArch64 Pragmas::
+* ARM Pragmas::
+* LoongArch Pragmas::
+* M32C Pragmas::
+* PRU Pragmas::
+* RS/6000 and PowerPC Pragmas::
+* S/390 Pragmas::
+* Darwin Pragmas::
+* Solaris Pragmas::
+* Symbol-Renaming Pragmas::
+* Structure-Layout Pragmas::
+* Weak Pragmas::
+* Diagnostic Pragmas::
+* Visibility Pragmas::
+* Push/Pop Macro Pragmas::
+* Function Specific Option Pragmas::
+* Loop-Specific Pragmas::
+@end menu
+@node AArch64 Pragmas
+@subsection AArch64 Pragmas
+
+The pragmas defined by the AArch64 target correspond to the AArch64
+target function attributes. They can be specified as below:
@smallexample
-/* @r{Use prototypes unless the compiler is old-fashioned.} */
-#ifdef __STDC__
-#define P(x) x
-#else
-#define P(x) ()
-#endif
+#pragma GCC target("string")
+@end smallexample
-/* @r{Prototype function declaration.} */
-int isroot P((uid_t));
+where @code{@var{string}} can be any string accepted as an AArch64 target
+attribute. @xref{AArch64 Function Attributes}, for more details
+on the permissible values of @code{string}.
-/* @r{Old-style function definition.} */
-int
-isroot (x) /* @r{??? lossage here ???} */
- uid_t x;
+@node ARM Pragmas
+@subsection ARM Pragmas
+
+The ARM target defines pragmas for controlling the default addition of
+@code{long_call} and @code{short_call} attributes to functions.
+@xref{Function Attributes}, for information about the effects of these
+attributes.
+
+@table @code
+@cindex pragma, long_calls
+@item long_calls
+Set all subsequent functions to have the @code{long_call} attribute.
+
+@cindex pragma, no_long_calls
+@item no_long_calls
+Set all subsequent functions to have the @code{short_call} attribute.
+
+@cindex pragma, long_calls_off
+@item long_calls_off
+Do not affect the @code{long_call} or @code{short_call} attributes of
+subsequent functions.
+@end table
+
+@node LoongArch Pragmas
+@subsection LoongArch Pragmas
+
+The list of attributes supported by Pragma is the same as that of target
+function attributes. @xref{LoongArch Function Attributes}.
+
+Example:
+
+@smallexample
+#pragma GCC target("strict-align")
+@end smallexample
+
+@node M32C Pragmas
+@subsection M32C Pragmas
+
+@table @code
+@cindex pragma, memregs
+@item GCC memregs @var{number}
+Overrides the command-line option @code{-memregs=} for the current
+file. Use with care! This pragma must be before any function in the
+file, and mixing different memregs values in different objects may
+make them incompatible. This pragma is useful when a
+performance-critical function uses a memreg for temporary values,
+as it may allow you to reduce the number of memregs used.
+
+@cindex pragma, address
+@item ADDRESS @var{name} @var{address}
+For any declared symbols matching @var{name}, this does three things
+to that symbol: it forces the symbol to be located at the given
+address (a number), it forces the symbol to be volatile, and it
+changes the symbol's scope to be static. This pragma exists for
+compatibility with other compilers, but note that the common
+@code{1234H} numeric syntax is not supported (use @code{0x1234}
+instead). Example:
+
+@smallexample
+#pragma ADDRESS port3 0x103
+char port3;
+@end smallexample
+
+@end table
+
+@node PRU Pragmas
+@subsection PRU Pragmas
+
+@table @code
+
+@cindex pragma, ctable_entry
+@item ctable_entry @var{index} @var{constant_address}
+Specifies that the PRU CTABLE entry given by @var{index} has the value
+@var{constant_address}. This enables GCC to emit LBCO/SBCO instructions
+when the load/store address is known and can be addressed with some CTABLE
+entry. For example:
+
+@smallexample
+/* will compile to "sbco Rx, 2, 0x10, 4" */
+#pragma ctable_entry 2 0x4802a000
+*(unsigned int *)0x4802a010 = val;
+@end smallexample
+
+@end table
+
+@node RS/6000 and PowerPC Pragmas
+@subsection RS/6000 and PowerPC Pragmas
+
+The RS/6000 and PowerPC targets define one pragma for controlling
+whether or not the @code{longcall} attribute is added to function
+declarations by default. This pragma overrides the @option{-mlongcall}
+option, but not the @code{longcall} and @code{shortcall} attributes.
+@xref{RS/6000 and PowerPC Options}, for more information about when long
+calls are and are not necessary.
+
+@table @code
+@cindex pragma, longcall
+@item longcall (1)
+Apply the @code{longcall} attribute to all subsequent function
+declarations.
+
+@item longcall (0)
+Do not apply the @code{longcall} attribute to subsequent function
+declarations.
+@end table
+
+@c Describe h8300 pragmas here.
+@c Describe sh pragmas here.
+@c Describe v850 pragmas here.
+
+@node S/390 Pragmas
+@subsection S/390 Pragmas
+
+The pragmas defined by the S/390 target correspond to the S/390
+target function attributes and some the additional options:
+
+@table @samp
+@item zvector
+@itemx no-zvector
+@end table
+
+Note that options of the pragma, unlike options of the target
+attribute, do change the value of preprocessor macros like
+@code{__VEC__}. They can be specified as below:
+
+@smallexample
+#pragma GCC target("string[,string]...")
+#pragma GCC target("string"[,"string"]...)
+@end smallexample
+
+@node Darwin Pragmas
+@subsection Darwin Pragmas
+
+The following pragmas are available for all architectures running the
+Darwin operating system. These are useful for compatibility with other
+macOS compilers.
+
+@table @code
+@cindex pragma, mark
+@item mark @var{tokens}@dots{}
+This pragma is accepted, but has no effect.
+
+@cindex pragma, options align
+@item options align=@var{alignment}
+This pragma sets the alignment of fields in structures. The values of
+@var{alignment} may be @code{mac68k}, to emulate m68k alignment, or
+@code{power}, to emulate PowerPC alignment. Uses of this pragma nest
+properly; to restore the previous setting, use @code{reset} for the
+@var{alignment}.
+
+@cindex pragma, segment
+@item segment @var{tokens}@dots{}
+This pragma is accepted, but has no effect.
+
+@cindex pragma, unused
+@item unused (@var{var} [, @var{var}]@dots{})
+This pragma declares variables to be possibly unused. GCC does not
+produce warnings for the listed variables. The effect is similar to
+that of the @code{unused} attribute, except that this pragma may appear
+anywhere within the variables' scopes.
+@end table
+
+@node Solaris Pragmas
+@subsection Solaris Pragmas
+
+The Solaris target supports @code{#pragma redefine_extname}
+(@pxref{Symbol-Renaming Pragmas}). It also supports additional
+@code{#pragma} directives for compatibility with the system compiler.
+
+@table @code
+@cindex pragma, align
+@item align @var{alignment} (@var{variable} [, @var{variable}]...)
+
+Increase the minimum alignment of each @var{variable} to @var{alignment}.
+This is the same as GCC's @code{aligned} attribute @pxref{Variable
+Attributes}). Macro expansion occurs on the arguments to this pragma
+when compiling C and Objective-C@. It does not currently occur when
+compiling C++, but this is a bug which may be fixed in a future
+release.
+
+@cindex pragma, fini
+@item fini (@var{function} [, @var{function}]...)
+
+This pragma causes each listed @var{function} to be called after
+main, or during shared module unloading, by adding a call to the
+@code{.fini} section.
+
+@cindex pragma, init
+@item init (@var{function} [, @var{function}]...)
+
+This pragma causes each listed @var{function} to be called during
+initialization (before @code{main}) or during shared module loading, by
+adding a call to the @code{.init} section.
+
+@end table
+
+@node Symbol-Renaming Pragmas
+@subsection Symbol-Renaming Pragmas
+
+GCC supports a @code{#pragma} directive that changes the name used in
+assembly for a given declaration. While this pragma is supported on all
+platforms, it is intended primarily to provide compatibility with the
+Solaris system headers. This effect can also be achieved using the asm
+labels extension (@pxref{Asm Labels}).
+
+@table @code
+@cindex pragma, redefine_extname
+@item redefine_extname @var{oldname} @var{newname}
+
+This pragma gives the C function @var{oldname} the assembly symbol
+@var{newname}. The preprocessor macro @code{__PRAGMA_REDEFINE_EXTNAME}
+is defined if this pragma is available (currently on all platforms).
+@end table
+
+This pragma and the @code{asm} labels extension interact in a complicated
+manner. Here are some corner cases you may want to be aware of:
+
+@enumerate
+@item This pragma silently applies only to declarations with external
+linkage. The @code{asm} label feature does not have this restriction.
+
+@item In C++, this pragma silently applies only to declarations with
+``C'' linkage. Again, @code{asm} labels do not have this restriction.
+
+@item If either of the ways of changing the assembly name of a
+declaration are applied to a declaration whose assembly name has
+already been determined (either by a previous use of one of these
+features, or because the compiler needed the assembly name in order to
+generate code), and the new name is different, a warning issues and
+the name does not change.
+
+@item The @var{oldname} used by @code{#pragma redefine_extname} is
+always the C-language name.
+@end enumerate
+
+@node Structure-Layout Pragmas
+@subsection Structure-Layout Pragmas
+
+For compatibility with Microsoft Windows compilers, GCC supports a
+set of @code{#pragma} directives that change the maximum alignment of
+members of structures (other than zero-width bit-fields), unions, and
+classes subsequently defined. The @var{n} value below always is required
+to be a small power of two and specifies the new alignment in bytes.
+
+@enumerate
+@item @code{#pragma pack(@var{n})} simply sets the new alignment.
+@item @code{#pragma pack()} sets the alignment to the one that was in
+effect when compilation started (see also command-line option
+@option{-fpack-struct[=@var{n}]} @pxref{Code Gen Options}).
+@item @code{#pragma pack(push[,@var{n}])} pushes the current alignment
+setting on an internal stack and then optionally sets the new alignment.
+@item @code{#pragma pack(pop)} restores the alignment setting to the one
+saved at the top of the internal stack (and removes that stack entry).
+Note that @code{#pragma pack([@var{n}])} does not influence this internal
+stack; thus it is possible to have @code{#pragma pack(push)} followed by
+multiple @code{#pragma pack(@var{n})} instances and finalized by a single
+@code{#pragma pack(pop)}.
+@end enumerate
+
+Some targets, e.g.@: x86 and PowerPC, support the @code{#pragma ms_struct}
+directive which lays out structures and unions subsequently defined as the
+documented @code{__attribute__ ((ms_struct))}.
+
+@enumerate
+@item @code{#pragma ms_struct on} turns on the Microsoft layout.
+@item @code{#pragma ms_struct off} turns off the Microsoft layout.
+@item @code{#pragma ms_struct reset} goes back to the default layout.
+@end enumerate
+
+Most targets also support the @code{#pragma scalar_storage_order} directive
+which lays out structures and unions subsequently defined as the documented
+@code{__attribute__ ((scalar_storage_order))}.
+
+@enumerate
+@item @code{#pragma scalar_storage_order big-endian} sets the storage order
+of the scalar fields to big-endian.
+@item @code{#pragma scalar_storage_order little-endian} sets the storage order
+of the scalar fields to little-endian.
+@item @code{#pragma scalar_storage_order default} goes back to the endianness
+that was in effect when compilation started (see also command-line option
+@option{-fsso-struct=@var{endianness}} @pxref{C Dialect Options}).
+@end enumerate
+
+@node Weak Pragmas
+@subsection Weak Pragmas
+
+For compatibility with SVR4, GCC supports a set of @code{#pragma}
+directives for declaring symbols to be weak, and defining weak
+aliases.
+
+@table @code
+@cindex pragma, weak
+@item #pragma weak @var{symbol}
+This pragma declares @var{symbol} to be weak, as if the declaration
+had the attribute of the same name. The pragma may appear before
+or after the declaration of @var{symbol}. It is not an error for
+@var{symbol} to never be defined at all.
+
+@item #pragma weak @var{symbol1} = @var{symbol2}
+This pragma declares @var{symbol1} to be a weak alias of @var{symbol2}.
+It is an error if @var{symbol2} is not defined in the current
+translation unit.
+@end table
+
+@node Diagnostic Pragmas
+@subsection Diagnostic Pragmas
+
+GCC allows the user to selectively enable or disable certain types of
+diagnostics, and change the kind of the diagnostic. For example, a
+project's policy might require that all sources compile with
+@option{-Werror} but certain files might have exceptions allowing
+specific types of warnings. Or, a project might selectively enable
+diagnostics and treat them as errors depending on which preprocessor
+macros are defined.
+
+@table @code
+@cindex pragma, diagnostic
+@item #pragma GCC diagnostic @var{kind} @var{option}
+
+Modifies the disposition of a diagnostic. Note that not all
+diagnostics are modifiable; at the moment only warnings (normally
+controlled by @samp{-W@dots{}}) can be controlled, and not all of them.
+Use @option{-fdiagnostics-show-option} to determine which diagnostics
+are controllable and which option controls them.
+
+@var{kind} is @samp{error} to treat this diagnostic as an error,
+@samp{warning} to treat it like a warning (even if @option{-Werror} is
+in effect), or @samp{ignored} if the diagnostic is to be ignored.
+@var{option} is a double quoted string that matches the command-line
+option.
+
+@smallexample
+#pragma GCC diagnostic warning "-Wformat"
+#pragma GCC diagnostic error "-Wformat"
+#pragma GCC diagnostic ignored "-Wformat"
+@end smallexample
+
+Note that these pragmas override any command-line options. GCC keeps
+track of the location of each pragma, and issues diagnostics according
+to the state as of that point in the source file. Thus, pragmas occurring
+after a line do not affect diagnostics caused by that line.
+
+@item #pragma GCC diagnostic push
+@itemx #pragma GCC diagnostic pop
+
+Causes GCC to remember the state of the diagnostics as of each
+@code{push}, and restore to that point at each @code{pop}. If a
+@code{pop} has no matching @code{push}, the command-line options are
+restored.
+
+@smallexample
+#pragma GCC diagnostic error "-Wuninitialized"
+ foo(a); /* error is given for this one */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuninitialized"
+ foo(b); /* no diagnostic for this one */
+#pragma GCC diagnostic pop
+ foo(c); /* error is given for this one */
+#pragma GCC diagnostic pop
+ foo(d); /* depends on command-line options */
+@end smallexample
+
+@item #pragma GCC diagnostic ignored_attributes
+
+Similarly to @option{-Wno-attributes=}, this pragma allows users to suppress
+warnings about unknown scoped attributes (in C++11 and C23). For example,
+@code{#pragma GCC diagnostic ignored_attributes "vendor::attr"} disables
+warning about the following declaration:
+
+@smallexample
+[[vendor::attr]] void f();
+@end smallexample
+
+whereas @code{#pragma GCC diagnostic ignored_attributes "vendor::"} prevents
+warning about both of these declarations:
+
+@smallexample
+[[vendor::safe]] void f();
+[[vendor::unsafe]] void f2();
+@end smallexample
+
+@end table
+
+GCC also offers a simple mechanism for printing messages during
+compilation.
+
+@table @code
+@cindex pragma, diagnostic
+@item #pragma message @var{string}
+
+Prints @var{string} as a compiler message on compilation. The message
+is informational only, and is neither a compilation warning nor an
+error. Newlines can be included in the string by using the @samp{\n}
+escape sequence.
+
+@smallexample
+#pragma message "Compiling " __FILE__ "..."
+@end smallexample
+
+@var{string} may be parenthesized, and is printed with location
+information. For example,
+
+@smallexample
+#define DO_PRAGMA(x) _Pragma (#x)
+#define TODO(x) DO_PRAGMA(message ("TODO - " #x))
+
+TODO(Remember to fix this)
+@end smallexample
+
+@noindent
+prints @samp{/tmp/file.c:4: note: #pragma message:
+TODO - Remember to fix this}.
+
+@cindex pragma, diagnostic
+@item #pragma GCC error @var{message}
+Generates an error message. This pragma @emph{is} considered to
+indicate an error in the compilation, and it will be treated as such.
+
+Newlines can be included in the string by using the @samp{\n}
+escape sequence. They will be displayed as newlines even if the
+@option{-fmessage-length} option is set to zero.
+
+The error is only generated if the pragma is present in the code after
+pre-processing has been completed. It does not matter however if the
+code containing the pragma is unreachable:
+
+@smallexample
+#if 0
+#pragma GCC error "this error is not seen"
+#endif
+void foo (void)
@{
- return x == 0;
+ return;
+#pragma GCC error "this error is seen"
@}
@end smallexample
-Suppose the type @code{uid_t} happens to be @code{short}. ISO C does
-not allow this example, because subword arguments in old-style
-non-prototype definitions are promoted. Therefore in this example the
-function definition's argument is really an @code{int}, which does not
-match the prototype argument type of @code{short}.
+@cindex pragma, diagnostic
+@item #pragma GCC warning @var{message}
+This is just like @samp{pragma GCC error} except that a warning
+message is issued instead of an error message. Unless
+@option{-Werror} is in effect, in which case this pragma will generate
+an error as well.
-This restriction of ISO C makes it hard to write code that is portable
-to traditional C compilers, because the programmer does not know
-whether the @code{uid_t} type is @code{short}, @code{int}, or
-@code{long}. Therefore, in cases like these GNU C allows a prototype
-to override a later old-style definition. More precisely, in GNU C, a
-function prototype argument type overrides the argument type specified
-by a later old-style definition if the former type is the same as the
-latter type before promotion. Thus in GNU C the above example is
-equivalent to the following:
+@end table
+
+@node Visibility Pragmas
+@subsection Visibility Pragmas
+
+@table @code
+@cindex pragma, visibility
+@item #pragma GCC visibility push(@var{visibility})
+@itemx #pragma GCC visibility pop
+
+This pragma allows the user to set the visibility for multiple
+declarations without having to give each a visibility attribute
+(@pxref{Function Attributes}).
+
+In C++, @samp{#pragma GCC visibility} affects only namespace-scope
+declarations. Class members and template specializations are not
+affected; if you want to override the visibility for a particular
+member or instantiation, you must use an attribute.
+
+@end table
+
+
+@node Push/Pop Macro Pragmas
+@subsection Push/Pop Macro Pragmas
+
+For compatibility with Microsoft Windows compilers, GCC supports
+@samp{#pragma push_macro(@var{"macro_name"})}
+and @samp{#pragma pop_macro(@var{"macro_name"})}.
+
+@table @code
+@cindex pragma, push_macro
+@item #pragma push_macro(@var{"macro_name"})
+This pragma saves the value of the macro named as @var{macro_name} to
+the top of the stack for this macro.
+
+@cindex pragma, pop_macro
+@item #pragma pop_macro(@var{"macro_name"})
+This pragma sets the value of the macro named as @var{macro_name} to
+the value on top of the stack for this macro. If the stack for
+@var{macro_name} is empty, the value of the macro remains unchanged.
+@end table
+
+For example:
@smallexample
-int isroot (uid_t);
+#define X 1
+#pragma push_macro("X")
+#undef X
+#define X -1
+#pragma pop_macro("X")
+int x [X];
+@end smallexample
-int
-isroot (uid_t x)
+@noindent
+In this example, the definition of X as 1 is saved by @code{#pragma
+push_macro} and restored by @code{#pragma pop_macro}.
+
+@node Function Specific Option Pragmas
+@subsection Function Specific Option Pragmas
+
+@table @code
+@cindex pragma GCC target
+@item #pragma GCC target (@var{string}, @dots{})
+
+This pragma allows you to set target-specific options for functions
+defined later in the source file. One or more strings can be
+specified. Each function that is defined after this point is treated
+as if it had been declared with one @code{target(}@var{string}@code{)}
+attribute for each @var{string} argument. The parentheses around
+the strings in the pragma are optional. @xref{Function Attributes},
+for more information about the @code{target} attribute and the attribute
+syntax.
+
+The @code{#pragma GCC target} pragma is presently implemented for
+x86, ARM, AArch64, PowerPC, and S/390 targets only.
+
+@cindex pragma GCC optimize
+@item #pragma GCC optimize (@var{string}, @dots{})
+
+This pragma allows you to set global optimization options for functions
+defined later in the source file. One or more strings can be
+specified. Each function that is defined after this point is treated
+as if it had been declared with one @code{optimize(}@var{string}@code{)}
+attribute for each @var{string} argument. The parentheses around
+the strings in the pragma are optional. @xref{Function Attributes},
+for more information about the @code{optimize} attribute and the attribute
+syntax.
+
+@cindex pragma GCC push_options
+@cindex pragma GCC pop_options
+@item #pragma GCC push_options
+@itemx #pragma GCC pop_options
+
+These pragmas maintain a stack of the current target and optimization
+options. It is intended for include files where you temporarily want
+to switch to using a different @samp{#pragma GCC target} or
+@samp{#pragma GCC optimize} and then to pop back to the previous
+options.
+
+@cindex pragma GCC reset_options
+@item #pragma GCC reset_options
+
+This pragma clears the current @code{#pragma GCC target} and
+@code{#pragma GCC optimize} to use the default switches as specified
+on the command line.
+
+@end table
+
+@node Loop-Specific Pragmas
+@subsection Loop-Specific Pragmas
+
+@table @code
+@cindex pragma GCC ivdep
+@item #pragma GCC ivdep
+
+With this pragma, the programmer asserts that there are no loop-carried
+dependencies which would prevent consecutive iterations of
+the following loop from executing concurrently with SIMD
+(single instruction multiple data) instructions.
+
+For example, the compiler can only unconditionally vectorize the following
+loop with the pragma:
+
+@smallexample
+void foo (int n, int *a, int *b, int *c)
@{
- return x == 0;
+ int i, j;
+#pragma GCC ivdep
+ for (i = 0; i < n; ++i)
+ a[i] = b[i] + c[i];
@}
@end smallexample
@noindent
-GNU C++ does not support old-style function definitions, so this
-extension is irrelevant.
+In this example, using the @code{restrict} qualifier had the same
+effect. In the following example, that would not be possible. Assume
+@math{k < -m} or @math{k >= m}. Only with the pragma, the compiler knows
+that it can unconditionally vectorize the following loop:
-@node C++ Comments
-@section C++ Style Comments
-@cindex @code{//}
-@cindex C++ comments
-@cindex comments, C++ style
+@smallexample
+void ignore_vec_dep (int *a, int k, int c, int m)
+@{
+#pragma GCC ivdep
+ for (int i = 0; i < m; i++)
+ a[i] = a[i + k] * c;
+@}
+@end smallexample
-In GNU C, you may use C++ style comments, which start with @samp{//} and
-continue until the end of the line. Many other C implementations allow
-such comments, and they are included in the 1999 C standard. However,
-C++ style comments are not recognized if you specify an @option{-std}
-option specifying a version of ISO C before C99, or @option{-ansi}
-(equivalent to @option{-std=c90}).
+@cindex pragma GCC novector
+@item #pragma GCC novector
-@node Dollar Signs
-@section Dollar Signs in Identifier Names
-@cindex $
-@cindex dollar signs in identifier names
-@cindex identifier names, dollar signs in
+With this pragma, the programmer asserts that the following loop should be
+prevented from executing concurrently with SIMD (single instruction multiple
+data) instructions.
-In GNU C, you may normally use dollar signs in identifier names.
-This is because many traditional C implementations allow such identifiers.
-However, dollar signs in identifiers are not supported on a few target
-machines, typically because the target assembler does not allow them.
+For example, the compiler cannot vectorize the following loop with the pragma:
-@node Character Escapes
-@section The Character @key{ESC} in Constants
+@smallexample
+void foo (int n, int *a, int *b, int *c)
+@{
+ int i, j;
+#pragma GCC novector
+ for (i = 0; i < n; ++i)
+ a[i] = b[i] + c[i];
+@}
+@end smallexample
-You can use the sequence @samp{\e} in a string or character constant to
-stand for the ASCII character @key{ESC}.
+@cindex pragma GCC unroll @var{n}
+@item #pragma GCC unroll @var{n}
-@node Alignment
-@section Determining the Alignment of Functions, Types or Variables
-@cindex alignment
-@cindex type alignment
-@cindex variable alignment
+You can use this pragma to control how many times a loop should be unrolled.
+It must be placed immediately before a @code{for}, @code{while} or @code{do}
+loop or a @code{#pragma GCC ivdep}, and applies only to the loop that follows.
+@var{n} is an integer constant expression specifying the unrolling factor.
+The values of @math{0} and @math{1} block any unrolling of the loop.
-The keyword @code{__alignof__} determines the alignment requirement of
-a function, object, or a type, or the minimum alignment usually required
-by a type. Its syntax is just like @code{sizeof} and C11 @code{_Alignof}.
+@end table
-For example, if the target machine requires a @code{double} value to be
-aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8.
-This is true on many RISC machines. On more traditional machine
-designs, @code{__alignof__ (double)} is 4 or even 2.
+@node Thread-Local
+@section Thread-Local Storage
+@cindex Thread-Local Storage
+@cindex @acronym{TLS}
+@cindex @code{__thread}
-Some machines never actually require alignment; they allow references to any
-data type even at an odd address. For these machines, @code{__alignof__}
-reports the smallest alignment that GCC gives the data type, usually as
-mandated by the target ABI.
+Thread-local storage (@acronym{TLS}) is a mechanism by which variables
+are allocated such that there is one instance of the variable per extant
+thread. The runtime model GCC uses to implement this originates
+in the IA-64 processor-specific ABI, but has since been migrated
+to other processors as well. It requires significant support from
+the linker (@command{ld}), dynamic linker (@command{ld.so}), and
+system libraries (@file{libc.so} and @file{libpthread.so}), so it
+is not available everywhere.
-If the operand of @code{__alignof__} is an lvalue rather than a type,
-its value is the required alignment for its type, taking into account
-any minimum alignment specified by attribute @code{aligned}
-(@pxref{Common Variable Attributes}). For example, after this
-declaration:
+At the user level, the extension is visible with a new storage
+class keyword: @code{__thread}. For example:
@smallexample
-struct foo @{ int x; char y; @} foo1;
+__thread int i;
+extern __thread struct state s;
+static __thread char *p;
@end smallexample
-@noindent
-the value of @code{__alignof__ (foo1.y)} is 1, even though its actual
-alignment is probably 2 or 4, the same as @code{__alignof__ (int)}.
-It is an error to ask for the alignment of an incomplete type other
-than @code{void}.
+The @code{__thread} specifier may be used alone, with the @code{extern}
+or @code{static} specifiers, but with no other storage class specifier.
+When used with @code{extern} or @code{static}, @code{__thread} must appear
+immediately after the other storage class specifier.
-If the operand of the @code{__alignof__} expression is a function,
-the expression evaluates to the alignment of the function which may
-be specified by attribute @code{aligned} (@pxref{Common Function Attributes}).
+The @code{__thread} specifier may be applied to any global, file-scoped
+static, function-scoped static, or static data member of a class. It may
+not be applied to block-scoped automatic or non-static data member.
+
+When the address-of operator is applied to a thread-local variable, it is
+evaluated at run time and returns the address of the current thread's
+instance of that variable. An address so obtained may be used by any
+thread. When a thread terminates, any pointers to thread-local variables
+in that thread become invalid.
+
+No static initialization may refer to the address of a thread-local variable.
+
+In C++, if an initializer is present for a thread-local variable, it must
+be a @var{constant-expression}, as defined in 5.19.2 of the ANSI/ISO C++
+standard.
+
+See @uref{https://www.akkadia.org/drepper/tls.pdf,
+ELF Handling For Thread-Local Storage} for a detailed explanation of
+the four thread-local storage addressing models, and how the runtime
+is expected to function.
+
+@menu
+* C99 Thread-Local Edits::
+* C++98 Thread-Local Edits::
+@end menu
+
+@node C99 Thread-Local Edits
+@subsection ISO/IEC 9899:1999 Edits for Thread-Local Storage
+
+The following are a set of changes to ISO/IEC 9899:1999 (aka C99)
+that document the exact semantics of the language extension.
+
+@itemize @bullet
+@item
+@cite{5.1.2 Execution environments}
+
+Add new text after paragraph 1
+
+@quotation
+Within either execution environment, a @dfn{thread} is a flow of
+control within a program. It is implementation defined whether
+or not there may be more than one thread associated with a program.
+It is implementation defined how threads beyond the first are
+created, the name and type of the function called at thread
+startup, and how threads may be terminated. However, objects
+with thread storage duration shall be initialized before thread
+startup.
+@end quotation
+
+@item
+@cite{6.2.4 Storage durations of objects}
+
+Add new text before paragraph 3
+
+@quotation
+An object whose identifier is declared with the storage-class
+specifier @w{@code{__thread}} has @dfn{thread storage duration}.
+Its lifetime is the entire execution of the thread, and its
+stored value is initialized only once, prior to thread startup.
+@end quotation
+
+@item
+@cite{6.4.1 Keywords}
+
+Add @code{__thread}.
+
+@item
+@cite{6.7.1 Storage-class specifiers}
+
+Add @code{__thread} to the list of storage class specifiers in
+paragraph 1.
+
+Change paragraph 2 to
+
+@quotation
+With the exception of @code{__thread}, at most one storage-class
+specifier may be given [@dots{}]. The @code{__thread} specifier may
+be used alone, or immediately following @code{extern} or
+@code{static}.
+@end quotation
+
+Add new text after paragraph 6
+
+@quotation
+The declaration of an identifier for a variable that has
+block scope that specifies @code{__thread} shall also
+specify either @code{extern} or @code{static}.
+
+The @code{__thread} specifier shall be used only with
+variables.
+@end quotation
+@end itemize
+
+@node C++98 Thread-Local Edits
+@subsection ISO/IEC 14882:1998 Edits for Thread-Local Storage
+
+The following are a set of changes to ISO/IEC 14882:1998 (aka C++98)
+that document the exact semantics of the language extension.
+
+@itemize @bullet
+@item
+@b{[intro.execution]}
+
+New text after paragraph 4
+
+@quotation
+A @dfn{thread} is a flow of control within the abstract machine.
+It is implementation defined whether or not there may be more than
+one thread.
+@end quotation
+
+New text after paragraph 7
+
+@quotation
+It is unspecified whether additional action must be taken to
+ensure when and whether side effects are visible to other threads.
+@end quotation
+
+@item
+@b{[lex.key]}
+
+Add @code{__thread}.
+
+@item
+@b{[basic.start.main]}
+
+Add after paragraph 5
+
+@quotation
+The thread that begins execution at the @code{main} function is called
+the @dfn{main thread}. It is implementation defined how functions
+beginning threads other than the main thread are designated or typed.
+A function so designated, as well as the @code{main} function, is called
+a @dfn{thread startup function}. It is implementation defined what
+happens if a thread startup function returns. It is implementation
+defined what happens to other threads when any thread calls @code{exit}.
+@end quotation
+
+@item
+@b{[basic.start.init]}
+
+Add after paragraph 4
+
+@quotation
+The storage for an object of thread storage duration shall be
+statically initialized before the first statement of the thread startup
+function. An object of thread storage duration shall not require
+dynamic initialization.
+@end quotation
+
+@item
+@b{[basic.start.term]}
+
+Add after paragraph 3
+
+@quotation
+The type of an object with thread storage duration shall not have a
+non-trivial destructor, nor shall it be an array type whose elements
+(directly or indirectly) have non-trivial destructors.
+@end quotation
+
+@item
+@b{[basic.stc]}
+
+Add ``thread storage duration'' to the list in paragraph 1.
+
+Change paragraph 2
+
+@quotation
+Thread, static, and automatic storage durations are associated with
+objects introduced by declarations [@dots{}].
+@end quotation
+
+Add @code{__thread} to the list of specifiers in paragraph 3.
+
+@item
+@b{[basic.stc.thread]}
+
+New section before @b{[basic.stc.static]}
+
+@quotation
+The keyword @code{__thread} applied to a non-local object gives the
+object thread storage duration.
+
+A local variable or class data member declared both @code{static}
+and @code{__thread} gives the variable or member thread storage
+duration.
+@end quotation
+
+@item
+@b{[basic.stc.static]}
+
+Change paragraph 1
+
+@quotation
+All objects that have neither thread storage duration, dynamic
+storage duration nor are local [@dots{}].
+@end quotation
+
+@item
+@b{[dcl.stc]}
+
+Add @code{__thread} to the list in paragraph 1.
+
+Change paragraph 1
+
+@quotation
+With the exception of @code{__thread}, at most one
+@var{storage-class-specifier} shall appear in a given
+@var{decl-specifier-seq}. The @code{__thread} specifier may
+be used alone, or immediately following the @code{extern} or
+@code{static} specifiers. [@dots{}]
+@end quotation
+
+Add after paragraph 5
+
+@quotation
+The @code{__thread} specifier can be applied only to the names of objects
+and to anonymous unions.
+@end quotation
+
+@item
+@b{[class.mem]}
+
+Add after paragraph 6
+
+@quotation
+Non-@code{static} members shall not be @code{__thread}.
+@end quotation
+@end itemize
+
+@node OpenMP
+@section OpenMP
+@cindex OpenMP extension support
+
+OpenMP (Open Multi-Processing) is an application programming
+interface (API) that supports multi-platform shared memory
+multiprocessing programming in C/C++ and Fortran on many
+architectures, including Unix and Microsoft Windows platforms.
+It consists of a set of compiler directives, library routines,
+and environment variables that influence run-time behavior.
+
+GCC implements all of the @uref{https://www.openmp.org/specifications/,
+OpenMP Application Program Interface v4.5}, and many features from later
+versions of the OpenMP specification.
+@xref{OpenMP Implementation Status,,,libgomp,
+GNU Offloading and Multi Processing Runtime Library},
+for more details about currently supported OpenMP features.
+
+To enable the processing of OpenMP directives @samp{#pragma omp},
+@samp{[[omp::directive(...)]]}, @samp{[[omp::decl(...)]]},
+and @samp{[[omp::sequence(...)]]} in C and C++,
+GCC needs to be invoked with the @option{-fopenmp} option.
+This option also arranges for automatic linking of the OpenMP
+runtime library.
+@xref{,,,libgomp,GNU Offloading and Multi Processing Runtime Library}.
+
+@xref{OpenMP and OpenACC Options}, for additional options useful with
+@option{-fopenmp}.
+
+@node OpenACC
+@section OpenACC
+@cindex OpenACC extension support
+
+OpenACC is an application programming interface (API) that supports
+offloading of code to accelerator devices. It consists of a set of
+compiler directives, library routines, and environment variables that
+influence run-time behavior.
+
+GCC strives to be compatible with the
+@uref{https://www.openacc.org/, OpenACC Application Programming
+Interface v2.6}.
+
+To enable the processing of OpenACC directives @samp{#pragma acc}
+in C and C++, GCC needs to be invoked with the @option{-fopenacc} option.
+This option also arranges for automatic linking of the OpenACC runtime
+library.
+@xref{,,,libgomp,GNU Offloading and Multi Processing Runtime Library}.
+
+@xref{OpenMP and OpenACC Options}, for additional options useful with
+@option{-fopenacc}.
@node Inline
@section An Inline Function is As Fast As a Macro
@@ -10804,40 +10684,6 @@ The definition in the header file causes most calls to the function
to be inlined. If any uses of the function remain, they refer to
the single copy in the library.
-@node Const and Volatile Functions
-@section Const and Volatile Functions
-@cindex @code{const} applied to function
-@cindex @code{volatile} applied to function
-
-The C standard explicitly leaves the behavior of the @code{const} and
-@code{volatile} type qualifiers applied to functions undefined; these
-constructs can only arise through the use of @code{typedef}. As an extension,
-GCC defines this use of the @code{const} qualifier to have the same meaning
-as the GCC @code{const} function attribute, and the @code{volatile} qualifier
-to be equivalent to the @code{noreturn} attribute.
-@xref{Common Function Attributes}, for more information.
-
-As examples of this usage,
-
-@smallexample
-
-/* @r{Equivalent to:}
- void fatal () __attribute__ ((noreturn)); */
-typedef void voidfn ();
-volatile voidfn fatal;
-
-/* @r{Equivalent to:}
- extern int square (int) __attribute__ ((const)); */
-typedef int intfn (int);
-extern const intfn square;
-@end smallexample
-
-In general, using function attributes instead is preferred, since the
-attributes make both the intent of the code and its reliance on a GNU
-extension explicit. Additionally, using @code{const} and
-@code{volatile} in this way is specific to GNU C and does not work in
-GNU C++.
-
@node Volatiles
@section When is a Volatile Object Accessed?
@cindex accessing volatiles
@@ -13047,8 +12893,1002 @@ This size is also used for inlining decisions. If you use @code{asm inline}
instead of just @code{asm}, then for inlining purposes the size of the asm
is taken as the minimum size, ignoring how many instructions GCC thinks it is.
+@node Syntax Extensions
+@section Other Extensions to C Syntax
+
+GNU C has traditionally supported numerous extensions to standard C
+syntax. Some of these features were originally intended for
+compatibility with other compilers or to ease traditional C
+compatibility, some have been adopted into subsequent versions of the
+C and/or C++ standards, while others remain specific to GNU C.
+
+@menu
+* Statement Exprs:: Putting statements and declarations inside expressions.
+* Local Labels:: Labels local to a block.
+* Labels as Values:: Getting pointers to labels, and computed gotos.
+* Nested Functions:: Nested functions in GNU C.
+* Typeof:: @code{typeof}: referring to the type of an expression.
+* Offsetof:: Special syntax for @code{offsetof}.
+* Alignment:: Determining the alignment of a function, type or variable.
+* Incomplete Enums:: @code{enum foo;}, with details to follow.
+* Variadic Macros:: Macros with a variable number of arguments.
+* Conditionals:: Omitting the middle operand of a @samp{?:} expression.
+* Case Ranges:: `case 1 ... 9' and such.
+* Mixed Labels and Declarations:: Mixing declarations, labels and code.
+* C++ Comments:: C++ comments are recognized.
+* Escaped Newlines:: Slightly looser rules for escaped newlines.
+* Hex Floats:: Hexadecimal floating-point constants.
+* Binary constants:: Binary constants using the @samp{0b} prefix.
+* Dollar Signs:: Dollar sign is allowed in identifiers.
+* Character Escapes:: @samp{\e} stands for the character @key{ESC}.
+* Alternate Keywords:: @code{__const__}, @code{__asm__}, etc., for header files.
+* Function Names:: Printable strings which are the name of the current
+ function.
+@end menu
+
+@node Statement Exprs
+@subsection Statements and Declarations in Expressions
+@cindex statements inside expressions
+@cindex declarations inside expressions
+@cindex expressions containing statements
+@cindex macros, statements in expressions
+
+@c the above section title wrapped and causes an underfull hbox.. i
+@c changed it from "within" to "in". --mew 4feb93
+A compound statement enclosed in parentheses may appear as an expression
+in GNU C@. This allows you to use loops, switches, and local variables
+within an expression.
+
+Recall that a compound statement is a sequence of statements surrounded
+by braces; in this construct, parentheses go around the braces. For
+example:
+
+@smallexample
+(@{ int y = foo (); int z;
+ if (y > 0) z = y;
+ else z = - y;
+ z; @})
+@end smallexample
+
+@noindent
+is a valid (though slightly more complex than necessary) expression
+for the absolute value of @code{foo ()}.
+
+The last thing in the compound statement should be an expression
+followed by a semicolon; the value of this subexpression serves as the
+value of the entire construct. (If you use some other kind of statement
+last within the braces, the construct has type @code{void}, and thus
+effectively no value.)
+
+This feature is especially useful in making macro definitions ``safe'' (so
+that they evaluate each operand exactly once). For example, the
+``maximum'' function is commonly defined as a macro in standard C as
+follows:
+
+@smallexample
+#define max(a,b) ((a) > (b) ? (a) : (b))
+@end smallexample
+
+@noindent
+@cindex side effects, macro argument
+But this definition computes either @var{a} or @var{b} twice, with bad
+results if the operand has side effects. In GNU C, if you know the
+type of the operands (here taken as @code{int}), you can avoid this
+problem by defining the macro as follows:
+
+@smallexample
+#define maxint(a,b) \
+ (@{int _a = (a), _b = (b); _a > _b ? _a : _b; @})
+@end smallexample
+
+Note that introducing variable declarations (as we do in @code{maxint}) can
+cause variable shadowing, so while this example using the @code{max} macro
+produces correct results:
+@smallexample
+int _a = 1, _b = 2, c;
+c = max (_a, _b);
+@end smallexample
+@noindent
+this example using maxint will not:
+@smallexample
+int _a = 1, _b = 2, c;
+c = maxint (_a, _b);
+@end smallexample
+
+This problem may for instance occur when we use this pattern recursively, like
+so:
+
+@smallexample
+#define maxint3(a, b, c) \
+ (@{int _a = (a), _b = (b), _c = (c); maxint (maxint (_a, _b), _c); @})
+@end smallexample
+
+Embedded statements are not allowed in constant expressions, such as
+the value of an enumeration constant, the width of a bit-field, or
+the initial value of a static variable.
+
+If you don't know the type of the operand, you can still do this, but you
+must use @code{typeof} or @code{__auto_type} (@pxref{Typeof}).
+
+In G++, the result value of a statement expression undergoes array and
+function pointer decay, and is returned by value to the enclosing
+expression. For instance, if @code{A} is a class, then
+
+@smallexample
+ A a;
+
+ (@{a;@}).Foo ()
+@end smallexample
+
+@noindent
+constructs a temporary @code{A} object to hold the result of the
+statement expression, and that is used to invoke @code{Foo}.
+Therefore the @code{this} pointer observed by @code{Foo} is not the
+address of @code{a}.
+
+In a statement expression, any temporaries created within a statement
+are destroyed at that statement's end. This makes statement
+expressions inside macros slightly different from function calls. In
+the latter case temporaries introduced during argument evaluation are
+destroyed at the end of the statement that includes the function
+call. In the statement expression case they are destroyed during
+the statement expression. For instance,
+
+@smallexample
+#define macro(a) (@{__typeof__(a) b = (a); b + 3; @})
+template<typename T> T function(T a) @{ T b = a; return b + 3; @}
+
+void foo ()
+@{
+ macro (X ());
+ function (X ());
+@}
+@end smallexample
+
+@noindent
+has different places where temporaries are destroyed. For the
+@code{macro} case, the temporary @code{X} is destroyed just after
+the initialization of @code{b}. In the @code{function} case that
+temporary is destroyed when the function returns.
+
+These considerations mean that it is probably a bad idea to use
+statement expressions of this form in header files that are designed to
+work with C++. (Note that some versions of the GNU C Library contained
+header files using statement expressions that lead to precisely this
+bug.)
+
+Jumping into a statement expression with @code{goto} or using a
+@code{switch} statement outside the statement expression with a
+@code{case} or @code{default} label inside the statement expression is
+not permitted. Jumping into a statement expression with a computed
+@code{goto} (@pxref{Labels as Values}) has undefined behavior.
+Jumping out of a statement expression is permitted, but if the
+statement expression is part of a larger expression then it is
+unspecified which other subexpressions of that expression have been
+evaluated except where the language definition requires certain
+subexpressions to be evaluated before or after the statement
+expression. A @code{break} or @code{continue} statement inside of
+a statement expression used in @code{while}, @code{do} or @code{for}
+loop or @code{switch} statement condition
+or @code{for} statement init or increment expressions jumps to an
+outer loop or @code{switch} statement if any (otherwise it is an error),
+rather than to the loop or @code{switch} statement in whose condition
+or init or increment expression it appears.
+In any case, as with a function call, the evaluation of a
+statement expression is not interleaved with the evaluation of other
+parts of the containing expression. For example,
+
+@smallexample
+ foo (), ((@{ bar1 (); goto a; 0; @}) + bar2 ()), baz();
+@end smallexample
+
+@noindent
+calls @code{foo} and @code{bar1} and does not call @code{baz} but
+may or may not call @code{bar2}. If @code{bar2} is called, it is
+called after @code{foo} and before @code{bar1}.
+
+@node Local Labels
+@subsection Locally Declared Labels
+@cindex local labels
+@cindex macros, local labels
+
+GCC allows you to declare @dfn{local labels} in any nested block
+scope. A local label is just like an ordinary label, but you can
+only reference it (with a @code{goto} statement, or by taking its
+address) within the block in which it is declared.
+
+A local label declaration looks like this:
+
+@smallexample
+__label__ @var{label};
+@end smallexample
+
+@noindent
+or
+
+@smallexample
+__label__ @var{label1}, @var{label2}, /* @r{@dots{}} */;
+@end smallexample
+
+Local label declarations must come at the beginning of the block,
+before any ordinary declarations or statements.
+
+The label declaration defines the label @emph{name}, but does not define
+the label itself. You must do this in the usual way, with
+@code{@var{label}:}, within the statements of the statement expression.
+
+The local label feature is useful for complex macros. If a macro
+contains nested loops, a @code{goto} can be useful for breaking out of
+them. However, an ordinary label whose scope is the whole function
+cannot be used: if the macro can be expanded several times in one
+function, the label is multiply defined in that function. A
+local label avoids this problem. For example:
+
+@smallexample
+#define SEARCH(value, array, target) \
+do @{ \
+ __label__ found; \
+ typeof (target) _SEARCH_target = (target); \
+ typeof (*(array)) *_SEARCH_array = (array); \
+ int i, j; \
+ int value; \
+ for (i = 0; i < max; i++) \
+ for (j = 0; j < max; j++) \
+ if (_SEARCH_array[i][j] == _SEARCH_target) \
+ @{ (value) = i; goto found; @} \
+ (value) = -1; \
+ found:; \
+@} while (0)
+@end smallexample
+
+This could also be written using a statement expression:
+
+@smallexample
+#define SEARCH(array, target) \
+(@{ \
+ __label__ found; \
+ typeof (target) _SEARCH_target = (target); \
+ typeof (*(array)) *_SEARCH_array = (array); \
+ int i, j; \
+ int value; \
+ for (i = 0; i < max; i++) \
+ for (j = 0; j < max; j++) \
+ if (_SEARCH_array[i][j] == _SEARCH_target) \
+ @{ value = i; goto found; @} \
+ value = -1; \
+ found: \
+ value; \
+@})
+@end smallexample
+
+Local label declarations also make the labels they declare visible to
+nested functions, if there are any. @xref{Nested Functions}, for details.
+
+@node Labels as Values
+@subsection Labels as Values
+@cindex labels as values
+@cindex computed gotos
+@cindex goto with computed label
+@cindex address of a label
+
+You can get the address of a label defined in the current function
+(or a containing function) with the unary operator @samp{&&}. The
+value has type @code{void *}. This value is a constant and can be used
+wherever a constant of that type is valid. For example:
+
+@smallexample
+void *ptr;
+/* @r{@dots{}} */
+ptr = &&foo;
+@end smallexample
+
+To use these values, you need to be able to jump to one. This is done
+with the computed goto statement@footnote{The analogous feature in
+Fortran is called an assigned goto, but that name seems inappropriate in
+C, where one can do more than simply store label addresses in label
+variables.}, @code{goto *@var{exp};}. For example,
+
+@smallexample
+goto *ptr;
+@end smallexample
+
+@noindent
+Any expression of type @code{void *} is allowed.
+
+One way of using these constants is in initializing a static array that
+serves as a jump table:
+
+@smallexample
+static void *array[] = @{ &&foo, &&bar, &&hack @};
+@end smallexample
+
+@noindent
+Then you can select a label with indexing, like this:
+
+@smallexample
+goto *array[i];
+@end smallexample
+
+@noindent
+Note that this does not check whether the subscript is in bounds---array
+indexing in C never does that.
+
+Such an array of label values serves a purpose much like that of the
+@code{switch} statement. The @code{switch} statement is cleaner, so
+use that rather than an array unless the problem does not fit a
+@code{switch} statement very well.
+
+Another use of label values is in an interpreter for threaded code.
+The labels within the interpreter function can be stored in the
+threaded code for super-fast dispatching.
+
+You may not use this mechanism to jump to code in a different function.
+If you do that, totally unpredictable things happen. The best way to
+avoid this is to store the label address only in automatic variables and
+never pass it as an argument.
+
+An alternate way to write the above example is
+
+@smallexample
+static const int array[] = @{ &&foo - &&foo, &&bar - &&foo,
+ &&hack - &&foo @};
+goto *(&&foo + array[i]);
+@end smallexample
+
+@noindent
+This is more friendly to code living in shared libraries, as it reduces
+the number of dynamic relocations that are needed, and by consequence,
+allows the data to be read-only.
+This alternative with label differences is not supported for the AVR target,
+please use the first approach for AVR programs.
+
+The @code{&&foo} expressions for the same label might have different
+values if the containing function is inlined or cloned. If a program
+relies on them being always the same,
+@code{__attribute__((__noinline__,__noclone__))} should be used to
+prevent inlining and cloning. If @code{&&foo} is used in a static
+variable initializer, inlining and cloning is forbidden.
+
+Unlike a normal goto, in GNU C++ a computed goto will not call
+destructors for objects that go out of scope.
+
+@node Nested Functions
+@subsection Nested Functions
+@cindex nested functions
+@cindex downward funargs
+@cindex thunks
+
+A @dfn{nested function} is a function defined inside another function.
+Nested functions are supported as an extension in GNU C, but are not
+supported by GNU C++.
+
+The nested function's name is local to the block where it is defined.
+For example, here we define a nested function named @code{square}, and
+call it twice:
+
+@smallexample
+@group
+foo (double a, double b)
+@{
+ double square (double z) @{ return z * z; @}
+
+ return square (a) + square (b);
+@}
+@end group
+@end smallexample
+
+The nested function can access all the variables of the containing
+function that are visible at the point of its definition. This is
+called @dfn{lexical scoping}. For example, here we show a nested
+function which uses an inherited variable named @code{offset}:
+
+@smallexample
+@group
+bar (int *array, int offset, int size)
+@{
+ int access (int *array, int index)
+ @{ return array[index + offset]; @}
+ int i;
+ /* @r{@dots{}} */
+ for (i = 0; i < size; i++)
+ /* @r{@dots{}} */ access (array, i) /* @r{@dots{}} */
+@}
+@end group
+@end smallexample
+
+Nested function definitions are permitted within functions in the places
+where variable definitions are allowed; that is, in any block, mixed
+with the other declarations and statements in the block.
+
+It is possible to call the nested function from outside the scope of its
+name by storing its address or passing the address to another function:
+
+@smallexample
+hack (int *array, int size)
+@{
+ void store (int index, int value)
+ @{ array[index] = value; @}
+
+ intermediate (store, size);
+@}
+@end smallexample
+
+Here, the function @code{intermediate} receives the address of
+@code{store} as an argument. If @code{intermediate} calls @code{store},
+the arguments given to @code{store} are used to store into @code{array}.
+But this technique works only so long as the containing function
+(@code{hack}, in this example) does not exit.
+
+If you try to call the nested function through its address after the
+containing function exits, all hell breaks loose. If you try
+to call it after a containing scope level exits, and if it refers
+to some of the variables that are no longer in scope, you may be lucky,
+but it's not wise to take the risk. If, however, the nested function
+does not refer to anything that has gone out of scope, you should be
+safe.
+
+GCC implements taking the address of a nested function using a technique
+called @dfn{trampolines}. This technique was described in
+@cite{Lexical Closures for C++} (Thomas M. Breuel, USENIX
+C++ Conference Proceedings, October 17-21, 1988).
+
+A nested function can jump to a label inherited from a containing
+function, provided the label is explicitly declared in the containing
+function (@pxref{Local Labels}). Such a jump returns instantly to the
+containing function, exiting the nested function that did the
+@code{goto} and any intermediate functions as well. Here is an example:
+
+@smallexample
+@group
+bar (int *array, int offset, int size)
+@{
+ __label__ failure;
+ int access (int *array, int index)
+ @{
+ if (index > size)
+ goto failure;
+ return array[index + offset];
+ @}
+ int i;
+ /* @r{@dots{}} */
+ for (i = 0; i < size; i++)
+ /* @r{@dots{}} */ access (array, i) /* @r{@dots{}} */
+ /* @r{@dots{}} */
+ return 0;
+
+ /* @r{Control comes here from @code{access}
+ if it detects an error.} */
+ failure:
+ return -1;
+@}
+@end group
+@end smallexample
+
+A nested function always has no linkage. Declaring one with
+@code{extern} or @code{static} is erroneous. If you need to declare the nested function
+before its definition, use @code{auto} (which is otherwise meaningless
+for function declarations).
+
+@smallexample
+bar (int *array, int offset, int size)
+@{
+ __label__ failure;
+ auto int access (int *, int);
+ /* @r{@dots{}} */
+ int access (int *array, int index)
+ @{
+ if (index > size)
+ goto failure;
+ return array[index + offset];
+ @}
+ /* @r{@dots{}} */
+@}
+@end smallexample
+
+@node Typeof
+@subsection Referring to a Type with @code{typeof}
+@findex typeof
+@findex sizeof
+@cindex macros, types of arguments
+
+Another way to refer to the type of an expression is with @code{typeof}.
+The syntax of using of this keyword looks like @code{sizeof}, but the
+construct acts semantically like a type name defined with @code{typedef}.
+
+There are two ways of writing the argument to @code{typeof}: with an
+expression or with a type. Here is an example with an expression:
+
+@smallexample
+typeof (x[0](1))
+@end smallexample
+
+@noindent
+This assumes that @code{x} is an array of pointers to functions;
+the type described is that of the values of the functions.
+
+Here is an example with a typename as the argument:
+
+@smallexample
+typeof (int *)
+@end smallexample
+
+@noindent
+Here the type described is that of pointers to @code{int}.
+
+If you are writing a header file that must work when included in ISO C
+programs, write @code{__typeof__} instead of @code{typeof}.
+@xref{Alternate Keywords}.
+
+A @code{typeof} construct can be used anywhere a typedef name can be
+used. For example, you can use it in a declaration, in a cast, or inside
+of @code{sizeof} or @code{typeof}.
+
+The operand of @code{typeof} is evaluated for its side effects if and
+only if it is an expression of variably modified type or the name of
+such a type.
+
+@code{typeof} is often useful in conjunction with
+statement expressions (@pxref{Statement Exprs}).
+Here is how the two together can
+be used to define a safe ``maximum'' macro which operates on any
+arithmetic type and evaluates each of its arguments exactly once:
+
+@smallexample
+#define max(a,b) \
+ (@{ typeof (a) _a = (a); \
+ typeof (b) _b = (b); \
+ _a > _b ? _a : _b; @})
+@end smallexample
+
+@cindex underscores in variables in macros
+@cindex @samp{_} in variables in macros
+@cindex local variables in macros
+@cindex variables, local, in macros
+@cindex macros, local variables in
+
+The reason for using names that start with underscores for the local
+variables is to avoid conflicts with variable names that occur within the
+expressions that are substituted for @code{a} and @code{b}. Eventually we
+hope to design a new form of declaration syntax that allows you to declare
+variables whose scopes start only after their initializers; this will be a
+more reliable way to prevent such conflicts.
+
+@noindent
+Some more examples of the use of @code{typeof}:
+
+@itemize @bullet
+@item
+This declares @code{y} with the type of what @code{x} points to.
+
+@smallexample
+typeof (*x) y;
+@end smallexample
+
+@item
+This declares @code{y} as an array of such values.
+
+@smallexample
+typeof (*x) y[4];
+@end smallexample
+
+@item
+This declares @code{y} as an array of pointers to characters:
+
+@smallexample
+typeof (typeof (char *)[4]) y;
+@end smallexample
+
+@noindent
+It is equivalent to the following traditional C declaration:
+
+@smallexample
+char *y[4];
+@end smallexample
+
+To see the meaning of the declaration using @code{typeof}, and why it
+might be a useful way to write, rewrite it with these macros:
+
+@smallexample
+#define pointer(T) typeof(T *)
+#define array(T, N) typeof(T [N])
+@end smallexample
+
+@noindent
+Now the declaration can be rewritten this way:
+
+@smallexample
+array (pointer (char), 4) y;
+@end smallexample
+
+@noindent
+Thus, @code{array (pointer (char), 4)} is the type of arrays of 4
+pointers to @code{char}.
+@end itemize
+
+The ISO C23 operator @code{typeof_unqual} is available in ISO C23 mode
+and its result is the non-atomic unqualified version of what @code{typeof}
+operator returns. Alternate spelling @code{__typeof_unqual__} is
+available in all C modes and provides non-atomic unqualified version of
+what @code{__typeof__} operator returns.
+@xref{Alternate Keywords}.
+
+@cindex @code{__auto_type} in GNU C
+In GNU C, but not GNU C++, you may also declare the type of a variable
+as @code{__auto_type}. In that case, the declaration must declare
+only one variable, whose declarator must just be an identifier, the
+declaration must be initialized, and the type of the variable is
+determined by the initializer; the name of the variable is not in
+scope until after the initializer. (In C++, you should use C++11
+@code{auto} for this purpose.) Using @code{__auto_type}, the
+``maximum'' macro above could be written as:
+
+@smallexample
+#define max(a,b) \
+ (@{ __auto_type _a = (a); \
+ __auto_type _b = (b); \
+ _a > _b ? _a : _b; @})
+@end smallexample
+
+Using @code{__auto_type} instead of @code{typeof} has two advantages:
+
+@itemize @bullet
+@item Each argument to the macro appears only once in the expansion of
+the macro. This prevents the size of the macro expansion growing
+exponentially when calls to such macros are nested inside arguments of
+such macros.
+
+@item If the argument to the macro has variably modified type, it is
+evaluated only once when using @code{__auto_type}, but twice if
+@code{typeof} is used.
+@end itemize
+
+@node Offsetof
+@subsection Support for @code{offsetof}
+@findex __builtin_offsetof
+
+GCC implements for both C and C++ a syntactic extension to implement
+the @code{offsetof} macro.
+
+@smallexample
+primary:
+ "__builtin_offsetof" "(" @code{typename} "," offsetof_member_designator ")"
+
+offsetof_member_designator:
+ @code{identifier}
+ | offsetof_member_designator "." @code{identifier}
+ | offsetof_member_designator "[" @code{expr} "]"
+@end smallexample
+
+This extension is sufficient such that
+
+@smallexample
+#define offsetof(@var{type}, @var{member}) __builtin_offsetof (@var{type}, @var{member})
+@end smallexample
+
+@noindent
+is a suitable definition of the @code{offsetof} macro. In C++, @var{type}
+may be dependent. In either case, @var{member} may consist of a single
+identifier, or a sequence of member accesses and array references.
+
+@node Alignment
+@subsection Determining the Alignment of Functions, Types or Variables
+@cindex alignment
+@cindex type alignment
+@cindex variable alignment
+
+The keyword @code{__alignof__} determines the alignment requirement of
+a function, object, or a type, or the minimum alignment usually required
+by a type. Its syntax is just like @code{sizeof} and C11 @code{_Alignof}.
+
+For example, if the target machine requires a @code{double} value to be
+aligned on an 8-byte boundary, then @code{__alignof__ (double)} is 8.
+This is true on many RISC machines. On more traditional machine
+designs, @code{__alignof__ (double)} is 4 or even 2.
+
+Some machines never actually require alignment; they allow references to any
+data type even at an odd address. For these machines, @code{__alignof__}
+reports the smallest alignment that GCC gives the data type, usually as
+mandated by the target ABI.
+
+If the operand of @code{__alignof__} is an lvalue rather than a type,
+its value is the required alignment for its type, taking into account
+any minimum alignment specified by attribute @code{aligned}
+(@pxref{Common Variable Attributes}). For example, after this
+declaration:
+
+@smallexample
+struct foo @{ int x; char y; @} foo1;
+@end smallexample
+
+@noindent
+the value of @code{__alignof__ (foo1.y)} is 1, even though its actual
+alignment is probably 2 or 4, the same as @code{__alignof__ (int)}.
+It is an error to ask for the alignment of an incomplete type other
+than @code{void}.
+
+If the operand of the @code{__alignof__} expression is a function,
+the expression evaluates to the alignment of the function which may
+be specified by attribute @code{aligned} (@pxref{Common Function Attributes}).
+
+@node Incomplete Enums
+@subsection Incomplete @code{enum} Types
+
+You can define an @code{enum} tag without specifying its possible values.
+This results in an incomplete type, much like what you get if you write
+@code{struct foo} without describing the elements. A later declaration
+that does specify the possible values completes the type.
+
+You cannot allocate variables or storage using the type while it is
+incomplete. However, you can work with pointers to that type.
+
+This extension may not be very useful, but it makes the handling of
+@code{enum} more consistent with the way @code{struct} and @code{union}
+are handled.
+
+This extension is not supported by GNU C++.
+
+@node Variadic Macros
+@subsection Macros with a Variable Number of Arguments.
+@cindex variable number of arguments
+@cindex macro with variable arguments
+@cindex rest argument (in macro)
+@cindex variadic macros
+
+In the ISO C standard of 1999, a macro can be declared to accept a
+variable number of arguments much as a function can. The syntax for
+defining the macro is similar to that of a function. Here is an
+example:
+
+@smallexample
+#define debug(format, ...) fprintf (stderr, format, __VA_ARGS__)
+@end smallexample
+
+@noindent
+Here @samp{@dots{}} is a @dfn{variable argument}. In the invocation of
+such a macro, it represents the zero or more tokens until the closing
+parenthesis that ends the invocation, including any commas. This set of
+tokens replaces the identifier @code{__VA_ARGS__} in the macro body
+wherever it appears. See the CPP manual for more information.
+
+GCC has long supported variadic macros, and used a different syntax that
+allowed you to give a name to the variable arguments just like any other
+argument. Here is an example:
+
+@smallexample
+#define debug(format, args...) fprintf (stderr, format, args)
+@end smallexample
+
+@noindent
+This is in all ways equivalent to the ISO C example above, but arguably
+more readable and descriptive.
+
+GNU CPP has two further variadic macro extensions, and permits them to
+be used with either of the above forms of macro definition.
+
+In standard C, you are not allowed to leave the variable argument out
+entirely; but you are allowed to pass an empty argument. For example,
+this invocation is invalid in ISO C, because there is no comma after
+the string:
+
+@smallexample
+debug ("A message")
+@end smallexample
+
+GNU CPP permits you to completely omit the variable arguments in this
+way. In the above examples, the compiler would complain, though since
+the expansion of the macro still has the extra comma after the format
+string.
+
+To help solve this problem, CPP behaves specially for variable arguments
+used with the token paste operator, @samp{##}. If instead you write
+
+@smallexample
+#define debug(format, ...) fprintf (stderr, format, ## __VA_ARGS__)
+@end smallexample
+
+@noindent
+and if the variable arguments are omitted or empty, the @samp{##}
+operator causes the preprocessor to remove the comma before it. If you
+do provide some variable arguments in your macro invocation, GNU CPP
+does not complain about the paste operation and instead places the
+variable arguments after the comma. Just like any other pasted macro
+argument, these arguments are not macro expanded.
+
+@node Conditionals
+@subsection Conditionals with Omitted Operands
+@cindex conditional expressions, extensions
+@cindex omitted middle-operands
+@cindex middle-operands, omitted
+@cindex extensions, @code{?:}
+@cindex @code{?:} extensions
+
+The middle operand in a conditional expression may be omitted. Then
+if the first operand is nonzero, its value is the value of the conditional
+expression.
+
+Therefore, the expression
+
+@smallexample
+x ? : y
+@end smallexample
+
+@noindent
+has the value of @code{x} if that is nonzero; otherwise, the value of
+@code{y}.
+
+This example is perfectly equivalent to
+
+@smallexample
+x ? x : y
+@end smallexample
+
+@cindex side effect in @code{?:}
+@cindex @code{?:} side effect
+@noindent
+In this simple case, the ability to omit the middle operand is not
+especially useful. When it becomes useful is when the first operand does,
+or may (if it is a macro argument), contain a side effect. Then repeating
+the operand in the middle would perform the side effect twice. Omitting
+the middle operand uses the value already computed without the undesirable
+effects of recomputing it.
+
+@node Case Ranges
+@subsection Case Ranges
+@cindex case ranges
+@cindex ranges in case statements
+
+You can specify a range of consecutive values in a single @code{case} label,
+like this:
+
+@smallexample
+case @var{low} ... @var{high}:
+@end smallexample
+
+@noindent
+This has the same effect as the proper number of individual @code{case}
+labels, one for each integer value from @var{low} to @var{high}, inclusive.
+
+This feature is especially useful for ranges of ASCII character codes:
+
+@smallexample
+case 'A' ... 'Z':
+@end smallexample
+
+@strong{Be careful:} Write spaces around the @code{...}, for otherwise
+it may be parsed wrong when you use it with integer values. For example,
+write this:
+
+@smallexample
+case 1 ... 5:
+@end smallexample
+
+@noindent
+rather than this:
+
+@smallexample
+case 1...5:
+@end smallexample
+
+@node Mixed Labels and Declarations
+@subsection Mixed Declarations, Labels and Code
+@cindex mixed declarations and code
+@cindex declarations, mixed with code
+@cindex code, mixed with declarations
+
+ISO C99 and ISO C++ allow declarations and code to be freely mixed
+within compound statements. ISO C23 allows labels to be
+placed before declarations and at the end of a compound statement.
+As an extension, GNU C also allows all this in C90 mode. For example,
+you could do:
+
+@smallexample
+int i;
+/* @r{@dots{}} */
+i++;
+int j = i + 2;
+@end smallexample
+
+Each identifier is visible from where it is declared until the end of
+the enclosing block.
+
+@node C++ Comments
+@subsection C++ Style Comments
+@cindex @code{//}
+@cindex C++ comments
+@cindex comments, C++ style
+
+In GNU C, you may use C++ style comments, which start with @samp{//} and
+continue until the end of the line. Many other C implementations allow
+such comments, and they are included in the 1999 C standard. However,
+C++ style comments are not recognized if you specify an @option{-std}
+option specifying a version of ISO C before C99, or @option{-ansi}
+(equivalent to @option{-std=c90}).
+
+@node Escaped Newlines
+@subsection Slightly Looser Rules for Escaped Newlines
+@cindex escaped newlines
+@cindex newlines (escaped)
+
+The preprocessor treatment of escaped newlines is more relaxed
+than that specified by the C90 standard, which requires the newline
+to immediately follow a backslash.
+GCC's implementation allows whitespace in the form
+of spaces, horizontal and vertical tabs, and form feeds between the
+backslash and the subsequent newline. The preprocessor issues a
+warning, but treats it as a valid escaped newline and combines the two
+lines to form a single logical line. This works within comments and
+tokens, as well as between tokens. Comments are @emph{not} treated as
+whitespace for the purposes of this relaxation, since they have not
+yet been replaced with spaces.
+
+@node Hex Floats
+@subsection Hex Floats
+@cindex hex floats
+
+ISO C99 and ISO C++17 support floating-point numbers written not only in
+the usual decimal notation, such as @code{1.55e1}, but also numbers such as
+@code{0x1.fp3} written in hexadecimal format. As a GNU extension, GCC
+supports this in C90 mode (except in some cases when strictly
+conforming) and in C++98, C++11 and C++14 modes. In that format the
+@samp{0x} hex introducer and the @samp{p} or @samp{P} exponent field are
+mandatory. The exponent is a decimal number that indicates the power of
+2 by which the significant part is multiplied. Thus @samp{0x1.f} is
+@tex
+$1 {15\over16}$,
+@end tex
+@ifnottex
+1 15/16,
+@end ifnottex
+@samp{p3} multiplies it by 8, and the value of @code{0x1.fp3}
+is the same as @code{1.55e1}.
+
+Unlike for floating-point numbers in the decimal notation the exponent
+is always required in the hexadecimal notation. Otherwise the compiler
+would not be able to resolve the ambiguity of, e.g., @code{0x1.f}. This
+could mean @code{1.0f} or @code{1.9375} since @samp{f} is also the
+extension for floating-point constants of type @code{float}.
+
+@node Binary constants
+@subsection Binary Constants using the @samp{0b} Prefix
+@cindex Binary constants using the @samp{0b} prefix
+
+Integer constants can be written as binary constants, consisting of a
+sequence of @samp{0} and @samp{1} digits, prefixed by @samp{0b} or
+@samp{0B}. This is particularly useful in environments that operate a
+lot on the bit level (like microcontrollers).
+
+The following statements are identical:
+
+@smallexample
+i = 42;
+i = 0x2a;
+i = 052;
+i = 0b101010;
+@end smallexample
+
+The type of these constants follows the same rules as for octal or
+hexadecimal integer constants, so suffixes like @samp{L} or @samp{UL}
+can be applied.
+
+@node Dollar Signs
+@subsection Dollar Signs in Identifier Names
+@cindex $
+@cindex dollar signs in identifier names
+@cindex identifier names, dollar signs in
+
+In GNU C, you may normally use dollar signs in identifier names.
+This is because many traditional C implementations allow such identifiers.
+However, dollar signs in identifiers are not supported on a few target
+machines, typically because the target assembler does not allow them.
+
+@node Character Escapes
+@subsection The Character @key{ESC} in Constants
+
+You can use the sequence @samp{\e} in a string or character constant to
+stand for the ASCII character @key{ESC}.
+
@node Alternate Keywords
-@section Alternate Keywords
+@subsection Alternate Keywords
@cindex alternate keywords
@cindex keywords, alternate
@@ -13099,25 +13939,8 @@ that predate C23@.
@code{__extension__} has no effect aside from this.
-@node Incomplete Enums
-@section Incomplete @code{enum} Types
-
-You can define an @code{enum} tag without specifying its possible values.
-This results in an incomplete type, much like what you get if you write
-@code{struct foo} without describing the elements. A later declaration
-that does specify the possible values completes the type.
-
-You cannot allocate variables or storage using the type while it is
-incomplete. However, you can work with pointers to that type.
-
-This extension may not be very useful, but it makes the handling of
-@code{enum} more consistent with the way @code{struct} and @code{union}
-are handled.
-
-This extension is not supported by GNU C++.
-
@node Function Names
-@section Function Names as Strings
+@subsection Function Names as Strings
@cindex @code{__func__} identifier
@cindex @code{__FUNCTION__} identifier
@cindex @code{__PRETTY_FUNCTION__} identifier
@@ -13184,6 +14007,340 @@ These identifiers are variables, not preprocessor macros, and may not
be used to initialize @code{char} arrays or be concatenated with string
literals.
+@node Semantic Extensions
+@section Extensions to C Semantics
+
+GNU C defines useful behavior for some constructs that are not allowed or
+well-defined in standard C.
+
+@menu
+* Function Prototypes:: Prototype declarations and old-style definitions.
+* Pointer Arith:: Arithmetic on @code{void}-pointers and function pointers.
+* Variadic Pointer Args:: Pointer arguments to variadic functions.
+* Pointers to Arrays:: Pointers to arrays with qualifiers work as expected.
+* Const and Volatile Functions:: GCC interprets these specially in C.
+@end menu
+
+@node Function Prototypes
+@subsection Prototypes and Old-Style Function Definitions
+@cindex function prototype declarations
+@cindex old-style function definitions
+@cindex promotion of formal parameters
+
+GNU C extends ISO C to allow a function prototype to override a later
+old-style non-prototype definition. Consider the following example:
+
+@smallexample
+/* @r{Use prototypes unless the compiler is old-fashioned.} */
+#ifdef __STDC__
+#define P(x) x
+#else
+#define P(x) ()
+#endif
+
+/* @r{Prototype function declaration.} */
+int isroot P((uid_t));
+
+/* @r{Old-style function definition.} */
+int
+isroot (x) /* @r{??? lossage here ???} */
+ uid_t x;
+@{
+ return x == 0;
+@}
+@end smallexample
+
+Suppose the type @code{uid_t} happens to be @code{short}. ISO C does
+not allow this example, because subword arguments in old-style
+non-prototype definitions are promoted. Therefore in this example the
+function definition's argument is really an @code{int}, which does not
+match the prototype argument type of @code{short}.
+
+This restriction of ISO C makes it hard to write code that is portable
+to traditional C compilers, because the programmer does not know
+whether the @code{uid_t} type is @code{short}, @code{int}, or
+@code{long}. Therefore, in cases like these GNU C allows a prototype
+to override a later old-style definition. More precisely, in GNU C, a
+function prototype argument type overrides the argument type specified
+by a later old-style definition if the former type is the same as the
+latter type before promotion. Thus in GNU C the above example is
+equivalent to the following:
+
+@smallexample
+int isroot (uid_t);
+
+int
+isroot (uid_t x)
+@{
+ return x == 0;
+@}
+@end smallexample
+
+@noindent
+GNU C++ does not support old-style function definitions, so this
+extension is irrelevant.
+
+@node Pointer Arith
+@subsection Arithmetic on @code{void}- and Function-Pointers
+@cindex void pointers, arithmetic
+@cindex void, size of pointer to
+@cindex function pointers, arithmetic
+@cindex function, size of pointer to
+
+In GNU C, addition and subtraction operations are supported on pointers to
+@code{void} and on pointers to functions. This is done by treating the
+size of a @code{void} or of a function as 1.
+
+A consequence of this is that @code{sizeof} is also allowed on @code{void}
+and on function types, and returns 1.
+
+@opindex Wpointer-arith
+The option @option{-Wpointer-arith} requests a warning if these extensions
+are used.
+
+@node Variadic Pointer Args
+@subsection Pointer Arguments in Variadic Functions
+@cindex pointer arguments in variadic functions
+@cindex variadic functions, pointer arguments
+
+Standard C requires that pointer types used with @code{va_arg} in
+functions with variable argument lists either must be compatible with
+that of the actual argument, or that one type must be a pointer to
+@code{void} and the other a pointer to a character type. GNU C
+implements the POSIX XSI extension that additionally permits the use
+of @code{va_arg} with a pointer type to receive arguments of any other
+pointer type.
+
+In particular, in GNU C @samp{va_arg (ap, void *)} can safely be used
+to consume an argument of any pointer type.
+
+@node Pointers to Arrays
+@subsection Pointers to Arrays with Qualifiers Work as Expected
+@cindex pointers to arrays
+@cindex const qualifier
+
+In GNU C, pointers to arrays with qualifiers work similar to pointers
+to other qualified types. For example, a value of type @code{int (*)[5]}
+can be used to initialize a variable of type @code{const int (*)[5]}.
+These types are incompatible in ISO C because the @code{const} qualifier
+is formally attached to the element type of the array and not the
+array itself.
+
+@smallexample
+extern void
+transpose (int N, int M, double out[M][N], const double in[N][M]);
+double x[3][2];
+double y[2][3];
+@r{@dots{}}
+transpose(3, 2, y, x);
+@end smallexample
+
+@node Const and Volatile Functions
+@subsection Const and Volatile Functions
+@cindex @code{const} applied to function
+@cindex @code{volatile} applied to function
+
+The C standard explicitly leaves the behavior of the @code{const} and
+@code{volatile} type qualifiers applied to functions undefined; these
+constructs can only arise through the use of @code{typedef}. As an extension,
+GCC defines this use of the @code{const} qualifier to have the same meaning
+as the GCC @code{const} function attribute, and the @code{volatile} qualifier
+to be equivalent to the @code{noreturn} attribute.
+@xref{Common Function Attributes}, for more information.
+
+As examples of this usage,
+
+@smallexample
+
+/* @r{Equivalent to:}
+ void fatal () __attribute__ ((noreturn)); */
+typedef void voidfn ();
+volatile voidfn fatal;
+
+/* @r{Equivalent to:}
+ extern int square (int) __attribute__ ((const)); */
+typedef int intfn (int);
+extern const intfn square;
+@end smallexample
+
+In general, using function attributes instead is preferred, since the
+attributes make both the intent of the code and its reliance on a GNU
+extension explicit. Additionally, using @code{const} and
+@code{volatile} in this way is specific to GNU C and does not work in
+GNU C++.
+
+@node Nonlocal Gotos
+@section Nonlocal Gotos
+@cindex nonlocal gotos
+
+GCC provides the built-in functions @code{__builtin_setjmp} and
+@code{__builtin_longjmp} which are similar to, but not interchangeable
+with, the C library functions @code{setjmp} and @code{longjmp}.
+The built-in versions are used internally by GCC's libraries
+to implement exception handling on some targets. You should use the
+standard C library functions declared in @code{<setjmp.h>} in user code
+instead of the builtins.
+
+The built-in versions of these functions use GCC's normal
+mechanisms to save and restore registers using the stack on function
+entry and exit. The jump buffer argument @var{buf} holds only the
+information needed to restore the stack frame, rather than the entire
+set of saved register values.
+
+An important caveat is that GCC arranges to save and restore only
+those registers known to the specific architecture variant being
+compiled for. This can make @code{__builtin_setjmp} and
+@code{__builtin_longjmp} more efficient than their library
+counterparts in some cases, but it can also cause incorrect and
+mysterious behavior when mixing with code that uses the full register
+set.
+
+You should declare the jump buffer argument @var{buf} to the
+built-in functions as:
+
+@smallexample
+#include <stdint.h>
+intptr_t @var{buf}[5];
+@end smallexample
+
+@defbuiltin{{int} __builtin_setjmp (intptr_t *@var{buf})}
+This function saves the current stack context in @var{buf}.
+@code{__builtin_setjmp} returns 0 when returning directly,
+and 1 when returning from @code{__builtin_longjmp} using the same
+@var{buf}.
+@enddefbuiltin
+
+@defbuiltin{{void} __builtin_longjmp (intptr_t *@var{buf}, int @var{val})}
+This function restores the stack context in @var{buf},
+saved by a previous call to @code{__builtin_setjmp}. After
+@code{__builtin_longjmp} is finished, the program resumes execution as
+if the matching @code{__builtin_setjmp} returns the value @var{val},
+which must be 1.
+
+Because @code{__builtin_longjmp} depends on the function return
+mechanism to restore the stack context, it cannot be called
+from the same function calling @code{__builtin_setjmp} to
+initialize @var{buf}. It can only be called from a function called
+(directly or indirectly) from the function calling @code{__builtin_setjmp}.
+@enddefbuiltin
+
+@node Constructing Calls
+@section Constructing Function Calls
+@cindex constructing calls
+@cindex forwarding calls
+
+Using the built-in functions described below, you can record
+the arguments a function received, and call another function
+with the same arguments, without knowing the number or types
+of the arguments.
+
+You can also record the return value of that function call,
+and later return that value, without knowing what data type
+the function tried to return (as long as your caller expects
+that data type).
+
+However, these built-in functions may interact badly with some
+sophisticated features or other extensions of the language. It
+is, therefore, not recommended to use them outside very simple
+functions acting as mere forwarders for their arguments.
+
+@defbuiltin{{void *} __builtin_apply_args ()}
+This built-in function returns a pointer to data
+describing how to perform a call with the same arguments as are passed
+to the current function.
+
+The function saves the arg pointer register, structure value address,
+and all registers that might be used to pass arguments to a function
+into a block of memory allocated on the stack. Then it returns the
+address of that block.
+@enddefbuiltin
+
+@defbuiltin{{void *} __builtin_apply (void (*@var{function})(), void *@var{arguments}, size_t @var{size})}
+This built-in function invokes @var{function}
+with a copy of the parameters described by @var{arguments}
+and @var{size}.
+
+The value of @var{arguments} should be the value returned by
+@code{__builtin_apply_args}. The argument @var{size} specifies the size
+of the stack argument data, in bytes.
+
+This function returns a pointer to data describing
+how to return whatever value is returned by @var{function}. The data
+is saved in a block of memory allocated on the stack.
+
+It is not always simple to compute the proper value for @var{size}. The
+value is used by @code{__builtin_apply} to compute the amount of data
+that should be pushed on the stack and copied from the incoming argument
+area.
+@enddefbuiltin
+
+@defbuiltin{{void} __builtin_return (void *@var{result})}
+This built-in function returns the value described by @var{result} from
+the containing function. You should specify, for @var{result}, a value
+returned by @code{__builtin_apply}.
+@enddefbuiltin
+
+@defbuiltin{{} __builtin_va_arg_pack ()}
+This built-in function represents all anonymous arguments of an inline
+function. It can be used only in inline functions that are always
+inlined, never compiled as a separate function, such as those using
+@code{__attribute__ ((__always_inline__))} or
+@code{__attribute__ ((__gnu_inline__))} extern inline functions.
+It must be only passed as last argument to some other function
+with variable arguments. This is useful for writing small wrapper
+inlines for variable argument functions, when using preprocessor
+macros is undesirable. For example:
+@smallexample
+extern int myprintf (FILE *f, const char *format, ...);
+extern inline __attribute__ ((__gnu_inline__)) int
+myprintf (FILE *f, const char *format, ...)
+@{
+ int r = fprintf (f, "myprintf: ");
+ if (r < 0)
+ return r;
+ int s = fprintf (f, format, __builtin_va_arg_pack ());
+ if (s < 0)
+ return s;
+ return r + s;
+@}
+@end smallexample
+@enddefbuiltin
+
+@defbuiltin{int __builtin_va_arg_pack_len ()}
+This built-in function returns the number of anonymous arguments of
+an inline function. It can be used only in inline functions that
+are always inlined, never compiled as a separate function, such
+as those using @code{__attribute__ ((__always_inline__))} or
+@code{__attribute__ ((__gnu_inline__))} extern inline functions.
+For example following does link- or run-time checking of open
+arguments for optimized code:
+@smallexample
+#ifdef __OPTIMIZE__
+extern inline __attribute__((__gnu_inline__)) int
+myopen (const char *path, int oflag, ...)
+@{
+ if (__builtin_va_arg_pack_len () > 1)
+ warn_open_too_many_arguments ();
+
+ if (__builtin_constant_p (oflag))
+ @{
+ if ((oflag & O_CREAT) != 0 && __builtin_va_arg_pack_len () < 1)
+ @{
+ warn_open_missing_mode ();
+ return __open_2 (path, oflag);
+ @}
+ return open (path, oflag, __builtin_va_arg_pack ());
+ @}
+
+ if (__builtin_va_arg_pack_len () < 1)
+ return __open_2 (path, oflag);
+
+ return open (path, oflag, __builtin_va_arg_pack ());
+@}
+#endif
+@end smallexample
+@enddefbuiltin
+
@node Return Address
@section Getting the Return or Frame Address of a Function
@@ -13626,34 +14783,6 @@ x = foo ((v128) @{_mm_adds_epu8 (x.mm, y.mm)@});
@c but GCC does not accept it for unions of vector types (PR 88955).
@end smallexample
-@node Offsetof
-@section Support for @code{offsetof}
-@findex __builtin_offsetof
-
-GCC implements for both C and C++ a syntactic extension to implement
-the @code{offsetof} macro.
-
-@smallexample
-primary:
- "__builtin_offsetof" "(" @code{typename} "," offsetof_member_designator ")"
-
-offsetof_member_designator:
- @code{identifier}
- | offsetof_member_designator "." @code{identifier}
- | offsetof_member_designator "[" @code{expr} "]"
-@end smallexample
-
-This extension is sufficient such that
-
-@smallexample
-#define offsetof(@var{type}, @var{member}) __builtin_offsetof (@var{type}, @var{member})
-@end smallexample
-
-@noindent
-is a suitable definition of the @code{offsetof} macro. In C++, @var{type}
-may be dependent. In either case, @var{member} may consist of a single
-identifier, or a sequence of member accesses and array references.
-
@node __sync Builtins
@section Legacy @code{__sync} Built-in Functions for Atomic Memory Access
@@ -28464,1093 +29593,6 @@ available on Darwin (OSX) installations. On such installations, the XCode and s
documentation provide descriptions of @code{CFString}, @code{CFStringRefs} and
associated functions.
-@node Pragmas
-@section Pragmas Accepted by GCC
-@cindex pragmas
-@cindex @code{#pragma}
-
-GCC supports several types of pragmas, primarily in order to compile
-code originally written for other compilers. Note that in general
-we do not recommend the use of pragmas; @xref{Function Attributes},
-for further explanation.
-
-The GNU C preprocessor recognizes several pragmas in addition to the
-compiler pragmas documented here. Refer to the CPP manual for more
-information.
-
-GCC additionally recognizes OpenMP pragmas when the @option{-fopenmp}
-option is specified, and OpenACC pragmas when the @option{-fopenacc}
-option is specified. @xref{OpenMP}, and @ref{OpenACC}.
-
-@menu
-* AArch64 Pragmas::
-* ARM Pragmas::
-* LoongArch Pragmas::
-* M32C Pragmas::
-* PRU Pragmas::
-* RS/6000 and PowerPC Pragmas::
-* S/390 Pragmas::
-* Darwin Pragmas::
-* Solaris Pragmas::
-* Symbol-Renaming Pragmas::
-* Structure-Layout Pragmas::
-* Weak Pragmas::
-* Diagnostic Pragmas::
-* Visibility Pragmas::
-* Push/Pop Macro Pragmas::
-* Function Specific Option Pragmas::
-* Loop-Specific Pragmas::
-@end menu
-
-@node AArch64 Pragmas
-@subsection AArch64 Pragmas
-
-The pragmas defined by the AArch64 target correspond to the AArch64
-target function attributes. They can be specified as below:
-@smallexample
-#pragma GCC target("string")
-@end smallexample
-
-where @code{@var{string}} can be any string accepted as an AArch64 target
-attribute. @xref{AArch64 Function Attributes}, for more details
-on the permissible values of @code{string}.
-
-@node ARM Pragmas
-@subsection ARM Pragmas
-
-The ARM target defines pragmas for controlling the default addition of
-@code{long_call} and @code{short_call} attributes to functions.
-@xref{Function Attributes}, for information about the effects of these
-attributes.
-
-@table @code
-@cindex pragma, long_calls
-@item long_calls
-Set all subsequent functions to have the @code{long_call} attribute.
-
-@cindex pragma, no_long_calls
-@item no_long_calls
-Set all subsequent functions to have the @code{short_call} attribute.
-
-@cindex pragma, long_calls_off
-@item long_calls_off
-Do not affect the @code{long_call} or @code{short_call} attributes of
-subsequent functions.
-@end table
-
-@node LoongArch Pragmas
-@subsection LoongArch Pragmas
-
-The list of attributes supported by Pragma is the same as that of target
-function attributes. @xref{LoongArch Function Attributes}.
-
-Example:
-
-@smallexample
-#pragma GCC target("strict-align")
-@end smallexample
-
-@node M32C Pragmas
-@subsection M32C Pragmas
-
-@table @code
-@cindex pragma, memregs
-@item GCC memregs @var{number}
-Overrides the command-line option @code{-memregs=} for the current
-file. Use with care! This pragma must be before any function in the
-file, and mixing different memregs values in different objects may
-make them incompatible. This pragma is useful when a
-performance-critical function uses a memreg for temporary values,
-as it may allow you to reduce the number of memregs used.
-
-@cindex pragma, address
-@item ADDRESS @var{name} @var{address}
-For any declared symbols matching @var{name}, this does three things
-to that symbol: it forces the symbol to be located at the given
-address (a number), it forces the symbol to be volatile, and it
-changes the symbol's scope to be static. This pragma exists for
-compatibility with other compilers, but note that the common
-@code{1234H} numeric syntax is not supported (use @code{0x1234}
-instead). Example:
-
-@smallexample
-#pragma ADDRESS port3 0x103
-char port3;
-@end smallexample
-
-@end table
-
-@node PRU Pragmas
-@subsection PRU Pragmas
-
-@table @code
-
-@cindex pragma, ctable_entry
-@item ctable_entry @var{index} @var{constant_address}
-Specifies that the PRU CTABLE entry given by @var{index} has the value
-@var{constant_address}. This enables GCC to emit LBCO/SBCO instructions
-when the load/store address is known and can be addressed with some CTABLE
-entry. For example:
-
-@smallexample
-/* will compile to "sbco Rx, 2, 0x10, 4" */
-#pragma ctable_entry 2 0x4802a000
-*(unsigned int *)0x4802a010 = val;
-@end smallexample
-
-@end table
-
-@node RS/6000 and PowerPC Pragmas
-@subsection RS/6000 and PowerPC Pragmas
-
-The RS/6000 and PowerPC targets define one pragma for controlling
-whether or not the @code{longcall} attribute is added to function
-declarations by default. This pragma overrides the @option{-mlongcall}
-option, but not the @code{longcall} and @code{shortcall} attributes.
-@xref{RS/6000 and PowerPC Options}, for more information about when long
-calls are and are not necessary.
-
-@table @code
-@cindex pragma, longcall
-@item longcall (1)
-Apply the @code{longcall} attribute to all subsequent function
-declarations.
-
-@item longcall (0)
-Do not apply the @code{longcall} attribute to subsequent function
-declarations.
-@end table
-
-@c Describe h8300 pragmas here.
-@c Describe sh pragmas here.
-@c Describe v850 pragmas here.
-
-@node S/390 Pragmas
-@subsection S/390 Pragmas
-
-The pragmas defined by the S/390 target correspond to the S/390
-target function attributes and some the additional options:
-
-@table @samp
-@item zvector
-@itemx no-zvector
-@end table
-
-Note that options of the pragma, unlike options of the target
-attribute, do change the value of preprocessor macros like
-@code{__VEC__}. They can be specified as below:
-
-@smallexample
-#pragma GCC target("string[,string]...")
-#pragma GCC target("string"[,"string"]...)
-@end smallexample
-
-@node Darwin Pragmas
-@subsection Darwin Pragmas
-
-The following pragmas are available for all architectures running the
-Darwin operating system. These are useful for compatibility with other
-macOS compilers.
-
-@table @code
-@cindex pragma, mark
-@item mark @var{tokens}@dots{}
-This pragma is accepted, but has no effect.
-
-@cindex pragma, options align
-@item options align=@var{alignment}
-This pragma sets the alignment of fields in structures. The values of
-@var{alignment} may be @code{mac68k}, to emulate m68k alignment, or
-@code{power}, to emulate PowerPC alignment. Uses of this pragma nest
-properly; to restore the previous setting, use @code{reset} for the
-@var{alignment}.
-
-@cindex pragma, segment
-@item segment @var{tokens}@dots{}
-This pragma is accepted, but has no effect.
-
-@cindex pragma, unused
-@item unused (@var{var} [, @var{var}]@dots{})
-This pragma declares variables to be possibly unused. GCC does not
-produce warnings for the listed variables. The effect is similar to
-that of the @code{unused} attribute, except that this pragma may appear
-anywhere within the variables' scopes.
-@end table
-
-@node Solaris Pragmas
-@subsection Solaris Pragmas
-
-The Solaris target supports @code{#pragma redefine_extname}
-(@pxref{Symbol-Renaming Pragmas}). It also supports additional
-@code{#pragma} directives for compatibility with the system compiler.
-
-@table @code
-@cindex pragma, align
-@item align @var{alignment} (@var{variable} [, @var{variable}]...)
-
-Increase the minimum alignment of each @var{variable} to @var{alignment}.
-This is the same as GCC's @code{aligned} attribute @pxref{Variable
-Attributes}). Macro expansion occurs on the arguments to this pragma
-when compiling C and Objective-C@. It does not currently occur when
-compiling C++, but this is a bug which may be fixed in a future
-release.
-
-@cindex pragma, fini
-@item fini (@var{function} [, @var{function}]...)
-
-This pragma causes each listed @var{function} to be called after
-main, or during shared module unloading, by adding a call to the
-@code{.fini} section.
-
-@cindex pragma, init
-@item init (@var{function} [, @var{function}]...)
-
-This pragma causes each listed @var{function} to be called during
-initialization (before @code{main}) or during shared module loading, by
-adding a call to the @code{.init} section.
-
-@end table
-
-@node Symbol-Renaming Pragmas
-@subsection Symbol-Renaming Pragmas
-
-GCC supports a @code{#pragma} directive that changes the name used in
-assembly for a given declaration. While this pragma is supported on all
-platforms, it is intended primarily to provide compatibility with the
-Solaris system headers. This effect can also be achieved using the asm
-labels extension (@pxref{Asm Labels}).
-
-@table @code
-@cindex pragma, redefine_extname
-@item redefine_extname @var{oldname} @var{newname}
-
-This pragma gives the C function @var{oldname} the assembly symbol
-@var{newname}. The preprocessor macro @code{__PRAGMA_REDEFINE_EXTNAME}
-is defined if this pragma is available (currently on all platforms).
-@end table
-
-This pragma and the @code{asm} labels extension interact in a complicated
-manner. Here are some corner cases you may want to be aware of:
-
-@enumerate
-@item This pragma silently applies only to declarations with external
-linkage. The @code{asm} label feature does not have this restriction.
-
-@item In C++, this pragma silently applies only to declarations with
-``C'' linkage. Again, @code{asm} labels do not have this restriction.
-
-@item If either of the ways of changing the assembly name of a
-declaration are applied to a declaration whose assembly name has
-already been determined (either by a previous use of one of these
-features, or because the compiler needed the assembly name in order to
-generate code), and the new name is different, a warning issues and
-the name does not change.
-
-@item The @var{oldname} used by @code{#pragma redefine_extname} is
-always the C-language name.
-@end enumerate
-
-@node Structure-Layout Pragmas
-@subsection Structure-Layout Pragmas
-
-For compatibility with Microsoft Windows compilers, GCC supports a
-set of @code{#pragma} directives that change the maximum alignment of
-members of structures (other than zero-width bit-fields), unions, and
-classes subsequently defined. The @var{n} value below always is required
-to be a small power of two and specifies the new alignment in bytes.
-
-@enumerate
-@item @code{#pragma pack(@var{n})} simply sets the new alignment.
-@item @code{#pragma pack()} sets the alignment to the one that was in
-effect when compilation started (see also command-line option
-@option{-fpack-struct[=@var{n}]} @pxref{Code Gen Options}).
-@item @code{#pragma pack(push[,@var{n}])} pushes the current alignment
-setting on an internal stack and then optionally sets the new alignment.
-@item @code{#pragma pack(pop)} restores the alignment setting to the one
-saved at the top of the internal stack (and removes that stack entry).
-Note that @code{#pragma pack([@var{n}])} does not influence this internal
-stack; thus it is possible to have @code{#pragma pack(push)} followed by
-multiple @code{#pragma pack(@var{n})} instances and finalized by a single
-@code{#pragma pack(pop)}.
-@end enumerate
-
-Some targets, e.g.@: x86 and PowerPC, support the @code{#pragma ms_struct}
-directive which lays out structures and unions subsequently defined as the
-documented @code{__attribute__ ((ms_struct))}.
-
-@enumerate
-@item @code{#pragma ms_struct on} turns on the Microsoft layout.
-@item @code{#pragma ms_struct off} turns off the Microsoft layout.
-@item @code{#pragma ms_struct reset} goes back to the default layout.
-@end enumerate
-
-Most targets also support the @code{#pragma scalar_storage_order} directive
-which lays out structures and unions subsequently defined as the documented
-@code{__attribute__ ((scalar_storage_order))}.
-
-@enumerate
-@item @code{#pragma scalar_storage_order big-endian} sets the storage order
-of the scalar fields to big-endian.
-@item @code{#pragma scalar_storage_order little-endian} sets the storage order
-of the scalar fields to little-endian.
-@item @code{#pragma scalar_storage_order default} goes back to the endianness
-that was in effect when compilation started (see also command-line option
-@option{-fsso-struct=@var{endianness}} @pxref{C Dialect Options}).
-@end enumerate
-
-@node Weak Pragmas
-@subsection Weak Pragmas
-
-For compatibility with SVR4, GCC supports a set of @code{#pragma}
-directives for declaring symbols to be weak, and defining weak
-aliases.
-
-@table @code
-@cindex pragma, weak
-@item #pragma weak @var{symbol}
-This pragma declares @var{symbol} to be weak, as if the declaration
-had the attribute of the same name. The pragma may appear before
-or after the declaration of @var{symbol}. It is not an error for
-@var{symbol} to never be defined at all.
-
-@item #pragma weak @var{symbol1} = @var{symbol2}
-This pragma declares @var{symbol1} to be a weak alias of @var{symbol2}.
-It is an error if @var{symbol2} is not defined in the current
-translation unit.
-@end table
-
-@node Diagnostic Pragmas
-@subsection Diagnostic Pragmas
-
-GCC allows the user to selectively enable or disable certain types of
-diagnostics, and change the kind of the diagnostic. For example, a
-project's policy might require that all sources compile with
-@option{-Werror} but certain files might have exceptions allowing
-specific types of warnings. Or, a project might selectively enable
-diagnostics and treat them as errors depending on which preprocessor
-macros are defined.
-
-@table @code
-@cindex pragma, diagnostic
-@item #pragma GCC diagnostic @var{kind} @var{option}
-
-Modifies the disposition of a diagnostic. Note that not all
-diagnostics are modifiable; at the moment only warnings (normally
-controlled by @samp{-W@dots{}}) can be controlled, and not all of them.
-Use @option{-fdiagnostics-show-option} to determine which diagnostics
-are controllable and which option controls them.
-
-@var{kind} is @samp{error} to treat this diagnostic as an error,
-@samp{warning} to treat it like a warning (even if @option{-Werror} is
-in effect), or @samp{ignored} if the diagnostic is to be ignored.
-@var{option} is a double quoted string that matches the command-line
-option.
-
-@smallexample
-#pragma GCC diagnostic warning "-Wformat"
-#pragma GCC diagnostic error "-Wformat"
-#pragma GCC diagnostic ignored "-Wformat"
-@end smallexample
-
-Note that these pragmas override any command-line options. GCC keeps
-track of the location of each pragma, and issues diagnostics according
-to the state as of that point in the source file. Thus, pragmas occurring
-after a line do not affect diagnostics caused by that line.
-
-@item #pragma GCC diagnostic push
-@itemx #pragma GCC diagnostic pop
-
-Causes GCC to remember the state of the diagnostics as of each
-@code{push}, and restore to that point at each @code{pop}. If a
-@code{pop} has no matching @code{push}, the command-line options are
-restored.
-
-@smallexample
-#pragma GCC diagnostic error "-Wuninitialized"
- foo(a); /* error is given for this one */
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wuninitialized"
- foo(b); /* no diagnostic for this one */
-#pragma GCC diagnostic pop
- foo(c); /* error is given for this one */
-#pragma GCC diagnostic pop
- foo(d); /* depends on command-line options */
-@end smallexample
-
-@item #pragma GCC diagnostic ignored_attributes
-
-Similarly to @option{-Wno-attributes=}, this pragma allows users to suppress
-warnings about unknown scoped attributes (in C++11 and C23). For example,
-@code{#pragma GCC diagnostic ignored_attributes "vendor::attr"} disables
-warning about the following declaration:
-
-@smallexample
-[[vendor::attr]] void f();
-@end smallexample
-
-whereas @code{#pragma GCC diagnostic ignored_attributes "vendor::"} prevents
-warning about both of these declarations:
-
-@smallexample
-[[vendor::safe]] void f();
-[[vendor::unsafe]] void f2();
-@end smallexample
-
-@end table
-
-GCC also offers a simple mechanism for printing messages during
-compilation.
-
-@table @code
-@cindex pragma, diagnostic
-@item #pragma message @var{string}
-
-Prints @var{string} as a compiler message on compilation. The message
-is informational only, and is neither a compilation warning nor an
-error. Newlines can be included in the string by using the @samp{\n}
-escape sequence.
-
-@smallexample
-#pragma message "Compiling " __FILE__ "..."
-@end smallexample
-
-@var{string} may be parenthesized, and is printed with location
-information. For example,
-
-@smallexample
-#define DO_PRAGMA(x) _Pragma (#x)
-#define TODO(x) DO_PRAGMA(message ("TODO - " #x))
-
-TODO(Remember to fix this)
-@end smallexample
-
-@noindent
-prints @samp{/tmp/file.c:4: note: #pragma message:
-TODO - Remember to fix this}.
-
-@cindex pragma, diagnostic
-@item #pragma GCC error @var{message}
-Generates an error message. This pragma @emph{is} considered to
-indicate an error in the compilation, and it will be treated as such.
-
-Newlines can be included in the string by using the @samp{\n}
-escape sequence. They will be displayed as newlines even if the
-@option{-fmessage-length} option is set to zero.
-
-The error is only generated if the pragma is present in the code after
-pre-processing has been completed. It does not matter however if the
-code containing the pragma is unreachable:
-
-@smallexample
-#if 0
-#pragma GCC error "this error is not seen"
-#endif
-void foo (void)
-@{
- return;
-#pragma GCC error "this error is seen"
-@}
-@end smallexample
-
-@cindex pragma, diagnostic
-@item #pragma GCC warning @var{message}
-This is just like @samp{pragma GCC error} except that a warning
-message is issued instead of an error message. Unless
-@option{-Werror} is in effect, in which case this pragma will generate
-an error as well.
-
-@end table
-
-@node Visibility Pragmas
-@subsection Visibility Pragmas
-
-@table @code
-@cindex pragma, visibility
-@item #pragma GCC visibility push(@var{visibility})
-@itemx #pragma GCC visibility pop
-
-This pragma allows the user to set the visibility for multiple
-declarations without having to give each a visibility attribute
-(@pxref{Function Attributes}).
-
-In C++, @samp{#pragma GCC visibility} affects only namespace-scope
-declarations. Class members and template specializations are not
-affected; if you want to override the visibility for a particular
-member or instantiation, you must use an attribute.
-
-@end table
-
-
-@node Push/Pop Macro Pragmas
-@subsection Push/Pop Macro Pragmas
-
-For compatibility with Microsoft Windows compilers, GCC supports
-@samp{#pragma push_macro(@var{"macro_name"})}
-and @samp{#pragma pop_macro(@var{"macro_name"})}.
-
-@table @code
-@cindex pragma, push_macro
-@item #pragma push_macro(@var{"macro_name"})
-This pragma saves the value of the macro named as @var{macro_name} to
-the top of the stack for this macro.
-
-@cindex pragma, pop_macro
-@item #pragma pop_macro(@var{"macro_name"})
-This pragma sets the value of the macro named as @var{macro_name} to
-the value on top of the stack for this macro. If the stack for
-@var{macro_name} is empty, the value of the macro remains unchanged.
-@end table
-
-For example:
-
-@smallexample
-#define X 1
-#pragma push_macro("X")
-#undef X
-#define X -1
-#pragma pop_macro("X")
-int x [X];
-@end smallexample
-
-@noindent
-In this example, the definition of X as 1 is saved by @code{#pragma
-push_macro} and restored by @code{#pragma pop_macro}.
-
-@node Function Specific Option Pragmas
-@subsection Function Specific Option Pragmas
-
-@table @code
-@cindex pragma GCC target
-@item #pragma GCC target (@var{string}, @dots{})
-
-This pragma allows you to set target-specific options for functions
-defined later in the source file. One or more strings can be
-specified. Each function that is defined after this point is treated
-as if it had been declared with one @code{target(}@var{string}@code{)}
-attribute for each @var{string} argument. The parentheses around
-the strings in the pragma are optional. @xref{Function Attributes},
-for more information about the @code{target} attribute and the attribute
-syntax.
-
-The @code{#pragma GCC target} pragma is presently implemented for
-x86, ARM, AArch64, PowerPC, and S/390 targets only.
-
-@cindex pragma GCC optimize
-@item #pragma GCC optimize (@var{string}, @dots{})
-
-This pragma allows you to set global optimization options for functions
-defined later in the source file. One or more strings can be
-specified. Each function that is defined after this point is treated
-as if it had been declared with one @code{optimize(}@var{string}@code{)}
-attribute for each @var{string} argument. The parentheses around
-the strings in the pragma are optional. @xref{Function Attributes},
-for more information about the @code{optimize} attribute and the attribute
-syntax.
-
-@cindex pragma GCC push_options
-@cindex pragma GCC pop_options
-@item #pragma GCC push_options
-@itemx #pragma GCC pop_options
-
-These pragmas maintain a stack of the current target and optimization
-options. It is intended for include files where you temporarily want
-to switch to using a different @samp{#pragma GCC target} or
-@samp{#pragma GCC optimize} and then to pop back to the previous
-options.
-
-@cindex pragma GCC reset_options
-@item #pragma GCC reset_options
-
-This pragma clears the current @code{#pragma GCC target} and
-@code{#pragma GCC optimize} to use the default switches as specified
-on the command line.
-
-@end table
-
-@node Loop-Specific Pragmas
-@subsection Loop-Specific Pragmas
-
-@table @code
-@cindex pragma GCC ivdep
-@item #pragma GCC ivdep
-
-With this pragma, the programmer asserts that there are no loop-carried
-dependencies which would prevent consecutive iterations of
-the following loop from executing concurrently with SIMD
-(single instruction multiple data) instructions.
-
-For example, the compiler can only unconditionally vectorize the following
-loop with the pragma:
-
-@smallexample
-void foo (int n, int *a, int *b, int *c)
-@{
- int i, j;
-#pragma GCC ivdep
- for (i = 0; i < n; ++i)
- a[i] = b[i] + c[i];
-@}
-@end smallexample
-
-@noindent
-In this example, using the @code{restrict} qualifier had the same
-effect. In the following example, that would not be possible. Assume
-@math{k < -m} or @math{k >= m}. Only with the pragma, the compiler knows
-that it can unconditionally vectorize the following loop:
-
-@smallexample
-void ignore_vec_dep (int *a, int k, int c, int m)
-@{
-#pragma GCC ivdep
- for (int i = 0; i < m; i++)
- a[i] = a[i + k] * c;
-@}
-@end smallexample
-
-@cindex pragma GCC novector
-@item #pragma GCC novector
-
-With this pragma, the programmer asserts that the following loop should be
-prevented from executing concurrently with SIMD (single instruction multiple
-data) instructions.
-
-For example, the compiler cannot vectorize the following loop with the pragma:
-
-@smallexample
-void foo (int n, int *a, int *b, int *c)
-@{
- int i, j;
-#pragma GCC novector
- for (i = 0; i < n; ++i)
- a[i] = b[i] + c[i];
-@}
-@end smallexample
-
-@cindex pragma GCC unroll @var{n}
-@item #pragma GCC unroll @var{n}
-
-You can use this pragma to control how many times a loop should be unrolled.
-It must be placed immediately before a @code{for}, @code{while} or @code{do}
-loop or a @code{#pragma GCC ivdep}, and applies only to the loop that follows.
-@var{n} is an integer constant expression specifying the unrolling factor.
-The values of @math{0} and @math{1} block any unrolling of the loop.
-
-@end table
-
-@node Unnamed Fields
-@section Unnamed Structure and Union Fields
-@cindex @code{struct}
-@cindex @code{union}
-
-As permitted by ISO C11 and for compatibility with other compilers,
-GCC allows you to define
-a structure or union that contains, as fields, structures and unions
-without names. For example:
-
-@smallexample
-struct @{
- int a;
- union @{
- int b;
- float c;
- @};
- int d;
-@} foo;
-@end smallexample
-
-@noindent
-In this example, you are able to access members of the unnamed
-union with code like @samp{foo.b}. Note that only unnamed structs and
-unions are allowed, you may not have, for example, an unnamed
-@code{int}.
-
-You must never create such structures that cause ambiguous field definitions.
-For example, in this structure:
-
-@smallexample
-struct @{
- int a;
- struct @{
- int a;
- @};
-@} foo;
-@end smallexample
-
-@noindent
-it is ambiguous which @code{a} is being referred to with @samp{foo.a}.
-The compiler gives errors for such constructs.
-
-@opindex fms-extensions
-Unless @option{-fms-extensions} is used, the unnamed field must be a
-structure or union definition without a tag (for example, @samp{struct
-@{ int a; @};}). If @option{-fms-extensions} is used, the field may
-also be a definition with a tag such as @samp{struct foo @{ int a;
-@};}, a reference to a previously defined structure or union such as
-@samp{struct foo;}, or a reference to a @code{typedef} name for a
-previously defined structure or union type.
-
-@opindex fplan9-extensions
-The option @option{-fplan9-extensions} enables
-@option{-fms-extensions} as well as two other extensions. First, a
-pointer to a structure is automatically converted to a pointer to an
-anonymous field for assignments and function calls. For example:
-
-@smallexample
-struct s1 @{ int a; @};
-struct s2 @{ struct s1; @};
-extern void f1 (struct s1 *);
-void f2 (struct s2 *p) @{ f1 (p); @}
-@end smallexample
-
-@noindent
-In the call to @code{f1} inside @code{f2}, the pointer @code{p} is
-converted into a pointer to the anonymous field.
-
-Second, when the type of an anonymous field is a @code{typedef} for a
-@code{struct} or @code{union}, code may refer to the field using the
-name of the @code{typedef}.
-
-@smallexample
-typedef struct @{ int a; @} s1;
-struct s2 @{ s1; @};
-s1 f1 (struct s2 *p) @{ return p->s1; @}
-@end smallexample
-
-These usages are only permitted when they are not ambiguous.
-
-@node Thread-Local
-@section Thread-Local Storage
-@cindex Thread-Local Storage
-@cindex @acronym{TLS}
-@cindex @code{__thread}
-
-Thread-local storage (@acronym{TLS}) is a mechanism by which variables
-are allocated such that there is one instance of the variable per extant
-thread. The runtime model GCC uses to implement this originates
-in the IA-64 processor-specific ABI, but has since been migrated
-to other processors as well. It requires significant support from
-the linker (@command{ld}), dynamic linker (@command{ld.so}), and
-system libraries (@file{libc.so} and @file{libpthread.so}), so it
-is not available everywhere.
-
-At the user level, the extension is visible with a new storage
-class keyword: @code{__thread}. For example:
-
-@smallexample
-__thread int i;
-extern __thread struct state s;
-static __thread char *p;
-@end smallexample
-
-The @code{__thread} specifier may be used alone, with the @code{extern}
-or @code{static} specifiers, but with no other storage class specifier.
-When used with @code{extern} or @code{static}, @code{__thread} must appear
-immediately after the other storage class specifier.
-
-The @code{__thread} specifier may be applied to any global, file-scoped
-static, function-scoped static, or static data member of a class. It may
-not be applied to block-scoped automatic or non-static data member.
-
-When the address-of operator is applied to a thread-local variable, it is
-evaluated at run time and returns the address of the current thread's
-instance of that variable. An address so obtained may be used by any
-thread. When a thread terminates, any pointers to thread-local variables
-in that thread become invalid.
-
-No static initialization may refer to the address of a thread-local variable.
-
-In C++, if an initializer is present for a thread-local variable, it must
-be a @var{constant-expression}, as defined in 5.19.2 of the ANSI/ISO C++
-standard.
-
-See @uref{https://www.akkadia.org/drepper/tls.pdf,
-ELF Handling For Thread-Local Storage} for a detailed explanation of
-the four thread-local storage addressing models, and how the runtime
-is expected to function.
-
-@menu
-* C99 Thread-Local Edits::
-* C++98 Thread-Local Edits::
-@end menu
-
-@node C99 Thread-Local Edits
-@subsection ISO/IEC 9899:1999 Edits for Thread-Local Storage
-
-The following are a set of changes to ISO/IEC 9899:1999 (aka C99)
-that document the exact semantics of the language extension.
-
-@itemize @bullet
-@item
-@cite{5.1.2 Execution environments}
-
-Add new text after paragraph 1
-
-@quotation
-Within either execution environment, a @dfn{thread} is a flow of
-control within a program. It is implementation defined whether
-or not there may be more than one thread associated with a program.
-It is implementation defined how threads beyond the first are
-created, the name and type of the function called at thread
-startup, and how threads may be terminated. However, objects
-with thread storage duration shall be initialized before thread
-startup.
-@end quotation
-
-@item
-@cite{6.2.4 Storage durations of objects}
-
-Add new text before paragraph 3
-
-@quotation
-An object whose identifier is declared with the storage-class
-specifier @w{@code{__thread}} has @dfn{thread storage duration}.
-Its lifetime is the entire execution of the thread, and its
-stored value is initialized only once, prior to thread startup.
-@end quotation
-
-@item
-@cite{6.4.1 Keywords}
-
-Add @code{__thread}.
-
-@item
-@cite{6.7.1 Storage-class specifiers}
-
-Add @code{__thread} to the list of storage class specifiers in
-paragraph 1.
-
-Change paragraph 2 to
-
-@quotation
-With the exception of @code{__thread}, at most one storage-class
-specifier may be given [@dots{}]. The @code{__thread} specifier may
-be used alone, or immediately following @code{extern} or
-@code{static}.
-@end quotation
-
-Add new text after paragraph 6
-
-@quotation
-The declaration of an identifier for a variable that has
-block scope that specifies @code{__thread} shall also
-specify either @code{extern} or @code{static}.
-
-The @code{__thread} specifier shall be used only with
-variables.
-@end quotation
-@end itemize
-
-@node C++98 Thread-Local Edits
-@subsection ISO/IEC 14882:1998 Edits for Thread-Local Storage
-
-The following are a set of changes to ISO/IEC 14882:1998 (aka C++98)
-that document the exact semantics of the language extension.
-
-@itemize @bullet
-@item
-@b{[intro.execution]}
-
-New text after paragraph 4
-
-@quotation
-A @dfn{thread} is a flow of control within the abstract machine.
-It is implementation defined whether or not there may be more than
-one thread.
-@end quotation
-
-New text after paragraph 7
-
-@quotation
-It is unspecified whether additional action must be taken to
-ensure when and whether side effects are visible to other threads.
-@end quotation
-
-@item
-@b{[lex.key]}
-
-Add @code{__thread}.
-
-@item
-@b{[basic.start.main]}
-
-Add after paragraph 5
-
-@quotation
-The thread that begins execution at the @code{main} function is called
-the @dfn{main thread}. It is implementation defined how functions
-beginning threads other than the main thread are designated or typed.
-A function so designated, as well as the @code{main} function, is called
-a @dfn{thread startup function}. It is implementation defined what
-happens if a thread startup function returns. It is implementation
-defined what happens to other threads when any thread calls @code{exit}.
-@end quotation
-
-@item
-@b{[basic.start.init]}
-
-Add after paragraph 4
-
-@quotation
-The storage for an object of thread storage duration shall be
-statically initialized before the first statement of the thread startup
-function. An object of thread storage duration shall not require
-dynamic initialization.
-@end quotation
-
-@item
-@b{[basic.start.term]}
-
-Add after paragraph 3
-
-@quotation
-The type of an object with thread storage duration shall not have a
-non-trivial destructor, nor shall it be an array type whose elements
-(directly or indirectly) have non-trivial destructors.
-@end quotation
-
-@item
-@b{[basic.stc]}
-
-Add ``thread storage duration'' to the list in paragraph 1.
-
-Change paragraph 2
-
-@quotation
-Thread, static, and automatic storage durations are associated with
-objects introduced by declarations [@dots{}].
-@end quotation
-
-Add @code{__thread} to the list of specifiers in paragraph 3.
-
-@item
-@b{[basic.stc.thread]}
-
-New section before @b{[basic.stc.static]}
-
-@quotation
-The keyword @code{__thread} applied to a non-local object gives the
-object thread storage duration.
-
-A local variable or class data member declared both @code{static}
-and @code{__thread} gives the variable or member thread storage
-duration.
-@end quotation
-
-@item
-@b{[basic.stc.static]}
-
-Change paragraph 1
-
-@quotation
-All objects that have neither thread storage duration, dynamic
-storage duration nor are local [@dots{}].
-@end quotation
-
-@item
-@b{[dcl.stc]}
-
-Add @code{__thread} to the list in paragraph 1.
-
-Change paragraph 1
-
-@quotation
-With the exception of @code{__thread}, at most one
-@var{storage-class-specifier} shall appear in a given
-@var{decl-specifier-seq}. The @code{__thread} specifier may
-be used alone, or immediately following the @code{extern} or
-@code{static} specifiers. [@dots{}]
-@end quotation
-
-Add after paragraph 5
-
-@quotation
-The @code{__thread} specifier can be applied only to the names of objects
-and to anonymous unions.
-@end quotation
-
-@item
-@b{[class.mem]}
-
-Add after paragraph 6
-
-@quotation
-Non-@code{static} members shall not be @code{__thread}.
-@end quotation
-@end itemize
-
-@node Binary constants
-@section Binary Constants using the @samp{0b} Prefix
-@cindex Binary constants using the @samp{0b} prefix
-
-Integer constants can be written as binary constants, consisting of a
-sequence of @samp{0} and @samp{1} digits, prefixed by @samp{0b} or
-@samp{0B}. This is particularly useful in environments that operate a
-lot on the bit level (like microcontrollers).
-
-The following statements are identical:
-
-@smallexample
-i = 42;
-i = 0x2a;
-i = 052;
-i = 0b101010;
-@end smallexample
-
-The type of these constants follows the same rules as for octal or
-hexadecimal integer constants, so suffixes like @samp{L} or @samp{UL}
-can be applied.
-
-@node OpenMP
-@section OpenMP
-@cindex OpenMP extension support
-
-OpenMP (Open Multi-Processing) is an application programming
-interface (API) that supports multi-platform shared memory
-multiprocessing programming in C/C++ and Fortran on many
-architectures, including Unix and Microsoft Windows platforms.
-It consists of a set of compiler directives, library routines,
-and environment variables that influence run-time behavior.
-
-GCC implements all of the @uref{https://www.openmp.org/specifications/,
-OpenMP Application Program Interface v4.5}, and many features from later
-versions of the OpenMP specification.
-@xref{OpenMP Implementation Status,,,libgomp,
-GNU Offloading and Multi Processing Runtime Library},
-for more details about currently supported OpenMP features.
-
-To enable the processing of OpenMP directives @samp{#pragma omp},
-@samp{[[omp::directive(...)]]}, @samp{[[omp::decl(...)]]},
-and @samp{[[omp::sequence(...)]]} in C and C++,
-GCC needs to be invoked with the @option{-fopenmp} option.
-This option also arranges for automatic linking of the OpenMP
-runtime library.
-@xref{,,,libgomp,GNU Offloading and Multi Processing Runtime Library}.
-
-@xref{OpenMP and OpenACC Options}, for additional options useful with
-@option{-fopenmp}.
-
-@node OpenACC
-@section OpenACC
-@cindex OpenACC extension support
-
-OpenACC is an application programming interface (API) that supports
-offloading of code to accelerator devices. It consists of a set of
-compiler directives, library routines, and environment variables that
-influence run-time behavior.
-
-GCC strives to be compatible with the
-@uref{https://www.openacc.org/, OpenACC Application Programming
-Interface v2.6}.
-
-To enable the processing of OpenACC directives @samp{#pragma acc}
-in C and C++, GCC needs to be invoked with the @option{-fopenacc} option.
-This option also arranges for automatic linking of the OpenACC runtime
-library.
-@xref{,,,libgomp,GNU Offloading and Multi Processing Runtime Library}.
-
-@xref{OpenMP and OpenACC Options}, for additional options useful with
-@option{-fopenacc}.
-
@node C++ Extensions
@chapter Extensions to the C++ Language
@cindex extensions, C++ language
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1819bcd..b3f7f04 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -912,8 +912,8 @@ Objective-C and Objective-C++ Dialects}.
-mdouble=@var{bits} -mlong-double=@var{bits} -mno-call-main
-mn_flash=@var{size} -mfract-convert-truncate -mno-interrupts
-mmain-is-OS_task -mrelax -mrmw -mstrict-X -mtiny-stack
--mrodata-in-ram -msplit-bit-shift -msplit-ldst
--mshort-calls -mskip-bug -nodevicelib -nodevicespecs
+-mrodata-in-ram -msplit-bit-shift -msplit-ldst -mshort-calls
+-mskip-bug -muse-nonzero-bits -nodevicelib -nodevicespecs
-Waddr-space-convert -Wmisspelled-isr}
@emph{Blackfin Options} (@ref{Blackfin Options})
@@ -1489,8 +1489,8 @@ See RS/6000 and PowerPC Options.
-mamx-tile -mamx-int8 -mamx-bf16 -muintr -mhreset -mavxvnni -mamx-fp8
-mavx512fp16 -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16
-mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mapxf
--musermsr -mavx10.1 -mavx10.1-256 -mavx10.1-512 -mevex512 -mavx10.2 -mavx10.2-256
--mavx10.2-512 -mamx-avx512 -mamx-tf32 -mamx-transpose -mmovrs -mamx-movrs
+-musermsr -mavx10.1 -mavx10.1-256 -mavx10.1-512 -mevex512 -mavx10.2
+-mamx-avx512 -mamx-tf32 -mamx-transpose -mmovrs -mamx-movrs
-mcldemote -mms-bitfields -mno-align-stringops -minline-all-stringops
-minline-stringops-dynamically -mstringop-strategy=@var{alg}
-mkl -mwidekl
@@ -21745,7 +21745,7 @@ performance of the code. Permissible values for this option are:
@samp{oryon-1},
@samp{neoverse-512tvb}, @samp{neoverse-e1}, @samp{neoverse-n1},
@samp{neoverse-n2}, @samp{neoverse-v1}, @samp{neoverse-v2}, @samp{grace},
-@samp{neoverse-v3}, @samp{neoverse-v3ae}, @samp{neoverse-n3},
+@samp{neoverse-v3}, @samp{neoverse-v3ae}, @samp{neoverse-n3}, @samp{olympus},
@samp{cortex-a725}, @samp{cortex-x925},
@samp{qdf24xx}, @samp{saphira}, @samp{phecda}, @samp{xgene1}, @samp{vulcan},
@samp{octeontx}, @samp{octeontx81}, @samp{octeontx83},
@@ -24555,6 +24555,8 @@ Accumulate outgoing function arguments and acquire/release the needed
stack space for outgoing function arguments once in function
prologue/epilogue. Without this option, outgoing arguments are pushed
before calling a function and popped afterwards.
+See also the @option{-fdefer-pop}
+@ref{Optimize Options,,optimization option}.
Popping the arguments after the function call can be expensive on
AVR so that accumulating the stack space might lead to smaller
@@ -24630,6 +24632,12 @@ a multiple of 8 is controlled by @option{-mfuse-move}.
Split multi-byte loads and stores into several byte loads and stores.
This optimization is turned on per default for @option{-O2} and higher.
+@opindex muse-nonzero-bits
+@item -muse-nonzero-bits
+Enable optimizations that are only possible when some bits in a
+register are always zero.
+This optimization is turned on per default for @option{-O2} and higher.
+
@end table
@anchor{eind}
@@ -30402,7 +30410,7 @@ Valid version strings are
@samp{7.0}, @samp{7.3}, and @samp{7.8}.
The default PTX ISA version is the one that added support for the
selected PTX ISA target architecture, see @option{-march=}, but at
-least @samp{6.0}, or @samp{7.3} for @option{-march=sm_52} and higher.
+least @samp{6.3}, or @samp{7.3} for @option{-march=sm_52} and higher.
This option sets the values of the preprocessor macros
@code{__PTX_ISA_VERSION_MAJOR__} and @code{__PTX_ISA_VERSION_MINOR__};
@@ -33114,10 +33122,7 @@ GNU/Linux for S/390 ABI@. When @option{-m64} is specified, generate
code compliant to the GNU/Linux for zSeries ABI@. This allows GCC in
particular to generate 64-bit instructions. For the @samp{s390}
targets, the default is @option{-m31}, while the @samp{s390x}
-targets default to @option{-m64}. Note, previously, @option{-m31} defaulted to
-@option{-mesa} unless @option{-mzarch} was explicitely specified. Now,
-@option{-m31} defaults to @option{-mzarch} unless @option{-mesa} is explicitely
-specified since ESA/390 support is deprecated and will be removed.
+targets default to @option{-m64}.
@opindex mzarch
@opindex mesa
@@ -33131,7 +33136,6 @@ not possible with @option{-m64}.
When generating code compliant to the GNU/Linux for S/390 ABI,
the default is @option{-mesa}. When generating code compliant
to the GNU/Linux for zSeries ABI, the default is @option{-mzarch}.
-Option @option{-mesa} is deprecated and support for ESA/390 will be removed.
@opindex mhtm
@opindex mno-htm
@@ -35904,12 +35908,6 @@ preferred alignment to @option{-mpreferred-stack-boundary=2}.
@opindex mavx10.2
@itemx -mavx10.2
@need 200
-@opindex mavx10.2-256
-@itemx -mavx10.2-256
-@need 200
-@opindex mavx10.2-512
-@itemx -mavx10.2-512
-@need 200
@opindex mamx-avx512
@itemx -mamx-avx512
@need 200
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 84fd273..c29cd3f 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2626,17 +2626,14 @@ Target supports the execution of @code{avx} instructions.
@item avx10.1-256
Target supports the execution of @code{avx10.1-256} instructions.
+@item avx10.1
+Target supports the execution of @code{avx10.1} instructions.
+
@item avx10.1-512
Target supports the execution of @code{avx10.1-512} instructions.
@item avx10.2
-Target supports the execution of @code{avx10.2-512} instructions.
-
-@item avx10.2-256
-Target supports the execution of @code{avx10.2-256} instructions.
-
-@item avx10.2-512
-Target supports the execution of @code{avx10.2-512} instructions.
+Target supports the execution of @code{avx10.2} instructions.
@item avx2
Target supports compiling @code{avx2} instructions.
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index db74f2c..32ec915 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,69 @@
+2025-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ * resolve.cc (resolve_procedure_expression): Remove extraneous space
+ from the middle of diagnostics.
+
+2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ * trans-openmp.cc (gfc_trans_omp_clauses): Make OMP_CLAUSE_DESTROY and
+ OMP_CLAUSE_INIT addressable.
+ * types.def (BT_FN_VOID_INT_INT_PTR_PTR_PTR_INT_PTR_INT_PTR_UINT_PTR):
+ New.
+
+2025-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/119406
+ * resolve.cc (resolve_locality_spec): Add space in error
+ message.
+
+2025-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/119403
+ * interface.cc (compare_parameter): Fix typo.
+
+2025-03-21 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/85836
+ * check.cc (get_ul_from_cst_cl): New function used in
+ check_operation.
+ (check_operation): New function used in check_reduce and
+ check_co_reduce.
+ (gfc_check_co_reduce): Use it.
+ (gfc_check_reduce): New function.
+ (gfc_check_rename): Add prototype for intrinsic with 6 arguments.
+ * gfortran.h : Add isym id for reduce and prototype for f6.
+ * intrinsic.cc (do_check): Add another argument expression and use
+ it in the call to the six argument specific check.
+ (add_sym_6): New function.
+ (add_functions): Add the discription of the reduce intrinsic and
+ add it to the intrinsic list.
+ * intrinsic.h : Add prototypes for gfc_check_reduce and
+ gfc_resolve_reduce.
+ * iresolve.cc (generate_reduce_op_wrapper): Generate a wrapper
+ subroutine for the 'operation' function to enable the library
+ implementation to be type agnostic and use pointer arithmetic
+ throughout.
+ (gfc_resolve_reduce): New function.
+ * trans-expr.cc (gfc_conv_procedure_call): Add flag for scalar
+ reduce. Generate a return variable 'sr' for scalar reduce, pass its
+ address to the library function and return it as the scalar result.
+ * trans-intrinsic.cc (gfc_conv_intrinsic_function): Array valued
+ reduce is called in same way as reshape. Fall through for call to
+ the scalar version.
+
+2025-03-21 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/119380
+ * trans-array.cc (structure_alloc_comps): Prevent freeing of
+ procedure pointer components.
+
+2025-03-21 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/119349
+ * trans-expr.cc (gfc_conv_procedure_call): Prevent deallocation
+ of array temporary for polymorphic temporary argument.
+
2025-03-19 Harald Anlauf <anlauf@gmx.de>
PR fortran/116706
diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc
index 3545864..d2c8816 100644
--- a/gcc/fortran/check.cc
+++ b/gcc/fortran/check.cc
@@ -2442,31 +2442,24 @@ gfc_check_co_broadcast (gfc_expr *a, gfc_expr *source_image, gfc_expr *stat,
}
-bool
-gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
- gfc_expr *stat, gfc_expr *errmsg)
+/* Helper function for character arguments in gfc_check_[co_]reduce. */
+
+static unsigned long
+get_ul_from_cst_cl (const gfc_charlen *cl)
+{
+ return cl && cl->length && cl->length->expr_type == EXPR_CONSTANT
+ ? mpz_get_ui (cl->length->value.integer) : 0;
+};
+
+
+/* Checks shared between co_reduce and reduce. */
+static bool
+check_operation (gfc_expr *op, gfc_expr *a, bool is_co_reduce)
{
symbol_attribute attr;
gfc_formal_arglist *formal;
gfc_symbol *sym;
- if (a->ts.type == BT_CLASS)
- {
- gfc_error ("The A argument at %L of CO_REDUCE shall not be polymorphic",
- &a->where);
- return false;
- }
-
- if (gfc_expr_attr (a).alloc_comp)
- {
- gfc_error ("Support for the A argument at %L with allocatable components"
- " is not yet implemented", &a->where);
- return false;
- }
-
- if (!check_co_collective (a, result_image, stat, errmsg, true))
- return false;
-
if (!gfc_resolve_expr (op))
return false;
@@ -2483,8 +2476,9 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
/* None of the intrinsics fulfills the criteria of taking two arguments,
returning the same type and kind as the arguments and being permitted
as actual argument. */
- gfc_error ("Intrinsic function %s at %L is not permitted for CO_REDUCE",
- op->symtree->n.sym->name, &op->where);
+ gfc_error ("Intrinsic function %s at %L is not permitted for %s",
+ op->symtree->n.sym->name, &op->where,
+ is_co_reduce ? "CO_REDUCE" : "REDUCE");
return false;
}
@@ -2510,12 +2504,14 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
if (!gfc_compare_types (&a->ts, &sym->result->ts))
{
- gfc_error ("The A argument at %L has type %s but the function passed as "
- "OPERATION at %L returns %s",
+ gfc_error ("The %s argument at %L has type %s but the function passed "
+ "as OPERATION at %L returns %s",
+ is_co_reduce ? "A" : "ARRAY",
&a->where, gfc_typename (a), &op->where,
gfc_typename (&sym->result->ts));
return false;
}
+
if (!gfc_compare_types (&a->ts, &formal->sym->ts)
|| !gfc_compare_types (&a->ts, &formal->next->sym->ts))
{
@@ -2567,42 +2563,59 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
if (a->ts.type == BT_CHARACTER)
{
- gfc_charlen *cl;
unsigned long actual_size, formal_size1, formal_size2, result_size;
- cl = a->ts.u.cl;
- actual_size = cl && cl->length && cl->length->expr_type == EXPR_CONSTANT
- ? mpz_get_ui (cl->length->value.integer) : 0;
-
- cl = formal->sym->ts.u.cl;
- formal_size1 = cl && cl->length && cl->length->expr_type == EXPR_CONSTANT
- ? mpz_get_ui (cl->length->value.integer) : 0;
-
- cl = formal->next->sym->ts.u.cl;
- formal_size2 = cl && cl->length && cl->length->expr_type == EXPR_CONSTANT
- ? mpz_get_ui (cl->length->value.integer) : 0;
-
- cl = sym->ts.u.cl;
- result_size = cl && cl->length && cl->length->expr_type == EXPR_CONSTANT
- ? mpz_get_ui (cl->length->value.integer) : 0;
+ actual_size = get_ul_from_cst_cl (a->ts.u.cl);
+ formal_size1 = get_ul_from_cst_cl (formal->sym->ts.u.cl);
+ formal_size2 = get_ul_from_cst_cl (formal->next->sym->ts.u.cl);
+ result_size = get_ul_from_cst_cl (sym->ts.u.cl);
if (actual_size
&& ((formal_size1 && actual_size != formal_size1)
|| (formal_size2 && actual_size != formal_size2)))
{
- gfc_error ("The character length of the A argument at %L and of the "
- "arguments of the OPERATION at %L shall be the same",
- &a->where, &op->where);
+ gfc_error ("The character length of the %s argument at %L and of "
+ "the arguments of the OPERATION at %L shall be the same",
+ is_co_reduce ? "A" : "ARRAY", &a->where, &op->where);
return false;
}
+
if (actual_size && result_size && actual_size != result_size)
{
- gfc_error ("The character length of the A argument at %L and of the "
- "function result of the OPERATION at %L shall be the same",
+ gfc_error ("The character length of the %s argument at %L and of "
+ "the function result of the OPERATION at %L shall be the "
+ "same", is_co_reduce ? "A" : "ARRAY",
&a->where, &op->where);
return false;
}
}
+ return true;
+}
+
+
+bool
+gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image,
+ gfc_expr *stat, gfc_expr *errmsg)
+{
+ if (a->ts.type == BT_CLASS)
+ {
+ gfc_error ("The A argument at %L of CO_REDUCE shall not be polymorphic",
+ &a->where);
+ return false;
+ }
+
+ if (gfc_expr_attr (a).alloc_comp)
+ {
+ gfc_error ("Support for the A argument at %L with allocatable components"
+ " is not yet implemented", &a->where);
+ return false;
+ }
+
+ if (!check_co_collective (a, result_image, stat, errmsg, true))
+ return false;
+
+ if (!check_operation (op, a, true))
+ return false;
return true;
}
@@ -5136,6 +5149,62 @@ gfc_check_real (gfc_expr *a, gfc_expr *kind)
bool
+gfc_check_reduce (gfc_expr *array, gfc_expr *operation, gfc_expr *dim,
+ gfc_expr *mask, gfc_expr *identity, gfc_expr *ordered)
+{
+ if (array->ts.type == BT_CLASS)
+ {
+ gfc_error ("The ARRAY argument at %L of REDUCE shall not be polymorphic",
+ &array->where);
+ return false;
+ }
+
+ if (!check_operation (operation, array, false))
+ return false;
+
+ if (dim && (dim->rank || dim->ts.type != BT_INTEGER))
+ {
+ gfc_error ("The DIM argument at %L, if present, must be an integer "
+ "scalar", &dim->where);
+ return false;
+ }
+
+ if (mask && (array->rank != mask->rank || mask->ts.type != BT_LOGICAL))
+ {
+ gfc_error ("The MASK argument at %L, if present, must be a logical "
+ "array with the same rank as ARRAY", &mask->where);
+ return false;
+ }
+
+ if (mask
+ && !gfc_check_conformance (array, mask,
+ _("arguments '%s' and '%s' for intrinsic %s"),
+ "ARRAY", "MASK", "REDUCE"))
+ return false;
+
+ if (mask && !identity)
+ gfc_warning (0, "MASK present at %L without IDENTITY", &mask->where);
+
+ if (ordered && (ordered->rank || ordered->ts.type != BT_LOGICAL))
+ {
+ gfc_error ("The ORDERED argument at %L, if present, must be a logical "
+ "scalar", &ordered->where);
+ return false;
+ }
+
+ if (identity && (identity->rank
+ || !gfc_compare_types (&array->ts, &identity->ts)))
+ {
+ gfc_error ("The IDENTITY argument at %L, if present, must be a scalar "
+ "with the same type as ARRAY", &identity->where);
+ return false;
+ }
+
+ return true;
+}
+
+
+bool
gfc_check_rename (gfc_expr *path1, gfc_expr *path2)
{
if (!type_check (path1, 0, BT_CHARACTER))
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 7c6e9b6..5ef7037 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -647,6 +647,7 @@ enum gfc_isym_id
GFC_ISYM_RANK,
GFC_ISYM_REAL,
GFC_ISYM_REALPART,
+ GFC_ISYM_REDUCE,
GFC_ISYM_RENAME,
GFC_ISYM_REPEAT,
GFC_ISYM_RESHAPE,
@@ -2543,6 +2544,8 @@ typedef union
struct gfc_expr *);
bool (*f5)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
struct gfc_expr *, struct gfc_expr *);
+ bool (*f6)(struct gfc_expr *, struct gfc_expr *, struct gfc_expr *,
+ struct gfc_expr *, struct gfc_expr *, struct gfc_expr *);
}
gfc_check_f;
diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc
index c59ed1f..6258a41 100644
--- a/gcc/fortran/interface.cc
+++ b/gcc/fortran/interface.cc
@@ -2494,7 +2494,7 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual,
{
if (formal->attr.artificial)
gfc_error_opt (0, "Interface mismatch in dummy procedure "
- "at %L conflichts with %L: %s", &actual->where,
+ "at %L conflicts with %L: %s", &actual->where,
&formal->declared_at, err);
else
gfc_error_opt (0, "Interface mismatch in dummy procedure %qs at "
diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc
index 30f532b..d2ce74f 100644
--- a/gcc/fortran/intrinsic.cc
+++ b/gcc/fortran/intrinsic.cc
@@ -331,7 +331,7 @@ do_ts29113_check (gfc_intrinsic_sym *specific, gfc_actual_arglist *arg)
static bool
do_check (gfc_intrinsic_sym *specific, gfc_actual_arglist *arg)
{
- gfc_expr *a1, *a2, *a3, *a4, *a5;
+ gfc_expr *a1, *a2, *a3, *a4, *a5, *a6;
if (arg == NULL)
return (*specific->check.f0) ();
@@ -361,6 +361,11 @@ do_check (gfc_intrinsic_sym *specific, gfc_actual_arglist *arg)
if (arg == NULL)
return (*specific->check.f5) (a1, a2, a3, a4, a5);
+ a6 = arg->expr;
+ arg = arg->next;
+ if (arg == NULL)
+ return (*specific->check.f6) (a1, a2, a3, a4, a5, a6);
+
gfc_internal_error ("do_check(): too many args");
}
@@ -838,6 +843,44 @@ add_sym_6fl (const char *name, gfc_isym_id id, enum klass cl, int actual_ok,
}
+/* Add a symbol to the function list where the function takes
+ 6 arguments. */
+
+static void
+add_sym_6 (const char *name, gfc_isym_id id, enum klass cl, int actual_ok,
+ bt type, int kind, int standard,
+ bool (*check) (gfc_expr *, gfc_expr *, gfc_expr *,
+ gfc_expr *, gfc_expr *, gfc_expr *),
+ gfc_expr *(*simplify) (gfc_expr *, gfc_expr *, gfc_expr *,
+ gfc_expr *, gfc_expr *, gfc_expr *),
+ void (*resolve) (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
+ gfc_expr *, gfc_expr *, gfc_expr *),
+ const char *a1, bt type1, int kind1, int optional1,
+ const char *a2, bt type2, int kind2, int optional2,
+ const char *a3, bt type3, int kind3, int optional3,
+ const char *a4, bt type4, int kind4, int optional4,
+ const char *a5, bt type5, int kind5, int optional5,
+ const char *a6, bt type6, int kind6, int optional6)
+{
+ gfc_check_f cf;
+ gfc_simplify_f sf;
+ gfc_resolve_f rf;
+
+ cf.f6 = check;
+ sf.f6 = simplify;
+ rf.f6 = resolve;
+
+ add_sym (name, id, cl, actual_ok, type, kind, standard, cf, sf, rf,
+ a1, type1, kind1, optional1, INTENT_IN,
+ a2, type2, kind2, optional2, INTENT_IN,
+ a3, type3, kind3, optional3, INTENT_IN,
+ a4, type4, kind4, optional4, INTENT_IN,
+ a5, type5, kind5, optional5, INTENT_IN,
+ a6, type6, kind6, optional6, INTENT_IN,
+ (void *) 0);
+}
+
+
/* MINVAL, MAXVAL, PRODUCT, and SUM also get special treatment because
their argument also might have to be reordered. */
@@ -1358,13 +1401,13 @@ add_functions (void)
*c_ptr_2 = "c_ptr_2", *ca = "coarray", *com = "command",
*dist = "distance", *dm = "dim", *f = "field", *failed="failed",
*fs = "fsource", *han = "handler", *i = "i",
- *image = "image", *j = "j", *kind = "kind",
+ *idy = "identity", *image = "image", *j = "j", *kind = "kind",
*l = "l", *ln = "len", *level = "level", *m = "matrix", *ma = "matrix_a",
*mb = "matrix_b", *md = "mode", *mo = "mold", *msk = "mask",
*n = "n", *ncopies= "ncopies", *nm = "name", *num = "number",
- *ord = "order", *p = "p", *p1 = "path1", *p2 = "path2",
- *pad = "pad", *pid = "pid", *pos = "pos", *pt = "pointer",
- *r = "r", *rd = "round",
+ *op = "operation", *ord = "order", *odd = "ordered", *p = "p",
+ *p1 = "path1", *p2 = "path2", *pad = "pad", *pid = "pid", *pos = "pos",
+ *pt = "pointer", *r = "r", *rd = "round",
*s = "s", *set = "set", *sh = "shift", *shp = "shape",
*sig = "sig", *src = "source", *ssg = "substring",
*sta = "string_a", *stb = "string_b", *stg = "string",
@@ -2936,6 +2979,18 @@ add_functions (void)
make_generic ("sngl", GFC_ISYM_SNGL, GFC_STD_F77);
+ add_sym_6 ("reduce", GFC_ISYM_REDUCE, CLASS_TRANSFORMATIONAL, ACTUAL_NO,
+ BT_REAL, dr, GFC_STD_F2018,
+ gfc_check_reduce, NULL, gfc_resolve_reduce,
+ ar, BT_REAL, dr, REQUIRED,
+ op, BT_REAL, dr, REQUIRED,
+ dm, BT_INTEGER, di, OPTIONAL,
+ msk, BT_LOGICAL, dl, OPTIONAL,
+ idy, BT_REAL, dr, OPTIONAL,
+ odd, BT_LOGICAL, dl, OPTIONAL);
+
+ make_generic ("reduce", GFC_ISYM_REDUCE, GFC_STD_F2018);
+
add_sym_2 ("rename", GFC_ISYM_RENAME, CLASS_IMPURE, ACTUAL_NO, BT_INTEGER, di,
GFC_STD_GNU, gfc_check_rename, NULL, gfc_resolve_rename,
p1, BT_CHARACTER, dc, REQUIRED, p2, BT_CHARACTER, dc, REQUIRED);
diff --git a/gcc/fortran/intrinsic.h b/gcc/fortran/intrinsic.h
index 34a0248..fec1c24 100644
--- a/gcc/fortran/intrinsic.h
+++ b/gcc/fortran/intrinsic.h
@@ -144,6 +144,8 @@ bool gfc_check_rand (gfc_expr *);
bool gfc_check_range (gfc_expr *);
bool gfc_check_rank (gfc_expr *);
bool gfc_check_real (gfc_expr *, gfc_expr *);
+bool gfc_check_reduce (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
+ gfc_expr *, gfc_expr *);
bool gfc_check_rename (gfc_expr *, gfc_expr *);
bool gfc_check_repeat (gfc_expr *, gfc_expr *);
bool gfc_check_reshape (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
@@ -589,6 +591,8 @@ void gfc_resolve_parity (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_product (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_real (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_realpart (gfc_expr *, gfc_expr *);
+void gfc_resolve_reduce (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
+ gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_rename (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_repeat (gfc_expr *, gfc_expr *, gfc_expr *);
void gfc_resolve_reshape (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *,
diff --git a/gcc/fortran/iresolve.cc b/gcc/fortran/iresolve.cc
index 55f7e19..8189d7a 100644
--- a/gcc/fortran/iresolve.cc
+++ b/gcc/fortran/iresolve.cc
@@ -2408,6 +2408,220 @@ gfc_resolve_realpart (gfc_expr *f, gfc_expr *a)
}
+/* Generate a wrapper subroutine for the operation so that the library REDUCE
+ function can use pointer arithmetic for OPERATION and not be dependent on
+ knowledge of its type. */
+static gfc_symtree *
+generate_reduce_op_wrapper (gfc_expr *op)
+{
+ gfc_symbol *operation = op->symtree->n.sym;
+ gfc_symbol *wrapper, *a, *b, *c;
+ gfc_symtree *st;
+ char tname[GFC_MAX_SYMBOL_LEN+1];
+ char *name;
+ gfc_namespace *ns;
+ gfc_expr *e;
+
+ /* Find the top-level namespace. */
+ for (ns = gfc_current_ns; ns; ns = ns->parent)
+ if (!ns->parent)
+ break;
+
+ sprintf (tname, "%s_%s", operation->name,
+ ns->proc_name ? ns->proc_name->name : "noname");
+ name = xasprintf ("__reduce_wrapper_%s", tname);
+
+ gfc_find_sym_tree (name, ns, 0, &st);
+
+ if (st && !strcmp (name, st->name))
+ {
+ free (name);
+ return st;
+ }
+
+ /* Create the wrapper namespace and contain it in 'ns'. */
+ gfc_namespace *sub_ns = gfc_get_namespace (ns, 0);
+ sub_ns->sibling = ns->contained;
+ ns->contained = sub_ns;
+ sub_ns->resolved = 1;
+
+ /* Set up procedure symbol. */
+ gfc_get_symbol (name, ns, &wrapper);
+ sub_ns->proc_name = wrapper;
+ wrapper->attr.flavor = FL_PROCEDURE;
+ wrapper->attr.subroutine = 1;
+ wrapper->attr.artificial = 1;
+ wrapper->attr.if_source = IFSRC_DECL;
+ if (ns->proc_name->attr.flavor == FL_MODULE)
+ wrapper->module = ns->proc_name->name;
+ gfc_set_sym_referenced (wrapper);
+
+ /* Set up formal argument for the argument 'a'. */
+ gfc_get_symbol ("a", sub_ns, &a);
+ a->ts = operation->ts;
+ a->attr.flavor = FL_VARIABLE;
+ a->attr.dummy = 1;
+ a->attr.artificial = 1;
+ a->attr.intent = INTENT_INOUT;
+ wrapper->formal = gfc_get_formal_arglist ();
+ wrapper->formal->sym = a;
+ gfc_set_sym_referenced (a);
+
+ /* Set up formal argument for the argument 'b'. This is optional. When
+ present, the wrapped function is called, otherwise 'a' is assigned
+ to 'c'. This way, deep copies are effected in the library. */
+ gfc_get_symbol ("b", sub_ns, &b);
+ b->ts = operation->ts;
+ b->attr.flavor = FL_VARIABLE;
+ b->attr.dummy = 1;
+ b->attr.optional= 1;
+ b->attr.artificial = 1;
+ b->attr.intent = INTENT_INOUT;
+ wrapper->formal->next = gfc_get_formal_arglist ();
+ wrapper->formal->next->sym = b;
+ gfc_set_sym_referenced (b);
+
+ /* Set up formal argument for the argument 'c'. */
+ gfc_get_symbol ("c", sub_ns, &c);
+ c->ts = operation->ts;
+ c->attr.flavor = FL_VARIABLE;
+ c->attr.dummy = 1;
+ c->attr.artificial = 1;
+ c->attr.intent = INTENT_INOUT;
+ wrapper->formal->next->next = gfc_get_formal_arglist ();
+ wrapper->formal->next->next->sym = c;
+ gfc_set_sym_referenced (c);
+
+/* The only code is:
+ if (present (b))
+ c = operation (a, b)
+ else
+ c = a
+ endif
+ A call with 'b' missing provides a convenient way for the library to do
+ an intrinsic assignment instead of a call to memcpy and, where allocatable
+ components are present, a deep copy.
+
+ Code for if (present (b)) */
+ sub_ns->code = gfc_get_code (EXEC_IF);
+ gfc_code *if_block = sub_ns->code;
+ if_block->block = gfc_get_code (EXEC_IF);
+ if_block->block->expr1 = gfc_get_expr ();
+ e = if_block->block->expr1;
+ e->expr_type = EXPR_FUNCTION;
+ e->where = gfc_current_locus;
+ gfc_get_sym_tree ("present", sub_ns, &e->symtree, false);
+ e->symtree->n.sym->attr.flavor = FL_PROCEDURE;
+ e->symtree->n.sym->attr.intrinsic = 1;
+ e->ts.type = BT_LOGICAL;
+ e->ts.kind = gfc_default_logical_kind;
+ e->value.function.isym = gfc_intrinsic_function_by_id (GFC_ISYM_PRESENT);
+ e->value.function.actual = gfc_get_actual_arglist ();
+ e->value.function.actual->expr = gfc_lval_expr_from_sym (b);
+
+/* Code for c = operation (a, b) */
+ if_block->block->next = gfc_get_code (EXEC_ASSIGN);
+ if_block->block->next->expr1 = gfc_lval_expr_from_sym (c);
+ if_block->block->next->expr2 = gfc_get_expr ();
+ e = if_block->block->next->expr2;
+ e->expr_type = EXPR_FUNCTION;
+ e->where = gfc_current_locus;
+ if_block->block->next->expr2->ts = operation->ts;
+ gfc_get_sym_tree (operation->name, ns, &e->symtree, false);
+ e->value.function.esym = if_block->block->next->expr2->symtree->n.sym;
+ e->value.function.actual = gfc_get_actual_arglist ();
+ e->value.function.actual->expr = gfc_lval_expr_from_sym (a);
+ e->value.function.actual->next = gfc_get_actual_arglist ();
+ e->value.function.actual->next->expr = gfc_lval_expr_from_sym (b);
+
+ if_block->block->block = gfc_get_code (EXEC_IF);
+ if_block->block->block->next = gfc_get_code (EXEC_ASSIGN);
+ if_block->block->block->next->expr1 = gfc_lval_expr_from_sym (c);
+ if_block->block->block->next->expr2 = gfc_lval_expr_from_sym (a);
+
+ /* It is unexpected to have some symbols added at resolution. Commit the
+ changes in order to keep a clean state. */
+ gfc_commit_symbol (if_block->block->expr1->symtree->n.sym);
+ gfc_commit_symbol (wrapper);
+ gfc_commit_symbol (a);
+ gfc_commit_symbol (b);
+ gfc_commit_symbol (c);
+
+ gfc_find_sym_tree (name, ns, 0, &st);
+ free (name);
+
+ return st;
+}
+
+void
+gfc_resolve_reduce (gfc_expr *f, gfc_expr *array,
+ gfc_expr *operation,
+ gfc_expr *dim,
+ gfc_expr *mask,
+ gfc_expr *identity ATTRIBUTE_UNUSED,
+ gfc_expr *ordered ATTRIBUTE_UNUSED)
+{
+ gfc_symtree *wrapper_symtree;
+ gfc_typespec ts;
+
+ gfc_resolve_expr (array);
+ if (array->ts.type == BT_CHARACTER && array->ref)
+ gfc_resolve_substring_charlen (array);
+
+ f->ts = array->ts;
+
+ /* Replace 'operation' with its subroutine wrapper so that pointers may be
+ used throughout the library function. */
+ wrapper_symtree = generate_reduce_op_wrapper (operation);
+ gcc_assert (wrapper_symtree && wrapper_symtree->n.sym);
+ operation->symtree = wrapper_symtree;
+ operation->ts = operation->symtree->n.sym->ts;
+
+ /* The scalar library function converts the scalar result to a dimension
+ zero descriptor and then returns the data after the call. */
+ if (f->ts.type == BT_CHARACTER)
+ {
+ if (dim && array->rank > 1)
+ {
+ f->value.function.name = gfc_get_string (PREFIX ("reduce_c"));
+ f->rank = array->rank - 1;
+ }
+ else
+ {
+ f->value.function.name = gfc_get_string (PREFIX ("reduce_scalar_c"));
+ f->rank = 0;
+ }
+ }
+ else
+ {
+ if (dim && array->rank > 1)
+ {
+ f->value.function.name = gfc_get_string (PREFIX ("reduce"));
+ f->rank = array->rank - 1;
+ }
+ else
+ {
+ f->value.function.name = gfc_get_string (PREFIX ("reduce_scalar"));
+ f->rank = 0;
+ }
+ }
+
+ if (dim)
+ {
+ ts = dim->ts;
+ ts.kind = 4;
+ gfc_convert_type_warn (dim, &ts, 1, 0);
+ }
+
+ if (mask)
+ {
+ ts = mask->ts;
+ ts.kind = 4;
+ gfc_convert_type_warn (mask, &ts, 1, 0);
+ }
+}
+
+
void
gfc_resolve_rename (gfc_expr *f, gfc_expr *p1 ATTRIBUTE_UNUSED,
gfc_expr *p2 ATTRIBUTE_UNUSED)
diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index b9c469a..cf9318f 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -1986,7 +1986,7 @@ resolve_procedure_expression (gfc_expr* expr)
if (is_illegal_recursion (sym, gfc_current_ns))
{
if (sym->attr.use_assoc && expr->symtree->name[0] == '@')
- gfc_warning (0, "Non-RECURSIVE procedure %qs from module %qs is "
+ gfc_warning (0, "Non-RECURSIVE procedure %qs from module %qs is"
" possibly calling itself recursively in procedure %qs. "
" Declare it RECURSIVE or use %<-frecursive%>",
sym->name, sym->module, gfc_current_ns->proc_name->name);
@@ -8215,7 +8215,7 @@ resolve_locality_spec (gfc_code *code, gfc_namespace *ns)
{
if (iter->var->symtree->n.sym == sym)
{
- gfc_error ("Index variable %qs at %L cannot be specified in a"
+ gfc_error ("Index variable %qs at %L cannot be specified in a "
"locality-spec", sym->name, &expr->where);
continue;
}
diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index e9eacf2..9606131 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -10109,7 +10109,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, tree dest,
else
{
attr = &c->attr;
- if (attr->pointer)
+ if (attr->pointer || attr->proc_pointer)
continue;
}
diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index d965539..4b90b06 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -6753,6 +6753,12 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
gfc_intrinsic_sym *isym = expr && expr->rank ?
expr->value.function.isym : NULL;
+ /* In order that the library function for intrinsic REDUCE be type and kind
+ agnostic, the result is passed by reference. Allocatable components are
+ handled within the OPERATION wrapper. */
+ bool reduce_scalar = expr && !expr->rank && expr->value.function.isym
+ && expr->value.function.isym->id == GFC_ISYM_REDUCE;
+
comp = gfc_get_proc_ptr_comp (expr);
bool elemental_proc = (comp
@@ -7994,7 +8000,11 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
gfc_add_expr_to_block (&se->post, local_tmp);
}
- if (!finalized && !e->must_finalize)
+ /* Items of array expressions passed to a polymorphic formal arguments
+ create their own clean up, so prevent double free. */
+ if (!finalized && !e->must_finalize
+ && !(e->expr_type == EXPR_ARRAY && fsym
+ && fsym->ts.type == BT_CLASS))
{
bool scalar_res_outside_loop;
scalar_res_outside_loop = e->expr_type == EXPR_FUNCTION
@@ -8401,6 +8411,7 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
byref = (comp && (comp->attr.dimension
|| (comp->ts.type == BT_CHARACTER && !sym->attr.is_bind_c)))
|| (!comp && gfc_return_by_reference (sym));
+
if (byref)
{
if (se->direct_byref)
@@ -8585,6 +8596,17 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
else if (ts.type == BT_CHARACTER)
vec_safe_push (retargs, len);
}
+ else if (reduce_scalar)
+ {
+ /* In order that the library function for intrinsic REDUCE be type and
+ kind agnostic, the result is passed by reference. Allocatable
+ components are handled within the OPERATION wrapper. */
+ type = gfc_typenode_for_spec (&expr->ts);
+ result = gfc_create_var (type, "sr");
+ tmp = gfc_build_addr_expr (pvoid_type_node, result);
+ vec_safe_push (retargs, tmp);
+ }
+
gfc_free_interface_mapping (&mapping);
/* We need to glom RETARGS + ARGLIST + STRINGARGS + APPEND_ARGS. */
@@ -8769,10 +8791,12 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
/* Transformational functions of derived types with allocatable
components must have the result allocatable components copied when the
- argument is actually given. */
+ argument is actually given. This is unnecessry for REDUCE because the
+ wrapper for the OPERATION function takes care of this. */
arg = expr->value.function.actual;
if (result && arg && expr->rank
&& isym && isym->transformational
+ && isym->id != GFC_ISYM_REDUCE
&& arg->expr
&& arg->expr->ts.type == BT_DERIVED
&& arg->expr->ts.u.derived->attr.alloc_comp)
@@ -8797,6 +8821,14 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
gfc_add_expr_to_block (&se->pre, tmp);
}
}
+ else if (reduce_scalar)
+ {
+ /* Even though the REDUCE intrinsic library function returns the result
+ by reference, the scalar call passes the result as se->expr. */
+ gfc_add_expr_to_block (&se->pre, se->expr);
+ se->expr = result;
+ gfc_add_block_to_block (&se->post, &post);
+ }
else
{
/* For a function with a class array result, save the result as
diff --git a/gcc/fortran/trans-intrinsic.cc b/gcc/fortran/trans-intrinsic.cc
index 373a067..6b55017 100644
--- a/gcc/fortran/trans-intrinsic.cc
+++ b/gcc/fortran/trans-intrinsic.cc
@@ -10806,6 +10806,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
case GFC_ISYM_EOSHIFT:
case GFC_ISYM_PACK:
case GFC_ISYM_RESHAPE:
+ case GFC_ISYM_REDUCE:
/* For all of those the first argument specifies the type and the
third is optional. */
conv_generic_with_optional_char_arg (se, expr, 1, 3);
@@ -11478,6 +11479,7 @@ gfc_conv_intrinsic_function (gfc_se * se, gfc_expr * expr)
case GFC_ISYM_MCLOCK:
case GFC_ISYM_MCLOCK8:
case GFC_ISYM_RAND:
+ case GFC_ISYM_REDUCE:
case GFC_ISYM_RENAME:
case GFC_ISYM_SECOND:
case GFC_ISYM_SECNDS:
@@ -11934,6 +11936,7 @@ gfc_is_intrinsic_libcall (gfc_expr * expr)
case GFC_ISYM_FAILED_IMAGES:
case GFC_ISYM_STOPPED_IMAGES:
case GFC_ISYM_PACK:
+ case GFC_ISYM_REDUCE:
case GFC_ISYM_RESHAPE:
case GFC_ISYM_UNPACK:
/* Pass absent optional parameters. */
diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc
index d1c05d0..bf8c341 100644
--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -2790,9 +2790,6 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
case OMP_LIST_USE:
clause_code = OMP_CLAUSE_USE;
goto add_clause;
- case OMP_LIST_DESTROY:
- clause_code = OMP_CLAUSE_DESTROY;
- goto add_clause;
case OMP_LIST_INTEROP:
clause_code = OMP_CLAUSE_INTEROP;
goto add_clause;
@@ -2803,6 +2800,22 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
declare_simd);
break;
+ case OMP_LIST_DESTROY:
+ for (; n != NULL; n = n->next)
+ if (n->sym->attr.referenced)
+ {
+ tree t = gfc_trans_omp_variable (n->sym, declare_simd);
+ if (t != error_mark_node)
+ {
+ tree node
+ = build_omp_clause (input_location, OMP_CLAUSE_DESTROY);
+ OMP_CLAUSE_DECL (node) = t;
+ TREE_ADDRESSABLE (OMP_CLAUSE_DECL (node)) = 1;
+ omp_clauses = gfc_trans_add_clause (node, omp_clauses);
+ }
+ }
+ break;
+
case OMP_LIST_INIT:
{
tree pref_type = NULL_TREE;
@@ -2816,6 +2829,7 @@ gfc_trans_omp_clauses (stmtblock_t *block, gfc_omp_clauses *clauses,
tree node = build_omp_clause (input_location,
OMP_CLAUSE_INIT);
OMP_CLAUSE_DECL (node) = t;
+ TREE_ADDRESSABLE (OMP_CLAUSE_DECL (node)) = 1;
if (n->u.init.target)
OMP_CLAUSE_INIT_TARGET (node) = 1;
if (n->u.init.targetsync)
diff --git a/gcc/fortran/types.def b/gcc/fortran/types.def
index 6447cee..dd9b8df 100644
--- a/gcc/fortran/types.def
+++ b/gcc/fortran/types.def
@@ -266,6 +266,9 @@ DEF_FUNCTION_TYPE_11 (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_
BT_PTR_FN_VOID_PTR_PTR, BT_LONG, BT_LONG,
BT_UINT, BT_LONG, BT_INT,
BT_ULONGLONG, BT_ULONGLONG, BT_ULONGLONG)
+DEF_FUNCTION_TYPE_11 (BT_FN_VOID_INT_INT_PTR_PTR_PTR_INT_PTR_INT_PTR_UINT_PTR,
+ BT_VOID, BT_INT, BT_INT, BT_PTR, BT_PTR, BT_PTR, BT_INT,
+ BT_PTR, BT_INT, BT_PTR, BT_UINT, BT_PTR)
DEF_FUNCTION_TYPE_VAR_0 (BT_FN_VOID_VAR, BT_VOID)
diff --git a/gcc/gimple-low.cc b/gcc/gimple-low.cc
index 26b415c..b612970 100644
--- a/gcc/gimple-low.cc
+++ b/gcc/gimple-low.cc
@@ -747,6 +747,7 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
case GIMPLE_OMP_FOR:
case GIMPLE_OMP_SCOPE:
case GIMPLE_OMP_DISPATCH:
+ case GIMPLE_OMP_INTEROP:
case GIMPLE_OMP_SECTIONS:
case GIMPLE_OMP_SECTIONS_SWITCH:
case GIMPLE_OMP_SECTION:
diff --git a/gcc/gimple-pretty-print.cc b/gcc/gimple-pretty-print.cc
index d1531fc..4e20b4c 100644
--- a/gcc/gimple-pretty-print.cc
+++ b/gcc/gimple-pretty-print.cc
@@ -1755,6 +1755,25 @@ dump_gimple_omp_dispatch (pretty_printer *buffer, const gimple *gs, int spc,
}
}
+/* Dump a GIMPLE_OMP_INTEROP tuple on the pretty_printer BUFFER. */
+
+static void
+dump_gimple_omp_interop (pretty_printer *buffer, const gimple *gs, int spc,
+ dump_flags_t flags)
+{
+ if (flags & TDF_RAW)
+ {
+ dump_gimple_fmt (buffer, spc, flags, "%G <CLAUSES <", gs);
+ dump_omp_clauses (buffer, gimple_omp_interop_clauses (gs), spc, flags);
+ dump_gimple_fmt (buffer, spc, flags, " >");
+ }
+ else
+ {
+ pp_string (buffer, "#pragma omp interop");
+ dump_omp_clauses (buffer, gimple_omp_interop_clauses (gs), spc, flags);
+ }
+}
+
/* Dump a GIMPLE_OMP_TARGET tuple on the pretty_printer PP. */
static void
@@ -2838,6 +2857,10 @@ pp_gimple_stmt_1 (pretty_printer *pp, const gimple *gs, int spc,
dump_gimple_omp_dispatch(pp, gs, spc, flags);
break;
+ case GIMPLE_OMP_INTEROP:
+ dump_gimple_omp_interop (pp, gs, spc, flags);
+ break;
+
case GIMPLE_OMP_MASTER:
case GIMPLE_OMP_SECTION:
case GIMPLE_OMP_STRUCTURED_BLOCK:
diff --git a/gcc/gimple-ssa-sccopy.cc b/gcc/gimple-ssa-sccopy.cc
index 298feb0..ee2a7fa 100644
--- a/gcc/gimple-ssa-sccopy.cc
+++ b/gcc/gimple-ssa-sccopy.cc
@@ -582,9 +582,11 @@ scc_copy_prop::propagate ()
get removed. That means parts of CFG get removed. Those may
contain copy statements. For that reason we prune SCCs here. */
unsigned i;
- for (i = 0; i < scc.length (); i++)
+ for (i = 0; i < scc.length ();)
if (gimple_bb (scc[i]) == NULL)
scc.unordered_remove (i);
+ else
+ i++;
if (scc.is_empty ())
{
scc.release ();
diff --git a/gcc/gimple.cc b/gcc/gimple.cc
index 9a58a3a..9acfa38 100644
--- a/gcc/gimple.cc
+++ b/gcc/gimple.cc
@@ -1278,6 +1278,19 @@ gimple_build_omp_dispatch (gimple_seq body, tree clauses)
return p;
}
+/* Build a GIMPLE_OMP_INTEROP statement.
+
+ CLAUSES are any of the OMP interop construct's clauses. */
+
+gimple *
+gimple_build_omp_interop (tree clauses)
+{
+ gimple *p = gimple_alloc (GIMPLE_OMP_INTEROP, 0);
+ gimple_omp_interop_set_clauses (p, clauses);
+
+ return p;
+}
+
/* Build a GIMPLE_OMP_TARGET statement.
BODY is the sequence of statements that will be executed.
@@ -2205,6 +2218,11 @@ gimple_copy (gimple *stmt)
gimple_omp_dispatch_set_clauses (copy, t);
goto copy_omp_body;
+ case GIMPLE_OMP_INTEROP:
+ t = unshare_expr (gimple_omp_interop_clauses (stmt));
+ gimple_omp_interop_set_clauses (copy, t);
+ break;
+
case GIMPLE_OMP_TARGET:
{
gomp_target *omp_target_stmt = as_a <gomp_target *> (stmt);
diff --git a/gcc/gimple.def b/gcc/gimple.def
index 609c711..54248a8 100644
--- a/gcc/gimple.def
+++ b/gcc/gimple.def
@@ -355,6 +355,10 @@ DEFGSCODE(GIMPLE_OMP_SCOPE, "gimple_omp_scope", GSS_OMP_SINGLE_LAYOUT)
CLAUSES is an OMP_CLAUSE chain holding the associated clauses. */
DEFGSCODE(GIMPLE_OMP_DISPATCH, "gimple_omp_dispatch", GSS_OMP_SINGLE_LAYOUT)
+/* GIMPLE_OMP_INTEROP <CLAUSES> represents #pragma omp interop
+ CLAUSES is an OMP_CLAUSE chain holding the associated clauses. */
+DEFGSCODE(GIMPLE_OMP_INTEROP, "gimple_omp_interop", GSS_OMP_SINGLE_LAYOUT)
+
/* OMP_SECTION <BODY> represents #pragma omp section.
BODY is the sequence of statements in the section body. */
DEFGSCODE(GIMPLE_OMP_SECTION, "gimple_omp_section", GSS_OMP)
diff --git a/gcc/gimple.h b/gcc/gimple.h
index ecbd54c..112e5ae 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -745,7 +745,8 @@ struct GTY((tag("GSS_OMP_CONTINUE")))
};
/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_ORDERED, GIMPLE_OMP_TASKGROUP,
- GIMPLE_OMP_SCAN, GIMPLE_OMP_MASKED, GIMPLE_OMP_SCOPE, GIMPLE_OMP_DISPATCH. */
+ GIMPLE_OMP_SCAN, GIMPLE_OMP_MASKED, GIMPLE_OMP_SCOPE, GIMPLE_OMP_DISPATCH,
+ GIMPLE_OMP_INTEROP. */
struct GTY((tag("GSS_OMP_SINGLE_LAYOUT")))
gimple_statement_omp_single_layout : public gimple_statement_omp
@@ -1595,6 +1596,7 @@ gimple *gimple_build_omp_section (gimple_seq);
gimple *gimple_build_omp_structured_block (gimple_seq);
gimple *gimple_build_omp_scope (gimple_seq, tree);
gimple *gimple_build_omp_dispatch (gimple_seq, tree);
+gimple *gimple_build_omp_interop (tree);
gimple *gimple_build_omp_master (gimple_seq);
gimple *gimple_build_omp_masked (gimple_seq, tree);
gimple *gimple_build_omp_taskgroup (gimple_seq, tree);
@@ -5468,6 +5470,34 @@ gimple_omp_dispatch_set_clauses (gimple *gs, tree clauses)
static_cast<gimple_statement_omp_single_layout *> (gs)->clauses = clauses;
}
+/* Return the clauses associated with OMP_INTEROP statement GS. */
+
+inline tree
+gimple_omp_interop_clauses (const gimple *gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_INTEROP);
+ return static_cast<const gimple_statement_omp_single_layout *> (gs)->clauses;
+}
+
+/* Return a pointer to the clauses associated with OMP_INTEROP statement GS. */
+
+inline tree *
+gimple_omp_interop_clauses_ptr (gimple *gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_INTEROP);
+ return &static_cast<gimple_statement_omp_single_layout *> (gs)->clauses;
+}
+
+/* Set CLAUSES to be the clauses associated with OMP interop statement
+ GS. */
+
+inline void
+gimple_omp_interop_set_clauses (gimple *gs, tree clauses)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_INTEROP);
+ static_cast<gimple_statement_omp_single_layout *> (gs)->clauses = clauses;
+}
+
/* Return the kind of the OMP_FOR statemement G. */
inline int
@@ -6802,6 +6832,7 @@ gimple_return_set_retval (greturn *gs, tree retval)
case GIMPLE_OMP_TEAMS: \
case GIMPLE_OMP_SCOPE: \
case GIMPLE_OMP_DISPATCH: \
+ case GIMPLE_OMP_INTEROP: \
case GIMPLE_OMP_SECTION: \
case GIMPLE_OMP_STRUCTURED_BLOCK: \
case GIMPLE_OMP_MASTER: \
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index 5bdd970..354c3d6 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -2395,7 +2395,7 @@ warn_switch_unreachable_and_auto_init_r (gimple_stmt_iterator *gsi_p,
const char *var_name_str = TREE_STRING_POINTER (var_name);
warning_at (gimple_location (stmt), OPT_Wtrivial_auto_var_init,
- "%qs cannot be initialized with"
+ "%qs cannot be initialized with "
"%<-ftrivial-auto-var_init%>",
var_name_str);
break;
@@ -13853,6 +13853,9 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
case OMP_CLAUSE_IF_PRESENT:
case OMP_CLAUSE_FINALIZE:
case OMP_CLAUSE_INTEROP:
+ case OMP_CLAUSE_INIT:
+ case OMP_CLAUSE_USE:
+ case OMP_CLAUSE_DESTROY:
break;
case OMP_CLAUSE_ORDER:
@@ -18480,6 +18483,21 @@ gimplify_omp_ordered (tree expr, gimple_seq body)
return gimple_build_omp_ordered (body, OMP_ORDERED_CLAUSES (expr));
}
+/* Gimplify an OMP_INTEROP statement. */
+
+static enum gimplify_status
+gimplify_omp_interop (tree *expr_p, gimple_seq *pre_p)
+{
+ tree expr = *expr_p;
+
+ gimplify_scan_omp_clauses (&OMP_INTEROP_CLAUSES (expr), pre_p, ORT_TASK,
+ OMP_INTEROP);
+ gimple *stmt = gimple_build_omp_interop (OMP_INTEROP_CLAUSES (expr));
+ gimplify_seq_add_stmt (pre_p, stmt);
+ *expr_p = NULL_TREE;
+ return GS_ALL_DONE;
+}
+
/* Callback for walk_tree to find an IFN_GOMP_DISPATCH. */
static tree
@@ -19953,9 +19971,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
}
case OMP_INTEROP:
- sorry_at (EXPR_LOCATION (*expr_p),
- "%<#pragma omp interop%> not yet supported");
- ret = GS_ERROR;
+ ret = gimplify_omp_interop (expr_p, pre_p);
break;
case OMP_ATOMIC:
case OMP_ATOMIC_READ:
diff --git a/gcc/ipa-icf-gimple.cc b/gcc/ipa-icf-gimple.cc
index 51ca8a3..ac16986 100644
--- a/gcc/ipa-icf-gimple.cc
+++ b/gcc/ipa-icf-gimple.cc
@@ -708,7 +708,8 @@ func_checker::compare_gimple_call (gcall *s1, gcall *s2)
|| gimple_call_from_thunk_p (s1) != gimple_call_from_thunk_p (s2)
|| gimple_call_from_new_or_delete (s1) != gimple_call_from_new_or_delete (s2)
|| gimple_call_va_arg_pack_p (s1) != gimple_call_va_arg_pack_p (s2)
- || gimple_call_alloca_for_var_p (s1) != gimple_call_alloca_for_var_p (s2))
+ || gimple_call_alloca_for_var_p (s1) != gimple_call_alloca_for_var_p (s2)
+ || gimple_call_must_tail_p (s1) != gimple_call_must_tail_p (s2))
return false;
unsigned check_arg_types_from = 0;
diff --git a/gcc/ipa-split.cc b/gcc/ipa-split.cc
index ff562e2a..729fb79 100644
--- a/gcc/ipa-split.cc
+++ b/gcc/ipa-split.cc
@@ -1473,6 +1473,8 @@ split_function (basic_block return_bb, class split_point *split_point,
args_to_pass[i] = arg;
}
call = gimple_build_call_vec (node->decl, args_to_pass);
+ if (cur_node->get_fun ()->has_musttail && !add_tsan_func_exit)
+ gimple_call_set_must_tail (call, true);
gimple_set_block (call, DECL_INITIAL (current_function_decl));
args_to_pass.release ();
diff --git a/gcc/lra-constraints.cc b/gcc/lra-constraints.cc
index 0659aed..7dbc7fe 100644
--- a/gcc/lra-constraints.cc
+++ b/gcc/lra-constraints.cc
@@ -152,6 +152,9 @@ static machine_mode curr_operand_mode[MAX_RECOG_OPERANDS];
(e.g. constant) and whose subreg is given operand of the current
insn. VOIDmode in all other cases. */
static machine_mode original_subreg_reg_mode[MAX_RECOG_OPERANDS];
+/* The first call insn after curr_insn within the EBB during inherit_in_ebb
+ or NULL outside of that function. */
+static rtx_insn *first_call_insn;
@@ -6373,12 +6376,26 @@ split_reg (bool before_p, int original_regno, rtx_insn *insn,
lra_process_new_insns (as_a <rtx_insn *> (usage_insn),
after_p ? NULL : restore,
after_p ? restore : NULL,
- call_save_p
- ? "Add reg<-save" : "Add reg<-split");
- lra_process_new_insns (insn, before_p ? save : NULL,
- before_p ? NULL : save,
- call_save_p
- ? "Add save<-reg" : "Add split<-reg");
+ call_save_p ? "Add reg<-save" : "Add reg<-split");
+ if (call_save_p
+ && first_call_insn != NULL
+ && BLOCK_FOR_INSN (first_call_insn) != BLOCK_FOR_INSN (insn))
+ /* PR116028: If original_regno is a pseudo that has been assigned a
+ callee-saved hard register, then emit the spill insn before the call
+ insn 'first_call_insn' instead of adjacent to 'insn'. If 'insn'
+ and 'first_call_insn' belong to the same EBB but to two separate
+ BBs, and if 'insn' is present in the entry BB, then generating the
+ spill insn in the entry BB can prevent shrink wrap from happening.
+ This is because the spill insn references the stack pointer and
+ hence the prolog gets generated in the entry BB itself. It is
+ also more efficient to generate the spill before
+ 'first_call_insn' as the spill now occurs only in the path
+ containing the call. */
+ lra_process_new_insns (first_call_insn, save, NULL, "Add save<-reg");
+ else
+ lra_process_new_insns (insn, before_p ? save : NULL,
+ before_p ? NULL : save,
+ call_save_p ? "Add save<-reg" : "Add split<-reg");
if (nregs > 1 || original_regno < FIRST_PSEUDO_REGISTER)
/* If we are trying to split multi-register. We should check
conflicts on the next assignment sub-pass. IRA can allocate on
@@ -6484,7 +6501,7 @@ split_if_necessary (int regno, machine_mode mode,
&& (INSN_UID (XEXP (next_usage_insns, 0)) < max_uid)))
&& need_for_split_p (potential_reload_hard_regs, regno + i)
&& split_reg (before_p, regno + i, insn, next_usage_insns, NULL))
- res = true;
+ res = true;
return res;
}
@@ -7074,6 +7091,7 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail)
last_call_for_abi[callee_abi.id ()] = calls_num;
full_and_partial_call_clobbers
|= callee_abi.full_and_partial_reg_clobbers ();
+ first_call_insn = curr_insn;
if ((cheap = find_reg_note (curr_insn,
REG_RETURNED, NULL_RTX)) != NULL_RTX
&& ((cheap = XEXP (cheap, 0)), true)
@@ -7142,6 +7160,7 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail)
{
bool before_p;
rtx_insn *use_insn = curr_insn;
+ rtx_insn *prev_insn = PREV_INSN (curr_insn);
before_p = (JUMP_P (curr_insn)
|| (CALL_P (curr_insn) && reg->type == OP_IN));
@@ -7156,7 +7175,7 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail)
change_p = true;
/* Invalidate. */
usage_insns[src_regno].check = 0;
- if (before_p)
+ if (before_p && PREV_INSN (curr_insn) != prev_insn)
use_insn = PREV_INSN (curr_insn);
}
if (NONDEBUG_INSN_P (curr_insn))
@@ -7278,6 +7297,7 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail)
}
}
}
+ first_call_insn = NULL;
return change_p;
}
diff --git a/gcc/m2/ChangeLog b/gcc/m2/ChangeLog
index 694b062..7757158 100644
--- a/gcc/m2/ChangeLog
+++ b/gcc/m2/ChangeLog
@@ -1,3 +1,32 @@
+2025-03-20 Gaius Mulley <gaiusmod2@gmail.com>
+
+ PR modula2/118600
+ * gm2-compiler/M2GenGCC.mod (PerformCodeBecomes): New procedure.
+ (CodeBecomes): Refactor and call PerformCodeBecomes.
+ * gm2-gcc/m2builtins.cc (gm2_strncpy_node): New global variable.
+ (DoBuiltinStrNCopy): New function.
+ (m2builtins_BuiltinStrNCopy): New function.
+ (m2builtins_init): Initialize gm2_strncpy_node.
+ * gm2-gcc/m2builtins.def (BuiltinStrNCopy): New procedure
+ function.
+ * gm2-gcc/m2builtins.h (m2builtins_BuiltinStrNCopy): New
+ function.
+ * gm2-gcc/m2statement.cc (copy_record_fields): New function.
+ (copy_array): Ditto.
+ (copy_strncpy): Ditto.
+ (copy_memcpy): Ditto.
+ (CopyByField_Lower): Ditto.
+ (m2statement_CopyByField): Ditto.
+ * gm2-gcc/m2statement.def (CopyByField): New procedure function.
+ * gm2-gcc/m2statement.h (m2statement_CopyByField): New function.
+ * gm2-gcc/m2type.cc (check_record_fields): Ditto.
+ (check_array_types): Ditto.
+ (m2type_IsGccStrictTypeEquivalent): Ditto.
+ * gm2-gcc/m2type.def (IsGccStrictTypeEquivalent): New procedure
+ function.
+ * gm2-gcc/m2type.h (m2type_IsAddress): Replace return type int
+ with bool.
+
2025-03-16 Gaius Mulley <gaiusmod2@gmail.com>
PR modula2/115111
diff --git a/gcc/m2/gm2-compiler/M2GenGCC.mod b/gcc/m2/gm2-compiler/M2GenGCC.mod
index ec38dc2..3665751 100644
--- a/gcc/m2/gm2-compiler/M2GenGCC.mod
+++ b/gcc/m2/gm2-compiler/M2GenGCC.mod
@@ -43,7 +43,7 @@ FROM SymbolTable IMPORT PushSize, PopSize, PushValue, PopValue,
IsConst, IsConstSet, IsProcedure, IsProcType,
IsVar, IsVarParamAny, IsTemporary, IsTuple,
IsEnumeration,
- IsUnbounded, IsArray, IsSet, IsConstructor,
+ IsUnbounded, IsArray, IsSet, IsConstructor, IsConstructorConstant,
IsProcedureVariable,
IsUnboundedParamAny,
IsRecordField, IsFieldVarient, IsVarient, IsRecord,
@@ -232,7 +232,7 @@ FROM m2statement IMPORT BuildAsm, BuildProcedureCallTree, BuildParam, BuildFunct
BuildReturnValueCode, SetLastFunction,
BuildIncludeVarConst, BuildIncludeVarVar,
BuildExcludeVarConst, BuildExcludeVarVar,
- BuildBuiltinCallTree,
+ BuildBuiltinCallTree, CopyByField,
GetParamTree, BuildCleanUp,
BuildTryFinally,
GetLastFunction, SetLastFunction,
@@ -241,7 +241,7 @@ FROM m2statement IMPORT BuildAsm, BuildProcedureCallTree, BuildParam, BuildFunct
FROM m2type IMPORT ChainOnParamValue, GetPointerType, GetIntegerType, AddStatement,
GetCardinalType, GetWordType, GetM2ZType, GetM2RType, GetM2CType,
BuildCharConstant, AddStringToTreeList, BuildArrayStringConstructor,
- GetArrayNoOfElements, GetTreeType ;
+ GetArrayNoOfElements, GetTreeType, IsGccStrictTypeEquivalent ;
FROM m2block IMPORT RememberConstant, pushGlobalScope, popGlobalScope, finishFunctionDecl,
pushFunctionScope, popFunctionScope,
@@ -3498,6 +3498,29 @@ END checkDeclare ;
(*
+ PerformCodeBecomes -
+*)
+
+PROCEDURE PerformCodeBecomes (location: location_t;
+ virtpos: CARDINAL; des, expr: CARDINAL) ;
+VAR
+ destree, exprtree: tree ;
+BEGIN
+ destree := Mod2Gcc (des) ;
+ exprtree := FoldConstBecomes (virtpos, des, expr) ;
+ IF IsVar (des) AND IsVariableSSA (des)
+ THEN
+ Replace (des, exprtree)
+ ELSIF IsGccStrictTypeEquivalent (destree, exprtree)
+ THEN
+ BuildAssignmentStatement (location, destree, exprtree)
+ ELSE
+ CopyByField (location, destree, exprtree)
+ END
+END PerformCodeBecomes ;
+
+
+(*
------------------------------------------------------------------------------
:= Operator
------------------------------------------------------------------------------
@@ -3576,14 +3599,7 @@ BEGIN
ELSE
IF checkBecomes (des, expr, virtpos, despos, exprpos)
THEN
- IF IsVar (des) AND IsVariableSSA (des)
- THEN
- Replace (des, FoldConstBecomes (virtpos, des, expr))
- ELSE
- BuildAssignmentStatement (location,
- Mod2Gcc (des),
- FoldConstBecomes (virtpos, des, expr))
- END
+ PerformCodeBecomes (location, virtpos, des, expr)
ELSE
SubQuad (quad) (* We don't want multiple errors for the quad. *)
END
diff --git a/gcc/m2/gm2-gcc/m2builtins.cc b/gcc/m2/gm2-gcc/m2builtins.cc
index 175c62a..cb9ef65 100644
--- a/gcc/m2/gm2-gcc/m2builtins.cc
+++ b/gcc/m2/gm2-gcc/m2builtins.cc
@@ -418,6 +418,7 @@ static GTY (()) tree ldouble_ftype_ldouble;
static GTY (()) tree gm2_alloca_node;
static GTY (()) tree gm2_memcpy_node;
static GTY (()) tree gm2_memset_node;
+static GTY (()) tree gm2_strncpy_node;
static GTY (()) tree gm2_isfinite_node;
static GTY (()) tree gm2_isnan_node;
static GTY (()) tree gm2_huge_valf_node;
@@ -1040,6 +1041,18 @@ DoBuiltinMemCopy (location_t location, tree dest, tree src, tree bytes)
}
static tree
+DoBuiltinStrNCopy (location_t location, tree dest, tree src, tree bytes)
+{
+ tree functype = TREE_TYPE (gm2_strncpy_node);
+ tree rettype = TREE_TYPE (functype);
+ tree funcptr
+ = build1 (ADDR_EXPR, build_pointer_type (functype), gm2_strncpy_node);
+ tree call
+ = m2treelib_DoCall3 (location, rettype, funcptr, dest, src, bytes);
+ return call;
+}
+
+static tree
DoBuiltinAlloca (location_t location, tree bytes)
{
tree functype = TREE_TYPE (gm2_alloca_node);
@@ -1105,6 +1118,14 @@ m2builtins_BuiltInHugeValLong (location_t location)
return call;
}
+/* BuiltinStrNCopy copy at most n chars from address src to dest. */
+
+tree
+m2builtins_BuiltinStrNCopy (location_t location, tree dest, tree src, tree n)
+{
+ return DoBuiltinStrNCopy (location, dest, src, n);
+}
+
static void
create_function_prototype (location_t location,
struct builtin_function_entry *fe)
@@ -1580,6 +1601,7 @@ m2builtins_init (location_t location)
gm2_alloca_node = find_builtin_tree ("__builtin_alloca");
gm2_memcpy_node = find_builtin_tree ("__builtin_memcpy");
gm2_memset_node = find_builtin_tree ("__builtin_memset");
+ gm2_strncpy_node = find_builtin_tree ("__builtin_strncpy");
gm2_huge_valf_node = find_builtin_tree ("__builtin_huge_valf");
gm2_huge_val_node = find_builtin_tree ("__builtin_huge_val");
gm2_huge_vall_node = find_builtin_tree ("__builtin_huge_vall");
diff --git a/gcc/m2/gm2-gcc/m2builtins.def b/gcc/m2/gm2-gcc/m2builtins.def
index 61f769d..5ab5a6d 100644
--- a/gcc/m2/gm2-gcc/m2builtins.def
+++ b/gcc/m2/gm2-gcc/m2builtins.def
@@ -24,12 +24,6 @@ DEFINITION MODULE FOR "C" m2builtins ;
FROM CDataTypes IMPORT CharStar, ConstCharStar ;
FROM gcctypes IMPORT location_t, tree ;
-EXPORT QUALIFIED GetBuiltinConst, GetBuiltinConstType,
- GetBuiltinTypeInfoType, GetBuiltinTypeInfo,
- BuiltinExists, BuildBuiltinTree,
- BuiltinMemCopy, BuiltinMemSet, BuiltInAlloca,
- BuiltInIsfinite ;
-
(*
GetBuiltinConst - returns the gcc tree of a built in constant, name.
@@ -124,4 +118,11 @@ PROCEDURE BuiltInAlloca (location: location_t; n: tree) : tree ;
PROCEDURE BuiltInIsfinite (location: location_t; e: tree) : tree ;
+(*
+ BuiltinStrNCopy - copy at most n characters from src to dest.
+*)
+
+PROCEDURE BuiltinStrNCopy (location: location_t; dest, src, n: tree) : tree ;
+
+
END m2builtins.
diff --git a/gcc/m2/gm2-gcc/m2builtins.h b/gcc/m2/gm2-gcc/m2builtins.h
index 37bdbfa..017d2df 100644
--- a/gcc/m2/gm2-gcc/m2builtins.h
+++ b/gcc/m2/gm2-gcc/m2builtins.h
@@ -54,6 +54,8 @@ EXTERN tree m2builtins_BuildBuiltinTree (location_t location, char *name);
EXTERN tree m2builtins_BuiltInHugeVal (location_t location);
EXTERN tree m2builtins_BuiltInHugeValShort (location_t location);
EXTERN tree m2builtins_BuiltInHugeValLong (location_t location);
+EXTERN tree m2builtins_BuiltinStrNCopy (location_t location, tree dest, tree src, tree n);
+
EXTERN void m2builtins_init (location_t location);
#undef EXTERN
diff --git a/gcc/m2/gm2-gcc/m2statement.cc b/gcc/m2/gm2-gcc/m2statement.cc
index d42183f..7952984 100644
--- a/gcc/m2/gm2-gcc/m2statement.cc
+++ b/gcc/m2/gm2-gcc/m2statement.cc
@@ -36,6 +36,7 @@ along with GNU Modula-2; see the file COPYING3. If not see
#include "m2treelib.h"
#include "m2type.h"
#include "m2convert.h"
+#include "m2builtins.h"
#include "m2pp.h"
static GTY (()) tree param_list = NULL_TREE; /* Ready for the next time we
@@ -154,6 +155,120 @@ m2statement_SetEndLocation (location_t location)
cfun->function_end_locus = location;
}
+/* copy_record_fields copy each record field from right to left. */
+
+static
+void
+copy_record_fields (location_t location, tree left, tree right)
+{
+ unsigned int i;
+ tree right_value;
+ tree left_type = TREE_TYPE (left);
+ vec<constructor_elt, va_gc> *values = CONSTRUCTOR_ELTS (right);
+ FOR_EACH_CONSTRUCTOR_VALUE (values, i, right_value)
+ {
+ tree left_field = m2treelib_get_field_no (left_type, NULL_TREE, false, i);
+ tree left_ref = m2expr_BuildComponentRef (location, left, left_field);
+ m2statement_CopyByField (location, left_ref, right_value);
+ }
+}
+
+/* copy_array copy each element of an array from array right to array left. */
+
+static
+void
+copy_array (location_t location, tree left, tree right)
+{
+ unsigned int i;
+ tree value;
+ vec<constructor_elt, va_gc> *values = CONSTRUCTOR_ELTS (right);
+ tree array_type = TREE_TYPE (left);
+ tree index_type = TYPE_DOMAIN (array_type);
+ tree elt_type = TREE_TYPE (array_type);
+ tree low_indice = TYPE_MIN_VALUE (index_type);
+ low_indice
+ = m2convert_BuildConvert (location, index_type, low_indice, false);
+ FOR_EACH_CONSTRUCTOR_VALUE (values, i, value)
+ {
+ tree idx = m2decl_BuildIntegerConstant (i);
+ idx = m2convert_BuildConvert (location, index_type, idx, false);
+ tree array_ref = build4_loc (location, ARRAY_REF, elt_type, left,
+ idx, low_indice, NULL_TREE);
+ m2statement_CopyByField (location, array_ref, value);
+ }
+}
+
+/* copy_array cst into left using strncpy. */
+
+static
+void
+copy_strncpy (location_t location, tree left, tree cst)
+{
+ tree result = m2builtins_BuiltinStrNCopy (location,
+ m2expr_BuildAddr (location, left, false),
+ m2expr_BuildAddr (location, cst, false),
+ m2decl_BuildIntegerConstant (m2expr_StringLength (cst)));
+ TREE_SIDE_EFFECTS (result) = true;
+ TREE_USED (left) = true;
+ TREE_USED (cst) = true;
+ add_stmt (location, result);
+}
+
+/* copy_memcpy copy right into left using builtin_memcpy. */
+
+static
+void
+copy_memcpy (location_t location, tree left, tree right)
+{
+ tree result = m2builtins_BuiltinMemCopy (location,
+ m2expr_BuildAddr (location, left, false),
+ m2expr_BuildAddr (location, right, false),
+ m2expr_GetSizeOf (location, left));
+ TREE_SIDE_EFFECTS (result) = true;
+ TREE_USED (left) = true;
+ TREE_USED (right) = true;
+ add_stmt (location, result);
+}
+
+/* CopyByField_Lower copy right to left using memcpy for unions,
+ strncpy for string cst, field assignment for records,
+ array element assignment for array constructors. For all
+ other types it uses BuildAssignmentStatement. */
+
+static
+void
+CopyByField_Lower (location_t location,
+ tree left, tree right)
+{
+ tree left_type = TREE_TYPE (left);
+ enum tree_code right_code = TREE_CODE (right);
+ enum tree_code left_code = TREE_CODE (left_type);
+
+ if (left_code == RECORD_TYPE && right_code == CONSTRUCTOR)
+ copy_record_fields (location, left, right);
+ else if (left_code == ARRAY_TYPE && right_code == CONSTRUCTOR)
+ copy_array (location, left, right);
+ else if (left_code == UNION_TYPE && right_code == CONSTRUCTOR)
+ copy_memcpy (location, left, right);
+ else if (right_code == STRING_CST)
+ copy_strncpy (location, left, right);
+ else
+ m2statement_BuildAssignmentStatement (location, left, right);
+}
+
+/* CopyByField recursively checks each field to ensure GCC
+ type equivalence and if so it uses assignment.
+ Otherwise use strncpy or memcpy depending upon type. */
+
+void
+m2statement_CopyByField (location_t location, tree des, tree expr)
+{
+ if (m2type_IsGccStrictTypeEquivalent (des, expr))
+ m2statement_BuildAssignmentStatement (location, des, expr);
+ else
+ CopyByField_Lower (location, des, expr);
+}
+
/* BuildAssignmentTree builds the assignment of, des, and, expr.
It returns, des. */
diff --git a/gcc/m2/gm2-gcc/m2statement.def b/gcc/m2/gm2-gcc/m2statement.def
index 074b768..ffaf697 100644
--- a/gcc/m2/gm2-gcc/m2statement.def
+++ b/gcc/m2/gm2-gcc/m2statement.def
@@ -314,4 +314,16 @@ PROCEDURE SetEndLocation (location: location_t) ;
PROCEDURE BuildBuiltinCallTree (func: tree) : tree ;
+(*
+ CopyByField - copy expr to des, if des is a record, union or an array
+ then check fields for GCC type equivalence and if necessary
+ call __builtin_strncpy and __builtin_memcpy.
+ This can occur if an expr contains a constant string
+ which is to be assigned into a field declared as
+ an ARRAY [0..n] OF CHAR.
+*)
+
+PROCEDURE CopyByField (location: location_t; des, expr: tree) ;
+
+
END m2statement.
diff --git a/gcc/m2/gm2-gcc/m2statement.h b/gcc/m2/gm2-gcc/m2statement.h
index db2daf3..0076b32 100644
--- a/gcc/m2/gm2-gcc/m2statement.h
+++ b/gcc/m2/gm2-gcc/m2statement.h
@@ -108,6 +108,7 @@ EXTERN tree m2statement_BuildBuiltinCallTree (tree func);
EXTERN tree m2statement_BuildTryFinally (location_t location, tree call,
tree cleanups);
EXTERN tree m2statement_BuildCleanUp (tree param);
+EXTERN void m2statement_CopyByField (location_t location, tree des, tree expr);
#undef EXTERN
#endif /* m2statement_h. */
diff --git a/gcc/m2/gm2-gcc/m2type.cc b/gcc/m2/gm2-gcc/m2type.cc
index a946509..e82857d 100644
--- a/gcc/m2/gm2-gcc/m2type.cc
+++ b/gcc/m2/gm2-gcc/m2type.cc
@@ -3105,10 +3105,68 @@ m2type_gm2_signed_or_unsigned_type (int unsignedp, tree type)
/* IsAddress returns true if the type is an ADDRESS. */
-int
+bool
m2type_IsAddress (tree type)
{
return type == ptr_type_node;
}
+/* check_record_fields return true if all the fields in left and right
+ are GCC equivalent. */
+
+static
+bool
+check_record_fields (tree left, tree right)
+{
+ unsigned int i;
+ tree right_value;
+ vec<constructor_elt, va_gc> *values = CONSTRUCTOR_ELTS (right);
+ FOR_EACH_CONSTRUCTOR_VALUE (values, i, right_value)
+ {
+ tree left_field = TREE_TYPE (m2treelib_get_field_no (left, NULL_TREE, false, i));
+ if (! m2type_IsGccStrictTypeEquivalent (left_field, right_value))
+ return false;
+ }
+ return true;
+}
+
+/* check_array_types return true if left and right have the same type and right
+ is not a CST_STRING. */
+
+static
+bool
+check_array_types (tree right)
+{
+ unsigned int i;
+ tree value;
+ vec<constructor_elt, va_gc> *values = CONSTRUCTOR_ELTS (right);
+ FOR_EACH_CONSTRUCTOR_VALUE (values, i, value)
+ {
+ enum tree_code right_code = TREE_CODE (value);
+ if (right_code == STRING_CST)
+ return false;
+ }
+ return true;
+}
+
+bool
+m2type_IsGccStrictTypeEquivalent (tree left, tree right)
+{
+ enum tree_code right_code = TREE_CODE (right);
+ enum tree_code left_code = TREE_CODE (left);
+ if (left_code == VAR_DECL)
+ return m2type_IsGccStrictTypeEquivalent (TREE_TYPE (left), right);
+ if (right_code == VAR_DECL)
+ return m2type_IsGccStrictTypeEquivalent (left, TREE_TYPE (right));
+ if (left_code == RECORD_TYPE && right_code == CONSTRUCTOR)
+ return check_record_fields (left, right);
+ if (left_code == UNION_TYPE && right_code == CONSTRUCTOR)
+ return false;
+ if (left_code == ARRAY_TYPE && right_code == CONSTRUCTOR)
+ return check_array_types (right);
+ if (right_code == STRING_CST)
+ return false;
+ return true;
+}
+
#include "gt-m2-m2type.h"
diff --git a/gcc/m2/gm2-gcc/m2type.def b/gcc/m2/gm2-gcc/m2type.def
index 797335e..f74888e 100644
--- a/gcc/m2/gm2-gcc/m2type.def
+++ b/gcc/m2/gm2-gcc/m2type.def
@@ -996,4 +996,12 @@ PROCEDURE IsAddress (type: tree) : BOOLEAN ;
PROCEDURE SameRealType (a, b: tree) : BOOLEAN ;
+(*
+ IsGccStrictTypeEquivalent - return true if left and right and
+ all their contents have the same type.
+*)
+
+PROCEDURE IsGccStrictTypeEquivalent (left, right: tree) : BOOLEAN ;
+
+
END m2type.
diff --git a/gcc/m2/gm2-gcc/m2type.h b/gcc/m2/gm2-gcc/m2type.h
index 04370d6..663af3c 100644
--- a/gcc/m2/gm2-gcc/m2type.h
+++ b/gcc/m2/gm2-gcc/m2type.h
@@ -210,10 +210,10 @@ EXTERN tree m2type_gm2_type_for_size (unsigned int bits, int unsignedp);
EXTERN tree m2type_BuildProcTypeParameterDeclaration (location_t location,
tree type,
bool isreference);
-EXTERN int m2type_IsAddress (tree type);
+EXTERN bool m2type_IsAddress (tree type);
EXTERN tree m2type_GetCardinalAddressType (void);
EXTERN bool m2type_SameRealType (tree a, tree b);
-
+EXTERN bool m2type_IsGccStrictTypeEquivalent (tree left, tree right);
#undef EXTERN
#endif /* m2type_h */
diff --git a/gcc/multiple_target.cc b/gcc/multiple_target.cc
index d8becf4..d25277c 100644
--- a/gcc/multiple_target.cc
+++ b/gcc/multiple_target.cc
@@ -155,7 +155,11 @@ create_dispatcher_calls (struct cgraph_node *node)
symtab_node *source = ref->referring;
source->create_reference (inode, IPA_REF_ALIAS);
if (inode->get_comdat_group ())
- source->add_to_same_comdat_group (inode);
+ {
+ if (source->same_comdat_group)
+ source->remove_from_same_comdat_group ();
+ source->add_to_same_comdat_group (inode);
+ }
}
else
gcc_unreachable ();
diff --git a/gcc/omp-builtins.def b/gcc/omp-builtins.def
index 96de707..f73fb7b 100644
--- a/gcc/omp-builtins.def
+++ b/gcc/omp-builtins.def
@@ -402,6 +402,9 @@ DEF_GOMP_BUILTIN (BUILT_IN_GOMP_DOACROSS_ULL_POST, "GOMP_doacross_ull_post",
BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_DOACROSS_ULL_WAIT, "GOMP_doacross_ull_wait",
BT_FN_VOID_ULL_VAR, ATTR_NOTHROW_LEAF_LIST)
+DEF_GOMP_BUILTIN (BUILT_IN_GOMP_INTEROP, "GOMP_interop",
+ BT_FN_VOID_INT_INT_PTR_PTR_PTR_INT_PTR_INT_PTR_UINT_PTR,
+ ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL, "GOMP_parallel",
BT_FN_VOID_OMPFN_PTR_UINT_UINT, ATTR_NOTHROW_LIST)
DEF_GOMP_BUILTIN (BUILT_IN_GOMP_PARALLEL_REDUCTIONS,
diff --git a/gcc/omp-low.cc b/gcc/omp-low.cc
index c36ae38..e369df6 100644
--- a/gcc/omp-low.cc
+++ b/gcc/omp-low.cc
@@ -1790,6 +1790,11 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
install_var_local (decl, ctx);
break;
+ case OMP_CLAUSE_INIT:
+ case OMP_CLAUSE_USE:
+ case OMP_CLAUSE_DESTROY:
+ break;
+
case OMP_CLAUSE__CACHE_:
case OMP_CLAUSE_NOHOST:
default:
@@ -1986,6 +1991,9 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
case OMP_CLAUSE_FINALIZE:
case OMP_CLAUSE_FILTER:
case OMP_CLAUSE__CONDTEMP_:
+ case OMP_CLAUSE_INIT:
+ case OMP_CLAUSE_USE:
+ case OMP_CLAUSE_DESTROY:
break;
case OMP_CLAUSE__CACHE_:
@@ -4211,6 +4219,10 @@ scan_omp_1_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
scan_omp (gimple_omp_body_ptr (stmt), ctx);
break;
+ case GIMPLE_OMP_INTEROP:
+ ctx = new_omp_context (stmt, ctx);
+ break;
+
case GIMPLE_OMP_SECTIONS:
scan_omp_sections (as_a <gomp_sections *> (stmt), ctx);
break;
@@ -14331,6 +14343,222 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
}
}
+/* Generate code to implement the action-clauses (destroy, init, use) of an
+ OpenMP interop construct. */
+
+static void
+lower_omp_interop_action_clauses (gimple_seq *seq, vec<tree> &objs,
+ vec<tree> *interop_types = NULL,
+ vec<tree> *prefer_types = NULL)
+{
+ if (objs.length () == 0)
+ return;
+
+ enum omp_clause_code action = OMP_CLAUSE_CODE (objs[0]);
+ if (action == OMP_CLAUSE_INIT)
+ gcc_checking_assert (objs.length () == interop_types->length ()
+ && objs.length () == prefer_types->length ());
+ else
+ gcc_assert (prefer_types == NULL && interop_types == NULL);
+
+ tree ret_objs = NULL_TREE, ret_interop_types = NULL_TREE,
+ ret_prefer_types = NULL_TREE;
+
+ /* Build an array of interop objects. */
+
+ tree type_obj_pref = build_array_type_nelts (ptr_type_node, objs.length ());
+ ret_objs = create_tmp_var (type_obj_pref, "interopobjs");
+
+ bool have_pref_type = false;
+ if (action == OMP_CLAUSE_INIT)
+ {
+ for (tree pref_type : prefer_types)
+ if (pref_type != NULL_TREE)
+ {
+ have_pref_type = true;
+ break;
+ }
+ tree type_tgtsync
+ = build_array_type_nelts (integer_type_node, objs.length ());
+ ret_interop_types = create_tmp_var (type_tgtsync, "tgt_tgtsync");
+ if (have_pref_type)
+ ret_prefer_types = create_tmp_var (type_obj_pref, "pref_type");
+ else
+ {
+ ret_prefer_types = null_pointer_node;
+ prefer_types->truncate (0);
+ }
+ }
+
+ for (size_t i = 0; !objs.is_empty (); i++)
+ {
+ tree offset = build_int_cst (integer_type_node, i);
+ tree init = build4 (ARRAY_REF, ptr_type_node, ret_objs, offset, NULL_TREE,
+ NULL_TREE);
+ tree obj = OMP_CLAUSE_DECL (objs.pop ());
+ if (TREE_CODE (TREE_TYPE (obj)) == REFERENCE_TYPE)
+ obj = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (obj)), obj);
+ if (action != OMP_CLAUSE_USE
+ && TREE_CODE (TREE_TYPE (obj)) != POINTER_TYPE)
+ /* For modifying actions, we need a pointer. */
+ obj = build_fold_addr_expr (obj);
+ else if (action == OMP_CLAUSE_USE
+ && TREE_CODE (TREE_TYPE (obj)) == POINTER_TYPE)
+ /* For use action, we need the value. */
+ obj = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (obj)), obj);
+ init = build2 (MODIFY_EXPR, ptr_type_node, init,
+ fold_convert (ptr_type_node, obj));
+ gimplify_and_add (init, seq);
+
+ if (action == OMP_CLAUSE_INIT)
+ {
+ init = build4 (ARRAY_REF, integer_type_node, ret_interop_types,
+ offset, NULL_TREE, NULL_TREE);
+ init = build2 (MODIFY_EXPR, integer_type_node, init,
+ interop_types->pop ());
+ gimplify_and_add (init, seq);
+
+ if (have_pref_type)
+ {
+ tree prefer_type = prefer_types->pop ();
+ tree pref = (prefer_type == NULL_TREE
+ ? null_pointer_node
+ : build_fold_addr_expr (prefer_type));
+ init = build4 (ARRAY_REF, ptr_type_node, ret_prefer_types, offset,
+ NULL_TREE, NULL_TREE);
+ init = build2 (MODIFY_EXPR, ptr_type_node, init, pref);
+ gimplify_and_add (init, seq);
+ }
+ }
+ }
+ if (action == OMP_CLAUSE_INIT)
+ {
+ if (have_pref_type)
+ ret_prefer_types = build_fold_addr_expr (ret_prefer_types);
+ ret_interop_types = build_fold_addr_expr (ret_interop_types);
+ }
+ ret_objs = build_fold_addr_expr (ret_objs);
+
+ gcc_assert (objs.is_empty ()
+ && (!interop_types || interop_types->is_empty ())
+ && (!prefer_types || prefer_types->is_empty ()));
+
+ objs.safe_push (ret_objs);
+ if (action == OMP_CLAUSE_INIT)
+ {
+ interop_types->safe_push (ret_interop_types);
+ prefer_types->safe_push (ret_prefer_types);
+ }
+}
+
+/* Lower code for an OpenMP interop directive. */
+
+static void
+lower_omp_interop (gimple_stmt_iterator *gsi_p, omp_context *ctx)
+{
+ push_gimplify_context ();
+
+ tree block = make_node (BLOCK);
+ gbind *bind = gimple_build_bind (NULL, NULL, block);
+ gimple_seq bind_body = NULL;
+
+ /* Emit call to GOMP_interop:
+ void
+ GOMP_interop (int device_num, int n_init, omp_interop_t **init,
+ const void *target_targetsync, const void *prefer_type,
+ int n_use, omp_interop_t *use, int n_destroy,
+ omp_interop_t **destroy, unsigned int flags,
+ void **depend) */
+
+ tree flags = NULL_TREE;
+ tree depend = null_pointer_node;
+ tree device_num = NULL_TREE;
+
+ auto_vec<tree> init_objs, use_objs, destroy_objs, prefer_type,
+ target_targetsync;
+ gimple_seq dep_ilist = NULL, dep_olist = NULL;
+ tree clauses = gimple_omp_interop_clauses (gsi_stmt (*gsi_p));
+ for (tree c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
+ {
+ switch (OMP_CLAUSE_CODE (c))
+ {
+ case OMP_CLAUSE_INIT:
+ {
+ init_objs.safe_push (c);
+ int target_targetsync_bits = 0;
+ if (OMP_CLAUSE_INIT_TARGET (c))
+ target_targetsync_bits |= GOMP_INTEROP_TARGET;
+ if (OMP_CLAUSE_INIT_TARGETSYNC (c))
+ target_targetsync_bits |= GOMP_INTEROP_TARGETSYNC;
+ tree t = build_int_cst (integer_type_node, target_targetsync_bits);
+ target_targetsync.safe_push (t);
+ prefer_type.safe_push (OMP_CLAUSE_INIT_PREFER_TYPE (c));
+ }
+ break;
+ case OMP_CLAUSE_USE:
+ use_objs.safe_push (c);
+ break;
+ case OMP_CLAUSE_DESTROY:
+ destroy_objs.safe_push (c);
+ break;
+ case OMP_CLAUSE_NOWAIT:
+ flags = build_int_cst (integer_type_node, GOMP_INTEROP_FLAG_NOWAIT);
+ break;
+ case OMP_CLAUSE_DEPEND:
+ {
+ tree *cp = gimple_omp_interop_clauses_ptr (gsi_stmt (*gsi_p));
+ lower_depend_clauses (cp, &dep_ilist, &dep_olist);
+ depend = OMP_CLAUSE_DECL (*cp);
+ }
+ break;
+ case OMP_CLAUSE_DEVICE:
+ device_num = OMP_CLAUSE_DEVICE_ID (c);
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ }
+
+ if (flags == NULL_TREE)
+ flags = build_int_cst (integer_type_node, 0);
+
+ if (device_num == NULL_TREE)
+ device_num = build_int_cst (integer_type_node, GOMP_DEVICE_DEFAULT_OMP_61);
+
+ tree n_init = build_int_cst (integer_type_node, init_objs.length ());
+ tree n_use = build_int_cst (integer_type_node, use_objs.length ());
+ tree n_destroy = build_int_cst (integer_type_node, destroy_objs.length ());
+
+ lower_omp_interop_action_clauses (&bind_body, init_objs, &target_targetsync,
+ &prefer_type);
+ lower_omp_interop_action_clauses (&bind_body, use_objs);
+ lower_omp_interop_action_clauses (&bind_body, destroy_objs);
+
+ gimple_seq_add_seq (&bind_body, dep_ilist);
+ tree fn = builtin_decl_explicit (BUILT_IN_GOMP_INTEROP);
+ tree init_arg = init_objs.length () ? init_objs.pop () : null_pointer_node;
+ tree target_targetsync_arg = target_targetsync.length ()
+ ? target_targetsync.pop ()
+ : null_pointer_node;
+ tree prefer_type_arg
+ = prefer_type.length () ? prefer_type.pop () : null_pointer_node;
+ tree use_arg = use_objs.length () ? use_objs.pop () : null_pointer_node;
+ tree destroy_arg
+ = destroy_objs.length () ? destroy_objs.pop () : null_pointer_node;
+ gcall *call
+ = gimple_build_call (fn, 11, device_num, n_init, init_arg,
+ target_targetsync_arg, prefer_type_arg, n_use, use_arg,
+ n_destroy, destroy_arg, flags, depend);
+ gimple_seq_add_stmt (&bind_body, call);
+ gimple_seq_add_seq (&bind_body, dep_olist);
+
+ gsi_replace (gsi_p, bind, true);
+ gimple_bind_set_body (bind, bind_body);
+ pop_gimplify_context (bind);
+ gimple_bind_append_vars (bind, ctx->block_vars);
+ BLOCK_VARS (block) = ctx->block_vars;
+}
+
/* Expand code for an OpenMP teams directive. */
static void
@@ -14614,6 +14842,11 @@ lower_omp_1 (gimple_stmt_iterator *gsi_p, omp_context *ctx)
gcc_assert (ctx);
lower_omp_dispatch (gsi_p, ctx);
break;
+ case GIMPLE_OMP_INTEROP:
+ ctx = maybe_lookup_ctx (stmt);
+ gcc_assert (ctx);
+ lower_omp_interop (gsi_p, ctx);
+ break;
case GIMPLE_OMP_SINGLE:
ctx = maybe_lookup_ctx (stmt);
gcc_assert (ctx);
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index b1ca181..1fd7f51 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,11 @@
+2025-03-21 Joseph Myers <josmyers@redhat.com>
+
+ * de.po, fr.po: Update.
+
+2025-03-20 Joseph Myers <josmyers@redhat.com>
+
+ * hr.po: Update.
+
2025-03-19 Joseph Myers <josmyers@redhat.com>
* fr.po: Update.
diff --git a/gcc/po/de.po b/gcc/po/de.po
index a9179c5..dfa67d0 100644
--- a/gcc/po/de.po
+++ b/gcc/po/de.po
@@ -8,10 +8,10 @@
# Roland Illig <roland.illig@gmx.de>, 2015, 2017-2025.
msgid ""
msgstr ""
-"Project-Id-Version: gcc 15-b20250216\n"
+"Project-Id-Version: gcc 15.1-b20250316\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2025-03-14 22:06+0000\n"
-"PO-Revision-Date: 2025-03-13 23:51+0100\n"
+"PO-Revision-Date: 2025-03-20 23:43+0100\n"
"Last-Translator: Roland Illig <roland.illig@gmx.de>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
"Language: de\n"
@@ -575,10 +575,9 @@ msgid "Warn about possibly incorrect subscripts in do loops."
msgstr "Bei möglicherweise falschen Arrayindexen in do-Schleifen warnen."
#: fortran/lang.opt:246
-#, fuzzy, no-c-format
-#| msgid "Warn in case profiles in -fprofile-use do not match."
+#, no-c-format
msgid "Warn when arguments of external procedures do not match."
-msgstr "Warnen, wenn Profile in -fprofile-use nicht zueinander passen."
+msgstr "Warnen, wenn die Argumente von externen Prozeduren nicht passen."
#: fortran/lang.opt:254
#, no-c-format
@@ -3796,76 +3795,72 @@ msgstr "Keine system- oder GCC-spezifischen Makros vordefinieren."
#: cobol/lang.opt:43
#, no-c-format
msgid "Accept COBOL constructs used by non-ISO compilers"
-msgstr ""
+msgstr "COBOL-Konstrukte, die von Nicht-ISO-Compilern verwendet werden, akzeptieren"
#: cobol/lang.opt:62
-#, fuzzy, no-c-format
-#| msgid "%<-fhandle-exceptions%> has been renamed %<-fexceptions%> (and is now on by default)"
+#, no-c-format
msgid "-fcobol-exceptions=<n>\tEnable some exceptions by default"
-msgstr "%<-fhandle-exceptions%> wurde in %<-fexceptions%> umbenannt (und ist nun voreingestellt)"
+msgstr "-fcobol-exceptions=<n>\tEinige Ausnahmen standardmĂ€ĂŸig aktivieren"
#: cobol/lang.opt:66
#, no-c-format
msgid "Define alternative implicit copybook filename extension"
-msgstr ""
+msgstr "Alternative implizite Kopierbuch-Dateinamenerweiterung definieren"
#: cobol/lang.opt:70
#, no-c-format
msgid "Set Working-Storage data items to the supplied value"
-msgstr ""
+msgstr "Working-Storage-Datenelemente auf den angegebenen Wert setzen"
#: cobol/lang.opt:74
-#, fuzzy, no-c-format
-#| msgid "Enable backend debugging."
+#, no-c-format
msgid "Enable Cobol lex debugging"
-msgstr "Backend-Fehlersuche einschalten."
+msgstr "Cobol-Lex-Debugging einschalten"
#: cobol/lang.opt:90
#, no-c-format
msgid "-findicator-column=<n>\tColumn after which Region A begins"
-msgstr ""
+msgstr "-findicator-column=<n>\tSpalte, nach der Region A beginnt"
#: cobol/lang.opt:94
#, no-c-format
msgid "-finternal-ebcdic\tInternal processing is in EBCDIC Code Page 1140"
-msgstr ""
+msgstr "-finternal-ebcdic\tDie interne Verarbeitung erfolgt in EBCDIC-Codepage 1140"
#: cobol/lang.opt:102
#, no-c-format
msgid "Enable/disable static linkage for CALL literals"
-msgstr ""
+msgstr "Einschalten/Ausschalten der statischen Bindung fĂŒr CALL-Literale"
#: cobol/lang.opt:106
-#, fuzzy, no-c-format
-#| msgid "Enable backend debugging."
+#, no-c-format
msgid "Enable Cobol parser debugging"
-msgstr "Backend-Fehlersuche einschalten."
+msgstr "Fehlersuche im Cobol-Parser einschalten"
#: cobol/lang.opt:110
-#, fuzzy, no-c-format
-#| msgid "Enable backend debugging."
+#, no-c-format
msgid "Enable Cobol yacc debugging"
-msgstr "Backend-Fehlersuche einschalten."
+msgstr "Fehlersuche im Cobol-Yacc einschalten"
#: cobol/lang.opt:114
#, no-c-format
msgid "preprocess <source_filter> before compiling"
-msgstr ""
+msgstr "<source_filter> vor der Kompilierung vorverarbeiten"
#: cobol/lang.opt:134
#, no-c-format
msgid "-main\tThe first program-id in the next source file is called by a generated main() entry point"
-msgstr ""
+msgstr "-main\tDie erste Programm-ID in der nÀchsten Quelldatei wird von einem generierten main()-Einstiegspunkt aufgerufen"
#: cobol/lang.opt:138
#, no-c-format
msgid "-main=<source_file> source_file/PROGRAM-ID is called by the generated main()"
-msgstr ""
+msgstr "-main=<Quelldatei> Quelldatei/PROGRAMM-ID wird von der generierten main() aufgerufen"
#: cobol/lang.opt:142
#, no-c-format
msgid "-nomain\tNo main() function is created from COBOL source files"
-msgstr ""
+msgstr "-nomain\tEs wird keine main()-Funktion aus COBOL-Quelldateien erstellt"
#: ada/gcc-interface/lang.opt:61
#, no-c-format
@@ -19828,7 +19823,7 @@ msgstr "Operanden fĂŒr %T/%t mĂŒssen reg + const_int sein:"
#: config/avr/avr.cc:2762
#, c-format
msgid "bad I/O address 0x%s outside of valid range [0x%x, 0x%x] for %%i operand"
-msgstr ""
+msgstr "falsche E/A-Adresse 0x%s außerhalb des gĂŒltigen Bereichs [0x%x, 0x%x] fĂŒr Operand %%i"
#: config/avr/avr.cc:2788
#, c-format
@@ -21245,10 +21240,9 @@ msgid "expected label"
msgstr "Sprungmarke erwartet"
#: cobol/gcobolspec.cc:680
-#, fuzzy, c-format
-#| msgid "Driving:"
+#, c-format
msgid "Driving: (%ld)\n"
-msgstr "Angesteuert:"
+msgstr "AusfĂŒhren: (%ld)\n"
#: cp/call.cc:4225
#, c-format
@@ -21678,6 +21672,12 @@ msgid ""
"\n"
" Use another -std option to compile. */\n"
msgstr ""
+"\n"
+"\n"
+"/* WARNUNG: Wegen abweichender Argumente fĂŒr eine externe\n"
+" Prozedur ist diese Header-Datei nicht kompatibel mit -std=c23.\n"
+"\n"
+" Verwenden Sie eine andere -std-Option zum Kompilieren. */\n"
#: fortran/error.cc:324
msgid "Prohibited in Fortran 2023:"
@@ -22973,38 +22973,34 @@ msgid "%<-mrelax%> is only supported for RTP PIC"
msgstr "%<-mrelax%> wird nur fĂŒr RTP PIC unterstĂŒtzt"
#: cobol/parse_ante.h:1718
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "old declaration %q#D"
+#, gcc-internal-format, gfc-internal-format
msgid "Global declarative %s for %s"
-msgstr "alte Deklaration %q#D"
+msgstr "Global deklarative %s fĂŒr %s"
#: cobol/parse_ante.h:2447 cobol/genapi.cc:5829
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d: invalid symbol_type_t %d"
-msgstr ""
+msgstr "%s:%d: ungĂŒltiger symbol_type_t %d"
#: cobol/parse_ante.h:2789
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d: no symbol '%s' found"
-msgstr ""
+msgstr "%s:%d: kein Symbol »%s« gefunden"
#: cobol/parse_util.h:351
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Intrinsic function %qs (%d) not recognized"
+#, gcc-internal-format, gfc-internal-format
msgid "%s: intrinsic function %s not found"
-msgstr "Intrinsische Funktion %qs (%d) nicht erkannt"
+msgstr "%s: intrinsische Funktion »%s« nicht gefunden"
#: cobol/parse_util.h:383
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "invalid cast to function type %qT"
+#, gcc-internal-format, gfc-internal-format
msgid "%s: invalid function descr type '%c'"
-msgstr "ungĂŒltige Umwandlung in Funktionstyp %qT"
+msgstr "%s: ungĂŒltiger Funktionsbeschreibungstyp »%c«"
#: cobol/scan_ante.h:38
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "close: %s"
+#, gcc-internal-format, gfc-internal-format
msgid "scan.o: %s"
-msgstr "close: %s"
+msgstr "scan.o: %s"
#. A general purpose syntax error.
#: fortran/gfortran.h:3557 fortran/io.cc:3727 fortran/io.cc:4413
@@ -23186,10 +23182,9 @@ msgid "unrecognized scalar storage order value %qs"
msgstr "unbekannter Wert %qs fĂŒr Speicherreihenfolge von Skalaren"
#: cobol/lang.opt:46
-#, fuzzy, gcc-internal-format
-#| msgid "Unrecognized MCU name %qs."
+#, gcc-internal-format
msgid "Unrecognized COBOL dialect name: %qs"
-msgstr "Unbekannter MCU-Name %qs."
+msgstr "Nicht erkannter COBOL-Dialektname: %qs"
#: d/lang.opt:201
#, gcc-internal-format
@@ -23247,10 +23242,9 @@ msgid "missing device or architecture after %qs"
msgstr "fehlendes GerÀt oder Architektur hinter %qs"
#: config/s390/s390.opt:139
-#, fuzzy, gcc-internal-format
-#| msgid "%<-mcpu=%> is deprecated; use %<-mtune=%> or %<-march=%> instead"
+#, gcc-internal-format
msgid "%<-mesa%> is deprecated and support for ESA/390 will be removed; use %<-mzarch%> instead"
-msgstr "%<-mcpu=%> ist veraltet. Verwenden Sie stattdessen %<-mtune=%> oder %<-march=%>"
+msgstr "%<-mesa%> ist veraltet und die UnterstĂŒtzung fĂŒr ESA/390 wird demnĂ€chst entfernt; verwenden Sie stattdessen %<-mzarch%>"
#: config/rs6000/rs6000.opt:308
#, gcc-internal-format
@@ -28108,8 +28102,7 @@ msgid "with %<ancestor%>, only the %<device%>, %<firstprivate%>, %<private%>, %<
msgstr "mit %<ancestor%> dĂŒrfen nur die Klauseln %<device%>, %<firstprivate%>, %<private%>, %<defaultmap%> und %<map%> in dem Konstrukt erscheinen"
#: gimplify.cc:13974
-#, fuzzy, gcc-internal-format
-#| msgid "allocator with access trait set to %<thread%> results in undfined behavior for %qs directive"
+#, gcc-internal-format
msgid "allocator with access trait set to %<thread%> results in undefined behavior for %qs directive"
msgstr "Allokator mit der Zugriffseigenschaft %<thread%> fĂŒhrt zu undefiniertem Verhalten fĂŒr die %qs-Direktive"
@@ -28468,10 +28461,9 @@ msgid "a type with different precision is defined in another translation unit"
msgstr "ein Typ mit unterschiedlicher Genauigkeit ist in einer anderen Übersetzungseinheit definiert"
#: ipa-devirt.cc:1273
-#, fuzzy, gcc-internal-format
-#| msgid "a type with different number of fields is defined in another translation unit"
+#, gcc-internal-format
msgid "a vector type with different number of elements is defined in another translation unit"
-msgstr "ein Typ mit unterschiedlicher Anzahl von Feldern ist in einer anderen Übersetzungseinheit definiert"
+msgstr "ein Vektortyp mit unterschiedlicher Anzahl von Elementen ist in einer anderen Übersetzungseinheit definiert"
#: ipa-devirt.cc:1280
#, gcc-internal-format
@@ -40378,16 +40370,14 @@ msgid "%<asm%> flags not supported in thumb1 mode"
msgstr "%<asm%>-Schalter werden im Thumb1-Modus nicht unterstĂŒtzt"
#: config/avr/avr-c.cc:59
-#, fuzzy, gcc-internal-format
-#| msgid "built-in function %qE not supported for MIPS16"
+#, gcc-internal-format
msgid "built-in function is only supported for GNU-C"
-msgstr "eingebaute Funktion %qE nicht fĂŒr MIPS16 unterstĂŒtzt"
+msgstr "eingebaute Funktion wird nur fĂŒr GNU-C unterstĂŒtzt"
#: config/avr/avr-c.cc:70
-#, fuzzy, gcc-internal-format
-#| msgid "address spaces are not supported for reduced Tiny devices"
+#, gcc-internal-format
msgid "built-in function for named address-space is not supported for reduced Tiny devices"
-msgstr "AdressrĂ€ume werden auf reduzierten Tiny-Kernen nicht unterstĂŒtzt"
+msgstr "die eingebaute Funktion fĂŒr benannten Adressraum wird fĂŒr GerĂ€te mit reduziertem Tiny nicht unterstĂŒtzt"
#: config/avr/avr-c.cc:101 config/avr/avr-c.cc:226
#, gcc-internal-format
@@ -41733,10 +41723,9 @@ msgid "%<-mno-avx512XXX%> cannot disable AVX10 instructions when AVX10 is availa
msgstr "%<-mno-avx512XXX%> kann AVX10-Anweisungen nicht deaktivieren, wenn AVX10 verfĂŒgbar ist"
#: config/i386/i386-options.cc:2734
-#, fuzzy, gcc-internal-format
-#| msgid "%<-mno-avx10.1, -mno-avx10.1-256, -mno-avx10.1-512%> cannot disable AVX512 instructions when %<-mavx512XXX%>"
+#, gcc-internal-format
msgid "%<-mno-avx10.1-256, -mno-avx10.1-512%> cannot disable AVX512 instructions when %<-mavx512XXX%>"
-msgstr "%<-mno-avx10.1, -mno-avx10.1-256, -mno-avx10.1-512%> können AVX512-Anweisungen nicht deaktivieren, wenn %<-mavx512XXX%> gewÀhlt ist"
+msgstr "%<-mno-avx10.1-256, -mno-avx10.1-512%> können AVX512-Befehle nicht deaktivieren, wenn %<-mavx512XXX%> gewÀhlt ist"
#: config/i386/i386-options.cc:2780
#, gcc-internal-format
@@ -43551,17 +43540,14 @@ msgstr "Ausschuss am Ende von %<#pragma CTABLE_ENTRY%>"
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93836
#: config/pru/pru-pragma.cc:61
-#, fuzzy, gcc-internal-format
-#| msgid "%<CTABLE_ENTRY%> index %"
+#, gcc-internal-format
msgid "%<CTABLE_ENTRY%> index %wd is not valid"
-msgstr "N/A"
+msgstr "Index %wd fĂŒr %<CTABLE_ENTRY%> ist nicht gĂŒltig"
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93836
#: config/pru/pru-pragma.cc:63
-#, fuzzy, gcc-internal-format
-#| msgid "redefinition of %<CTABLE_ENTRY %"
+#, gcc-internal-format
msgid "redefinition of %<CTABLE_ENTRY %wd%>"
-msgstr "N/A"
+msgstr "Neudefinition von %<CTABLE_ENTRY %wd%>"
#: config/pru/pru-pragma.cc:67
#, gcc-internal-format
@@ -43624,16 +43610,14 @@ msgid "unknown %<#pragma riscv intrinsic%> option %qs"
msgstr "unbekannte Option %qs fĂŒr %<#pragma riscv intrinsic%>"
#: config/riscv/riscv-target-attr.cc:105
-#, fuzzy, gcc-internal-format
-#| msgid "unexpected arch for %<target()%> attribute: must start with + or rv"
+#, gcc-internal-format
msgid "unexpected arch for %<target()%> attribute: must start with rv64 but found %qs"
-msgstr "unerwartete Architektur fĂŒr %<target()%>-Attribut: muss mit + oder rv beginnen"
+msgstr "unerwartete Architektur fĂŒr %<target()%>-Attribut: muss mit rv64 beginnen, ist jedoch %qs"
#: config/riscv/riscv-target-attr.cc:112
-#, fuzzy, gcc-internal-format
-#| msgid "unexpected arch for %<target()%> attribute: must start with + or rv"
+#, gcc-internal-format
msgid "unexpected arch for %<target()%> attribute: must start with rv32 but found %qs"
-msgstr "unerwartete Architektur fĂŒr %<target()%>-Attribut: muss mit + oder rv beginnen"
+msgstr "unerwartete Architektur fĂŒr %<target()%>-Attribut: muss mit rv32 beginnen, ist jedoch %qs"
#: config/riscv/riscv-target-attr.cc:145
#, gcc-internal-format
@@ -51044,21 +51028,19 @@ msgid "cannot initialize array of %qT from a string literal with type array of %
msgstr "Array von %qT kann nicht aus einem Zeichenkettenliteral mit Typ %<Array von %T%> initialisiert werden"
#: c/c-typeck.cc:9380
-#, fuzzy, gcc-internal-format
-#| msgid "initializer-string for %qT is too long"
+#, gcc-internal-format
msgid "initializer-string for array of %qT is too long (%wu chars into %wu available)"
-msgstr "Initialisierungs-Zeichenkette fĂŒr %qT ist zu lang"
+msgstr "Initialisierungs-Zeichenkette fĂŒr Array von %qT ist zu lang (%wu Zeichen passen nicht in %wu verfĂŒgbare)"
#: c/c-typeck.cc:9385
-#, fuzzy, gcc-internal-format
-#| msgid "initializer-string for %qT is too long"
+#, gcc-internal-format
msgid "initializer-string for array of %qT is too long for C++ (%wu chars into %wu available)"
-msgstr "Initialisierungs-Zeichenkette fĂŒr %qT ist zu lang"
+msgstr "Initialisierungs-Zeichenkette fĂŒr Array von %qT ist zu lang fĂŒr C++ (%wu Zeichen passen nicht in %wu verfĂŒgbare)"
#: c/c-typeck.cc:9392
#, gcc-internal-format
msgid "initializer-string for array of %qT truncates NUL terminator but destination lacks %qs attribute (%wu chars into %wu available)"
-msgstr ""
+msgstr "Initialisierer-Zeichenkette fĂŒr Array von %qT schneidet NUL-Terminator ab, aber dem Ziel fehlt das %qs-Attribut (%wu Zeichen passen nicht in %wu verfĂŒgbare)"
#: c/c-typeck.cc:9404
#, gcc-internal-format
@@ -52217,356 +52199,344 @@ msgstr "Interner Fehler: expected case label"
#: cobol/cdf-copy.cc:110
msgid "REPLACING %zu characters exceeds system capacity'%s'"
-msgstr ""
+msgstr "REPLACING von %zu Zeichen ĂŒberschreitet die SystemkapazitĂ€t »%s«"
#: cobol/cobol1.cc:276
#, gcc-internal-format
msgid "COBOL requires a 64-bit configuration"
-msgstr ""
+msgstr "COBOL erfordert eine 64-Bit-Konfiguration"
#: cobol/cobol1.cc:327
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Creating '%s'\n"
+#, gcc-internal-format, gfc-internal-format
msgid "exception '%s'"
-msgstr "»%s« wird erzeugt\n"
+msgstr "Ausnahme »%s«"
#: cobol/cobol1.cc:413
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "could not close response file %s"
+#, gcc-internal-format, gfc-internal-format
msgid "could not execute preprocessor %s"
-msgstr "Antwortdatei %s konnte nicht geschlossen werden"
+msgstr "PrĂ€prozessor »%s« konnte nicht ausgefĂŒhrt werden"
#: cobol/cobol1.cc:418
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "could not find specs file %s\n"
+#, gcc-internal-format, gfc-internal-format
msgid "could not include %s"
-msgstr "Spezifikationsdatei %s konnte nicht gefunden werden\n"
+msgstr "»%s« konnte nicht eingebunden werden"
#. This isn't right. All OPT_main should be replaced
#: cobol/cobol1.cc:424
#, gcc-internal-format
msgid "We should never see a non-equal dash-main in cobol1.c"
-msgstr ""
+msgstr "In cobol1.c sollte niemals ein ungleiches dash-main erscheinen"
#: cobol/except.cc:54
msgid "no such exception: 0x%04x"
-msgstr ""
+msgstr "keine solche Ausnahme: 0x%04x"
#: cobol/genapi.cc:332
#, gcc-internal-format
msgid "Probable cause: it was referenced without being defined."
-msgstr ""
+msgstr "Wahrscheinliche Ursache: Es wurde darauf verwiesen, ist aber nicht definiert."
#: cobol/genapi.cc:571
#, gcc-internal-format
msgid "Nice try, but you can't fire me. I quit!"
-msgstr ""
+msgstr "Interner Fehler: Nice try, but you can't fire me. I quit!"
#: cobol/genapi.cc:1484
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%qE does not have a mappable type in %qs clause"
+#, gcc-internal-format, gfc-internal-format
msgid "%s(): Knows not the variable type %s for %s"
-msgstr "%qE in %qs-Klausel hat keinen zuordenbaren Typ"
+msgstr "Interner Fehler: %s(): Knows not the variable type %s for %s"
#: cobol/genapi.cc:2171
#, gcc-internal-format, gfc-internal-format
msgid "I don't know how to MOVE an alphabetical string to %s(%s) \n"
-msgstr ""
+msgstr "Interner Fehler: I don't know how to MOVE an alphabetical string to %s(%s) \n"
#: cobol/genapi.cc:2239
#, gcc-internal-format, gfc-internal-format
msgid "%s(): field->type %s must be literal or alphanumeric"
-msgstr ""
+msgstr "Interner Fehler: %s(): field->type %s must be literal or alphanumeric"
#: cobol/genapi.cc:5773
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "invalid receiver type %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "%s(): Invalid field type %s:"
-msgstr "ungĂŒltiger EmpfĂ€ngertyp %qs"
+msgstr "Interner Fehler: %s(): Invalid field type %s:"
#: cobol/genapi.cc:6987 cobol/genapi.cc:6993 cobol/genapi.cc:6999
#, gcc-internal-format, gfc-internal-format
msgid "parser_logop() was called with variable %s on line %d, which is not a FldConditional\n"
-msgstr ""
+msgstr "Interner Fehler: parser_logop() was called with variable %s on line %d, which is not a FldConditional\n"
#: cobol/genapi.cc:7106 cobol/genapi.cc:7170
#, gcc-internal-format, gfc-internal-format
msgid "parser_relop() was called with variable %s, which is not a FldConditional\n"
-msgstr ""
+msgstr "Interner Fehler: parser_relop() was called with variable %s, which is not a FldConditional\n"
#: cobol/genapi.cc:7216
#, gcc-internal-format, gfc-internal-format
msgid "parser_if() was called with variable %s, which is not a FldConditional\n"
-msgstr ""
+msgstr "Interner Fehler: parser_if() was called with variable %s, which is not a FldConditional\n"
#: cobol/genapi.cc:7469
#, gcc-internal-format, gfc-internal-format
msgid "###### candidate %s has unimplemented CVT_type %d(%s)\n"
-msgstr ""
+msgstr "###### candidate %s has unimplemented CVT_type %d(%s)\n"
#: cobol/genapi.cc:7480
#, gcc-internal-format, gfc-internal-format
msgid "###### unknown setop_t code %d\n"
-msgstr ""
+msgstr "###### unknown setop_t code %d\n"
#: cobol/genapi.cc:7676
msgid "%s:%d: %zu exceeds MAXIMUM_UNTILS of %d, line %d"
-msgstr ""
+msgstr "Interner Fehler: %s:%d: %zu exceeds MAXIMUM_UNTILS of %d, line %d"
#: cobol/genapi.cc:8682
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d: ignoring subscripts"
-msgstr ""
+msgstr "Interner Fehler: %s:%d: ignoring subscripts"
#: cobol/genapi.cc:8900 cobol/genapi.cc:9360
#, gcc-internal-format, gfc-internal-format
msgid "%s(): called with NULL *file"
-msgstr ""
+msgstr "Interner Fehler: %s(): called with NULL *file"
#: cobol/genapi.cc:9025
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d file %s access mode is 'file_inaccessible_e' in %s"
-msgstr ""
+msgstr "Interner Fehler: %s:%d file %s access mode is 'file_inaccessible_e' in %s"
#: cobol/genapi.cc:9098
#, gcc-internal-format
msgid "parser_file_open called with NULL *file"
-msgstr ""
+msgstr "Interner Fehler: parser_file_open called with NULL *file"
#: cobol/genapi.cc:9103
#, gcc-internal-format, gfc-internal-format
msgid "parser_file_open for %s called with NULL var_decl_node"
-msgstr ""
+msgstr "Interner Fehler: parser_file_open for %s called with NULL var_decl_node"
#: cobol/genapi.cc:9108
#, gcc-internal-format, gfc-internal-format
msgid "EXTEND can only be used where %s is ACCESS MODE SEQUENTIAL"
-msgstr ""
+msgstr "Interner Fehler: EXTEND can only be used where %s is ACCESS MODE SEQUENTIAL"
#: cobol/genapi.cc:9176
#, gcc-internal-format
msgid "parser_file_close called with NULL *file"
-msgstr ""
+msgstr "Interner Fehler: parser_file_close called with NULL *file"
#: cobol/genapi.cc:9181
#, gcc-internal-format, gfc-internal-format
msgid "parser_file_close for %s called with NULL file->var_decl_node"
-msgstr ""
+msgstr "Interner Fehler: parser_file_close for %s called with NULL file->var_decl_node"
#: cobol/genapi.cc:9234
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d file %s 'where' is zero in %s"
-msgstr ""
+msgstr "Interner Fehler: %s:%d file %s 'where' is zero in %s"
#: cobol/genapi.cc:9244
#, gcc-internal-format
msgid "parser_file_read called with NULL *file"
-msgstr ""
+msgstr "Interner Fehler: parser_file_read called with NULL *file"
#: cobol/genapi.cc:9249
#, gcc-internal-format, gfc-internal-format
msgid "parser_file_read for %s called with NULL file->var_decl_node"
-msgstr ""
+msgstr "Interner Fehler: parser_file_read for %s called with NULL file->var_decl_node"
#: cobol/genapi.cc:9254
#, gcc-internal-format
msgid "parser_file_read called with NULL *field"
-msgstr ""
+msgstr "Interner Fehler: parser_file_read called with NULL *field"
#: cobol/genapi.cc:9259
#, gcc-internal-format, gfc-internal-format
msgid "parser_file_read for %s called with NULL field->var_decl_node"
-msgstr ""
+msgstr "Interner Fehler: parser_file_read for %s called with NULL field->var_decl_node"
#: cobol/genapi.cc:9264
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d file %s is RELATIVE/SEQUENTIAL, but 'where' >= 0"
-msgstr ""
+msgstr "Interner Fehler: %s:%d file %s is RELATIVE/SEQUENTIAL, but 'where' >= 0"
#: cobol/genapi.cc:9273
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d file %s is RELATIVE/RANDOM, but 'where' < 0"
-msgstr ""
+msgstr "Interner Fehler: %s:%d file %s is RELATIVE/RANDOM, but 'where' < 0"
#: cobol/genapi.cc:9316
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d file %s 'sequentially' is %d in %s"
-msgstr ""
+msgstr "Interner Fehler: %s:%d file %s 'sequentially' is %d in %s"
#: cobol/genapi.cc:9365
#, gcc-internal-format, gfc-internal-format
msgid "%s(): for %s called with NULL file->var_decl_node"
-msgstr ""
+msgstr "Interner Fehler: %s(): for %s called with NULL file->var_decl_node"
#: cobol/genapi.cc:9371
#, gcc-internal-format, gfc-internal-format
msgid "%s(): called with NULL *field"
-msgstr ""
+msgstr "Interner Fehler: %s(): called with NULL *field"
#: cobol/genapi.cc:9376
#, gcc-internal-format, gfc-internal-format
msgid "%s(): for %s called with NULL field->var_decl_node"
-msgstr ""
+msgstr "Interner Fehler: %s(): for %s called with NULL field->var_decl_node"
#: cobol/genapi.cc:9511
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d file %s is INDEXED/SEQUENTIAL, but 'sequentially' is false"
-msgstr ""
+msgstr "Interner Fehler: %s:%d file %s is INDEXED/SEQUENTIAL, but 'sequentially' is false"
#: cobol/genapi.cc:11163
#, gcc-internal-format, gfc-internal-format
msgid "%s(): asked to sort %s, but it's not a table"
-msgstr ""
+msgstr "Interner Fehler: %s(): asked to sort %s, but it's not a table"
#. Having both or neither violates SORT syntax
#: cobol/genapi.cc:11291
#, gcc-internal-format, gfc-internal-format
msgid "%s(): syntax error -- both (or neither) USING and input-proc are specified"
-msgstr ""
+msgstr "Interner Fehler: %s(): syntax error -- both (or neither) USING and input-proc are specified"
#: cobol/genapi.cc:11420
#, gcc-internal-format, gfc-internal-format
msgid "%s(): syntax error -- both (or neither) GIVING and output-proc are specified"
-msgstr ""
+msgstr "Interner Fehler: %s(): syntax error -- both (or neither) GIVING and output-proc are specified"
#: cobol/genapi.cc:11826
#, gcc-internal-format, gfc-internal-format
msgid "%s(): syntax error -- both (or neither) files and output-proc are specified"
-msgstr ""
+msgstr "Interner Fehler: %s(): syntax error -- both (or neither) files and output-proc are specified"
#: cobol/genapi.cc:12227
#, gcc-internal-format
msgid "CALL USING BY CONTENT <temporary> would require REPOSITORY PROTOTYPES."
-msgstr ""
+msgstr "CALL USING BY CONTENT <temporary> wĂŒrde REPOSITORY PROTOTYPES erfordern."
#: cobol/genapi.cc:12478
#, gcc-internal-format, gfc-internal-format
msgid "%s(): What in the name of Nero's fiddle are we doing here?"
-msgstr ""
+msgstr "Interner Fehler: %s(): What in the name of Nero's fiddle are we doing here?"
#: cobol/genapi.cc:13993
#, gcc-internal-format, gfc-internal-format
msgid "In parser_move(%s to %s), the move of FldLiteralN to %s hasn't been implemented"
-msgstr ""
+msgstr "Interner Fehler: In parser_move(%s to %s), the move of FldLiteralN to %s hasn't been implemented"
#: cobol/genapi.cc:14229
#, gcc-internal-format, gfc-internal-format
msgid "In mh_dest_is_float(%s to %s), the move of %s to %s hasn't been implemented"
-msgstr ""
+msgstr "Interner Fehler: In mh_dest_is_float(%s to %s), the move of %s to %s hasn't been implemented"
#: cobol/genapi.cc:16323
#, gcc-internal-format, gfc-internal-format
msgid "LEVEL 01 (%s) OCCURS has insufficient data.memsize"
-msgstr ""
+msgstr "Interner Fehler: LEVEL 01 (%s) OCCURS has insufficient data.memsize"
#: cobol/genapi.cc:16395
#, gcc-internal-format
msgid "parser_symbol_add() was called with a NULL new_var\n"
-msgstr ""
+msgstr "Interner Fehler: parser_symbol_add() was called with a NULL new_var\n"
#: cobol/genapi.cc:16423
msgid "%s(): %2.2d %s is a table, but it improperly has a capacity of zero"
-msgstr ""
+msgstr "Interner Fehler: %s(): %2.2d %s is a table, but it improperly has a capacity of zero"
#: cobol/genapi.cc:16463
#, gcc-internal-format, gfc-internal-format
msgid "parser_symbol_add(): %s is its own ancestor"
-msgstr ""
+msgstr "Interner Fehler: parser_symbol_add(): %s is its own ancestor"
#: cobol/genapi.cc:16469
msgid "parser_symbol_add(): %2.2d %s has null ancestor"
-msgstr ""
+msgstr "Interner Fehler: parser_symbol_add(): %2.2d %s has null ancestor"
#: cobol/genapi.cc:16477
#, gcc-internal-format, gfc-internal-format
msgid "parser_symbol_add( %s ) improperly has a non-null var_decl_node\n"
-msgstr ""
+msgstr "Interner Fehler: parser_symbol_add( %s ) improperly has a non-null var_decl_node\n"
#: cobol/genapi.cc:16682
msgid "%s(): %2.2d %s<%s> improperly has a data.capacity of zero"
-msgstr ""
+msgstr "Interner Fehler: %s(): %2.2d %s<%s> improperly has a data.capacity of zero"
#: cobol/gengen.cc:363
#, gcc-internal-format
msgid "The given type is not NULL, and that's just not fair"
-msgstr ""
+msgstr "Interner Fehler: The given type is not NULL, and that's just not fair"
#: cobol/gengen.cc:372
#, gcc-internal-format
msgid "The given type is not a DECL or a TYPE"
-msgstr ""
+msgstr "Interner Fehler: The given type is not a DECL or a TYPE"
#: cobol/gengen.cc:412
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "unknown lam type %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "Unknown type %d"
-msgstr "unbekannter lam-Typ %qs"
+msgstr "Interner Fehler: Unknown type %d"
#: cobol/gengen.cc:2931
#, gcc-internal-format
msgid "Residual context count!"
-msgstr ""
+msgstr "Interner Fehler: Residual context count!"
#: cobol/genmath.cc:1394
#, gcc-internal-format, gfc-internal-format
msgid "parser_op() doesn't know how to evaluate \"%s = %s %c %s\"\n"
-msgstr ""
+msgstr "Interner Fehler: parser_op() doesn't know how to evaluate \"%s = %s %c %s\"\n"
#: cobol/genutil.cc:324 cobol/genutil.cc:603
-#, fuzzy, gcc-internal-format
-#| msgid "too many input files"
+#, gcc-internal-format
msgid "Too many subscripts"
-msgstr "zu viele Eingabedateien"
+msgstr "Interner Fehler: Too many subscripts"
#: cobol/lexio.cc:1485
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%s signal terminated program %s"
+#, gcc-internal-format, gfc-internal-format
msgid "%s pid %d terminated by %s"
-msgstr "Signal %s hat Programm %s beendet"
+msgstr "»%s« mit PID %d wurde beendet durch %s"
#: cobol/lexio.cc:1490
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%s returned %d exit status"
+#, gcc-internal-format, gfc-internal-format
msgid "%s exited with status %d"
-msgstr "%s gab Ende-Status %d zurĂŒck"
+msgstr "»%s« mit Status %d beendet"
#: cobol/symbols.cc:530
msgid "%s:%d: LblNone '%s' has parent #%zu"
-msgstr ""
+msgstr "Interner Fehler: %s:%d: LblNone '%s' has parent #%zu"
#: cobol/symbols.cc:2040
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%qs value must be positive"
+#, gcc-internal-format, gfc-internal-format
msgid "%s: key must be field"
-msgstr "Wert %qs muss positiv sein"
+msgstr "%s: SchlĂŒssel muss Feld sein"
#: cobol/symbols.cc:3837 cobol/symbols.cc:3960 cobol/symbols.cc:3997
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d: could not add '%s'"
-msgstr ""
+msgstr "%s:%d: »%s« konnte nicht hinzugefĂŒgt werden"
#: cobol/util.cc:1085
#, gcc-internal-format, gfc-internal-format
msgid "logic error: MOVE %s %s invalid type:"
-msgstr ""
+msgstr "Interner Fehler: logic error: MOVE %s %s invalid type:"
#: cobol/util.cc:1695
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%s: %s: %s"
+#, gcc-internal-format, gfc-internal-format
msgid "%s: regcomp: %s"
-msgstr "%s: %s: %s"
+msgstr "%s: regcomp: %s"
#: cobol/util.cc:1805
#, gcc-internal-format, gfc-internal-format
msgid "logic error: missing inode for %s"
-msgstr ""
+msgstr "Interner Fehler: logic error: missing inode for %s"
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104876
#: cobol/util.cc:2143
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "failed %s mapper %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "failed compiling %s"
-msgstr "Fehler beim »%s« des Mappers %qs"
+msgstr "Fehler beim Kompilieren von »%s«"
#: cp/call.cc:2106
#, gcc-internal-format
@@ -54214,10 +54184,9 @@ msgid "expression %qE does not designate a %<constexpr%> function"
msgstr "Ausdruck %qE bezeichnet keine %<constexpr%>-Funktion"
#: cp/constexpr.cc:2940
-#, fuzzy, gcc-internal-format
-#| msgid "'o' operand is not constant"
+#, gcc-internal-format
msgid "cannot allocate array: size not constant"
-msgstr "»o«-Operand ist nicht konstant"
+msgstr "Array kann nicht alloziert werden: GrĂ¶ĂŸe nicht konstant"
#: cp/constexpr.cc:2981
#, gcc-internal-format
@@ -58109,16 +58078,14 @@ msgid "invalid use of %<decltype(auto)%>"
msgstr "ungĂŒltige Verwendung von %<decltype(auto)%>"
#: cp/decl.cc:14044
-#, fuzzy, gcc-internal-format
-#| msgid "%qs function with trailing return type has %qT as its type rather than plain %<auto%>"
+#, gcc-internal-format
msgid "%qs function with trailing return type has constrained %<auto%> type specifier rather than plain %<auto%>"
-msgstr "Funktion %qs mit folgendem RĂŒckgabetypen hat %qT als seinen Typ statt einfaches %<auto%>"
+msgstr "Funktion %qs mit nachfolgendem RĂŒckgabetypen hat eingeschrĂ€nkte %<auto%>-Typangabe statt des einfachen %<auto%>"
#: cp/decl.cc:14050
-#, fuzzy, gcc-internal-format
-#| msgid "invalid use of constructor as a template"
+#, gcc-internal-format
msgid "invalid use of constrained %<auto%> type"
-msgstr "ungĂŒltige Verwendung des Konstruktors als Template"
+msgstr "ungĂŒltige Verwendung eines eingeschrĂ€nkten %<auto%>-Typs"
#: cp/decl.cc:14062
#, gcc-internal-format
@@ -60722,10 +60689,9 @@ msgid "enumeration range differs"
msgstr "AufzÀhlungsbereich unterscheidet sich"
#: cp/module.cc:13504
-#, fuzzy, gcc-internal-format
-#| msgid "%qD is a specialization of TU-local template %qD"
+#, gcc-internal-format
msgid "%qD is an alias of TU-local type %qT"
-msgstr "%qD ist eine Spezialisierung des TU-lokalen Templates %qD"
+msgstr "%qD ist ein Alias des TU-lokalen Typen %qT"
#: cp/module.cc:13522
#, gcc-internal-format
@@ -60755,7 +60721,7 @@ msgstr "%qD hat keine Bindung und ist innerhalb der TU-lokalen EntitÀt %qD dekl
#: cp/module.cc:13619
#, gcc-internal-format
msgid "%qT has no name and cannot be differentiated from similar lambdas in other TUs"
-msgstr ""
+msgstr "%qT hat keinen Namen und kann nicht von Àhnlichen Lambdas in anderen TUs unterschieden werden"
#: cp/module.cc:13628
#, gcc-internal-format
@@ -60899,16 +60865,14 @@ msgid "module contains OpenMP, use %<-fopenmp%> to enable"
msgstr "Modul enthÀlt OpenMP, verwenden Sie %<-fopenmp%>, um es einzuschalten"
#: cp/module.cc:19375
-#, fuzzy, gcc-internal-format
-#| msgid "module contains OpenMP, use %<-fopenmp%> to enable"
+#, gcc-internal-format
msgid "module contains OpenMP, use %<-fopenmp%> or %<-fopenmp-simd%> to enable"
-msgstr "Modul enthÀlt OpenMP, verwenden Sie %<-fopenmp%>, um es einzuschalten"
+msgstr "Modul enthÀlt OpenMP, verwenden Sie %<-fopenmp%> oder %<-fopenmp-simd%>, um es einzuschalten"
#: cp/module.cc:19378
-#, fuzzy, gcc-internal-format
-#| msgid "module contains OpenMP, use %<-fopenmp%> to enable"
+#, gcc-internal-format
msgid "module contains OpenACC, use %<-fopenacc%> to enable"
-msgstr "Modul enthÀlt OpenMP, verwenden Sie %<-fopenmp%>, um es einzuschalten"
+msgstr "Modul enthÀlt OpenACC, verwenden Sie %<-fopenacc%>, um es einzuschalten"
#: cp/module.cc:19396
#, gcc-internal-format
@@ -61002,10 +60966,9 @@ msgid "external linkage definition of %qD in header module must be declared %<in
msgstr "externe Bindungsdefinition von %qD im Header-Modul muss als %<inline%> deklariert sein"
#: cp/module.cc:20611
-#, fuzzy, gcc-internal-format
-#| msgid "exporting declaration %qD with internal linkage"
+#, gcc-internal-format
msgid "exporting declaration %qD declared in unnamed namespace"
-msgstr "die Deklaration %qD wird mit interner Bindung exportiert"
+msgstr "die Deklaration %qD, die in einem unbenannten Namensraum deklariert wurde, wird exportiert"
#: cp/module.cc:20618
#, gcc-internal-format
@@ -69139,38 +69102,34 @@ msgid "Expected array subscript stride at %C"
msgstr "Feldindexsprung erwartet bei %C"
#: fortran/array.cc:195
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicate POINTER attribute at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicate TEAM= attribute in %C"
-msgstr "Doppeltes POINTER-Attribut bei %C"
+msgstr "Doppeltes »TEAM=«-Attribut bei %C"
#: fortran/array.cc:203
#, gcc-internal-format, gfc-internal-format
msgid "TEAM_NUMBER= not supported at %C"
-msgstr ""
+msgstr "»TEAM_NUMBER=« nicht unterstĂŒtzt bei %C"
#: fortran/array.cc:212
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicate POINTER attribute at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicate TEAM_NUMBER= attribute in %C"
-msgstr "Doppeltes POINTER-Attribut bei %C"
+msgstr "Doppeltes »TEAM_NUMBER=«-Attribut bei %C"
#: fortran/array.cc:224
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Association target at %C must not be coindexed"
+#, gcc-internal-format, gfc-internal-format
msgid "Expression in STAT= at %C must not be coindexed"
-msgstr "VerknĂŒpfungsziel bei %C darf nicht koindiziert sein"
+msgstr "Ausdruck in »STAT=« bei %C darf nicht koindiziert sein"
#: fortran/array.cc:232
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicate POINTER attribute at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicate STAT= attribute in %C"
-msgstr "Doppeltes POINTER-Attribut bei %C"
+msgstr "Doppeltes »STAT=«-Attribut bei %C"
#: fortran/array.cc:241
#, gcc-internal-format, gfc-internal-format
msgid "Only one of TEAM= or TEAM_NUMBER= may appear in a coarray reference at %C"
-msgstr ""
+msgstr "Nur eines von TEAM= oder TEAM_NUMBER= darf in einer Koarray-Referenz bei %C erscheinen"
#: fortran/array.cc:301
#, gcc-internal-format, gfc-internal-format
@@ -72242,10 +72201,9 @@ msgid "SAVE statement at %C follows blanket SAVE statement"
msgstr "SAVE-Anweisung bei %C folgt umfassender SAVE-Anweisung"
#: fortran/decl.cc:9802
-#, fuzzy, gcc-internal-format
-#| msgid "Sorry, !$ACC DECLARE at %L is not allowed in BLOCK construct"
+#, gcc-internal-format
msgid "SAVE of COMMON block %qs at %C is not allowed in a BLOCK construct"
-msgstr "Entschuldigung, !$ACC DECLARE bei %L ist in einem BLOCK-Konstrukt nicht erlaubt"
+msgstr "SAVE des COMMON-Blocks %qs bei %C ist in einem BLOCK-Konstrukt nicht erlaubt"
#: fortran/decl.cc:9824
#, gcc-internal-format, gfc-internal-format
@@ -77569,10 +77527,9 @@ msgid "%qs clause at %L specified more than once"
msgstr "%qs-Klausel bei %L ist mehrfach angegeben"
#: fortran/openmp.cc:6782
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<nothing%> or %<need_device_ptr%> at %C"
+#, gcc-internal-format
msgid "expected %<nothing%>, %<need_device_ptr%> or %<need_device_addr%> at %C"
-msgstr "%<nothing%> oder %<need_device_ptr%> bei %C erwartet"
+msgstr "%<nothing%>, %<need_device_ptr%> oder %<need_device_addr%> bei %C erwartet"
#: fortran/openmp.cc:6788 fortran/openmp.cc:6906 fortran/openmp.cc:7061
#, gcc-internal-format
@@ -77580,22 +77537,19 @@ msgid "expected %<:%> at %C"
msgstr "%<:%> bei %C erwartet"
#: fortran/openmp.cc:6821
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<:%> at %C"
+#, gcc-internal-format
msgid "unexpected %<:%> at %C"
-msgstr "%<:%> bei %C erwartet"
+msgstr "unerwartetes %<:%> bei %C"
#: fortran/openmp.cc:6868
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected integer expression at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "expected constant integer expression at %C"
-msgstr "Ganzzahlausdruck bei %C erwartet"
+msgstr "konstanter Ganzzahlausdruck bei %C erwartet"
#: fortran/openmp.cc:6890
-#, fuzzy, gcc-internal-format
-#| msgid "ORDERED clause argument not constant positive integer at %C"
+#, gcc-internal-format
msgid "expected dummy parameter name, %<omp_num_args%> or constant positive integer at %C"
-msgstr "Argument der ORDERED-Klausel bei %C ist keine konstante positive Ganzzahl"
+msgstr "Dummy-Parametername, %<omp_num_args%> oder konstante positive Ganzzahl bei %C erwartet"
#: fortran/openmp.cc:6937
#, gcc-internal-format
@@ -78914,21 +78868,19 @@ msgid "!$OMP DECLARE SIMD should refer to containing procedure %qs at %L"
msgstr "!$OMP DECLARE SIMD bei %2$L sollte auf die enthaltende Prozedur %1$qs verweisen"
#: fortran/openmp.cc:13125
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected constant logical expression"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected constant non-negative scalar integer offset expression at %L"
-msgstr "Interner Fehler: expected constant logical expression"
+msgstr "Konstanter nichtnegativer skalarer ganzzahliger Offset-Ausdruck bei %L erwartet"
#: fortran/openmp.cc:13128
#, gcc-internal-format
msgid "For range-based %<adjust_args%>, a constant positive scalar integer expression is required at %L"
-msgstr ""
+msgstr "FĂŒr bereichsbasierte %<adjust_args%> ist ein konstanter positiver skalarer ganzzahliger Ausdruck bei %L erforderlich"
#: fortran/openmp.cc:13142
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected null character in character literal at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected dummy parameter name or a positive integer at %L"
-msgstr "Unerwartetes null-Zeichen in Zeichenliteral bei %L"
+msgstr "Dummyparametername oder eine positive Ganzzahl bei %L erwartet"
#: fortran/openmp.cc:13168
#, gcc-internal-format, gfc-internal-format
@@ -80706,10 +80658,9 @@ msgid "Function %qs is declared CHARACTER(*) and cannot be used at %L since it i
msgstr "Funktion %qs ist als CHARACTER(*) deklariert und kann nicht bei %L verwendet werden, da es kein Scheinargument ist"
#: fortran/resolve.cc:3447
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Missing argument list in function %qs at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Different argument lists in external dummy function %s at %L and %L"
-msgstr "Fehlende Argumentliste in Funktion %qs bei %C"
+msgstr "Unterschiedliche Argumentlisten in externer Dummy-Funktion %s bei %L und %L"
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79596
#: fortran/resolve.cc:3486
@@ -80800,7 +80751,7 @@ msgstr "SUBROUTINE %qs bei %L kann nicht rekursiv aufgerufen werden, da sie nich
#: fortran/resolve.cc:3995
#, gcc-internal-format, gfc-internal-format
msgid "Different argument lists in external dummy subroutine %s at %L and %L"
-msgstr ""
+msgstr "Unterschiedliche Argumentlisten im externen Dummy-Unterprogramm %s bei %L und %L"
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79596
#: fortran/resolve.cc:4026
@@ -81074,45 +81025,39 @@ msgid "Array index at %L is an array of rank %d"
msgstr "Feldindex bei %L ist ein Feld mit Rang %d"
#: fortran/resolve.cc:5470
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Argument dim at %L must be scalar"
+#, gcc-internal-format, gfc-internal-format
msgid "TEAM_NUMBER argument at %L must be scalar"
-msgstr "Argument dim bei %L muss skalar sein"
+msgstr "Argument TEAM_NUMBER bei %L muss skalar sein"
#: fortran/resolve.cc:5477
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expression at %L must be of INTEGER type, found %s"
+#, gcc-internal-format, gfc-internal-format
msgid "TEAM_NUMBER argument at %L must be of INTEGER type, found %s"
-msgstr "Ausdruck bei %L muss INTEGER-Typ haben, %s gefunden"
+msgstr "Argument TEAM_NUMBER bei %L muss vom Typ INTEGER sein, ist jedoch %s"
#: fortran/resolve.cc:5491
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Argument dim at %L must be scalar"
+#, gcc-internal-format, gfc-internal-format
msgid "TEAM argument at %L must be scalar"
-msgstr "Argument dim bei %L muss skalar sein"
+msgstr "Argument TEAM bei %L muss skalar sein"
#: fortran/resolve.cc:5500
#, gcc-internal-format, gfc-internal-format
msgid "TEAM argument at %L must be of TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV, found %s"
-msgstr ""
+msgstr "Argument TEAM bei %L muss vom TEAM_TYPE des intrinsischen Moduls ISO_FORTRAN_ENV sein, ist jedoch %s"
#: fortran/resolve.cc:5514
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Argument dim at %L must be scalar"
+#, gcc-internal-format, gfc-internal-format
msgid "STAT argument at %L must be scalar"
-msgstr "Argument dim bei %L muss skalar sein"
+msgstr "Argument STAT bei %L muss skalar sein"
#: fortran/resolve.cc:5521
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expression at %L must be of INTEGER type, found %s"
+#, gcc-internal-format, gfc-internal-format
msgid "STAT argument at %L must be of INTEGER type, found %s"
-msgstr "Ausdruck bei %L muss INTEGER-Typ haben, %s gefunden"
+msgstr "Argument fĂŒr STAT bei %L muss INTEGER-Typ haben, ist jedoch %s"
#: fortran/resolve.cc:5530
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expression at %L must be scalar"
+#, gcc-internal-format, gfc-internal-format
msgid "STAT's expression at %L must be a variable"
-msgstr "Ausdruck bei %L muss skalar sein"
+msgstr "Der Ausdruck von STAT bei %L muss eine Variable sein"
#: fortran/resolve.cc:5552
#, gcc-internal-format, gfc-internal-format
@@ -84004,10 +83949,9 @@ msgid "Derived type %qs declared at %L must have the BIND attribute to be C inte
msgstr "Abgeleiteter Typ %qs, bei %L deklariert, muss BIND-Attribut haben, um C-kompatibel zu sein"
#: fortran/symbol.cc:4640
-#, fuzzy, gcc-internal-format
-#| msgid "Derived type %qs with BIND(C) attribute at %L is empty, and may be inaccessible by the C companion processor"
+#, gcc-internal-format
msgid "Derived type %qs with BIND(C) attribute at %L has no components"
-msgstr "Abgeleiteter Typ %qs mit Attribut BIND(C) bei %L ist leer und könnte fĂŒr entsprechenden C-Prozessor unzugreifbar sein"
+msgstr "Abgeleiteter Typ %qs mit Attribut BIND(C) bei %L hat keine Komponenten"
#. Generally emit warning, but not twice if -pedantic is given.
#: fortran/symbol.cc:4646
@@ -84488,47 +84432,40 @@ msgid "the %qs clause can only be specified if the %<dispatch%> selector of the
msgstr "die %qs-Klausel kann nur angegeben werden, wenn der %<dispatch%>-Selektor der Konstruktionsselektormenge in der %<match%>-Klausel bei %L vorkommt"
#: fortran/trans-openmp.cc:9010 fortran/trans-openmp.cc:9049
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected argument list at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected positive argument index at %L"
-msgstr "Argumentliste bei %C erwartet"
+msgstr "Positiver Argumentindex bei %L erwartet"
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93855
#: fortran/trans-openmp.cc:9021
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "attribute %qs positional argument %i value %wi exceeds number of function arguments %u"
+#, gcc-internal-format, gfc-internal-format
msgid "Argument index at %L exceeds number of arguments %d"
-msgstr "beim Attribut %qs hat das positionelle Argument %i den Wert %wi, der die Anzahl der Funktionsparameter %u ĂŒbersteigt"
+msgstr "Argumentindex bei %L ĂŒbersteigt Anzahl der Argumente %d"
#: fortran/trans-openmp.cc:9059
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Upper cobound is less than lower cobound at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Upper argument index smaller than lower one at %L"
-msgstr "Obere Kogrenze ist kleiner als untere Kogrenze bei %L"
+msgstr "Oberer Argumentindex ist kleiner als der untere bei %L"
#: fortran/trans-openmp.cc:9085
-#, fuzzy, gcc-internal-format
-#| msgid "list item %qs at %L is not a dummy argument"
+#, gcc-internal-format
msgid "List item %qs at %L, declared at %L, is not a dummy argument"
-msgstr "Listeneintrag %qs bei %L ist kein Scheinargument"
+msgstr "Listeneintrag %qs bei %L ist bei %L deklariert, ist jedoch kein Scheinargument"
#: fortran/trans-openmp.cc:9099
-#, fuzzy, gcc-internal-format
-#| msgid "argument list item %qs in %<need_device_ptr%> at %L must be of TYPE(C_PTR)"
+#, gcc-internal-format
msgid "Argument %qs at %L to list item in %<need_device_ptr%> at %L must be a scalar of TYPE(C_PTR)"
-msgstr "Argumentlistenelement %qs in %<need_device_ptr%> bei %L muss von TYPE(C_PTR) sein"
+msgstr "Das Argument %qs bei %L zum Listenelement in %<need_device_ptr%> bei %L muss ein Skalar vom TYP(C_PTR) sein"
#: fortran/trans-openmp.cc:9106
-#, fuzzy, gcc-internal-format
-#| msgid "%<need_device_addr%> is not valid for C"
+#, gcc-internal-format
msgid "Consider using %<need_device_addr%> instead"
-msgstr "%<need_device_addr%> ist fĂŒr C ungĂŒltig"
+msgstr "ErwÀgen Sie, stattdessen %<need_device_addr%> zu verwenden"
#: fortran/trans-openmp.cc:9113
-#, fuzzy, gcc-internal-format
-#| msgid "Argument %qs of elemental procedure at %L cannot have the ALLOCATABLE attribute"
+#, gcc-internal-format
msgid "Argument %qs at %L to list item in %<need_device_addr%> at %L must not have the VALUE attribute"
-msgstr "Argument %qs der elementaren Prozedur bei %L kann kein ALLOCATABLE-Attribut haben"
+msgstr "Argument %qs bei %L zu Listenelement in %<need_device_addr%> bei %L darf nicht das Attribut VALUE haben"
#: fortran/trans-openmp.cc:9122
#, gcc-internal-format
@@ -84536,10 +84473,9 @@ msgid "%qs at %L is specified more than once"
msgstr "%qs bei %L ist mehrfach angegeben"
#: fortran/trans-openmp.cc:9139
-#, fuzzy, gcc-internal-format
-#| msgid "%<need_device_addr%> is not valid for C"
+#, gcc-internal-format
msgid "%<need_device_addr%> not yet supported"
-msgstr "%<need_device_addr%> ist fĂŒr C ungĂŒltig"
+msgstr "%<need_device_addr%> ist noch nicht unterstĂŒtzt"
#: fortran/trans-stmt.cc:576
#, gcc-internal-format, gfc-internal-format
diff --git a/gcc/po/fr.po b/gcc/po/fr.po
index 8eda238..7fa82d6 100644
--- a/gcc/po/fr.po
+++ b/gcc/po/fr.po
@@ -6,7 +6,7 @@
# Michel Robitaille <robitail@IRO.UMontreal.CA>, traducteur depuis/since 1996.
# François-Xavier Coudert <fxcoudert@gmail.com>, 2008.
# Stéphane Aulery <lkppo@free.fr>, 2015, 2016.
-# Frédéric Marchal <fmarchal@perso.be>, 2024.
+# Frédéric Marchal <fmarchal@perso.be>, 2025.
#
# Vocabulaire utilisé
# lvalue = l-valeur
@@ -100,7 +100,7 @@ msgstr ""
"Project-Id-Version: gcc-15.1-b20250316\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2025-03-14 22:06+0000\n"
-"PO-Revision-Date: 2025-03-19 19:39+0100\n"
+"PO-Revision-Date: 2025-03-21 13:01+0100\n"
"Last-Translator: Frédéric Marchal <fmarchal@perso.be>\n"
"Language-Team: French <traduc@traduc.org>\n"
"Language: fr\n"
@@ -56204,7 +56204,7 @@ msgstr "la déclaration du paramÚtre n'est pas indépendante du nom"
#: cp/decl.cc:2123
#, gcc-internal-format
msgid "structured binding at namespace scope is not name-independent"
-msgstr "la liaison structurée dans la portée de l'espace de nom n'est pas indépendante du nom"
+msgstr "la liaison structurée dans la portée de l'espace de noms n'est pas indépendante du nom"
#: cp/decl.cc:2127
#, gcc-internal-format
@@ -56224,7 +56224,7 @@ msgstr "le membre de donnée statique n'est pas indépendant du nom"
#: cp/decl.cc:2141
#, gcc-internal-format
msgid "variable at namespace scope is not name-independent"
-msgstr "la variable dans la portée de l'espace de nom n'est pas indépendante du nom"
+msgstr "la variable dans la portée de l'espace de noms n'est pas indépendante du nom"
#: cp/decl.cc:2144
#, gcc-internal-format
@@ -60281,7 +60281,7 @@ msgstr "utilisation du trait interne %qT dans la signature de la fonction, utili
#: cp/mangle.cc:2674
#, gcc-internal-format
msgid "mangling type pack index"
-msgstr ""
+msgstr "décoration du type d'index de paquet"
#: cp/mangle.cc:3882
#, gcc-internal-format
@@ -60695,7 +60695,7 @@ msgstr "%qD est déclaré avec une liaison interne"
#: cp/module.cc:13564
#, gcc-internal-format
msgid "%qD has no linkage and is declared in an anonymous namespace"
-msgstr "%qD n'a pas de liaison et est déclaré dans un espace de nom anonyme"
+msgstr "%qD n'a pas de liaison et est déclaré dans un espace de noms anonyme"
#: cp/module.cc:13576
#, gcc-internal-format
@@ -60750,7 +60750,7 @@ msgstr "%qD est déclaré %<constexpr%> et est initialisé à une valeur locale
#: cp/module.cc:14901
#, gcc-internal-format
msgid "%qD refers to TU-local entity %qD and cannot be instantiated in other TUs"
-msgstr ""
+msgstr "%qD fait rĂ©fĂ©rence Ă  l'entitĂ© locale TU %qD et ne peut pas ĂȘtre instanciĂ©e dans d'autres TU"
#: cp/module.cc:15498
#, gcc-internal-format
@@ -60853,16 +60853,14 @@ msgid "module contains OpenMP, use %<-fopenmp%> to enable"
msgstr "le module contient OpenMP, utilisez %<-fopenmp%> pour l'activer"
#: cp/module.cc:19375
-#, fuzzy, gcc-internal-format
-#| msgid "module contains OpenMP, use %<-fopenmp%> to enable"
+#, gcc-internal-format
msgid "module contains OpenMP, use %<-fopenmp%> or %<-fopenmp-simd%> to enable"
-msgstr "le module contient OpenMP, utilisez %<-fopenmp%> pour l'activer"
+msgstr "le module contient OpenMP, utilisez %<-fopenmp%> ou %<-fopenmp-simd%> pour l'activer"
#: cp/module.cc:19378
-#, fuzzy, gcc-internal-format
-#| msgid "module contains OpenMP, use %<-fopenmp%> to enable"
+#, gcc-internal-format
msgid "module contains OpenACC, use %<-fopenacc%> to enable"
-msgstr "le module contient OpenMP, utilisez %<-fopenmp%> pour l'activer"
+msgstr "le module contient OpenACC, utilisez %<-fopenacc%> pour l'activer"
#: cp/module.cc:19396
#, gcc-internal-format
@@ -60900,10 +60898,9 @@ msgid "returning to the gate for a mechanical issue"
msgstr "retour à la porte pour un problÚme mécanique"
#: cp/module.cc:20418
-#, fuzzy, gcc-internal-format
-#| msgid "redeclaring %qD in module %qs conflicts with import"
+#, gcc-internal-format
msgid "declaring %qD in module %qs conflicts with builtin in global module"
-msgstr "la redéclaration %qD dans le module %qs est en conflit avec l'import"
+msgstr "la déclaration de %qD dans le module %qs est en conflit avec une fonction interne dans le module global"
#: cp/module.cc:20421
#, gcc-internal-format
@@ -60955,19 +60952,17 @@ msgstr "précédemment déclaré dans le module global"
#: cp/module.cc:20596
#, gcc-internal-format
msgid "external linkage definition of %qD in header module must be declared %<inline%>"
-msgstr ""
+msgstr "la dĂ©finition de %qD avec liaison externe dans l'en-tĂȘte du module doit ĂȘtre dĂ©clarĂ©e %<inline%>"
#: cp/module.cc:20611
-#, fuzzy, gcc-internal-format
-#| msgid "redeclaration of %q+D with no linkage"
+#, gcc-internal-format
msgid "exporting declaration %qD declared in unnamed namespace"
-msgstr "redéclaration de %q+D sans classe de liaison"
+msgstr "exportation de la déclaration %qD déclarée dans un espace de noms non nommé"
#: cp/module.cc:20618
-#, fuzzy, gcc-internal-format
-#| msgid "redeclaration of %q+D with no linkage"
+#, gcc-internal-format
msgid "exporting declaration %qD with internal linkage"
-msgstr "redéclaration de %q+D sans classe de liaison"
+msgstr "exportation de la déclaration %qD avec liaison interne"
# le %qs est un nom de région non traduit tel que « parallel », « task », « teams ».
#: cp/module.cc:20771
@@ -61033,16 +61028,14 @@ msgid "module %qs imported here"
msgstr "module %qs importé ici"
#: cp/module.cc:21287
-#, fuzzy, gcc-internal-format
-#| msgid "unknown Compiled Module Interface: %s"
+#, gcc-internal-format
msgid "mismatching compiled module interface: had %qs, got %qs"
-msgstr "Interface de module compilé inconnue : %s"
+msgstr "interface de module compilé non concordante : avait %qs, a eu %qs"
#: cp/module.cc:21293
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "unknown Compiled Module Interface: %s"
+#, gcc-internal-format, gfc-internal-format
msgid "unknown compiled module interface: %s"
-msgstr "Interface de module compilé inconnue : %s"
+msgstr "interface de module compilé inconnue : %s"
#: cp/module.cc:21337
#, gcc-internal-format
@@ -61090,21 +61083,19 @@ msgid "writing CMI %qs"
msgstr "Ă©criture CMI %qs"
#: cp/module.cc:22046
-#, fuzzy, gcc-internal-format
-#| msgid "not writing module %qs due to errors"
+#, gcc-internal-format
msgid "not writing module %qs due to errors in template bodies"
-msgstr "pas d'Ă©criture du module %qs Ă  cause d'erreurs"
+msgstr "pas d'Ă©criture du module %qs Ă  cause d'erreurs dans les corps des patrons"
#: cp/module.cc:22049
#, gcc-internal-format
msgid "enable %<-Wtemplate-body%> for more details"
-msgstr ""
+msgstr "activez %<-Wtemplate-body%> pour plus de détails"
#: cp/module.cc:22051
-#, fuzzy, gcc-internal-format
-#| msgid "routine %qD declared here"
+#, gcc-internal-format
msgid "first error in %qD appeared here"
-msgstr "la routine %qD est déclarée ici"
+msgstr "la premiĂšre erreur dans %qD est apparue ici"
#: cp/module.cc:22115
#, gcc-internal-format, gfc-internal-format
@@ -61244,7 +61235,7 @@ msgstr "%qD n'a pas été déclaré dans %qD"
#: cp/name-lookup.cc:6238
#, gcc-internal-format
msgid "using-declaration may not name namespace %qD"
-msgstr "la déclaration « using » ne peut pas nommer l'espace de nom %qD"
+msgstr "la déclaration « using » ne peut pas nommer l'espace de noms %qD"
#: cp/name-lookup.cc:6249
#, gcc-internal-format
@@ -61376,27 +61367,24 @@ msgid "namespace alias %qD not allowed here, assuming %qD"
msgstr "l'alias de l'espace de noms %qD n'est pas permis ici, on suppose %qD"
#: cp/name-lookup.cc:9284
-#, fuzzy, gcc-internal-format
-#| msgid "exporting %q#D that does not have external linkage"
+#, gcc-internal-format
msgid "exporting namespace %qD with internal linkage"
-msgstr "export de %q#D qui n'a pas un lien externe"
+msgstr "exportation de l'espace de noms %qD avec liaison interne"
#: cp/name-lookup.cc:9286
-#, fuzzy, gcc-internal-format
-#| msgid "%qD may not be declared within a namespace"
+#, gcc-internal-format
msgid "%qD has internal linkage because it was declared in an unnamed namespace"
-msgstr "%qD ne peut pas ĂȘtre dĂ©clarĂ© dans un espace de noms"
+msgstr "%qD a une liaison interne car il a été déclaré dans un espace de noms non nommé"
#: cp/name-lookup.cc:9290
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<namespace%>"
+#, gcc-internal-format
msgid "exporting unnamed namespace"
-msgstr "%<namespace%> attendu"
+msgstr "exportation d'un espace de noms non nommé"
#: cp/name-lookup.cc:9300
#, gcc-internal-format
msgid "inline namespace must be specified at initial definition"
-msgstr "un espace de nom en ligne doit ĂȘtre spĂ©cifiĂ© Ă  la dĂ©finition initiale"
+msgstr "un espace de noms en ligne doit ĂȘtre spĂ©cifiĂ© Ă  la dĂ©finition initiale"
#: cp/name-lookup.cc:9301
#, gcc-internal-format
@@ -61459,22 +61447,19 @@ msgid "%<#pragma%> is not allowed here"
msgstr "%<#pragma%> n'est pas permis ici"
#: cp/parser.cc:3356
-#, fuzzy, gcc-internal-format
-#| msgid "expected directive name"
+#, gcc-internal-format
msgid "unexpected module directive"
-msgstr "nom de directive attendu"
+msgstr "directive de module inattendue"
#: cp/parser.cc:3358
-#, fuzzy, gcc-internal-format
-#| msgid "perhaps insert a line break, or other disambiguation, to prevent this being considered a module control-line"
+#, gcc-internal-format
msgid "perhaps insert a line break after %qs, or other disambiguation, to prevent this being considered a module control-line"
-msgstr "insĂ©rez peut-ĂȘtre un saut de ligne ou une autre rĂ©solution d'ambigĂŒitĂ© pour empĂȘcher ceci d'ĂȘtre considĂ©rĂ© comme une ligne de contrĂŽle de module"
+msgstr "insĂ©rez peut-ĂȘtre un saut de ligne aprĂšs %qs ou une autre rĂ©solution d'ambigĂŒitĂ© pour empĂȘcher ceci d'ĂȘtre considĂ©rĂ© comme une ligne de contrĂŽle de module"
#: cp/parser.cc:3501
-#, fuzzy, gcc-internal-format
-#| msgid "%<::%D%> has not been declared; did you mean %qs?"
+#, gcc-internal-format
msgid "%<%E::%E%> has not been declared; did you mean %<%E::%s%>?"
-msgstr "%<::%D%> n'a pas été déclaré; vouliez-vous employer %qs ?"
+msgstr "%<%E::%E%> n'a pas été déclaré; vouliez-vous employer %<%E::%s%> ?"
#: cp/parser.cc:3507
#, gcc-internal-format
@@ -61497,10 +61482,9 @@ msgid "%<%T::%E%> has not been declared"
msgstr "%<%T::%E%> n'a pas été déclaré"
#: cp/parser.cc:3529
-#, fuzzy, gcc-internal-format
-#| msgid "%<::%D%> has not been declared; did you mean %qs?"
+#, gcc-internal-format
msgid "%qE has not been declared; did you mean %qs?"
-msgstr "%<::%D%> n'a pas été déclaré; vouliez-vous employer %qs ?"
+msgstr "%qE n'a pas été déclaré; vouliez-vous employer %qs ?"
#: cp/parser.cc:3541
#, gcc-internal-format
@@ -61870,15 +61854,14 @@ msgid "mismatched operator in fold-expression"
msgstr "opérateur en désaccord dans l'expression fold"
#: cp/parser.cc:5918
-#, fuzzy, gcc-internal-format
-#| msgid "pack init-capture only available with %<-std=c++20%> or %<-std=gnu++20%>"
+#, gcc-internal-format
msgid "pack indexing only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "les captures d'initialisation compactes ne sont uniquement disponibles avec %<-std=c++20%> ou %<-std=gnu++20%>"
+msgstr "l'indexation de paquets est uniquement disponible avec %<-std=c++2c%> ou %<-std=gnu++2c%>"
#: cp/parser.cc:5928
#, gcc-internal-format
msgid "pack index missing"
-msgstr ""
+msgstr "indexation de paquets manquante"
#: cp/parser.cc:6038
#, gcc-internal-format
@@ -62043,19 +62026,17 @@ msgstr "mauvais nombre d'arguments pour %<__builtin_shufflevector%>"
#: cp/parser.cc:8069 cp/pt.cc:21574
#, gcc-internal-format
msgid "call to %<__builtin_operator_new%> does not select replaceable global allocation function"
-msgstr ""
+msgstr "l'appel à %<__builtin_operator_new%> ne sélectionne pas la fonction d'allocation globale remplaçable"
#: cp/parser.cc:8073 cp/pt.cc:21578
-#, fuzzy, gcc-internal-format
-#| msgid "destroying %<operator delete%> must be a usual deallocation function"
+#, gcc-internal-format
msgid "call to %<__builtin_operator_delete%> does not select replaceable global deallocation function"
-msgstr "la destruction de %<operator delete%> doit ĂȘtre une fonction de dĂ©sallocation habituelle"
+msgstr "l'appel à %<__builtin_operator_delete%> ne sélectionne pas la fonction de désallocation globale remplaçable"
#: cp/parser.cc:8078 cp/pt.cc:21583
-#, fuzzy, gcc-internal-format
-#| msgid "deallocation function declared here"
+#, gcc-internal-format
msgid "selected function declared here"
-msgstr "fonction de désallocation déclarée ici"
+msgstr "la fonction sélectionnée est déclarée ici"
#: cp/parser.cc:8211
#, gcc-internal-format
@@ -62103,10 +62084,9 @@ msgid "types may not be defined in %<noexcept%> expressions"
msgstr "les types ne peuvent pas ĂȘtre dĂ©finis dans des expressions %<noexcept%>"
#: cp/parser.cc:9566
-#, fuzzy, gcc-internal-format
-#| msgid "%qD cannot have default arguments"
+#, gcc-internal-format
msgid "%<co_await%> cannot be used in default arguments"
-msgstr "%qD ne peut avoir d'arguments par défaut"
+msgstr "%<co_await%> ne peut ĂȘtre utilisĂ© dans des arguments par dĂ©faut"
#: cp/parser.cc:9791 cp/parser.cc:34796
#, gcc-internal-format
@@ -62149,10 +62129,9 @@ msgid "types may not be defined in a new-type-id"
msgstr "les types ne peuvent pas ĂȘtre dĂ©finis dans un new-type-id"
#: cp/parser.cc:10117
-#, fuzzy, gcc-internal-format
-#| msgid "attributes ignored on template instantiation"
+#, gcc-internal-format
msgid "attributes ignored on outermost array type in new expression"
-msgstr "attributs ignorés sur une instanciation de patron"
+msgstr "attributs ignorés sur le type de tableau le plus à l'extérieur dans l'expression new"
#: cp/parser.cc:10213
#, gcc-internal-format
@@ -62301,10 +62280,9 @@ msgid "default argument specified for lambda parameter"
msgstr "argument par défaut spécifié pour un paramÚtre lambda"
#: cp/parser.cc:12282
-#, fuzzy, gcc-internal-format
-#| msgid "parameter declaration before lambda declaration specifiers only optional with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "parameter declaration before lambda declaration specifiers only optional with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "la déclaration d'un paramÚtre avant des spécificateurs de déclarations lambda est uniquement optionnelle avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "la déclaration d'un paramÚtre avant des spécificateurs de déclarations lambda est uniquement optionnelle avec %<-std=c++23%> ou %<-std=gnu++23%>"
#: cp/parser.cc:12312 cp/pt.cc:14954
#, gcc-internal-format
@@ -62342,22 +62320,19 @@ msgid "%<static%> lambda specifier with lambda capture"
msgstr "spécificateur de lambda %<static%> avec la capture lambda"
#: cp/parser.cc:12379
-#, fuzzy, gcc-internal-format
-#| msgid "parameter declaration before lambda transaction qualifier only optional with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "parameter declaration before lambda transaction qualifier only optional with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "la déclaration d'un paramÚtre avant le qualificatif d'une transaction lambda est uniquement optionnelle avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "la déclaration d'un paramÚtre avant le qualificatif d'une transaction lambda est uniquement optionnelle avec %<-std=c++23%> ou %<-std=gnu++23%>"
#: cp/parser.cc:12392
-#, fuzzy, gcc-internal-format
-#| msgid "parameter declaration before lambda exception specification only optional with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "parameter declaration before lambda exception specification only optional with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "la déclaration d'un paramÚtre avant la spécification d'une exception lambda est uniquement optionnelle avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "la déclaration d'un paramÚtre avant la spécification d'une exception lambda est uniquement optionnelle avec %<-std=c++23%> ou %<-std=gnu++23%>"
#: cp/parser.cc:12410
-#, fuzzy, gcc-internal-format
-#| msgid "parameter declaration before lambda trailing return type only optional with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "parameter declaration before lambda trailing return type only optional with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "la déclaration d'un paramÚtre avant le type de retour de fin d'une lambda est uniquement optionnelle avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "la déclaration d'un paramÚtre avant le type de retour de fin d'une lambda est uniquement optionnelle avec %<-std=c++23%> ou %<-std=gnu++23%>"
#: cp/parser.cc:12452
#, gcc-internal-format
@@ -62380,10 +62355,9 @@ msgid "assertions must be followed by %<;%>"
msgstr "les assertions doivent ĂȘtre suivies par %<;%>"
#: cp/parser.cc:13186
-#, fuzzy, gcc-internal-format
-#| msgid "label at end of compound statement only available with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "label at end of compound statement only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "une étiquette à la fin d'une instruction composée est uniquement disponible avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "une étiquette à la fin d'une instruction composée est uniquement disponible avec %<-std=c++23%> ou %<-std=gnu++23%>"
#: cp/parser.cc:13366 cp/parser.cc:13611
#, gcc-internal-format
@@ -62407,10 +62381,9 @@ msgstr "%<typename%> doit ĂȘtre utilisĂ© avant %qE car %qT est une portĂ©e dĂ©pe
#. A::A a;
#: cp/parser.cc:13625
-#, fuzzy, gcc-internal-format
-#| msgid "%<%T::%E%> names the constructor, not the type"
+#, gcc-internal-format
msgid "%qE names the constructor, not the type"
-msgstr "%<%T::%E%> nomme le constructeur, pas le type"
+msgstr "%qE nomme le constructeur, pas le type"
#: cp/parser.cc:13683
#, gcc-internal-format
@@ -62418,10 +62391,9 @@ msgid "compound-statement in %<constexpr%> function"
msgstr "instruction composée dans une fonction %<constexpr%>"
#: cp/parser.cc:13747
-#, fuzzy, gcc-internal-format
-#| msgid "inner loops must be perfectly nested with %<ordered%> clause"
+#, gcc-internal-format
msgid "inner loops must be perfectly nested with %<tile%> directive"
-msgstr "les boucles internes doivent ĂȘtre parfaitement imbriquĂ©es avec la clause %<ordered%>"
+msgstr "les boucles internes doivent ĂȘtre parfaitement imbriquĂ©es avec la clause %<tile%>"
#: cp/parser.cc:13952
#, gcc-internal-format
@@ -62429,10 +62401,9 @@ msgid "%<if constexpr%> only available with %<-std=c++17%> or %<-std=gnu++17%>"
msgstr "%<if constexpr%> uniquement disponible avec %<-std=c++17%> ou %<-std=gnu++17%>"
#: cp/parser.cc:13974
-#, fuzzy, gcc-internal-format
-#| msgid "%<if consteval%> only available with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "%<if consteval%> only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "%<if consteval%> uniquement disponible avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "%<if consteval%> uniquement disponible avec %<-std=c++23%> ou %<-std=gnu++23%>"
#: cp/parser.cc:13999 cp/parser.cc:14034
#, gcc-internal-format
@@ -62522,10 +62493,9 @@ msgid "range-based %<for%> loops only available with %<-std=c++11%> or %<-std=gn
msgstr "les boucles %<for%> parcourant une plage sont uniquement disponibles avec %<-std=c++11%> ou %<-std=gnu++11%>"
#: cp/parser.cc:15374
-#, fuzzy, gcc-internal-format
-#| msgid "%<goto%> in %<constexpr%> function only available with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "%<goto%> in %<constexpr%> function only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "%<goto%> dans une fonction %<constexpr%> uniquement disponible avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "%<goto%> dans une fonction %<constexpr%> uniquement disponible avec %<-std=c++23%> ou %<-std=gnu++23%>"
#. Issue a warning about this use of a GNU extension.
#: cp/parser.cc:15383
@@ -62554,16 +62524,14 @@ msgid "module-declaration not permitted in header-unit"
msgstr "la dĂ©claration de module n'est pas permise dans une unitĂ© d'en-tĂȘte"
#: cp/parser.cc:15627
-#, fuzzy, gcc-internal-format
-#| msgid "import-declaration must be at global scope"
+#, gcc-internal-format
msgid "module-declaration must be at global scope"
-msgstr "la dĂ©claration d'import doit ĂȘtre dans la portĂ©e globale"
+msgstr "la dĂ©claration de module doit ĂȘtre dans la portĂ©e globale"
#: cp/parser.cc:15628
-#, fuzzy, gcc-internal-format
-#| msgid "concept defined here"
+#, gcc-internal-format
msgid "scope opened here"
-msgstr "concept défini ici"
+msgstr "portée ouverte ici"
#: cp/parser.cc:15654
#, gcc-internal-format
@@ -62587,10 +62555,9 @@ msgid "post-module-declaration imports must be contiguous"
msgstr "les imports de dĂ©clarations post modules doivent ĂȘtre contigĂŒes"
#: cp/parser.cc:15707 cp/parser.cc:15716
-#, fuzzy, gcc-internal-format
-#| msgid "perhaps insert a line break, or other disambiguation, to prevent this being considered a module control-line"
+#, gcc-internal-format
msgid "perhaps insert a line break after %<import%>, or other disambiguation, to prevent this being considered a module control-line"
-msgstr "insĂ©rez peut-ĂȘtre un saut de ligne ou une autre rĂ©solution d'ambigĂŒitĂ© pour empĂȘcher ceci d'ĂȘtre considĂ©rĂ© comme une ligne de contrĂŽle de module"
+msgstr "insĂ©rez peut-ĂȘtre un saut de ligne aprĂšs %<import%> ou une autre rĂ©solution d'ambigĂŒitĂ© pour empĂȘcher ceci d'ĂȘtre considĂ©rĂ© comme une ligne de contrĂŽle de module"
#: cp/parser.cc:15715
#, gcc-internal-format
@@ -62628,26 +62595,24 @@ msgid "%<export%> not part of following module-directive"
msgstr "%<export%> ne fait pas partie de la directive de module suivante"
#: cp/parser.cc:15852
-#, fuzzy, gcc-internal-format
-#| msgid "ISO C does not allow extra %<;%> outside of a function"
+#, gcc-internal-format
msgid "extra %<;%> outside of a function only allowed in C++11"
-msgstr "le C ISO n'autorise pas de %<;%> supplémentaire en dehors d'une fonction"
+msgstr "un %<;%> supplémentaire en dehors d'une fonction est uniquement autorisé en C++11"
#: cp/parser.cc:15855
-#, fuzzy, gcc-internal-format
-#| msgid "ISO C does not allow extra %<;%> outside of a function"
+#, gcc-internal-format
msgid "extra %<;%> outside of a function"
-msgstr "le C ISO n'autorise pas de %<;%> supplémentaire en dehors d'une fonction"
+msgstr "%<;%> supplémentaire en dehors d'une fonction"
#: cp/parser.cc:15864
#, gcc-internal-format
msgid "extra %<;%> inside a struct only allowed in C++11"
-msgstr ""
+msgstr "un %<;%> supplémentaire à l'intérieure d'une structure est uniquement autorisé en C++11"
#: cp/parser.cc:15866
#, gcc-internal-format
msgid "extra %<;%> inside a struct"
-msgstr ""
+msgstr "%<;%> supplémentaire à l'intérieure d'une structure"
#: cp/parser.cc:15874
#, gcc-internal-format
@@ -62665,27 +62630,24 @@ msgid "attributes may be inserted here"
msgstr "les attributs ne peuvent pas ĂȘtre insĂ©rĂ©s ici"
#: cp/parser.cc:16088
-#, fuzzy, gcc-internal-format
-#| msgid "explicit specialization of non-template %qT"
+#, gcc-internal-format
msgid "explicit specializations are not permitted here"
-msgstr "spécialisation explicite du non patron %qT"
+msgstr "les spécialisations explicites ne sont pas permises ici"
#: cp/parser.cc:16090 cp/parser.cc:28230
#, gcc-internal-format
msgid "a specialization is always exported alongside its primary template"
-msgstr ""
+msgstr "une spécialisation est toujours exportée avec sont patron primaire"
#: cp/parser.cc:16103
-#, fuzzy, gcc-internal-format
-#| msgid "explicit instantiation of non-template %q#D"
+#, gcc-internal-format
msgid "explicit instantiations are not permitted here"
-msgstr "instanciation explicite du non patron %q#D"
+msgstr "les instanciations explicites ne sont pas permises ici"
#: cp/parser.cc:16119
-#, fuzzy, gcc-internal-format
-#| msgid "module-declaration not permitted in header-unit"
+#, gcc-internal-format
msgid "export-declarations are not permitted here"
-msgstr "la dĂ©claration de module n'est pas permise dans une unitĂ© d'en-tĂȘte"
+msgstr "les déclarations d'export ne sont pas permises ici"
#: cp/parser.cc:16290
#, gcc-internal-format
@@ -62723,16 +62685,14 @@ msgid "multiple declarations in range-based %<for%> loop"
msgstr "déclarations multiples dans une boucle %<for%> parcourant une plage"
#: cp/parser.cc:16701
-#, fuzzy, gcc-internal-format
-#| msgid "structured bindings only available with %<-std=c++17%> or %<-std=gnu++17%>"
+#, gcc-internal-format
msgid "structured bindings with attributed identifiers only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "les liaisons structurées sont uniquement disponibles avec %<-std=c++17%> ou %<-std=gnu++17%>"
+msgstr "les liaisons structurées avec des identificateurs attribués sont uniquement disponibles avec %<-std=c++2c%> ou %<-std=gnu++2c%>"
#: cp/parser.cc:16738
-#, fuzzy, gcc-internal-format
-#| msgid "structured bindings only available with %<-std=c++17%> or %<-std=gnu++17%>"
+#, gcc-internal-format
msgid "structured bindings in conditions only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "les liaisons structurées sont uniquement disponibles avec %<-std=c++17%> ou %<-std=gnu++17%>"
+msgstr "les liaisons structurées dans des conditions sont uniquement disponibles avec %<-std=c++2c%> ou %<-std=gnu++2c%>"
#: cp/parser.cc:16742
#, gcc-internal-format
@@ -62900,10 +62860,9 @@ msgid "keyword %<typename%> not allowed in this context (a qualified member init
msgstr "le mot-clé %<typename%> n'est pas permis dans ce contexte (une initialisation de membre qualifiée est implicitement un type)"
#: cp/parser.cc:18728
-#, fuzzy, gcc-internal-format
-#| msgid "comparison between two arrays is deprecated in C++20"
+#, gcc-internal-format
msgid "space between quotes and suffix is deprecated in C++23"
-msgstr "la comparaison entre deux tableaux est dépréciée en C++20"
+msgstr "une espace entre les guillemets et le suffixe est déprécié en C++23"
#: cp/parser.cc:18734
#, gcc-internal-format
@@ -63072,10 +63031,9 @@ msgid "use of %<auto%> in lambda parameter declaration only available with %<-st
msgstr "l'utilisation de %<auto%> dans la déclaration d'un paramÚtre lambda est uniquement disponible avec %<-std=c++14%> ou %<-std=gnu++14%>"
#: cp/parser.cc:20936
-#, fuzzy, gcc-internal-format
-#| msgid "invalid use of %<auto%> in template argument"
+#, gcc-internal-format
msgid "use of %<auto%> in template argument"
-msgstr "utilisation invalide de %<auto%> dans un argument de patron"
+msgstr "utilisation de %<auto%> dans un argument de patron"
#: cp/parser.cc:20939
#, gcc-internal-format
@@ -63108,10 +63066,9 @@ msgid "concept defined here"
msgstr "concept défini ici"
#: cp/parser.cc:21354
-#, fuzzy, gcc-internal-format
-#| msgid "invalid use of %qD"
+#, gcc-internal-format
msgid "invalid use of concept-name %qD"
-msgstr "utilisation invalide de %qD"
+msgstr "utilisation invalide du nom de concept %qD"
#: cp/parser.cc:21370
#, gcc-internal-format
@@ -63261,12 +63218,12 @@ msgstr "les définitions d'espace de noms imbriqués sont uniquement disponibles
#: cp/parser.cc:22656
#, gcc-internal-format
msgid "nested namespace name required"
-msgstr "nom d'espace de nom imbriqué attendu"
+msgstr "nom d'espace de noms imbriqué attendu"
#: cp/parser.cc:22661
#, gcc-internal-format
msgid "namespace name required"
-msgstr "nom d'espace de nom attendu"
+msgstr "nom d'espace de noms attendu"
#: cp/parser.cc:22665
#, gcc-internal-format
@@ -63345,10 +63302,9 @@ msgid "types may not be defined in alias template declarations"
msgstr "les types ne peuvent pas ĂȘtre dĂ©finis dans des dĂ©clarations de patrons d'alias"
#: cp/parser.cc:23272
-#, fuzzy, gcc-internal-format
-#| msgid "Expected register or constant integer."
+#, gcc-internal-format
msgid "expected string-literal or constexpr in parentheses"
-msgstr "Registre ou constante entiĂšre attendus."
+msgstr "littéral chaßne ou constexpr entre parenthÚses attendu"
#: cp/parser.cc:23333
#, gcc-internal-format
@@ -63563,10 +63519,9 @@ msgid "expected type-specifier"
msgstr "spécificateur de type attendu"
#: cp/parser.cc:26026
-#, fuzzy, gcc-internal-format
-#| msgid "comparison between two arrays is deprecated in C++20"
+#, gcc-internal-format
msgid "omission of %<,%> before varargs %<...%> is deprecated in C++26"
-msgstr "la comparaison entre deux tableaux est dépréciée en C++20"
+msgstr "l'omission de %<,%> avant le %<....%> variadique est déprécié en C++26"
#: cp/parser.cc:26233
#, gcc-internal-format
@@ -63584,10 +63539,9 @@ msgid "%<this%> specifier in template parameter declaration"
msgstr "spécificateur %<this%> dans la déclaration des paramÚtres d'un patron"
#: cp/parser.cc:26438
-#, fuzzy, gcc-internal-format
-#| msgid "%<this%> specifier in template parameter declaration"
+#, gcc-internal-format
msgid "%<this%> specifier in a requires-expression parameter"
-msgstr "spécificateur %<this%> dans la déclaration des paramÚtres d'un patron"
+msgstr "spécificateur %<this%> dans une expression qui requiert un paramÚtre"
#: cp/parser.cc:26498
#, gcc-internal-format
@@ -63632,7 +63586,7 @@ msgstr "le corps du function-try-block de la fonction %<constexpr%> est uniqueme
#: cp/parser.cc:26903
#, gcc-internal-format
msgid "probably missing a comma or an operator before"
-msgstr ""
+msgstr "une virgule ou un opérateur manque probablement avant"
#: cp/parser.cc:27065
#, gcc-internal-format
@@ -63715,15 +63669,14 @@ msgid "invalid class name in declaration of %qD"
msgstr "nom de classe invalide dans la déclaration de %qD"
#: cp/parser.cc:28228
-#, fuzzy, gcc-internal-format
-#| msgid "defining explicit specialization %qD in friend declaration"
+#, gcc-internal-format
msgid "declaration of partial specialization in unbraced export-declaration"
-msgstr "définition de la spécialisation explicite %qD dans la déclaration amie"
+msgstr "déclaration de la spécialisation partielle dans une déclaration d'export sans accolades"
#: cp/parser.cc:28254
#, gcc-internal-format
msgid "an explicit instantiation cannot have a definition; use %<template <>%> to declare a specialization"
-msgstr ""
+msgstr "une instanciation explicite ne peut pas avoir une définition ; utilisez %<template <>%> pour déclarer une spécialisation"
#: cp/parser.cc:28261
#, gcc-internal-format
@@ -63774,10 +63727,9 @@ msgid "in C++03 a class-key must be used when declaring a friend"
msgstr "en C++03, le mot-clĂ© class (ou struct) doit ĂȘtre utilisĂ© lors de la dĂ©claration d'un ami"
#: cp/parser.cc:28816
-#, fuzzy, gcc-internal-format
-#| msgid "name-independent declarations only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "variadic friends or friend type declarations with multiple types only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "la déclaration indépendante du nom est uniquement disponible avec %<-std=c++2c%> ou %<-std=gnu++2c%>"
+msgstr "les amis variadique de déclarations de types amis avec plusieurs type est uniquement disponible avec %<-std=c++2c%> ou %<-std=gnu++2c%>"
#: cp/parser.cc:28857
#, gcc-internal-format
@@ -63825,10 +63777,9 @@ msgid "expected %<;%> at end of member declaration"
msgstr "%<;%> attendu à la fin de la déclaration du membre"
#: cp/parser.cc:29386
-#, fuzzy, gcc-internal-format
-#| msgid "defaulted %qD only available with %<-std=c++20%> or %<-std=gnu++20%>"
+#, gcc-internal-format
msgid "%<delete%> reason only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "%qD par défaut est uniquement disponible avec %<-std=c++20%> ou %<-std=gnu++20%>"
+msgstr "la raison de %<delete%> est uniquement disponible avec %<-std=c++2c%> ou %<-std=gnu++2c%>"
#: cp/parser.cc:29409
#, gcc-internal-format
@@ -63841,10 +63792,9 @@ msgid "a brace-enclosed initializer is not allowed here"
msgstr "une initialisation entre accolades n'est par permise ici"
#: cp/parser.cc:29575
-#, fuzzy, gcc-internal-format
-#| msgid "method attributes must be specified at the end"
+#, gcc-internal-format
msgid "attributes on base specifiers are ignored"
-msgstr "les attributs de mĂ©thodes doivent ĂȘtre spĂ©cifiĂ©s Ă  la fin"
+msgstr "les attributs sur des spécificateurs de base sont ignorés"
#: cp/parser.cc:29590
#, gcc-internal-format
@@ -63897,16 +63847,14 @@ msgid "types may not be defined in exception-declarations"
msgstr "des types ne peuvent pas ĂȘtre dĂ©finis dans une dĂ©claration d'exception"
#: cp/parser.cc:30179
-#, fuzzy, gcc-internal-format
-#| msgid "%<inline%> in empty declaration"
+#, gcc-internal-format
msgid "%<alignas%> on exception declaration"
-msgstr "%<inline%> dans une déclaration vide"
+msgstr "%<alignas%> dans une déclaration d'exception"
#: cp/parser.cc:30258
-#, fuzzy, gcc-internal-format
-#| msgid "%qD cannot have default arguments"
+#, gcc-internal-format
msgid "%<co_yield%> cannot be used in default arguments"
-msgstr "%qD ne peut avoir d'arguments par défaut"
+msgstr "%<co_yield> ne peut ĂȘtre utilisĂ© dans des arguments par dĂ©faut"
#: cp/parser.cc:30726
#, gcc-internal-format
@@ -64475,21 +64423,19 @@ msgid "%<#pragma omp declare %s%> followed by %<#pragma omp declare %s%>"
msgstr "%<#pragma omp declare %s%> suivi de %<#pragma omp declare %s%>"
#: cp/parser.cc:50288
-#, fuzzy, gcc-internal-format
-#| msgid "%<#pragma omp declare %s%> must be followed by function declaration or definition"
+#, gcc-internal-format
msgid "%<#pragma omp dispatch%> must be followed by a direct function call with optional assignment"
-msgstr "%<#pragma omp declare %s%> doit ĂȘtre suivi d'une dĂ©claration ou une dĂ©finition de fonction"
+msgstr "%<#pragma omp dispatch%> doit ĂȘtre suivi d'un appel de fonction direct avec une affectation optionnelle"
#: cp/parser.cc:50515
-#, fuzzy, gcc-internal-format
-#| msgid "%qD is not a pointer variable"
+#, gcc-internal-format
msgid "%qD is not a C pointer"
-msgstr "%qD n'est pas une variable pointeur"
+msgstr "%qD n'est pas un pointeur C"
#: cp/parser.cc:50637
#, gcc-internal-format
msgid "an %qs clause can only be specified if the %<dispatch%> selector of the construct selector set appears in the %<match%> clause"
-msgstr ""
+msgstr "une clause %qs peut uniquement ĂȘtre spĂ©cifiĂ©e si le sĂ©lecteur %<dispatch%> de l'ensemble du sĂ©lecteur de construction apparaĂźt dans la clause %<match%>"
#: cp/parser.cc:50758
#, gcc-internal-format
@@ -64547,10 +64493,9 @@ msgid "%qD does not refer to a namespace scope function"
msgstr "%qD ne fait pas référence à une fonction à l'intérieur de l'espace de noms"
#: cp/parser.cc:52919 cp/parser.cc:53454
-#, fuzzy, gcc-internal-format
-#| msgid "compound-statement in %<constexpr%> function"
+#, gcc-internal-format
msgid "OpenMP directives may not appear in %<constexpr%> functions"
-msgstr "instruction composée dans une fonction %<constexpr%>"
+msgstr "les directives OpenMP ne peuvent pas apparaitre dans des fonctions %<constexpr%>"
#. cancel-and-throw is unimplemented.
#: cp/parser.cc:53130
@@ -64762,16 +64707,12 @@ msgid "explicit specialization %q#D may be missing attributes"
msgstr "il pourrait manquer des attributs dans la spécialisation explicite de %q#D"
#: cp/pt.cc:2802
-#, fuzzy
-#| msgid "missing primary template attributes %s"
msgid "missing primary template attributes %e"
-msgstr "attributs de patron principal %s manquant"
+msgstr "attributs de patron principal %e manquant"
#: cp/pt.cc:2803
-#, fuzzy
-#| msgid "missing primary template attribute %s"
msgid "missing primary template attribute %e"
-msgstr "attribut de patron principal %s manquant"
+msgstr "attribut de patron principal %e manquant"
#: cp/pt.cc:2896 cp/pt.cc:2956
#, gcc-internal-format
@@ -65468,7 +65409,7 @@ msgstr "ainsi, toute instanciation avec un paquet de paramĂštres non vide serait
#: cp/pt.cc:9934
#, gcc-internal-format
msgid "instantiation exposes TU-local entity %qD"
-msgstr ""
+msgstr "l'instanciation expose l'entité locale TU %qD"
#: cp/pt.cc:9953
#, gcc-internal-format
@@ -65521,16 +65462,14 @@ msgid "property must be constant integer expression"
msgstr "la propriĂ©tĂ© doit ĂȘtre une expression entiĂšre constante"
#: cp/pt.cc:12461
-#, fuzzy, gcc-internal-format
-#| msgid "explicit instantiation of non-class template %qD"
+#, gcc-internal-format
msgid "instantiating erroneous template"
-msgstr "instanciation explicite du patron non classe %qD"
+msgstr "instanciation d'un patron erroné"
#: cp/pt.cc:12462
-#, fuzzy, gcc-internal-format
-#| msgid "first specified here"
+#, gcc-internal-format
msgid "first error appeared here"
-msgstr "premiÚre spécification ici"
+msgstr "la premiĂšre erreur est apparue ici"
#: cp/pt.cc:12813
#, gcc-internal-format
@@ -65558,10 +65497,9 @@ msgid "mismatched argument pack lengths while expanding %qE"
msgstr "les longueurs des paquets d'arguments sont en désaccord durant l'expansion de %qE"
#: cp/pt.cc:14069
-#, fuzzy, gcc-internal-format
-#| msgid "cannot index function pointer %s"
+#, gcc-internal-format
msgid "cannot index an empty pack"
-msgstr "impossible d'indexer le pointeur de fonction %s"
+msgstr "impossible d'indexer un paquet vide"
#: cp/pt.cc:14520
#, gcc-internal-format
@@ -65662,10 +65600,9 @@ msgid "creating array of %qT"
msgstr "création d'un tableau de %qT"
#: cp/pt.cc:17053
-#, fuzzy, gcc-internal-format
-#| msgid "array %q+D assumed to have one element"
+#, gcc-internal-format
msgid "%qD expanded to more than one element"
-msgstr "le tableau %q+D est supposé avoir un élément"
+msgstr "%qD étendu à plus d'un élément"
#: cp/pt.cc:17060
#, gcc-internal-format
@@ -65887,10 +65824,9 @@ msgid "exception specification of %qD depends on itself"
msgstr "la spĂ©cification d'exception %qD dĂ©pend d'elle-mĂȘme"
#: cp/pt.cc:27440
-#, fuzzy, gcc-internal-format
-#| msgid "virt-specifiers in %qs not allowed outside a class definition"
+#, gcc-internal-format
msgid "exception specification of %qD is not available until end of class definition"
-msgstr "le spécificateur de type « virt-specifier » sur %qs n'est pas permis en dehors d'une définition de classe"
+msgstr "la spécification de l'exception de %qD n'est pas disponible avant la fin de la définition de la classe"
#. [temp.explicit]
#.
@@ -66356,10 +66292,9 @@ msgid "%<auto{x}%> cannot be constrained"
msgstr "%<auto{x}%> ne peut ĂȘtre contraint"
#: cp/semantics.cc:3838
-#, fuzzy, gcc-internal-format
-#| msgid "%<auto{x}%> only available with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "%<auto{x}%> only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "%<auto{x}%> est uniquement disponible avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "%<auto{x}%> est uniquement disponible avec %<-std=c++23%> ou %<-std=gnu++23%>"
#: cp/semantics.cc:4030
#, gcc-internal-format
@@ -66462,22 +66397,19 @@ msgid "%qT is not an enumeration type"
msgstr "%qT n'est pas un type énuméré"
#: cp/semantics.cc:5093
-#, fuzzy, gcc-internal-format
-#| msgid "%<__type_pack_element%> index is not an integral constant"
+#, gcc-internal-format
msgid "pack index is not an integral constant"
-msgstr "l'index %<__type_pack_element%> n'est pas une constante entiĂšre"
+msgstr "l'index du paquet n'est pas une constante entiĂšre"
#: cp/semantics.cc:5099
-#, fuzzy, gcc-internal-format
-#| msgid "%<__type_pack_element%> index is negative"
+#, gcc-internal-format
msgid "pack index is negative"
-msgstr "l'index %<__type_pack_element%> est négatif"
+msgstr "l'index du paquet est négatif"
#: cp/semantics.cc:5105
-#, fuzzy, gcc-internal-format
-#| msgid "%<__type_pack_element%> index is out of range"
+#, gcc-internal-format
msgid "pack index is out of range"
-msgstr "l'index %<__type_pack_element%> est hors limites"
+msgstr "l'index du paquet est hors limites"
#. Parameter packs can only be used in templates
#: cp/semantics.cc:5242
@@ -66536,10 +66468,9 @@ msgid "user defined reduction with constructor initializer for base class %qT"
msgstr "réduction définie par l'utilisateur avec une initialisation du constructeur pour la classe de base %qT"
#: cp/semantics.cc:7504
-#, fuzzy, gcc-internal-format
-#| msgid "property must be a constant integer expression at %C"
+#, gcc-internal-format
msgid "expected string literal or constant integer expression instead of %qE"
-msgstr "la propriĂ©tĂ© doit ĂȘtre une expression entiĂšre constante Ă  %C"
+msgstr "littéral de chaßne ou expression entiÚre constante attendue au lieu de %qE"
#: cp/semantics.cc:7694
#, gcc-internal-format
@@ -66789,46 +66720,39 @@ msgid "%<#pragma omp atomic update%> uses two different expressions for memory"
msgstr "%<#pragma omp atomic update%> utilise deux expressions différentes pour la mémoire"
#: cp/semantics.cc:12246
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> message must be a string literal or object with %<size%> and %<data%> members"
+#, gcc-internal-format
msgid "constexpr string must be a string literal or object with %<size%> and %<data%> members"
-msgstr "le message de %<static_assert%> doit ĂȘtre une chaĂźne littĂ©rale ou un objet avec les membres %<size%> et %<data%>"
+msgstr "la chaĂźne constexpr doit ĂȘtre une chaĂźne littĂ©rale ou un objet avec les membres %<size%> et %<data%>"
#: cp/semantics.cc:12262
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> message %<size()%> must be implicitly convertible to %<std::size_t%>"
+#, gcc-internal-format
msgid "constexpr string %<size()%> must be implicitly convertible to %<std::size_t%>"
-msgstr "le message de %<static_assert%> doit avoir une %<size()%> qui peut ĂȘtre implicitement convertie en %<std::size_t%>"
+msgstr "la chaĂźne constexpr %<size()%> doit pouvoir ĂȘtre implicitement convertie en %<std::size_t%>"
#: cp/semantics.cc:12271
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> message %<data()%> must be implicitly convertible to %<const char*%>"
+#, gcc-internal-format
msgid "constexpr string %<data()%> must be implicitly convertible to %<const char*%>"
-msgstr "le message de %<static_assert%> doit avoir une %<data()%> qui peut ĂȘtre implicitement convertie en %<const char *%>"
+msgstr "la chaĂźne constexpr %<data()%> doit pouvoir ĂȘtre implicitement convertie en %<const char*%>"
#: cp/semantics.cc:12309
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> message %<size()%> must be a constant expression"
+#, gcc-internal-format
msgid "constexpr string %<size()%> must be a constant expression"
-msgstr "le message de %<static_assert%> doit avoir une %<size()%> qui est une expression constante"
+msgstr "la chaĂźne constepxr %<size()%> doit ĂȘtre une expression constante"
#: cp/semantics.cc:12317
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> message %<size()%> %qE too large"
+#, gcc-internal-format
msgid "constexpr string message %<size()%> %qE too large"
-msgstr "le message de %<static_assert%> a une %<size()%> %qE trop grande"
+msgstr "la chaĂźne constexpr %<size()%> %qE est trop grande"
#: cp/semantics.cc:12344
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> message %<data()[%d]%> must be a constant expression"
+#, gcc-internal-format
msgid "constexpr string %<data()[%d]%> must be a constant expression"
-msgstr "le message de %<static_assert%> doit avoir une %<data()[%d]%> qui est une expression constante"
+msgstr "la chaĂźne constexpr %<data()[%d]%> doit ĂȘtre une expression constante"
#: cp/semantics.cc:12370
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> message %<data()%> must be a core constant expression"
+#, gcc-internal-format
msgid "constexpr string %<data()%> must be a core constant expression"
-msgstr "le message de %<static_assert%> doit avoir une %<data()%> qui est une expression constante du noyau"
+msgstr "la chaĂźne constexpr %<data()%> doit ĂȘtre une expression constante du noyau"
#: cp/semantics.cc:12469
#, gcc-internal-format
@@ -66896,10 +66820,9 @@ msgid "no unexpanded parameter packs in binary fold"
msgstr "aucun paquet de paramÚtres non déroulés dans le fold binaire"
#: cp/semantics.cc:13946
-#, fuzzy, gcc-internal-format
-#| msgid "second argument to %<__builtin_call_with_static_chain%> must be a pointer type"
+#, gcc-internal-format
msgid "type %qT of argument to %<__builtin_launder%> is not a pointer to object type"
-msgstr "le deuxiĂšme argument de %<__builtin_call_with_static_chain%> doit ĂȘtre un type pointeur"
+msgstr "le type %qT de l'argument de %<__builtin_launder%> n'est pas un pointeur vers un type objet"
#. std::bit_cast for destination ARRAY_TYPE is not possible,
#. as functions may not return an array, so don't bother trying
@@ -67010,49 +66933,44 @@ msgid "ISO C++ %qE attribute does not apply to functions; treating as %<[[gnu::%
msgstr "l'attribut %qE du C++ ISO ne s'applique pas aux fonctions; il est traité comme %<[[gnu::%E]]%>"
#: cp/tree.cc:5170
-#, fuzzy, gcc-internal-format
-#| msgid "invalid function declaration"
+#, gcc-internal-format
msgid "%<alignas%> on function declaration"
-msgstr "déclaration de fonction invalide"
+msgstr "%<alignas%> sur une déclaration de fonction"
#: cp/tree.cc:5173
-#, fuzzy, gcc-internal-format
-#| msgid "%qT is not an enumeration type"
+#, gcc-internal-format
msgid "%<alignas%> on enumerated type"
-msgstr "%qT n'est pas un type énuméré"
+msgstr "%<alignas%> sur un type énuméré"
#: cp/tree.cc:5176
#, gcc-internal-format
msgid "%<alignas%> on a type other than class"
-msgstr ""
+msgstr "%<alignas%> sur un type autre qu'une classe"
#: cp/tree.cc:5178
-#, fuzzy, gcc-internal-format
-#| msgid "%<__alignof%> applied to a bit-field"
+#, gcc-internal-format
msgid "%<alignas%> on bit-field"
-msgstr "%<__alignof%> appliqué sur un champ de bits"
+msgstr "%<alignas%> sur un champ de bits"
#: cp/tree.cc:5181
#, gcc-internal-format
msgid "%<alignas%> on a type alias"
-msgstr ""
+msgstr "%<alignas%> sur un alias de type"
#: cp/tree.cc:5198 cp/tree.cc:5216
-#, fuzzy, gcc-internal-format
-#| msgid "%qD does not have integral or enumeration type"
+#, gcc-internal-format
msgid "%qE on a type other than class or enumeration definition"
-msgstr "%qD n'a pas un type entier ou énuméré"
+msgstr "%qE sur un type autre qu'une classe ou une définition d'énumération"
#: cp/tree.cc:5200 cp/tree.cc:5218
-#, fuzzy, gcc-internal-format
-#| msgid "alignment specified for unnamed bit-field"
+#, gcc-internal-format
msgid "%qE on unnamed bit-field"
-msgstr "un alignement est spécifié pour un champ de bits sans nom"
+msgstr "%qE sur un champ de bits sans nom"
#: cp/tree.cc:5222
#, gcc-internal-format
msgid "%qE on %<case%> or %<default%> label"
-msgstr ""
+msgstr "%qE sur une Ă©tiquette %<case%> ou %<default%>"
#: cp/tree.cc:5314
#, gcc-internal-format
@@ -68443,10 +68361,9 @@ msgid "%<auto(x)%> cannot be constrained"
msgstr "%<auto(x)%> ne peut ĂȘtre contraint"
#: cp/typeck2.cc:2513
-#, fuzzy, gcc-internal-format
-#| msgid "%<auto(x)%> only available with %<-std=c++2b%> or %<-std=gnu++2b%>"
+#, gcc-internal-format
msgid "%<auto(x)%> only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "%<auto(x)%> est uniquement disponible avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
+msgstr "%<auto(x)%> est uniquement disponible avec %<-std=c++23%> ou %<-std=gnu++23%>"
#: cp/typeck2.cc:2538
#, gcc-internal-format
@@ -68951,16 +68868,14 @@ msgid "Invalid type in arithmetic operation at %L"
msgstr "Type invalide dans l'opération arithmétique à %L"
#: fortran/arith.cc:135
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Line truncated at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Unsigned constant truncated at %L"
-msgstr "Ligne tronquée à %L"
+msgstr "Constante non signée tronquée à %L"
#: fortran/arith.cc:138
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "conversion of unsigned constant value to negative integer"
+#, gcc-internal-format, gfc-internal-format
msgid "Negation of unsigned constant at %L not permitted"
-msgstr "conversion d'une constante non signée en entier négatif"
+msgstr "La négation d'une constante non signée à %L n'est pas permise"
#: fortran/arith.cc:141 fortran/arith.cc:2262
#, gcc-internal-format
@@ -69050,7 +68965,7 @@ msgstr "gfc_compare_expr(): Mauvais type de base"
#: fortran/arith.cc:1846
#, gcc-internal-format, gfc-internal-format
msgid "Unsigned exponentiation not permitted with -pedantic at %L"
-msgstr ""
+msgstr "L'exponentielle non signée n'est pas permise avec -pedantic à %L"
#: fortran/arith.cc:1910
#, gcc-internal-format
@@ -69158,38 +69073,34 @@ msgid "Expected array subscript stride at %C"
msgstr "Longueur de pas d'indice de tableau attendu Ă  %C"
#: fortran/array.cc:195
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicate POINTER attribute at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicate TEAM= attribute in %C"
-msgstr "Attribut POINTER dupliqué à %C"
+msgstr "Attribut TEAM= dupliqué dans %C"
#: fortran/array.cc:203
#, gcc-internal-format, gfc-internal-format
msgid "TEAM_NUMBER= not supported at %C"
-msgstr ""
+msgstr "TEAM_NUMBER= pas supporté à %C"
#: fortran/array.cc:212
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicate POINTER attribute at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicate TEAM_NUMBER= attribute in %C"
-msgstr "Attribut POINTER dupliqué à %C"
+msgstr "Attribut TEAM_NUMBER= dupliqué dans %C"
#: fortran/array.cc:224
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Association target at %C must not be coindexed"
+#, gcc-internal-format, gfc-internal-format
msgid "Expression in STAT= at %C must not be coindexed"
-msgstr "La cible de l'association Ă  %C ne doit pas ĂȘtre co-indexĂ©e"
+msgstr "L'expression dans STAT= Ă  %C ne doit pas ĂȘtre co-indexĂ©e"
#: fortran/array.cc:232
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicate POINTER attribute at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicate STAT= attribute in %C"
-msgstr "Attribut POINTER dupliqué à %C"
+msgstr "Attribut STAT= dupliqué dans %C"
#: fortran/array.cc:241
#, gcc-internal-format, gfc-internal-format
msgid "Only one of TEAM= or TEAM_NUMBER= may appear in a coarray reference at %C"
-msgstr ""
+msgstr "Seulement l'un des deux TEAM= ou TEAM_NUMBER= peut apparaßtre dans une référence de co-tableau à %C"
#: fortran/array.cc:301
#, gcc-internal-format, gfc-internal-format
@@ -69423,10 +69334,9 @@ msgid "Array constructor value at %L shall not be unlimited polymorphic [F2008:
msgstr "La valeur du constructeur du tableau Ă  %L ne sera point polymorphique sans limite [F2008: C4106]"
#: fortran/array.cc:2226
-#, fuzzy, gcc-internal-format
-#| msgid "%qs at %L is of the ABSTRACT type %qs"
+#, gcc-internal-format
msgid "Array constructor value %qs at %L is of the ABSTRACT type %qs"
-msgstr "%qs Ă  %L est du type ABSTRACT %qs"
+msgstr "La valeur du constructeur de tableau %qs Ă  %L est du type ABSTRACT %qs"
#: fortran/array.cc:2320
#, gcc-internal-format
@@ -69505,10 +69415,9 @@ msgid "%qs argument of %qs intrinsic at %L must be %s"
msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre %s"
#: fortran/check.cc:535
-#, fuzzy, gcc-internal-format
-#| msgid "%qs argument of %qs intrinsic at %L must be %s"
+#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L must be %s or %s"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre %s"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre %s ou %s"
#: fortran/check.cc:568
#, gcc-internal-format
@@ -69521,10 +69430,9 @@ msgid "%qs argument of %qs intrinsic at %L must be INTEGER or REAL"
msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER ou REAL"
#: fortran/check.cc:600
-#, fuzzy, gcc-internal-format
-#| msgid "%qs argument of %qs intrinsic at %L must be INTEGER or REAL"
+#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L must be INTEGER, REAL or UNSIGNED"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER ou REAL"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER, REAL ou UNSIGNED"
#: fortran/check.cc:618 fortran/check.cc:650
#, gcc-internal-format
@@ -69534,19 +69442,17 @@ msgstr "Fortran 2003: CaractĂšre pour l'argument %qs de l'intrinsĂšque %qs Ă  %L
#: fortran/check.cc:625
#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L must be INTEGER or REAL or CHARACTER"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER, REAL ou CHARACTER"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER ou REAL ou CHARACTER"
#: fortran/check.cc:657
-#, fuzzy, gcc-internal-format
-#| msgid "%qs argument of %qs intrinsic at %L must be INTEGER or REAL or CHARACTER"
+#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L must be INTEGER or REAL or CHARACTER or UNSIGNED"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER, REAL ou CHARACTER"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER ou REAL ou CHARACTER ou UNSIGNED"
#: fortran/check.cc:662
-#, fuzzy, gcc-internal-format
-#| msgid "%qs argument of %qs intrinsic at %L must be INTEGER or REAL"
+#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L must be INTEGER or REAL or UNSIGNED"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER ou REAL"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER ou REAL ou UNSIGNED"
#: fortran/check.cc:681 fortran/check.cc:3755
#, gcc-internal-format
@@ -69769,10 +69675,9 @@ msgid "%qs argument of %qs intrinsic at %L not yet supported"
msgstr "L'argument %qs de l'intrinsÚque %qs à %L n'est pas encore supporté"
#: fortran/check.cc:1848
-#, fuzzy, gcc-internal-format
-#| msgid "%qs argument of %qs intrinsic at %L must have a type of either REAL or INTEGER"
+#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L shall have a type of CHARACTER(KIND=C_CHAR)"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit avoir un type soit REAL ou soit INTEGER"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L aura un type de CHARACTER(KIND=C_CHAR)"
#: fortran/check.cc:1893
#, gcc-internal-format
@@ -69933,10 +69838,9 @@ msgid "%qs argument of %qs intrinsic at %L shall be of type integer, real or cha
msgstr "L'argument %qs de l'intrinsÚque %qs à %L sera du type entier, réel ou caractÚre"
#: fortran/check.cc:2647 fortran/check.cc:2655
-#, fuzzy, gcc-internal-format
-#| msgid "%qs argument of %qs intrinsic at %L shall not be TYPE(*)"
+#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L shall not be UNSIGNED"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L ne sera point TYPE(*)"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L ne sera point UNSIGNED"
#: fortran/check.cc:2663 fortran/check.cc:2677
#, gcc-internal-format, gfc-internal-format
@@ -70024,7 +69928,7 @@ msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre du mĂȘme sous-type
#: fortran/check.cc:3564
#, gcc-internal-format
msgid "UINT intrinsic only valid with %<-funsigned%> at %L"
-msgstr ""
+msgstr "L'intrinsĂšque UINT est uniquement valable avec %<-funsigned%> Ă  %L"
#: fortran/check.cc:3588
#, gcc-internal-format
@@ -70092,10 +69996,9 @@ msgid "%qs intrinsic with CHARACTER argument at %L"
msgstr "IntrinsĂšque %qs avec un argument CHARACTER Ă  %L"
#: fortran/check.cc:4121
-#, fuzzy, gcc-internal-format
-#| msgid "%<a1%> argument of %qs intrinsic at %L must be INTEGER, REAL or CHARACTER"
+#, gcc-internal-format
msgid "%<a1%> argument of %qs intrinsic at %L must be INTEGER, REAL, CHARACTER or UNSIGNED"
-msgstr "L'argument %<a1%> de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER, REAL ou CHARACTER"
+msgstr "L'argument %<a1%> de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER, REAL, CHARACTER ou UNSIGNED"
#: fortran/check.cc:4131
#, gcc-internal-format
@@ -70123,10 +70026,9 @@ msgid "Argument %qs of %qs intrinsic at %L must be in type conformance to argume
msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre en conformitĂ© avec le type de l'argument %qs Ă  %L"
#: fortran/check.cc:4556
-#, fuzzy, gcc-internal-format
-#| msgid "%qs argument of %qs intrinsic at %L must be INTEGER or REAL"
+#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L must be INTEGER or UNSIGNED"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER ou REAL"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit ĂȘtre INTEGER ou UNSIGNED"
#: fortran/check.cc:4564 fortran/check.cc:8067 fortran/check.cc:8082
#, gcc-internal-format
@@ -70179,10 +70081,9 @@ msgid "NULL intrinsic with allocatable MOLD at %L"
msgstr "IntrinsĂšque NULL avec MOLD allouable Ă  %L"
#: fortran/check.cc:4893
-#, fuzzy, gcc-internal-format
-#| msgid "%qs argument of %qs intrinsic at %L must have a type of either REAL or INTEGER"
+#, gcc-internal-format
msgid "%qs argument of %qs intrinsic at %L shall appear only if %qs is of type REAL and %qs is of type INTEGER or UNSIGNED"
-msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L doit avoir un type soit REAL ou soit INTEGER"
+msgstr "L'argument %qs de l'intrinsĂšque %qs Ă  %L n'apparaĂźtra que si %qs est du type REAL et que %qs est du type INTEGER ou UNSIGNED"
#: fortran/check.cc:4971 fortran/check.cc:6909
#, gcc-internal-format
@@ -70722,7 +70623,7 @@ msgstr "ré-initialisation de %qs à %L"
#: fortran/data.cc:524
#, gcc-internal-format, gfc-internal-format
msgid "data-implied-do object at %L is neither an array-element nor a scalar-structure-component (F2018: R841)"
-msgstr ""
+msgstr "l'objet data-implied-do à %L n'est ni un élément de tableau ni un composant de structure scalaire (F2018: R841)"
#: fortran/data.cc:562
#, gcc-internal-format, gfc-internal-format
@@ -70941,10 +70842,9 @@ msgid "Dummy argument %qs at %L may not be a pointer with CONTIGUOUS attribute a
msgstr "L'argument muet %qs Ă  %L ne peut pas ĂȘtre un pointeur avec l'attribut CONTIGUOUS car la procĂ©dure %qs est BIND(C)"
#: fortran/decl.cc:1579
-#, fuzzy, gcc-internal-format
-#| msgid "Default-initialized %s dummy argument %qs at %L is not permitted in BIND(C) procedure %qs"
+#, gcc-internal-format
msgid "Default-initialized dummy argument %qs with %s attribute at %L is not permitted in BIND(C) procedure %qs"
-msgstr "L'argument muet %s initialisé par défaut %qs à %L n'est pas permis dans la procédure BIND(C) %qs"
+msgstr "L'argument muet initialisé par défaut %qs avec l'attribut %s à %L n'est pas permis dans la procédure BIND(C) %qs"
#: fortran/decl.cc:1600
#, gcc-internal-format
@@ -71187,22 +71087,19 @@ msgid "Explicit shaped array with nonconstant bounds at %C"
msgstr "Tableau de forme explicite avec des limites non constantes Ă  %C"
#: fortran/decl.cc:2908
-#, fuzzy, gcc-internal-format
-#| msgid "%qs at %C is a redefinition of the declaration in the corresponding interface for MODULE PROCEDURE %qs"
+#, gcc-internal-format
msgid "%qs at %L is a redefinition of the declaration in the corresponding interface for MODULE PROCEDURE %qs"
-msgstr "%qs à %C est une redéfinition de la déclaration dans l'interface correspondante pour MODULE PROCEDURE %qs"
+msgstr "%qs à %L est une redéfinition de la déclaration dans l'interface correspondante pour MODULE PROCEDURE %qs"
#: fortran/decl.cc:2919
-#, fuzzy, gcc-internal-format
-#| msgid "%qs entity cannot have an initializer at %C"
+#, gcc-internal-format
msgid "%qs entity cannot have an initializer at %L"
-msgstr "L'entité %qs ne peut pas avoir un initialiseur à %C"
+msgstr "L'entité %qs ne peut pas avoir un initialiseur à %L"
#: fortran/decl.cc:2945
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicate array spec for Cray pointee at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicate array spec for Cray pointee at %L"
-msgstr "Spécificateur de tableau dupliqué pour le pointé de type Cray à %C"
+msgstr "Spécificateur de tableau dupliqué pour le pointé de type Cray à %L"
#: fortran/decl.cc:2953
#, gcc-internal-format
@@ -72263,10 +72160,9 @@ msgid "SAVE statement at %C follows blanket SAVE statement"
msgstr "L'instruction SAVE à %C suit une instruction SAVE générale"
#: fortran/decl.cc:9802
-#, fuzzy, gcc-internal-format
-#| msgid "Sorry, !$ACC DECLARE at %L is not allowed in BLOCK construct"
+#, gcc-internal-format
msgid "SAVE of COMMON block %qs at %C is not allowed in a BLOCK construct"
-msgstr "Désolé, !$ACC DECLARE à %L n'est pas permis dans une construction BLOCK"
+msgstr "SAVE du bloc COMMON %qs Ă  %C n'est pas permis dans une construction BLOCK"
#: fortran/decl.cc:9824
#, gcc-internal-format, gfc-internal-format
@@ -73220,7 +73116,7 @@ msgstr "La cible du remappage du rang est plus petite que la taille du pointeur
#: fortran/expr.cc:4400
#, gcc-internal-format, gfc-internal-format
msgid "The assumed rank target at %L is an experimental F202y feature. Use option -std=f202y to enable"
-msgstr ""
+msgstr "La cible de rang tacite à %L est une fonctionnalité expérimentale de F202y. Utilisez l'option -std=f202y pour l'activer"
#: fortran/expr.cc:4412
#, gcc-internal-format, gfc-internal-format
@@ -73235,13 +73131,12 @@ msgstr "La cible du remappage du rang n'a pas le rang 1 Ă  %L"
#: fortran/expr.cc:4423
#, gcc-internal-format, gfc-internal-format
msgid "The data-target at %L is an assumed rank object and so the data-pointer-object %s must have a bounds remapping list (list of lbound:ubound for each dimension)"
-msgstr ""
+msgstr "La cible de données à %L est un objet de rang tacite et, par conséquent, le data-pointer-object %s doit avoir une liste de réorganisation des limites (liste de lbound:ubound pour chaque dimension)"
#: fortran/expr.cc:4432
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "The assumed-rank array at %C shall not have a codimension"
+#, gcc-internal-format, gfc-internal-format
msgid "The assumed rank data-target at %L must be contiguous"
-msgstr "Le tableau de rang tacite Ă  %C n'aura point de co-dimension"
+msgstr "La cible de donnĂ©es de rang tacite Ă  %L doit ĂȘtre contigĂŒe"
#. The test above might need to be extend when F08, Note 5.4 has to be
#. interpreted in the way that target and pointer with the same coindex
@@ -73691,7 +73586,7 @@ msgstr "check_dummy_characteristics: RĂ©sultat %i inattendu en provenance de gfc
#: fortran/interface.cc:1715
#, gcc-internal-format, gfc-internal-format
msgid "Possible character length mismatch in function result between %L and %L"
-msgstr ""
+msgstr "Désaccord possible de la longueur de caractÚre dans le résultat de la fonction entre %L et %L"
#: fortran/interface.cc:1724
#, gcc-internal-format, gfc-internal-format
@@ -73794,10 +73689,9 @@ msgid "Invalid procedure argument at %L"
msgstr "Argument de procédure invalide à %L"
#: fortran/interface.cc:2480
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Interface mismatch in dummy procedure %qs at %L: %s"
+#, gcc-internal-format, gfc-internal-format
msgid "Interface mismatch in dummy procedure at %L conflicts with %L: %s"
-msgstr "Interface non concordante dans la procédure muette %qs à %L: %s"
+msgstr "L'interface non concordante dans la procédure muette à %L est en conflit avec %L : %s"
#: fortran/interface.cc:2484 fortran/interface.cc:2500
#: fortran/interface.cc:2573
@@ -73806,28 +73700,24 @@ msgid "Interface mismatch in dummy procedure %qs at %L: %s"
msgstr "Interface non concordante dans la procédure muette %qs à %L: %s"
#: fortran/interface.cc:2496
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Interface mismatch in dummy procedure %qs at %L: %s"
+#, gcc-internal-format, gfc-internal-format
msgid "Interface mismatch in dummy procedure at %L conflichts with %L: %s"
-msgstr "Interface non concordante dans la procédure muette %qs à %L: %s"
+msgstr "L'interface non concordante dans la procédure muette %L est en conflit avec %L : %s"
#: fortran/interface.cc:2519
-#, fuzzy, gcc-internal-format
-#| msgid "Using parameter %qs declared at %L is deprecated"
+#, gcc-internal-format
msgid "Passing global subroutine %qs declared at %L as function at %L"
-msgstr "L'utilisation du paramÚtre %qs déclaré à %L est obsolÚte"
+msgstr "Passage de la sous-routine globale %qs déclarée à %L comme fonction à %L"
#: fortran/interface.cc:2526
-#, fuzzy, gcc-internal-format
-#| msgid "Return value %qs of function %qs declared at %L not set"
+#, gcc-internal-format
msgid "Passing global function %qs declared at %L as subroutine at %L"
-msgstr "La valeur de retour %qs de la fonction %qs est déclarée à %L mais ne reçoit pas de valeur"
+msgstr "Passage de la fonction globale %qs déclarée à %L comme sous-routine à %L"
#: fortran/interface.cc:2540
-#, fuzzy, gcc-internal-format
-#| msgid "Return type mismatch of function %qs at %L (%s/%s)"
+#, gcc-internal-format
msgid "Type mismatch at %L passing global function %qs declared at %L (%s/%s)"
-msgstr "DĂ©saccord dans le type de retour de la fonction %qs Ă  %L (%s/%s)"
+msgstr "Désaccord dans le type à %L en passant la fonction globale %qs déclarée à %L (%s/%s)"
#: fortran/interface.cc:2584
#, gcc-internal-format
@@ -73977,7 +73867,7 @@ msgstr "IntrinsÚque %<NULL()%> sans argument %<MOLD%> à %L passé au muet %qs
#: fortran/interface.cc:3430
#, gcc-internal-format
msgid "The assumed-size dummy %qs is being passed at %L to an assumed-rank dummy %qs"
-msgstr ""
+msgstr "Le muet de taille tacite %qs est passé à %L à un muet de rang tacite %qs"
#: fortran/interface.cc:3441
#, gcc-internal-format
@@ -74420,10 +74310,9 @@ msgid "Assumed-type argument at %L is only permitted as first actual argument to
msgstr "L'argument de type tacite Ă  %L est uniquement permis comme premier argument effectif de l'intrinsĂšque %s"
#: fortran/intrinsic.cc:301
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Assumed-rank argument at %L is only permitted as actual argument to intrinsic inquiry functions"
+#, gcc-internal-format, gfc-internal-format
msgid "Assumed-rank argument at %L is only permitted as actual argument to intrinsic inquiry functions or to RESHAPE. The latter is an experimental F202y feature. Use -std=f202y to enable"
-msgstr "L'argument de rang tacite Ă  %L est uniquement permis comme argument effectif de fonctions de requĂȘtes"
+msgstr "L'argument de rang tacite Ă  %L est uniquement permis comme argument effectif de fonctions de requĂȘtes ou Ă  RESHAPE.CVe dernier est une fonctionnalitĂ© expĂ©rimentale de F202y. Utilisez -std=f202y pour l'activer"
#: fortran/intrinsic.cc:309
#, gcc-internal-format, gfc-internal-format
@@ -74431,10 +74320,9 @@ msgid "Assumed-rank argument at %L is only permitted as first actual argument to
msgstr "L'argument de rang tacite Ă  %L est uniquement permis comme premier argument effectif de la fonction de requĂȘte intrinsĂšque %s"
#: fortran/intrinsic.cc:317
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "The argument of the RANK intrinsic at %L must be a data object"
+#, gcc-internal-format, gfc-internal-format
msgid "Assumed rank argument to the RESHAPE intrinsic at %L must be contiguous"
-msgstr "L'argument de l'intrinsĂšque RANK Ă  %L doit ĂȘtre un objet de donnĂ©es"
+msgstr "L'argument de rang tacite Ă  l'intrinsĂšque RESHAPE Ă  %L doit ĂȘtre contigu"
#: fortran/intrinsic.cc:364
#, gcc-internal-format
@@ -75513,21 +75401,19 @@ msgid "Expected association list at %C"
msgstr "Liste d'association attendue Ă  %C"
#: fortran/match.cc:1930
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected association at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected associate name at %C"
-msgstr "Association attendue Ă  %C"
+msgstr "Nom d'association attendu Ă  %C"
#: fortran/match.cc:1940
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Bad continuation line at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Bad bounds remapping list at %C"
-msgstr "Mauvaise ligne de continuation Ă  %C"
+msgstr "Mauvaise liste de réorganisation des liaisons à %C"
#: fortran/match.cc:1946
#, gcc-internal-format, gfc-internal-format
msgid "The bounds remapping list at %C is an experimental F202y feature. Use std=f202y to enable"
-msgstr ""
+msgstr "La liste de réorganisation des liaisons à %C est une fonctionnalité expérimentale de F202y. Utilisez std=f202y pour l'activer"
#: fortran/match.cc:1952
#, gcc-internal-format, gfc-internal-format
@@ -75557,13 +75443,12 @@ msgstr "La cible de l'association Ă  %L ne peut pas ĂȘtre une constante BOZ litt
#: fortran/match.cc:2009
#, gcc-internal-format, gfc-internal-format
msgid "The associate name %s with an assumed rank target at %L must have a bounds remapping list (list of lbound:ubound for each dimension)"
-msgstr ""
+msgstr "Le nom d'association %s avec la cible de rang tacite à %L doit avoir une liste de réorganisation des liaisons (liste de lbound:ubound pour chaque dimension)"
#: fortran/match.cc:2018
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "The assumed-rank array at %C shall not have a codimension"
+#, gcc-internal-format, gfc-internal-format
msgid "The assumed rank target at %C must be contiguous"
-msgstr "Le tableau de rang tacite Ă  %C n'aura point de co-dimension"
+msgstr "La cible de rang tacite Ă  %C doit ĂȘtre contigĂŒe"
#: fortran/match.cc:2037
#, gcc-internal-format
@@ -75596,16 +75481,14 @@ msgid "DO CONCURRENT construct at %C"
msgstr "Construction DO CONCURRENT Ă  %C"
#: fortran/match.cc:2826
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "selector %qs specified more than once in set %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "DEFAULT (NONE) specified more than once in DO CONCURRENT at %C"
-msgstr "le sélecteur %qs est spécifié plus d'une fois dans l'ensemble %qs"
+msgstr "DEFAULT (NONE) est spécifié plus d'une fois dans DO CONCURRENT à %C"
#: fortran/match.cc:2915
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected structure component name at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected reduction operator or function name at %C"
-msgstr "Nom de composant de structure attendu Ă  %C"
+msgstr "Opérateur de réduction ou nom de fonction attendu à %C"
#: fortran/match.cc:2935 fortran/openmp.cc:2446 fortran/openmp.cc:2482
#: fortran/openmp.cc:2892 fortran/openmp.cc:2917
@@ -75614,28 +75497,24 @@ msgid "Expected %<:%> at %C"
msgstr "%<:%> attendu Ă  %C"
#: fortran/match.cc:2945
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected variable name at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected variable name in reduction list at %C"
-msgstr "Nom de variable attendu Ă  %C"
+msgstr "Nom de variable attendu dans la liste de réduction à %C"
#: fortran/match.cc:2964
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected association list at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected ',' or ')' in reduction list at %C"
-msgstr "Liste d'association attendue Ă  %C"
+msgstr "« , » ou « ) » attendu dans la liste de réduction à %C"
#: fortran/match.cc:2970
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "PROCEDURE list at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "REDUCE locality spec at %L"
-msgstr "Liste PROCEDURE Ă  %C"
+msgstr "Spécification locale REDUCE à %L"
#: fortran/match.cc:2977
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Invalid type-spec at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Locality spec at %L"
-msgstr "Spécification de type invalide à %C"
+msgstr "Spécification locale à %L"
#: fortran/match.cc:3112
#, gcc-internal-format
@@ -76736,16 +76615,14 @@ msgid "Unexpected junk at %C"
msgstr "Rebut inattendu Ă  %C"
#: fortran/openmp.cc:464
-#, fuzzy, gcc-internal-format
-#| msgid "%<omp_all_memory%> at %C not permitted in this clause"
+#, gcc-internal-format
msgid "%<omp_all_memory%> at %L not permitted in this clause"
-msgstr "%<omp_all_memory%> Ă  %C n'est pas permis dans ce contexte"
+msgstr "%<omp_all_memory%> Ă  %L n'est pas permis dans cette clause"
#: fortran/openmp.cc:509
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "List item shall not be coindexed at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "List item shall not be coindexed at %L"
-msgstr "L'élément de liste ne sera point co-indexé à %C"
+msgstr "L'élément de liste ne sera point co-indexé à %L"
#: fortran/openmp.cc:535
#, gcc-internal-format
@@ -76753,10 +76630,9 @@ msgid "%qs at %L is part of the common block %</%s/%> and may only be specificed
msgstr "%qs Ă  %L fait partie du bloc commun %</%s/%> et peut uniquement ĂȘtre spĂ©cifiĂ© implicitement via le bloc commun nommĂ©"
#: fortran/openmp.cc:562
-#, fuzzy, gcc-internal-format
-#| msgid "COMMON block /%s/ not found at %C"
+#, gcc-internal-format
msgid "COMMON block %</%s/%> not found at %L"
-msgstr "Bloc COMMON /%s/ pas trouvé à %C"
+msgstr "Bloc COMMON %</%s/%> pas trouvé à %L"
#: fortran/openmp.cc:606 fortran/openmp.cc:696
#, gcc-internal-format, gfc-internal-format
@@ -76774,10 +76650,9 @@ msgid "Syntax error in OpenMP detach clause at %C"
msgstr "Erreur de syntaxe dans la clause OpenMP detach Ă  %C"
#: fortran/openmp.cc:755
-#, fuzzy, gcc-internal-format
-#| msgid "%<omp_all_memory%> used with dependence-type other than OUT or INOUT at %C"
+#, gcc-internal-format
msgid "%<omp_all_memory%> used with dependence-type other than OUT or INOUT at %L"
-msgstr "%<omp_all_memory%> utilisé avec un type dépendant autre que OUT ou INOUT à %C"
+msgstr "%<omp_all_memory%> utilisé avec un type dépendant autre que OUT ou INOUT à %L"
#: fortran/openmp.cc:808
#, gcc-internal-format, gfc-internal-format
@@ -76785,10 +76660,9 @@ msgid "Syntax error in OpenMP SINK dependence-type list at %C"
msgstr "Erreur de syntaxe dans la liste de type de dépendance OpenMP SINK à %C"
#: fortran/openmp.cc:871
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Syntax error in OpenACC expression list at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Syntax error in OpenMP expression list at %C"
-msgstr "Erreur de syntaxe dans la liste d'expressions OpenACC Ă  %C"
+msgstr "Erreur de syntaxe dans la liste d'expressions OpenMP Ă  %C"
#: fortran/openmp.cc:873
#, gcc-internal-format, gfc-internal-format
@@ -76856,8 +76730,7 @@ msgid "Invalid combined or composite directive at %L"
msgstr "Directive combinée ou composite invalide à %L"
#: fortran/openmp.cc:1644
-#, fuzzy, gcc-internal-format
-#| msgid "Invalid %qs directive at %L in %s clause: declarative, informational and meta directives not permitted"
+#, gcc-internal-format
msgid "Invalid %qs directive at %L in %s clause: declarative, informational, and meta directives not permitted"
msgstr "Directive %qs invalide à %L dans la clause %s : directives déclarative, informationnelle et meta non permises"
@@ -76889,107 +76762,91 @@ msgid "Unexpected %<(%> at %C"
msgstr "%<(%> inattendu Ă  %C"
#: fortran/openmp.cc:1909
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<{%> at %C"
+#, gcc-internal-format
msgid "Expected %<{%> at %C"
msgstr "%<{%> attendu Ă  %C"
#: fortran/openmp.cc:1919
-#, fuzzy, gcc-internal-format
-#| msgid "expected trait selector name at %C"
+#, gcc-internal-format
msgid "Duplicated %<fr%> preference-selector-name at %C"
-msgstr "nom de sélecteur de trait attendu à %C"
+msgstr "Nom de sélecteur de préférence %<fr%> dupliqué à %C"
#: fortran/openmp.cc:1944 fortran/openmp.cc:2082
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "property must be constant integer expression or string literal at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected constant scalar integer expression or non-empty default-kind character literal at %L"
-msgstr "la propriĂ©tĂ© doit ĂȘtre une expression entiĂšre constante ou une chaĂźne littĂ©rale Ă  %C"
+msgstr "Expression entiÚre scalaire constante ou littéral de chaßne du type de caractÚre par défaut attendue à %L"
#: fortran/openmp.cc:1958 fortran/openmp.cc:2095
-#, fuzzy, gcc-internal-format
-#| msgid "Unknown procedure name %qs at %C"
+#, gcc-internal-format
msgid "Unknown foreign runtime identifier %qd at %L"
-msgstr "Nom de procédure %qs inconnu à %C"
+msgstr "Identificateur d'exécution étranger %qd inconnu à %L"
#: fortran/openmp.cc:1972 fortran/openmp.cc:2107
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected character in variable list at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Unexpected null character in character literal at %L"
-msgstr "CaractĂšre inattendu dans la liste de variable Ă  %C"
+msgstr "CaractÚre null inattendu dans le littéral de caractÚres à %L"
#: fortran/openmp.cc:1979 fortran/openmp.cc:2114
-#, fuzzy, gcc-internal-format
-#| msgid "Unknown procedure name %qs at %C"
+#, gcc-internal-format
msgid "Unknown foreign runtime identifier %qs at %L"
-msgstr "Nom de procédure %qs inconnu à %C"
+msgstr "Identificateur d'exécution étranger %qs inconnu à %L"
#: fortran/openmp.cc:1986 fortran/openmp.cc:7085
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<)%> at %C"
+#, gcc-internal-format
msgid "Expected %<)%> at %C"
msgstr "%<)%> attendu Ă  %C"
#: fortran/openmp.cc:2002
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected identifier or string literal at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected default-kind character literal at %L"
-msgstr "identificateur ou chaßne littérale attendus à %C"
+msgstr "Littéral de caractÚre du type par défaut attendu à %L"
#: fortran/openmp.cc:2013
#, gcc-internal-format
msgid "Character literal at %L must start with %<ompx_%>"
-msgstr ""
+msgstr "Le littéral caractÚre à %L doit commencer par %<ompx_%>"
#: fortran/openmp.cc:2021
-#, fuzzy, gcc-internal-format
-#| msgid "Unexpected character in variable list at %C"
+#, gcc-internal-format
msgid "Unexpected null or %<,%> character in character literal at %L"
-msgstr "CaractĂšre inattendu dans la liste de variable Ă  %C"
+msgstr "CaractÚre null ou %<,%> inattendu dans le littéral caractÚre à %L"
#: fortran/openmp.cc:2038
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<)%> or %<,%> at %C"
+#, gcc-internal-format
msgid "Expected %<fr(%> or %<attr(%> at %C"
-msgstr "%<)%> ou %<,%> attendue Ă  %C"
+msgstr "%<fr(%> ou %<attr(%> attendu Ă  %C"
#: fortran/openmp.cc:2045
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<,%> or %<)%> at %C"
+#, gcc-internal-format
msgid "Expected %<,%> or %<}%> at %C"
-msgstr "%<,%> ou %<)%> attendue Ă  %C"
+msgstr "%<,%> ou %<}%> attendue Ă  %C"
#: fortran/openmp.cc:2162
-#, fuzzy, gcc-internal-format
-#| msgid "Duplicate access-specifier at %C"
+#, gcc-internal-format
msgid "Duplicate %<prefer_type%> modifier at %C"
-msgstr "Spécificateurs d'accÚs dupliqués à %C"
+msgstr "Modificateur %<prefer_type%> dupliqué à %C"
#: fortran/openmp.cc:2174 fortran/openmp.cc:2212 fortran/openmp.cc:2241
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<,%> or %<)%> at %C"
+#, gcc-internal-format
msgid "Expected %<,%> or %<:%> at %C"
-msgstr "%<,%> ou %<)%> attendue Ă  %C"
+msgstr "%<,%> ou %<:%> attendu Ă  %C"
#. Avoid the word 'modifier' as it could be also be no clauses and
#. twice a variable named 'targetsync', which is also invalid.
#: fortran/openmp.cc:2190
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<match%> at %C"
+#, gcc-internal-format
msgid "Duplicate %<targetsync%> at %C"
-msgstr "%<match%> attendu Ă  %C"
+msgstr "%<targetsync%> dupliqué à %C"
#: fortran/openmp.cc:2219
-#, fuzzy, gcc-internal-format
-#| msgid "Duplicate %s attribute at %L"
+#, gcc-internal-format
msgid "Duplicate %<target%> at %C"
-msgstr "Attribut %s dupliqué à %L"
+msgstr "%<target%> dupliqué à %C"
#: fortran/openmp.cc:2246
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<)%> or %<,%> at %C"
+#, gcc-internal-format
msgid "Expected %<target%> or %<targetsync%> at %C"
-msgstr "%<)%> ou %<,%> attendue Ă  %C"
+msgstr "%<target%> ou %<targetsync%> attendu Ă  %C"
#: fortran/openmp.cc:2302
#, gcc-internal-format
@@ -77167,10 +77024,9 @@ msgid "ORDERED clause argument not constant positive integer at %C"
msgstr "L'argument de la clause ORDERED n'est pas une constante entiĂšre positive Ă  %C"
#: fortran/openmp.cc:3919
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "ORDERED clause argument not constant positive integer at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "PARTIAL clause argument not constant positive integer at %C"
-msgstr "L'argument de la clause ORDERED n'est pas une constante entiĂšre positive Ă  %C"
+msgstr "L'argument de la clause PARTIAL n'est pas une constante entiĂšre positive Ă  %C"
#: fortran/openmp.cc:4201
#, gcc-internal-format, gfc-internal-format
@@ -77521,28 +77377,24 @@ msgid "expected expression at %C"
msgstr "expression attendue Ă  %C"
#: fortran/openmp.cc:6484
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "property must be a constant logical expression at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "property must be a logical expression at %L"
-msgstr "la propriĂ©tĂ© doit ĂȘtre une expression logique constante Ă  %C"
+msgstr "la propriĂ©tĂ© doit ĂȘtre une expression logique Ă  %L"
#: fortran/openmp.cc:6488
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "property must be a constant integer expression at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "property must be an integer expression at %L"
-msgstr "la propriĂ©tĂ© doit ĂȘtre une expression entiĂšre constante Ă  %C"
+msgstr "la propriĂ©tĂ© doit ĂȘtre une expression entiĂšre Ă  %L"
#: fortran/openmp.cc:6495
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "property must be a constant logical expression at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "property must be a constant logical expression at %L"
-msgstr "la propriĂ©tĂ© doit ĂȘtre une expression logique constante Ă  %C"
+msgstr "la propriĂ©tĂ© doit ĂȘtre une expression logique constante Ă  %L"
#: fortran/openmp.cc:6499
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "property must be a constant integer expression at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "property must be a constant integer expression at %L"
-msgstr "la propriĂ©tĂ© doit ĂȘtre une expression entiĂšre constante Ă  %C"
+msgstr "la propriĂ©tĂ© doit ĂȘtre une expression entiĂšre constante Ă  %L"
#: fortran/openmp.cc:6513
#, gcc-internal-format, gfc-internal-format
@@ -77590,84 +77442,74 @@ msgid "%qs clause at %L specified more than once"
msgstr "La clause %qs à %L est spécifiée plus d'une fois"
#: fortran/openmp.cc:6782
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<ancestor%> or %<device_num%>"
+#, gcc-internal-format
msgid "expected %<nothing%>, %<need_device_ptr%> or %<need_device_addr%> at %C"
-msgstr "%<ancestor%> ou %<device_num%> attendu"
+msgstr "%<nothing%>, %<need_device_ptr%> ou %<need_device_addr%> attendu Ă  %C"
#: fortran/openmp.cc:6788 fortran/openmp.cc:6906 fortran/openmp.cc:7061
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<:%> at %C"
+#, gcc-internal-format
msgid "expected %<:%> at %C"
msgstr "%<:%> attendu Ă  %C"
#: fortran/openmp.cc:6821
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<:%> at %C"
+#, gcc-internal-format
msgid "unexpected %<:%> at %C"
-msgstr "%<:%> attendu Ă  %C"
+msgstr "%<:%> inattendu Ă  %C"
#: fortran/openmp.cc:6868
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected integer expression at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "expected constant integer expression at %C"
-msgstr "expression entiĂšre attendue Ă  %C"
+msgstr "expression entiĂšre constante attendue Ă  %C"
#: fortran/openmp.cc:6890
-#, fuzzy, gcc-internal-format
-#| msgid "ORDERED clause argument not constant positive integer at %C"
+#, gcc-internal-format
msgid "expected dummy parameter name, %<omp_num_args%> or constant positive integer at %C"
-msgstr "L'argument de la clause ORDERED n'est pas une constante entiĂšre positive Ă  %C"
+msgstr "nom de paramĂštre muet, %<omp_num_args%> ou entier positif constant attendu Ă  %C"
#: fortran/openmp.cc:6937
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<)%> at %C"
+#, gcc-internal-format
msgid "expected %<interop%> at %C"
-msgstr "%<)%> attendu Ă  %C"
+msgstr "%<interop%> attendu Ă  %C"
#: fortran/openmp.cc:6987
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<at%>, %<severity%> or %<message%> clause"
+#, gcc-internal-format
msgid "expected %<match%>, %<adjust_args%> or %<append_args%> at %C"
-msgstr "clause %<at%>, %<severity%> ou %<message%> attendue"
+msgstr "%<match%>, %<adjust_args%> ou %<append_args%> attendu Ă  %C"
#: fortran/openmp.cc:6993
#, gcc-internal-format
msgid "the %qs clause at %L can only be specified if the %<dispatch%> selector of the construct selector set appears in the %<match%> clause"
-msgstr ""
+msgstr "la clause %qs Ă  %L peut uniquement ĂȘtre spĂ©cifiĂ©e si le sĂ©lecteur %<dispatch%> de l'ensemble du sĂ©lecteur de construction apparaĂźt dans la clause %<match%>"
#: fortran/openmp.cc:7033
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<host%>, %<nohost%> or %<any%>"
+#, gcc-internal-format
msgid "expected %<when%>, %<otherwise%>, or %<default%> at %C"
-msgstr "%<host%>, %<nohost%> ou %<any%> attendu"
+msgstr "%<when%>, %<otherwise%> ou %<default%> attendu Ă  %C"
#: fortran/openmp.cc:7040
#, gcc-internal-format
msgid "too many %<otherwise%> or %<default%> clauses in %<metadirective%> at %C"
-msgstr ""
+msgstr "trop de clauses %<otherwise%> ou %<default%> dans %<metadirective%> Ă  %C"
#: fortran/openmp.cc:7047
#, gcc-internal-format
msgid "%<otherwise%> or %<default%> clause must appear last in %<metadirective%> at %C"
-msgstr ""
+msgstr "la clause %<otherwise%> ou %<default%> doit apparaĂźtre en dernier dans %<metadirective%> Ă  %C"
#: fortran/openmp.cc:7075
-#, fuzzy, gcc-internal-format
-#| msgid "destructor priorities are not supported"
+#, gcc-internal-format
msgid "declarative directive variants are not supported"
-msgstr "les priorités des destructeurs ne sont pas supportées"
+msgstr "les variantes de directives déclaratives ne sont pas supportées"
#: fortran/openmp.cc:7096
#, gcc-internal-format, gfc-internal-format
msgid "variant directive used in OMP BEGIN METADIRECTIVE at %C must have a corresponding end directive"
-msgstr ""
+msgstr "la directive de variante utilisée dans OMP BEGIN METADIRECTIVE à %C doit avoir une directive de fin correspondante"
#: fortran/openmp.cc:7130
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected junk after OMP THREADPRIVATE at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Unexpected junk after OMP METADIRECTIVE at %C"
-msgstr "Rebut inattendu aprĂšs OMP THREADPRIVATE Ă  %C"
+msgstr "Rebut inattendu aprĂšs OMP METADIRECTIVE Ă  %C"
#: fortran/openmp.cc:7189
#, gcc-internal-format, gfc-internal-format
@@ -77685,10 +77527,9 @@ msgid "Syntax error in !$OMP THREADPRIVATE list at %C"
msgstr "Erreur de syntaxe dans la liste !$OMP THREADPRIVATE Ă  %C"
#: fortran/openmp.cc:7332
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Program unit at %L has OpenMP device constructs/routines but does not set !$OMP REQUIRES REVERSE_OFFLOAD but other program units do"
+#, gcc-internal-format, gfc-internal-format
msgid "Program unit at %L has OpenMP device constructs/routines but does not set !$OMP REQUIRES %s but other program units do"
-msgstr "L'unité de programme à %L a les constructions/routines de périphérique OpenMP mais ne défini pas !$OMP REQUIRES REVERSE_OFFLOAD alors que d'autres unités de programmes le font"
+msgstr "L'unité de programme à %L a les constructions/routines de périphérique OpenMP mais ne défini pas !$OMP REQUIRES %s alors que d'autres unités de programmes le font"
#: fortran/openmp.cc:7375
#, gcc-internal-format
@@ -77736,10 +77577,9 @@ msgid "Clause expected at %C"
msgstr "Clause attendue Ă  %C"
#: fortran/openmp.cc:7563
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected UNIFIED_ADDRESS, UNIFIED_SHARED_MEMORY, DYNAMIC_ALLOCATORS, REVERSE_OFFLOAD, or ATOMIC_DEFAULT_MEM_ORDER clause at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected UNIFIED_ADDRESS, UNIFIED_SHARED_MEMORY, SELF_MAPS, DYNAMIC_ALLOCATORS, REVERSE_OFFLOAD, or ATOMIC_DEFAULT_MEM_ORDER clause at %L"
-msgstr "Clause UNIFIED_ADDRESS, UNIFIED_SHARED_MEMORY, DYNAMIC_ALLOCATORS, REVERSE_OFFLOAD ou ATOMIC_DEFAULT_MEM_ORDER attendue Ă  %L"
+msgstr "Clause UNIFIED_ADDRESS, UNIFIED_SHARED_MEMORY, SELF_MAPS, DYNAMIC_ALLOCATORS, REVERSE_OFFLOAD ou ATOMIC_DEFAULT_MEM_ORDER attendue Ă  %L"
#: fortran/openmp.cc:7589
#, gcc-internal-format, gfc-internal-format
@@ -77998,8 +77838,7 @@ msgid "ORDERED clause parameter is less than COLLAPSE at %L"
msgstr "Le paramĂštre de la clause ORDERED est plus petit que COLLAPSE Ă  %L"
#: fortran/openmp.cc:8629
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "ORDER clause must not be used together ORDERED at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "ORDER clause must not be used together with ORDERED at %L"
msgstr "la clause ORDER ne doit pas ĂȘtre utilisĂ©e avec ORDERED Ă  %L"
@@ -78030,16 +77869,14 @@ msgid "FINAL clause at %L requires a scalar LOGICAL expression"
msgstr "La clause FINAL Ă  %L requiert une expression LOGICAL scalaire"
#: fortran/openmp.cc:8804
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "IF clause at %L requires a scalar LOGICAL expression"
+#, gcc-internal-format, gfc-internal-format
msgid "NOVARIANTS clause at %L requires a scalar LOGICAL expression"
-msgstr "La clause IF Ă  %L requiert une expression LOGICAL scalaire"
+msgstr "La clause NOVARIANTS Ă  %L requiert une expression LOGICAL scalaire"
#: fortran/openmp.cc:8814
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "SELF clause at %L requires a scalar LOGICAL expression"
+#, gcc-internal-format, gfc-internal-format
msgid "NOCONTEXT clause at %L requires a scalar LOGICAL expression"
-msgstr "La clause SELF Ă  %L requiert une expression LOGICAL scalaire"
+msgstr "La clause NOCONTEXT Ă  %L requiert une expression LOGICAL scalaire"
#: fortran/openmp.cc:8825
#, gcc-internal-format, gfc-internal-format
@@ -78117,24 +77954,22 @@ msgstr "Le symbole %qs a des accĂšs sur des composants mixtes et des non composa
#: fortran/openmp.cc:9028
#, gcc-internal-format
msgid "DEPEND clause at %L requires action clause with %<targetsync%> interop-type"
-msgstr ""
+msgstr "La clause DEPEND Ă  %L requiert une clause d'action avec le type interop %<targetsync%>"
#: fortran/openmp.cc:9035
#, gcc-internal-format
msgid "DEPEND clause at %L requires %<targetsync%> interop-type, lacking it for %qs at %L"
-msgstr ""
+msgstr "La clause DEPEND Ă  %L requiert le type interop %<targetsync%>, il est manquant pour %qs Ă  %L"
#: fortran/openmp.cc:9050
-#, fuzzy, gcc-internal-format
-#| msgid "Allocator %qs at %L in USES_ALLOCATORS must be a scalar integer of kind %<omp_allocator_handle_kind%>"
+#, gcc-internal-format
msgid "%qs at %L in %qs clause must be a scalar integer variable of %<omp_interop_kind%> kind"
-msgstr "L'allocateur %qs Ă  %L dans USES_ALLOCATORS doit ĂȘtre un entier scalaire de type %<omp_allocator_handle_kind%>"
+msgstr "%qs Ă  %L dans la clause %qs doit ĂȘtre une variable entiĂšre scalaire de type %<omp_interop_kind%>"
#: fortran/openmp.cc:9055
-#, fuzzy, gcc-internal-format
-#| msgid "%qs and %qs cannot both be enabled"
+#, gcc-internal-format
msgid "%qs at %L in %qs clause must be definable"
-msgstr "%qs et %qs ne peuvent pas ĂȘtre activĂ©s tous les deux"
+msgstr "%qs Ă  %L dans la clause %qs doivent ĂȘtre dĂ©finissables"
#: fortran/openmp.cc:9094
#, gcc-internal-format
@@ -78332,10 +78167,9 @@ msgid "List item %qs with allocatable components is not permitted in map clause
msgstr "L'élément de liste %qs avec des composants allouables n'est pas permis dans la clause « map » à %L"
#: fortran/openmp.cc:9704
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "comparison with string literal results in unspecified behavior"
+#, gcc-internal-format, gfc-internal-format
msgid "Mapping polymorphic list item at %L is unspecified behavior"
-msgstr "une comparaison avec une chaßne littérale produit un résultat non spécifié"
+msgstr "Le mapping d'un élément de liste polymorphique à %L est un comportement non spécifié"
# %s est «  data » ou rien.
#: fortran/openmp.cc:9740
@@ -78433,7 +78267,7 @@ msgstr "Gestionnaire d'événement DETACH %qs dans la clause %s à %L"
#: fortran/openmp.cc:10035
#, gcc-internal-format, gfc-internal-format
msgid "FIRSTPRIVATE with polymorphic list item at %L is unspecified behavior"
-msgstr ""
+msgstr "FIRSTPRIVATE avec un élément de liste polymorphique à %L a un comportement non spécifié"
#: fortran/openmp.cc:10064
#, gcc-internal-format, gfc-internal-format
@@ -78496,22 +78330,19 @@ msgid "DIST_SCHEDULE clause's chunk_size at %L requires a scalar INTEGER express
msgstr "Le chunk_size de la clause DIST_SCHEDULE Ă  %L requiert une expression INTEGER scalaire"
#: fortran/openmp.cc:10359
-#, fuzzy, gcc-internal-format
-#| msgid "%<DETACH%> clause at %L must not be used together with %<MERGEABLE%> clause"
+#, gcc-internal-format
msgid "%<GRAINSIZE%> clause at %L must not be used together with %<NUM_TASKS%> clause"
-msgstr "la clause %<DETACH%> Ă  %L ne doit pas ĂȘtre utilisĂ©e avec la clause %<MERGEABLE%>"
+msgstr "la clause %<GRAINSIZE%> Ă  %L ne doit pas ĂȘtre utilisĂ©e avec la clause %<NUM_TASKS%>"
#: fortran/openmp.cc:10362
-#, fuzzy, gcc-internal-format
-#| msgid "%<DETACH%> clause at %L must not be used together with %<MERGEABLE%> clause"
+#, gcc-internal-format
msgid "%<REDUCTION%> clause at %L must not be used together with %<NOGROUP%> clause"
-msgstr "la clause %<DETACH%> Ă  %L ne doit pas ĂȘtre utilisĂ©e avec la clause %<MERGEABLE%>"
+msgstr "la clause %<REDUCTION%> Ă  %L ne doit pas ĂȘtre utilisĂ©e avec la clause %<NOGROUP%>"
#: fortran/openmp.cc:10366
-#, fuzzy, gcc-internal-format
-#| msgid "%<DETACH%> clause at %L must not be used together with %<MERGEABLE%> clause"
+#, gcc-internal-format
msgid "%<FULL%> clause at %C must not be used together with %<PARTIAL%> clause"
-msgstr "la clause %<DETACH%> Ă  %L ne doit pas ĂȘtre utilisĂ©e avec la clause %<MERGEABLE%>"
+msgstr "la clause %<FULL%> Ă  %C ne doit pas ĂȘtre utilisĂ©e avec la clause %<PARTIAL%>"
#: fortran/openmp.cc:10389
#, gcc-internal-format, gfc-internal-format
@@ -78529,10 +78360,9 @@ msgid "%s must contain at least one MAP clause at %L"
msgstr "%s doit contenir au moins une clause MAP Ă  %L"
#: fortran/openmp.cc:10426
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "TILE requires constant expression at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "SIZES requires constant expression at %L"
-msgstr "TILE requiert une expression constante Ă  %L"
+msgstr "SIZES requiert une expression constante Ă  %L"
#: fortran/openmp.cc:10442
#, gcc-internal-format
@@ -78635,8 +78465,7 @@ msgid "expr in !$OMP ATOMIC COMPARE assignment var = expr must be scalar and can
msgstr "expr dans l'affectation var = expr de !$OMP ATOMIC COMPARE doit ĂȘtre scalaire et ne peut pas faire rĂ©fĂ©rence Ă  var Ă  %L"
#: fortran/openmp.cc:10868
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "!$OMP ATOMIC UPDATE at %L with FAIL clause requiries either the COMPARE clause or using the intrinsic MIN/MAX procedure"
+#, gcc-internal-format, gfc-internal-format
msgid "!$OMP ATOMIC UPDATE at %L with FAIL clause requires either the COMPARE clause or using the intrinsic MIN/MAX procedure"
msgstr "!$OMP ATOMIC UPDATE à %L avec la clause FAIL requiert soit la clause COMPARE ou l'utilisation de la procédure intrinsÚque MIN/MAX"
@@ -78726,10 +78555,9 @@ msgid "%s cannot contain OpenMP API call in intervening code at %L"
msgstr "%s ne peut pas contenir d'appel Ă  l'api OpenMP dans le code intervenant Ă  %L"
#: fortran/openmp.cc:12062
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "LINEAR clause modifier used on DO or SIMD construct at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "SIZES clause is required on !$OMP TILE construct at %L"
-msgstr "Modificateur de clause LINEAR utilisé sur la construction DO ou SIMD à %L"
+msgstr "La clause SIZES est requise sur la construction !$OMP TILE Ă  %L"
#: fortran/openmp.cc:12089
#, gcc-internal-format, gfc-internal-format
@@ -78744,22 +78572,22 @@ msgstr "%s ne peut pas ĂȘtre une boucle DO CONCURRENT Ă  %L"
#: fortran/openmp.cc:12105
#, gcc-internal-format, gfc-internal-format
msgid "Generated loop of UNROLL construct at %L without PARTIAL clause does not have canonical form"
-msgstr ""
+msgstr "La boucle générée par la construction UNROLL à %L sans la clause PARTIAL n'a pas la forme canonique"
#: fortran/openmp.cc:12112
#, gcc-internal-format, gfc-internal-format
msgid "UNROLL construct at %L with PARTIAL clause generates just one loop with canonical form but %d loops are needed"
-msgstr ""
+msgstr "La construction UNROLL à %L sans la clause PARTIAL génÚre juste une boucle avec la forme canonique mais %d boucles sont nécessaires"
#: fortran/openmp.cc:12127
#, gcc-internal-format, gfc-internal-format
msgid "TILE construct at %L generates %d loops with canonical form but %d loops are needed"
-msgstr ""
+msgstr "La construction TILE à %L génÚre %d boucles avec la forme canonique mais %d boucles sont nécessaires"
#: fortran/openmp.cc:12138
#, gcc-internal-format
msgid "Imperfectly nested loop using generated loops"
-msgstr ""
+msgstr "Boucle imparfaitement imbriquée en utilisant les boucles générées"
#: fortran/openmp.cc:12150
#, gcc-internal-format, gfc-internal-format
@@ -78829,7 +78657,7 @@ msgstr "l'expression d'incrément de boucle %s à %L utilise une variable liée
#: fortran/openmp.cc:12252
#, gcc-internal-format
msgid "Non-rectangular loops from generated loops unsupported"
-msgstr ""
+msgstr "Les boucles non rectangulaires depuis des boucles générées ne sont pas supportées"
#. Parse error, can't recover from this.
#: fortran/openmp.cc:12268
@@ -78850,10 +78678,9 @@ msgstr "les boucles internes %s doivent ĂȘtre parfaitement imbriquĂ©es avec la c
# %s peut ĂȘtre « tiled » ou « collapsed », sans traduction

#: fortran/openmp.cc:12294
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%s inner loops must be perfectly nested with ORDERED clause at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "%s inner loops must be perfectly nested at %L"
-msgstr "les boucles internes %s doivent ĂȘtre parfaitement imbriquĂ©es avec la clause ORDERED Ă  %L"
+msgstr "les boucles internes %s doivent ĂȘtre parfaitement imbriquĂ©es Ă  %L"
#: fortran/openmp.cc:12548 fortran/openmp.cc:12561
#, gcc-internal-format, gfc-internal-format
@@ -78931,12 +78758,12 @@ msgstr "la région !$OMP TARGET à %L dans un TEAMS imbriqué ne peut contenir a
#: fortran/openmp.cc:12938
#, gcc-internal-format
msgid "%<OMP DISPATCH%> directive at %L must be followed by a procedure call with optional assignment"
-msgstr ""
+msgstr "la directive %<OMP DISPATCH%> Ă  %L doit ĂȘtre suivie d'un appel de procĂ©dure avec une affectation optionnelle"
#: fortran/openmp.cc:12945
#, gcc-internal-format
msgid "%<OMP DISPATCH%> directive at %L cannot be followed by a procedure pointer"
-msgstr ""
+msgstr "la directive %<OMP DISPATCH%> Ă  %L ne peut pas ĂȘtre suivie par un pointeur de procĂ©dure"
#: fortran/openmp.cc:13040
#, gcc-internal-format, gfc-internal-format
@@ -78959,21 +78786,19 @@ msgid "!$OMP DECLARE SIMD should refer to containing procedure %qs at %L"
msgstr "!$OMP DECLARE SIMD devrait faire référence à la procédure contenante %qs à %L"
#: fortran/openmp.cc:13125
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected constant logical expression"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected constant non-negative scalar integer offset expression at %L"
-msgstr "expression logique constante attendue"
+msgstr "Expression de décalage entiÚre scalaire non négative constante attendue à %L"
#: fortran/openmp.cc:13128
#, gcc-internal-format
msgid "For range-based %<adjust_args%>, a constant positive scalar integer expression is required at %L"
-msgstr ""
+msgstr "Pour %<adjust_args%> basé sur une plage, une expression entiÚre scalaire positive constante est requise à %L"
#: fortran/openmp.cc:13142
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected character in variable list at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected dummy parameter name or a positive integer at %L"
-msgstr "CaractĂšre inattendu dans la liste de variable Ă  %C"
+msgstr "Nom de paramĂštre muet ou entier positif attendu Ă  %L"
#: fortran/openmp.cc:13168
#, gcc-internal-format, gfc-internal-format
@@ -79116,10 +78941,9 @@ msgid "The value of n in %<-finit-character=n%> must be between 0 and 127"
msgstr "La valeur de n dans %<-finit-character=n%> doit ĂȘtre comprise entre 0 et 127"
#: fortran/options.cc:889
-#, fuzzy, gcc-internal-format
-#| msgid "command-line option %qs is valid for %s but not for %s"
+#, gcc-internal-format
msgid "command-line option %<-fno-builtin-%s%> is not valid for Fortran"
-msgstr "l'option de la ligne de commande %qs est valable pour %s mais pas pour %s"
+msgstr "l'option de la ligne de commande %<-fno-builtin-%s%> n'est pas valable en Fortran"
#: fortran/parse.cc:665
#, gcc-internal-format, gfc-internal-format
@@ -79556,10 +79380,9 @@ msgstr "Le bloc DO nommé à %L requiert un nom ENDDO correspondant"
#. "begin metadirective" construct, or perhaps the
#. "end metadirective" is missing entirely.
#: fortran/parse.cc:5817 fortran/parse.cc:6314
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected junk after OMP THREADPRIVATE at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected OMP END METADIRECTIVE at %C"
-msgstr "Rebut inattendu aprĂšs OMP THREADPRIVATE Ă  %C"
+msgstr "OMP END METADIRECTIVE attendue Ă  %C"
#: fortran/parse.cc:5827 fortran/parse.cc:6330 fortran/parse.cc:6348
#, gcc-internal-format, gfc-internal-format
@@ -79609,29 +79432,27 @@ msgstr "Les noms aprĂšs !$omp critical et !$omp end critical ne correspondent pa
#: fortran/parse.cc:6405
#, gcc-internal-format
msgid "%<OMP DISPATCH%> directive must be followed by a procedure call with optional assignment at %C"
-msgstr ""
+msgstr "La directive %<OMP DISPATCH%> doit ĂȘtre suivie d'un appel de procĂ©dure avec une affectation optionnelle Ă  %C"
#: fortran/parse.cc:6416
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicated NOWAIT clause on %s and %s at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicated NOWAIT clause on !$OMP DISPATCH and !$OMP END DISPATCH at %C"
-msgstr "Clause NOWAIT dupliquée sur %s et %s à %C"
+msgstr "Clause NOWAIT dupliquée sur !$OMP DISPATCH et !$OMP END DISPATCH à %C"
#: fortran/parse.cc:6488
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected %s statement in WHERE block at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Unexpected %s statement in OMP METADIRECTIVE block at %C"
-msgstr "Instruction %s inattendue dans le bloc WHERE Ă  %C"
+msgstr "Instruction %s inattendue dans le bloc OMP METADIRECTIVE Ă  %C"
#: fortran/parse.cc:6529
#, gcc-internal-format, gfc-internal-format
msgid "Variants in a metadirective at %L have different associations; consider using a BLOCK construct or BEGIN/END METADIRECTIVE"
-msgstr ""
+msgstr "Les variantes dans une métadirective à %L ont des associations différentes ; envisagez d'utiliser une construction BLOCK ou BEGIN/END METADIRECTIVE"
#: fortran/parse.cc:6534
#, gcc-internal-format, gfc-internal-format
msgid "Variants in a metadirective at %L have different associations; consider using a BLOCK construct"
-msgstr ""
+msgstr "Les variantes dans une métadirective à %L ont des associations différentes ; envisagez d'utiliser une construction BLOCK"
#: fortran/parse.cc:6584
#, gcc-internal-format, gfc-internal-format
@@ -79749,10 +79570,9 @@ msgid "Integer too big for its kind at %C. This check can be disabled with the o
msgstr "L'entier est trop grand pour son sous-type Ă  %C. Cette vĂ©rification peut ĂȘtre dĂ©sactivĂ©e avec l'option %<-fno-range-check%>"
#: fortran/primary.cc:388
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Integer kind %d at %C not available"
+#, gcc-internal-format, gfc-internal-format
msgid "Unsigned kind %d at %C not available"
-msgstr "Le sous-type %d Ă  %C n'est pas disponible pour un entier"
+msgstr "Le sous-type non signé %d à %C n'est pas disponible"
#: fortran/primary.cc:419
#, gcc-internal-format, gfc-internal-format
@@ -80028,10 +79848,9 @@ msgid "Procedure pointer component %qs requires an argument list at %C"
msgstr "Le composant pointeur de procédure %qs requiert une liste d'arguments à %C"
#: fortran/primary.cc:2833
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected array subscript stride at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Unexpected array/substring ref at %C"
-msgstr "Longueur de pas d'indice de tableau attendu Ă  %C"
+msgstr "Référence de tableau/sous-chaßne inattendue à %C"
#: fortran/primary.cc:2855
#, gcc-internal-format, gfc-internal-format
@@ -80525,10 +80344,9 @@ msgid "The element in the structure constructor at %L, for pointer component %qs
msgstr "L'Ă©lĂ©ment dans le constructeur de structure Ă  %L pour le composant pointeur %qs devrait ĂȘtre un POINTER ou un TARGET"
#: fortran/resolve.cc:1589
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Pointer assignment with vector subscript on rhs at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Pointer assignment target at %L has a vector subscript"
-msgstr "Affectation de pointeur avec un indice de vecteur dans le membre de droite Ă  %L"
+msgstr "La cible de l'affectation de pointeur Ă  %L a un indice vectoriel"
#: fortran/resolve.cc:1601
#, gcc-internal-format
@@ -80710,10 +80528,9 @@ msgstr "La fonction %qs Ă  %L n'a pas de type IMPLICIT"
# %s Ă  la fin est le texte non traduit "mask" ou "block"
#: fortran/resolve.cc:3261
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Reference to impure function %qs at %L inside a DO CONCURRENT %s"
+#, gcc-internal-format, gfc-internal-format
msgid "Reference to impure function at %L inside a DO CONCURRENT"
-msgstr "Référence à la fonction impure %qs à %L à l'intérieur d'un DO CONCURRENT %s"
+msgstr "Référence à la fonction impure à %L à l'intérieur d'un DO CONCURRENT"
# %s Ă  la fin est le texte non traduit "mask" ou "block"
#: fortran/resolve.cc:3271
@@ -80759,10 +80576,9 @@ msgid "Function %qs is declared CHARACTER(*) and cannot be used at %L since it i
msgstr "La fonction %qs est dĂ©clarĂ©e CHARACTER(*) et ne peut pas ĂȘtre utilisĂ©e Ă  %L car elle n'est pas un argument muet"
#: fortran/resolve.cc:3447
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Missing argument list in function %qs at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Different argument lists in external dummy function %s at %L and %L"
-msgstr "Liste d'arguments manquante dans la fonction %qs Ă  %C"
+msgstr "Listes d'arguments différentes dans la fonction muette externe %s à %L et %L"
#: fortran/resolve.cc:3486
#, gcc-internal-format
@@ -80795,10 +80611,9 @@ msgid "Using function %qs at %L is deprecated"
msgstr "L'utilisation de la fonction %qs Ă  %L est obsolĂšte"
#: fortran/resolve.cc:3666
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Subroutine call to %qs in DO CONCURRENT block at %L is not PURE"
+#, gcc-internal-format, gfc-internal-format
msgid "Subroutine call at %L in a DO CONCURRENT block is not PURE"
-msgstr "L'appel de sous-routine Ă  %qs dans le bloc DO CONCURRENT Ă  %L n'est pas PURE"
+msgstr "L'appel de sous-routine Ă  %L dans le bloc DO CONCURRENT n'est pas PURE"
#: fortran/resolve.cc:3674
#, gcc-internal-format
@@ -80853,7 +80668,7 @@ msgstr "SUBROUTINE %qs Ă  %L ne peut pas ĂȘtre appelĂ©e rĂ©cursivement car elle
#: fortran/resolve.cc:3995
#, gcc-internal-format, gfc-internal-format
msgid "Different argument lists in external dummy subroutine %s at %L and %L"
-msgstr ""
+msgstr "Liste d'arguments différentes dans la sous-routine muette externe %s à %L et %L"
#: fortran/resolve.cc:4026
#, gcc-internal-format
@@ -80891,10 +80706,9 @@ msgid "BOZ literal constant at %L cannot be an operand of unary operator %qs"
msgstr "La constante littĂ©rale BOZ Ă  %L ne peut pas ĂȘtre un opĂ©rande de l'opĂ©rateur unaire %qs"
#: fortran/resolve.cc:4332
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "comparison of unsigned expression in %<>= 0%> is always true"
+#, gcc-internal-format, gfc-internal-format
msgid "Negation of unsigned expression at %L not permitted "
-msgstr "la comparaison d'une expression non signée %<>= 0%> est toujours vraie"
+msgstr "La négation d'une expression non signée à %L n'est pas permise "
#: fortran/resolve.cc:4353
#, gcc-internal-format
@@ -80902,52 +80716,44 @@ msgid "Operands at %L and %L cannot appear as operands of binary operator %qs"
msgstr "Les opérandes à %L et %L ne peuvent pas apparaßtre comme opérandes de l'opérateur binaire %qs"
#: fortran/resolve.cc:4363
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Invalid context for NULL() pointer at %%L"
+#, gcc-internal-format, gfc-internal-format
msgid "Invalid context for NULL() pointer at %L"
-msgstr "Contexte invalide pour un pointeur NULL() Ă  %%L"
+msgstr "Contexte invalide pour un pointeur NULL() Ă  %L"
#: fortran/resolve.cc:4381
-#, fuzzy, gcc-internal-format
-#| msgid "Operand of unary numeric operator %%<%s%%> at %%L is %s"
+#, gcc-internal-format
msgid "Operand of unary numeric operator %qs at %L is %s"
-msgstr "L'opérande de l'opérateur numérique unaire %%<%s%%> à %%L est %s"
+msgstr "L'opérande de l'opérateur numérique unaire %qs à %L est %s"
#: fortran/resolve.cc:4396 fortran/resolve.cc:4430
-#, fuzzy, gcc-internal-format
-#| msgid "Operands of binary numeric operator %%<%s%%> at %%L are %s/%s"
+#, gcc-internal-format
msgid "Operands of binary numeric operator %qs at %L are %s/%s"
-msgstr "Les opérandes de l'opérateur numérique binaire %%<%s%%> à %%L sont %s/%s"
+msgstr "Les opérandes de l'opérateur numérique binaire %qs à %L sont %s/%s"
#: fortran/resolve.cc:4410 fortran/resolve.cc:4599 fortran/resolve.cc:4768
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Inconsistent ranks for operator at %%L and %%L"
+#, gcc-internal-format, gfc-internal-format
msgid "Inconsistent ranks for operator at %L and %L"
-msgstr "Rangs inconsistant pour l'opérateur à %%L et %%L"
+msgstr "Rangs inconsistant pour l'opérateur à %L et %L"
#: fortran/resolve.cc:4422
-#, fuzzy, gcc-internal-format
-#| msgid "Unexpected derived-type entities in binary intrinsic numeric operator %%<%s%%> at %%L"
+#, gcc-internal-format
msgid "Unexpected derived-type entities in binary intrinsic numeric operator %qs at %L"
-msgstr "Entités de type dérivé inattendues dans l'opérateur numérique intrinsÚque binaire %%<%s%%> à %%L"
+msgstr "Entités de type dérivé inattendues dans l'opérateur numérique intrinsÚque binaire %qs à %L"
#: fortran/resolve.cc:4446
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Operands of string concatenation operator at %%L are %s/%s"
+#, gcc-internal-format, gfc-internal-format
msgid "Operands of string concatenation operator at %L are %s/%s"
-msgstr "Les opérandes de l'opérateur de concaténation de chaßnes à %%L sont %s/%s"
+msgstr "Les opérandes de l'opérateur de concaténation de chaßnes à %L sont %s/%s"
#: fortran/resolve.cc:4489
-#, fuzzy, gcc-internal-format
-#| msgid "Operands of logical operator %%<%s%%> at %%L are %s/%s"
+#, gcc-internal-format
msgid "Operands of logical operator %qs at %L are %s/%s"
-msgstr "Les opérandes de l'opérateur logique %%<%s%%> à %%L sont %s/%s"
+msgstr "Les opérandes de l'opérateur logique %qs à %L sont %s/%s"
#: fortran/resolve.cc:4512
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Operand of .not. operator at %%L is %s"
+#, gcc-internal-format, gfc-internal-format
msgid "Operand of .not. operator at %L is %s"
-msgstr "L'opérande de l'opérateur .not. à %%L est %s"
+msgstr "L'opérande de l'opérateur .not. à %L est %s"
#: fortran/resolve.cc:4527
#, gcc-internal-format, gfc-internal-format
@@ -80960,10 +80766,9 @@ msgid "BOZ literal constant near %L cannot appear as an operand of a relational
msgstr "La constante littérale BOZ prÚs de %L ne peut pas apparaßtre comme opérande d'un opérateur relationnel"
#: fortran/resolve.cc:4607
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Inconsistent ranks for operator at %%L and %%L"
+#, gcc-internal-format, gfc-internal-format
msgid "Inconsistent types for operator at %L and %L: %s and %s"
-msgstr "Rangs inconsistant pour l'opérateur à %%L et %%L"
+msgstr "Types inconsistants pour l'opérateur à %L et %L : %s et %s"
#: fortran/resolve.cc:4631
#, gcc-internal-format, gfc-internal-format
@@ -80976,40 +80781,34 @@ msgid "Inequality comparison for %s at %L"
msgstr "Comparaison inégalitaire pour %s à %L"
#: fortran/resolve.cc:4646
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Logicals at %%L must be compared with %s instead of %s"
+#, gcc-internal-format, gfc-internal-format
msgid "Logicals at %L must be compared with %s instead of %s"
-msgstr "Les valeurs logiques Ă  %%L doivent ĂȘtre comparĂ©es avec %s au lieu de %s"
+msgstr "Les valeurs logiques Ă  %L doivent ĂȘtre comparĂ©es avec %s au lieu de %s"
#: fortran/resolve.cc:4654
-#, fuzzy, gcc-internal-format
-#| msgid "Operands of comparison operator %%<%s%%> at %%L are %s/%s"
+#, gcc-internal-format
msgid "Operands of comparison operator %qs at %L are %s/%s"
-msgstr "Les opérandes de l'opérateur de comparaison %%<%s%%> à %%L sont %s/%s"
+msgstr "Les opérandes de l'opérateur de comparaison %qs à %L sont %s/%s"
#: fortran/resolve.cc:4669
-#, fuzzy, gcc-internal-format
-#| msgid "Unknown operator %%<%s%%> at %%L; did you mean %%<%s%%>?"
+#, gcc-internal-format
msgid "Unknown operator %qs at %L; did you mean %qs?"
-msgstr "Opérateur %%<%s%%> inconnu à %%L; vouliez-vous utiliser %%<%s%%> ?"
+msgstr "Opérateur %qs inconnu à %L; vouliez-vous utiliser %qs ?"
#: fortran/resolve.cc:4672
-#, fuzzy, gcc-internal-format
-#| msgid "Unknown operator %%<%s%%> at %%L"
+#, gcc-internal-format
msgid "Unknown operator %qs at %L"
-msgstr "Opérateur %%<%s%%> inconnu à %%L"
+msgstr "Opérateur %qs inconnu à %L"
#: fortran/resolve.cc:4677
-#, fuzzy, gcc-internal-format
-#| msgid "Operand of user operator %%<%s%%> at %%L is %s"
+#, gcc-internal-format
msgid "Operand of user operator %qs at %L is %s"
-msgstr "L'opérande de l'opérateur utilisateur %%<%s%%> à %%L est %s"
+msgstr "L'opérande de l'opérateur utilisateur %qs à %L est %s"
#: fortran/resolve.cc:4684
-#, fuzzy, gcc-internal-format
-#| msgid "Operands of user operator %%<%s%%> at %%L are %s/%s"
+#, gcc-internal-format
msgid "Operands of user operator %qs at %L are %s/%s"
-msgstr "Les opérandes de l'opérateur utilisateur %%<%s%%> à %%L sont %s/%s"
+msgstr "Les opérandes de l'opérateur utilisateur %qs à %L sont %s/%s"
#: fortran/resolve.cc:4698
#, gcc-internal-format
@@ -81017,10 +80816,9 @@ msgid "resolve_operator(): Bad intrinsic"
msgstr "resolve_operator(): Mauvais intrinsĂšque"
#: fortran/resolve.cc:4796
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Inconsistent ranks for operator at %%L and %%L"
+#, gcc-internal-format, gfc-internal-format
msgid "Inconsistent coranks for operator at %L and %L"
-msgstr "Rangs inconsistant pour l'opérateur à %%L et %%L"
+msgstr "Corangs inconsistants pour l'opérateur à %L et %L"
#: fortran/resolve.cc:4995
#, gcc-internal-format, gfc-internal-format
@@ -81138,45 +80936,39 @@ msgid "Array index at %L is an array of rank %d"
msgstr "L'index de tableau Ă  %L est un tableau de rang %d"
#: fortran/resolve.cc:5470
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Argument dim at %L must be scalar"
+#, gcc-internal-format, gfc-internal-format
msgid "TEAM_NUMBER argument at %L must be scalar"
-msgstr "L'argument dim Ă  %L doit ĂȘtre scalaire"
+msgstr "L'argument TEAM_NUMBER Ă  %L doit ĂȘtre scalaire"
#: fortran/resolve.cc:5477
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expression at %L must be of INTEGER type, found %s"
+#, gcc-internal-format, gfc-internal-format
msgid "TEAM_NUMBER argument at %L must be of INTEGER type, found %s"
-msgstr "L'expression Ă  %L doit ĂȘtre du type INTEGER et non %s"
+msgstr "L'argument TEAM_NUMBER Ă  %L doit ĂȘtre du type INTEGER et non %s"
#: fortran/resolve.cc:5491
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Argument dim at %L must be scalar"
+#, gcc-internal-format, gfc-internal-format
msgid "TEAM argument at %L must be scalar"
-msgstr "L'argument dim Ă  %L doit ĂȘtre scalaire"
+msgstr "L'argument TEAM Ă  %L doit ĂȘtre scalaire"
#: fortran/resolve.cc:5500
#, gcc-internal-format, gfc-internal-format
msgid "TEAM argument at %L must be of TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV, found %s"
-msgstr ""
+msgstr "L'argument TEAM Ă  %L doit ĂȘtre du type TEAM_TYPE du module intrinsĂšque ISO_FORTRAN_ENV et non %s"
#: fortran/resolve.cc:5514
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Argument dim at %L must be scalar"
+#, gcc-internal-format, gfc-internal-format
msgid "STAT argument at %L must be scalar"
-msgstr "L'argument dim Ă  %L doit ĂȘtre scalaire"
+msgstr "L'argument STAT Ă  %L doit ĂȘtre scalaire"
#: fortran/resolve.cc:5521
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expression at %L must be of INTEGER type, found %s"
+#, gcc-internal-format, gfc-internal-format
msgid "STAT argument at %L must be of INTEGER type, found %s"
-msgstr "L'expression Ă  %L doit ĂȘtre du type INTEGER et non %s"
+msgstr "L'argument STAT Ă  %L doit ĂȘtre du type INTEGER et non %s"
#: fortran/resolve.cc:5530
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expression at %L must be scalar"
+#, gcc-internal-format, gfc-internal-format
msgid "STAT's expression at %L must be a variable"
-msgstr "L'expression Ă  %L doit ĂȘtre un scalaire"
+msgstr "L'expression de STAT Ă  %L doit ĂȘtre une variable"
#: fortran/resolve.cc:5552
#, gcc-internal-format, gfc-internal-format
@@ -81229,10 +81021,9 @@ msgid "gfc_expression_rank(): Two array specs"
msgstr "gfc_expression_rank(): Deux specs de tableau"
#: fortran/resolve.cc:6012
-#, fuzzy, gcc-internal-format
-#| msgid "negative array index %s"
+#, gcc-internal-format
msgid "Illegal coarray index"
-msgstr "index de tableau négatif %s"
+msgstr "Index de co-tableau illégal"
#: fortran/resolve.cc:6060
#, gcc-internal-format, gfc-internal-format
@@ -81406,112 +81197,102 @@ msgstr "La boucle DO à %L est indéfinie car elle déborde vers le bas"
#: fortran/resolve.cc:8110
#, gcc-internal-format
msgid "Variable %qs referenced in concurrent-header at %L must not appear in LOCAL locality-spec at %L"
-msgstr ""
+msgstr "La variable %qs rĂ©fĂ©rencĂ©e dans l'en-tĂȘte concurrent Ă  %L ne peut pas apparaĂźtre dans une spec de localitĂ© LOCAL Ă  %L"
#: fortran/resolve.cc:8146
#, gcc-internal-format
msgid "Variable %qs at %L not specified in a locality spec of DO CONCURRENT at %L but required due to DEFAULT (NONE)"
-msgstr ""
+msgstr "La variable %qs à %L n'est pas spécifiée dans le spécificateur de localité de DO CONCURRENT à %L mais elle est requises à cause de DEFAULT (NONE)"
#: fortran/resolve.cc:8198
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected variable name at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected variable name in %s locality spec at %L"
-msgstr "Nom de variable attendu Ă  %C"
+msgstr "Nom de variable attendu dans la spécification de localité %s à %L"
#: fortran/resolve.cc:8207
-#, fuzzy, gcc-internal-format
-#| msgid "Variable %qs at %L has not been assigned a format label"
+#, gcc-internal-format
msgid "Variable %qs at %L has already been specified in a locality-spec"
-msgstr "La variable %qs à %L n'a pas reçu d'étiquette de format"
+msgstr "La variable %qs à %L a déjà été spécifiée dans une spécification de localité"
#: fortran/resolve.cc:8217
-#, fuzzy, gcc-internal-format
-#| msgid "SAVE attribute at %L cannot be specified in a PURE procedure"
+#, gcc-internal-format
msgid "Index variable %qs at %L cannot be specified in alocality-spec"
-msgstr "L'attribut SAVE Ă  %L ne peut pas ĂȘtre spĂ©cifiĂ© dans une procĂ©dure PURE"
+msgstr "La variable d'index %qs Ă  %L ne peut pas ĂȘtre spĂ©cifiĂ©e dans une spĂ©cification de localitĂ©"
#: fortran/resolve.cc:8230
#, gcc-internal-format
msgid "OPTIONAL attribute not permitted for %qs in %s locality-spec at %L"
-msgstr ""
+msgstr "L'attribut OPTIONAL n'est pas permis pour %qs dans la spécification de localité %s à %L"
#: fortran/resolve.cc:8237
-#, fuzzy, gcc-internal-format
-#| msgid "Assumed size array %qs in %s clause at %L"
+#, gcc-internal-format
msgid "Assumed-size array not permitted for %qs in %s locality-spec at %L"
-msgstr "Tableau de taille tacite %qs dans la clause %s Ă  %L"
+msgstr "Tableau de taille tacite pas permis pour %qs dans la spécification de localité %s à %L"
#: fortran/resolve.cc:8250
-#, fuzzy, gcc-internal-format
-#| msgid "ALLOCATABLE object %qs in %s clause at %L"
+#, gcc-internal-format
msgid "ALLOCATABLE attribute not permitted for %qs in %s locality-spec at %L"
-msgstr "Objet ALLOCATABLE %qs dans la clause %s Ă  %L"
+msgstr "L'attribut ALLOCATABLE n'est pas permis pour %qs dans la spécification de localité %s à %L"
#: fortran/resolve.cc:8255
#, gcc-internal-format
msgid "Nonpointer polymorphic dummy argument not permitted for %qs in %s locality-spec at %L"
-msgstr ""
+msgstr "L'argument muet polymorphique qui n'est pas un pointeur n'est pas permis pour %qs dans la spécification de localité %s à %L"
#: fortran/resolve.cc:8260
-#, fuzzy, gcc-internal-format
-#| msgid "Coarrays not supported in %s clause at %L"
+#, gcc-internal-format
msgid "Coarray not permitted for %qs in %s locality-spec at %L"
-msgstr "Co-tableaux pas supportés dans la clause %s à %L"
+msgstr "Co-tableaux pas permis pour %qs dans la spécification de localité %s à %L"
#: fortran/resolve.cc:8266
#, gcc-internal-format
msgid "Finalizable type not permitted for %qs in %s locality-spec at %L"
-msgstr ""
+msgstr "Le type finalisable n'est pas permis pour %qs dans la spécification de localité %s à %L"
#: fortran/resolve.cc:8271
-#, fuzzy, gcc-internal-format
-#| msgid "List item %qs with allocatable components is not permitted in map clause at %L"
+#, gcc-internal-format
msgid "Type with ultimate allocatable component not permitted for %qs in %s locality-spec at %L"
-msgstr "L'élément de liste %qs avec des composants allouables n'est pas permis dans la clause « map » à %L"
+msgstr "Le type avec le composant ultimement allouable n'est pas permis pour %s dans la spécification de localité %s à %L"
#: fortran/resolve.cc:8279
#, gcc-internal-format
msgid "ASYNCHRONOUS attribute not permitted for %qs in REDUCE locality-spec at %L"
-msgstr ""
+msgstr "L'attribut ASYNCHRONOUS n'est pas permis pour %qs dans la spécification de localité REDUCE à %L"
#: fortran/resolve.cc:8283
#, gcc-internal-format
msgid "VOLATILE attribute not permitted for %qs in REDUCE locality-spec at %L"
-msgstr ""
+msgstr "L'attribut VOLATILE n'est pas permis pour %qs dans la spécification de localité REDUCE à %L"
#: fortran/resolve.cc:8337
-#, fuzzy, gcc-internal-format
-#| msgid "Unexpected intrinsic type %qs at %L"
+#, gcc-internal-format
msgid "Expected numeric type for %qs in REDUCE at %L, got %s"
-msgstr "Type intrinsĂšque %qs inattendu Ă  %L"
+msgstr "Type numérique attendu pour %qs dans REDUCE à %L, %s obtenu"
#: fortran/resolve.cc:8346
-#, fuzzy, gcc-internal-format
-#| msgid "Expected block name of %qs in %s statement at %L"
+#, gcc-internal-format
msgid "Expected logical type for %qs in REDUCE at %L, got %qs"
-msgstr "On attendait le nom du bloc de %qs dans l'instruction %s Ă  %L"
+msgstr "Type logique attendu pour %qs dans REDUCE Ă  %L, %qs obtenu"
#: fortran/resolve.cc:8364
#, gcc-internal-format
msgid "Expected INTEGER, REAL or CHARACTER type for %qs in REDUCE with MIN/MAX at %L, got %s"
-msgstr ""
+msgstr "Type INTEGER, REAL ou CHARACTER attendu pour %qs dans REDUCE avec MIN/MAX Ă  %L, %s obtenu"
#: fortran/resolve.cc:8373
#, gcc-internal-format
msgid "Expected integer type for %qs in REDUCE with IAND/IOR/IEOR at %L, got %s"
-msgstr ""
+msgstr "Type entier attendu pour %qs dans REDUCE avec IAND/IOR/IEOR Ă  %L, %s obtenu"
#: fortran/resolve.cc:8411
-#, fuzzy, gcc-internal-format
-#| msgid "variable %qD set but not used"
+#, gcc-internal-format
msgid "Variable %qs in locality-spec at %L is not used"
-msgstr "variable %qD définie mais non utilisée"
+msgstr "La variable %qs dans la spécification de localité à %L n'est pas utilisée"
#: fortran/resolve.cc:8428
#, gcc-internal-format
msgid "Sorry, LOCAL and LOCAL_INIT are not yet supported for %<do concurrent%> constructs at %L"
-msgstr ""
+msgstr "Désolé, LOCAL et LOCAL_INIT ne sont pas encore supportés pour les constructions %<do concurrent%> à %L"
#: fortran/resolve.cc:8449
#, gcc-internal-format, gfc-internal-format
@@ -81565,10 +81346,9 @@ msgid "Source-expr at %L and allocate-object at %L must have the same shape"
msgstr "L'expression source Ă  %L et l'objet allouable Ă  %L doivent avoir la mĂȘme forme"
#: fortran/resolve.cc:8905
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Only intrinsic operators can be used in expression at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "The intrinsic NULL cannot be used as source-expr at %L"
-msgstr "Seuls des opĂ©rateurs intrinsĂšques peuvent ĂȘtre utilisĂ©s dans l'expression Ă  %L"
+msgstr "L'intrinsĂšque NULL ne peut pas ĂȘtre utilisĂ© comme expression source Ă  %L"
#: fortran/resolve.cc:8913
#, gcc-internal-format, gfc-internal-format
@@ -81754,7 +81534,7 @@ msgstr "Le bloc SELECT CASE logique Ă  %L a plus de deux cas"
#: fortran/resolve.cc:10070
#, gcc-internal-format, gfc-internal-format
msgid "(F202y)Missing or invalid bound in ASSOCIATE rank remapping of associate name %s at %L"
-msgstr ""
+msgstr "(F202Y)Limite manquante ou invalide dans le remappage du rang avec ASSOCIATE du nom associé %s à %L"
#: fortran/resolve.cc:10086
#, gcc-internal-format
@@ -82042,10 +81822,9 @@ msgid "Variable in the ordinary assignment at %L is a procedure pointer componen
msgstr "La variable dans l'assignation ordinaire à %L est un composant pointeur de procédure"
#: fortran/resolve.cc:12265
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Cannot convert %s to %s at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Cannot assign %s to %s at %L"
-msgstr "Impossible de convertir %s en %s Ă  %L"
+msgstr "Impossible d'assigner %s Ă  %s Ă  %L"
#: fortran/resolve.cc:12313
#, gcc-internal-format
@@ -82251,10 +82030,9 @@ msgid "Entity %qs at %L has a deferred type parameter and requires either the PO
msgstr "L'entité %qs à %L a un paramÚtre de type différé et requiert soit l'attribut POINTER ou ALLOCATABLE"
#: fortran/resolve.cc:14525
-#, fuzzy, gcc-internal-format
-#| msgid "CLASS variable %qs at %L cannot have the PARAMETER attribute"
+#, gcc-internal-format
msgid "Automatic object %qs at %L cannot have the SAVE attribute"
-msgstr "La variable CLASS %qs Ă  %L ne peut pas avoir l'attribut PARAMETER"
+msgstr "La variable automatique %qs Ă  %L ne peut pas avoir l'attribut SAVE"
#. F08:C541. The shape of an array defined in a main program or module
#. * needs to be constant.
@@ -82966,10 +82744,9 @@ msgid "Variable %qs at %L is a coarray and is not ALLOCATABLE, SAVE nor a dummy
msgstr "La variable %qs Ă  %L est un co-tableau qui n'est pas ALLOCATABLE, SAVE ni un argument muet"
#: fortran/resolve.cc:17745
-#, fuzzy, gcc-internal-format
-#| msgid "Coarray variable %qs at %L shall not have codimensions with deferred shape"
+#, gcc-internal-format
msgid "Coarray variable %qs at %L shall not have codimensions with deferred shape without allocatable"
-msgstr "La variable co-tableau %qs à %L n'aura pas de co-dimensions avec une forme différée"
+msgstr "La variable co-tableau %qs Ă  %L n'aura pas de co-dimensions avec une forme diffĂ©rĂ©e sans ĂȘtre allouable"
#: fortran/resolve.cc:17753
#, gcc-internal-format
@@ -83141,23 +82918,22 @@ msgstr "La constante nommĂ©e %qs Ă  %L ne peut pas ĂȘtre un objet EQUIVALENCE"
#: fortran/resolve.cc:18856
#, gcc-internal-format, gfc-internal-format
msgid "Sequence %s with mixed components in EQUIVALENCE statement at %L with different type objects"
-msgstr ""
+msgstr "Séquence %s avec des composants mélangés dans l'instruction EQUIVALENCE à %L avec différent objets de type"
#: fortran/resolve.cc:18866
#, gcc-internal-format, gfc-internal-format
msgid "Non-default type object or sequence %s in EQUIVALENCE statement at %L with objects of different type"
-msgstr ""
+msgstr "Objet de type pas par défaut ou séquence %s dans une instruction EQUIVALENCE à %L avec des objets de types différents"
#: fortran/resolve.cc:18876
#, gcc-internal-format
msgid "Non-CHARACTER object %qs in default CHARACTER EQUIVALENCE statement at %L"
-msgstr ""
+msgstr "Objet non CHARACTER %qs dans l'instruction CHARACTER EQUIVALENCE par défaut à %L"
#: fortran/resolve.cc:18883
-#, fuzzy, gcc-internal-format
-#| msgid "Syntax error in EQUIVALENCE statement at %L"
+#, gcc-internal-format
msgid "Non-NUMERIC object %qs in default NUMERIC EQUIVALENCE statement at %L"
-msgstr "Erreur de syntaxe dans l'instruction EQUIVALENCE Ă  %L"
+msgstr "Objet non NUMERIC %qs dans l'instruction NUMERIC EQUIVALENCE par défaut à %L"
#: fortran/resolve.cc:18901
#, gcc-internal-format
@@ -83250,10 +83026,9 @@ msgid "!$OMP at %C starts a commented line as it neither is followed by a space
msgstr "!$OMP à %C débute une ligne commentée car il n'est ni suivi d'un espace ni une ligne continuée"
#: fortran/scanner.cc:1011
-#, fuzzy, gcc-internal-format
-#| msgid "Ignoring '!$omx' vendor-extension sentinel at %C"
+#, gcc-internal-format
msgid "Ignoring %<!$omx%> vendor-extension sentinel at %C"
-msgstr "La sentinelle !$omx qui est une extension vendeur est ignorée à %C"
+msgstr "La sentinelle %<!$omx%> qui est une extension vendeur est ignorée à %C"
#: fortran/scanner.cc:1323 fortran/scanner.cc:1526
#, gcc-internal-format, gfc-internal-format
@@ -83855,10 +83630,9 @@ msgid "SAVE attribute at %L cannot be specified in a PURE procedure"
msgstr "L'attribut SAVE Ă  %L ne peut pas ĂȘtre spĂ©cifiĂ© dans une procĂ©dure PURE"
#: fortran/symbol.cc:1323
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Duplicate SAVE attribute specified at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Duplicate SAVE attribute specified near %C"
-msgstr "Attribut SAVE spécifié en double à %L"
+msgstr "Attribut SAVE spécifié en double à %C"
#: fortran/symbol.cc:1327
#, gcc-internal-format, gfc-internal-format
@@ -84061,10 +83835,9 @@ msgid "Derived type %qs declared at %L must have the BIND attribute to be C inte
msgstr "Le type dĂ©rivĂ© %qs, dĂ©clarĂ© Ă  %L, doit avoir l'attribut BIND pour ĂȘtre interopĂ©rable avec le C"
#: fortran/symbol.cc:4640
-#, fuzzy, gcc-internal-format
-#| msgid "Derived type %qs with BIND(C) attribute at %L is empty, and may be inaccessible by the C companion processor"
+#, gcc-internal-format
msgid "Derived type %qs with BIND(C) attribute at %L has no components"
-msgstr "Le type dĂ©rivĂ© %qs avec l'attribut BIND(C) Ă  %L est vide et peut ĂȘtre inaccessible pour le processeur C compagnon"
+msgstr "Le type dérivé %qs avec l'attribut BIND(C) à %L n'a pas de composants"
#. Generally emit warning, but not twice if -pedantic is given.
#: fortran/symbol.cc:4646
@@ -84133,10 +83906,9 @@ msgid "Overlapping unequal initializers in EQUIVALENCE at %C"
msgstr "Initialisations inégales et se chevauchant dans EQUIVALENCE à %C"
#: fortran/trans-array.cc:2466 fortran/trans-expr.cc:10425
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "The structure constructor at %C has been finalized. This feature was removed by f08/0011. Use -std=f2018 or -std=gnu to eliminate the finalization."
+#, gcc-internal-format, gfc-internal-format
msgid "The structure constructor at %L has been finalized. This feature was removed by f08/0011. Use -std=f2018 or -std=gnu to eliminate the finalization."
-msgstr "Le constructeur de structure à %C a été finalisé. Cette fonctionnalité a été enlevée par f08/0011. Utilisez -std=f2018 ou -std=gnu pour éliminer la finalisation."
+msgstr "Le constructeur de structure à %L a été rendue finale. Cette fonctionnalité a été enlevée par f08/0011. Utilisez -std=f2018 ou -std=gnu pour éliminer la finalisation."
#. Problems occur when we get something like
#. integer :: a(lots) = (/(i, i=1, lots)/)
@@ -84332,16 +84104,14 @@ msgid "Sorry, !$ACC DECLARE at %L is not allowed in BLOCK construct"
msgstr "Désolé, !$ACC DECLARE à %L n'est pas permis dans une construction BLOCK"
#: fortran/trans-decl.cc:7198 fortran/trans-expr.cc:6117
-#, fuzzy, gcc-internal-format
-#| msgid "Builtin not implemented"
+#, gcc-internal-format
msgid "Unsigned not yet implemented"
-msgstr "Fonction interne non implémentée"
+msgstr "Non signé par encore implémenté"
#: fortran/trans-decl.cc:8316
-#, fuzzy, gcc-internal-format
-#| msgid "Symbol %qs at %C is already in a COMMON block"
+#, gcc-internal-format
msgid "Symbol %qs at %L is declared in a BLOCK DATA program unit but is not in a COMMON block"
-msgstr "Le symbole %qs à %C est déjà dans le bloc COMMON"
+msgstr "Le symbole %qs à %L est déclaré dans une unité de programme BLOCK DATA mais ce n'est pas un bloc COMMON"
#: fortran/trans-expr.cc:1211
#, gcc-internal-format, gfc-internal-format
@@ -84420,10 +84190,9 @@ msgid "implicit mapping of assumed size array %qD"
msgstr "correspondance implicite du tableau de taille tacite %qD"
#: fortran/trans-openmp.cc:1558
-#, fuzzy, gcc-internal-format
-#| msgid "comparison with string literal results in unspecified behavior"
+#, gcc-internal-format
msgid "Implicit mapping of polymorphic variable %qD is unspecified behavior"
-msgstr "une comparaison avec une chaßne littérale produit un résultat non spécifié"
+msgstr "Le correspondance implicite de la variable polymorphique %qD a un comportement non spécifié"
#: fortran/trans-openmp.cc:3362
#, gcc-internal-format
@@ -84476,10 +84245,9 @@ msgid "gfc_trans_omp_workshare(): Bad statement code"
msgstr "gfc_trans_omp_workshare(): Mauvais code d'instruction"
#: fortran/trans-openmp.cc:8735
-#, fuzzy, gcc-internal-format
-#| msgid "The base name for 'declare variant' must be specified at %L "
+#, gcc-internal-format
msgid "The base name for %<declare variant%> must be specified at %L"
-msgstr "Le nom de base pour « declare variant » doit ĂȘtre spĂ©cifiĂ© Ă  %L"
+msgstr "Le nom de base pour %<declare variant%> doit ĂȘtre spĂ©cifiĂ© Ă  %L"
#: fortran/trans-openmp.cc:8745
#, gcc-internal-format, gfc-internal-format
@@ -84524,22 +84292,22 @@ msgstr "la variante %qs et la base %qs à %L ont des types incompatibles : %s"
#: fortran/trans-openmp.cc:8848
#, gcc-internal-format
msgid "%<append_args%> clause implies that %qs has %d dummy arguments of integer type with %<omp_interop_kind%> kind"
-msgstr ""
+msgstr "la clause %<append_args%> implique que %qs a %d arguments muets de type entier avec le sous-type %<omp_interop_kind%>"
#: fortran/trans-openmp.cc:8874
#, gcc-internal-format
msgid "%qs at %L must be a nonpointer, nonallocatable scalar integer dummy argument of %<omp_interop_kind%> kind as it utilized with the %<append_args%> clause at %L"
-msgstr ""
+msgstr "%qs Ă  %L doit ĂȘtre un argument muet entier scalaire non pointeur et non allouable du sous-type %<omp_interop_kind%> car il est utilisĂ© avec la clause %<append_args%> Ă  %L"
#: fortran/trans-openmp.cc:8884
#, gcc-internal-format
msgid "%qs at %L with OPTIONAL attribute not support when utilized with the %<append_args%> clause at %L"
-msgstr ""
+msgstr "%qs à %L avec l'attribut OPTIONAL n'est pas supporté lorsqu'il est utilisé avec la clause %<append_args%> à %L"
#: fortran/trans-openmp.cc:8894
#, gcc-internal-format
msgid "%qs at %L has %d but requires %d %<omp_interop_kind%> kind dummy arguments as it is utilized with the %<append_args%> clause at %L"
-msgstr ""
+msgstr "%qs à %L a %d mais il requiert %d arguments muets du sous-type %<omp_interop_kind%> car il est utilisé avec la clause %<append_args%> à %L"
#: fortran/trans-openmp.cc:8909
#, gcc-internal-format
@@ -84547,58 +84315,49 @@ msgid "the %qs clause can only be specified if the %<dispatch%> selector of the
msgstr "la clause %qs peut uniquement ĂȘtre spĂ©cifiĂ©e si le sĂ©lecteur %<dispatch%> de l'ensemble du sĂ©lecteur du constructeur apparaĂźt dans la clause %<match%> Ă  %L"
#: fortran/trans-openmp.cc:9010 fortran/trans-openmp.cc:9049
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Expected argument list at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected positive argument index at %L"
-msgstr "Liste d'arguments attendue Ă  %C"
+msgstr "Index d'argument positif attendu Ă  %L"
#: fortran/trans-openmp.cc:9021
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "attribute %qs positional argument %i value %wi exceeds number of function arguments %u"
+#, gcc-internal-format, gfc-internal-format
msgid "Argument index at %L exceeds number of arguments %d"
-msgstr "l'attribut %qs, dans son argument positionnel %i, la valeur %wi excĂšde le nombre d'arguments %u de la fonction"
+msgstr "L'index de l'argument à %L dépasse le nombre d'arguments %d"
#: fortran/trans-openmp.cc:9059
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Upper cobound is less than lower cobound at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Upper argument index smaller than lower one at %L"
-msgstr "La co-borne supérieure est plus petite que la co-borne inférieure à %L"
+msgstr "L'index de l'argument le plus grand est plus petit que le plus petit Ă  %L"
#: fortran/trans-openmp.cc:9085
-#, fuzzy, gcc-internal-format
-#| msgid "Variable %qs is not a dummy argument at %L"
+#, gcc-internal-format
msgid "List item %qs at %L, declared at %L, is not a dummy argument"
-msgstr "La variable %qs n'est pas un argument muet Ă  %L"
+msgstr "L'élément de liste %qs à %L, déclaré à %L, n'est pas un argument muet"
#: fortran/trans-openmp.cc:9099
-#, fuzzy, gcc-internal-format
-#| msgid "List item %qs in %s clause at %L must be of TYPE(C_PTR)"
+#, gcc-internal-format
msgid "Argument %qs at %L to list item in %<need_device_ptr%> at %L must be a scalar of TYPE(C_PTR)"
-msgstr "La liste d'Ă©lĂ©ments %qs dans la clause %s Ă  %L doit ĂȘtre TYPE(C_PTR)"
+msgstr "L'argument %qs Ă  %L pour lister l'Ă©lĂ©ment dans %<need_device_ptr%> Ă  %L doit ĂȘtre un scalaire de TYPE(C_PTR)"
#: fortran/trans-openmp.cc:9106
-#, fuzzy, gcc-internal-format
-#| msgid "%qs is not valid for %qs"
+#, gcc-internal-format
msgid "Consider using %<need_device_addr%> instead"
-msgstr "%qs n'est pas valide pour %qs"
+msgstr "Envisagez plutĂŽt d'utiliser %<need_device_addr%>"
#: fortran/trans-openmp.cc:9113
-#, fuzzy, gcc-internal-format
-#| msgid "Argument %qs of elemental procedure at %L cannot have the ALLOCATABLE attribute"
+#, gcc-internal-format
msgid "Argument %qs at %L to list item in %<need_device_addr%> at %L must not have the VALUE attribute"
-msgstr "L'argument %qs de la procédure élémentale à %L ne peut pas avoir l'attribut ALLOCATABLE"
+msgstr "L'argument %qs à %L pour lister l'élément dans %<need_device_addr%> à %L ne peut pas avoir d'attribut VALUE"
#: fortran/trans-openmp.cc:9122
-#, fuzzy, gcc-internal-format
-#| msgid "%qs clause at %L specified more than once"
+#, gcc-internal-format
msgid "%qs at %L is specified more than once"
-msgstr "La clause %qs à %L est spécifiée plus d'une fois"
+msgstr "%qs à %L est spécifié plus d'une fois"
#: fortran/trans-openmp.cc:9139
-#, fuzzy, gcc-internal-format
-#| msgid "%<ancestor%> not yet supported"
+#, gcc-internal-format
msgid "%<need_device_addr%> not yet supported"
-msgstr "%<ancestor%> n'est pas encore supporté"
+msgstr "%<need_device_addr%> n'est pas encore supporté"
#: fortran/trans-stmt.cc:576
#, gcc-internal-format, gfc-internal-format
@@ -84782,16 +84541,14 @@ msgid "unexpected EOF"
msgstr "fin de fichier inattendue"
#: go/gofrontend/expressions.cc:985
-#, fuzzy, gcc-internal-format
-#| msgid "invalid use of %qD"
+#, gcc-internal-format
msgid "invalid use of type"
-msgstr "utilisation invalide de %qD"
+msgstr "utilisation invalide du type"
#: go/gofrontend/statements.cc:2670
-#, fuzzy, gcc-internal-format
-#| msgid "expected expression"
+#, gcc-internal-format
msgid "expected call expression"
-msgstr "expression attendue"
+msgstr "expression d'appel attendue"
#: lto/lto-common.cc:2041
#, gcc-internal-format
@@ -86292,10 +86049,9 @@ msgid "label definition in %<constexpr%> function only available with %<-std=c++
msgstr "la définition d'une étiquette dans une fonction %<constexpr%> est uniquement disponible avec %<-std=c++2b%> ou %<-std=gnu++2b%>"
#: rust/backend/rust-tree.cc:616
-#, fuzzy, gcc-internal-format
-#| msgid "ignoring return value of %qD, that must be used: %<%s%>"
+#, gcc-internal-format
msgid "ignoring return value of %qD, that must be used: %qs"
-msgstr "la valeur de retour de %qD est ignorĂ©e, ceci doit ĂȘtre utilisé : %<%s%>"
+msgstr "la valeur de retour de %qD est ignorĂ©e, ceci doit ĂȘtre utilisé : %qs"
#: rust/backend/rust-tree.cc:617
#, gcc-internal-format
@@ -86303,10 +86059,9 @@ msgid "ignoring return value of %qD, that must be used"
msgstr "la valeur de retour de %qD est ignorĂ©e, ceci doit ĂȘtre utilisĂ©"
#: rust/backend/rust-tree.cc:633
-#, fuzzy, gcc-internal-format
-#| msgid "ignoring returned value of type %qT, that must be used: %<%s%>"
+#, gcc-internal-format
msgid "ignoring returned value of type %qT, that must be used: %qs"
-msgstr "la valeur de retour de type %qT est ignorĂ©e, ceci doit ĂȘtre utilisé : %<%s%>"
+msgstr "la valeur de retour de type %qT est ignorĂ©e, ceci doit ĂȘtre utilisé : %qs"
#: rust/backend/rust-tree.cc:634
#, gcc-internal-format
diff --git a/gcc/po/hr.po b/gcc/po/hr.po
index cb166ff..b4d8eaa 100644
--- a/gcc/po/hr.po
+++ b/gcc/po/hr.po
@@ -1,15 +1,15 @@
# Translation of gcc to Croatian.
-# Copyright (C) 2012 Free Software Foundation, Inc.
+# Copyright (C) 2025 Free Software Foundation, Inc.
# This file is distributed under the same license as the gcc package.
#
# Tomislav Krznar <tomislav.krznar@gmail.com>, 2012, 2022.
-# BoĆŸidar Putanec <bozidarp@yahoo.com>, 2022, 2023, 2024.
+# BoĆŸidar Putanec <bozidarp@yahoo.com>, 2022-2025.
msgid ""
msgstr ""
-"Project-Id-Version: gcc 14.2.0\n"
+"Project-Id-Version: gcc-15.1-b20250316\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2025-03-14 22:06+0000\n"
-"PO-Revision-Date: 2024-08-02 17:19+0200\n"
+"PO-Revision-Date: 2025-03-20 12:26-0700\n"
"Last-Translator: BoĆŸidar Putanec <bozidarp@yahoo.com>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
"Language: hr\n"
@@ -144,7 +144,7 @@ msgstr "fatalna greĆĄka: "
#. when reporting fatal signal in the compiler.
#: diagnostic.def:34 diagnostic.def:55
msgid "internal compiler error: "
-msgstr "interna greĆĄka kompajlera: "
+msgstr "interna greĆĄka kompilatora: "
#. This one is just for counting DK_WARNING promoted to DK_ERROR
#. due to -Werror and -Werror=warning.
@@ -202,7 +202,7 @@ msgstr "Fatalna greĆĄka"
#. when reporting fatal signal in the compiler.
#: fortran/gfc-diagnostic.def:34 fortran/gfc-diagnostic.def:50
msgid "internal compiler error"
-msgstr "interna greĆĄka kompajlera"
+msgstr "interna greĆĄka kompilatora"
#: fortran/gfc-diagnostic.def:35
msgid "Error"
@@ -278,7 +278,7 @@ msgstr "-fvtable-verify=preinit nije podrĆŸan u ovoj konfiguraciji"
#: gcc.cc:1283 ada/gcc-interface/lang-specs.h:37
msgid "-pg and -fomit-frame-pointer are incompatible"
-msgstr "-pg i -fomit-frame-pointer su nekompatibilni"
+msgstr "-pg i -fomit-frame-pokazivač su nekompatibilni"
#: gcc.cc:1458
msgid "GNU C no longer supports -traditional without -E"
@@ -4778,7 +4778,7 @@ msgstr ""
#: analyzer/analyzer.opt:139
#, no-c-format
msgid "Warn about code paths which appear to lead to an infinite loop."
-msgstr "Upozori na kodne puteve koje bi mogle dovesti do beskonačnih petlji."
+msgstr "Upozori na kodove puteve koje bi mogle dovesti do beskonačnih petlji."
#: analyzer/analyzer.opt:143
#, no-c-format
@@ -4886,10 +4886,9 @@ msgid "Warn about code paths in which an unsanitized value is used as a size."
msgstr ""
#: analyzer/analyzer.opt:227
-#, fuzzy, no-c-format
-#| msgid "Warn about code paths which appear to lead to an infinite loop."
+#, no-c-format
msgid "Warn about code paths in which pointer subtraction involves undefined behavior."
-msgstr "Upozori na kodne puteve koje bi mogle dovesti do beskonačnih petlji."
+msgstr "Upozori na staze koda u kojima oduzimanje pokazivača moĆŸe uzrokovati medfinirano ponaĆĄanje."
#: analyzer/analyzer.opt:231
#, no-c-format
@@ -6035,10 +6034,9 @@ msgid "-mbranch-cost=N\tSet the cost of branches to roughly N instructions."
msgstr ""
#: config/riscv/riscv.opt:38
-#, fuzzy, no-c-format
-#| msgid "This switch is deprecated; use -Wextra instead."
+#, no-c-format
msgid "This option is deprecated; use -fplt or -fno-plt instead."
-msgstr "taj ĆĄalter je zastario; koristite -Wextra"
+msgstr "Ova opcija je zastarjela; umjesto nje koristite -fplt ili -fno-plt"
#: config/riscv/riscv.opt:42
#, no-c-format
@@ -7022,10 +7020,9 @@ msgid "Target the software simulator."
msgstr ""
#: config/ft32/ft32.opt:27
-#, fuzzy, no-c-format
-#| msgid "Does nothing. Preserved for backward compatibility."
+#, no-c-format
msgid "Ignored, but preserved for backward compatibility."
-msgstr "Ne radi niĆĄta. ZadrĆŸano radi kompatibilnosti s ranijim inačicama."
+msgstr "Zanemareno, ali je zadrĆŸano radi kompatibilnosti s starijim inačicama."
#: config/ft32/ft32.opt:31
#, no-c-format
@@ -8311,52 +8308,44 @@ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, and AVX10
msgstr ""
#: config/i386/i386.opt:1378
-#, fuzzy, no-c-format
-#| msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and SHA512 built-in functions and code generation."
+#, no-c-format
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX10.1 and AVX10.2 built-in functions and code generation."
-msgstr "PodrĆŸava MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX i SHA512 ugrađene funkcije i generiranje koda."
+msgstr "PodrĆŸava MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX10.1 i AVX10.2 ugrađene funkcije i generiranje koda."
#: config/i386/i386.opt:1383 config/i386/i386.opt:1388
-#, fuzzy, no-c-format
-#| msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and SHA512 built-in functions and code generation."
+#, no-c-format
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX10.1-512 and AVX10.2-512 built-in functions and code generation."
-msgstr "PodrĆŸava MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX i SHA512 ugrađene funkcije i generiranje koda."
+msgstr "PodrĆŸava MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX10.1-512 i AVX10.2-512 ugrađena funkcije i generiranje koda."
#: config/i386/i386.opt:1393
-#, fuzzy, no-c-format
-#| msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and SHA512 built-in functions and code generation."
+#, no-c-format
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX10.1-512, AVX10.2-512 and AMX-AVX512 built-in functions and code generation."
-msgstr "PodrĆŸava MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX i SHA512 ugrađene funkcije i generiranje koda."
+msgstr "PodrĆŸava MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX10.1-512, AVX10.2-512 i AMX-AVX512 ugrađene funkcije i generiranje koda."
#: config/i386/i386.opt:1398
-#, fuzzy, no-c-format
-#| msgid "Support AMX-COMPLEX built-in functions and code generation."
+#, no-c-format
msgid "Support AMX-TF32 built-in functions and code generation."
-msgstr "PodrĆŸava AMX-COMPLEX ugrađene funkcije i generiranje koda."
+msgstr "PodrĆŸava AMX-TF32 ugrađene funkcije i generiranje koda."
#: config/i386/i386.opt:1402
-#, fuzzy, no-c-format
-#| msgid "Support AMX-COMPLEX built-in functions and code generation."
+#, no-c-format
msgid "Support AMX-TRANSPOSE built-in functions and code generation."
-msgstr "PodrĆŸava AMX-COMPLEX ugrađene funkcije i generiranje koda."
+msgstr "PodrĆŸava AMX-TRANSPOSE ugrađene funkcije i generiranje koda."
#: config/i386/i386.opt:1406
-#, fuzzy, no-c-format
-#| msgid "Support AMX-COMPLEX built-in functions and code generation."
+#, no-c-format
msgid "Support AMX-FP8 built-in functions and code generation."
-msgstr "PodrĆŸava AMX-COMPLEX ugrađene funkcije i generiranje koda."
+msgstr "PodrĆŸava AMX-FP8 ugrađene funkcije i generiranje koda."
#: config/i386/i386.opt:1410
-#, fuzzy, no-c-format
-#| msgid "Support USER_MSR built-in functions and code generation."
+#, no-c-format
msgid "Support MOVRS built-in functions and code generation."
-msgstr "PodrĆŸava USER_MSR ugrađene funkcije i generiranje koda."
+msgstr "PodrĆŸava MOVRS ugrađene funkcije i generiranje koda."
#: config/i386/i386.opt:1414
-#, fuzzy, no-c-format
-#| msgid "Support AMX-COMPLEX built-in functions and code generation."
+#, no-c-format
msgid "Support AMX-MOVRS built-in functions and code generation."
-msgstr "PodrĆŸava AMX-COMPLEX ugrađene funkcije i generiranje koda."
+msgstr "PodrĆŸava AMX-MOVRS ugrađene funkcije i generiranje koda."
#: config/pa/pa64-hpux.opt:23
#, no-c-format
@@ -13620,7 +13609,7 @@ msgstr "-aux-info <file>\tinformacije o deklaraciji poĆĄalje u datoteku <file>"
#: common.opt:927
#, no-c-format
msgid "-d<letters>\tEnable dumps from specific passes of the compiler."
-msgstr "-d<letters>\tomogući dumpove specifičnih prolaza kompajlera"
+msgstr "-d<letters>\tomogući dumpove specifičnih prolaza kompilatora"
#: common.opt:931
#, no-c-format
@@ -13670,7 +13659,7 @@ msgstr "poravna početak petlji"
#: common.opt:1084
#, no-c-format
msgid "Allow the compiler to introduce new data races on stores."
-msgstr "dopusti kompajleru uvesti novu konkurenciju podataka (data races) pri pohrani"
+msgstr "dopusti kompilatoru uvesti novu konkurenciju podataka (data races) pri pohrani"
#: common.opt:1088
#, no-c-format
@@ -17447,10 +17436,8 @@ msgid "a callee-copied argument is stored in the current function's frame"
msgstr ""
#: calls.cc:1520
-#, fuzzy
-#| msgid "second argument must be a const"
msgid "argument must be passed by copying"
-msgstr "drugi argument mora biti konstanta (const)"
+msgstr "argument mora biti proslijeđen kopiranjem"
#: calls.cc:2539
msgid "machine description does not have a sibcall_epilogue instruction pattern"
@@ -17473,26 +17460,20 @@ msgid "callee does not return"
msgstr ""
#: calls.cc:2579
-#, fuzzy
-#| msgid "compound literal has function type"
msgid "volatile function type"
-msgstr "sloĆŸeni literal ima tip funkcije"
+msgstr "tip nestabilne funkcije"
#: calls.cc:2598
-#, fuzzy
-#| msgid "expected function name"
msgid "nested function"
-msgstr "očekivano je ime funkcije"
+msgstr "ugnijeĆŸÄ‘ena funkcije"
#: calls.cc:2610
msgid "callee required more stack slots than the caller"
msgstr ""
#: calls.cc:2625
-#, fuzzy
-#| msgid "wrong number of arguments to %qs"
msgid "inconsistent number of popped arguments"
-msgstr "loĆĄ, krivi broj argumenata za %qs"
+msgstr "nedosljedan broj izbačenih argumenata"
#: calls.cc:2632
msgid "frontend does not support sibling call"
@@ -17507,10 +17488,8 @@ msgid "inside another call"
msgstr ""
#: calls.cc:3071
-#, fuzzy
-#| msgid "invalid arguments"
msgid "variable size arguments"
-msgstr "nevaljani argumenti"
+msgstr "argumenti različitih veličina"
#: calls.cc:3096
msgid "hidden string length argument passed on stack"
@@ -17600,7 +17579,7 @@ msgstr ""
#: diagnostic-format-json.cc:487
#, c-format
msgid "error: unable to open '%s' for writing: %s\n"
-msgstr "greĆĄka: ‘%s’ se ne moĆŸe otvoriti za pisanje: %s\n"
+msgstr "greơka: ‘%s’ nije moguće otvoriti za pisanje: %s\n"
#. Print a header for the remaining output to stderr, and
#. return, attempting to print the usual ICE messages to
@@ -17610,7 +17589,7 @@ msgstr "greĆĄka: ‘%s’ se ne moĆŸe otvoriti za pisanje: %s\n"
#: diagnostic-format-sarif.cc:1752
#, c-format
msgid "Internal compiler error:\n"
-msgstr "Interna greĆĄka kompajlera:\n"
+msgstr "Interna greĆĄka kompilatora:\n"
#: diagnostic-format-text.cc:141
#, c-format
@@ -17696,7 +17675,7 @@ msgstr "%s:%d: zbunjeni prethodnim greĆĄkama, odustajemo\n"
#: diagnostic.cc:1672
#, c-format
msgid "internal compiler error: error reporting routines re-entered.\n"
-msgstr "Interna greĆĄka kompajlera: rutine za prijavu greĆĄaka iznova prozvane.\n"
+msgstr "Interna greĆĄka kompilatora: rutine za prijavu greĆĄaka iznova prozvane.\n"
#: diagnostic.cc:1703 diagnostic.cc:1722
#, gcc-internal-format, gfc-internal-format
@@ -17852,7 +17831,7 @@ msgstr " (Koristite ‘-v --help’ za ispis opcija naredbenog retka za potproc
#: gcc.cc:3745
msgid " --version Display compiler version information.\n"
-msgstr " --version Informacije o inačici kompajlera.\n"
+msgstr " --version Informacije o inačici kompilatora.\n"
#: gcc.cc:3746
msgid " -dumpspecs Display all of the built in spec strings.\n"
@@ -17860,11 +17839,11 @@ msgstr " -dumpspecs PokaĆŸe sve ugrađene specifikacijske stringo
#: gcc.cc:3747
msgid " -dumpversion Display the version of the compiler.\n"
-msgstr " -dumpversion Inačica kompajlera.\n"
+msgstr " -dumpversion Inačica kompilatora.\n"
#: gcc.cc:3748
msgid " -dumpmachine Display the compiler's target processor.\n"
-msgstr " -dumpmachine PokaĆŸe ciljani procesor kompajlera.\n"
+msgstr " -dumpmachine PokaĆŸe ciljani procesor kompilatora.\n"
#: gcc.cc:3749
msgid " -foffload=<targets> Specify offloading targets.\n"
@@ -17872,11 +17851,11 @@ msgstr " -foffload=<targets> Specificira offloading <targets> ciljeve.\n"
#: gcc.cc:3750
msgid " -print-search-dirs Display the directories in the compiler's search path.\n"
-msgstr " -print-search-dirs PokaĆŸe direktorije na stazi pretraĆŸivanja kompajlera.\n"
+msgstr " -print-search-dirs PokaĆŸe direktorije na stazi pretraĆŸivanja kompilatora.\n"
#: gcc.cc:3751
msgid " -print-libgcc-file-name Display the name of the compiler's companion library.\n"
-msgstr " -print-libgcc-file-name PokaĆŸe ime popratne biblioteke kompajlera.\n"
+msgstr " -print-libgcc-file-name PokaĆŸe ime popratne biblioteke kompilatora.\n"
#: gcc.cc:3752
msgid " -print-file-name=<lib> Display the full path to library <lib>.\n"
@@ -17884,7 +17863,7 @@ msgstr " -print-file-name=<lib> Potpuna staza do biblioteke <lib>.\n"
#: gcc.cc:3753
msgid " -print-prog-name=<prog> Display the full path to compiler component <prog>.\n"
-msgstr " -print-prog-name=<prog> Potpuna staza do <prog> komponente kompajlera.\n"
+msgstr " -print-prog-name=<prog> Potpuna staza do <prog> komponente kompilatora.\n"
#: gcc.cc:3754
msgid ""
@@ -17986,11 +17965,11 @@ msgstr ""
#: gcc.cc:3782
msgid " -B <directory> Add <directory> to the compiler's search paths.\n"
-msgstr " -B <directory> Doda <directory> stazama koje pretraĆŸuje kompajler.\n"
+msgstr " -B <directory> Doda <directory> stazama koje pretraĆŸuje kompilator.\n"
#: gcc.cc:3783
msgid " -v Display the programs invoked by the compiler.\n"
-msgstr " -v Izlista programe pokrenute (pozvane) kompajlerom.\n"
+msgstr " -v Izlista programe pokrenute (pozvane) kompilatorom.\n"
#: gcc.cc:3784
msgid " -### Like -v but options quoted and commands not executed.\n"
@@ -18099,7 +18078,7 @@ msgstr "inačica drajvera %s %s izvrơava gcc inačicu %s\n"
#: gcc.cc:7812 gcc.cc:8022
#, c-format
msgid "The bug is not reproducible, so it is likely a hardware or OS problem.\n"
-msgstr "GreĆĄka se ne moĆŸe reproducirati, pa je vjerojatno problem hardvera ili OS-a.\n"
+msgstr "Greơku nije moguće reproducirati, pa je vjerojatno problem hardvera ili OS-a.\n"
#: gcc.cc:7946
#, c-format
@@ -18351,10 +18330,9 @@ msgstr ""
"%s.\n"
#: gcov-tool.cc:595
-#, fuzzy, c-format
-#| msgid "Copyright %s 2024 Free Software Foundation, Inc.\n"
+#, c-format
msgid "Copyright %s 2025 Free Software Foundation, Inc.\n"
-msgstr "Copyright %s 2024 Free Software Foundation, Inc.\n"
+msgstr "Copyright %s 2025 Free Software Foundation, Inc.\n"
#: gcov.cc:1025
#, c-format
@@ -18394,16 +18372,13 @@ msgid ""
msgstr " -c, --branch-counts ispiơe količine (broj) grana a ne postotak\n"
#: gcov.cc:1031
-#, fuzzy, c-format
-#| msgid ""
-#| " -g, --conditions Include modified condition/decision\n"
-#| " coverage in output\n"
+#, c-format
msgid ""
" -g, --conditions Include modified condition/decision\n"
" coverage (masking MC/DC) in output\n"
msgstr ""
-" -g, --conditions uključi pokrivenost modificiranih\n"
-" uvjeta/odluka na izlazu\n"
+" -g, --conditions obuhvati modificirane uvjete/odluke\n"
+" pokrivenosti (maskiranje MC/DC) u izlazu\n"
#: gcov.cc:1033
#, c-format
@@ -18421,16 +18396,18 @@ msgid " -f, --function-summaries Output summaries for each function\n"
msgstr " -f, --function-summaries ispiĆĄe saĆŸetke za svaku funkciju\n"
#: gcov.cc:1036
-#, fuzzy, c-format
-#| msgid " -f, --function Print function level info\n"
+#, c-format
msgid " --include Include functions matching this regex\n"
-msgstr " -f, --function ispiĆĄe informaciju razine funkcije\n"
+msgstr ""
+" --include obuhvati funkcije koje poduraraju\n"
+" ovaj regularni izraz\n"
#: gcov.cc:1037
-#, fuzzy, c-format
-#| msgid " -h, --help Print this help, then exit\n"
+#, c-format
msgid " --exclude Exclude functions matching this regex\n"
-msgstr " -h, --help ispiơe ovu pomoć, pa iziđe\n"
+msgstr ""
+" --exclude isključi funkcije koje poduraraju\n"
+" ovaj regularni izraz\n"
#: gcov.cc:1038
#, c-format
@@ -18471,14 +18448,13 @@ msgstr ""
"\n"
#: gcov.cc:1046
-#, fuzzy, c-format
-#| msgid ""
-#| " -l, --long-file-names Use long output file names for included\n"
-#| " source files\n"
+#, c-format
msgid ""
" -M, --filter-on-demangled Make --include/--exclude match on demangled\n"
" names. This does not imply -m\n"
-msgstr " -l, --long-file-names ispiơe puna imena uključenih izvornih kódova\n"
+msgstr ""
+" -M, --filter-on-demangled učini da --include/--exclude podudara neuređena\n"
+" imena -- ne implicira -m\n"
#: gcov.cc:1048
#, c-format
@@ -18840,16 +18816,14 @@ msgid "End of search list.\n"
msgstr "Kraj popisa pretrage.\n"
#: incpath.cc:408
-#, fuzzy, c-format
-#| msgid "#include <...> search starts here:\n"
+#, c-format
msgid "#embed <...> search starts here:\n"
-msgstr "#include <...> pretraga započinje ovdje:\n"
+msgstr "#embed <...> pretraga započinje ovdje:\n"
#: incpath.cc:411
-#, fuzzy, c-format
-#| msgid "End of search list.\n"
+#, c-format
msgid "End of #embed search list.\n"
-msgstr "Kraj popisa pretrage.\n"
+msgstr "Kraj #embed popisa pretraĆŸivanja.\n"
#: input.cc:35
msgid "<built-in>"
@@ -19004,7 +18978,7 @@ msgstr "Sljedeće opcije su specifične za cilj"
#: opts.cc:2010
msgid "The following options control compiler warning messages"
-msgstr "Sljedeće opcije upravljaju porukama upozorenja kompajlera"
+msgstr "Sljedeće opcije upravljaju porukama upozorenja kompilatora"
#: opts.cc:2013
msgid "The following options control optimizations"
@@ -19562,22 +19536,16 @@ msgid "invalid address mode"
msgstr "nevaljani način adresiranja"
#: config/aarch64/aarch64.cc:22751
-#, fuzzy
-#| msgid "invalid conversion from type %<bfloat16_t%>"
msgid "invalid conversion from type %<mfloat8_t%>"
-msgstr "nevaljana konverzija od tipa %<bfloat16_t%>"
+msgstr "nevaljana konverzija od tipa %<mfloat8_t%>"
#: config/aarch64/aarch64.cc:22753
-#, fuzzy
-#| msgid "invalid conversion to type %<bfloat16_t%>"
msgid "invalid conversion to type %<mfloat8_t%>"
-msgstr "nevaljana konverzija u tip %<bfloat16_t%>"
+msgstr "nevaljana konverzija u tip %<mfloat8_t%>"
#: config/aarch64/aarch64.cc:29716 config/aarch64/aarch64.cc:29739
-#, fuzzy
-#| msgid "operation not permitted on type %<bfloat16_t%>"
msgid "operation not permitted on type %<mfloat8_t%>"
-msgstr "nelegalna operacija na tipu %<bfloat16_t%>"
+msgstr "operacija nije dopuĆĄtena na tipu %<mfloat8_t%>"
#: config/aarch64/aarch64.cc:29734
msgid "cannot combine GNU and SVE vectors in a binary operation"
@@ -19805,10 +19773,9 @@ msgstr "instrukcija nije nikada izvrĆĄena"
#. Former FPA support, effectively unused after GCC-4.7, but not
#. removed until gcc-15.
#: config/arm/arm.cc:24544
-#, fuzzy, c-format
-#| msgid "obsolete Maverick format code '%c'"
+#, c-format
msgid "obsolete FPA format code '%c'"
-msgstr "zastarjela Maverick format kȏd ‘%c’"
+msgstr "zastarjeli FPA format koda ‘%c’"
#. Former Maverick support, removed after GCC-4.7.
#: config/arm/arm.cc:24553
@@ -19830,14 +19797,12 @@ msgstr "nelegalna operacija na tipu %<bfloat16_t%>"
#. Also runs recog().
#: config/avr/avr-passes.cc:62
-#, fuzzy
-#| msgid "unrecognizable insn:"
msgid "emit unrecognizable insn"
-msgstr "neprepoznati insn:"
+msgstr "Interna greĆĄka: emit unrecognizable insn"
#: config/avr/avr-passes.cc:1190
msgid "incomplete application of insn"
-msgstr ""
+msgstr "Interna greĆĄka: incomplete application of insn"
#: config/avr/avr.cc:2524
#, c-format
@@ -19872,7 +19837,7 @@ msgstr "loĆĄa adresa, nije post_inc ili pre_dec:"
#: config/avr/avr.cc:2856
msgid "internal compiler error. Bad address:"
-msgstr "interna greĆĄka kompajlera. LoĆĄa adresa:"
+msgstr "interna greĆĄka kompilatora. LoĆĄa adresa:"
#: config/avr/avr.cc:2885
#, c-format
@@ -19881,7 +19846,7 @@ msgstr "NepodrĆŸani kȏd ‘%c’ za nepomični zarez (fixed-point):"
#: config/avr/avr.cc:2904
msgid "internal compiler error. Unknown mode:"
-msgstr "interna greơka kompajlera. Nepozat način rada:"
+msgstr "interna greơka kompilatora. Nepozat način rada:"
#: config/avr/avr.cc:4277 config/avr/avr.cc:5263 config/avr/avr.cc:5710
msgid "invalid insn:"
@@ -19906,7 +19871,7 @@ msgstr "loĆĄ pomak (shift) insn:"
#: config/avr/avr.cc:7091 config/avr/avr.cc:7628 config/avr/avr.cc:8102
msgid "internal compiler error. Incorrect shift:"
-msgstr "interna greơka kompajlera. Netočni pomak (shift):"
+msgstr "interna greơka kompilatora. Netočni pomak (shift):"
#: config/avr/avr.cc:10394
msgid "unsupported fixed-point conversion"
@@ -19930,7 +19895,7 @@ msgstr "vrati tip funkcije"
#: config/avr/avr.cc:11687
msgid "pointer"
-msgstr "kazaljka (pointer)"
+msgstr "pokazivač"
#: config/avr/driver-avr.cc:50
#, c-format
@@ -20603,13 +20568,12 @@ msgstr "nevaljani vektorski operand"
#: config/riscv/riscv.cc:7159
#, c-format
msgid "modifier 'N' require register operand"
-msgstr ""
+msgstr "modifikator ‘N’ zahtijeva operand registra"
#: config/riscv/riscv.cc:7172
-#, fuzzy, c-format
-#| msgid "invalid operand for %%N code"
+#, c-format
msgid "invalid register number for 'N' modifier"
-msgstr "nevaljani operand za %%N kȏd"
+msgstr "nevaljani broj registra za ‘N’ modifikator"
#: config/rl78/rl78.cc:1999 config/rl78/rl78.cc:2085
#, c-format
@@ -21467,59 +21431,56 @@ msgid "In function %qD"
msgstr "U funkciji %qD"
#: cp/error.cc:3869
-#, fuzzy, c-format
-#| msgid "%s: In substitution of %qS:\n"
+#, c-format
msgid "%s%s%sIn substitution of %qS:\n"
-msgstr "%s: In supstituciji %qS:\n"
+msgstr "%s%s%sIn supstitucija od %qS:\n"
#: cp/error.cc:3870
-#, fuzzy
-#| msgid "%s: In instantiation of %q#D:\n"
msgid "%s%s%sIn instantiation of %q#D:\n"
-msgstr "%s: U instanci %q#D:\n"
+msgstr "%s%s%sIn instance od %q#D:\n"
#: cp/error.cc:3890
msgid "%r%s:%d:%d:%R "
-msgstr ""
+msgstr "%r%s:%d:%d:%R "
#: cp/error.cc:3893
msgid "%r%s:%d:%R "
-msgstr ""
+msgstr "%r%s:%d:%R "
#: cp/error.cc:3986
#, c-format
msgid "recursively required by substitution of %qS\n"
-msgstr ""
+msgstr "rekurzivni zahtjev substitucije %qS\n"
#: cp/error.cc:3987
#, c-format
msgid "required by substitution of %qS\n"
-msgstr ""
+msgstr "zahtjev substitucije %qS\n"
#: cp/error.cc:3992
msgid "recursively required from %q#D\n"
-msgstr ""
+msgstr "rekurzivni zahtjev od %q#D\n"
#: cp/error.cc:3993
msgid "required from %q#D\n"
-msgstr ""
+msgstr "zahtjev od %q#D\n"
#: cp/error.cc:4000
msgid "recursively required from here\n"
-msgstr ""
+msgstr "rekurzivni zahtjev odavde\n"
#: cp/error.cc:4001
msgid "required from here\n"
-msgstr ""
+msgstr "zahtjev odavde\n"
#: cp/error.cc:4051
#, c-format
msgid "[ skipping %d instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]\n"
-msgstr ""
+msgstr "[ preskačemo %d konteksta instantacije, upotrebite -ftemplate-backtrace-limit=0 da to onemogućite ]\n"
#: cp/error.cc:4103
msgid "in %<constexpr%> expansion of %qs"
-msgstr ""
+msgstr "u %<constexpr%> zamijeni %qs"
#: cp/pt.cc:2062 cp/semantics.cc:6704
msgid "candidates are:"
@@ -21642,10 +21603,8 @@ msgid "NULL() is not interoperable"
msgstr ""
#: fortran/check.cc:5724
-#, fuzzy
-#| msgid "invalid constant"
msgid "BOZ literal constant"
-msgstr "nevaljana konstanta"
+msgstr "BOZ literalna konstanta"
#: fortran/check.cc:5730
msgid "Expression is polymorphic"
@@ -21656,10 +21615,8 @@ msgid "Expression is a noninteroperable derived type"
msgstr ""
#: fortran/check.cc:5743
-#, fuzzy
-#| msgid "unexpected argument"
msgid "Procedure unexpected as argument"
-msgstr "neočekivani argument"
+msgstr "Neočekivani postupak (procedura) kao argument"
#: fortran/check.cc:5753
msgid "Extension to use a non-C_Bool-kind LOGICAL"
@@ -23002,18 +22959,17 @@ msgstr ""
#: cobol/parse_ante.h:2447 cobol/genapi.cc:5829
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d: invalid symbol_type_t %d"
-msgstr ""
+msgstr "%s:%d: nevaljani symbol_type_t %d"
#: cobol/parse_ante.h:2789
#, gcc-internal-format, gfc-internal-format
msgid "%s:%d: no symbol '%s' found"
-msgstr ""
+msgstr "%s:%d: '%s' found"
#: cobol/parse_util.h:351
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%s:no functions found\n"
+#, gcc-internal-format, gfc-internal-format
msgid "%s: intrinsic function %s not found"
-msgstr "%s:nijedna funkcija nije pronađena\n"
+msgstr "%s: intrinsična funkcija %s nije pronađena"
#: cobol/parse_util.h:383
#, gcc-internal-format, gfc-internal-format
@@ -23021,10 +22977,9 @@ msgid "%s: invalid function descr type '%c'"
msgstr ""
#: cobol/scan_ante.h:38
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "close: %s"
+#, gcc-internal-format, gfc-internal-format
msgid "scan.o: %s"
-msgstr "zatvori: %s"
+msgstr "scan.o: %s"
#. A general purpose syntax error.
#: fortran/gfortran.h:3557 fortran/io.cc:3727 fortran/io.cc:4413
@@ -23206,10 +23161,9 @@ msgid "unrecognized scalar storage order value %qs"
msgstr ""
#: cobol/lang.opt:46
-#, fuzzy, gcc-internal-format
-#| msgid "Unrecognized option: %qs"
+#, gcc-internal-format
msgid "Unrecognized COBOL dialect name: %qs"
-msgstr "Neprepoznata opcija: %qs"
+msgstr "Neprepoznato ime COBOL dijalekta: %qs"
#: d/lang.opt:201
#, gcc-internal-format
@@ -23232,10 +23186,9 @@ msgid "unknown pointer size model %qs"
msgstr ""
#: config/aarch64/aarch64.opt:363
-#, fuzzy, gcc-internal-format
-#| msgid "unknown spec function %qs"
+#, gcc-internal-format
msgid "unknown autovec preference %qs"
-msgstr "nepoznata spec funkcija %qs"
+msgstr "nepoznata autovec postavka %qs"
#: config/aarch64/aarch64.opt:408
#, gcc-internal-format
@@ -23391,10 +23344,9 @@ msgid "unknown offload ABI %qs"
msgstr ""
#: common.opt:2398
-#, fuzzy, gcc-internal-format
-#| msgid "missing format after %qs"
+#, gcc-internal-format
msgid "option missing after %qs"
-msgstr "nema formata iza %qs"
+msgstr "nedostaje opcija iza %qs"
#: common.opt:2571
#, gcc-internal-format
@@ -23447,10 +23399,9 @@ msgid "unknown vtable verify initialization priority %qs"
msgstr ""
#: common.opt:3552
-#, fuzzy, gcc-internal-format
-#| msgid "unrecognized command-line option %qs"
+#, gcc-internal-format
msgid "unrecognized zero init padding bits kind %qs"
-msgstr "neprepoznata opcija na naredbenom retku %qs"
+msgstr "neprepoznati zero-init-padding bitovi vrste %qs"
#: params.opt:909
#, gcc-internal-format
@@ -25228,10 +25179,9 @@ msgid "aggregate value used where a fixed-point was expected"
msgstr ""
#: coroutine-passes.cc:311
-#, fuzzy, gcc-internal-format
-#| msgid "%qs is not supported in this configuration"
+#, gcc-internal-format
msgid "%<alloca%> is not yet supported in coroutines"
-msgstr "%qs nije podrĆŸan u ovoj konfiguraciji"
+msgstr "%<alloca%> joĆĄ nije podrĆŸan u ‘coroutines’"
#: coverage.cc:193
#, gcc-internal-format
@@ -25364,10 +25314,9 @@ msgid "unable to determine filename for SARIF output"
msgstr ""
#: diagnostic-format-sarif.cc:3786
-#, fuzzy, gcc-internal-format
-#| msgid "unable to open %s for writing: %m"
+#, gcc-internal-format
msgid "unable to open %qs for SARIF output: %m"
-msgstr "ne moĆŸe otvoriti %s za pisanje: %m"
+msgstr "ne moĆŸe otvoriti %qs za SARIF izlaz: %m"
#: diagnostic-macro-unwinding.cc:182
#, gcc-internal-format
@@ -25437,16 +25386,14 @@ msgid "ignoring possibly conflicting option %<-fopt-info-%s%>"
msgstr ""
#: dwarf2codeview.cc:1751
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "unable to open %s for reading: %m"
+#, gcc-internal-format, gfc-internal-format
msgid "could not open %s for reading"
-msgstr "ne moĆŸe otvoriti %s za čitanje: %m"
+msgstr "nije (bilo) moguće otvoriti %s za čitanje"
#: dwarf2codeview.cc:1756
-#, fuzzy, gcc-internal-format
-#| msgid "atexit failed"
+#, gcc-internal-format
msgid "md5_stream failed"
-msgstr "atexit nije uspio"
+msgstr "md5_stream nije uspio"
#: dwarf2out.cc:1144
#, gcc-internal-format
@@ -28077,7 +28024,7 @@ msgstr "neočekivani čvor (mapping node)"
#: gimplify.cc:10559
#, gcc-internal-format
msgid "unexpected pointer mapping node"
-msgstr "neočekivan čvor (pointer mapping node)"
+msgstr "neočekivani čvor mapiranja pokazivača (pointer mapping node)"
#: gimplify.cc:10772
#, gcc-internal-format
@@ -28292,10 +28239,9 @@ msgid "%qD is a virtual function but only a direct call is allowed in a dispatch
msgstr ""
#: gimplify.cc:19957
-#, fuzzy, gcc-internal-format
-#| msgid "%<-pipe%> not supported"
+#, gcc-internal-format
msgid "%<#pragma omp interop%> not yet supported"
-msgstr "%<-pipe%> nije podrĆŸan"
+msgstr "%<#pragma omp interop%> joĆĄ nije podrĆŸana"
#: gimplify.cc:20366
#, gcc-internal-format
@@ -28512,28 +28458,27 @@ msgstr ""
#: ipa-devirt.cc:1265
#, gcc-internal-format
msgid "a type with different precision is defined in another translation unit"
-msgstr ""
+msgstr "tip s različitom preciznoơću definiran je u drugoj prevodilačkoj jedinici"
#: ipa-devirt.cc:1273
-#, fuzzy, gcc-internal-format
-#| msgid "variable of same assembler name as the virtual table is defined in another translation unit"
+#, gcc-internal-format
msgid "a vector type with different number of elements is defined in another translation unit"
-msgstr "varijabla s istim imenom asemblera kao i virtualna tablica definirana je u drugoj prijevodnoj jedinici"
+msgstr "tip vektora s različitim brojem elemenata je definiran u drugoj prevodilačkoj jedinici"
#: ipa-devirt.cc:1280
#, gcc-internal-format
msgid "a type with different signedness is defined in another translation unit"
-msgstr ""
+msgstr "tip s različitim ‘signedness’ definiran je u drugoj prevodilačkoj jedinici"
#: ipa-devirt.cc:1305
#, gcc-internal-format
msgid "it is defined as a pointer in different address space in another translation unit"
-msgstr ""
+msgstr "to je definirano kao pokazivač u različitom adresnom prostoru u drugoj prevodilačkoj jedinici"
#: ipa-devirt.cc:1314
#, gcc-internal-format
msgid "it is defined as a pointer to different type in another translation unit"
-msgstr ""
+msgstr "to je definirano kao pokazivač na drugačiji način u drugoj prevodilačkoj jedinici"
#: ipa-devirt.cc:1374
#, gcc-internal-format
@@ -28904,10 +28849,9 @@ msgid "maximum nesting depth exceeded: %i"
msgstr ""
#: json-parsing.cc:1145
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "invalid JSON syntax"
+#, gcc-internal-format, gfc-internal-format
msgid "invalid JSON token: %s"
-msgstr "nevaljana JSON sintaksa"
+msgstr "nevaljani JSON token: %s"
#: json-parsing.cc:1148
#, gcc-internal-format, gfc-internal-format
@@ -28925,28 +28869,24 @@ msgid "expected string for object key after ','; got %s"
msgstr ""
#: json-parsing.cc:1297
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected %qs or %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "expected %s; got bad token: %s"
-msgstr "očekivano je %qs ili %qs"
+msgstr "očekivan je %s; dobiven je loơ token: %s"
#: json-parsing.cc:1301
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected %qs or %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "expected %s; got %s"
-msgstr "očekivano je %qs ili %qs"
+msgstr "očekivan je %s; dobiven je %s"
#: json-parsing.cc:1320
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected %<for%> after %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "expected %s or %s; got bad token: %s"
-msgstr "očekivano je %<for%> iza %qs"
+msgstr "očekivan je %s ili %s; dobiven je loơ tokens %s"
#: json-parsing.cc:1324
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected %qs or %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "expected %s or %s; got %s"
-msgstr "očekivano je %qs ili %qs"
+msgstr "očekivan je %s ili %s; dobiven je %s"
#: lazy-diagnostic-path.cc:179
#, gcc-internal-format
@@ -28954,10 +28894,9 @@ msgid "this warning should be skipped"
msgstr ""
#: lazy-diagnostic-path.cc:194
-#, fuzzy, gcc-internal-format
-#| msgid "this is the insn:"
+#, gcc-internal-format
msgid "this is a test"
-msgstr "ovo je insn:"
+msgstr "ovo je test:"
#: lra-assigns.cc:1694
#, gcc-internal-format, gfc-internal-format
@@ -29251,10 +29190,9 @@ msgid "environment variable %<COLLECT_GCC_OPTIONS%> must be set"
msgstr "varijabla okoline %<COLLECT_GCC_OPTIONS%> mora biti postavljena"
#: lto-wrapper.cc:1575
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Nonexistent include directory %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "missing directory: %s"
-msgstr "nepostojeći ‘include’ direktorij %qs”"
+msgstr "nedostaje directorij: %s"
#: lto-wrapper.cc:1768 lto-wrapper.cc:1828 c-family/c-pch.cc:215
#: c-family/c-pch.cc:250 c-family/c-pch.cc:288 c-family/c-pch.cc:366
@@ -29408,10 +29346,9 @@ msgid "%qD used as a variant with incompatible %<construct%> selector sets"
msgstr ""
#: omp-general.cc:1751
-#, fuzzy, gcc-internal-format
-#| msgid "%<target_device%> selector set is not supported yet"
+#, gcc-internal-format
msgid "%<target_device%> selector set inside of %<target%> directive"
-msgstr "skup selectora %<target_device%> joĆĄ uvijek nije podrĆŸan"
+msgstr "selektor %<target_device%> postavljen je unutar %<target%> direktive"
#: omp-general.cc:3626
#, gcc-internal-format
@@ -30001,10 +29938,9 @@ msgid "%<%s%s%>: unrecognized format %qs; known formats: %e"
msgstr ""
#: opts-diagnostic.cc:424
-#, fuzzy, gcc-internal-format
-#| msgid "unable to open %s for writing: %m"
+#, gcc-internal-format
msgid "unable to open %qs: %m"
-msgstr "ne moĆŸe otvoriti %s za pisanje: %m"
+msgstr "nije moguće otvoriti %qs: %m"
#: opts-global.cc:107
#, gcc-internal-format
@@ -30920,10 +30856,9 @@ msgid "matching constraint not valid in output operand"
msgstr ""
#: stmt.cc:281
-#, fuzzy, gcc-internal-format
-#| msgid "invalid constraints for operand"
+#, gcc-internal-format
msgid "%<:%> constraint used for output operand"
-msgstr "nevaljano ograničenje za operand"
+msgstr "%<:%> ograničenje izkoriơteno je izlazni operand"
#: stmt.cc:346
#, gcc-internal-format
@@ -31889,7 +31824,7 @@ msgstr ""
#: tree-cfg.cc:4067
#, gcc-internal-format
msgid "invalid (pointer) operands %qs"
-msgstr "nevaljani (pointer) operandi %qs"
+msgstr "nevaljani operandi (pokazivača) %qs"
#: tree-cfg.cc:4302
#, gcc-internal-format
@@ -33458,10 +33393,9 @@ msgid "%+qD causes a section type conflict for section %qs"
msgstr ""
#: varasm.cc:373
-#, fuzzy, gcc-internal-format
-#| msgid "return type of function"
+#, gcc-internal-format
msgid "section type conflict for section %qs"
-msgstr "vrati tip funkcije"
+msgstr "konflikt tipa odjeljka za odjeljak %qs"
#: varasm.cc:1112
#, gcc-internal-format
@@ -34013,10 +33947,9 @@ msgid "%qE attribute argument %qE is not an integer constant between 0 and 3"
msgstr ""
#: c-family/c-attribs.cc:2895
-#, fuzzy, gcc-internal-format
-#| msgid "%<target%> attribute is not supported on this machine"
+#, gcc-internal-format
msgid "%qE attribute is not supported for C++ for now, ignored"
-msgstr "atribut %<target%> nije podrĆŸan na ovom računalu"
+msgstr "atribut %qE nije za sada podrĆŸan za C++, zanemaren je"
#: c-family/c-attribs.cc:2903
#, gcc-internal-format
@@ -34034,10 +33967,9 @@ msgid "%qE attribute is not allowed for a non-flexible array member field"
msgstr ""
#: c-family/c-attribs.cc:2927
-#, fuzzy, gcc-internal-format
-#| msgid "%<score%> argument must be non-negative"
+#, gcc-internal-format
msgid "%<counted_by%> argument is not an identifier"
-msgstr "argument %<score%> ne smije biti negativan"
+msgstr "argument %<counted_by%> nije identifikator"
#: c-family/c-attribs.cc:2939
#, gcc-internal-format
@@ -34441,10 +34373,9 @@ msgid "%qE attribute without arguments on a non-prototype"
msgstr ""
#: c-family/c-attribs.cc:5081
-#, fuzzy, gcc-internal-format
-#| msgid "%qE attribute ignored"
+#, gcc-internal-format
msgid "%qE attribute ignored on non-enum"
-msgstr "zanemareni atribut %qE"
+msgstr "zanemareni atribut %qE na ‘non-enumeration’"
#: c-family/c-attribs.cc:5131
#, gcc-internal-format
@@ -34796,10 +34727,8 @@ msgid "GCC cannot support operators with integer types and fixed-point types tha
msgstr ""
#: c-family/c-common.cc:2978
-#, fuzzy
-#| msgid "invalid operands to %%c code"
msgid "invalid operands to binary %s (have %e and %e)"
-msgstr "nevaljani operandi za %%c kȏd"
+msgstr "nevaljani operandi za %s (ima %e i %e)"
#: c-family/c-common.cc:3227
#, gcc-internal-format
@@ -35989,16 +35918,14 @@ msgid "non-standard suffix on floating constant before C23"
msgstr ""
#: c-family/c-lex.cc:1309
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> with non-string message only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "%<f%d%> or %<F%d%> suffix on floating constant only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "%<static_assert%> s non-string porukom je dostupna samo s %<-std=c++2c%> ili %<-std=gnu++2c%>"
+msgstr "%<f%d%> ili %<F%d%> sufiks na konstanti s pomičnim zarezom moguće je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
#: c-family/c-lex.cc:1330
-#, fuzzy, gcc-internal-format
-#| msgid "%<static_assert%> with non-string message only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "%<bf16%> or %<BF16%> suffix on floating constant only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "%<static_assert%> s non-string porukom je dostupna samo s %<-std=c++2c%> ili %<-std=gnu++2c%>"
+msgstr "%<bf16%> ili %<BF16%> sufiks na konstanti s pomičnim zarezom moguće je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
#: c-family/c-lex.cc:1417 c-family/c-lex.cc:1420
#, gcc-internal-format
@@ -36268,10 +36195,9 @@ msgid "output filename specified twice"
msgstr ""
#: c-family/c-opts.cc:783
-#, fuzzy, gcc-internal-format
-#| msgid "invalid argument %<%s%> for %<%s%>"
+#, gcc-internal-format
msgid "invalid argument %qs to %<-fsearch-include-path%>"
-msgstr "nevaljani argument %<%s%> za %<%s%>"
+msgstr "nevaljani argument %qs za %<-fsearch-include-path%>"
#: c-family/c-opts.cc:927
#, gcc-internal-format
@@ -39223,10 +39149,9 @@ msgid "%qs must be by itself for %<-mharden-sls=%>"
msgstr ""
#: config/aarch64/aarch64.cc:18962
-#, fuzzy, gcc-internal-format
-#| msgid "invalid argument %<%s%> for %<%s%>"
+#, gcc-internal-format
msgid "invalid argument %qs for %<-mharden-sls=%>"
-msgstr "nevaljani argument %<%s%> za %<%s%>"
+msgstr "nevaljani argument %qs za %<-mharden-sls=%>"
#: config/aarch64/aarch64.cc:19118
#, gcc-internal-format
@@ -39843,16 +39768,14 @@ msgid "invalid type for %<asm%> flag output"
msgstr ""
#: config/arm/aarch-common.cc:714
-#, fuzzy, gcc-internal-format
-#| msgid "missing feature or flag for %<%s%>"
+#, gcc-internal-format
msgid "missing feature or flag for %qs"
-msgstr "nema značajke ili flaga za %<%s%>"
+msgstr "nedostaje značajka ili flag za %qs"
#: config/arm/aarch-common.cc:716
-#, fuzzy, gcc-internal-format
-#| msgid "invalid argument %<%s%> for %<%s%>"
+#, gcc-internal-format
msgid "invalid argument %qs for %qs"
-msgstr "nevaljani argument %<%s%> za %<%s%>"
+msgstr "nevaljani argument %qs za %qs"
#: config/arm/aarch-common.cc:727
#, gcc-internal-format
@@ -40361,10 +40284,9 @@ msgid "%<asm%> flags not supported in thumb1 mode"
msgstr ""
#: config/avr/avr-c.cc:59
-#, fuzzy, gcc-internal-format
-#| msgid "built-in function %qD is not enabled"
+#, gcc-internal-format
msgid "built-in function is only supported for GNU-C"
-msgstr "ugrađena funkcija %qD nije omogućena"
+msgstr "ugrađena funkcija podrĆŸana je samo za GNU-C"
#: config/avr/avr-c.cc:70
#, gcc-internal-format
@@ -40466,10 +40388,9 @@ msgid "%qs appears to be a misspelled %qs handler, missing %<__vector%> prefix"
msgstr ""
#: config/avr/avr.cc:1004
-#, fuzzy, gcc-internal-format
-#| msgid "%qE attribute ignored"
+#, gcc-internal-format
msgid "%qs attribute ignored on non-ISR function"
-msgstr "zanemareni atribut %qE"
+msgstr "atribut %qs je zanemaren na non-ISR funkcijama"
#: config/avr/avr.cc:1014
#, gcc-internal-format
@@ -40877,17 +40798,15 @@ msgid "stackframe too big: %d bytes"
msgstr ""
#: config/csky/csky.cc:2544
-#, fuzzy, gcc-internal-format
-#| msgid "argument %qs is not supported for %qs on this target"
+#, gcc-internal-format
msgid "cpu %qs is not based on arch %qs, ignoring the arch"
-msgstr "argument %qs nije podrĆŸan za %qs na ovom cilju"
+msgstr "CPU %qs nije baziran na %qs arhitekturi, ignoriramo arhitekturu"
#: config/csky/csky.cc:2610 config/csky/csky.cc:2648 config/csky/csky.cc:2713
#: config/csky/csky.cc:2736 config/csky/csky.cc:2753
-#, fuzzy, gcc-internal-format
-#| msgid "%qs is not supported, now cmodel is set to %qs"
+#, gcc-internal-format
msgid "%qs is not supported by arch %qs"
-msgstr "%qs nije podrĆŸan, pa je sada ‘cmodel’ postavljen na %qs"
+msgstr "%qs nije podrĆŸan arhitekturom %qs"
#: config/csky/csky.cc:2651
#, gcc-internal-format
@@ -43642,16 +43561,14 @@ msgid "%<target()%> attribute: unknown TUNE %qs"
msgstr ""
#: config/riscv/riscv-target-attr.cc:241
-#, fuzzy, gcc-internal-format
-#| msgid "%<target%> attribute is not supported on this machine"
+#, gcc-internal-format
msgid "%<target()%> attribute: priority appears more than once"
-msgstr "atribut %<target%> nije podrĆŸan na ovom računalu"
+msgstr "atribut %<target()%>: prioritet se javlja viĆĄe of jedamput"
#: config/riscv/riscv-target-attr.cc:246
-#, fuzzy, gcc-internal-format
-#| msgid "%<target%> attribute is not supported on this machine"
+#, gcc-internal-format
msgid "%<target()%> attribute: invalid priority %qs"
-msgstr "atribut %<target%> nije podrĆŸan na ovom računalu"
+msgstr "atribut %<target()%>: nevaljani prioritet %qs"
#: config/riscv/riscv-target-attr.cc:297
#, gcc-internal-format
@@ -44319,10 +44236,9 @@ msgid "%qs is not supported on little endian systems"
msgstr ""
#: config/rs6000/rs6000.cc:3838
-#, fuzzy, gcc-internal-format
-#| msgid "-pg and -fomit-frame-pointer are incompatible"
+#, gcc-internal-format
msgid "%<-mvsx%> and %<-msoft-float%> are incompatible"
-msgstr "-pg i -fomit-frame-pointer su nekompatibilni"
+msgstr "%<-mvsx%> i %<-msoft-float%> nisu kompatibilni"
#: config/rs6000/rs6000.cc:3848
#, gcc-internal-format
@@ -47107,16 +47023,14 @@ msgid "duplicate %qE"
msgstr ""
#: c/c-decl.cc:12499
-#, fuzzy, gcc-internal-format
-#| msgid "cannot find %<ldd%>"
+#, gcc-internal-format
msgid "%qs cannot be defined via %<typedef%>"
-msgstr "ne moĆŸe naći %<ldd%>"
+msgstr "%qs se ne moĆŸe definrati pomoću %<typedef%>"
#: c/c-decl.cc:12503
-#, fuzzy, gcc-internal-format
-#| msgid "%qD cannot be %qs"
+#, gcc-internal-format
msgid "%qs cannot be used here"
-msgstr "%qD ne moĆŸe bit %qs"
+msgstr "ovdje se ne moĆŸe koristiti %qs"
#: c/c-decl.cc:12556
#, gcc-internal-format
@@ -47336,10 +47250,9 @@ msgid "%<continue%> statement operand %qE refers to a named %<switch%>"
msgstr ""
#: c/c-decl.cc:14043 c/c-decl.cc:14060
-#, fuzzy, gcc-internal-format
-#| msgid "%q+D defined here"
+#, gcc-internal-format
msgid "%<switch%> name defined here"
-msgstr "%q+D je ovdje definiran"
+msgstr "ime %<switch%> je definirano ovdje"
#: c/c-decl.cc:14051
#, gcc-internal-format
@@ -47347,10 +47260,9 @@ msgid "%qs statement operand %qE refers to a loop outside of its body"
msgstr ""
#: c/c-decl.cc:14053
-#, fuzzy, gcc-internal-format
-#| msgid "%q+D defined here"
+#, gcc-internal-format
msgid "loop name defined here"
-msgstr "%q+D je ovdje definiran"
+msgstr "ime petlje je definirano ovdje"
#: c/c-decl.cc:14057
#, gcc-internal-format
@@ -48362,10 +48274,9 @@ msgid "%<__builtin_complex%> operands of different types"
msgstr ""
#: c/c-parser.cc:12522
-#, fuzzy, gcc-internal-format
-#| msgid "wrong number of arguments to %qs"
+#, gcc-internal-format
msgid "wrong number of arguments to %<__builtin_counted_by_ref%>"
-msgstr "loĆĄ, krivi broj argumenata za %qs"
+msgstr "pogreĆĄni broj argumenata za %<__builtin_counted_by_ref%>"
#: c/c-parser.cc:12533
#, gcc-internal-format
@@ -48679,7 +48590,7 @@ msgstr ""
#: c/c-parser.cc:16910 cp/parser.cc:39824
#, gcc-internal-format
msgid "collapse argument needs positive constant integer expression"
-msgstr ""
+msgstr "‘collapse’ argument treba biti pozitivni, cjelobrojni izraz"
#: c/c-parser.cc:17005 cp/parser.cc:39902
#, gcc-internal-format
@@ -48830,7 +48741,7 @@ msgstr "očekivano je %<teams%>, %<parallel%> ili %<thread%>"
#: c/c-parser.cc:18372 cp/parser.cc:40772
#, gcc-internal-format
msgid "ordered argument needs positive constant integer expression"
-msgstr ""
+msgstr "‘ordered’ argument treba biti pozitivni, cjelobrojni izraz"
#: c/c-parser.cc:18497 c/c-parser.cc:27838 cp/parser.cc:51939
#, gcc-internal-format
@@ -48998,10 +48909,9 @@ msgid "expected %<host%>, %<nohost%> or %<any%>"
msgstr "očekivano je %<host%>, %<nohost%> ili %<any%>"
#: c/c-parser.cc:20354 cp/semantics.cc:9664 cp/semantics.cc:9682
-#, fuzzy, gcc-internal-format
-#| msgid "%<score%> argument must be constant integer expression"
+#, gcc-internal-format
msgid "%<partial%> argument needs positive constant integer expression"
-msgstr "argument %<score%> mora biti konstantan cjelobrojni izraz"
+msgstr "argument %<partial%> treba biti pozitivni, cjelobrojni izraz"
#: c/c-parser.cc:20455 cp/semantics.cc:8836
#, gcc-internal-format
@@ -49016,17 +48926,15 @@ msgstr ""
#: c/c-parser.cc:20532 c/c-parser.cc:20653 cp/parser.cc:42809
#: cp/parser.cc:42949
-#, fuzzy, gcc-internal-format
-#| msgid "unknown rust compile-until %qs"
+#, gcc-internal-format
msgid "unknown foreign runtime identifier %qs"
-msgstr "%qs je nepoznata ‘rust’ opcija za ugađanje"
+msgstr "nepoznati strani ‘runtime’ identifikator %qs"
#: c/c-parser.cc:20547 c/c-parser.cc:20676 cp/parser.cc:42824
#: cp/parser.cc:42971
-#, fuzzy, gcc-internal-format
-#| msgid "%<score%> argument must be constant integer expression"
+#, gcc-internal-format
msgid "expected string literal or constant integer expression"
-msgstr "argument %<score%> mora biti konstantan cjelobrojni izraz"
+msgstr "očekivan je literalni string ili konstantni cjelobrojni izraz"
#: c/c-parser.cc:20555 c/c-parser.cc:20684 cp/parser.cc:42832
#: cp/parser.cc:42979 cp/semantics.cc:7512
@@ -49035,10 +48943,9 @@ msgid "unknown foreign runtime identifier %qwd"
msgstr ""
#: c/c-parser.cc:20593 cp/parser.cc:42891
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<none%> or %<present%>"
+#, gcc-internal-format
msgid "expected %<fr%> or %<attr%> preference selector"
-msgstr "očekivano je %<none%> ili %<present%>"
+msgstr "očekivan je %<fr%> ili selektor preferencija %<attr%>"
#: c/c-parser.cc:20601 cp/parser.cc:42899
#, gcc-internal-format
@@ -49066,10 +48973,9 @@ msgid "duplicate %<targetsync%> modifier"
msgstr ""
#: c/c-parser.cc:20764 cp/parser.cc:43089
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<target%>"
+#, gcc-internal-format
msgid "duplicate %<target%> modifier"
-msgstr "očekivano je %<target%>"
+msgstr "duplicirani modifikator %<target%>"
#: c/c-parser.cc:20771 cp/parser.cc:43096
#, gcc-internal-format
@@ -49434,10 +49340,9 @@ msgstr ""
#. provided message with a more confusing one if there was
#. a bad pragma or attribute directive.
#: c/c-parser.cc:23945 cp/parser.cc:46195 cp/parser.cc:46197 cp/parser.cc:46382
-#, fuzzy, gcc-internal-format
-#| msgid "Not expected TAG."
+#, gcc-internal-format
msgid "loop nest expected"
-msgstr "TAG nije očekivan."
+msgstr "petlja nije očekivana"
#: c/c-parser.cc:23997 cp/parser.cc:46270
#, gcc-internal-format
@@ -49496,16 +49401,14 @@ msgid "expected %<for%> after %qs"
msgstr "očekivano je %<for%> iza %qs"
#: c/c-parser.cc:25352 c/c-parser.cc:25360
-#, fuzzy, gcc-internal-format
-#| msgid "expected function name"
+#, gcc-internal-format
msgid "expected a function name"
msgstr "očekivano je ime funkcije"
#: c/c-parser.cc:25373 cp/parser.cc:50211
-#, fuzzy, gcc-internal-format
-#| msgid "expected function name"
+#, gcc-internal-format
msgid "expected target-function call"
-msgstr "očekivano je ime funkcije"
+msgstr "očekivan je poziv ciljane funkcije (target-function) "
#: c/c-parser.cc:25443
#, gcc-internal-format
@@ -49603,10 +49506,9 @@ msgid "expected identifier or string literal"
msgstr ""
#: c/c-parser.cc:26753 cp/parser.cc:49835 cp/pt.cc:18215
-#, fuzzy, gcc-internal-format
-#| msgid "%<score%> argument must be constant integer expression"
+#, gcc-internal-format
msgid "property must be integer expression"
-msgstr "argument %<score%> mora biti konstantan cjelobrojni izraz"
+msgstr "svojstvo (property) mora biti cjelobrojni izraz"
#: c/c-parser.cc:26766 cp/parser.cc:49846
#, gcc-internal-format
@@ -49624,10 +49526,9 @@ msgid "expected context selector set name"
msgstr "očekivano je ime konteksta skupa selektora"
#: c/c-parser.cc:26958 cp/parser.cc:50429
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<at%>, %<severity%> or %<message%> clause"
+#, gcc-internal-format
msgid "expected %<match%>, %<adjust_args%> or %<append_args%> clause"
-msgstr "očekivano je %<at%>, %<severity%> ili %<message%> klauzula"
+msgstr "očekivano je %<match%>, %<adjust_args%> ili %<append_args%> klauzula"
#: c/c-parser.cc:26974 cp/parser.cc:50442
#, gcc-internal-format
@@ -49650,16 +49551,14 @@ msgid "%qD is specified more than once"
msgstr ""
#: c/c-parser.cc:27053
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not an object type"
+#, gcc-internal-format
msgid "%qD is not of pointer type"
-msgstr " %qT nije tip objekta"
+msgstr "%qD nije tip pokazivača>"
#: c/c-parser.cc:27073 cp/parser.cc:50537
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<ancestor%> or %<device_num%>"
+#, gcc-internal-format
msgid "expected %<nothing%> or %<need_device_ptr%>"
-msgstr "očekivano je %<ancestor%> ili %<device_num%>"
+msgstr "očekivano je %<nothing%> ili %<need_device_ptr%>"
#: c/c-parser.cc:27076
#, gcc-internal-format
@@ -49667,16 +49566,14 @@ msgid "%<need_device_addr%> is not valid for C"
msgstr ""
#: c/c-parser.cc:27083 cp/parser.cc:50544
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<ancestor%> or %<device_num%>"
+#, gcc-internal-format
msgid "expected %<nothing%> or %<need_device_ptr%> followed by %<:%>"
-msgstr "očekivano je %<ancestor%> ili %<device_num%>"
+msgstr "očekivano je %<nothing%> ili %<need_device_ptr%> slijeđen s/sa %<:%>"
#: c/c-parser.cc:27103 cp/parser.cc:50561
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<point%>"
+#, gcc-internal-format
msgid "expected %<interop%>"
-msgstr "očekivano je %<point%>"
+msgstr "očekivano je %<interop%>"
#: c/c-parser.cc:27197 cp/decl.cc:8601
#, gcc-internal-format
@@ -49862,10 +49759,9 @@ msgid "variable sized type %qT in %<reduction%> clause"
msgstr ""
#: c/c-parser.cc:28474 cp/parser.cc:48878
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<else%>"
+#, gcc-internal-format
msgid "expected %<sizes%>"
-msgstr "očekivano %<else%>"
+msgstr "očekivano je %<sizes%>"
#: c/c-parser.cc:28503 cp/semantics.cc:9566 cp/semantics.cc:9583
#, gcc-internal-format
@@ -49939,10 +49835,9 @@ msgid "expected assumption clause"
msgstr "očekivana je klauzula pretpostavki"
#: c/c-parser.cc:29050 cp/parser.cc:51385
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<depend%>, %<destroy%> or %<update%> clause"
+#, gcc-internal-format
msgid "expected %<when%>, %<otherwise%>, or %<default%> clause"
-msgstr "očekivano je %<depend%>, %<destroy%> ili %<update%> klauzula"
+msgstr "očekivano je %<when%>, %<otherwise%> ili %<default%> klauzula"
#: c/c-parser.cc:29064 cp/parser.cc:51400
#, gcc-internal-format
@@ -49955,10 +49850,9 @@ msgid "%<otherwise%> or %<default%> clause must appear last in %<metadirective%>
msgstr ""
#: c/c-parser.cc:29163 cp/parser.cc:51501
-#, fuzzy, gcc-internal-format
-#| msgid "unknown relocation unspec"
+#, gcc-internal-format
msgid "unknown directive name"
-msgstr "nepoznata relokacija unspec"
+msgstr "nepoznato ime direktive"
#: c/c-parser.cc:29178 cp/parser.cc:51521
#, gcc-internal-format
@@ -50694,10 +50588,8 @@ msgid "array initialized from parenthesized string constant"
msgstr ""
#: c/c-typeck.cc:7617
-#, fuzzy
-#| msgid "expected %qT but pointer is of type %qT"
msgid "expected %e but argument is of type %e"
-msgstr "očekivan %qT ali pokazivač je tipa %qT"
+msgstr "očekivan je %e ali argument je tip %e"
#: c/c-typeck.cc:7651
#, gcc-internal-format
@@ -50715,10 +50607,8 @@ msgid "built-in %qD declared here"
msgstr ""
#: c/c-typeck.cc:7716 c/c-typeck.cc:8624
-#, fuzzy
-#| msgid "redeclared here"
msgid "%e declared here"
-msgstr "ponovno deklarirano ovdje"
+msgstr "%e je deklariran ovdje"
#: c/c-typeck.cc:7909
#, gcc-internal-format
@@ -51904,10 +51794,9 @@ msgid "%qD must be of %<omp_interop_t%>"
msgstr ""
#: c/c-typeck.cc:17458 cp/semantics.cc:9727
-#, fuzzy, gcc-internal-format
-#| msgid "%qD cannot be %qs"
+#, gcc-internal-format
msgid "%qD shall not be const"
-msgstr "%qD ne moĆŸe bit %qs"
+msgstr "%qD ne smije biti konstanta"
#: c/c-typeck.cc:17507 cp/semantics.cc:10080
#, gcc-internal-format
@@ -52216,22 +52105,19 @@ msgid "COBOL requires a 64-bit configuration"
msgstr ""
#: cobol/cobol1.cc:327
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Creating '%s'\n"
+#, gcc-internal-format, gfc-internal-format
msgid "exception '%s'"
-msgstr "Stvaramo ‘%s”\n"
+msgstr "iznimka ‘%s’"
#: cobol/cobol1.cc:413
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "cannot execute %qs: %s"
+#, gcc-internal-format, gfc-internal-format
msgid "could not execute preprocessor %s"
-msgstr "ne moĆŸe izvrĆĄiti %qs: %s"
+msgstr "nije (bilo) moguće izvrơiti predprocesor %s"
#: cobol/cobol1.cc:418
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "could not find specs file %s\n"
+#, gcc-internal-format, gfc-internal-format
msgid "could not include %s"
-msgstr "nije bilo moguće naći specs datoteku %s\n"
+msgstr "nije (bilo) moguće uključiti %s"
#. This isn't right. All OPT_main should be replaced
#: cobol/cobol1.cc:424
@@ -52486,10 +52372,9 @@ msgid "The given type is not a DECL or a TYPE"
msgstr ""
#: cobol/gengen.cc:412
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "unknown lam type %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "Unknown type %d"
-msgstr "nepoznati ‘lam’ tip %qs"
+msgstr "Nepoznati tip %d"
#: cobol/gengen.cc:2931
#, gcc-internal-format
@@ -52507,16 +52392,14 @@ msgid "Too many subscripts"
msgstr ""
#: cobol/lexio.cc:1485
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%s signal terminated program %s"
+#, gcc-internal-format, gfc-internal-format
msgid "%s pid %d terminated by %s"
-msgstr "signal %s je prekinuo (zavrĆĄio) program %s"
+msgstr "%s PID %d prekinut s %s"
#: cobol/lexio.cc:1490
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%qD is defined with tls model %s"
+#, gcc-internal-format, gfc-internal-format
msgid "%s exited with status %d"
-msgstr "%qD je definiran s TLS modelom %s"
+msgstr "%s je zavrĆĄio sa statusom %d"
#: cobol/symbols.cc:530
msgid "%s:%d: LblNone '%s' has parent #%zu"
@@ -52538,10 +52421,9 @@ msgid "logic error: MOVE %s %s invalid type:"
msgstr ""
#: cobol/util.cc:1695
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%s: %s: %s"
+#, gcc-internal-format, gfc-internal-format
msgid "%s: regcomp: %s"
-msgstr "%s: %s: %s"
+msgstr "%s: regcomp: %s"
#: cobol/util.cc:1805
#, gcc-internal-format, gfc-internal-format
@@ -52549,10 +52431,9 @@ msgid "logic error: missing inode for %s"
msgstr ""
#: cobol/util.cc:2143
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "collect: recompiling %s\n"
+#, gcc-internal-format, gfc-internal-format
msgid "failed compiling %s"
-msgstr "collect: ponovo kompajliram %s\n"
+msgstr "nije uspjelo kompilirati %s"
#: cp/call.cc:2106
#, gcc-internal-format
@@ -52650,10 +52531,9 @@ msgid "%s%#qD"
msgstr ""
#: cp/call.cc:4058
-#, fuzzy, gcc-internal-format
-#| msgid "modified here"
+#, gcc-internal-format
msgid "inherited here"
-msgstr "izmijenjeno ovdje"
+msgstr "naslijeđeno ovdje"
#: cp/call.cc:4080
#, gcc-internal-format
@@ -53030,10 +52910,9 @@ msgid "converting %<false%> to pointer type %qT"
msgstr ""
#: cp/call.cc:8547
-#, fuzzy, gcc-internal-format
-#| msgid "invalid argument %<%s%> for %<%s%>"
+#, gcc-internal-format
msgid "initializing argument %P of %qD"
-msgstr "nevaljani argument %<%s%> za %<%s%>"
+msgstr "inicijaliziramo argument %P of %qD"
#: cp/call.cc:8569
#, gcc-internal-format
@@ -54027,10 +53906,9 @@ msgid "the type %qT of %<constexpr%> variable %qD is not literal"
msgstr ""
#: cp/constexpr.cc:123
-#, fuzzy, gcc-internal-format
-#| msgid "function-try-block body of %<constexpr%> constructor only available with %<-std=c++20%> or %<-std=gnu++20%>"
+#, gcc-internal-format
msgid "variable %qD of non-literal type %qT in %<constexpr%> function only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "tijelo function-try-block u %<constexpr%> konstruktoru dostupno je samo s %<-std=c++20%> ili %<-std=gnu++20%>"
+msgstr "varijabla %qD neliteralnog tipa %qT u funkciji %<constexpr%> je samo dostupna s/sa %<-std=c++23%> or %<-std=gnu++23%>"
#: cp/constexpr.cc:136
#, gcc-internal-format
@@ -54204,10 +54082,9 @@ msgid "expression %qE does not designate a %<constexpr%> function"
msgstr ""
#: cp/constexpr.cc:2940
-#, fuzzy, gcc-internal-format
-#| msgid "cannot allocate vl register for %qs on this target"
+#, gcc-internal-format
msgid "cannot allocate array: size not constant"
-msgstr "ne moĆŸe dodijeliti vl registar za %qs na ovoom cilju"
+msgstr "ne moguće dodijeliti polje: veličina nije konstanta"
#: cp/constexpr.cc:2981
#, gcc-internal-format
@@ -54786,10 +54663,9 @@ msgid "non-constant array initialization"
msgstr ""
#: cp/constexpr.cc:10965
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "label definition in %<constexpr%> function only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "definicija oznake u funkciji %<constexpr%> je dostupna samo s %<-std=c++23%> or %<-std=gnu++23%>"
#: cp/constexpr.cc:11001 rust/backend/rust-constexpr.cc:6438
#, gcc-internal-format, gfc-internal-format
@@ -54921,12 +54797,12 @@ msgstr " %qT ne moĆŸe dodijeliti kopiju pomoću ‘nothrow’"
#: cp/constraint.cc:3045 cp/constraint.cc:3139
#, gcc-internal-format
msgid " %qT is not nothrow default constructible"
-msgstr " %qT se ne moĆŸe sagraditi prema zadanim postavkama s ‘nothrow’"
+msgstr " %qT nije moguće sagraditi prema zadanim postavkama s ‘nothrow’"
#: cp/constraint.cc:3048
#, gcc-internal-format
msgid " %qT is not nothrow copy constructible"
-msgstr " %qT se ne moĆŸe konstruirati kopiranjem s ‘nothrow’"
+msgstr " %qT nije moguće konstruirati kopiranjem s ‘nothrow’"
#: cp/constraint.cc:3051
#, gcc-internal-format
@@ -54976,7 +54852,7 @@ msgstr " %qT nije polje"
#: cp/constraint.cc:3078
#, gcc-internal-format
msgid " %qT is not assignable from %qT"
-msgstr " %qT se ne moĆŸe dodijeliti iz %qT"
+msgstr " %qT nije moguće dodijeliti iz %qT"
#: cp/constraint.cc:3081
#, gcc-internal-format
@@ -54994,10 +54870,9 @@ msgid " %qT is not a class"
msgstr ""
#: cp/constraint.cc:3090
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not an object type"
+#, gcc-internal-format
msgid " %qT is not a const type"
-msgstr " %qT nije tip objekta"
+msgstr " %qT nije tip konstante"
#: cp/constraint.cc:3094
#, gcc-internal-format
@@ -55007,12 +54882,12 @@ msgstr " %qT nema upotrebljiv zadani konstruktor"
#: cp/constraint.cc:3096
#, gcc-internal-format
msgid " %qT is not constructible from %qE"
-msgstr " %qT se ne moĆŸe konstruirati iz %qE"
+msgstr " %qT nije moguće konstruirati iz %qE"
#: cp/constraint.cc:3099
#, gcc-internal-format
msgid " %qT is not convertible from %qE"
-msgstr " %qT se ne moĆŸe pretvoriti iz %qE"
+msgstr " %qT nije moguće pretvoriti iz %qE"
#: cp/constraint.cc:3102
#, gcc-internal-format
@@ -55035,16 +54910,14 @@ msgid " %qT is not a function"
msgstr "%qT nije funkcija"
#: cp/constraint.cc:3115
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not trivially copyable"
+#, gcc-internal-format
msgid " %qT is not invocable"
-msgstr " %qT se ne moĆŸe trivijalno kopirati"
+msgstr " %qT nije moguće pozvati"
#: cp/constraint.cc:3117
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not assignable from %qT"
+#, gcc-internal-format
msgid " %qT is not invocable by %qE"
-msgstr " %qT se ne moĆŸe dodijeliti iz %qT"
+msgstr " %qT nije moguće pozvati s/sa %qE"
#: cp/constraint.cc:3120
#, gcc-internal-format
@@ -55059,44 +54932,42 @@ msgstr ""
#: cp/constraint.cc:3126
#, gcc-internal-format
msgid " %qT is not a member function pointer"
-msgstr "%qT nije član pointera funkcije"
+msgstr "%qT nije član pokazivača> funkcije"
#: cp/constraint.cc:3129
#, gcc-internal-format
msgid " %qT is not a member object pointer"
-msgstr " %qT nije član pointera objekta"
+msgstr " %qT nije član pokazivača> objekta"
#: cp/constraint.cc:3132
#, gcc-internal-format
msgid " %qT is not a member pointer"
-msgstr " %qT nije član pointera"
+msgstr " %qT nije član pokazivača>"
#: cp/constraint.cc:3135
#, gcc-internal-format
msgid " %qT is not nothrow assignable from %qT"
-msgstr " %qT se ne moĆŸe dodijeliti s ‘nothrow’ od %qT"
+msgstr " %qT nije moguće dodijeliti s ‘nothrow’ od %qT"
#: cp/constraint.cc:3141
#, gcc-internal-format
msgid " %qT is not nothrow constructible from %qE"
-msgstr " %qT se ne moĆŸe izgraditi s ‘nothrow’ iz %qE"
+msgstr " %qT nije moguće izgraditi s ‘nothrow’ iz %qE"
#: cp/constraint.cc:3144
#, gcc-internal-format
msgid " %qT is not nothrow convertible from %qE"
-msgstr " %qT se ne moĆŸe pretvoriti s ‘nothrow’ iz %qE"
+msgstr " %qT nije moguće pretvoriti s ‘nothrow’ iz %qE"
#: cp/constraint.cc:3148
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not nothrow copy assignable"
+#, gcc-internal-format
msgid " %qT is not nothrow invocable"
-msgstr " %qT ne moĆŸe dodijeliti kopiju pomoću ‘nothrow’"
+msgstr " %qT nije moguće ‘nothrow’ pozvati"
#: cp/constraint.cc:3150
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not nothrow assignable from %qT"
+#, gcc-internal-format
msgid " %qT is not nothrow invocable by %qE"
-msgstr " %qT se ne moĆŸe dodijeliti s ‘nothrow’ od %qT"
+msgstr " %qT nije moguće s/sa %qE ‘nothrow’ pozvati"
#: cp/constraint.cc:3153
#, gcc-internal-format
@@ -55114,10 +54985,9 @@ msgid " %qT is not a POD type"
msgstr ""
#: cp/constraint.cc:3163
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not a member pointer"
+#, gcc-internal-format
msgid " %qT is not a pointer"
-msgstr " %qT nije član pointera"
+msgstr " %qT nije pokazivač"
#: cp/constraint.cc:3166
#, gcc-internal-format
@@ -55152,23 +55022,22 @@ msgstr ""
#: cp/constraint.cc:3184
#, gcc-internal-format
msgid " %qT is not trivially assignable from %qT"
-msgstr " %qT se ne moĆŸe trivijalno dodijeliti iz %qT"
+msgstr " %qT nije moguće trivijalno dodijeliti iz %qT"
#: cp/constraint.cc:3190
#, gcc-internal-format
msgid " %qT is not trivially constructible from %qE"
-msgstr " %qT se ne moĆŸe trivijalno konstruirati iz %qE"
+msgstr " %qT nije moguće trivijalno konstruirati iz %qE"
#: cp/constraint.cc:3193
#, gcc-internal-format
msgid " %qT is not trivially copyable"
-msgstr " %qT se ne moĆŸe trivijalno kopirati"
+msgstr " %qT nije moguće trivijalno kopirati"
#: cp/constraint.cc:3196
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not a bounded array"
+#, gcc-internal-format
msgid " %qT is not an unbounded array"
-msgstr " %qT nije ograničeno polje"
+msgstr " %qT nije neograničeno polje"
#: cp/constraint.cc:3199
#, gcc-internal-format
@@ -55176,22 +55045,19 @@ msgid " %qT is not a union"
msgstr ""
#: cp/constraint.cc:3202
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not assignable from %qT"
+#, gcc-internal-format
msgid " %qT is not a virtual base of %qT"
-msgstr " %qT se ne moĆŸe dodijeliti iz %qT"
+msgstr " %qT nije virtualna baza od %qT"
#: cp/constraint.cc:3205
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not an object type"
+#, gcc-internal-format
msgid " %qT is not a volatile type"
-msgstr " %qT nije tip objekta"
+msgstr " %qT nije nepostojan tip"
#: cp/constraint.cc:3208
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not an array"
+#, gcc-internal-format
msgid " %qT cannot yield a rank"
-msgstr " %qT nije polje"
+msgstr " %qT ne moĆŸe dato ramg"
#: cp/constraint.cc:3211
#, gcc-internal-format
@@ -55206,7 +55072,7 @@ msgstr ""
#: cp/constraint.cc:3219
#, gcc-internal-format
msgid " %qD is not deducible from %qT"
-msgstr " %qD se ne moĆŸe izvesti iz %qT"
+msgstr " %qD nije moguće izvesti iz %qT"
#: cp/constraint.cc:3246
#, gcc-internal-format
@@ -55415,10 +55281,9 @@ msgid "%qE must be a non-overloaded method"
msgstr ""
#: cp/coroutines.cc:547
-#, fuzzy, gcc-internal-format
-#| msgid "%qD is not a function argument"
+#, gcc-internal-format
msgid "%qE must take no arguments"
-msgstr "%qD nije argument funkcije"
+msgstr "%qE ne smije primati argumente"
#: cp/coroutines.cc:554 cp/coroutines.cc:599
#, gcc-internal-format
@@ -55426,10 +55291,9 @@ msgid "%qE must return %qT, not %qT"
msgstr ""
#: cp/coroutines.cc:581
-#, fuzzy, gcc-internal-format
-#| msgid "%qD must be a member function"
+#, gcc-internal-format
msgid "%qE must be a non-overloaded static function"
-msgstr "%qD mora biti član funkcije"
+msgstr "%qE mora biti statička, ‘non-overloaded’ funkcija"
#: cp/coroutines.cc:592
#, gcc-internal-format
@@ -56050,10 +55914,9 @@ msgid "with"
msgstr ""
#: cp/decl.cc:733
-#, fuzzy, gcc-internal-format
-#| msgid "In function %qD"
+#, gcc-internal-format
msgid "unused using-declaration %qD"
-msgstr "U funkciji %qD"
+msgstr "nekoriơtena ‘using-declaration’ %qD"
#: cp/decl.cc:737
#, gcc-internal-format
@@ -56789,16 +56652,14 @@ msgid "block-scope extern declaration %q#D must not be attached to a named modul
msgstr ""
#: cp/decl.cc:6205
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "%qD defined %<thread_local%> in %qs function only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "%qD definiran %<thread_local%> u funkciji %qs dostupan je samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/decl.cc:6211
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "%qD defined %<static%> in %qs function only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "%qD definiran %<static%> u funkciji %qs dostupan je samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/decl.cc:6277
#, gcc-internal-format
@@ -57124,10 +56985,9 @@ msgid "cannot decompose lambda closure type %qT"
msgstr ""
#: cp/decl.cc:9579
-#, fuzzy, gcc-internal-format
-#| msgid "redeclared here"
+#, gcc-internal-format
msgid "lambda declared here"
-msgstr "ponovno deklarirano ovdje"
+msgstr "lambda je deklarirana ovdje"
#: cp/decl.cc:9595
#, gcc-internal-format
@@ -58120,10 +57980,9 @@ msgid "%qs function with trailing return type has constrained %<auto%> type spec
msgstr ""
#: cp/decl.cc:14050
-#, fuzzy, gcc-internal-format
-#| msgid "invalid constraints for operand"
+#, gcc-internal-format
msgid "invalid use of constrained %<auto%> type"
-msgstr "nevaljano ograničenje za operand"
+msgstr "nevaljana upotreba ograničenog %<auto%> tipa"
#: cp/decl.cc:14062
#, gcc-internal-format
@@ -59514,10 +59373,9 @@ msgid "converting lambda that uses %<...%> to function pointer"
msgstr ""
#: cp/decl2.cc:6317
-#, fuzzy, gcc-internal-format
-#| msgid "unknown spec function %qs"
+#, gcc-internal-format
msgid "use of deleted function %qD: %s"
-msgstr "nepoznata spec funkcija %qs"
+msgstr "koriĆĄtenje izbrisane funkcije %qD: %s"
#: cp/decl2.cc:6321
#, gcc-internal-format
@@ -60685,10 +60543,9 @@ msgid "conflicting default argument for %#qD"
msgstr ""
#: cp/module.cc:12188 cp/module.cc:12215
-#, fuzzy, gcc-internal-format
-#| msgid "virtual function declared here"
+#, gcc-internal-format
msgid "existing default declared here"
-msgstr "virtualna funkcija ranije je ovdje deklarirana"
+msgstr "postojeća zadana vrijednost (default) deklarirana je ovdje"
#: cp/module.cc:12212
#, gcc-internal-format
@@ -60863,7 +60720,7 @@ msgstr "kompilirani modul je %sversion %s"
#: cp/module.cc:19279
#, gcc-internal-format, gfc-internal-format
msgid "compiler is %sversion %s%s%s"
-msgstr "kompajler je %sversion %s%s%s"
+msgstr "kompilator je %sversion %s%s%s"
#: cp/module.cc:19309
#, gcc-internal-format
@@ -61003,13 +60860,12 @@ msgstr ""
#: cp/module.cc:20611
#, gcc-internal-format
msgid "exporting declaration %qD declared in unnamed namespace"
-msgstr ""
+msgstr "izvozimo deklariraciju %qD deklariranu u neimenovanom imeskom prostoru"
#: cp/module.cc:20618
-#, fuzzy, gcc-internal-format
-#| msgid "redeclaration of %qD with different constraints"
+#, gcc-internal-format
msgid "exporting declaration %qD with internal linkage"
-msgstr "ponovna deklaracija %qD s drukčijim ograničenjima"
+msgstr "izvozimo deklariraciju %qD s internim povezivajem"
#: cp/module.cc:20771
#, gcc-internal-format
@@ -61079,10 +60935,9 @@ msgid "mismatching compiled module interface: had %qs, got %qs"
msgstr ""
#: cp/module.cc:21293
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "compiled module is %sversion %s"
+#, gcc-internal-format, gfc-internal-format
msgid "unknown compiled module interface: %s"
-msgstr "kompilirani modul je %sversion %s"
+msgstr "nepoznato sučelje kompiliranog modula: %s"
#: cp/module.cc:21337
#, gcc-internal-format
@@ -61494,10 +61349,9 @@ msgid "%<#pragma%> is not allowed here"
msgstr ""
#: cp/parser.cc:3356
-#, fuzzy, gcc-internal-format
-#| msgid "expected directive name"
+#, gcc-internal-format
msgid "unexpected module directive"
-msgstr "očekivano je ime direktive"
+msgstr "neočekivana direktiva modula"
#: cp/parser.cc:3358
#, gcc-internal-format
@@ -61901,10 +61755,9 @@ msgid "mismatched operator in fold-expression"
msgstr ""
#: cp/parser.cc:5918
-#, fuzzy, gcc-internal-format
-#| msgid "name-independent declarations only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "pack indexing only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "deklaracije neovisne o imenu dostupne su samo s %<-std=c++2c%> ili %<-std=gnu++2c%>"
+msgstr "‘pack’ indeksiranje dostupno je samo s/sa %<-std=c++2c%> ili %<-std=gnu++2c%>"
#: cp/parser.cc:5928
#, gcc-internal-format
@@ -62082,10 +61935,9 @@ msgid "call to %<__builtin_operator_delete%> does not select replaceable global
msgstr ""
#: cp/parser.cc:8078 cp/pt.cc:21583
-#, fuzzy, gcc-internal-format
-#| msgid "virtual function declared here"
+#, gcc-internal-format
msgid "selected function declared here"
-msgstr "virtualna funkcija ranije je ovdje deklarirana"
+msgstr "odabrana funkcija deklarirana je ovdje"
#: cp/parser.cc:8211
#, gcc-internal-format
@@ -62329,10 +62181,9 @@ msgid "default argument specified for lambda parameter"
msgstr ""
#: cp/parser.cc:12282
-#, fuzzy, gcc-internal-format
-#| msgid "name-independent declarations only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "parameter declaration before lambda declaration specifiers only optional with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "deklaracije neovisne o imenu dostupne su samo s %<-std=c++2c%> ili %<-std=gnu++2c%>"
+msgstr "deklaracija parametara prije specifikaora lambda deklaracije nije obavezna samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/parser.cc:12312 cp/pt.cc:14954
#, gcc-internal-format
@@ -62370,22 +62221,19 @@ msgid "%<static%> lambda specifier with lambda capture"
msgstr ""
#: cp/parser.cc:12379
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "parameter declaration before lambda transaction qualifier only optional with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "deklaracija parametra prije kvalifikatora lambda transakcije nije obvezna samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/parser.cc:12392
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "parameter declaration before lambda exception specification only optional with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "deklaracija parametra prije specifikacije lambda iznimke nije obvezna samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/parser.cc:12410
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "parameter declaration before lambda trailing return type only optional with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "deklaracija parametra prije lambda zaostajućeg tipa povrata nije obvezna samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/parser.cc:12452
#, gcc-internal-format
@@ -62408,10 +62256,9 @@ msgid "assertions must be followed by %<;%>"
msgstr ""
#: cp/parser.cc:13186
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "label at end of compound statement only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "oznaka na kraju sloĆŸene naredbe (statement) dostupna je samo s/sa %<-std=c++23%> or %<-std=gnu++23%>"
#: cp/parser.cc:13366 cp/parser.cc:13611
#, gcc-internal-format
@@ -62455,10 +62302,9 @@ msgid "%<if constexpr%> only available with %<-std=c++17%> or %<-std=gnu++17%>"
msgstr ""
#: cp/parser.cc:13974
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "%<if consteval%> only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "%<if consteval%> je dostupan samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/parser.cc:13999 cp/parser.cc:14034
#, gcc-internal-format
@@ -62548,10 +62394,9 @@ msgid "range-based %<for%> loops only available with %<-std=c++11%> or %<-std=gn
msgstr ""
#: cp/parser.cc:15374
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "%<goto%> in %<constexpr%> function only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "%<goto%> u funkciji %<constexpr%> dostupno je samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#. Issue a warning about this use of a GNU extension.
#: cp/parser.cc:15383
@@ -62585,10 +62430,9 @@ msgid "module-declaration must be at global scope"
msgstr ""
#: cp/parser.cc:15628
-#, fuzzy, gcc-internal-format
-#| msgid "previously defined here"
+#, gcc-internal-format
msgid "scope opened here"
-msgstr "ranije definiran ovdje"
+msgstr "doseg je otvoren ovdje"
#: cp/parser.cc:15654
#, gcc-internal-format
@@ -62657,10 +62501,9 @@ msgid "extra %<;%> outside of a function only allowed in C++11"
msgstr ""
#: cp/parser.cc:15855
-#, fuzzy, gcc-internal-format
-#| msgid "return type of function"
+#, gcc-internal-format
msgid "extra %<;%> outside of a function"
-msgstr "vrati tip funkcije"
+msgstr "dodatni %<;%> je izvan funkcije"
#: cp/parser.cc:15864
#, gcc-internal-format
@@ -62688,10 +62531,9 @@ msgid "attributes may be inserted here"
msgstr ""
#: cp/parser.cc:16088
-#, fuzzy, gcc-internal-format
-#| msgid "await expressions are not permitted in handlers"
+#, gcc-internal-format
msgid "explicit specializations are not permitted here"
-msgstr "‘await’ izraz nije dopuơten u rukovateljima (handlers)"
+msgstr "eksplicitne specijalizacije ovdje nisu dopuĆĄtene"
#: cp/parser.cc:16090 cp/parser.cc:28230
#, gcc-internal-format
@@ -62699,16 +62541,14 @@ msgid "a specialization is always exported alongside its primary template"
msgstr ""
#: cp/parser.cc:16103
-#, fuzzy, gcc-internal-format
-#| msgid "await expressions are not permitted in handlers"
+#, gcc-internal-format
msgid "explicit instantiations are not permitted here"
-msgstr "‘await’ izraz nije dopuơten u rukovateljima (handlers)"
+msgstr "eksplicitne instancije ovdje nisu dopuĆĄtene"
#: cp/parser.cc:16119
-#, fuzzy, gcc-internal-format
-#| msgid "await expressions are not permitted in handlers"
+#, gcc-internal-format
msgid "export-declarations are not permitted here"
-msgstr "‘await’ izraz nije dopuơten u rukovateljima (handlers)"
+msgstr "izvozne deklaracije ovdje nisu dopuĆĄtene"
#: cp/parser.cc:16290
#, gcc-internal-format
@@ -62746,16 +62586,14 @@ msgid "multiple declarations in range-based %<for%> loop"
msgstr ""
#: cp/parser.cc:16701
-#, fuzzy, gcc-internal-format
-#| msgid "name-independent declarations only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "structured bindings with attributed identifiers only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "deklaracije neovisne o imenu dostupne su samo s %<-std=c++2c%> ili %<-std=gnu++2c%>"
+msgstr "strukturirana povezivanja s pripisanim identifikatorima dostupna su samo s/sa %<-std=c++2c%> ili %<-std=gnu++2c%>"
#: cp/parser.cc:16738
-#, fuzzy, gcc-internal-format
-#| msgid "name-independent declarations only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "structured bindings in conditions only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "deklaracije neovisne o imenu dostupne su samo s %<-std=c++2c%> ili %<-std=gnu++2c%>"
+msgstr "strukturirana povezivanja u uvjetima dostupna su samo s/sa %<-std=c++2c%> ili %<-std=gnu++2c%>"
#: cp/parser.cc:16742
#, gcc-internal-format
@@ -62945,7 +62783,7 @@ msgstr ""
#: cp/parser.cc:18755
#, gcc-internal-format
msgid "invalid encoding prefix in literal operator"
-msgstr "nevaljani prefiks kodiranja u doslovnom (literal) operatoru"
+msgstr "nevaljani prefiks kodiranja u literalnom"
#: cp/parser.cc:18789
#, gcc-internal-format
@@ -63129,10 +62967,9 @@ msgid "concept defined here"
msgstr ""
#: cp/parser.cc:21354
-#, fuzzy, gcc-internal-format
-#| msgid "invalid system register name %qs"
+#, gcc-internal-format
msgid "invalid use of concept-name %qD"
-msgstr "nevaljano ime sustavnog registra %qs"
+msgstr "nevaljana upotreba %<concept-name%> %qD"
#: cp/parser.cc:21370
#, gcc-internal-format
@@ -63790,10 +63627,9 @@ msgid "in C++03 a class-key must be used when declaring a friend"
msgstr ""
#: cp/parser.cc:28816
-#, fuzzy, gcc-internal-format
-#| msgid "name-independent declarations only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "variadic friends or friend type declarations with multiple types only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "deklaracije neovisne o imenu dostupne su samo s %<-std=c++2c%> ili %<-std=gnu++2c%>"
+msgstr "promjenjivi prijatelji ili deklaracije tipa prijatelja s viĆĄe vrsta dostupni su samo s/sa %<-std=c++2c%> ili %<-std=gnu++2c%>"
#: cp/parser.cc:28857
#, gcc-internal-format
@@ -63841,10 +63677,9 @@ msgid "expected %<;%> at end of member declaration"
msgstr ""
#: cp/parser.cc:29386
-#, fuzzy, gcc-internal-format
-#| msgid "name-independent declarations only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
+#, gcc-internal-format
msgid "%<delete%> reason only available with %<-std=c++2c%> or %<-std=gnu++2c%>"
-msgstr "deklaracije neovisne o imenu dostupne su samo s %<-std=c++2c%> ili %<-std=gnu++2c%>"
+msgstr "%<delete%> razlog su dostupni samo s/sa %<-std=c++2c%> ili %<-std=gnu++2c%>"
#: cp/parser.cc:29409
#, gcc-internal-format
@@ -64492,10 +64327,9 @@ msgid "%<#pragma omp dispatch%> must be followed by a direct function call with
msgstr ""
#: cp/parser.cc:50515
-#, fuzzy, gcc-internal-format
-#| msgid " %qT is not a member pointer"
+#, gcc-internal-format
msgid "%qD is not a C pointer"
-msgstr " %qT nije član pointera"
+msgstr "%qD nije C pokazivač"
#: cp/parser.cc:50637
#, gcc-internal-format
@@ -65537,10 +65371,9 @@ msgid "instantiating erroneous template"
msgstr ""
#: cp/pt.cc:12462
-#, fuzzy, gcc-internal-format
-#| msgid "redeclared here"
+#, gcc-internal-format
msgid "first error appeared here"
-msgstr "ponovno deklarirano ovdje"
+msgstr "ovdje se pojavila prva greĆĄka"
#: cp/pt.cc:12813
#, gcc-internal-format
@@ -66363,10 +66196,9 @@ msgid "%<auto{x}%> cannot be constrained"
msgstr ""
#: cp/semantics.cc:3838
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "%<auto{x}%> only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "%<auto{x}%> je dostupno samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/semantics.cc:4030
#, gcc-internal-format
@@ -66469,10 +66301,9 @@ msgid "%qT is not an enumeration type"
msgstr ""
#: cp/semantics.cc:5093
-#, fuzzy, gcc-internal-format
-#| msgid "%qs requires an integer constant"
+#, gcc-internal-format
msgid "pack index is not an integral constant"
-msgstr "%qs zahtijeva cijelobrojnu (integer) konstantu"
+msgstr "‘pack’ indeks nije integralna konstanta"
#: cp/semantics.cc:5099
#, gcc-internal-format
@@ -66480,10 +66311,9 @@ msgid "pack index is negative"
msgstr ""
#: cp/semantics.cc:5105
-#, fuzzy, gcc-internal-format
-#| msgid "%<__type_pack_element%> index is out of range"
+#, gcc-internal-format
msgid "pack index is out of range"
-msgstr "index %<__type_pack_element%> je izvan raspona"
+msgstr "‘pack’ indeks je izvan raspona"
#. Parameter packs can only be used in templates
#: cp/semantics.cc:5242
@@ -66808,10 +66638,9 @@ msgid "constexpr string %<data()%> must be implicitly convertible to %<const cha
msgstr ""
#: cp/semantics.cc:12309
-#, fuzzy, gcc-internal-format
-#| msgid "%<score%> argument must be constant integer expression"
+#, gcc-internal-format
msgid "constexpr string %<size()%> must be a constant expression"
-msgstr "argument %<score%> mora biti konstantan cjelobrojni izraz"
+msgstr "‘constexpr’ string %<size()%> mora biti 'constant expression’"
#: cp/semantics.cc:12317
#, gcc-internal-format
@@ -66819,16 +66648,14 @@ msgid "constexpr string message %<size()%> %qE too large"
msgstr ""
#: cp/semantics.cc:12344
-#, fuzzy, gcc-internal-format
-#| msgid "%<score%> argument must be constant integer expression"
+#, gcc-internal-format
msgid "constexpr string %<data()[%d]%> must be a constant expression"
-msgstr "argument %<score%> mora biti konstantan cjelobrojni izraz"
+msgstr "‘constexpr’ string %<data()[%d]%> mora biti 'constant expression’"
#: cp/semantics.cc:12370
-#, fuzzy, gcc-internal-format
-#| msgid "%<score%> argument must be constant integer expression"
+#, gcc-internal-format
msgid "constexpr string %<data()%> must be a core constant expression"
-msgstr "argument %<score%> mora biti konstantan cjelobrojni izraz"
+msgstr "‘constexpr’ string %<data()%> mora biti 'constant expression’"
#: cp/semantics.cc:12469
#, gcc-internal-format
@@ -68437,10 +68264,9 @@ msgid "%<auto(x)%> cannot be constrained"
msgstr ""
#: cp/typeck2.cc:2513
-#, fuzzy, gcc-internal-format
-#| msgid "explicit object member function only available with %<-std=c++23%> or %<-std=gnu++23%>"
+#, gcc-internal-format
msgid "%<auto(x)%> only available with %<-std=c++23%> or %<-std=gnu++23%>"
-msgstr "eksplicitna funkcija člana objekta dostupna je samo s %<-std=c++23%> ili %<-std=gnu++23%>"
+msgstr "%<auto(x)%> su dostupni samo s/sa %<-std=c++23%> ili %<-std=gnu++23%>"
#: cp/typeck2.cc:2538
#, gcc-internal-format
@@ -68942,7 +68768,7 @@ msgstr ""
#: fortran/arith.cc:132
#, gcc-internal-format, gfc-internal-format
msgid "Invalid type in arithmetic operation at %L"
-msgstr "Nevaljan tip u aritmetičkom operandu kod %L"
+msgstr "Nevaljan tip u aritmetičkom operandu pri %L"
#: fortran/arith.cc:135
#, gcc-internal-format, gfc-internal-format
@@ -71036,7 +70862,7 @@ msgstr ""
#: fortran/decl.cc:2163
#, gcc-internal-format, gfc-internal-format
msgid "Bad shape of initializer at %L"
-msgstr "LoĆĄ oblik inicijalizatora kod %L"
+msgstr "LoĆĄ oblik inicijalizatora pri %L"
#: fortran/decl.cc:2170
#, gcc-internal-format, gfc-internal-format
@@ -71169,10 +70995,9 @@ msgid "%qs at %L is a redefinition of the declaration in the corresponding inter
msgstr ""
#: fortran/decl.cc:2919
-#, fuzzy, gcc-internal-format
-#| msgid "Bad shape of initializer at %L"
+#, gcc-internal-format
msgid "%qs entity cannot have an initializer at %L"
-msgstr "LoĆĄ oblik inicijalizatora kod %L"
+msgstr "%qs entitet ne moĆŸe imati inicijalizator pri %L"
#: fortran/decl.cc:2945
#, gcc-internal-format, gfc-internal-format
@@ -75479,10 +75304,9 @@ msgid "Expected association list at %C"
msgstr ""
#: fortran/match.cc:1930
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected name at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected associate name at %C"
-msgstr "očekivano je ime pri %C"
+msgstr "Očekivano je asocijativno ime pri %C"
#: fortran/match.cc:1940
#, gcc-internal-format, gfc-internal-format
@@ -75525,10 +75349,9 @@ msgid "The associate name %s with an assumed rank target at %L must have a bound
msgstr ""
#: fortran/match.cc:2018
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "the arguments to %qE must be constant strings"
+#, gcc-internal-format, gfc-internal-format
msgid "The assumed rank target at %C must be contiguous"
-msgstr "argumenti za %qE moraju biti konstantni stringovi"
+msgstr "Pretpostavljeni ciljni rang na %C mora biti međaơni"
#: fortran/match.cc:2037
#, gcc-internal-format
@@ -75566,10 +75389,9 @@ msgid "DEFAULT (NONE) specified more than once in DO CONCURRENT at %C"
msgstr ""
#: fortran/match.cc:2915
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected context selector set name at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected reduction operator or function name at %C"
-msgstr "očekivano je ime konteksta skupa selektora za %C"
+msgstr "Očekivan je operator redukcije ili naziv funkcije pri %C"
#: fortran/match.cc:2935 fortran/openmp.cc:2446 fortran/openmp.cc:2482
#: fortran/openmp.cc:2892 fortran/openmp.cc:2917
@@ -75578,10 +75400,9 @@ msgid "Expected %<:%> at %C"
msgstr "Očekivano je %<:%> pri %C"
#: fortran/match.cc:2945
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "unexpected file name %s in linker resolution file. Expected %s"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected variable name in reduction list at %C"
-msgstr "neočekivano ime datoteke %s u resolution datoteci linkera. Očekivano %s"
+msgstr "Očekivano je ime varijable u redukcijskom popisu pri %C"
#: fortran/match.cc:2964
#, gcc-internal-format, gfc-internal-format
@@ -76210,27 +76031,27 @@ msgstr ""
#: fortran/match.cc:6334
#, gcc-internal-format, gfc-internal-format
msgid "Invalid use of statement function argument at %L"
-msgstr "Nevaljana upotreba argumenta funkcije iskaza kod %L"
+msgstr "Nevaljana upotreba argumenta ‘statement funkcije’ za %L"
#: fortran/match.cc:6401
#, gcc-internal-format, gfc-internal-format
msgid "Statement function at %L is recursive"
-msgstr ""
+msgstr "’Statement funkcija’ pri %L je rekurzivna"
#: fortran/match.cc:6407
#, gcc-internal-format
msgid "Statement function %qs at %L conflicts with function name"
-msgstr ""
+msgstr "‘Statement funkcija’ %qs pri %L je u konfliktu s imenom funkcije"
#: fortran/match.cc:6421
#, gcc-internal-format, gfc-internal-format
msgid "Statement function at %L cannot appear within an INTERFACE"
-msgstr ""
+msgstr "‘Statement funkcija’ pri %L ne smije se pojaviti unutar INTERFACE"
#: fortran/match.cc:6426
#, gcc-internal-format, gfc-internal-format
msgid "Statement function at %C"
-msgstr ""
+msgstr "‘Statement funkcija’ pri %C’"
#: fortran/match.cc:6553 fortran/match.cc:6571 fortran/match.cc:6592
#, gcc-internal-format, gfc-internal-format
@@ -76841,10 +76662,9 @@ msgid "Unexpected %<(%> at %C"
msgstr "Neočekivan %<(%> pri %C"
#: fortran/openmp.cc:1909
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<{%> at %C"
+#, gcc-internal-format
msgid "Expected %<{%> at %C"
-msgstr "očekivano je %<{%> at %C"
+msgstr "Očekivano je %<{%> pri %C"
#: fortran/openmp.cc:1919
#, gcc-internal-format
@@ -76862,10 +76682,9 @@ msgid "Unknown foreign runtime identifier %qd at %L"
msgstr ""
#: fortran/openmp.cc:1972 fortran/openmp.cc:2107
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected coarray %qs in %<allocate%> at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Unexpected null character in character literal at %L"
-msgstr "Neočekivano polje (coarray) %qs u %<allocate%> pri %L"
+msgstr "Neočekivani null-znak u znakovnom literalu pri %L"
#: fortran/openmp.cc:1979 fortran/openmp.cc:2114
#, gcc-internal-format
@@ -76873,10 +76692,9 @@ msgid "Unknown foreign runtime identifier %qs at %L"
msgstr ""
#: fortran/openmp.cc:1986 fortran/openmp.cc:7085
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<)%> at %C"
+#, gcc-internal-format
msgid "Expected %<)%> at %C"
-msgstr "očekivano je %<)%> kod %C"
+msgstr "Očekivano je %<)%> pri %C"
#: fortran/openmp.cc:2002
#, gcc-internal-format, gfc-internal-format
@@ -76894,16 +76712,14 @@ msgid "Unexpected null or %<,%> character in character literal at %L"
msgstr ""
#: fortran/openmp.cc:2038
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<)%> or %<,%> at %C"
+#, gcc-internal-format
msgid "Expected %<fr(%> or %<attr(%> at %C"
-msgstr "Očekivano je %<)%> ili %<,%> pri %C"
+msgstr "Očekivano je %<fr(%> ili %<attr(%> pri %C"
#: fortran/openmp.cc:2045
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<,%> or %<)%> at %C"
+#, gcc-internal-format
msgid "Expected %<,%> or %<}%> at %C"
-msgstr "Očekivano je %<,%> ili %<)%> kod %C"
+msgstr "Očekivano je %%<,%> or %<}%> pri %C"
#: fortran/openmp.cc:2162
#, gcc-internal-format
@@ -76911,30 +76727,26 @@ msgid "Duplicate %<prefer_type%> modifier at %C"
msgstr ""
#: fortran/openmp.cc:2174 fortran/openmp.cc:2212 fortran/openmp.cc:2241
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<,%> or %<)%> at %C"
+#, gcc-internal-format
msgid "Expected %<,%> or %<:%> at %C"
-msgstr "Očekivano je %<,%> ili %<)%> kod %C"
+msgstr "Očekivano je %<,%> ili %<%> pri %C"
#. Avoid the word 'modifier' as it could be also be no clauses and
#. twice a variable named 'targetsync', which is also invalid.
#: fortran/openmp.cc:2190
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<match%> at %C"
+#, gcc-internal-format
msgid "Duplicate %<targetsync%> at %C"
-msgstr "očekivano je %<match%> pri %C"
+msgstr "Duplikat %<targetsync%> pri %C"
#: fortran/openmp.cc:2219
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<match%> at %C"
+#, gcc-internal-format
msgid "Duplicate %<target%> at %C"
-msgstr "očekivano je %<match%> pri %C"
+msgstr "Duplikat %<target%> pri %C"
#: fortran/openmp.cc:2246
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<)%> or %<,%> at %C"
+#, gcc-internal-format
msgid "Expected %<target%> or %<targetsync%> at %C"
-msgstr "Očekivano je %<)%> ili %<,%> pri %C"
+msgstr "Očekivano je %<target%> ili %<targetsync%> pri %C"
#: fortran/openmp.cc:2302
#, gcc-internal-format
@@ -77465,28 +77277,24 @@ msgid "expected expression at %C"
msgstr ""
#: fortran/openmp.cc:6484
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected constant logical expression"
+#, gcc-internal-format, gfc-internal-format
msgid "property must be a logical expression at %L"
-msgstr "očekivan je konstantni logički izraz"
+msgstr "svojstvo mora biti logički izraz pri %L"
#: fortran/openmp.cc:6488
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%<score%> argument must be constant integer expression"
+#, gcc-internal-format, gfc-internal-format
msgid "property must be an integer expression at %L"
-msgstr "argument %<score%> mora biti konstantan cjelobrojni izraz"
+msgstr "svojstvo mora biti cjelobrojni izraz prior %L"
#: fortran/openmp.cc:6495
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected constant logical expression"
+#, gcc-internal-format, gfc-internal-format
msgid "property must be a constant logical expression at %L"
-msgstr "očekivan je konstantni logički izraz"
+msgstr "svojstvo mora biti konstantni logički izraz pri %L"
#: fortran/openmp.cc:6499
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "%<score%> argument must be constant integer expression"
+#, gcc-internal-format, gfc-internal-format
msgid "property must be a constant integer expression at %L"
-msgstr "argument %<score%> mora biti konstantan cjelobrojni izraz"
+msgstr "svojstvo mora biti konstantni cjelobrojni izraz pri %L"
#: fortran/openmp.cc:6513
#, gcc-internal-format, gfc-internal-format
@@ -77534,28 +77342,24 @@ msgid "%qs clause at %L specified more than once"
msgstr ""
#: fortran/openmp.cc:6782
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<construct%>, %<device%>, %<implementation%> or %<user%> at %C"
+#, gcc-internal-format
msgid "expected %<nothing%>, %<need_device_ptr%> or %<need_device_addr%> at %C"
-msgstr "očekivano je %<construct%>, %<device%>, %<implementation%> ili %<user%> pri %C"
+msgstr "očekivano je %<nothing%>, %<need_device_ptr%> ili %<need_device_addr%> pri %C"
#: fortran/openmp.cc:6788 fortran/openmp.cc:6906 fortran/openmp.cc:7061
-#, fuzzy, gcc-internal-format
-#| msgid "Expected %<:%> at %C"
+#, gcc-internal-format
msgid "expected %<:%> at %C"
-msgstr "Očekivano je %<:%> pri %C"
+msgstr "očekivano je %<:%> pri %C"
#: fortran/openmp.cc:6821
-#, fuzzy, gcc-internal-format
-#| msgid "Unexpected %<(%> at %C"
+#, gcc-internal-format
msgid "unexpected %<:%> at %C"
-msgstr "Neočekivan %<(%> pri %C"
+msgstr "neočekivano %<:%> pri %C"
#: fortran/openmp.cc:6868
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected constant logical expression"
+#, gcc-internal-format, gfc-internal-format
msgid "expected constant integer expression at %C"
-msgstr "očekivan je konstantni logički izraz"
+msgstr "očekivan je konstantni cjelobrojni izraz pri %C"
#: fortran/openmp.cc:6890
#, gcc-internal-format
@@ -77563,16 +77367,14 @@ msgid "expected dummy parameter name, %<omp_num_args%> or constant positive inte
msgstr ""
#: fortran/openmp.cc:6937
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<)%> at %C"
+#, gcc-internal-format
msgid "expected %<interop%> at %C"
-msgstr "očekivano je %<)%> kod %C"
+msgstr "očekivano je %<interop%> pri %C"
#: fortran/openmp.cc:6987
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<at%>, %<severity%> or %<message%> clause"
+#, gcc-internal-format
msgid "expected %<match%>, %<adjust_args%> or %<append_args%> at %C"
-msgstr "očekivano je %<at%>, %<severity%> ili %<message%> klauzula"
+msgstr "očekivan je %<match%>, %<adjust_args%> ili %<append_args%> pri %C"
#: fortran/openmp.cc:6993
#, gcc-internal-format
@@ -77580,10 +77382,9 @@ msgid "the %qs clause at %L can only be specified if the %<dispatch%> selector o
msgstr ""
#: fortran/openmp.cc:7033
-#, fuzzy, gcc-internal-format
-#| msgid "expected %<host%>, %<nohost%> or %<any%>"
+#, gcc-internal-format
msgid "expected %<when%>, %<otherwise%>, or %<default%> at %C"
-msgstr "očekivano je %<host%>, %<nohost%> ili %<any%>"
+msgstr "očekivan je %<when%>, %<otherwise%> ili %<default%> pri %C"
#: fortran/openmp.cc:7040
#, gcc-internal-format
@@ -77606,10 +77407,9 @@ msgid "variant directive used in OMP BEGIN METADIRECTIVE at %C must have a corre
msgstr ""
#: fortran/openmp.cc:7130
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected junk at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Unexpected junk after OMP METADIRECTIVE at %C"
-msgstr "Neočekivano smeće pri %C"
+msgstr "Neočekivano smeće iza OMP METADIRECTIVE pri %C"
#: fortran/openmp.cc:7189
#, gcc-internal-format, gfc-internal-format
@@ -78879,10 +78679,9 @@ msgid "!$OMP DECLARE SIMD should refer to containing procedure %qs at %L"
msgstr ""
#: fortran/openmp.cc:13125
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected constant logical expression"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected constant non-negative scalar integer offset expression at %L"
-msgstr "očekivan je konstantni logički izraz"
+msgstr "Očekivan je ne-negativan skalarni cjelobrojni odmak (offset) izraz pri %L"
#: fortran/openmp.cc:13128
#, gcc-internal-format
@@ -78892,7 +78691,7 @@ msgstr ""
#: fortran/openmp.cc:13142
#, gcc-internal-format, gfc-internal-format
msgid "Expected dummy parameter name or a positive integer at %L"
-msgstr ""
+msgstr "Očekivano je laĆŸno ime parametra ili pozitivnog cijelog broja pri %L"
#: fortran/openmp.cc:13168
#, gcc-internal-format, gfc-internal-format
@@ -79035,10 +78834,9 @@ msgid "The value of n in %<-finit-character=n%> must be between 0 and 127"
msgstr ""
#: fortran/options.cc:889
-#, fuzzy, gcc-internal-format
-#| msgid "command-line option %qs is valid for the driver but not for %s"
+#, gcc-internal-format
msgid "command-line option %<-fno-builtin-%s%> is not valid for Fortran"
-msgstr "opcija naredbenog retka %qs valjana je za drajver, ali ne i za %s"
+msgstr "opcija naredbenog retka %<-fno-builtin-%s%> nije valjana za Fortran"
#: fortran/parse.cc:665
#, gcc-internal-format, gfc-internal-format
@@ -79662,10 +79460,9 @@ msgid "Integer too big for its kind at %C. This check can be disabled with the o
msgstr ""
#: fortran/primary.cc:388
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "function body not available"
+#, gcc-internal-format, gfc-internal-format
msgid "Unsigned kind %d at %C not available"
-msgstr "tijelo funkcije nije dostupno"
+msgstr "Objekt (vrsta) bez predznaka %d pri %C nije dostupan"
#: fortran/primary.cc:419
#, gcc-internal-format, gfc-internal-format
@@ -79941,10 +79738,9 @@ msgid "Procedure pointer component %qs requires an argument list at %C"
msgstr ""
#: fortran/primary.cc:2833
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected junk at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Unexpected array/substring ref at %C"
-msgstr "Neočekivano smeće pri %C"
+msgstr "Neočekivano referencija na polje/podstring pri %C"
#: fortran/primary.cc:2855
#, gcc-internal-format, gfc-internal-format
@@ -80794,10 +80590,9 @@ msgid "BOZ literal constant at %L cannot be an operand of unary operator %qs"
msgstr ""
#: fortran/resolve.cc:4332
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "await expressions are not permitted in handlers"
+#, gcc-internal-format, gfc-internal-format
msgid "Negation of unsigned expression at %L not permitted "
-msgstr "‘await’ izraz nije dopuơten u rukovateljima (handlers)"
+msgstr "Negacija izraza bez predznaka pri %L nije dopuĆĄtena"
#: fortran/resolve.cc:4353
#, gcc-internal-format
@@ -81035,10 +80830,9 @@ msgid "TEAM_NUMBER argument at %L must be of INTEGER type, found %s"
msgstr ""
#: fortran/resolve.cc:5491
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "the arguments to %qE must be constant strings"
+#, gcc-internal-format, gfc-internal-format
msgid "TEAM argument at %L must be scalar"
-msgstr "argumenti za %qE moraju biti konstantni stringovi"
+msgstr "Argument za TEAM pri %L mora biti skalar"
#: fortran/resolve.cc:5500
#, gcc-internal-format, gfc-internal-format
@@ -81046,10 +80840,9 @@ msgid "TEAM argument at %L must be of TEAM_TYPE from the intrinsic module ISO_FO
msgstr ""
#: fortran/resolve.cc:5514
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "the arguments to %qE must be constant strings"
+#, gcc-internal-format, gfc-internal-format
msgid "STAT argument at %L must be scalar"
-msgstr "argumenti za %qE moraju biti konstantni stringovi"
+msgstr "Argument za STAT pri %L mora biti skalar"
#: fortran/resolve.cc:5521
#, gcc-internal-format, gfc-internal-format
@@ -81296,10 +81089,9 @@ msgid "Variable %qs at %L not specified in a locality spec of DO CONCURRENT at %
msgstr ""
#: fortran/resolve.cc:8198
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Unexpected coarray %qs in %<allocate%> at %L"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected variable name in %s locality spec at %L"
-msgstr "Neočekivano polje (coarray) %qs u %<allocate%> pri %L"
+msgstr "Očekivano je ime varijable u specifikaciji lokaliteta %s pri %L"
#: fortran/resolve.cc:8207
#, gcc-internal-format
@@ -81332,10 +81124,9 @@ msgid "Nonpointer polymorphic dummy argument not permitted for %qs in %s localit
msgstr ""
#: fortran/resolve.cc:8260
-#, fuzzy, gcc-internal-format
-#| msgid "Unexpected coarray %qs in %<allocate%> at %L"
+#, gcc-internal-format
msgid "Coarray not permitted for %qs in %s locality-spec at %L"
-msgstr "Neočekivano polje (coarray) %qs u %<allocate%> pri %L"
+msgstr "Coarray nije dopuĆĄten za %qs u specifikaciji lokaliteta %s pri %L"
#: fortran/resolve.cc:8266
#, gcc-internal-format
@@ -81912,10 +81703,9 @@ msgid "Variable in the ordinary assignment at %L is a procedure pointer componen
msgstr ""
#: fortran/resolve.cc:12265
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "Cannot find symbol %qs"
+#, gcc-internal-format, gfc-internal-format
msgid "Cannot assign %s to %s at %L"
-msgstr "Ne moĆŸe naći simbol %qs"
+msgstr "%s nije moguće odijeliti %s pri %L"
#: fortran/resolve.cc:12313
#, gcc-internal-format
@@ -84191,10 +83981,9 @@ msgid "Sorry, !$ACC DECLARE at %L is not allowed in BLOCK construct"
msgstr ""
#: fortran/trans-decl.cc:7198 fortran/trans-expr.cc:6117
-#, fuzzy, gcc-internal-format
-#| msgid "sorry, unimplemented"
+#, gcc-internal-format
msgid "Unsigned not yet implemented"
-msgstr "nije implementirano:"
+msgstr "Objekt bez predznaka (unsigned) joĆĄ nije implementiran"
#: fortran/trans-decl.cc:8316
#, gcc-internal-format
@@ -84403,10 +84192,9 @@ msgid "the %qs clause can only be specified if the %<dispatch%> selector of the
msgstr ""
#: fortran/trans-openmp.cc:9010 fortran/trans-openmp.cc:9049
-#, fuzzy, gcc-internal-format, gfc-internal-format
-#| msgid "expected identifier at %C"
+#, gcc-internal-format, gfc-internal-format
msgid "Expected positive argument index at %L"
-msgstr "očekivano je identifikator pri %C"
+msgstr "Očekivan je pozitivni argument indeka pri %L"
#: fortran/trans-openmp.cc:9021
#, gcc-internal-format, gfc-internal-format
@@ -84421,7 +84209,7 @@ msgstr ""
#: fortran/trans-openmp.cc:9085
#, gcc-internal-format
msgid "List item %qs at %L, declared at %L, is not a dummy argument"
-msgstr ""
+msgstr "Stavka popisa %qs pri %L, deklarirana pri %L, nije laĆŸni argument"
#: fortran/trans-openmp.cc:9099
#, gcc-internal-format
@@ -84444,10 +84232,9 @@ msgid "%qs at %L is specified more than once"
msgstr ""
#: fortran/trans-openmp.cc:9139
-#, fuzzy, gcc-internal-format
-#| msgid "%<-pipe%> not supported"
+#, gcc-internal-format
msgid "%<need_device_addr%> not yet supported"
-msgstr "%<-pipe%> nije podrĆŸan"
+msgstr "%<need_device_addr%> nije podrĆŸana"
#: fortran/trans-stmt.cc:576
#, gcc-internal-format, gfc-internal-format
@@ -84631,16 +84418,14 @@ msgid "unexpected EOF"
msgstr "neočekivani EOF"
#: go/gofrontend/expressions.cc:985
-#, fuzzy, gcc-internal-format
-#| msgid "invalid slice of map"
+#, gcc-internal-format
msgid "invalid use of type"
-msgstr "nevaljani iskječak mape"
+msgstr "nevaljana upotreba tipa"
#: go/gofrontend/statements.cc:2670
-#, fuzzy, gcc-internal-format
-#| msgid "expected constant logical expression"
+#, gcc-internal-format
msgid "expected call expression"
-msgstr "očekivan je konstantni logički izraz"
+msgstr "očekivan je izraz poziva"
#: lto/lto-common.cc:2041
#, gcc-internal-format
@@ -84685,7 +84470,7 @@ msgstr "rezolucija Sub-ID %wx nije u objektnoj datoteci"
#: lto/lto-common.cc:2285
#, gcc-internal-format
msgid "bytecode stream in file %qs generated with GCC compiler older than 10.0"
-msgstr "bytecode struju u datoteci %qs generirao je GCC kompajler stariji od 10.0"
+msgstr "bytecode struju u datoteci %qs generirao je GCC kompilator stariji od 10.0"
#: lto/lto-common.cc:2305
#, gcc-internal-format
@@ -85154,7 +84939,7 @@ msgstr "atributi kategorije nisu dostupni u Objective-C 1.0"
#: objc/objc-act.cc:597
#, gcc-internal-format
msgid "category attributes are not available in this version of the compiler, (ignored)"
-msgstr "atributi kategorije nisu dostupni u ovoj inačici kompajlera, zanemareno"
+msgstr "atributi kategorije nisu dostupni u ovoj inačici kompilatora, zanemareno"
#: objc/objc-act.cc:603
#, gcc-internal-format
@@ -86169,7 +85954,13 @@ msgstr ""
msgid "are you trying to break %s? how dare you?"
msgstr ""
-#~ msgid "bad address, not an I/O address:"
+#, gcc-internal-format, gfc-internal-format
+#~ msgid " %s"
+#~ msgstr "Globalna deklaracija %s za %s"
+
+#, fuzzy, c-format
+#~| msgid "bad address, not an I/O address:"
+#~ msgid "bad I/O address 0x"
#~ msgstr "loĆĄa adresa, nije U/I (I/O) adresa:"
#, gcc-internal-format
@@ -86188,6 +85979,10 @@ msgstr ""
#~ msgid "expected %<seq_cst%>, %<relaxed%> or %<acq_rel%>"
#~ msgstr "očekivano je %<seq_cst%>, %<relaxed%> ili %<acq_rel%>"
+#, gcc-internal-format
+#~ msgid "expected %<construct%>, %<device%>, %<implementation%> or %<user%> at %C"
+#~ msgstr "očekivano je %<construct%>, %<device%>, %<implementation%> ili %<user%> pri %C"
+
#~ msgid "invalid operand size for operand code 'Z'"
#~ msgstr "nevaljana veličina operanda za operand kȏd ‘Z’"
diff --git a/gcc/rust/ChangeLog b/gcc/rust/ChangeLog
index b871717..545ea9d 100644
--- a/gcc/rust/ChangeLog
+++ b/gcc/rust/ChangeLog
@@ -1,3 +1,1318 @@
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Improve formatting.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::clone_enum_struct): New function for deriving
+ enum struct variants.
+ (DeriveClone::visit_enum): Call into the new function.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::variant_match_path): New function.
+ (DeriveClone::clone_enum_identifier): Rename.
+ (DeriveClone::clone_enum_tuple): New function.
+ (DeriveClone::visit_enum): Visit tuple variants properly.
+ * expand/rust-derive-clone.h: Declare new functions.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc: Add new methods for constructing struct exprs.
+ * ast/rust-ast-builder.h: Mention how to build tuple expressions.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc: Clone enum identifier variants properly
+ * expand/rust-derive-clone.h: Declare new functions used.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::clone_call): Mention using `clone_fn`
+ lang item in the future.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::visit_union): Create a lang item path
+ instead of a regular path.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc: New functions.
+ * ast/rust-ast-builder.h: Declare them.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-copy.cc: Use lang item path.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-clone.cc (DeriveClone::visit_union): Manually generate
+ the struct used for asserting a union implements Copy.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc (Builder::struct_struct): New function.
+ * ast/rust-ast-builder.h (vec): New function.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Visit tuple pattern items as
+ separated by commas.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-collector.cc (TokenCollector::visit): Fix collector to better
+ handle lang item type path segments.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-hir-map.cc (Mappings::get_lang_item_node): New.
+ * util/rust-hir-map.h: New function.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.cc (LangItem::PrettyString): New.
+ * util/rust-lang-item.h: New.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-collect-lang-items.cc (CollectLangItems::visit): New.
+ * ast/rust-collect-lang-items.h: New.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLowerTypePath::visit): Adapt code to lang item
+ type path segments.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): Adapt
+ code to handle lang item type paths.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h: Rework how lang item paths are represented.
+ * ast/rust-path.cc: Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-ast.cc: Likewise.
+ * ast/rust-ast-collector.cc: Adapt to new lang item path system.
+ * ast/rust-ast-collector.h: Likewise.
+ * ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
+ * ast/rust-ast-visitor.h: Likewise.
+ * expand/rust-derive-copy.cc: Likewise.
+ * expand/rust-derive.h: Likewise.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::visit): Likewise.
+ * hir/rust-ast-lower-base.h: Likewise.
+ * hir/rust-ast-lower-type.cc (ASTLowerTypePath::translate): Likewise.
+ (ASTLowerTypePath::visit): Likewise.
+ * hir/rust-ast-lower-type.h: Likewise.
+ * resolve/rust-ast-resolve-base.cc (ResolverBase::visit): Likewise.
+ * resolve/rust-ast-resolve-base.h: Likewise.
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Likewise.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+ * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Likewise.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise.
+ * resolve/rust-late-name-resolver-2.0.h: Likewise.
+ * hir/tree/rust-hir-path.cc (TypePathSegment::TypePathSegment): Likewise.
+ (TypePathSegmentGeneric::TypePathSegmentGeneric): Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): Likewise.
+ * ast/rust-ast-builder.cc: Likewise.
+ * ast/rust-ast-builder.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-collect-lang-items.cc (get_lang_item_attr): Show unknown attribute upon error.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-attribute-values.h: Declare new attribute value.
+ * util/rust-attributes.cc: Use it.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.cc (BlockExpr::normalize_tail_expr): Remove overzealous
+ std::move
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-collector.cc
+ (TokenCollector::visit): Remove visitor for NamedFunctionParam.
+ * ast/rust-ast-collector.h
+ (TokenCollector::visit): Likewise.
+ * ast/rust-ast-full-decls.h
+ (class NamedFunctionParam): Remove forward declaration.
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): Remove visitor for
+ NamedFunctionParam.
+ * ast/rust-ast-visitor.h
+ (DefaultASTVisitor::visit): Likewise.
+ * ast/rust-ast.cc
+ (NamedFunctionParam::as_string): Remove.
+ * ast/rust-item.h
+ (class NamedFunctionParam): Remove.
+ (class ExternalFunctionItem): Remove.
+ * parse/rust-parse-impl.h
+ (Parser::parse_named_function_param): Remove.
+ (Parser::parse_named_function_params): Remove.
+ * parse/rust-parse.h
+ (Parser::parse_named_function_param): Remove.
+ (Parser::parse_named_function_params): Remove.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-early-name-resolver-2.0.cc
+ (Early::visit): Resolve the pending eager invocations inside
+ builtin macro invocations.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): hir lowering
+ * hir/rust-ast-lower-stmt.h: likewise
+ * resolve/rust-ast-resolve-stmt.cc (ResolveStmt::visit): name resolution
+ * resolve/rust-ast-resolve-stmt.h: likewise
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * Make-lang.in: Handle rust-forever-stack.cc.
+ * resolve/rust-forever-stack.h
+ (class ForeverStackStore): Add.
+ * resolve/rust-forever-stack.cc: New file, based on
+ rust-forever-stack.hxx.
+
+2025-03-21 Om Swaroop Nayak <96killerat96@gmail.com>
+
+ * ast/rust-collect-lang-items.cc (get_lang_item_attr): "removed checker fn"
+ * util/rust-attributes.cc (Attributes::is_lang_item): "added fn"
+ * util/rust-attributes.h: "added fn"
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * checks/errors/rust-readonly-check.cc (check_decl): improve mut check
+ (emit_error): helper
+ (check_modify_expr): likewise
+ (readonly_walk_fn): reuse helper
+ (ReadonlyCheck::Lint): cleanup context each run
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): When visiting a TraitImpl, visit its
+ trait path.
+
+2025-03-21 liushuyu <liushuyu011@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc: add the new `catch_unwind` variant
+ of the `try` intrinsic: this variant can be seen on Rust 1.78+
+ and returns `()` instead of `i32`.
+
+2025-03-21 liushuyu <liushuyu011@gmail.com>
+
+ * backend/rust-compile-intrinsic.cc: add `try` intrinsic handler.
+ * lang.opt: add `-frust-panic` option.
+ * rust-lang.cc: enable exception handler code generation.
+ * rust-session-manager.cc: add getter and setter for panic
+ strategy option.
+ * rust-session-manager.h: Likewise.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): implement coercion
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): this is an LUB
+ * typecheck/rust-unify.cc (UnifyRules::go): remove unify ! coercion
+
+2025-03-21 Nobel <nobel2073@gmail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): new layout
+ * backend/rust-compile-pattern.cc (CompilePatternCheckExpr::visit): likewise
+ (CompilePatternBindings::visit): likewise
+ * backend/rust-compile-resolve-path.cc: likewise
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): implement new layout
+ * rust-gcc.cc (constructor_expression): get rid of useless assert
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Insert a definition for Self when visiting
+ InherentImpl and TraitImpl instances.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Add visitors for InherentImpl and TraitImpl.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add null guard
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): handle partial_eq possible call
+ * backend/rust-compile-expr.h: handle case where lang item calls differ from name
+ * hir/tree/rust-hir-expr.cc (OperatorExprMeta::OperatorExprMeta): new helper
+ * hir/tree/rust-hir-expr.h: likewise
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): handle partial_eq
+ (TypeCheckExpr::resolve_operator_overload): likewise
+ * typecheck/rust-hir-type-check-expr.h: likewise
+ * util/rust-lang-item.cc (LangItem::ComparisonToLangItem): map comparison to lang item
+ (LangItem::ComparisonToSegment): likewise
+ * util/rust-lang-item.h: new lang items PartialOrd and Eq
+ * util/rust-operators.h (enum class): likewise
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): check for error
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): likewise and remove debug error
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-default-resolver.cc
+ (DefaultResolver::visit): Make sure to scope visitation of the
+ children of type definition items.
+ * resolve/rust-default-resolver.h
+ (DefaultResolver::visit): Add overrides for TupleStruct, Union,
+ and TypeAlias.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Remove override for Enum.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Likewise.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Rely more on DefaultResolver::visit.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Remove override for BlockExpr.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::do_qualifiedpathtype): add guard
+ (Dump::do_traitfunctiondecl): likewise
+ (Dump::visit): likewise
+
+2025-03-21 Prajwal S N <prajwalnadig21@gmail.com>
+
+ * typecheck/rust-hir-type-check.h (class TypeCheckContext): add
+ header file and use StackedContexts for blocks
+ * typecheck/rust-typecheck-context.cc: update methods
+ * typecheck/rust-hir-trait-resolve.cc: refactor function calls
+ * typecheck/rust-hir-type-check-implitem.cc: refactor function calls
+ * typecheck/rust-hir-type-check-type.cc: refactor function calls
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast.h: Add new Kind enums, remove Node class.
+ * ast/rust-builtin-ast-nodes.h: Use new Kind enums.
+ * ast/rust-expr.h (class LoopLabel): Likewise.
+ * ast/rust-item.h: Likewise.
+ * ast/rust-macro.h: Likewise.
+ * ast/rust-path.h: Likewise.
+ * expand/rust-macro-builtins-helpers.cc: Likewise.
+ * expand/rust-macro-builtins-utility.cc (MacroBuiltin::concat_handler): Likewise.
+ (MacroBuiltin::stringify_handler): Likewise.
+ * resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit): Likewise.
+ * resolve/rust-early-name-resolver.cc: Likewise.
+ * hir/rust-ast-lower.cc (ASTLoweringBlock::visit): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Add visitor for TraitItemType.
+ * resolve/rust-toplevel-name-resolver-2.0.h
+ (TopLevel::visit): Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveType::visit): New visitor to handle
+ ParenthesizedType.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLoweringType::visit): Add implementation for
+ ParenthesizedType.
+ * hir/rust-ast-lower-type.h: Declare that new visitor.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-builder-type.cc: Remove inclusion of
+ rust-make-unique.h.
+ * ast/rust-ast-builder.cc: Likewise.
+ (Builder::array): Use std::make_unique instead of
+ Rust::make_unique.
+ * ast/rust-ast.cc (Attribute::get_traits_to_derive): Likewise.
+ * ast/rust-macro.h: Remove inclusion of rust-make-unique.h.
+ (MacroRulesDefinition::mbe): Use std::make_unique instead of
+ Rust::make_unique.
+ (MacroRulesDefinition::decl_macro): Likewise.
+ * ast/rust-path.h
+ (PathInExpression::PathInExpression): Likewise.
+ (QualifiedPathInExpression::QualifiedPathInExpression):
+ Likewise.
+ * backend/rust-compile-pattern.cc
+ (CompilePatternCheckExpr::visit): Likewise.
+ * expand/rust-derive-copy.cc
+ (DeriveCopy::copy_impl): Likewise.
+ * expand/rust-expand-format-args.cc
+ (expand_format_args): Likewise.
+ * expand/rust-macro-builtins-asm.cc: Remove inclusion of
+ rust-make-unique.h.
+ (parse_asm): Use std::make_unique instead of Rust::make_unique.
+ * hir/rust-ast-lower-expr.cc
+ (ASTLoweringExpr::visit): Likewise.
+ * hir/tree/rust-hir-expr.cc
+ (StructExprStructFields::StructExprStructFields): Likewise.
+ (StructExprStructFields::operator=): Likewise.
+ * hir/tree/rust-hir.cc
+ (TypePath::to_trait_bound): Likewise.
+ * lex/rust-token.h: Remove inclusion of rust-make-unique.h.
+ (Token::Token): Use std::make_unique instead of
+ Rust::make_unique.
+ * metadata/rust-import-archive.cc: Remove inclusion of
+ rust-make-unique.h.
+ (Import::find_archive_export_data): Use std::make_unique instead
+ of Rust::make_unique.
+ * metadata/rust-imports.cc: Remove inclusion of
+ rust-make-unique.h.
+ (Import::find_export_data): Use std::make_unique instead of
+ Rust::make_unique.
+ (Import::find_object_export_data): Likewise.
+ * parse/rust-parse-impl.h: Remove inclusion of
+ rust-make-unique.h.
+ (Parser::parse_function_param): Use std::make_unique instead of
+ Rust::make_unique.
+ (Parser::parse_self_param): Likewise.
+ (Parser::parse_array_expr): Likewise.
+ * typecheck/rust-hir-type-check-enumitem.cc
+ (TypeCheckEnumItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc
+ (TypeCheckTopLevelExternItem::visit): Likewise.
+ (TypeCheckImplItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc
+ (TypeResolveGenericParam::visit): Likewise.
+ * typecheck/rust-hir-type-check.cc: Remove inclusion of
+ rust-make-unique.h.
+ (TraitItemReference::get_type_from_fn): Use std::make_unique
+ instead of Rust::make_unique.
+ * typecheck/rust-tyty-bounds.cc
+ (TypeCheckBase::get_predicate_from_bound): Likewise.
+ * util/rust-make-unique.h: Removed.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h: Add EnumItem::Kind for differentiating all variants that may be
+ used inside an enum declaration.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-ast-visitor.cc
+ (DefaultASTVisitor::visit): Visit implicit Self parameters of
+ traits.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Resolve implicit Self parameters of traits.
+ * resolve/rust-late-name-resolver-2.0.h:
+ (Late::visit): Add trait visitor.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Insert resolutions for Self type parameters
+ as well.
+
+2025-03-21 Liam Naddell <liamnprg@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc:
+ Change the late name resolver to enter proper lexical scope during typechecking
+ * resolve/rust-late-name-resolver-2.0.h:
+ Add needed prototype to header
+ * resolve/rust-toplevel-name-resolver-2.0.cc:
+ Add generic parameters to enum's scoped RIB to allow for proper name resolution on types.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-builder.cc: Add new functions.
+ * ast/rust-ast-builder.h: Declare them.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h: Add two new constructors.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-collect-lang-items.cc (CollectLangItems::visit): Add visitor for collecting
+ functions that might be lang items.
+ * ast/rust-collect-lang-items.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Add new lang items.
+ * util/rust-lang-item.cc: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Add Sync marker trait.
+ * util/rust-lang-item.cc: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-type-check-type.cc: Add TODO note.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-ast-resolve-type.cc (ResolveTypeToCanonicalPath::visit): Resolve additional
+ trait bounds.
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Error out properly on unresolved
+ type-path instead of crashing.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-path-probe.cc: Fix typos.
+ * typecheck/rust-hir-path-probe.h: Likewise.
+ * typecheck/rust-hir-type-check-path.cc: Likewise.
+
+2025-03-21 Nobel <nobel2073@gmail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules): Add rule.
+
+2025-03-21 Sri Ganesh Thota <sriganeshthota12345@gmail.com>
+
+ * ast/rust-item.h: I have changed helper constructor for typepath
+ to be a delegating constructor.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-fnparam.cc (CompileFnParam::visit): compile tuple patterns
+ (CompileSelfParam::compile): update return type
+ (CompileFnParam::create_tmp_param_var): return Bvariable not tree to stop ICE
+ * backend/rust-compile-fnparam.h: update prototype
+ * backend/rust-compile-pattern.cc (CompilePatternBindings::visit): implement TuplePattern
+ * backend/rust-compile-pattern.h: update prototype
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust-gcc.cc (operator_to_tree_code): ! expressions are BIT_NOT_EXPR
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h: Adapt children of Path to fix some NodeId issues.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc (Late::visit): New.
+ * resolve/rust-late-name-resolver-2.0.h: New.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLowerTypePath::translate): Adapt to
+ handle lang item paths.
+ (ASTLowerTypePath::visit): Likewise.
+ (ASTLowerTypePath::translate_type_path): New.
+ (ASTLowerTypePath::translate_lang_item_type_path): New.
+ * hir/rust-ast-lower-type.h: Adapt to handle lang item paths.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Adapt resolver
+ to lang item paths.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-item.h: Add new method to specifically get a type-path.
+ * ast/rust-path.cc (LangItemPath::as_string): Implement properly.
+ * hir/rust-ast-lower-type.cc (ASTLowerTypePath::translate): Adapt
+ visitor to use the new LangItemPath.
+ * hir/rust-ast-lower-type.h: Likewise.
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Likewise.
+ * resolve/rust-ast-resolve-type.h: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * expand/rust-derive-copy.cc: Use new LangItemPath for derive(Copy).
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-path.h (class LangItemPath): New.
+ (class TypePath): Adapt to accomodate LangItemPath.
+ * ast/rust-ast.cc (TraitImpl::as_string): Use new checks for lang items.
+ (QualifiedPathType::as_string): Likewise.
+ (FormatArgs::set_outer_attrs): Likewise.
+ * ast/rust-item.h (class TraitImpl): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.h
+ (ForeverStack::find_starting_point): Use type
+ 'std::reference_wrapper<Node> &' instead of 'Node &' for
+ parameter starting_point.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::find_starting_point): Likewise.
+ (ForeverStack::resolve_path): Handle change to
+ ForeverStack::find_starting_point.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path):
+ Remove unused capture in lambda.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-attributes.h (class Attributes): New.
+ * util/rust-attributes.cc: Implement Attributes::is_known().
+ * ast/rust-collect-lang-items.cc (is_known_attribute): Remove.
+ (get_lang_item_attr): Call Attributes::is_known() instead.
+ * hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_outer_attributes): Likewise.
+ (ASTLoweringBase::is_known_attribute): Remove.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * Make-lang.in: Add new object file.
+ * rust-session-manager.cc (Session::compile_crate): Call CollectLangItems.
+ * ast/rust-collect-lang-items.cc: New file.
+ * ast/rust-collect-lang-items.h: New file.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-hir-map.h: Keep a NodeId mappings for lang items.
+ * util/rust-hir-map.cc (Mappings::insert_lang_item_node): New function.
+ (Mappings::lookup_lang_item_node): Likewise.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add missing check for no return value
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-constexpr.cc (eval_store_expression): check for null
+ (eval_call_expression): remove bad warning
+ * rust-gcc.cc (arithmetic_or_logical_expression): add warnings
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-base.cc: apply coercion site to result
+ * backend/rust-compile-base.h: update prototype
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit): send in coercion info
+ * backend/rust-compile-item.cc (CompileItem::visit): likewise
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * resolve/rust-ast-resolve-item.cc (ResolveItem::visit): remove assertions
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-ast-visitor.h: Replace context with StackedContexts.
+ * ast/rust-ast-visitor.cc (ContextualASTVisitor::visit): Use new APIs.
+ * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-stacked-contexts.h: Add new method to see what context we are currently in.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/tree/rust-hir-item.h: Remove TraitItemFunc::has_block_defined()
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit):
+ Call TraitItemFunc::has_definition() instead.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ * checks/errors/rust-hir-pattern-analysis.cc (PatternChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Likewise.
+ * typecheck/rust-hir-trait-resolve.cc (ResolveTraitItemToRef::visit): Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-hir-map.h: Move definitions from header...
+ * util/rust-hir-map.cc: ...to source file.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * util/rust-lang-item.h: Fix comment location to align with other comments.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): call lauout type directly
+ * rust-backend.h (struct_type): add optional layout parameter
+ (union_type): likewise
+ (fill_in_fields): likewise
+ * rust-gcc.cc (struct_type): likewise
+ (union_type): likewise
+ (fill_in_fields): only layout if we required
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-casts.cc (TypeCastRules::cast_rules): allow casts to float
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait): track trait
+ * typecheck/rust-hir-type-check-implitem.cc: trait block
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): dont when dyn
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit): look at Self contenxt
+ (TypeCheckType::resolve_root_path): track if Self
+ (TypeCheckType::resolve_associated_type): look at current context for associated types
+ * typecheck/rust-hir-type-check-type.h: change prototype
+ * typecheck/rust-hir-type-check.h (class TypeCheckBlockContextItem):
+ new context system to track current state
+ * typecheck/rust-typecheck-context.cc (TypeCheckContext::have_block_context): likewise
+ (TypeCheckContext::peek_block_context): likewise
+ (TypeCheckContext::push_block_context): likewise
+ (TypeCheckContext::pop_block_context): likewise
+ (TypeCheckBlockContextItem::Item::Item): likewise
+ (TypeCheckBlockContextItem::TypeCheckBlockContextItem): likewise
+ (TypeCheckBlockContextItem::is_impl_block): likewise
+ (TypeCheckBlockContextItem::is_trait_block): likewise
+ (TypeCheckBlockContextItem::get_impl_block): likewise
+ (TypeCheckBlockContextItem::get_trait): likewise
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add missing null checks
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc: Prepend crate name to function's ir
+ name.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-name-resolver.cc: Include options.txt.
+ (Resolver::insert_resolved_name): Assert that name resolution
+ 2.0 is disabled.
+ (Resolver::lookup_resolved_name): Likewise.
+ (Resolver::insert_resolved_type): Likewise.
+ (Resolver::lookup_resolved_type): Likewise.
+ (Resolver::insert_resolved_label): Likewise.
+ (Resolver::lookup_resolved_label): Likewise.
+ (Resolver::insert_resolved_macro): Likewise.
+ (Resolver::lookup_resolved_macro): Likewise.
+ (Resolver::insert_resolved_misc): Likewise.
+ (Resolver::lookup_resolved_misc): Likewise.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * backend/rust-compile-expr.cc (check_match_scrutinee): check for empty match
+ (CompileExpr::visit): fix assertion
+ * checks/errors/rust-hir-pattern-analysis.cc (check_match_usefulness): check for empty
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit): resolve to !
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * hir/rust-hir-dump.cc (Dump::visit): add guards
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * ast/rust-stmt.h: Remove stdlib include and use rust-system instead.
+ * backend/rust-compile-expr.cc: Likewise.
+ * backend/rust-mangle-legacy.cc: Likewise.
+ * backend/rust-mangle-v0.cc: Likewise.
+ * hir/rust-hir-dump.cc: Likewise.
+ * typecheck/rust-hir-type-check-type.cc: Likewise.
+ * typecheck/rust-tyty.cc: Likewise.
+ * typecheck/rust-tyty.h: Likewise.
+ * util/rust-common.h: Likewise.
+ * util/rust-token-converter.cc: Likewise.
+ * util/rust-token-converter.h: Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check-expr.cc: Add includes.
+ (TypeCheckExpr::visit): Use name resolver 2.0.
+ (TypeCheckExpr::resolve_operator_overload): Likewise.
+ (TypeCheckExpr::resolve_fn_trait_call): Likewise.
+ * typecheck/rust-hir-type-check-path.cc
+ (TypeCheckExpr::visit): Likewise.
+ (TypeCheckExpr::resolve_segments): Likewise.
+ * typecheck/rust-hir-type-check-type.cc
+ (TypeCheckType::resolve_segments): Likewise.
+ (ResolveWhereClauseItem::visit): Likewise.
+ (TypeCheckType::visit): Avoid usage of
+ Resolver::get_unit_type_node_id when handling TupleType, use
+ name resolver 2.0 when handling QualifiedPathInType.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Call DefaultResolver::visit when visiting
+ TypePath.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::check_for_privacy_violation): Use name
+ resolver 2.0.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Change call.
+ (CompileExpr::resolve_operator_overload): Update function arguments.
+ * backend/rust-compile-expr.h: Change the function's prototype to use
+ a reference wrapper instead of a reference within the optional.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-tyty.h: Change initializer list to default constructor
+ call.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Add template
+ to tl::optional.
+ * hir/rust-ast-lower-type.cc (ASTLowerGenericParam::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeResolveGenericParam::visit):
+ Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Do not
+ get a reference if the pattern does not exist.
+ (TypeCheckMethodCallExpr::check): Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Change the
+ ternary expression with a more readable if.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * typecheck/rust-tyty.h: Reverse monomorphization during cloning and
+ make a new function to explicitly monomorphize.
+ * typecheck/rust-tyty.cc: Use monomorphization when required.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * hir/rust-ast-lower-type.cc (ASTLowerGenericParam::visit): Forward
+ an optional to the constructor.
+ * hir/tree/rust-hir-item.cc (TypeParam::TypeParam): Use an optional
+ in the constructor.
+ (TypeParam::operator=): Ensure the TypeParam has a type properly.
+ (TypeParam::get_type_mappings): Likewise.
+ * hir/tree/rust-hir-item.h: Wrap the type smart pointer into an
+ optional.
+ * hir/tree/rust-hir.cc (TypeParam::as_string): Unwrap optional type
+ correctly.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Call getter
+ instead of size function.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit):
+ Only check privacy if the type is present.
+ * hir/rust-ast-lower-stmt.cc (ASTLoweringStmt::visit): Use an optional.
+ * hir/tree/rust-hir-generic-param.h: Assert type before getting it.
+ * hir/tree/rust-hir-item.h: Assert pointers before dereference, fix
+ has_type condition.
+ * hir/tree/rust-hir-path.h: Add more assertions.
+ * hir/tree/rust-hir-stmt.cc: Change constructor with optionals.
+ * hir/tree/rust-hir-stmt.h: Use optionals over smart pointers to
+ emphasize these fields might be missing.
+ * hir/tree/rust-hir.cc (LetStmt::as_string): Use getters.
+ * typecheck/rust-hir-type-check-expr.cc: Clone structures to prevent
+ parent's fields from being nulled by the move operation.
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Use
+ optionals.
+ * typecheck/rust-tyty.cc: Likewise.
+ * typecheck/rust-tyty.h: Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * Make-lang.in: Add new files.
+ * hir/tree/rust-hir-item.h: Move Item definition and remove
+ implementations to their corresponding cc file.
+ * hir/tree/rust-hir-expr.h: Move implementation to the corresponding
+ cc file.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir-pattern.h: Likewise.
+ * hir/tree/rust-hir-stmt.h: Likewise.
+ * hir/tree/rust-hir-type.h: Likewise.
+ * hir/tree/rust-hir-visitor.h: Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * hir/tree/rust-hir.cc (Crate::Crate): Add implementations from Crate
+ and remove ConstGenericParam implementations to move them to their
+ own file.
+ * hir/tree/rust-hir-attrs.h: New file.
+ * hir/tree/rust-hir-bound-abstract.h: New file.
+ * hir/tree/rust-hir-bound.h: New file.
+ * hir/tree/rust-hir-expr-abstract.h: New file.
+ * hir/tree/rust-hir-expr.cc: New file.
+ * hir/tree/rust-hir-generic-param.cc: New file.
+ * hir/tree/rust-hir-generic-param.h: New file.
+ * hir/tree/rust-hir-item.cc: New file.
+ * hir/tree/rust-hir-literal.h: New file.
+ * hir/tree/rust-hir-node.h: New file.
+ * hir/tree/rust-hir-path.cc: New file.
+ * hir/tree/rust-hir-pattern-abstract.h: New file.
+ * hir/tree/rust-hir-simple-path.h: New file.
+ * hir/tree/rust-hir-stmt.cc: New file.
+ * hir/tree/rust-hir-trait-bound.h: New file.
+ * hir/tree/rust-hir-type-abstract.cc: New file.
+ * hir/tree/rust-hir-type-abstract.h: New file.
+ * hir/tree/rust-hir-type-no-bounds.h: New file.
+ * hir/tree/rust-hir-type.cc: New file.
+ * hir/tree/rust-hir-visibility.h: New file.
+ * hir/tree/rust-hir-visitable.h: New file.
+ * checks/lints/rust-lint-marklive.h: Use References.
+ * hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Reformat
+ vectors.
+ * hir/rust-hir-dump.cc (Dump::visit): Use reference.
+ * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::resolve):
+ Use references.
+ * typecheck/rust-tyty-bounds.cc: Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc: Use FnParam getter.
+ * backend/rust-compile-expr.cc (CompileExpr::visit): Likewise.
+ * backend/rust-compile-intrinsic.cc: Likewise.
+ * backend/rust-compile-type.cc: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::visit):
+ Only visit childrens if not missing.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit): Use
+ a reference instead of a raw pointer.
+ * hir/tree/rust-hir-expr.h: Add presence function for return
+ expression.
+ * hir/tree/rust-hir-item.h: Remove take_param_name.
+ * hir/tree/rust-hir.h: Make mapping getter const.
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::Select): Use
+ getter.
+ * typecheck/rust-hir-type-check-expr.cc: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc: Use FnParam vector instead
+ of std::pair of Pattern and BaseType.
+ * typecheck/rust-hir-type-check-item.cc: Likewise.
+ * typecheck/rust-hir-type-check.cc: Likewise.
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Use getters.
+ (TypeCheckMethodCallExpr::check): Likewise.
+ * typecheck/rust-tyty-cmp.h: Likewise.
+ * typecheck/rust-tyty.cc: Use FnParam.
+ * typecheck/rust-tyty.h (class FnParam): Add FnParam to handle function
+ parameters instead of handling std::pairs.
+ * typecheck/rust-unify.cc (UnifyRules::expect_fndef): Use getters.
+ (UnifyRules::expect_fnptr): Likewise.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * backend/rust-compile-base.cc (HIRCompileBase::compile_function_body):
+ Remove usage of get function to retrieve a raw pointer.
+ * backend/rust-compile-base.h:
+ Change API usage from raw pointer to a reference.
+ * backend/rust-compile-block.cc (CompileBlock::compile): Likewise.
+ (CompileBlock::visit): Likewise.
+ (CompileConditionalBlocks::visit): Likewise.
+ * backend/rust-compile-block.h: Likewise.
+ * backend/rust-compile-expr.cc (CompileExpr::Compile): Likewise.
+ (CompileExpr::visit): Likewise.
+ (check_match_scrutinee): Likewise.
+ (CompileExpr::array_value_expr): Likewise.
+ (CompileExpr::array_copied_expr): Likewise.
+ (CompileExpr::generate_closure_function): Likewise.
+ (CompileExpr::generate_possible_fn_trait_call): Likewise.
+ * backend/rust-compile-expr.h: Likewise.
+ * backend/rust-compile-fnparam.cc (CompileFnParam::compile): Likewise.
+ (CompileFnParam::visit): Likewise.
+ * backend/rust-compile-fnparam.h: Likewise.
+ * backend/rust-compile-implitem.cc (CompileTraitItem::visit): Likewise.
+ * backend/rust-compile-intrinsic.cc (compile_fn_params): Likewise.
+ * backend/rust-compile-item.cc (CompileItem::visit): Likewise.
+ * backend/rust-compile-pattern.cc (CompilePatternCheckExpr::visit):
+ Likewise.
+ (compile_range_pattern_bound): Likewise.
+ (CompilePatternBindings::visit): Likewise.
+ (CompilePatternLet::visit): Likewise.
+ * backend/rust-compile-pattern.h: Likewise.
+ * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve):
+ Likewise.
+ (HIRCompileBase::query_compile): Likewise.
+ * backend/rust-compile-stmt.cc (CompileStmt::visit): Likewise.
+ * backend/rust-compile-struct-field-expr.cc (CompileStructExprField::Compile):
+ Likewise.
+ (CompileStructExprField::visit): Likewise.
+ * backend/rust-compile-struct-field-expr.h: Likewise.
+ * backend/rust-compile-type.cc (TyTyResolveCompile::visit): Likewise.
+ * backend/rust-compile-var-decl.h: Likewise.
+ * backend/rust-compile.cc: Likewise.
+ * backend/rust-mangle-v0.cc (v0_inherent_or_trait_impl_path): Likewise.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc (ExprStmtBuilder::visit):
+ Likewise.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-pattern.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-struct.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder.h: Likewise.
+ * checks/errors/borrowck/rust-function-collector.h: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc (PrivacyReporter::check_type_privacy):
+ Likewise.
+ (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * checks/errors/privacy/rust-reachability.cc (ReachabilityVisitor::visit):
+ Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit): Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit):
+ Likewise.
+ * checks/lints/rust-lint-marklive.cc (MarkLive::visit): Likewise.
+ * checks/lints/rust-lint-marklive.h: Likewise.
+ * hir/rust-hir-dump.cc (Dump::visit): Likewise.
+ * hir/tree/rust-hir-expr.h: Likewise.
+ * hir/tree/rust-hir-item.h: Likewise.
+ * hir/tree/rust-hir-path.h: Likewise.
+ * hir/tree/rust-hir-pattern.h: Likewise.
+ * hir/tree/rust-hir-stmt.h: Likewise.
+ * hir/tree/rust-hir-type.h: Likewise.
+ * hir/tree/rust-hir.h: Likewise.
+ * typecheck/rust-autoderef.cc: Likewise.
+ * typecheck/rust-hir-dot-operator.cc (MethodResolver::select):
+ Likewise.
+ * typecheck/rust-hir-inherent-impl-overlap.h: Likewise.
+ * typecheck/rust-hir-path-probe.cc (PathProbeType::process_impl_item_candidate):
+ Likewise.
+ (PathProbeImplTrait::process_trait_impl_items_for_candidates): Likewise.
+ * typecheck/rust-hir-trait-resolve.cc (TraitResolver::resolve_trait):
+ Likewise.
+ (TraitItemReference::resolve_item): Likewise.
+ * typecheck/rust-hir-type-check-base.cc: Likewise.
+ * typecheck/rust-hir-type-check-base.h: Likewise.
+ * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::Resolve):
+ Likewise.
+ (TypeCheckEnumItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-enumitem.h: Likewise.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::Resolve):
+ Likewise.
+ (TypeCheckExpr::visit): Likewise.
+ (TypeCheckExpr::resolve_fn_trait_call): Likewise.
+ * typecheck/rust-hir-type-check-expr.h: Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc (TypeCheckTopLevelExternItem::Resolve):
+ Likewise.
+ (TypeCheckTopLevelExternItem::visit): Likewise.
+ (TypeCheckImplItem::visit): Likewise.
+ (TypeCheckImplItemWithTrait::visit): Likewise.
+ * typecheck/rust-hir-type-check-implitem.h: Likewise.
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Likewise.
+ (TypeCheckItem::resolve_impl_item): Likewise.
+ (TypeCheckItem::resolve_impl_block_substitutions): Likewise.
+ (TypeCheckItem::resolve_impl_block_self): Likewise.
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::visit): Likewise.
+ (TypeCheckExpr::resolve_segments): Likewise.
+ * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::Resolve):
+ Likewise.
+ (TypeCheckPattern::visit): Likewise.
+ (ClosureParamInfer::Resolve): Likewise.
+ (ClosureParamInfer::visit): Likewise.
+ * typecheck/rust-hir-type-check-pattern.h: Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::Resolve):
+ Likewise.
+ (TypeCheckStmt::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.h: Likewise.
+ * typecheck/rust-hir-type-check-struct-field.h: Likewise.
+ * typecheck/rust-hir-type-check-struct.cc (TypeCheckStructExpr::TypeCheckStructExpr):
+ Likewise.
+ (TypeCheckStructExpr::Resolve): Likewise.
+ (TypeCheckStructExpr::resolve): Likewise.
+ (TypeCheckStructExpr::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckResolveGenericArguments::resolve):
+ Likewise.
+ (TypeCheckType::Resolve): Likewise.
+ (TypeCheckType::visit): Likewise.
+ (TypeCheckType::resolve_root_path): Likewise.
+ (TypeResolveGenericParam::Resolve): Likewise.
+ (TypeResolveGenericParam::visit): Likewise.
+ (ResolveWhereClauseItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.h: Likewise.
+ * typecheck/rust-hir-type-check.cc (TraitItemReference::get_type_from_fn):
+ Likewise.
+ * typecheck/rust-hir-type-check.h: Likewise.
+ * typecheck/rust-type-util.cc (query_type): Likewise.
+ * typecheck/rust-typecheck-context.cc (TypeCheckContextItem::TypeCheckContextItem):
+ Likewise.
+ * typecheck/rust-tyty-bounds.cc (TypeBoundsProbe::scan): Likewise.
+ (TypeCheckBase::get_predicate_from_bound): Likewise.
+ * typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Likewise.
+ (TypeCheckMethodCallExpr::go): Likewise.
+ (TypeCheckMethodCallExpr::check): Likewise.
+ * typecheck/rust-tyty-subst.cc: Likewise.
+ * typecheck/rust-tyty.cc (BaseType::monomorphized_clone): Likewise.
+ (VariantDef::VariantDef): Remove copy constructor.
+ (VariantDef::operator=): Change to move operator.
+ (VariantDef::get_discriminant): Replace return type to a reference
+ instead of a reference to a unique pointer.
+ (VariantDef::clone): Change to references.
+ (VariantDef::monomorphized_clone): Likewise.
+ (FnType::as_string): Likewise.
+ (FnType::clone): Likewise.
+ * typecheck/rust-tyty.h: Likewise.
+ * util/rust-hir-map.cc (Mappings::insert_hir_impl_block): Likewise.
+ * backend/rust-compile-asm.cc: Use a reference instead of the raw
+ pointer value.
+ * checks/errors/borrowck/rust-bir-builder-pattern.cc: Use references.
+ * checks/errors/rust-hir-pattern-analysis.cc: Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Use DefaultResolver::visit and avoid a call
+ to Identifier::as_string while handling instances of StaticItem.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-forever-stack.h
+ (ForeverStack::push): Accept argument of type Rib::Kind rather
+ than Rib.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::push): Likewise.
+ * resolve/rust-name-resolution-context.cc
+ (NameResolutionContext::scoped): Likewise.
+ * resolve/rust-name-resolution-context.h
+ (NameResolutionContext::scoped): Likewise.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::resolve_impl_block_substitutions):
+ dont check for unconstrained when the self is not resolved
+ * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path):
+ remove bad debug error diagnostic
+ * typecheck/rust-tyty-subst.cc: likewise
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * ast/rust-expr.h: Remove invalid usage of `struct`.
+ * backend/rust-compile-asm.h: Remove unused `translated` member.
+ * backend/rust-compile-asm.cc (CompileAsm::CompileAsm): Remove usage
+ of `translated` member.
+ * checks/errors/rust-unsafe-checker.h: Mark visitor as `override`.
+ * hir/tree/rust-hir-expr.h (struct AnonConst): Remove unused `locus`
+ member.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * typecheck/rust-tyty-call.h: Remove unused context member.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * hir/tree/rust-hir.h: Add override qualifier to overriden method.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-item.h
+ (Trait::self_param): Add.
+ (Trait::Trait): Initialize self_param.
+ (Trait::operator=): Copy self_param.
+ (Trait::insert_implicit_self): Remove.
+ (Trait::get_implicit_self): Add.
+ * hir/rust-ast-lower-item.cc
+ (ASTLoweringItem::visit): Make sure implicit self is still
+ lowered to HIR.
+ * resolve/rust-ast-resolve-item.cc
+ (ResolveItem::visit): Adjust handling of implicit self.
+ * resolve/rust-early-name-resolver.cc
+ (EarlyNameResolver::visit): Add commit to Trait visitor
+ mentioning that implicit self is not visited.
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Remove call to Trait::insert_implicit_self.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): fix the ty_id
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-tyty.cc (PlaceholderType::can_resolve): check for empty mappings
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/privacy/rust-privacy-reporter.cc:
+ Include rust-immutable-name-resolution-context.h.
+ (is_child_module): Use ForeverStack::is_module_descendant if name
+ resolution 2.0 is enabled.
+ * resolve/rust-forever-stack.h
+ (ForeverStack::is_module_descendant): Add.
+ (ForeverStack::dfs_node): Add.
+ * resolve/rust-forever-stack.hxx
+ (ForeverStack::dfs_rib): Use ForeverStack::dfs_node.
+ (ForeverStack::dfs_node): Add.
+ (ForeverStack::is_module_descendant): Add.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/privacy/rust-visibility-resolver.cc:
+ Add includes.
+ (VisibilityResolver::resolve_module_path): Use name resolver 2.0
+ (when enabled) to lookup path resolutions.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path): dont infer here
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Handle StructExprStruct and use
+ ForeverStack::resolve_path instead of ForeverStack::get to
+ resolve struct expression paths.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Handle StructExprStruct.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-context.cc
+ (Context::setup_builtins): Use TypeCheckContext::get_builtins
+ instead of Resolver::get_builtin_types,
+ TypeCheckContext::lookup_type_by_node_id, and
+ TypeCheckContext::lookup_type.
+ * typecheck/rust-hir-type-check.h
+ (TypeCheckContext::get_builtins): Add.
+ * typecheck/rust-typecheck-context.cc
+ (TypeCheckContext::get_builtins): Add.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_segments): remove hack
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-tyty.cc
+ (TupleType::get_unit_type): Remove parameter, cache return
+ value.
+ * typecheck/rust-tyty.h
+ (TupleType::get_unit_type): Remove parameter.
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::setup_builtin_types): Adjust calls to get_unit_type.
+ * resolve/rust-name-resolver.cc
+ (Resolver::generate_builtins): Likewise.
+ * typecheck/rust-hir-type-check-expr.cc
+ (TypeCheckExpr::visit): Likewise.
+ * typecheck/rust-hir-type-check-implitem.cc
+ (TypeCheckTopLevelExternItem::visit): Likewise.
+ (TypeCheckImplItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-item.cc
+ (TypeCheckItem::visit): Likewise.
+ * typecheck/rust-hir-type-check-stmt.cc
+ (TypeCheckStmt::visit): Likewise.
+ * typecheck/rust-hir-type-check-type.cc
+ (TypeCheckType::visit): Likewise.
+ * typecheck/rust-hir-type-check.cc
+ (TraitItemReference::get_type_from_fn): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Handle SelfParam.
+ * resolve/rust-late-name-resolver-2.0.h
+ (Late::visit): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-trait-resolve.cc: Add includes.
+ (TraitResolver::resolve_path_to_trait):
+ Use name resolution 2.0 resolver when enabled.
+
+2025-03-21 Marc PoulhiĂšs <dkm@kataplop.net>
+
+ * backend/rust-compile-block.h: Adjust after removal of
+ HIR::IfLetExpr and HIR::IfLetExprConseqElse.
+ * backend/rust-compile-expr.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
+ (ExprStmtBuilder::visit): Likewise.
+ * checks/errors/borrowck/rust-bir-builder-expr-stmt.h: Likewise.
+ * checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h:
+ Likewise.
+ * checks/errors/borrowck/rust-bir-builder-struct.h: Likewise.
+ * checks/errors/borrowck/rust-function-collector.h: Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.cc
+ (PrivacyReporter::visit): Likewise.
+ * checks/errors/privacy/rust-privacy-reporter.h: Likewise.
+ * checks/errors/rust-const-checker.cc (ConstChecker::visit):
+ Likewise.
+ * checks/errors/rust-const-checker.h: Likewise.
+ * checks/errors/rust-unsafe-checker.cc (UnsafeChecker::visit):
+ Likewise.
+ * checks/errors/rust-unsafe-checker.h: Likewise.
+ * hir/rust-ast-lower-block.h (ASTLoweringIfLetBlock::translate):
+ Change return type.
+ * hir/rust-ast-lower.cc (ASTLoweringIfLetBlock::desugar_iflet):
+ New.
+ (ASTLoweringIfLetBlock::visit(AST::IfLetExpr &)): Adjust and use
+ desugar_iflet.
+ * hir/rust-ast-lower.h: Add comment.
+ * hir/rust-hir-dump.cc (Dump::do_ifletexpr): Remove.
+ (Dump::visit(IfLetExpr&)): Remove.
+ (Dump::visit(IfLetExprConseqElse&)): Remove.
+ * hir/rust-hir-dump.h (Dump::do_ifletexpr): Remove.
+ (Dump::visit(IfLetExpr&)): Remove.
+ (Dump::visit(IfLetExprConseqElse&)): Remove.
+ * hir/tree/rust-hir-expr.h (class IfLetExpr): Remove.
+ (class IfLetExprConseqElse): Remove.
+ * hir/tree/rust-hir-full-decls.h (class IfLetExpr): Remove.
+ (class IfLetExprConseqElse): Remove.
+ * hir/tree/rust-hir-visitor.h: Adjust after removal of
+ HIR::IfLetExpr and HIR::IfLetExprConseqElse.
+ * hir/tree/rust-hir.cc (IfLetExpr::as_string): Remove.
+ (IfLetExprConseqElse::as_string): Remove.
+ (IfLetExpr::accept_vis): Remove.
+ (IfLetExprConseqElse::accept_vis): Remove.
+ * hir/tree/rust-hir.h: Adjust after removal of HIR::IfLetExpr and
+ HIR::IfLetExprConseqElse.
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::visit):
+ Likewise.
+ * typecheck/rust-hir-type-check-expr.h: Likewise.
+ * checks/errors/rust-hir-pattern-analysis.cc
+ (PatternChecker::visit (IfLetExpr &)): Remove.
+ (PatternChecker::visit (IfLetExprConseqElse &)): Remove.
+ * checks/errors/rust-hir-pattern-analysis.h (visit(IfLetExpr &)): Remove.
+ (visit(IfLetExprConseqElse &)): Remove.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * checks/errors/rust-unsafe-checker.cc: Add includes.
+ (UnsafeChecker::visit): Use 2.0 version of resolver when name
+ resolution 2.0 is enabled.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * backend/rust-compile-implitem.cc
+ (CompileTraitItem::visit): Use name resolver 2.0 (when enabled)
+ to obtain canonical paths for instances of TraitItemConst and
+ TraitItemFunc.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * typecheck/rust-hir-type-check.cc: Add includes.
+ (TraitItemReference::get_type_from_fn): Use
+ ForeverStack::to_canonical_path when name resolution 2.0 is
+ enabled.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * ast/rust-path.h
+ (PathIdentSegment::is_super_segment): Rename to...
+ (PathIdentSegment::is_super_path_seg): ...here.
+ (PathIdentSegment::is_crate_segment): Rename to...
+ (PathIdentSegment::is_crate_path_seg): ...here.
+ (PathIdentSegment::is_lower_self): Rename to...
+ (PathIdentSegment::is_lower_self_seg): ...here.
+ (PathIdentSegment::is_big_self): Rename to...
+ (PathIdentSegment::is_big_self_seg): ...here.
+ (PathExprSegment::is_super_path_seg): Handle renames.
+ (PathExprSegment::is_crate_path_seg): Likewise.
+ (PathExprSegment::is_lower_self_seg): Likewise.
+ (TypePathSegment::is_crate_path_seg): Likewise.
+ (TypePathSegment::is_super_path_seg): Likewise.
+ (TypePathSegment::is_big_self_seg): Likewise.
+ (TypePathSegment::is_lower_self_seg): Likewise.
+ * ast/rust-ast-collector.cc
+ (TokenCollector::visit): Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-late-name-resolver-2.0.cc
+ (Late::visit): Visit the initialization expressions of let
+ statements before visiting their patterns.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * resolve/rust-toplevel-name-resolver-2.0.cc
+ (TopLevel::visit): Insert trait names into the type namespace.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * typecheck/rust-hir-trait-reference.h: new get locus helper
+ * typecheck/rust-hir-trait-resolve.cc (AssociatedImplTrait::get_locus): implemention
+ * typecheck/rust-hir-type-check-expr.cc (TypeCheckExpr::resolve_operator_overload):
+ fix overload
+
2025-03-19 Owen Avery <powerboat9.gamer@gmail.com>
* resolve/rust-toplevel-name-resolver-2.0.cc
diff --git a/gcc/rust/Make-lang.in b/gcc/rust/Make-lang.in
index b1777e3..b6f3a35 100644
--- a/gcc/rust/Make-lang.in
+++ b/gcc/rust/Make-lang.in
@@ -146,6 +146,7 @@ GRS_OBJS = \
rust/rust-ast-resolve-path.o \
rust/rust-ast-resolve-stmt.o \
rust/rust-ast-resolve-struct-expr-field.o \
+ rust/rust-forever-stack.o \
rust/rust-hir-type-check.o \
rust/rust-privacy-check.o \
rust/rust-privacy-ctx.o \
@@ -178,6 +179,13 @@ GRS_OBJS = \
rust/rust-polonius.o\
rust/rust-hir-dot-operator.o \
rust/rust-hir-path-probe.o \
+ rust/rust-hir-path.o \
+ rust/rust-hir-type.o \
+ rust/rust-hir-expr.o \
+ rust/rust-hir-type-abstract.o \
+ rust/rust-hir-item.o \
+ rust/rust-hir-stmt.o \
+ rust/rust-hir-generic-param.o \
rust/rust-type-util.o \
rust/rust-coercion.o \
rust/rust-casts.o \
@@ -220,8 +228,9 @@ GRS_OBJS = \
rust/rust-dir-owner.o \
rust/rust-unicode.o \
rust/rust-punycode.o \
- rust/rust-lang-item.o \
rust/rust-expand-format-args.o \
+ rust/rust-lang-item.o \
+ rust/rust-collect-lang-items.o \
$(END)
# removed object files from here
diff --git a/gcc/rust/ast/rust-ast-builder-type.cc b/gcc/rust/ast/rust-ast-builder-type.cc
index e76d0de..13126b4 100644
--- a/gcc/rust/ast/rust-ast-builder-type.cc
+++ b/gcc/rust/ast/rust-ast-builder-type.cc
@@ -20,7 +20,6 @@
#include "rust-ast-builder.h"
#include "rust-ast-full.h"
#include "rust-common.h"
-#include "rust-make-unique.h"
namespace Rust {
namespace AST {
diff --git a/gcc/rust/ast/rust-ast-builder.cc b/gcc/rust/ast/rust-ast-builder.cc
index 529c686..47044df 100644
--- a/gcc/rust/ast/rust-ast-builder.cc
+++ b/gcc/rust/ast/rust-ast-builder.cc
@@ -18,10 +18,14 @@
#include "rust-ast-builder.h"
#include "rust-ast-builder-type.h"
+#include "rust-ast.h"
#include "rust-common.h"
#include "rust-expr.h"
+#include "rust-path.h"
+#include "rust-item.h"
+#include "rust-path.h"
+#include "rust-system.h"
#include "rust-token.h"
-#include "rust-make-unique.h"
namespace Rust {
namespace AST {
@@ -43,9 +47,18 @@ Builder::call (std::unique_ptr<Expr> &&path,
}
std::unique_ptr<Expr>
+Builder::call (std::unique_ptr<Expr> &&path, std::unique_ptr<Expr> &&arg) const
+{
+ auto args = std::vector<std::unique_ptr<Expr>> ();
+ args.emplace_back (std::move (arg));
+
+ return call (std::move (path), std::move (args));
+}
+
+std::unique_ptr<Expr>
Builder::array (std::vector<std::unique_ptr<Expr>> &&members) const
{
- auto elts = Rust::make_unique<ArrayElemsValues> (std::move (members), loc);
+ auto elts = std::make_unique<ArrayElemsValues> (std::move (members), loc);
return std::unique_ptr<Expr> (new ArrayExpr (std::move (elts), {}, {}, loc));
}
@@ -56,6 +69,13 @@ Builder::identifier (std::string name) const
return std::unique_ptr<Expr> (new IdentifierExpr (name, {}, loc));
}
+std::unique_ptr<Pattern>
+Builder::identifier_pattern (std::string name, bool mut) const
+{
+ return std::unique_ptr<Pattern> (
+ new IdentifierPattern (name, loc, false, mut));
+}
+
std::unique_ptr<Expr>
Builder::tuple_idx (std::string receiver, int idx) const
{
@@ -83,12 +103,27 @@ Builder::type_path_segment (std::string seg) const
}
std::unique_ptr<TypePathSegment>
-Builder::generic_type_path_segment (std::string seg, GenericArgs args) const
+Builder::type_path_segment (LangItem::Kind lang_item) const
+{
+ return std::unique_ptr<TypePathSegment> (
+ new TypePathSegment (lang_item, loc));
+}
+
+std::unique_ptr<TypePathSegment>
+Builder::type_path_segment_generic (std::string seg, GenericArgs args) const
{
return std::unique_ptr<TypePathSegment> (
new TypePathSegmentGeneric (PathIdentSegment (seg, loc), false, args, loc));
}
+std::unique_ptr<TypePathSegment>
+Builder::type_path_segment_generic (LangItem::Kind lang_item,
+ GenericArgs args) const
+{
+ return std::unique_ptr<TypePathSegment> (
+ new TypePathSegmentGeneric (lang_item, args, loc));
+}
+
std::unique_ptr<Type>
Builder::single_type_path (std::string type) const
{
@@ -99,14 +134,51 @@ Builder::single_type_path (std::string type) const
}
std::unique_ptr<Type>
+Builder::single_type_path (LangItem::Kind lang_item) const
+{
+ return std::unique_ptr<Type> (new TypePath (lang_item, {}, loc));
+}
+
+std::unique_ptr<Type>
Builder::single_generic_type_path (std::string type, GenericArgs args) const
{
auto segments = std::vector<std::unique_ptr<TypePathSegment>> ();
- segments.emplace_back (generic_type_path_segment (type, args));
+ segments.emplace_back (type_path_segment_generic (type, args));
+
+ return std::unique_ptr<Type> (new TypePath (std::move (segments), loc));
+}
+
+std::unique_ptr<Type>
+Builder::single_generic_type_path (LangItem::Kind lang_item,
+ GenericArgs args) const
+{
+ auto segments = std::vector<std::unique_ptr<TypePathSegment>> ();
+ segments.emplace_back (type_path_segment_generic (lang_item, args));
return std::unique_ptr<Type> (new TypePath (std::move (segments), loc));
}
+TypePath
+Builder::type_path (std::unique_ptr<TypePathSegment> &&segment) const
+{
+ auto segments = std::vector<std::unique_ptr<TypePathSegment>> ();
+ segments.emplace_back (std::move (segment));
+
+ return TypePath (std::move (segments), loc);
+}
+
+TypePath
+Builder::type_path (std::string type) const
+{
+ return type_path (type_path_segment (type));
+}
+
+TypePath
+Builder::type_path (LangItem::Kind lang_item) const
+{
+ return type_path (type_path_segment (lang_item));
+}
+
PathInExpression
Builder::path_in_expression (std::vector<std::string> &&segments) const
{
@@ -117,6 +189,22 @@ Builder::path_in_expression (std::vector<std::string> &&segments) const
return PathInExpression (std::move (path_segments), {}, loc);
}
+PathInExpression
+Builder::path_in_expression (LangItem::Kind lang_item) const
+{
+ return PathInExpression (lang_item, {}, loc);
+}
+
+std::unique_ptr<Expr>
+Builder::block (std::unique_ptr<Stmt> &&stmt,
+ std::unique_ptr<Expr> &&tail_expr) const
+{
+ auto stmts = std::vector<std::unique_ptr<Stmt>> ();
+ stmts.emplace_back (std::move (stmt));
+
+ return block (std::move (stmts), std::move (tail_expr));
+}
+
std::unique_ptr<Expr>
Builder::block (std::vector<std::unique_ptr<Stmt>> &&stmts,
std::unique_ptr<Expr> &&tail_expr) const
@@ -150,6 +238,19 @@ Builder::deref (std::unique_ptr<Expr> &&of) const
return std::unique_ptr<Expr> (new DereferenceExpr (std::move (of), {}, loc));
}
+std::unique_ptr<Stmt>
+Builder::struct_struct (std::string struct_name,
+ std::vector<std::unique_ptr<GenericParam>> &&generics,
+ std::vector<StructField> &&fields)
+{
+ auto is_unit = fields.empty ();
+
+ return std::unique_ptr<Stmt> (
+ new StructStruct (std::move (fields), struct_name, std::move (generics),
+ WhereClause::create_empty (), is_unit,
+ Visibility::create_private (), {}, loc));
+}
+
std::unique_ptr<Expr>
Builder::struct_expr_struct (std::string struct_name) const
{
@@ -162,9 +263,16 @@ Builder::struct_expr (
std::string struct_name,
std::vector<std::unique_ptr<StructExprField>> &&fields) const
{
+ return struct_expr (path_in_expression ({struct_name}), std::move (fields));
+}
+
+std::unique_ptr<Expr>
+Builder::struct_expr (
+ PathInExpression struct_name,
+ std::vector<std::unique_ptr<StructExprField>> &&fields) const
+{
return std::unique_ptr<Expr> (
- new StructExprStructFields (path_in_expression ({struct_name}),
- std::move (fields), loc));
+ new StructExprStructFields (struct_name, std::move (fields), loc));
}
std::unique_ptr<StructExprField>
@@ -189,6 +297,46 @@ Builder::wildcard () const
return std::unique_ptr<Pattern> (new WildcardPattern (loc));
}
+std::unique_ptr<Path>
+Builder::lang_item_path (LangItem::Kind kind) const
+{
+ return std::unique_ptr<Path> (new PathInExpression (kind, {}, loc));
+}
+
+std::unique_ptr<Expr>
+Builder::match (std::unique_ptr<Expr> &&scrutinee,
+ std::vector<MatchCase> &&cases)
+{
+ return std::unique_ptr<Expr> (
+ new MatchExpr (std::move (scrutinee), std::move (cases), {}, {}, loc));
+}
+
+MatchArm
+Builder::match_arm (std::unique_ptr<Pattern> &&pattern)
+{
+ auto patterns = std::vector<std::unique_ptr<Pattern>> ();
+ patterns.emplace_back (std::move (pattern));
+
+ return MatchArm (std::move (patterns), loc);
+}
+
+MatchCase
+Builder::match_case (std::unique_ptr<Pattern> &&pattern,
+ std::unique_ptr<Expr> &&expr)
+{
+ return MatchCase (match_arm (std::move (pattern)), std::move (expr));
+}
+
+std::unique_ptr<Expr>
+Builder::loop (std::vector<std::unique_ptr<Stmt>> &&stmts)
+{
+ auto block = std::unique_ptr<BlockExpr> (
+ new BlockExpr (std::move (stmts), nullptr, {}, {}, LoopLabel::error (), loc,
+ loc));
+
+ return std::unique_ptr<Expr> (new LoopExpr (std::move (block), loc));
+}
+
std::unique_ptr<Type>
Builder::new_type (Type &type)
{
diff --git a/gcc/rust/ast/rust-ast-builder.h b/gcc/rust/ast/rust-ast-builder.h
index bad79d0..e5bae6e 100644
--- a/gcc/rust/ast/rust-ast-builder.h
+++ b/gcc/rust/ast/rust-ast-builder.h
@@ -20,10 +20,36 @@
#define AST_BUILDER_H
#include "rust-ast-full.h"
+#include "rust-expr.h"
+#include "rust-ast.h"
+#include "rust-item.h"
namespace Rust {
namespace AST {
+template <typename T>
+std::vector<std::unique_ptr<T>>
+vec (std::unique_ptr<T> &&t)
+{
+ auto v = std::vector<std::unique_ptr<T>> ();
+
+ v.emplace_back (std::move (t));
+
+ return v;
+}
+
+template <typename T>
+std::vector<std::unique_ptr<T>>
+vec (std::unique_ptr<T> &&t1, std::unique_ptr<T> &&t2)
+{
+ auto v = std::vector<std::unique_ptr<T>> ();
+
+ v.emplace_back (std::move (t1));
+ v.emplace_back (std::move (t2));
+
+ return v;
+}
+
// TODO: Use this builder when expanding regular macros
/* Builder class with helper methods to create AST nodes. This builder is
* tailored towards generating multiple AST nodes from a single location, and
@@ -38,6 +64,8 @@ public:
/* Create an identifier expression (`variable`) */
std::unique_ptr<Expr> identifier (std::string name) const;
+ std::unique_ptr<Pattern> identifier_pattern (std::string name,
+ bool mut = false) const;
/* Create a tuple index expression (`receiver.0`) */
std::unique_ptr<Expr> tuple_idx (std::string receiver, int idx) const;
@@ -53,6 +81,9 @@ public:
std::unique_ptr<Expr> block (std::vector<std::unique_ptr<Stmt>> &&stmts,
std::unique_ptr<Expr> &&tail_expr
= nullptr) const;
+ std::unique_ptr<Expr> block (std::unique_ptr<Stmt> &&stmt,
+ std::unique_ptr<Expr> &&tail_expr
+ = nullptr) const;
/* Create a let binding with an optional type and initializer (`let <name> :
* <type> = <init>`) */
@@ -66,6 +97,8 @@ public:
*/
std::unique_ptr<Expr> call (std::unique_ptr<Expr> &&path,
std::vector<std::unique_ptr<Expr>> &&args) const;
+ std::unique_ptr<Expr> call (std::unique_ptr<Expr> &&path,
+ std::unique_ptr<Expr> &&arg) const;
/**
* Create an array expression (`[member0, member1, member2]`)
@@ -81,16 +114,27 @@ public:
/* And similarly for type path segments */
std::unique_ptr<TypePathSegment> type_path_segment (std::string seg) const;
+ std::unique_ptr<TypePathSegment>
+ type_path_segment (LangItem::Kind lang_item) const;
std::unique_ptr<TypePathSegment>
- generic_type_path_segment (std::string seg, GenericArgs args) const;
+ type_path_segment_generic (std::string seg, GenericArgs args) const;
+ std::unique_ptr<TypePathSegment>
+ type_path_segment_generic (LangItem::Kind lang_item, GenericArgs args) const;
/* Create a Type from a single string - the most basic kind of type in our AST
*/
std::unique_ptr<Type> single_type_path (std::string type) const;
+ std::unique_ptr<Type> single_type_path (LangItem::Kind lang_item) const;
std::unique_ptr<Type> single_generic_type_path (std::string type,
GenericArgs args) const;
+ std::unique_ptr<Type> single_generic_type_path (LangItem::Kind lang_item,
+ GenericArgs args) const;
+
+ TypePath type_path (std::unique_ptr<TypePathSegment> &&segment) const;
+ TypePath type_path (std::string type) const;
+ TypePath type_path (LangItem::Kind lang_item) const;
/**
* Create a path in expression from multiple segments (`Clone::clone`). You
@@ -100,15 +144,31 @@ public:
PathInExpression
path_in_expression (std::vector<std::string> &&segments) const;
+ /**
+ * Create a path in expression from a lang item.
+ */
+ PathInExpression path_in_expression (LangItem::Kind lang_item) const;
+
+ /* Create a new struct */
+ std::unique_ptr<Stmt>
+ struct_struct (std::string struct_name,
+ std::vector<std::unique_ptr<GenericParam>> &&generics,
+ std::vector<StructField> &&fields);
+
/* Create a struct expression for unit structs (`S`) */
std::unique_ptr<Expr> struct_expr_struct (std::string struct_name) const;
/**
* Create an expression for struct instantiation with fields (`S { a, b: c }`)
+ * Tuple expressions are call expressions and can thus be constructed with
+ * `call`
*/
std::unique_ptr<Expr>
struct_expr (std::string struct_name,
std::vector<std::unique_ptr<StructExprField>> &&fields) const;
+ std::unique_ptr<Expr>
+ struct_expr (PathInExpression struct_name,
+ std::vector<std::unique_ptr<StructExprField>> &&fields) const;
/* Create a field expression for struct instantiation (`field_name: value`) */
std::unique_ptr<StructExprField>
@@ -122,6 +182,19 @@ public:
/* Create a wildcard pattern (`_`) */
std::unique_ptr<Pattern> wildcard () const;
+ /* Create a lang item path usable as a general path */
+ std::unique_ptr<Path> lang_item_path (LangItem::Kind) const;
+
+ /* Create match expressions and their components */
+ std::unique_ptr<Expr> match (std::unique_ptr<Expr> &&scrutinee,
+ std::vector<MatchCase> &&cases);
+ MatchArm match_arm (std::unique_ptr<Pattern> &&pattern);
+ MatchCase match_case (std::unique_ptr<Pattern> &&pattern,
+ std::unique_ptr<Expr> &&expr);
+
+ /* Create a loop expression */
+ std::unique_ptr<Expr> loop (std::vector<std::unique_ptr<Stmt>> &&stmts);
+
static std::unique_ptr<Type> new_type (Type &type);
static std::unique_ptr<GenericParam>
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc
index 2022668..978de64 100644
--- a/gcc/rust/ast/rust-ast-collector.cc
+++ b/gcc/rust/ast/rust-ast-collector.cc
@@ -251,29 +251,6 @@ TokenCollector::visit (Visibility &vis)
}
void
-TokenCollector::visit (NamedFunctionParam &param)
-{
- auto name = param.get_name ();
- if (!param.is_variadic ())
- {
- push (
- Rust::Token::make_identifier (param.get_locus (), std::move (name)));
- push (Rust::Token::make (COLON, UNDEF_LOCATION));
- visit (param.get_type ());
- }
- else
- {
- if (name != "")
- {
- push (Rust::Token::make_identifier (param.get_locus (),
- std::move (name)));
- push (Rust::Token::make (COLON, UNDEF_LOCATION));
- }
- push (Rust::Token::make (ELLIPSIS, UNDEF_LOCATION));
- }
-}
-
-void
TokenCollector::visit (std::vector<std::unique_ptr<GenericParam>> &params)
{
push (Rust::Token::make (LEFT_ANGLE, UNDEF_LOCATION));
@@ -562,27 +539,18 @@ TokenCollector::visit (PathInExpression &path)
}
void
-TokenCollector::visit (RegularPath &path)
-{
- // FIXME: We probably want to have a proper implementation here, and call this
- // function from things like the PathInExpression visitor
-}
-
-void
-TokenCollector::visit (LangItemPath &path)
-{
- // TODO: Implement proper token collection for lang item paths
-}
-
-void
TokenCollector::visit (TypePathSegment &segment)
{
// Syntax:
// PathIdentSegment
- auto ident_segment = segment.get_ident_segment ();
- auto id = ident_segment.as_string ();
- push (
- Rust::Token::make_identifier (ident_segment.get_locus (), std::move (id)));
+
+ auto locus = segment.is_lang_item ()
+ ? segment.get_locus ()
+ : segment.get_ident_segment ().get_locus ();
+ auto segment_string = segment.is_lang_item ()
+ ? LangItem::PrettyString (segment.get_lang_item ())
+ : segment.get_ident_segment ().as_string ();
+ push (Rust::Token::make_identifier (locus, std::move (segment_string)));
}
void
@@ -594,10 +562,13 @@ TokenCollector::visit (TypePathSegmentGeneric &segment)
// `<` `>`
// | `<` ( GenericArg `,` )* GenericArg `,`? `>`
- auto ident_segment = segment.get_ident_segment ();
- auto id = ident_segment.as_string ();
- push (
- Rust::Token::make_identifier (ident_segment.get_locus (), std::move (id)));
+ auto locus = segment.is_lang_item ()
+ ? segment.get_locus ()
+ : segment.get_ident_segment ().get_locus ();
+ auto segment_string = segment.is_lang_item ()
+ ? LangItem::PrettyString (segment.get_lang_item ())
+ : segment.get_ident_segment ().as_string ();
+ push (Rust::Token::make_identifier (locus, std::move (segment_string)));
if (segment.get_separating_scope_resolution ())
push (Rust::Token::make (SCOPE_RESOLUTION, UNDEF_LOCATION));
@@ -711,19 +682,19 @@ TokenCollector::visit (TypePath &path)
void
TokenCollector::visit (PathIdentSegment &segment)
{
- if (segment.is_super_segment ())
+ if (segment.is_super_path_seg ())
{
push (Rust::Token::make (SUPER, segment.get_locus ()));
}
- else if (segment.is_crate_segment ())
+ else if (segment.is_crate_path_seg ())
{
push (Rust::Token::make (CRATE, segment.get_locus ()));
}
- else if (segment.is_lower_self ())
+ else if (segment.is_lower_self_seg ())
{
push (Rust::Token::make (SELF, segment.get_locus ()));
}
- else if (segment.is_big_self ())
+ else if (segment.is_big_self_seg ())
{
push (Rust::Token::make (SELF_ALIAS, segment.get_locus ()));
}
@@ -2499,10 +2470,7 @@ TokenCollector::visit (StructPattern &pattern)
void
TokenCollector::visit (TupleStructItemsNoRange &pattern)
{
- for (auto &pat : pattern.get_patterns ())
- {
- visit (pat);
- }
+ visit_items_joined_by_separator (pattern.get_patterns ());
}
void
diff --git a/gcc/rust/ast/rust-ast-collector.h b/gcc/rust/ast/rust-ast-collector.h
index 32a5bd3..b014c23 100644
--- a/gcc/rust/ast/rust-ast-collector.h
+++ b/gcc/rust/ast/rust-ast-collector.h
@@ -210,7 +210,6 @@ public:
void visit (TupleField &field);
void visit (StructField &field);
void visit (SimplePathSegment &segment);
- void visit (NamedFunctionParam &param);
void visit (MacroRule &rule);
void visit (WhereClause &rule);
void visit (std::vector<LifetimeParam> &for_lifetimes);
@@ -234,8 +233,6 @@ public:
void visit (PathExprSegment &segment);
void visit (PathIdentSegment &segment);
void visit (PathInExpression &path);
- void visit (RegularPath &path);
- void visit (LangItemPath &path);
void visit (TypePathSegment &segment);
void visit (TypePathSegmentGeneric &segment);
void visit (TypePathSegmentFunction &segment);
diff --git a/gcc/rust/ast/rust-ast-full-decls.h b/gcc/rust/ast/rust-ast-full-decls.h
index 80d217e..9359248 100644
--- a/gcc/rust/ast/rust-ast-full-decls.h
+++ b/gcc/rust/ast/rust-ast-full-decls.h
@@ -202,7 +202,6 @@ class TraitImpl;
class ExternalItem;
class ExternalTypeItem;
class ExternalStaticItem;
-class NamedFunctionParam;
class ExternBlock;
// rust-macro.h
diff --git a/gcc/rust/ast/rust-ast-visitor.cc b/gcc/rust/ast/rust-ast-visitor.cc
index 8f53e52..e2e2d9d 100644
--- a/gcc/rust/ast/rust-ast-visitor.cc
+++ b/gcc/rust/ast/rust-ast-visitor.cc
@@ -86,17 +86,6 @@ DefaultASTVisitor::visit (AST::ConstGenericParam &const_param)
}
void
-DefaultASTVisitor::visit (AST::RegularPath &path)
-{
- for (auto &segment : path.get_segments ())
- visit (segment);
-}
-
-void
-DefaultASTVisitor::visit (AST::LangItemPath &path)
-{}
-
-void
DefaultASTVisitor::visit (AST::PathInExpression &path)
{
visit_outer_attrs (path);
@@ -997,6 +986,8 @@ DefaultASTVisitor::visit (AST::Trait &trait)
visit_inner_attrs (trait);
+ visit (trait.get_implicit_self ());
+
for (auto &generic : trait.get_generic_params ())
visit (generic);
@@ -1037,6 +1028,7 @@ DefaultASTVisitor::visit (AST::TraitImpl &impl)
if (impl.has_where_clause ())
visit (impl.get_where_clause ());
visit (impl.get_type ());
+ visit (impl.get_trait_path ());
visit_inner_attrs (impl);
for (auto &item : impl.get_impl_items ())
visit (item);
@@ -1058,14 +1050,6 @@ DefaultASTVisitor::visit (AST::ExternalStaticItem &item)
}
void
-DefaultASTVisitor::visit (AST::NamedFunctionParam &param)
-{
- visit_outer_attrs (param);
- if (!param.is_variadic ())
- visit (param.get_type ());
-}
-
-void
DefaultASTVisitor::visit (AST::ExternBlock &block)
{
visit_outer_attrs (block);
@@ -1453,33 +1437,33 @@ DefaultASTVisitor::visit (AST::VariadicParam &param)
void
ContextualASTVisitor::visit (AST::Crate &crate)
{
- push_context (Context::CRATE);
+ ctx.enter (Kind::CRATE);
DefaultASTVisitor::visit (crate);
- pop_context ();
+ ctx.exit ();
}
void
ContextualASTVisitor::visit (AST::InherentImpl &impl)
{
- push_context (Context::INHERENT_IMPL);
+ ctx.enter (Kind::INHERENT_IMPL);
DefaultASTVisitor::visit (impl);
- pop_context ();
+ ctx.exit ();
}
void
ContextualASTVisitor::visit (AST::TraitImpl &impl)
{
- push_context (Context::TRAIT_IMPL);
+ ctx.enter (Kind::TRAIT_IMPL);
DefaultASTVisitor::visit (impl);
- pop_context ();
+ ctx.exit ();
}
void
ContextualASTVisitor::visit (AST::Trait &trait)
{
- push_context (Context::TRAIT);
+ ctx.enter (Kind::TRAIT);
DefaultASTVisitor::visit (trait);
- pop_context ();
+ ctx.exit ();
}
} // namespace AST
diff --git a/gcc/rust/ast/rust-ast-visitor.h b/gcc/rust/ast/rust-ast-visitor.h
index 50b9301..51661df 100644
--- a/gcc/rust/ast/rust-ast-visitor.h
+++ b/gcc/rust/ast/rust-ast-visitor.h
@@ -26,6 +26,7 @@
#include "rust-item.h"
#include "rust-path.h"
#include "rust-system.h"
+#include "rust-stacked-contexts.h"
namespace Rust {
namespace AST {
@@ -59,8 +60,6 @@ public:
// virtual void visit(TraitImplItem& trait_impl_item) = 0;
// rust-path.h
- virtual void visit (RegularPath &path) = 0;
- virtual void visit (LangItemPath &path) = 0;
virtual void visit (PathInExpression &path) = 0;
virtual void visit (TypePathSegment &segment) = 0;
virtual void visit (TypePathSegmentGeneric &segment) = 0;
@@ -251,8 +250,6 @@ public:
virtual void visit (AST::Lifetime &lifetime) override;
virtual void visit (AST::LifetimeParam &lifetime_param) override;
virtual void visit (AST::ConstGenericParam &const_param) override;
- virtual void visit (AST::RegularPath &path) override;
- virtual void visit (AST::LangItemPath &path) override;
virtual void visit (AST::PathInExpression &path) override;
virtual void visit (AST::TypePathSegment &segment) override;
virtual void visit (AST::TypePathSegmentGeneric &segment) override;
@@ -427,7 +424,6 @@ public:
virtual void visit (AST::WhereClause &where);
virtual void visit (AST::StructField &field);
virtual void visit (AST::TupleField &field);
- virtual void visit (AST::NamedFunctionParam &param);
virtual void visit (AST::MacroRule &rule);
virtual void visit (AST::MacroInvocData &data);
virtual void visit (AST::MacroTranscriber &transcriber);
@@ -452,7 +448,7 @@ public:
class ContextualASTVisitor : public DefaultASTVisitor
{
protected:
- enum class Context
+ enum class Kind
{
FUNCTION,
INHERENT_IMPL,
@@ -461,6 +457,7 @@ protected:
MODULE,
CRATE,
};
+
using DefaultASTVisitor::visit;
virtual void visit (AST::Crate &crate) override;
@@ -476,11 +473,7 @@ protected:
DefaultASTVisitor::visit (item);
}
- std::vector<Context> context;
-
- void push_context (Context ctx) { context.push_back (ctx); }
-
- void pop_context () { context.pop_back (); }
+ StackedContexts<Kind> ctx;
};
} // namespace AST
diff --git a/gcc/rust/ast/rust-ast.cc b/gcc/rust/ast/rust-ast.cc
index 1d52352..ab82303 100644
--- a/gcc/rust/ast/rust-ast.cc
+++ b/gcc/rust/ast/rust-ast.cc
@@ -272,8 +272,8 @@ Attribute::get_traits_to_derive ()
case AST::MetaItem::ItemKind::Word: {
auto word = static_cast<AST::MetaWord *> (meta_item);
// Convert current word to path
- current
- = make_unique<AST::MetaItemPath> (AST::MetaItemPath (
+ current = std::make_unique<AST::MetaItemPath> (
+ AST::MetaItemPath (
AST::SimplePath (word->get_ident ())));
auto path
= static_cast<AST::MetaItemPath *> (current.get ());
@@ -2998,22 +2998,6 @@ ExternalStaticItem::as_string () const
}
std::string
-NamedFunctionParam::as_string () const
-{
- std::string str = append_attributes (outer_attrs, OUTER);
-
- if (has_name ())
- str += "\n" + name;
-
- if (is_variadic ())
- str += "...";
- else
- str += "\n Type: " + param_type->as_string ();
-
- return str;
-}
-
-std::string
TraitItemConst::as_string () const
{
// TODO: rewrite to work with non-linearisable exprs
@@ -4286,7 +4270,7 @@ BlockExpr::normalize_tail_expr ()
if (!stmt.is_semicolon_followed ())
{
- expr = std::move (stmt.take_expr ());
+ expr = stmt.take_expr ();
statements.pop_back ();
}
}
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index 42ad011..5e724d1 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -70,16 +70,6 @@ namespace AST {
class ASTVisitor;
using AttrVec = std::vector<Attribute>;
-// The available kinds of AST Nodes
-enum class Kind
-{
- UNKNOWN,
- MODULE,
- MACRO_RULES_DEFINITION,
- MACRO_INVOCATION,
- IDENTIFIER,
-};
-
class Visitable
{
public:
@@ -87,20 +77,6 @@ public:
virtual void accept_vis (ASTVisitor &vis) = 0;
};
-// Abstract base class for all AST elements
-class Node : public Visitable
-{
-public:
- /**
- * Get the kind of Node this is. This is used to differentiate various AST
- * elements with very little overhead when extracting the derived type
- * through static casting is not necessary.
- */
- // FIXME: Mark this as `= 0` in the future to make sure every node
- // implements it
- virtual Kind get_ast_kind () const { return Kind::UNKNOWN; }
-};
-
// Delimiter types - used in macros and whatever.
enum DelimType
{
@@ -1092,7 +1068,7 @@ class MetaListNameValueStr;
/* Base statement abstract class. Note that most "statements" are not allowed
* in top-level module scope - only a subclass of statements called "items"
* are. */
-class Stmt : public Node
+class Stmt : public Visitable
{
public:
enum class Kind
@@ -1141,6 +1117,28 @@ protected:
class Item : public Stmt
{
public:
+ enum class Kind
+ {
+ MacroRulesDefinition,
+ MacroInvocation,
+ Module,
+ ExternCrate,
+ UseDeclaration,
+ Function,
+ TypeAlias,
+ Struct,
+ EnumItem,
+ Enum,
+ Union,
+ ConstantItem,
+ StaticItem,
+ Trait,
+ Impl,
+ ExternBlock,
+ };
+
+ virtual Kind get_item_kind () const = 0;
+
// Unique pointer custom clone function
std::unique_ptr<Item> clone_item () const
{
@@ -1221,14 +1219,54 @@ public:
{
return outer_attrs;
}
+
+ virtual Item::Kind get_item_kind () const override = 0;
};
+
// forward decl of ExprWithoutBlock
class ExprWithoutBlock;
// Base expression AST node - abstract
-class Expr : public Node
+class Expr : public Visitable
{
public:
+ enum class Kind
+ {
+ PathInExpression,
+ QualifiedPathInExpression,
+ Literal,
+ Operator,
+ Grouped,
+ Array,
+ ArrayIndex,
+ Tuple,
+ TupleIndex,
+ Struct,
+ Call,
+ MethodCall,
+ FieldAccess,
+ Closure,
+ Block,
+ Continue,
+ Break,
+ Range,
+ Box,
+ Return,
+ UnsafeBlock,
+ Loop,
+ If,
+ IfLet,
+ Match,
+ Await,
+ AsyncBlock,
+ InlineAsm,
+ Identifier,
+ FormatArgs,
+ MacroInvocation,
+ };
+
+ virtual Kind get_expr_kind () const = 0;
+
// Unique pointer custom clone function
std::unique_ptr<Expr> clone_expr () const
{
@@ -1343,7 +1381,7 @@ public:
outer_attrs = std::move (new_attrs);
}
- Kind get_ast_kind () const override { return Kind::IDENTIFIER; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Identifier; }
protected:
// Clone method implementation
@@ -1410,7 +1448,7 @@ protected:
class TraitBound;
// Base class for types as represented in AST - abstract
-class Type : public Node
+class Type : public Visitable
{
public:
// Unique pointer custom clone function
diff --git a/gcc/rust/ast/rust-builtin-ast-nodes.h b/gcc/rust/ast/rust-builtin-ast-nodes.h
index 7ebd656..3684092 100644
--- a/gcc/rust/ast/rust-builtin-ast-nodes.h
+++ b/gcc/rust/ast/rust-builtin-ast-nodes.h
@@ -202,6 +202,8 @@ public:
const FormatArguments &get_arguments () const { return arguments; }
virtual location_t get_locus () const override;
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::FormatArgs; }
+
private:
location_t loc;
// FIXME: This probably needs to be a separate type - it is one in rustc's
diff --git a/gcc/rust/ast/rust-collect-lang-items.cc b/gcc/rust/ast/rust-collect-lang-items.cc
new file mode 100644
index 0000000..11c3297
--- /dev/null
+++ b/gcc/rust/ast/rust-collect-lang-items.cc
@@ -0,0 +1,104 @@
+// Copyright (C) 2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include "rust-collect-lang-items.h"
+#include "optional.h"
+#include "rust-ast-collector.h"
+#include "rust-ast.h"
+#include "rust-attribute-values.h"
+#include "rust-attributes.h"
+#include "rust-hir-map.h"
+#include "rust-item.h"
+
+namespace Rust {
+namespace AST {
+
+template <typename T>
+tl::optional<LangItem::Kind>
+get_lang_item_attr (const T &maybe_lang_item)
+{
+ for (const auto &attr : maybe_lang_item.get_outer_attrs ())
+ {
+ const auto &str_path = attr.get_path ().as_string ();
+ if (!Analysis::Attributes::is_known (str_path))
+ {
+ rust_error_at (attr.get_locus (), "unknown attribute %qs",
+ str_path.c_str ());
+ continue;
+ }
+
+ bool is_lang_item = str_path == Values::Attributes::LANG
+ && attr.has_attr_input ()
+ && attr.get_attr_input ().get_attr_input_type ()
+ == AST::AttrInput::AttrInputType::LITERAL;
+
+ if (is_lang_item)
+ {
+ auto &literal
+ = static_cast<AST::AttrInputLiteral &> (attr.get_attr_input ());
+ const auto &lang_item_type_str = literal.get_literal ().as_string ();
+
+ return LangItem::Parse (lang_item_type_str);
+ }
+ }
+
+ return tl::nullopt;
+}
+
+template <typename T>
+void
+CollectLangItems::maybe_add_lang_item (const T &item)
+{
+ if (auto lang_item = get_lang_item_attr (item))
+ mappings.insert_lang_item_node (lang_item.value (), item.get_node_id ());
+}
+
+void
+CollectLangItems::visit (AST::Trait &item)
+{
+ maybe_add_lang_item (item);
+
+ DefaultASTVisitor::visit (item);
+}
+
+void
+CollectLangItems::visit (AST::TraitItemType &item)
+{
+ maybe_add_lang_item (item);
+
+ DefaultASTVisitor::visit (item);
+}
+
+void
+CollectLangItems::visit (AST::Function &item)
+{
+ maybe_add_lang_item (item);
+
+ DefaultASTVisitor::visit (item);
+}
+
+void
+CollectLangItems::visit (AST::StructStruct &item)
+{
+ maybe_add_lang_item (item);
+
+ DefaultASTVisitor::visit (item);
+}
+
+} // namespace AST
+} // namespace Rust
diff --git a/gcc/rust/ast/rust-collect-lang-items.h b/gcc/rust/ast/rust-collect-lang-items.h
new file mode 100644
index 0000000..39cb4be
--- /dev/null
+++ b/gcc/rust/ast/rust-collect-lang-items.h
@@ -0,0 +1,60 @@
+// Copyright (C) 2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_COLLECT_LANG_ITEMS_H
+#define RUST_COLLECT_LANG_ITEMS_H
+
+#include "rust-ast-visitor.h"
+#include "rust-ast.h"
+#include "rust-hir-map.h"
+#include "rust-item.h"
+
+namespace Rust {
+namespace AST {
+
+// This class collects lang items ahead of lowering, as they are now needed for
+// some parts of name resolution
+class CollectLangItems : public DefaultASTVisitor
+{
+public:
+ CollectLangItems () : mappings (Analysis::Mappings::get ()){};
+
+ void go (AST::Crate &crate) { DefaultASTVisitor::visit (crate); }
+
+ Analysis::Mappings &mappings;
+
+ // We must implement visitors for all constructs that could be lang items.
+ // Lang items can be traits, but also enums, and even enum variants.
+ //
+ // https://github.com/rust-lang/rust/blob/master/compiler/rustc_hir/src/lang_items.rs
+
+ using DefaultASTVisitor::visit;
+
+ void visit (AST::Trait &item) override;
+ void visit (AST::TraitItemType &item) override;
+ void visit (AST::Function &item) override;
+ void visit (AST::StructStruct &item) override;
+
+private:
+ template <typename T> void maybe_add_lang_item (const T &item);
+};
+
+} // namespace AST
+} // namespace Rust
+
+#endif // ! RUST_COLLECT_LANG_ITEMS_H
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 438d3d3..852c3f3 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -15,7 +15,7 @@ namespace AST {
// Loop label expression AST node used with break and continue expressions
// TODO: inline?
-class LoopLabel /*: public Node*/
+class LoopLabel /*: public Visitable*/
{
Lifetime label; // or type LIFETIME_OR_LABEL
location_t locus;
@@ -117,6 +117,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Literal; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -365,6 +367,8 @@ public:
{
outer_attrs = std::move (new_attrs);
}
+
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Operator; }
};
/* Unary prefix & or &mut (or && and &&mut) borrow operator. Cannot be
@@ -1090,6 +1094,8 @@ public:
return expr_in_parens;
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Grouped; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -1319,6 +1325,8 @@ public:
return internal_elements;
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Array; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -1424,6 +1432,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::ArrayIndex; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -1520,6 +1530,8 @@ public:
bool is_unit () const { return tuple_elems.size () == 0; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Tuple; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -1607,6 +1619,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::TupleIndex; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -1650,6 +1664,8 @@ public:
{
outer_attrs = std::move (new_attrs);
}
+
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Struct; }
};
// Actual AST node of the struct creator (with no fields). Not abstract!
@@ -2131,6 +2147,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Call; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -2234,6 +2252,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::MethodCall; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -2319,6 +2339,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::FieldAccess; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -2454,6 +2476,8 @@ public:
}
bool get_has_move () const { return has_move; }
+
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Closure; }
};
// Represents a non-type-specified closure expression AST node
@@ -2675,6 +2699,8 @@ public:
bool has_label () { return !label.is_error (); }
LoopLabel &get_label () { return label; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Block; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -2828,6 +2854,8 @@ public:
Lifetime &get_label () { return label; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Continue; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -2924,6 +2952,8 @@ public:
LoopLabel &get_label () { return label; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Break; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -2956,6 +2986,8 @@ public:
{
rust_assert (false);
}
+
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Range; }
};
// Range from (inclusive) and to (exclusive) expression AST node object
@@ -3404,6 +3436,8 @@ public:
return *expr;
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Box; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -3491,6 +3525,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Return; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -3573,6 +3609,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::UnsafeBlock; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -3661,6 +3699,18 @@ public:
{
outer_attrs = std::move (new_attrs);
}
+
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Loop; }
+
+ enum class Kind
+ {
+ Loop,
+ While,
+ WhileLet,
+ For
+ };
+
+ virtual Kind get_loop_kind () const = 0;
};
// 'Loop' expression (i.e. the infinite loop) AST node
@@ -3679,6 +3729,11 @@ public:
void accept_vis (ASTVisitor &vis) override;
+ BaseLoopExpr::Kind get_loop_kind () const override
+ {
+ return BaseLoopExpr::Kind::Loop;
+ }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -3737,6 +3792,11 @@ public:
return *condition;
}
+ BaseLoopExpr::Kind get_loop_kind () const override
+ {
+ return BaseLoopExpr::Kind::While;
+ }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -3820,6 +3880,11 @@ public:
return match_arm_patterns;
}
+ BaseLoopExpr::Kind get_loop_kind () const override
+ {
+ return BaseLoopExpr::Kind::WhileLet;
+ }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -3889,6 +3954,11 @@ public:
return *pattern;
}
+ BaseLoopExpr::Kind get_loop_kind () const override
+ {
+ return BaseLoopExpr::Kind::For;
+ }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -4012,6 +4082,8 @@ public:
const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
std::vector<Attribute> &get_outer_attrs () override { return outer_attrs; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::If; }
+
protected:
// Base clone function but still concrete as concrete base class
virtual IfExpr *clone_if_expr_impl () const { return new IfExpr (*this); }
@@ -4206,6 +4278,8 @@ public:
const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
std::vector<Attribute> &get_outer_attrs () override { return outer_attrs; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::IfLet; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base (or rather this or any derived object) */
@@ -4535,6 +4609,8 @@ public:
const std::vector<MatchCase> &get_match_cases () const { return match_arms; }
std::vector<MatchCase> &get_match_cases () { return match_arms; }
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Match; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -4614,6 +4690,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::Await; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -4696,6 +4774,8 @@ public:
outer_attrs = std::move (new_attrs);
}
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::AsyncBlock; }
+
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -4810,14 +4890,14 @@ public:
rust_assert (this->expr != nullptr);
}
- In (const struct In &other)
+ In (const In &other)
{
reg = other.reg;
expr = other.expr->clone_expr ();
}
- In operator= (const struct In &other)
+ In operator= (const In &other)
{
reg = other.reg;
expr = other.expr->clone_expr ();
@@ -4843,14 +4923,14 @@ public:
rust_assert (this->expr != nullptr);
}
- Out (const struct Out &other)
+ Out (const Out &other)
{
reg = other.reg;
late = other.late;
expr = other.expr->clone_expr ();
}
- Out operator= (const struct Out &other)
+ Out operator= (const Out &other)
{
reg = other.reg;
late = other.late;
@@ -4876,14 +4956,14 @@ public:
rust_assert (this->expr != nullptr);
}
- InOut (const struct InOut &other)
+ InOut (const InOut &other)
{
reg = other.reg;
late = other.late;
expr = other.expr->clone_expr ();
}
- InOut operator= (const struct InOut &other)
+ InOut operator= (const InOut &other)
{
reg = other.reg;
late = other.late;
@@ -4913,7 +4993,7 @@ public:
rust_assert (this->out_expr != nullptr);
}
- SplitInOut (const struct SplitInOut &other)
+ SplitInOut (const SplitInOut &other)
{
reg = other.reg;
late = other.late;
@@ -4921,7 +5001,7 @@ public:
out_expr = other.out_expr->clone_expr ();
}
- SplitInOut operator= (const struct SplitInOut &other)
+ SplitInOut operator= (const SplitInOut &other)
{
reg = other.reg;
late = other.late;
@@ -4953,12 +5033,12 @@ public:
{
rust_assert (this->expr != nullptr);
}
- Sym (const struct Sym &other)
+ Sym (const Sym &other)
{
expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
}
- Sym operator= (const struct Sym &other)
+ Sym operator= (const Sym &other)
{
expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
return *this;
@@ -4981,12 +5061,12 @@ public:
if (label_name.has_value ())
this->label_name = label_name.value ();
}
- Label (const struct Label &other)
+ Label (const Label &other)
{
expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
}
- Label operator= (const struct Label &other)
+ Label operator= (const Label &other)
{
expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
return *this;
@@ -5209,6 +5289,8 @@ public:
{
return new InlineAsm (*this);
}
+
+ Expr::Kind get_expr_kind () const override { return Expr::Kind::InlineAsm; }
};
} // namespace AST
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index 2ae7c44..8eb0cc5 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -758,8 +758,6 @@ public:
Identifier get_name () const { return module_name; }
- AST::Kind get_ast_kind () const override { return AST::Kind::MODULE; }
-
private:
Identifier module_name;
location_t locus;
@@ -899,6 +897,8 @@ public:
void mark_for_strip () override { module_name = {""}; }
bool is_marked_for_strip () const override { return module_name.empty (); }
+ Item::Kind get_item_kind () const override { return Item::Kind::Module; }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -960,6 +960,8 @@ public:
return referenced_crate.empty ();
}
+ Item::Kind get_item_kind () const override { return Item::Kind::ExternCrate; }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -1301,6 +1303,11 @@ public:
void mark_for_strip () override { use_tree = nullptr; }
bool is_marked_for_strip () const override { return use_tree == nullptr; }
+ Item::Kind get_item_kind () const override
+ {
+ return Item::Kind::UseDeclaration;
+ }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -1459,6 +1466,8 @@ public:
// ExternalItem::node_id is same as Stmt::node_id
NodeId get_node_id () const override { return Stmt::node_id; }
+ Item::Kind get_item_kind () const override { return Item::Kind::Function; }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -1590,6 +1599,8 @@ public:
Identifier get_new_type_name () const { return new_type_name; }
+ Item::Kind get_item_kind () const override { return Item::Kind::TypeAlias; }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -1649,6 +1660,8 @@ public:
Identifier get_identifier () const { return struct_name; }
+ Item::Kind get_item_kind () const override { return Item::Kind::Struct; }
+
protected:
Struct (Identifier struct_name,
std::vector<std::unique_ptr<GenericParam>> generic_params,
@@ -1994,6 +2007,41 @@ class EnumItem : public VisItem
location_t locus;
public:
+ enum class Kind
+ {
+ Identifier,
+ Tuple,
+ Struct,
+
+ // FIXME: In the future, we'll need to remove this possibility as well as
+ // remove the EnumItemDiscriminant class. The feature for arbitrary
+ // discriminants on all kinds of variants has been stabilized, and a
+ // "discriminant" is no longer an enum item variant - it's simply an
+ // optional part of all variants.
+ //
+ // Per the reference:
+ //
+ // EnumItem :
+ // OuterAttribute* Visibility?
+ // IDENTIFIER ( EnumItemTuple | EnumItemStruct )? EnumItemDiscriminant?
+ //
+ // EnumItemTuple :
+ // ( TupleFields? )
+ //
+ // EnumItemStruct :
+ // { StructFields? }
+ //
+ // EnumItemDiscriminant :
+ // = Expression
+ //
+ // So we instead need to remove the class, and add an optional expression to
+ // the base EnumItem class
+ //
+ // gccrs#3340
+
+ Discriminant,
+ };
+
virtual ~EnumItem () {}
EnumItem (Identifier variant_name, Visibility vis,
@@ -2002,6 +2050,8 @@ public:
variant_name (std::move (variant_name)), locus (locus)
{}
+ virtual Kind get_enum_item_kind () const { return Kind::Identifier; }
+
// Unique pointer custom clone function
std::unique_ptr<EnumItem> clone_enum_item () const
{
@@ -2021,6 +2071,8 @@ public:
void mark_for_strip () override { variant_name = {""}; }
bool is_marked_for_strip () const override { return variant_name.empty (); }
+ Item::Kind get_item_kind () const override { return Item::Kind::EnumItem; }
+
protected:
EnumItem *clone_item_impl () const override { return new EnumItem (*this); }
};
@@ -2043,6 +2095,11 @@ public:
tuple_fields (std::move (tuple_fields))
{}
+ EnumItem::Kind get_enum_item_kind () const override
+ {
+ return EnumItem::Kind::Tuple;
+ }
+
std::string as_string () const override;
void accept_vis (ASTVisitor &vis) override;
@@ -2080,6 +2137,11 @@ public:
struct_fields (std::move (struct_fields))
{}
+ EnumItem::Kind get_enum_item_kind () const override
+ {
+ return EnumItem::Kind::Struct;
+ }
+
std::string as_string () const override;
void accept_vis (ASTVisitor &vis) override;
@@ -2133,6 +2195,11 @@ public:
EnumItemDiscriminant (EnumItemDiscriminant &&other) = default;
EnumItemDiscriminant &operator= (EnumItemDiscriminant &&other) = default;
+ EnumItem::Kind get_enum_item_kind () const override
+ {
+ return EnumItem::Kind::Discriminant;
+ }
+
std::string as_string () const override;
void accept_vis (ASTVisitor &vis) override;
@@ -2269,6 +2336,8 @@ public:
// TODO: is this better? Or is a "vis_block" better?
WhereClause &get_where_clause () { return where_clause; }
+ Item::Kind get_item_kind () const override { return Item::Kind::Enum; }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -2368,6 +2437,8 @@ public:
Identifier get_identifier () const { return union_name; }
+ Item::Kind get_item_kind () const override { return Item::Kind::Union; }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -2489,6 +2560,11 @@ public:
std::string get_identifier () const { return identifier; }
+ Item::Kind get_item_kind () const override
+ {
+ return Item::Kind::ConstantItem;
+ }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -2610,6 +2686,8 @@ public:
Identifier get_identifier () const { return name; }
+ Item::Kind get_item_kind () const override { return Item::Kind::StaticItem; }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
@@ -2831,6 +2909,7 @@ class Trait : public VisItem
bool has_auto;
Identifier name;
std::vector<std::unique_ptr<GenericParam>> generic_params;
+ TypeParam self_param;
std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds;
WhereClause where_clause;
std::vector<Attribute> inner_attrs;
@@ -2870,7 +2949,7 @@ public:
std::vector<Attribute> inner_attrs, location_t locus)
: VisItem (std::move (vis), std::move (outer_attrs)),
has_unsafe (is_unsafe), has_auto (is_auto), name (std::move (name)),
- generic_params (std::move (generic_params)),
+ generic_params (std::move (generic_params)), self_param ({"Self"}, locus),
type_param_bounds (std::move (type_param_bounds)),
where_clause (std::move (where_clause)),
inner_attrs (std::move (inner_attrs)),
@@ -2880,8 +2959,9 @@ public:
// Copy constructor with vector clone
Trait (Trait const &other)
: VisItem (other), has_unsafe (other.has_unsafe), has_auto (other.has_auto),
- name (other.name), where_clause (other.where_clause),
- inner_attrs (other.inner_attrs), locus (other.locus)
+ name (other.name), self_param (other.self_param),
+ where_clause (other.where_clause), inner_attrs (other.inner_attrs),
+ locus (other.locus)
{
generic_params.reserve (other.generic_params.size ());
for (const auto &e : other.generic_params)
@@ -2901,6 +2981,7 @@ public:
{
VisItem::operator= (other);
name = other.name;
+ self_param = other.self_param;
has_unsafe = other.has_unsafe;
has_auto = other.has_auto;
where_clause = other.where_clause;
@@ -2968,19 +3049,9 @@ public:
WhereClause &get_where_clause () { return where_clause; }
- void insert_implict_self (std::unique_ptr<AST::GenericParam> &&param)
- {
- std::vector<std::unique_ptr<GenericParam>> new_list;
- new_list.reserve (generic_params.size () + 1);
-
- new_list.push_back (std::move (param));
- for (auto &p : generic_params)
- {
- new_list.push_back (std::move (p));
- }
+ AST::TypeParam &get_implicit_self () { return self_param; }
- generic_params = std::move (new_list);
- }
+ Item::Kind get_item_kind () const override { return Item::Kind::Trait; }
protected:
/* Use covariance to implement clone function as returning this object
@@ -3054,6 +3125,8 @@ public:
return trait_type;
}
+ Item::Kind get_item_kind () const override { return Item::Kind::Impl; }
+
protected:
// Mega-constructor
Impl (std::vector<std::unique_ptr<GenericParam>> generic_params,
@@ -3202,8 +3275,8 @@ public:
: Impl (std::move (generic_params), std::move (trait_type),
std::move (where_clause), std::move (vis), std::move (inner_attrs),
std::move (outer_attrs), locus),
- has_unsafe (is_unsafe), has_exclam (has_exclam),
- trait_path (std::move (trait_path)), impl_items (std::move (impl_items))
+ has_unsafe (is_unsafe), has_exclam (has_exclam), trait_path (trait_path),
+ impl_items (std::move (impl_items))
{}
// Copy constructor with vector clone
@@ -3251,11 +3324,7 @@ public:
}
// TODO: is this better? Or is a "vis_block" better?
- TypePath &get_trait_path ()
- {
- // TODO: assert that trait path is not empty?
- return trait_path;
- }
+ TypePath &get_trait_path () { return trait_path; }
protected:
/* Use covariance to implement clone function as returning this object
@@ -3528,303 +3597,6 @@ protected:
}
};
-// A named function parameter used in external functions
-class NamedFunctionParam
-{
- // bool has_name; // otherwise is _
- std::string name;
-
- std::unique_ptr<Type> param_type;
-
- // seemingly new since writing this node
- std::vector<Attribute> outer_attrs;
-
- NodeId node_id;
- location_t locus;
- bool variadic;
-
-public:
- /* Returns whether the named function parameter has a name (i.e. name is not
- * '_'). */
- bool has_name () const { return name != "_" && name != ""; }
-
- bool has_outer_attrs () const { return !outer_attrs.empty (); }
-
- // Returns whether the named function parameter is in an error state.
- bool is_error () const
- {
- // also if identifier is "" but that is probably more costly to compute
- return param_type == nullptr && !variadic;
- }
-
- bool is_variadic () const { return variadic; }
-
- std::string get_name () const { return name; }
-
- location_t get_locus () { return locus; }
-
- // Creates an error state named function parameter.
- static NamedFunctionParam create_error ()
- {
- return NamedFunctionParam ("", nullptr, {}, UNDEF_LOCATION);
- }
-
- NamedFunctionParam (std::string name, std::unique_ptr<Type> param_type,
- std::vector<Attribute> outer_attrs, location_t locus)
- : name (std::move (name)), param_type (std::move (param_type)),
- outer_attrs (std::move (outer_attrs)),
- node_id (Analysis::Mappings::get ().get_next_node_id ()), locus (locus),
- variadic (false)
- {}
-
- NamedFunctionParam (std::string name, std::vector<Attribute> outer_attrs,
- location_t locus)
- : name (std::move (name)), param_type (nullptr),
- outer_attrs (std::move (outer_attrs)),
- node_id (Analysis::Mappings::get ().get_next_node_id ()), locus (locus),
- variadic (true)
- {}
-
- NamedFunctionParam (std::vector<Attribute> outer_attrs, location_t locus)
- : name (""), param_type (nullptr), outer_attrs (std::move (outer_attrs)),
- node_id (Analysis::Mappings::get ().get_next_node_id ()), locus (locus),
- variadic (true)
- {}
-
- // Copy constructor
- NamedFunctionParam (NamedFunctionParam const &other)
- : name (other.name), outer_attrs (other.outer_attrs),
- variadic (other.variadic)
- {
- node_id = other.node_id;
- // guard to prevent null dereference (only required if error state)
- if (other.param_type != nullptr)
- param_type = other.param_type->clone_type ();
- else
- param_type = nullptr;
- }
-
- ~NamedFunctionParam () = default;
-
- // Overloaded assignment operator to clone
- NamedFunctionParam &operator= (NamedFunctionParam const &other)
- {
- node_id = other.node_id;
- name = other.name;
- // has_name = other.has_name;
- outer_attrs = other.outer_attrs;
-
- // guard to prevent null dereference (only required if error state)
- if (other.param_type != nullptr)
- param_type = other.param_type->clone_type ();
- else
- param_type = nullptr;
-
- return *this;
- }
-
- // move constructors
- NamedFunctionParam (NamedFunctionParam &&other) = default;
- NamedFunctionParam &operator= (NamedFunctionParam &&other) = default;
-
- std::string as_string () const;
-
- // Based on idea that nane should never be empty.
- void mark_for_strip () { param_type = nullptr; };
- bool is_marked_for_strip () const { return is_error (); };
-
- // TODO: this mutable getter seems really dodgy. Think up better way.
- std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
- const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
-
- // TODO: is this better? Or is a "vis_block" better?
- Type &get_type ()
- {
- rust_assert (param_type != nullptr);
- return *param_type;
- }
-
- std::unique_ptr<Type> &get_type_ptr ()
- {
- rust_assert (param_type != nullptr);
- return param_type;
- }
-
- NodeId get_node_id () const { return node_id; }
-};
-
-// A function item used in an extern block
-class ExternalFunctionItem : public ExternalItem
-{
- // bool has_outer_attrs;
- std::vector<Attribute> outer_attrs;
-
- // bool has_visibility;
- Visibility visibility;
-
- Identifier item_name;
- location_t locus;
-
- // bool has_generics;
- // Generics generic_params;
- std::vector<std::unique_ptr<GenericParam>> generic_params; // inlined
-
- // bool has_return_type;
- // FunctionReturnType return_type;
- std::unique_ptr<Type> return_type; // inlined
-
- // bool has_where_clause;
- WhereClause where_clause;
-
- std::vector<NamedFunctionParam> function_params;
-
-public:
- // Returns whether item has generic parameters.
- bool has_generics () const { return !generic_params.empty (); }
-
- // Returns whether item has a return type (otherwise void).
- bool has_return_type () const { return return_type != nullptr; }
-
- // Returns whether item has a where clause.
- bool has_where_clause () const { return !where_clause.is_empty (); }
-
- // Returns whether item has outer attributes.
- bool has_outer_attrs () const { return !outer_attrs.empty (); }
-
- // Returns whether item has non-default visibility.
- bool has_visibility () const { return !visibility.is_error (); }
-
- // Returns whether item has variadic parameters.
- bool is_variadic () const
- {
- return function_params.size () != 0
- && function_params.back ().is_variadic ();
- }
-
- location_t get_locus () const { return locus; }
-
- Visibility &get_visibility () { return visibility; }
- const Visibility &get_visibility () const { return visibility; }
-
- ExternalFunctionItem (
- Identifier item_name,
- std::vector<std::unique_ptr<GenericParam>> generic_params,
- std::unique_ptr<Type> return_type, WhereClause where_clause,
- std::vector<NamedFunctionParam> function_params, Visibility vis,
- std::vector<Attribute> outer_attrs, location_t locus)
- : ExternalItem (), outer_attrs (std::move (outer_attrs)),
- visibility (std::move (vis)), item_name (std::move (item_name)),
- locus (locus), generic_params (std::move (generic_params)),
- return_type (std::move (return_type)),
- where_clause (std::move (where_clause)),
- function_params (std::move (function_params))
- {
- // TODO: assert that if has variadic outer attrs, then has_variadics is
- // true?
- }
-
- // Copy constructor with clone
- ExternalFunctionItem (ExternalFunctionItem const &other)
- : ExternalItem (other.get_node_id ()), outer_attrs (other.outer_attrs),
- visibility (other.visibility), item_name (other.item_name),
- locus (other.locus), where_clause (other.where_clause),
- function_params (other.function_params)
- {
- node_id = other.node_id;
- // guard to prevent null pointer dereference
- if (other.return_type != nullptr)
- return_type = other.return_type->clone_type ();
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
- }
-
- // Overloaded assignment operator with clone
- ExternalFunctionItem &operator= (ExternalFunctionItem const &other)
- {
- outer_attrs = other.outer_attrs;
- visibility = other.visibility;
- item_name = other.item_name;
- locus = other.locus;
- where_clause = other.where_clause;
- function_params = other.function_params;
- node_id = other.node_id;
-
- // guard to prevent null pointer dereference
- if (other.return_type != nullptr)
- return_type = other.return_type->clone_type ();
- else
- return_type = nullptr;
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- return *this;
- }
-
- // move constructors
- ExternalFunctionItem (ExternalFunctionItem &&other) = default;
- ExternalFunctionItem &operator= (ExternalFunctionItem &&other) = default;
-
- std::string as_string () const override;
-
- void accept_vis (ASTVisitor &vis) override;
-
- // Based on idea that nane should never be empty.
- void mark_for_strip () override { item_name = {""}; };
- bool is_marked_for_strip () const override { return item_name.empty (); };
-
- // TODO: this mutable getter seems really dodgy. Think up better way.
- std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
- const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
-
- std::vector<NamedFunctionParam> &get_function_params ()
- {
- return function_params;
- }
- const std::vector<NamedFunctionParam> &get_function_params () const
- {
- return function_params;
- }
-
- std::vector<std::unique_ptr<GenericParam>> &get_generic_params ()
- {
- return generic_params;
- }
- const std::vector<std::unique_ptr<GenericParam>> &get_generic_params () const
- {
- return generic_params;
- }
-
- // TODO: is this better? Or is a "vis_block" better?
- WhereClause &get_where_clause () { return where_clause; }
-
- // TODO: is this better? Or is a "vis_block" better?
- Type &get_return_type ()
- {
- rust_assert (has_return_type ());
- return *return_type;
- }
-
- std::unique_ptr<Type> &get_return_type_ptr ()
- {
- rust_assert (has_return_type ());
- return return_type;
- }
-
- Identifier get_identifier () const { return item_name; };
-
-protected:
- /* Use covariance to implement clone function as returning this object
- * rather than base */
- ExternalFunctionItem *clone_external_item_impl () const override
- {
- return new ExternalFunctionItem (*this);
- }
-};
-
// An extern block AST node
class ExternBlock : public VisItem
{
@@ -3917,6 +3689,8 @@ public:
const std::vector<Attribute> &get_inner_attrs () const { return inner_attrs; }
std::vector<Attribute> &get_inner_attrs () { return inner_attrs; }
+ Item::Kind get_item_kind () const override { return Item::Kind::ExternBlock; }
+
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */
diff --git a/gcc/rust/ast/rust-macro.h b/gcc/rust/ast/rust-macro.h
index 76b3b2a..fc01e57 100644
--- a/gcc/rust/ast/rust-macro.h
+++ b/gcc/rust/ast/rust-macro.h
@@ -24,11 +24,11 @@
#include "rust-ast-fragment.h"
#include "rust-location.h"
#include "rust-item.h"
-#include "rust-make-unique.h"
#include "rust-macro-builtins.h"
namespace Rust {
namespace AST {
+
class MacroFragSpec
{
public:
@@ -521,7 +521,7 @@ public:
mbe (Identifier rule_name, DelimType delim_type, std::vector<MacroRule> rules,
std::vector<Attribute> outer_attrs, location_t locus)
{
- return Rust::make_unique<MacroRulesDefinition> (
+ return std::make_unique<MacroRulesDefinition> (
MacroRulesDefinition (rule_name, delim_type, rules, outer_attrs, locus,
AST::MacroRulesDefinition::MacroKind::MBE,
AST::Visibility::create_error ()));
@@ -532,7 +532,7 @@ public:
std::vector<Attribute> outer_attrs, location_t locus,
Visibility vis)
{
- return Rust::make_unique<MacroRulesDefinition> (MacroRulesDefinition (
+ return std::make_unique<MacroRulesDefinition> (MacroRulesDefinition (
rule_name, AST::DelimType::CURLY, rules, outer_attrs, locus,
AST::MacroRulesDefinition::MacroKind::DeclMacro, vis));
}
@@ -572,13 +572,13 @@ public:
is_builtin_rule = true;
}
- AST::Kind get_ast_kind () const override
+ MacroKind get_kind () const { return kind; }
+
+ Item::Kind get_item_kind () const override
{
- return AST::Kind::MACRO_RULES_DEFINITION;
+ return Item::Kind::MacroRulesDefinition;
}
- MacroKind get_kind () const { return kind; }
-
protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
@@ -610,11 +610,6 @@ public:
std::string as_string () const override;
- Pattern::Kind get_pattern_kind () override
- {
- return Pattern::Kind::MacroInvocation;
- }
-
/**
* The default constructor you should use. Whenever we parse a macro call, we
* cannot possibly know whether or not this call refers to a builtin macro or
@@ -677,11 +672,6 @@ public:
return ExprWithoutBlock::get_node_id ();
}
- AST::Kind get_ast_kind () const override
- {
- return AST::Kind::MACRO_INVOCATION;
- }
-
NodeId get_macro_node_id () const { return node_id; }
MacroInvocData &get_invoc_data () { return invoc_data; }
@@ -800,6 +790,21 @@ public:
void add_semicolon () override { is_semi_coloned = true; }
+ Pattern::Kind get_pattern_kind () override
+ {
+ return Pattern::Kind::MacroInvocation;
+ }
+
+ Expr::Kind get_expr_kind () const override
+ {
+ return Expr::Kind::MacroInvocation;
+ }
+
+ Item::Kind get_item_kind () const override
+ {
+ return Item::Kind::MacroInvocation;
+ }
+
protected:
Item *clone_item_impl () const override
{
diff --git a/gcc/rust/ast/rust-path.cc b/gcc/rust/ast/rust-path.cc
index 06c98cd..69627be8 100644
--- a/gcc/rust/ast/rust-path.cc
+++ b/gcc/rust/ast/rust-path.cc
@@ -136,8 +136,11 @@ PathExprSegment::as_string () const
}
std::string
-RegularPath::as_string () const
+Path::as_string () const
{
+ // FIXME: Impl for lang items
+ rust_assert (kind == Kind::Regular);
+
std::string str;
for (const auto &segment : segments)
@@ -149,16 +152,11 @@ RegularPath::as_string () const
return str;
}
-std::string
-LangItemPath::as_string () const
-{
- // FIXME: Handle #[lang] paths
- rust_unreachable ();
-}
-
SimplePath
-RegularPath::convert_to_simple_path (bool with_opening_scope_resolution) const
+Path::convert_to_simple_path (bool with_opening_scope_resolution) const
{
+ rust_assert (kind == Kind::Regular);
+
if (!has_segments ())
return SimplePath::create_empty ();
@@ -192,18 +190,6 @@ RegularPath::convert_to_simple_path (bool with_opening_scope_resolution) const
}
void
-RegularPath::accept_vis (ASTVisitor &vis)
-{
- vis.visit (*this);
-}
-
-void
-LangItemPath::accept_vis (ASTVisitor &vis)
-{
- vis.visit (*this);
-}
-
-void
PathInExpression::accept_vis (ASTVisitor &vis)
{
vis.visit (*this);
@@ -217,7 +203,7 @@ PathInExpression::as_string () const
if (has_opening_scope_resolution)
str = "::";
- return str + path->as_string ();
+ return str + Path::as_string ();
}
std::string
@@ -317,7 +303,7 @@ TypePathFunction::as_string () const
std::string
QualifiedPathInExpression::as_string () const
{
- return path_type.as_string () + "::" + path->as_string ();
+ return path_type.as_string () + "::" + Path::as_string ();
}
std::string
diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h
index 98fde5a..2a76acc 100644
--- a/gcc/rust/ast/rust-path.h
+++ b/gcc/rust/ast/rust-path.h
@@ -21,6 +21,7 @@
/* "Path" (identifier within namespaces, essentially) handling. Required include
* for virtually all AST-related functionality. */
+#include "optional.h"
#include "rust-ast.h"
#include "rust-hir-map.h"
#include "rust-mapping-common.h"
@@ -55,10 +56,16 @@ public:
location_t get_locus () const { return locus; }
- bool is_super_segment () const { return as_string ().compare ("super") == 0; }
- bool is_crate_segment () const { return as_string ().compare ("crate") == 0; }
- bool is_lower_self () const { return as_string ().compare ("self") == 0; }
- bool is_big_self () const { return as_string ().compare ("Self") == 0; }
+ bool is_super_path_seg () const
+ {
+ return as_string ().compare ("super") == 0;
+ }
+ bool is_crate_path_seg () const
+ {
+ return as_string ().compare ("crate") == 0;
+ }
+ bool is_lower_self_seg () const { return as_string ().compare ("self") == 0; }
+ bool is_big_self_seg () const { return as_string ().compare ("Self") == 0; }
};
// A binding of an identifier to a type used in generic arguments in paths
@@ -560,17 +567,17 @@ public:
bool is_super_path_seg () const
{
- return !has_generic_args () && get_ident_segment ().is_super_segment ();
+ return !has_generic_args () && get_ident_segment ().is_super_path_seg ();
}
bool is_crate_path_seg () const
{
- return !has_generic_args () && get_ident_segment ().is_crate_segment ();
+ return !has_generic_args () && get_ident_segment ().is_crate_path_seg ();
}
bool is_lower_self_seg () const
{
- return !has_generic_args () && get_ident_segment ().is_lower_self ();
+ return !has_generic_args () && get_ident_segment ().is_lower_self_seg ();
}
};
@@ -585,104 +592,73 @@ public:
Regular,
};
- virtual Kind get_path_kind () const = 0;
-
- Pattern::Kind get_pattern_kind () override final
- {
- return Pattern::Kind::Path;
- }
-
- location_t get_locus () const override final { return locus; }
- NodeId get_node_id () const override final { return node_id; }
-
- std::unique_ptr<Path> clone_path ()
- {
- return std::unique_ptr<Path> (clone_path_impl ());
- }
-
- Pattern *clone_pattern_impl () const override final
- {
- return clone_path_impl ();
- }
-
-protected:
- location_t locus;
- NodeId node_id;
-
- Path (location_t locus, NodeId node_id) : locus (locus), node_id (node_id) {}
-
- virtual Path *clone_path_impl () const = 0;
-};
-
-class RegularPath : public Path
-{
- std::vector<PathExprSegment> segments;
-
-public:
- explicit RegularPath (std::vector<PathExprSegment> &&segments,
- location_t locus, NodeId node_id)
- : Path (locus, node_id), segments (std::move (segments))
+ Path (std::vector<PathExprSegment> segments)
+ : segments (std::move (segments)), lang_item (tl::nullopt),
+ kind (Kind::Regular)
{}
- std::string as_string () const override;
+ Path (LangItem::Kind lang_item)
+ : segments ({}), lang_item (lang_item), kind (Kind::LangItem)
+ {}
// Returns whether path has segments.
- bool has_segments () const { return !segments.empty (); }
-
- std::vector<PathExprSegment> &get_segments () { return segments; }
-
- const std::vector<PathExprSegment> &get_segments () const { return segments; }
-
- /* Returns whether the path is a single segment (excluding qualified path
- * initial as segment). */
- bool is_single_segment () const { return segments.size () == 1; }
+ bool has_segments () const
+ {
+ rust_assert (kind == Kind::Regular);
+ return !segments.empty ();
+ }
/* Converts path segments to their equivalent SimplePath segments if
* possible, and creates a SimplePath from them. */
SimplePath convert_to_simple_path (bool with_opening_scope_resolution) const;
- Path::Kind get_path_kind () const override { return Path::Kind::Regular; }
-
- void accept_vis (ASTVisitor &vis) override;
-
- Path *clone_path_impl () const override
+ /* Returns whether the path is a single segment (excluding qualified path
+ * initial as segment). */
+ bool is_single_segment () const
{
- return new RegularPath (std::vector<PathExprSegment> (segments), locus,
- node_id);
+ rust_assert (kind == Kind::Regular);
+ return segments.size () == 1;
}
-};
-class LangItemPath : public Path
-{
- NodeId lang_item;
- // TODO: Add LangItemKind or w/ever here as well
-
- // TODO: This constructor is wrong
- explicit LangItemPath (NodeId lang_item, location_t locus)
- : Path (locus, lang_item), lang_item (lang_item)
- {}
-
- Path::Kind get_path_kind () const override { return Path::Kind::LangItem; }
+ std::string as_string () const override;
- void accept_vis (ASTVisitor &vis) override;
+ // TODO: this seems kinda dodgy
+ std::vector<PathExprSegment> &get_segments ()
+ {
+ rust_assert (kind == Kind::Regular);
+ return segments;
+ }
+ const std::vector<PathExprSegment> &get_segments () const
+ {
+ rust_assert (kind == Kind::Regular);
+ return segments;
+ }
- Path *clone_path_impl () const override
+ LangItem::Kind get_lang_item () const
{
- return new LangItemPath (lang_item, locus);
+ rust_assert (kind == Kind::LangItem);
+ return *lang_item;
}
- std::string as_string () const override;
+ Pattern::Kind get_pattern_kind () override { return Pattern::Kind::Path; }
+ Path::Kind get_path_kind () { return kind; }
+
+protected:
+ std::vector<PathExprSegment> segments;
+ tl::optional<LangItem::Kind> lang_item;
+
+ Path::Kind kind;
};
/* AST node representing a path-in-expression pattern (path that allows
* generic arguments) */
-class PathInExpression : public Pattern, public ExprWithoutBlock
+class PathInExpression : public Path, public ExprWithoutBlock
{
std::vector<Attribute> outer_attrs;
bool has_opening_scope_resolution;
location_t locus;
NodeId _node_id;
- std::unique_ptr<Path> path;
+
bool marked_for_strip;
public:
@@ -692,61 +668,41 @@ public:
PathInExpression (std::vector<PathExprSegment> path_segments,
std::vector<Attribute> outer_attrs, location_t locus,
bool has_opening_scope_resolution = false)
- : outer_attrs (std::move (outer_attrs)),
+ : Path (std::move (path_segments)), outer_attrs (std::move (outer_attrs)),
has_opening_scope_resolution (has_opening_scope_resolution),
locus (locus), _node_id (Analysis::Mappings::get ().get_next_node_id ()),
- path (Rust::make_unique<RegularPath> (std::move (path_segments), locus,
- _node_id)),
marked_for_strip (false)
{}
- PathInExpression (const PathInExpression &other)
- : outer_attrs (other.outer_attrs),
- has_opening_scope_resolution (other.has_opening_scope_resolution),
- locus (other.locus), _node_id (other._node_id),
- path (other.path->clone_path ()),
- marked_for_strip (other.marked_for_strip)
+ PathInExpression (LangItem::Kind lang_item,
+ std::vector<Attribute> outer_attrs, location_t locus)
+ : Path (lang_item), outer_attrs (std::move (outer_attrs)),
+ has_opening_scope_resolution (false), locus (locus),
+ _node_id (Analysis::Mappings::get ().get_next_node_id ()),
+ marked_for_strip (false)
{}
- PathInExpression &operator= (const PathInExpression &other)
- {
- outer_attrs = other.outer_attrs;
- has_opening_scope_resolution = other.has_opening_scope_resolution;
- locus = other.locus;
- _node_id = other._node_id;
- path = other.path->clone_path ();
- marked_for_strip = other.marked_for_strip;
-
- return *this;
- }
-
// Creates an error state path in expression.
static PathInExpression create_error ()
{
- return PathInExpression ({}, {}, UNDEF_LOCATION);
+ return PathInExpression (std::vector<PathExprSegment> (), {},
+ UNDEF_LOCATION);
}
// Returns whether path in expression is in an error state.
- bool is_error () const
- {
- // FIXME: Cleanup
- if (path->get_path_kind () == Path::Kind::Regular)
- return !static_cast<RegularPath &> (*path).has_segments ();
-
- return false;
- }
+ bool is_error () const { return !has_segments (); }
/* Converts PathInExpression to SimplePath if possible (i.e. no generic
* arguments). Otherwise returns an empty SimplePath. */
SimplePath as_simple_path () const
{
- // FIXME: Cleanup
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).convert_to_simple_path (
- has_opening_scope_resolution);
- else
- // FIXME: lang item to simple path?
- rust_unreachable ();
+ /* delegate to parent class as can't access segments. however,
+ * QualifiedPathInExpression conversion to simple path wouldn't make
+ * sense, so the method in the parent class should be protected, not
+ * public. Have to pass in opening scope resolution as parent class has no
+ * access to it.
+ */
+ return convert_to_simple_path (has_opening_scope_resolution);
}
location_t get_locus () const override final { return locus; }
@@ -773,61 +729,18 @@ public:
NodeId get_pattern_node_id () const { return get_node_id (); }
- PathExprSegment &get_final_segment ()
- {
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).get_segments ().back ();
-
- // lang item segment?
- rust_unreachable ();
- }
-
+ PathExprSegment &get_final_segment () { return get_segments ().back (); }
const PathExprSegment &get_final_segment () const
{
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).get_segments ().back ();
-
- // lang item segment?
- rust_unreachable ();
- }
-
- const std::vector<PathExprSegment> &get_segments () const
- {
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).get_segments ();
-
- rust_unreachable ();
- }
-
- std::vector<PathExprSegment> &get_segments ()
- {
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).get_segments ();
-
- rust_unreachable ();
+ return get_segments ().back ();
}
- bool is_single_segment () const
+ Expr::Kind get_expr_kind () const override
{
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).get_segments ().size () == 1;
-
- return false;
+ return Expr::Kind::PathInExpression;
}
- Pattern::Kind get_pattern_kind () override { return Pattern::Kind::Path; }
-
protected:
- PathInExpression (std::vector<Attribute> &&outer_attrs,
- bool has_opening_scope_resolution, location_t locus,
- NodeId node_id, std::unique_ptr<Path> &&path,
- bool marked_for_strip)
- : outer_attrs (std::move (outer_attrs)),
- has_opening_scope_resolution (has_opening_scope_resolution),
- locus (locus), _node_id (node_id), path (std::move (path)),
- marked_for_strip (marked_for_strip)
- {}
-
/* Use covariance to implement clone function as returning this object
* rather than base */
PathInExpression *clone_pattern_impl () const final override
@@ -861,7 +774,8 @@ public:
};
private:
- PathIdentSegment ident_segment;
+ tl::optional<LangItem::Kind> lang_item;
+ tl::optional<PathIdentSegment> ident_segment;
location_t locus;
protected:
@@ -891,21 +805,30 @@ public:
TypePathSegment (PathIdentSegment ident_segment,
bool has_separating_scope_resolution, location_t locus)
- : ident_segment (std::move (ident_segment)), locus (locus),
+ : lang_item (tl::nullopt), ident_segment (std::move (ident_segment)),
+ locus (locus),
has_separating_scope_resolution (has_separating_scope_resolution),
node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
+ TypePathSegment (LangItem::Kind lang_item, location_t locus)
+ : lang_item (lang_item), ident_segment (tl::nullopt), locus (locus),
+ has_separating_scope_resolution (false),
+ node_id (Analysis::Mappings::get ().get_next_node_id ())
+ {}
+
TypePathSegment (std::string segment_name,
bool has_separating_scope_resolution, location_t locus)
- : ident_segment (PathIdentSegment (std::move (segment_name), locus)),
+ : lang_item (tl::nullopt),
+ ident_segment (PathIdentSegment (std::move (segment_name), locus)),
locus (locus),
has_separating_scope_resolution (has_separating_scope_resolution),
node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
TypePathSegment (TypePathSegment const &other)
- : ident_segment (other.ident_segment), locus (other.locus),
+ : lang_item (other.lang_item), ident_segment (other.ident_segment),
+ locus (other.locus),
has_separating_scope_resolution (other.has_separating_scope_resolution),
node_id (other.node_id)
{}
@@ -913,6 +836,7 @@ public:
TypePathSegment &operator= (TypePathSegment const &other)
{
ident_segment = other.ident_segment;
+ lang_item = other.lang_item;
locus = other.locus;
has_separating_scope_resolution = other.has_separating_scope_resolution;
node_id = other.node_id;
@@ -923,16 +847,28 @@ public:
TypePathSegment (TypePathSegment &&other) = default;
TypePathSegment &operator= (TypePathSegment &&other) = default;
- virtual std::string as_string () const { return ident_segment.as_string (); }
+ virtual std::string as_string () const
+ {
+ if (lang_item.has_value ())
+ return LangItem::PrettyString (*lang_item);
+
+ return ident_segment->as_string ();
+ }
/* Returns whether the type path segment is in an error state. May be
* virtual in future. */
- bool is_error () const { return ident_segment.is_error (); }
+ bool is_error () const
+ {
+ rust_assert (ident_segment);
+ return ident_segment->is_error ();
+ }
/* Returns whether segment is identifier only (as opposed to generic args or
* function). Overridden in derived classes with other segments. */
virtual bool is_ident_only () const { return true; }
+ bool is_lang_item () const { return lang_item.has_value (); }
+
location_t get_locus () const { return locus; }
// not pure virtual as class not abstract
@@ -943,23 +879,41 @@ public:
return has_separating_scope_resolution;
}
- PathIdentSegment &get_ident_segment () { return ident_segment; };
- const PathIdentSegment &get_ident_segment () const { return ident_segment; };
+ PathIdentSegment &get_ident_segment ()
+ {
+ rust_assert (!is_lang_item ());
+ return *ident_segment;
+ };
+
+ const PathIdentSegment &get_ident_segment () const
+ {
+ rust_assert (!is_lang_item ());
+ return *ident_segment;
+ };
+
+ LangItem::Kind get_lang_item () const
+ {
+ rust_assert (is_lang_item ());
+ return *lang_item;
+ }
NodeId get_node_id () const { return node_id; }
bool is_crate_path_seg () const
{
- return get_ident_segment ().is_crate_segment ();
+ return get_ident_segment ().is_crate_path_seg ();
}
bool is_super_path_seg () const
{
- return get_ident_segment ().is_super_segment ();
+ return get_ident_segment ().is_super_path_seg ();
+ }
+ bool is_big_self_seg () const
+ {
+ return get_ident_segment ().is_big_self_seg ();
}
- bool is_big_self_seg () const { return get_ident_segment ().is_big_self (); }
bool is_lower_self_seg () const
{
- return get_ident_segment ().is_lower_self ();
+ return get_ident_segment ().is_lower_self_seg ();
}
};
@@ -984,6 +938,12 @@ public:
generic_args (std::move (generic_args))
{}
+ TypePathSegmentGeneric (LangItem::Kind lang_item, GenericArgs generic_args,
+ location_t locus)
+ : TypePathSegment (lang_item, locus),
+ generic_args (std::move (generic_args))
+ {}
+
// Constructor from segment name and all args
TypePathSegmentGeneric (std::string segment_name,
bool has_separating_scope_resolution,
@@ -1041,7 +1001,7 @@ private:
/*bool has_inputs;
TypePathFnInputs inputs;*/
// inlined from TypePathFnInputs
- std::vector<std::unique_ptr<Type> > inputs;
+ std::vector<std::unique_ptr<Type>> inputs;
// bool has_type;
std::unique_ptr<Type> return_type;
@@ -1074,8 +1034,8 @@ public:
}
// Constructor
- TypePathFunction (std::vector<std::unique_ptr<Type> > inputs,
- location_t locus, std::unique_ptr<Type> type = nullptr)
+ TypePathFunction (std::vector<std::unique_ptr<Type>> inputs, location_t locus,
+ std::unique_ptr<Type> type = nullptr)
: inputs (std::move (inputs)), return_type (std::move (type)),
is_invalid (false), locus (locus)
{}
@@ -1120,11 +1080,11 @@ public:
std::string as_string () const;
// TODO: this mutable getter seems really dodgy. Think up better way.
- const std::vector<std::unique_ptr<Type> > &get_params () const
+ const std::vector<std::unique_ptr<Type>> &get_params () const
{
return inputs;
}
- std::vector<std::unique_ptr<Type> > &get_params () { return inputs; }
+ std::vector<std::unique_ptr<Type>> &get_params () { return inputs; }
// TODO: is this better? Or is a "vis_pattern" better?
Type &get_return_type ()
@@ -1188,11 +1148,10 @@ public:
}
};
-// Path used inside types
class TypePath : public TypeNoBounds
{
bool has_opening_scope_resolution;
- std::vector<std::unique_ptr<TypePathSegment> > segments;
+ std::vector<std::unique_ptr<TypePathSegment>> segments;
location_t locus;
protected:
@@ -1217,12 +1176,20 @@ public:
// Creates an error state TypePath.
static TypePath create_error ()
{
- return TypePath (std::vector<std::unique_ptr<TypePathSegment> > (),
+ return TypePath (std::vector<std::unique_ptr<TypePathSegment>> (),
UNDEF_LOCATION);
}
// Constructor
- TypePath (std::vector<std::unique_ptr<TypePathSegment> > segments,
+ TypePath (std::vector<std::unique_ptr<TypePathSegment>> segments,
+ location_t locus, bool has_opening_scope_resolution = false)
+ : TypeNoBounds (),
+ has_opening_scope_resolution (has_opening_scope_resolution),
+ segments (std::move (segments)), locus (locus)
+ {}
+
+ TypePath (LangItem::Kind lang_item,
+ std::vector<std::unique_ptr<TypePathSegment>> segments,
location_t locus, bool has_opening_scope_resolution = false)
: TypeNoBounds (),
has_opening_scope_resolution (has_opening_scope_resolution),
@@ -1268,15 +1235,19 @@ public:
TraitBound *to_trait_bound (bool in_parens) const override;
location_t get_locus () const override final { return locus; }
+ NodeId get_node_id () const { return node_id; }
+
+ void mark_for_strip () override {}
+ bool is_marked_for_strip () const override { return false; }
void accept_vis (ASTVisitor &vis) override;
// TODO: this seems kinda dodgy
- std::vector<std::unique_ptr<TypePathSegment> > &get_segments ()
+ std::vector<std::unique_ptr<TypePathSegment>> &get_segments ()
{
return segments;
}
- const std::vector<std::unique_ptr<TypePathSegment> > &get_segments () const
+ const std::vector<std::unique_ptr<TypePathSegment>> &get_segments () const
{
return segments;
}
@@ -1297,9 +1268,8 @@ public:
QualifiedPathType (std::unique_ptr<Type> invoke_on_type,
location_t locus = UNDEF_LOCATION,
TypePath trait_path = TypePath::create_error ())
- : type_to_invoke_on (std::move (invoke_on_type)),
- trait_path (std::move (trait_path)), locus (locus),
- node_id (Analysis::Mappings::get ().get_next_node_id ())
+ : type_to_invoke_on (std::move (invoke_on_type)), trait_path (trait_path),
+ locus (locus), node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
// Copy constructor uses custom deep copy for Type to preserve polymorphism
@@ -1376,12 +1346,12 @@ public:
/* AST node representing a qualified path-in-expression pattern (path that
* allows specifying trait functions) */
-class QualifiedPathInExpression : public Pattern, public ExprWithoutBlock
+class QualifiedPathInExpression : public Path, public ExprWithoutBlock
{
std::vector<Attribute> outer_attrs;
QualifiedPathType path_type;
-
- std::unique_ptr<Path> path;
+ location_t locus;
+ NodeId _node_id;
public:
std::string as_string () const override;
@@ -1390,16 +1360,9 @@ public:
std::vector<PathExprSegment> path_segments,
std::vector<Attribute> outer_attrs,
location_t locus)
- : outer_attrs (std::move (outer_attrs)),
- path_type (std::move (qual_path_type)),
- path (Rust::make_unique<RegularPath> (
- std::move (path_segments), locus,
- Analysis::Mappings::get ().get_next_node_id ()))
- {}
-
- QualifiedPathInExpression (const QualifiedPathInExpression &other)
- : outer_attrs (other.outer_attrs), path_type (other.path_type),
- path (other.path->clone_path ())
+ : Path (std::move (path_segments)), outer_attrs (std::move (outer_attrs)),
+ path_type (std::move (qual_path_type)), locus (locus),
+ _node_id (Analysis::Mappings::get ().get_next_node_id ())
{}
/* TODO: maybe make a shortcut constructor that has QualifiedPathType
@@ -1415,9 +1378,7 @@ public:
{}, UNDEF_LOCATION);
}
- Pattern::Kind get_pattern_kind () override { return Pattern::Kind::Path; }
-
- location_t get_locus () const override final { return path->get_locus (); }
+ location_t get_locus () const override final { return locus; }
void accept_vis (ASTVisitor &vis) override;
@@ -1443,30 +1404,11 @@ public:
outer_attrs = std::move (new_attrs);
}
- NodeId get_node_id () const override { return path->get_node_id (); }
-
- const std::vector<PathExprSegment> &get_segments () const
- {
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).get_segments ();
-
- rust_unreachable ();
- }
-
- std::vector<PathExprSegment> &get_segments ()
- {
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).get_segments ();
-
- rust_unreachable ();
- }
+ NodeId get_node_id () const override { return _node_id; }
- bool is_single_segment () const
+ Expr::Kind get_expr_kind () const override
{
- if (path->get_path_kind () == Path::Kind::Regular)
- return static_cast<RegularPath &> (*path).get_segments ().size () == 1;
-
- return false;
+ return Expr::Kind::QualifiedPathInExpression;
}
protected:
@@ -1498,7 +1440,7 @@ class QualifiedPathInType : public TypeNoBounds
{
QualifiedPathType path_type;
std::unique_ptr<TypePathSegment> associated_segment;
- std::vector<std::unique_ptr<TypePathSegment> > segments;
+ std::vector<std::unique_ptr<TypePathSegment>> segments;
location_t locus;
protected:
@@ -1513,7 +1455,7 @@ public:
QualifiedPathInType (
QualifiedPathType qual_path_type,
std::unique_ptr<TypePathSegment> associated_segment,
- std::vector<std::unique_ptr<TypePathSegment> > path_segments,
+ std::vector<std::unique_ptr<TypePathSegment>> path_segments,
location_t locus)
: path_type (std::move (qual_path_type)),
associated_segment (std::move (associated_segment)),
@@ -1560,7 +1502,7 @@ public:
{
return QualifiedPathInType (
QualifiedPathType::create_error (), nullptr,
- std::vector<std::unique_ptr<TypePathSegment> > (), UNDEF_LOCATION);
+ std::vector<std::unique_ptr<TypePathSegment>> (), UNDEF_LOCATION);
}
std::string as_string () const override;
@@ -1580,11 +1522,11 @@ public:
}
// TODO: this seems kinda dodgy
- std::vector<std::unique_ptr<TypePathSegment> > &get_segments ()
+ std::vector<std::unique_ptr<TypePathSegment>> &get_segments ()
{
return segments;
}
- const std::vector<std::unique_ptr<TypePathSegment> > &get_segments () const
+ const std::vector<std::unique_ptr<TypePathSegment>> &get_segments () const
{
return segments;
}
diff --git a/gcc/rust/ast/rust-stmt.h b/gcc/rust/ast/rust-stmt.h
index e8aec34..6cbecaf 100644
--- a/gcc/rust/ast/rust-stmt.h
+++ b/gcc/rust/ast/rust-stmt.h
@@ -22,7 +22,7 @@
#include "rust-ast.h"
#include "rust-path.h"
#include "rust-expr.h"
-#include <memory>
+#include "rust-system.h"
namespace Rust {
namespace AST {
diff --git a/gcc/rust/backend/rust-compile-asm.cc b/gcc/rust/backend/rust-compile-asm.cc
index e85d08d..22498bc 100644
--- a/gcc/rust/backend/rust-compile-asm.cc
+++ b/gcc/rust/backend/rust-compile-asm.cc
@@ -3,9 +3,8 @@
namespace Rust {
namespace Compile {
-CompileAsm::CompileAsm (Context *ctx)
- : HIRCompileBase (ctx), translated (error_mark_node)
-{}
+CompileAsm::CompileAsm (Context *ctx) : HIRCompileBase (ctx) {}
+
tree
CompileAsm::tree_codegen_asm (HIR::InlineAsm &expr)
{
@@ -86,7 +85,7 @@ CompileAsm::asm_construct_outputs (HIR::InlineAsm &expr)
{
auto out = output.get_out ();
- tree out_tree = CompileExpr::Compile (out.expr.get (), this->ctx);
+ tree out_tree = CompileExpr::Compile (*out.expr, this->ctx);
// expects a tree list
// TODO: This assumes that the output is a register
std::string expr_name = "=r";
@@ -113,7 +112,7 @@ CompileAsm::asm_construct_inputs (HIR::InlineAsm &expr)
{
auto in = input.get_in ();
- tree in_tree = CompileExpr::Compile (in.expr.get (), this->ctx);
+ tree in_tree = CompileExpr::Compile (*in.expr, this->ctx);
// expects a tree list
// TODO: This assumes that the input is a register
std::string expr_name = "r";
diff --git a/gcc/rust/backend/rust-compile-asm.h b/gcc/rust/backend/rust-compile-asm.h
index 402d950..4abd24e 100644
--- a/gcc/rust/backend/rust-compile-asm.h
+++ b/gcc/rust/backend/rust-compile-asm.h
@@ -28,8 +28,6 @@ namespace Compile {
class CompileAsm : private HIRCompileBase
{
private:
- tree translated;
-
// RELEVANT MEMBER FUNCTIONS
// The limit is 5 because it stands for the 5 things that the C version of
diff --git a/gcc/rust/backend/rust-compile-base.cc b/gcc/rust/backend/rust-compile-base.cc
index 8166c3a..bcc7fc4 100644
--- a/gcc/rust/backend/rust-compile-base.cc
+++ b/gcc/rust/backend/rust-compile-base.cc
@@ -25,7 +25,8 @@
#include "rust-compile-type.h"
#include "rust-constexpr.h"
#include "rust-diagnostics.h"
-#include "rust-expr.h" // for AST::AttrInputLiteral
+#include "rust-expr.h" // for AST::AttrInputLiteral
+#include "rust-hir-map.h"
#include "rust-macro.h" // for AST::MetaNameValueStr
#include "rust-hir-path-probe.h"
#include "rust-type-util.h"
@@ -39,6 +40,9 @@
#include "tree.h"
#include "print-tree.h"
+// rust-name-resolution-2.0
+#include "options.h"
+
namespace Rust {
namespace Compile {
@@ -582,8 +586,9 @@ HIRCompileBase::compile_function_body (tree fndecl,
if (function_body.has_expr ())
{
- location_t locus = function_body.get_final_expr ()->get_locus ();
- tree return_value = CompileExpr::Compile (function_body.expr.get (), ctx);
+ location_t locus = function_body.get_final_expr ().get_locus ();
+ tree return_value
+ = CompileExpr::Compile (function_body.get_final_expr (), ctx);
// we can only return this if non unit value return type
if (!fn_return_ty->is_unit ())
@@ -666,6 +671,11 @@ HIRCompileBase::compile_function (
}
std::string asm_name = fn_name;
+ auto &mappings = Analysis::Mappings::get ();
+
+ if (flag_name_resolution_2_0)
+ ir_symbol_name = mappings.get_current_crate_name () + "::" + ir_symbol_name;
+
unsigned int flags = 0;
tree fndecl = Backend::function (compiled_fn_type, ir_symbol_name,
"" /* asm_name */, flags, locus);
@@ -709,18 +719,18 @@ HIRCompileBase::compile_function (
size_t i = is_method ? 1 : 0;
for (auto &referenced_param : function_params)
{
- auto tyty_param = fntype->param_at (i++);
- auto param_tyty = tyty_param.second;
+ auto &tyty_param = fntype->param_at (i++);
+ auto param_tyty = tyty_param.get_type ();
auto compiled_param_type = TyTyResolveCompile::compile (ctx, param_tyty);
location_t param_locus = referenced_param.get_locus ();
Bvariable *compiled_param_var
- = CompileFnParam::compile (ctx, fndecl, &referenced_param,
+ = CompileFnParam::compile (ctx, fndecl, referenced_param,
compiled_param_type, param_locus);
param_vars.push_back (compiled_param_var);
- const HIR::Pattern &param_pattern = *referenced_param.get_param_name ();
+ const HIR::Pattern &param_pattern = referenced_param.get_param_name ();
ctx->insert_var_decl (param_pattern.get_mappings ().get_hirid (),
compiled_param_var);
}
@@ -767,15 +777,20 @@ HIRCompileBase::compile_function (
tree
HIRCompileBase::compile_constant_item (
- TyTy::BaseType *resolved_type, const Resolver::CanonicalPath &canonical_path,
- HIR::Expr *const_value_expr, location_t locus)
+ HirId coercion_id, TyTy::BaseType *resolved_type,
+ TyTy::BaseType *expected_type, const Resolver::CanonicalPath &canonical_path,
+ HIR::Expr &const_value_expr, location_t locus, location_t expr_locus)
{
const std::string &ident = canonical_path.get ();
tree type = TyTyResolveCompile::compile (ctx, resolved_type);
tree const_type = build_qualified_type (type, TYPE_QUAL_CONST);
+
+ tree actual_type = TyTyResolveCompile::compile (ctx, expected_type);
+ tree actual_const_type = build_qualified_type (actual_type, TYPE_QUAL_CONST);
+
bool is_block_expr
- = const_value_expr->get_expression_type () == HIR::Expr::ExprType::Block;
+ = const_value_expr.get_expression_type () == HIR::Expr::ExprType::Block;
// in order to compile a block expr we want to reuse as much existing
// machineary that we already have. This means the best approach is to
@@ -789,14 +804,14 @@ HIRCompileBase::compile_constant_item (
TREE_READONLY (fndecl) = 1;
tree enclosing_scope = NULL_TREE;
- location_t start_location = const_value_expr->get_locus ();
- location_t end_location = const_value_expr->get_locus ();
+ location_t start_location = const_value_expr.get_locus ();
+ location_t end_location = const_value_expr.get_locus ();
if (is_block_expr)
{
- HIR::BlockExpr *function_body
- = static_cast<HIR::BlockExpr *> (const_value_expr);
- start_location = function_body->get_locus ();
- end_location = function_body->get_end_locus ();
+ HIR::BlockExpr &function_body
+ = static_cast<HIR::BlockExpr &> (const_value_expr);
+ start_location = function_body.get_locus ();
+ end_location = function_body.get_end_locus ();
}
tree code_block = Backend::block (fndecl, enclosing_scope, {} /*locals*/,
@@ -814,9 +829,9 @@ HIRCompileBase::compile_constant_item (
if (is_block_expr)
{
- HIR::BlockExpr *function_body
- = static_cast<HIR::BlockExpr *> (const_value_expr);
- compile_function_body (fndecl, *function_body, resolved_type);
+ HIR::BlockExpr &function_body
+ = static_cast<HIR::BlockExpr &> (const_value_expr);
+ compile_function_body (fndecl, function_body, resolved_type);
}
else
{
@@ -824,7 +839,7 @@ HIRCompileBase::compile_constant_item (
tree return_expr
= Backend::return_statement (fndecl, value,
- const_value_expr->get_locus ());
+ const_value_expr.get_locus ());
ctx->add_statement (return_expr);
}
@@ -841,7 +856,11 @@ HIRCompileBase::compile_constant_item (
tree call = build_call_array_loc (locus, const_type, fndecl, 0, NULL);
tree folded_expr = fold_expr (call);
- return named_constant_expression (const_type, ident, folded_expr, locus);
+ // coercion site
+ tree coerced = coercion_site (coercion_id, folded_expr, resolved_type,
+ expected_type, locus, expr_locus);
+
+ return named_constant_expression (actual_const_type, ident, coerced, locus);
}
tree
diff --git a/gcc/rust/backend/rust-compile-base.h b/gcc/rust/backend/rust-compile-base.h
index eeb3ff0..9328a7f 100644
--- a/gcc/rust/backend/rust-compile-base.h
+++ b/gcc/rust/backend/rust-compile-base.h
@@ -90,9 +90,11 @@ protected:
void compile_function_body (tree fndecl, HIR::BlockExpr &function_body,
TyTy::BaseType *fn_return_ty);
- tree compile_constant_item (TyTy::BaseType *resolved_type,
+ tree compile_constant_item (HirId coercion_id, TyTy::BaseType *resolved_type,
+ TyTy::BaseType *expected_type,
const Resolver::CanonicalPath &canonical_path,
- HIR::Expr *const_value_expr, location_t locus);
+ HIR::Expr &const_value_expr, location_t locus,
+ location_t expr_locus);
tree compile_function (const std::string &fn_name, HIR::SelfParam &self_param,
std::vector<HIR::FunctionParam> &function_params,
diff --git a/gcc/rust/backend/rust-compile-block.cc b/gcc/rust/backend/rust-compile-block.cc
index eb8af2a..f844a27 100644
--- a/gcc/rust/backend/rust-compile-block.cc
+++ b/gcc/rust/backend/rust-compile-block.cc
@@ -28,10 +28,10 @@ CompileBlock::CompileBlock (Context *ctx, Bvariable *result)
{}
tree
-CompileBlock::compile (HIR::BlockExpr *expr, Context *ctx, Bvariable *result)
+CompileBlock::compile (HIR::BlockExpr &expr, Context *ctx, Bvariable *result)
{
CompileBlock compiler (ctx, result);
- compiler.visit (*expr);
+ compiler.visit (expr);
return compiler.translated;
}
@@ -60,10 +60,10 @@ CompileBlock::visit (HIR::BlockExpr &expr)
if (expr.has_expr ())
{
- tree compiled_expr = CompileExpr::Compile (expr.expr.get (), ctx);
+ tree compiled_expr = CompileExpr::Compile (expr.get_final_expr (), ctx);
if (result != nullptr)
{
- location_t locus = expr.get_final_expr ()->get_locus ();
+ location_t locus = expr.get_final_expr ().get_locus ();
tree result_reference = Backend::var_expression (result, locus);
tree assignment
@@ -93,10 +93,8 @@ CompileConditionalBlocks::visit (HIR::IfExpr &expr)
{
fncontext fnctx = ctx->peek_fn ();
tree fndecl = fnctx.fndecl;
- tree condition_expr
- = CompileExpr::Compile (expr.get_if_condition ().get (), ctx);
- tree then_block
- = CompileBlock::compile (expr.get_if_block ().get (), ctx, result);
+ tree condition_expr = CompileExpr::Compile (expr.get_if_condition (), ctx);
+ tree then_block = CompileBlock::compile (expr.get_if_block (), ctx, result);
translated = Backend::if_statement (fndecl, condition_expr, then_block, NULL,
expr.get_locus ());
@@ -107,23 +105,20 @@ CompileConditionalBlocks::visit (HIR::IfExprConseqElse &expr)
{
fncontext fnctx = ctx->peek_fn ();
tree fndecl = fnctx.fndecl;
- tree condition_expr
- = CompileExpr::Compile (expr.get_if_condition ().get (), ctx);
- tree then_block
- = CompileBlock::compile (expr.get_if_block ().get (), ctx, result);
+ tree condition_expr = CompileExpr::Compile (expr.get_if_condition (), ctx);
+ tree then_block = CompileBlock::compile (expr.get_if_block (), ctx, result);
// else block
std::vector<Bvariable *> locals;
- location_t start_location = expr.get_else_block ()->get_locus ();
- location_t end_location = expr.get_else_block ()->get_locus (); // FIXME
+ location_t start_location = expr.get_else_block ().get_locus ();
+ location_t end_location = expr.get_else_block ().get_locus (); // FIXME
tree enclosing_scope = ctx->peek_enclosing_scope ();
tree else_block = Backend::block (fndecl, enclosing_scope, locals,
start_location, end_location);
ctx->push_block (else_block);
tree else_stmt_decl
- = CompileExprWithBlock::compile (expr.get_else_block ().get (), ctx,
- result);
+ = CompileExprWithBlock::compile (&expr.get_else_block (), ctx, result);
ctx->add_statement (else_stmt_decl);
diff --git a/gcc/rust/backend/rust-compile-block.h b/gcc/rust/backend/rust-compile-block.h
index d226b4b..37e3980 100644
--- a/gcc/rust/backend/rust-compile-block.h
+++ b/gcc/rust/backend/rust-compile-block.h
@@ -28,7 +28,7 @@ namespace Compile {
class CompileBlock : private HIRCompileBase
{
public:
- static tree compile (HIR::BlockExpr *expr, Context *ctx, Bvariable *result);
+ static tree compile (HIR::BlockExpr &expr, Context *ctx, Bvariable *result);
protected:
void visit (HIR::BlockExpr &expr);
@@ -96,8 +96,6 @@ public:
void visit (HIR::LoopExpr &) override {}
void visit (HIR::WhileLoopExpr &) override {}
void visit (HIR::WhileLetLoopExpr &) override {}
- void visit (HIR::IfLetExpr &) override {}
- void visit (HIR::IfLetExprConseqElse &) override {}
void visit (HIR::MatchExpr &) override {}
void visit (HIR::AwaitExpr &) override {}
void visit (HIR::AsyncBlockExpr &) override {}
@@ -136,7 +134,7 @@ public:
void visit (HIR::BlockExpr &expr) override
{
- translated = CompileBlock::compile (&expr, ctx, result);
+ translated = CompileBlock::compile (expr, ctx, result);
}
// Empty visit for unused Expression HIR nodes.
@@ -180,8 +178,6 @@ public:
void visit (HIR::LoopExpr &) override {}
void visit (HIR::WhileLoopExpr &) override {}
void visit (HIR::WhileLetLoopExpr &) override {}
- void visit (HIR::IfLetExpr &) override {}
- void visit (HIR::IfLetExprConseqElse &) override {}
void visit (HIR::MatchExpr &) override {}
void visit (HIR::AwaitExpr &) override {}
void visit (HIR::AsyncBlockExpr &) override {}
diff --git a/gcc/rust/backend/rust-compile-context.cc b/gcc/rust/backend/rust-compile-context.cc
index c80f956..86f0894 100644
--- a/gcc/rust/backend/rust-compile-context.cc
+++ b/gcc/rust/backend/rust-compile-context.cc
@@ -33,19 +33,8 @@ Context::Context ()
void
Context::setup_builtins ()
{
- auto builtins = resolver->get_builtin_types ();
- for (auto it = builtins.begin (); it != builtins.end (); it++)
- {
- HirId ref;
- bool ok = tyctx->lookup_type_by_node_id ((*it)->get_node_id (), &ref);
- rust_assert (ok);
-
- TyTy::BaseType *lookup;
- ok = tyctx->lookup_type (ref, &lookup);
- rust_assert (ok);
-
- TyTyResolveCompile::compile (this, lookup);
- }
+ for (auto &builtin : tyctx->get_builtins ())
+ TyTyResolveCompile::compile (this, builtin.get ());
}
hashval_t
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc
index 7251cc8..353a498 100644
--- a/gcc/rust/backend/rust-compile-expr.cc
+++ b/gcc/rust/backend/rust-compile-expr.cc
@@ -40,24 +40,24 @@ CompileExpr::CompileExpr (Context *ctx)
{}
tree
-CompileExpr::Compile (HIR::Expr *expr, Context *ctx)
+CompileExpr::Compile (HIR::Expr &expr, Context *ctx)
{
CompileExpr compiler (ctx);
- expr->accept_vis (compiler);
+ expr.accept_vis (compiler);
return compiler.translated;
}
void
CompileExpr::visit (HIR::TupleIndexExpr &expr)
{
- HIR::Expr *tuple_expr = expr.get_tuple_expr ().get ();
+ HIR::Expr &tuple_expr = expr.get_tuple_expr ();
TupleIndex index = expr.get_tuple_index ();
tree receiver_ref = CompileExpr::Compile (tuple_expr, ctx);
TyTy::BaseType *tuple_expr_ty = nullptr;
bool ok
- = ctx->get_tyctx ()->lookup_type (tuple_expr->get_mappings ().get_hirid (),
+ = ctx->get_tyctx ()->lookup_type (tuple_expr.get_mappings ().get_hirid (),
&tuple_expr_ty);
rust_assert (ok);
@@ -97,7 +97,7 @@ CompileExpr::visit (HIR::TupleExpr &expr)
std::vector<tree> vals;
for (auto &elem : expr.get_tuple_elems ())
{
- auto e = CompileExpr::Compile (elem.get (), ctx);
+ auto e = CompileExpr::Compile (*elem, ctx);
vals.push_back (e);
}
@@ -111,7 +111,7 @@ CompileExpr::visit (HIR::ReturnExpr &expr)
auto fncontext = ctx->peek_fn ();
tree return_value = expr.has_return_expr ()
- ? CompileExpr::Compile (expr.return_expr.get (), ctx)
+ ? CompileExpr::Compile (expr.get_expr (), ctx)
: unit_expression (expr.get_locus ());
if (expr.has_return_expr ())
@@ -141,8 +141,8 @@ void
CompileExpr::visit (HIR::ArithmeticOrLogicalExpr &expr)
{
auto op = expr.get_expr_type ();
- auto lhs = CompileExpr::Compile (expr.get_lhs ().get (), ctx);
- auto rhs = CompileExpr::Compile (expr.get_rhs ().get (), ctx);
+ auto lhs = CompileExpr::Compile (expr.get_lhs (), ctx);
+ auto rhs = CompileExpr::Compile (expr.get_rhs (), ctx);
// this might be an operator overload situation lets check
TyTy::FnType *fntype;
@@ -152,9 +152,9 @@ CompileExpr::visit (HIR::ArithmeticOrLogicalExpr &expr)
{
auto lang_item_type
= LangItem::OperatorToLangItem (expr.get_expr_type ());
- translated = resolve_operator_overload (lang_item_type, expr, lhs, rhs,
- expr.get_lhs ().get (),
- expr.get_rhs ().get ());
+ translated = resolve_operator_overload (
+ lang_item_type, expr, lhs, rhs, expr.get_lhs (),
+ tl::optional<std::reference_wrapper<HIR::Expr>> (expr.get_rhs ()));
return;
}
@@ -185,8 +185,8 @@ void
CompileExpr::visit (HIR::CompoundAssignmentExpr &expr)
{
auto op = expr.get_expr_type ();
- auto lhs = CompileExpr::Compile (expr.get_lhs ().get (), ctx);
- auto rhs = CompileExpr::Compile (expr.get_rhs ().get (), ctx);
+ auto lhs = CompileExpr::Compile (expr.get_lhs (), ctx);
+ auto rhs = CompileExpr::Compile (expr.get_rhs (), ctx);
// this might be an operator overload situation lets check
TyTy::FnType *fntype;
@@ -198,8 +198,7 @@ CompileExpr::visit (HIR::CompoundAssignmentExpr &expr)
expr.get_expr_type ());
auto compound_assignment
= resolve_operator_overload (lang_item_type, expr, lhs, rhs,
- expr.get_lhs ().get (),
- expr.get_rhs ().get ());
+ expr.get_lhs (), expr.get_rhs ());
ctx->add_statement (compound_assignment);
return;
@@ -236,18 +235,18 @@ CompileExpr::visit (HIR::NegationExpr &expr)
{
auto op = expr.get_expr_type ();
- const auto literal_expr = expr.get_expr ().get ();
+ auto &literal_expr = expr.get_expr ();
// If it's a negated integer/float literal, we can return early
if (op == NegationOperator::NEGATE
- && literal_expr->get_expression_type () == HIR::Expr::ExprType::Lit)
+ && literal_expr.get_expression_type () == HIR::Expr::ExprType::Lit)
{
- auto new_literal_expr = static_cast<HIR::LiteralExpr *> (literal_expr);
- auto lit_type = new_literal_expr->get_lit_type ();
+ auto &new_literal_expr = static_cast<HIR::LiteralExpr &> (literal_expr);
+ auto lit_type = new_literal_expr.get_lit_type ();
if (lit_type == HIR::Literal::LitType::INT
|| lit_type == HIR::Literal::LitType::FLOAT)
{
- new_literal_expr->set_negative ();
+ new_literal_expr.set_negative ();
translated = CompileExpr::Compile (literal_expr, ctx);
return;
}
@@ -265,7 +264,7 @@ CompileExpr::visit (HIR::NegationExpr &expr)
auto lang_item_type = LangItem::NegationOperatorToLangItem (op);
translated
= resolve_operator_overload (lang_item_type, expr, negated_expr,
- nullptr, expr.get_expr ().get (), nullptr);
+ nullptr, expr.get_expr (), tl::nullopt);
return;
}
@@ -276,10 +275,30 @@ void
CompileExpr::visit (HIR::ComparisonExpr &expr)
{
auto op = expr.get_expr_type ();
- auto lhs = CompileExpr::Compile (expr.get_lhs ().get (), ctx);
- auto rhs = CompileExpr::Compile (expr.get_rhs ().get (), ctx);
+ auto lhs = CompileExpr::Compile (expr.get_lhs (), ctx);
+ auto rhs = CompileExpr::Compile (expr.get_rhs (), ctx);
auto location = expr.get_locus ();
+ // this might be an operator overload situation lets check
+ TyTy::FnType *fntype;
+ bool is_op_overload = ctx->get_tyctx ()->lookup_operator_overload (
+ expr.get_mappings ().get_hirid (), &fntype);
+ if (is_op_overload)
+ {
+ auto seg_name = LangItem::ComparisonToSegment (expr.get_expr_type ());
+ auto segment = HIR::PathIdentSegment (seg_name);
+ auto lang_item_type
+ = LangItem::ComparisonToLangItem (expr.get_expr_type ());
+
+ rhs = address_expression (rhs, EXPR_LOCATION (rhs));
+
+ translated = resolve_operator_overload (
+ lang_item_type, expr, lhs, rhs, expr.get_lhs (),
+ tl::optional<std::reference_wrapper<HIR::Expr>> (expr.get_rhs ()),
+ segment);
+ return;
+ }
+
translated = Backend::comparison_expression (op, lhs, rhs, location);
}
@@ -287,8 +306,8 @@ void
CompileExpr::visit (HIR::LazyBooleanExpr &expr)
{
auto op = expr.get_expr_type ();
- auto lhs = CompileExpr::Compile (expr.get_lhs ().get (), ctx);
- auto rhs = CompileExpr::Compile (expr.get_rhs ().get (), ctx);
+ auto lhs = CompileExpr::Compile (expr.get_lhs (), ctx);
+ auto rhs = CompileExpr::Compile (expr.get_rhs (), ctx);
auto location = expr.get_locus ();
translated = Backend::lazy_boolean_expression (op, lhs, rhs, location);
@@ -307,14 +326,14 @@ CompileExpr::visit (HIR::TypeCastExpr &expr)
TyTy::BaseType *casted_tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
- expr.get_casted_expr ()->get_mappings ().get_hirid (), &casted_tyty))
+ expr.get_casted_expr ().get_mappings ().get_hirid (), &casted_tyty))
{
translated = error_mark_node;
return;
}
auto type_to_cast_to = TyTyResolveCompile::compile (ctx, type_to_cast_to_ty);
- auto casted_expr = CompileExpr::Compile (expr.get_casted_expr ().get (), ctx);
+ auto casted_expr = CompileExpr::Compile (expr.get_casted_expr (), ctx);
std::vector<Resolver::Adjustment> *adjustments = nullptr;
bool ok = ctx->get_tyctx ()->lookup_cast_autoderef_mappings (
@@ -405,7 +424,7 @@ CompileExpr::visit (HIR::BlockExpr &expr)
&ret_var_stmt);
ctx->add_statement (ret_var_stmt);
- auto block_stmt = CompileBlock::compile (&expr, ctx, tmp);
+ auto block_stmt = CompileBlock::compile (expr, ctx, tmp);
rust_assert (TREE_CODE (block_stmt) == BIND_EXPR);
ctx->add_statement (block_stmt);
@@ -415,7 +434,7 @@ CompileExpr::visit (HIR::BlockExpr &expr)
void
CompileExpr::visit (HIR::UnsafeBlockExpr &expr)
{
- expr.get_block_expr ()->accept_vis (*this);
+ expr.get_block_expr ().accept_vis (*this);
}
void
@@ -487,7 +506,7 @@ CompileExpr::visit (HIR::StructExprStructFields &struct_expr)
auto lvalue_locus
= ctx->get_mappings ().lookup_location (expected->get_ty_ref ());
auto rvalue_locus = argument->get_locus ();
- auto rvalue = CompileStructExprField::Compile (argument.get (), ctx);
+ auto rvalue = CompileStructExprField::Compile (*argument, ctx);
TyTy::BaseType *actual = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (
@@ -519,7 +538,7 @@ CompileExpr::visit (HIR::StructExprStructFields &struct_expr)
auto lvalue_locus
= ctx->get_mappings ().lookup_location (expected->get_ty_ref ());
auto rvalue_locus = argument->get_locus ();
- auto rvalue = CompileStructExprField::Compile (argument.get (), ctx);
+ auto rvalue = CompileStructExprField::Compile (*argument, ctx);
TyTy::BaseType *actual = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (
@@ -539,45 +558,53 @@ CompileExpr::visit (HIR::StructExprStructFields &struct_expr)
}
}
- // the constructor depends on whether this is actually an enum or not if
- // its an enum we need to setup the discriminator
- std::vector<tree> ctor_arguments;
- if (adt->is_enum ())
+ if (!adt->is_enum ())
{
- HIR::Expr *discrim_expr = variant->get_discriminant ();
- tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
- tree folded_discrim_expr = fold_expr (discrim_expr_node);
- tree qualifier = folded_discrim_expr;
-
- ctor_arguments.push_back (qualifier);
+ translated
+ = Backend::constructor_expression (compiled_adt_type, adt->is_enum (),
+ arguments, union_disriminator,
+ struct_expr.get_locus ());
+ return;
}
- for (auto &arg : arguments)
- ctor_arguments.push_back (arg);
+
+ HIR::Expr &discrim_expr = variant->get_discriminant ();
+ tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
+ tree folded_discrim_expr = fold_expr (discrim_expr_node);
+ tree qualifier = folded_discrim_expr;
+
+ tree enum_root_files = TYPE_FIELDS (compiled_adt_type);
+ tree payload_root = DECL_CHAIN (enum_root_files);
+
+ tree payload = Backend::constructor_expression (TREE_TYPE (payload_root),
+ adt->is_enum (), arguments,
+ union_disriminator,
+ struct_expr.get_locus ());
+
+ std::vector<tree> ctor_arguments = {qualifier, payload};
translated
- = Backend::constructor_expression (compiled_adt_type, adt->is_enum (),
- ctor_arguments, union_disriminator,
+ = Backend::constructor_expression (compiled_adt_type, 0, ctor_arguments, -1,
struct_expr.get_locus ());
}
void
CompileExpr::visit (HIR::GroupedExpr &expr)
{
- translated = CompileExpr::Compile (expr.get_expr_in_parens ().get (), ctx);
+ translated = CompileExpr::Compile (expr.get_expr_in_parens (), ctx);
}
void
CompileExpr::visit (HIR::FieldAccessExpr &expr)
{
- HIR::Expr *receiver_expr = expr.get_receiver_expr ().get ();
+ HIR::Expr &receiver_expr = expr.get_receiver_expr ();
tree receiver_ref = CompileExpr::Compile (receiver_expr, ctx);
// resolve the receiver back to ADT type
TyTy::BaseType *receiver = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
- expr.get_receiver_expr ()->get_mappings ().get_hirid (), &receiver))
+ expr.get_receiver_expr ().get_mappings ().get_hirid (), &receiver))
{
- rust_error_at (expr.get_receiver_expr ()->get_locus (),
+ rust_error_at (expr.get_receiver_expr ().get_locus (),
"unresolved type for receiver");
return;
}
@@ -672,7 +699,7 @@ CompileExpr::visit (HIR::LoopExpr &expr)
ctx->push_loop_begin_label (loop_begin_label);
tree code_block
- = CompileBlock::compile (expr.get_loop_block ().get (), ctx, nullptr);
+ = CompileBlock::compile (expr.get_loop_block (), ctx, nullptr);
tree loop_expr = Backend::loop_expression (code_block, expr.get_locus ());
ctx->add_statement (loop_expr);
@@ -699,8 +726,8 @@ CompileExpr::visit (HIR::WhileLoopExpr &expr)
}
std::vector<Bvariable *> locals;
- location_t start_location = expr.get_loop_block ()->get_locus ();
- location_t end_location = expr.get_loop_block ()->get_locus (); // FIXME
+ location_t start_location = expr.get_loop_block ().get_locus ();
+ location_t end_location = expr.get_loop_block ().get_locus (); // FIXME
tree enclosing_scope = ctx->peek_enclosing_scope ();
tree loop_block = Backend::block (fnctx.fndecl, enclosing_scope, locals,
@@ -713,15 +740,14 @@ CompileExpr::visit (HIR::WhileLoopExpr &expr)
ctx->add_statement (loop_begin_label_decl);
ctx->push_loop_begin_label (loop_begin_label);
- tree condition
- = CompileExpr::Compile (expr.get_predicate_expr ().get (), ctx);
+ tree condition = CompileExpr::Compile (expr.get_predicate_expr (), ctx);
tree exit_condition = fold_build1_loc (expr.get_locus (), TRUTH_NOT_EXPR,
boolean_type_node, condition);
tree exit_expr = Backend::exit_expression (exit_condition, expr.get_locus ());
ctx->add_statement (exit_expr);
tree code_block_stmt
- = CompileBlock::compile (expr.get_loop_block ().get (), ctx, nullptr);
+ = CompileBlock::compile (expr.get_loop_block (), ctx, nullptr);
rust_assert (TREE_CODE (code_block_stmt) == BIND_EXPR);
ctx->add_statement (code_block_stmt);
@@ -737,12 +763,12 @@ CompileExpr::visit (HIR::BreakExpr &expr)
{
if (expr.has_break_expr ())
{
- tree compiled_expr = CompileExpr::Compile (expr.get_expr ().get (), ctx);
+ tree compiled_expr = CompileExpr::Compile (expr.get_expr (), ctx);
Bvariable *loop_result_holder = ctx->peek_loop_context ();
tree result_reference
= Backend::var_expression (loop_result_holder,
- expr.get_expr ()->get_locus ());
+ expr.get_expr ().get_locus ());
tree assignment
= Backend::assignment_statement (result_reference, compiled_expr,
@@ -865,7 +891,7 @@ CompileExpr::visit (HIR::ContinueExpr &expr)
void
CompileExpr::visit (HIR::BorrowExpr &expr)
{
- tree main_expr = CompileExpr::Compile (expr.get_expr ().get (), ctx);
+ tree main_expr = CompileExpr::Compile (expr.get_expr (), ctx);
if (RS_DST_FLAG_P (TREE_TYPE (main_expr)))
{
translated = main_expr;
@@ -892,7 +918,7 @@ CompileExpr::visit (HIR::DereferenceExpr &expr)
return;
}
- tree main_expr = CompileExpr::Compile (expr.get_expr ().get (), ctx);
+ tree main_expr = CompileExpr::Compile (expr.get_expr (), ctx);
// this might be an operator overload situation lets check
TyTy::FnType *fntype;
@@ -903,7 +929,7 @@ CompileExpr::visit (HIR::DereferenceExpr &expr)
auto lang_item_type = LangItem::Kind::DEREF;
tree operator_overload_call
= resolve_operator_overload (lang_item_type, expr, main_expr, nullptr,
- expr.get_expr ().get (), nullptr);
+ expr.get_expr (), tl::nullopt);
// rust deref always returns a reference from this overload then we can
// actually do the indirection
@@ -963,8 +989,8 @@ CompileExpr::visit (HIR::LiteralExpr &expr)
void
CompileExpr::visit (HIR::AssignmentExpr &expr)
{
- auto lvalue = CompileExpr::Compile (expr.get_lhs ().get (), ctx);
- auto rvalue = CompileExpr::Compile (expr.get_rhs ().get (), ctx);
+ auto lvalue = CompileExpr::Compile (expr.get_lhs (), ctx);
+ auto rvalue = CompileExpr::Compile (expr.get_rhs (), ctx);
// assignments are coercion sites so lets convert the rvalue if necessary
TyTy::BaseType *expected = nullptr;
@@ -972,16 +998,16 @@ CompileExpr::visit (HIR::AssignmentExpr &expr)
bool ok;
ok = ctx->get_tyctx ()->lookup_type (
- expr.get_lhs ()->get_mappings ().get_hirid (), &expected);
+ expr.get_lhs ().get_mappings ().get_hirid (), &expected);
rust_assert (ok);
ok = ctx->get_tyctx ()->lookup_type (
- expr.get_rhs ()->get_mappings ().get_hirid (), &actual);
+ expr.get_rhs ().get_mappings ().get_hirid (), &actual);
rust_assert (ok);
rvalue = coercion_site (expr.get_mappings ().get_hirid (), rvalue, actual,
- expected, expr.get_lhs ()->get_locus (),
- expr.get_rhs ()->get_locus ());
+ expected, expr.get_lhs ().get_locus (),
+ expr.get_rhs ().get_locus ());
// rust_debug_loc (expr.get_locus (), "XXXXXX assignment");
// debug_tree (rvalue);
@@ -1002,7 +1028,7 @@ check_match_scrutinee (HIR::MatchExpr &expr, Context *ctx)
{
TyTy::BaseType *scrutinee_expr_tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
- expr.get_scrutinee_expr ()->get_mappings ().get_hirid (),
+ expr.get_scrutinee_expr ().get_mappings ().get_hirid (),
&scrutinee_expr_tyty))
{
return TyTy::TypeKind::ERROR;
@@ -1015,17 +1041,7 @@ check_match_scrutinee (HIR::MatchExpr &expr, Context *ctx)
|| scrutinee_kind == TyTy::TypeKind::TUPLE
|| scrutinee_kind == TyTy::TypeKind::REF);
- if (scrutinee_kind == TyTy::TypeKind::ADT)
- {
- // this will need to change but for now the first pass implementation,
- // lets assert this is the case
- TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (scrutinee_expr_tyty);
- if (adt->is_enum ())
- rust_assert (adt->number_of_variants () > 0);
- else
- rust_assert (adt->number_of_variants () == 1);
- }
- else if (scrutinee_kind == TyTy::TypeKind::FLOAT)
+ if (scrutinee_kind == TyTy::TypeKind::FLOAT)
{
// FIXME: CASE_LABEL_EXPR does not support floating point types.
// Find another way to compile these.
@@ -1066,6 +1082,15 @@ CompileExpr::visit (HIR::MatchExpr &expr)
return;
}
+ // if the result of this expression is meant to be never type then we can
+ // optimise this away but there is the case where match arms resolve to !
+ // because of return statements we need to special case this
+ if (!expr.has_match_arms () && expr_tyty->is<TyTy::NeverType> ())
+ {
+ translated = unit_expression (expr.get_locus ());
+ return;
+ }
+
fncontext fnctx = ctx->peek_fn ();
Bvariable *tmp = NULL;
tree enclosing_scope = ctx->peek_enclosing_scope ();
@@ -1080,7 +1105,7 @@ CompileExpr::visit (HIR::MatchExpr &expr)
// lets compile the scrutinee expression
tree match_scrutinee_rval
- = CompileExpr::Compile (expr.get_scrutinee_expr ().get (), ctx);
+ = CompileExpr::Compile (expr.get_scrutinee_expr (), ctx);
Bvariable *match_scrutinee_tmp_var
= Backend::temporary_variable (fnctx.fndecl, enclosing_scope,
@@ -1090,7 +1115,7 @@ CompileExpr::visit (HIR::MatchExpr &expr)
ctx->add_statement (ret_var_stmt);
tree match_scrutinee_expr = match_scrutinee_tmp_var->get_tree (
- expr.get_scrutinee_expr ()->get_locus ());
+ expr.get_scrutinee_expr ().get_locus ());
tree assignment
= Backend::assignment_statement (match_scrutinee_expr, match_scrutinee_rval,
@@ -1123,17 +1148,27 @@ CompileExpr::visit (HIR::MatchExpr &expr)
ctx->push_block (arm_body_block);
// setup the bindings for the block
- CompilePatternBindings::Compile (kase_pattern.get (),
- match_scrutinee_expr, ctx);
+ CompilePatternBindings::Compile (*kase_pattern, match_scrutinee_expr,
+ ctx);
// compile the expr and setup the assignment if required when tmp !=
// NULL
location_t arm_locus = kase_arm.get_locus ();
- tree kase_expr_tree
- = CompileExpr::Compile (kase.get_expr ().get (), ctx);
+ tree kase_expr_tree = CompileExpr::Compile (kase.get_expr (), ctx);
tree result_reference = Backend::var_expression (tmp, arm_locus);
+
+ TyTy::BaseType *actual = nullptr;
+ bool ok = ctx->get_tyctx ()->lookup_type (
+ kase.get_expr ().get_mappings ().get_hirid (), &actual);
+ rust_assert (ok);
+
+ tree coerced_result
+ = coercion_site (kase.get_expr ().get_mappings ().get_hirid (),
+ kase_expr_tree, actual, expr_tyty,
+ expr.get_locus (), arm_locus);
+
tree assignment
- = Backend::assignment_statement (result_reference, kase_expr_tree,
+ = Backend::assignment_statement (result_reference, coerced_result,
arm_locus);
ctx->add_statement (assignment);
@@ -1145,7 +1180,7 @@ CompileExpr::visit (HIR::MatchExpr &expr)
ctx->pop_block ();
tree check_expr
- = CompilePatternCheckExpr::Compile (kase_pattern.get (),
+ = CompilePatternCheckExpr::Compile (*kase_pattern,
match_scrutinee_expr, ctx);
tree check_stmt
@@ -1167,7 +1202,7 @@ CompileExpr::visit (HIR::CallExpr &expr)
{
TyTy::BaseType *tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
- expr.get_fnexpr ()->get_mappings ().get_hirid (), &tyty))
+ expr.get_fnexpr ().get_mappings ().get_hirid (), &tyty))
{
rust_error_at (expr.get_locus (), "unknown type");
return;
@@ -1193,7 +1228,7 @@ CompileExpr::visit (HIR::CallExpr &expr)
{
HirId variant_id;
bool ok = ctx->get_tyctx ()->lookup_variant_definition (
- expr.get_fnexpr ()->get_mappings ().get_hirid (), &variant_id);
+ expr.get_fnexpr ().get_mappings ().get_hirid (), &variant_id);
rust_assert (ok);
ok = adt->lookup_variant_by_id (variant_id, &variant,
@@ -1204,10 +1239,10 @@ CompileExpr::visit (HIR::CallExpr &expr)
// this assumes all fields are in order from type resolution and if a
// base struct was specified those fields are filed via accessors
std::vector<tree> arguments;
- for (size_t i = 0; i < expr.get_arguments ().size (); i++)
+ for (size_t i = 0; i < expr.num_params (); i++)
{
auto &argument = expr.get_arguments ().at (i);
- auto rvalue = CompileExpr::Compile (argument.get (), ctx);
+ auto rvalue = CompileExpr::Compile (*argument, ctx);
// assignments are coercion sites so lets convert the rvalue if
// necessary
@@ -1231,26 +1266,34 @@ CompileExpr::visit (HIR::CallExpr &expr)
arguments.push_back (rvalue);
}
- // the constructor depends on whether this is actually an enum or not if
- // its an enum we need to setup the discriminator
- std::vector<tree> ctor_arguments;
- if (adt->is_enum ())
+ if (!adt->is_enum ())
{
- HIR::Expr *discrim_expr = variant->get_discriminant ();
- tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
- tree folded_discrim_expr = fold_expr (discrim_expr_node);
- tree qualifier = folded_discrim_expr;
-
- ctor_arguments.push_back (qualifier);
+ translated
+ = Backend::constructor_expression (compiled_adt_type,
+ adt->is_enum (), arguments,
+ union_disriminator,
+ expr.get_locus ());
+ return;
}
- for (auto &arg : arguments)
- ctor_arguments.push_back (arg);
- translated
- = Backend::constructor_expression (compiled_adt_type, adt->is_enum (),
- ctor_arguments, union_disriminator,
+ HIR::Expr &discrim_expr = variant->get_discriminant ();
+ tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
+ tree folded_discrim_expr = fold_expr (discrim_expr_node);
+ tree qualifier = folded_discrim_expr;
+
+ tree enum_root_files = TYPE_FIELDS (compiled_adt_type);
+ tree payload_root = DECL_CHAIN (enum_root_files);
+
+ tree payload
+ = Backend::constructor_expression (TREE_TYPE (payload_root), true,
+ {arguments}, union_disriminator,
expr.get_locus ());
+ std::vector<tree> ctor_arguments = {qualifier, payload};
+ translated = Backend::constructor_expression (compiled_adt_type, false,
+ ctor_arguments, -1,
+ expr.get_locus ());
+
return;
}
@@ -1270,13 +1313,13 @@ CompileExpr::visit (HIR::CallExpr &expr)
}
const TyTy::FnType *fn = static_cast<const TyTy::FnType *> (base);
- auto param = fn->param_at (index);
- *result = param.second;
+ auto &param = fn->param_at (index);
+ *result = param.get_type ();
return true;
};
- auto fn_address = CompileExpr::Compile (expr.get_fnexpr ().get (), ctx);
+ auto fn_address = CompileExpr::Compile (expr.get_fnexpr (), ctx);
// is this a closure call?
bool possible_trait_call
@@ -1303,7 +1346,7 @@ CompileExpr::visit (HIR::CallExpr &expr)
for (size_t i = 0; i < expr.get_arguments ().size (); i++)
{
auto &argument = expr.get_arguments ().at (i);
- auto rvalue = CompileExpr::Compile (argument.get (), ctx);
+ auto rvalue = CompileExpr::Compile (*argument, ctx);
if (is_variadic && i >= required_num_args)
{
@@ -1343,7 +1386,7 @@ void
CompileExpr::visit (HIR::MethodCallExpr &expr)
{
// method receiver
- tree self = CompileExpr::Compile (expr.get_receiver ().get (), ctx);
+ tree self = CompileExpr::Compile (expr.get_receiver (), ctx);
// lookup the expected function type
TyTy::BaseType *lookup_fntype = nullptr;
@@ -1383,7 +1426,7 @@ CompileExpr::visit (HIR::MethodCallExpr &expr)
// lookup the autoderef mappings
HirId autoderef_mappings_id
- = expr.get_receiver ()->get_mappings ().get_hirid ();
+ = expr.get_receiver ().get_mappings ().get_hirid ();
std::vector<Resolver::Adjustment> *adjustments = nullptr;
ok = ctx->get_tyctx ()->lookup_autoderef_mappings (autoderef_mappings_id,
&adjustments);
@@ -1391,7 +1434,7 @@ CompileExpr::visit (HIR::MethodCallExpr &expr)
// apply adjustments for the fn call
self = resolve_adjustements (*adjustments, self,
- expr.get_receiver ()->get_locus ());
+ expr.get_receiver ().get_locus ());
std::vector<tree> args;
args.push_back (self); // adjusted self
@@ -1400,12 +1443,12 @@ CompileExpr::visit (HIR::MethodCallExpr &expr)
for (size_t i = 0; i < expr.get_arguments ().size (); i++)
{
auto &argument = expr.get_arguments ().at (i);
- auto rvalue = CompileExpr::Compile (argument.get (), ctx);
+ auto rvalue = CompileExpr::Compile (*argument, ctx);
// assignments are coercion sites so lets convert the rvalue if
// necessary, offset from the already adjusted implicit self
bool ok;
- TyTy::BaseType *expected = fntype->param_at (i + 1).second;
+ TyTy::BaseType *expected = fntype->param_at (i + 1).get_type ();
TyTy::BaseType *actual = nullptr;
ok = ctx->get_tyctx ()->lookup_type (
@@ -1480,10 +1523,10 @@ CompileExpr::get_receiver_from_dyn (const TyTy::DynamicObjectType *dyn,
}
tree
-CompileExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
- HIR::OperatorExprMeta expr, tree lhs,
- tree rhs, HIR::Expr *lhs_expr,
- HIR::Expr *rhs_expr)
+CompileExpr::resolve_operator_overload (
+ LangItem::Kind lang_item_type, HIR::OperatorExprMeta expr, tree lhs, tree rhs,
+ HIR::Expr &lhs_expr, tl::optional<std::reference_wrapper<HIR::Expr>> rhs_expr,
+ HIR::PathIdentSegment specified_segment)
{
TyTy::FnType *fntype;
bool is_op_overload = ctx->get_tyctx ()->lookup_operator_overload (
@@ -1504,7 +1547,10 @@ CompileExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
}
// lookup compiled functions since it may have already been compiled
- HIR::PathIdentSegment segment_name (LangItem::ToString (lang_item_type));
+ HIR::PathIdentSegment segment_name
+ = specified_segment.is_error ()
+ ? HIR::PathIdentSegment (LangItem::ToString (lang_item_type))
+ : specified_segment;
tree fn_expr = resolve_method_address (fntype, receiver, expr.get_locus ());
// lookup the autoderef mappings
@@ -1514,7 +1560,7 @@ CompileExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
rust_assert (ok);
// apply adjustments for the fn call
- tree self = resolve_adjustements (*adjustments, lhs, lhs_expr->get_locus ());
+ tree self = resolve_adjustements (*adjustments, lhs, lhs_expr.get_locus ());
std::vector<tree> args;
args.push_back (self); // adjusted self
@@ -1829,7 +1875,7 @@ CompileExpr::visit (HIR::ArrayExpr &expr)
const TyTy::ArrayType &array_tyty
= static_cast<const TyTy::ArrayType &> (*tyty);
- HIR::ArrayElems &elements = *expr.get_internal_elements ();
+ HIR::ArrayElems &elements = expr.get_internal_elements ();
switch (elements.get_array_expr_type ())
{
case HIR::ArrayElems::ArrayExprType::VALUES: {
@@ -1858,7 +1904,7 @@ CompileExpr::array_value_expr (location_t expr_locus,
size_t i = 0;
for (auto &elem : elems.get_values ())
{
- tree translated_expr = CompileExpr::Compile (elem.get (), ctx);
+ tree translated_expr = CompileExpr::Compile (*elem, ctx);
constructor.push_back (translated_expr);
indexes.push_back (i++);
}
@@ -1885,8 +1931,7 @@ CompileExpr::array_copied_expr (location_t expr_locus,
}
ctx->push_const_context ();
- tree capacity_expr
- = CompileExpr::Compile (elems.get_num_copies_expr ().get (), ctx);
+ tree capacity_expr = CompileExpr::Compile (elems.get_num_copies_expr (), ctx);
ctx->pop_const_context ();
if (!TREE_CONSTANT (capacity_expr))
@@ -1896,8 +1941,7 @@ CompileExpr::array_copied_expr (location_t expr_locus,
}
// get the compiled value
- tree translated_expr
- = CompileExpr::Compile (elems.get_elem_to_copy ().get (), ctx);
+ tree translated_expr = CompileExpr::Compile (elems.get_elem_to_copy (), ctx);
tree max_domain = TYPE_MAX_VALUE (domain);
tree min_domain = TYPE_MIN_VALUE (domain);
@@ -2102,8 +2146,8 @@ HIRCompileBase::resolve_unsized_dyn_adjustment (
void
CompileExpr::visit (HIR::RangeFromToExpr &expr)
{
- tree from = CompileExpr::Compile (expr.get_from_expr ().get (), ctx);
- tree to = CompileExpr::Compile (expr.get_to_expr ().get (), ctx);
+ tree from = CompileExpr::Compile (expr.get_from_expr (), ctx);
+ tree to = CompileExpr::Compile (expr.get_to_expr (), ctx);
if (from == error_mark_node || to == error_mark_node)
{
translated = error_mark_node;
@@ -2125,7 +2169,7 @@ CompileExpr::visit (HIR::RangeFromToExpr &expr)
void
CompileExpr::visit (HIR::RangeFromExpr &expr)
{
- tree from = CompileExpr::Compile (expr.get_from_expr ().get (), ctx);
+ tree from = CompileExpr::Compile (expr.get_from_expr (), ctx);
if (from == error_mark_node)
{
translated = error_mark_node;
@@ -2147,7 +2191,7 @@ CompileExpr::visit (HIR::RangeFromExpr &expr)
void
CompileExpr::visit (HIR::RangeToExpr &expr)
{
- tree to = CompileExpr::Compile (expr.get_to_expr ().get (), ctx);
+ tree to = CompileExpr::Compile (expr.get_to_expr (), ctx);
if (to == error_mark_node)
{
translated = error_mark_node;
@@ -2182,8 +2226,8 @@ CompileExpr::visit (HIR::RangeFullExpr &expr)
void
CompileExpr::visit (HIR::RangeFromToInclExpr &expr)
{
- tree from = CompileExpr::Compile (expr.get_from_expr ().get (), ctx);
- tree to = CompileExpr::Compile (expr.get_to_expr ().get (), ctx);
+ tree from = CompileExpr::Compile (expr.get_from_expr (), ctx);
+ tree to = CompileExpr::Compile (expr.get_to_expr (), ctx);
if (from == error_mark_node || to == error_mark_node)
{
translated = error_mark_node;
@@ -2205,9 +2249,8 @@ CompileExpr::visit (HIR::RangeFromToInclExpr &expr)
void
CompileExpr::visit (HIR::ArrayIndexExpr &expr)
{
- tree array_reference
- = CompileExpr::Compile (expr.get_array_expr ().get (), ctx);
- tree index = CompileExpr::Compile (expr.get_index_expr ().get (), ctx);
+ tree array_reference = CompileExpr::Compile (expr.get_array_expr (), ctx);
+ tree index = CompileExpr::Compile (expr.get_index_expr (), ctx);
// this might be an core::ops::index lang item situation
TyTy::FnType *fntype;
@@ -2218,8 +2261,8 @@ CompileExpr::visit (HIR::ArrayIndexExpr &expr)
auto lang_item_type = LangItem::Kind::INDEX;
tree operator_overload_call
= resolve_operator_overload (lang_item_type, expr, array_reference,
- index, expr.get_array_expr ().get (),
- expr.get_index_expr ().get ());
+ index, expr.get_array_expr (),
+ expr.get_index_expr ());
tree actual_type = TREE_TYPE (operator_overload_call);
bool can_indirect = TYPE_PTR_P (actual_type) || TYPE_REF_P (actual_type);
@@ -2241,7 +2284,7 @@ CompileExpr::visit (HIR::ArrayIndexExpr &expr)
// indirection if required
TyTy::BaseType *array_expr_ty = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (
- expr.get_array_expr ()->get_mappings ().get_hirid (), &array_expr_ty);
+ expr.get_array_expr ().get_mappings ().get_hirid (), &array_expr_ty);
rust_assert (ok);
// do we need to add an indirect reference
@@ -2392,7 +2435,7 @@ CompileExpr::generate_closure_function (HIR::ClosureExpr &expr,
= Backend::struct_field_expression (args_param_expr, i,
closure_param.get_locus ());
- CompilePatternBindings::Compile (closure_param.get_pattern ().get (),
+ CompilePatternBindings::Compile (closure_param.get_pattern (),
compiled_param_var, ctx);
i++;
}
@@ -2404,13 +2447,13 @@ CompileExpr::generate_closure_function (HIR::ClosureExpr &expr,
}
// lookup locals
- HIR::Expr *function_body = expr.get_expr ().get ();
+ HIR::Expr &function_body = expr.get_expr ();
bool is_block_expr
- = function_body->get_expression_type () == HIR::Expr::ExprType::Block;
+ = function_body.get_expression_type () == HIR::Expr::ExprType::Block;
if (is_block_expr)
{
- auto body_mappings = function_body->get_mappings ();
+ auto body_mappings = function_body.get_mappings ();
if (flag_name_resolution_2_0)
{
auto nr_ctx
@@ -2431,13 +2474,13 @@ CompileExpr::generate_closure_function (HIR::ClosureExpr &expr,
}
tree enclosing_scope = NULL_TREE;
- location_t start_location = function_body->get_locus ();
- location_t end_location = function_body->get_locus ();
+ location_t start_location = function_body.get_locus ();
+ location_t end_location = function_body.get_locus ();
if (is_block_expr)
{
- HIR::BlockExpr *body = static_cast<HIR::BlockExpr *> (function_body);
- start_location = body->get_locus ();
- end_location = body->get_end_locus ();
+ auto &body = static_cast<HIR::BlockExpr &> (function_body);
+ start_location = body.get_locus ();
+ end_location = body.get_end_locus ();
}
tree code_block = Backend::block (fndecl, enclosing_scope, {} /*locals*/,
@@ -2462,15 +2505,14 @@ CompileExpr::generate_closure_function (HIR::ClosureExpr &expr,
if (is_block_expr)
{
- HIR::BlockExpr *body = static_cast<HIR::BlockExpr *> (function_body);
- compile_function_body (fndecl, *body, tyret);
+ auto &body = static_cast<HIR::BlockExpr &> (function_body);
+ compile_function_body (fndecl, body, tyret);
}
else
{
tree value = CompileExpr::Compile (function_body, ctx);
tree return_expr
- = Backend::return_statement (fndecl, value,
- function_body->get_locus ());
+ = Backend::return_statement (fndecl, value, function_body.get_locus ());
ctx->add_statement (return_expr);
}
@@ -2557,8 +2599,8 @@ CompileExpr::generate_possible_fn_trait_call (HIR::CallExpr &expr,
}
// need to apply any autoderef's to the self argument
- HIR::Expr *fnexpr = expr.get_fnexpr ().get ();
- HirId autoderef_mappings_id = fnexpr->get_mappings ().get_hirid ();
+ HIR::Expr &fnexpr = expr.get_fnexpr ();
+ HirId autoderef_mappings_id = fnexpr.get_mappings ().get_hirid ();
std::vector<Resolver::Adjustment> *adjustments = nullptr;
bool ok = ctx->get_tyctx ()->lookup_autoderef_mappings (autoderef_mappings_id,
&adjustments);
@@ -2571,7 +2613,7 @@ CompileExpr::generate_possible_fn_trait_call (HIR::CallExpr &expr,
std::vector<tree> tuple_arg_vals;
for (auto &argument : expr.get_arguments ())
{
- auto rvalue = CompileExpr::Compile (argument.get (), ctx);
+ auto rvalue = CompileExpr::Compile (*argument, ctx);
tuple_arg_vals.push_back (rvalue);
}
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h
index ef907d1..dc78dee 100644
--- a/gcc/rust/backend/rust-compile-expr.h
+++ b/gcc/rust/backend/rust-compile-expr.h
@@ -28,7 +28,7 @@ namespace Compile {
class CompileExpr : private HIRCompileBase, protected HIR::HIRExpressionVisitor
{
public:
- static tree Compile (HIR::Expr *expr, Context *ctx);
+ static tree Compile (HIR::Expr &expr, Context *ctx);
void visit (HIR::TupleIndexExpr &expr) override;
void visit (HIR::TupleExpr &expr) override;
@@ -77,8 +77,6 @@ public:
// TODO
// these need to be sugared in the HIR to if statements and a match
void visit (HIR::WhileLetLoopExpr &) override {}
- void visit (HIR::IfLetExpr &) override {}
- void visit (HIR::IfLetExprConseqElse &) override {}
// lets not worry about async yet....
void visit (HIR::AwaitExpr &) override {}
@@ -98,10 +96,12 @@ protected:
TyTy::BaseType *receiver, TyTy::FnType *fntype,
tree receiver_ref, location_t expr_locus);
- tree resolve_operator_overload (LangItem::Kind lang_item_type,
- HIR::OperatorExprMeta expr, tree lhs,
- tree rhs, HIR::Expr *lhs_expr,
- HIR::Expr *rhs_expr);
+ tree resolve_operator_overload (
+ LangItem::Kind lang_item_type, HIR::OperatorExprMeta expr, tree lhs,
+ tree rhs, HIR::Expr &lhs_expr,
+ tl::optional<std::reference_wrapper<HIR::Expr>> rhs_expr,
+ HIR::PathIdentSegment specified_segment
+ = HIR::PathIdentSegment::create_error ());
tree compile_bool_literal (const HIR::LiteralExpr &expr,
const TyTy::BaseType *tyty);
diff --git a/gcc/rust/backend/rust-compile-fnparam.cc b/gcc/rust/backend/rust-compile-fnparam.cc
index af24ca0..b40065e 100644
--- a/gcc/rust/backend/rust-compile-fnparam.cc
+++ b/gcc/rust/backend/rust-compile-fnparam.cc
@@ -31,20 +31,20 @@ CompileFnParam::CompileFnParam (Context *ctx, tree fndecl, tree decl_type,
{}
Bvariable *
-CompileFnParam::compile (Context *ctx, tree fndecl, HIR::FunctionParam *param,
+CompileFnParam::compile (Context *ctx, tree fndecl, HIR::FunctionParam &param,
tree decl_type, location_t locus)
{
CompileFnParam compiler (ctx, fndecl, decl_type, locus);
- param->get_param_name ()->accept_vis (compiler);
+ param.get_param_name ().accept_vis (compiler);
return compiler.compiled_param;
}
Bvariable *
-CompileFnParam::compile (Context *ctx, tree fndecl, HIR::Pattern *param,
+CompileFnParam::compile (Context *ctx, tree fndecl, HIR::Pattern &param,
tree decl_type, location_t locus)
{
CompileFnParam compiler (ctx, fndecl, decl_type, locus);
- param->accept_vis (compiler);
+ param.accept_vis (compiler);
return compiler.compiled_param;
}
@@ -69,24 +69,35 @@ CompileFnParam::visit (HIR::WildcardPattern &pattern)
}
void
+CompileFnParam::visit (HIR::TuplePattern &pattern)
+{
+ compiled_param = create_tmp_param_var (decl_type);
+ CompilePatternBindings::Compile (
+ pattern, Backend::var_expression (compiled_param, locus), ctx);
+}
+
+void
CompileFnParam::visit (HIR::StructPattern &pattern)
{
- tree tmp_param_var = create_tmp_param_var (decl_type);
- CompilePatternBindings::Compile (&pattern, tmp_param_var, ctx);
+ compiled_param = create_tmp_param_var (decl_type);
+ CompilePatternBindings::Compile (
+ pattern, Backend::var_expression (compiled_param, locus), ctx);
}
void
CompileFnParam::visit (HIR::TupleStructPattern &pattern)
{
- tree tmp_param_var = create_tmp_param_var (decl_type);
- CompilePatternBindings::Compile (&pattern, tmp_param_var, ctx);
+ compiled_param = create_tmp_param_var (decl_type);
+ CompilePatternBindings::Compile (
+ pattern, Backend::var_expression (compiled_param, locus), ctx);
}
void
CompileFnParam::visit (HIR::ReferencePattern &pattern)
{
- tree tmp_param_var = create_tmp_param_var (decl_type);
- CompilePatternBindings::Compile (&pattern, tmp_param_var, ctx);
+ compiled_param = create_tmp_param_var (decl_type);
+ CompilePatternBindings::Compile (
+ pattern, Backend::var_expression (compiled_param, locus), ctx);
}
Bvariable *
@@ -102,7 +113,7 @@ CompileSelfParam::compile (Context *ctx, tree fndecl, HIR::SelfParam &self,
return Backend::parameter_variable (fndecl, "self", decl_type, locus);
}
-tree
+Bvariable *
CompileFnParam::create_tmp_param_var (tree decl_type)
{
// generate the anon param
@@ -110,10 +121,8 @@ CompileFnParam::create_tmp_param_var (tree decl_type)
std::string cpp_str_identifier = std::string (IDENTIFIER_POINTER (tmp_ident));
decl_type = Backend::immutable_type (decl_type);
- compiled_param = Backend::parameter_variable (fndecl, cpp_str_identifier,
- decl_type, locus);
-
- return Backend::var_expression (compiled_param, locus);
+ return Backend::parameter_variable (fndecl, cpp_str_identifier, decl_type,
+ locus);
}
} // namespace Compile
diff --git a/gcc/rust/backend/rust-compile-fnparam.h b/gcc/rust/backend/rust-compile-fnparam.h
index 09a3e69..189216c 100644
--- a/gcc/rust/backend/rust-compile-fnparam.h
+++ b/gcc/rust/backend/rust-compile-fnparam.h
@@ -29,9 +29,9 @@ class CompileFnParam : private HIRCompileBase, protected HIR::HIRPatternVisitor
{
public:
static Bvariable *compile (Context *ctx, tree fndecl,
- HIR::FunctionParam *param, tree decl_type,
+ HIR::FunctionParam &param, tree decl_type,
location_t locus);
- static Bvariable *compile (Context *ctx, tree fndecl, HIR::Pattern *param,
+ static Bvariable *compile (Context *ctx, tree fndecl, HIR::Pattern &param,
tree decl_type, location_t locus);
void visit (HIR::IdentifierPattern &pattern) override;
@@ -47,12 +47,12 @@ public:
void visit (HIR::QualifiedPathInExpression &) override {}
void visit (HIR::RangePattern &) override {}
void visit (HIR::SlicePattern &) override {}
- void visit (HIR::TuplePattern &) override {}
+ void visit (HIR::TuplePattern &) override;
private:
CompileFnParam (Context *ctx, tree fndecl, tree decl_type, location_t locus);
- tree create_tmp_param_var (tree decl_type);
+ Bvariable *create_tmp_param_var (tree decl_type);
tree fndecl;
tree decl_type;
diff --git a/gcc/rust/backend/rust-compile-implitem.cc b/gcc/rust/backend/rust-compile-implitem.cc
index 4c7d8e8..71b3e8d 100644
--- a/gcc/rust/backend/rust-compile-implitem.cc
+++ b/gcc/rust/backend/rust-compile-implitem.cc
@@ -27,13 +27,34 @@ CompileTraitItem::visit (HIR::TraitItemConst &constant)
rust_assert (concrete != nullptr);
TyTy::BaseType *resolved_type = concrete;
- auto canonical_path = ctx->get_mappings ().lookup_canonical_path (
- constant.get_mappings ().get_nodeid ());
+ tl::optional<Resolver::CanonicalPath> canonical_path;
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ canonical_path = nr_ctx.values.to_canonical_path (
+ constant.get_mappings ().get_nodeid ());
+ }
+ else
+ {
+ canonical_path = ctx->get_mappings ().lookup_canonical_path (
+ constant.get_mappings ().get_nodeid ());
+ }
+
+ rust_assert (canonical_path);
+
+ HIR::Expr &const_value_expr = constant.get_expr ();
+ TyTy::BaseType *expr_type = nullptr;
+ bool ok = ctx->get_tyctx ()->lookup_type (
+ const_value_expr.get_mappings ().get_hirid (), &expr_type);
+ rust_assert (ok);
- HIR::Expr *const_value_expr = constant.get_expr ().get ();
tree const_expr
- = compile_constant_item (resolved_type, *canonical_path, const_value_expr,
- constant.get_locus ());
+ = compile_constant_item (constant.get_mappings ().get_hirid (), expr_type,
+ resolved_type, *canonical_path, const_value_expr,
+ constant.get_locus (),
+ const_value_expr.get_locus ());
ctx->push_const (const_expr);
ctx->insert_const_decl (constant.get_mappings ().get_hirid (), const_expr);
@@ -43,7 +64,7 @@ CompileTraitItem::visit (HIR::TraitItemConst &constant)
void
CompileTraitItem::visit (HIR::TraitItemFunc &func)
{
- rust_assert (func.has_block_defined ());
+ rust_assert (func.has_definition ());
rust_assert (concrete->get_kind () == TyTy::TypeKind::FNDEF);
TyTy::FnType *fntype = static_cast<TyTy::FnType *> (concrete);
@@ -75,8 +96,22 @@ CompileTraitItem::visit (HIR::TraitItemFunc &func)
fntype->override_context ();
}
- auto canonical_path = ctx->get_mappings ().lookup_canonical_path (
- func.get_mappings ().get_nodeid ());
+ tl::optional<Resolver::CanonicalPath> canonical_path;
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ canonical_path
+ = nr_ctx.values.to_canonical_path (func.get_mappings ().get_nodeid ());
+ }
+ else
+ {
+ canonical_path = ctx->get_mappings ().lookup_canonical_path (
+ func.get_mappings ().get_nodeid ());
+ }
+
+ rust_assert (canonical_path);
// FIXME: How do we get the proper visibility here?
auto vis = HIR::Visibility (HIR::Visibility::VisType::PUBLIC);
@@ -86,7 +121,7 @@ CompileTraitItem::visit (HIR::TraitItemFunc &func)
function.get_self (), function.get_function_params (),
function.get_qualifiers (), vis,
func.get_outer_attrs (), func.get_locus (),
- func.get_block_expr ().get (), *canonical_path, fntype);
+ &func.get_block_expr (), *canonical_path, fntype);
reference = address_expression (fndecl, ref_locus);
}
diff --git a/gcc/rust/backend/rust-compile-intrinsic.cc b/gcc/rust/backend/rust-compile-intrinsic.cc
index de3bb6e..0f05458 100644
--- a/gcc/rust/backend/rust-compile-intrinsic.cc
+++ b/gcc/rust/backend/rust-compile-intrinsic.cc
@@ -23,6 +23,7 @@
#include "rust-diagnostics.h"
#include "rust-location.h"
#include "rust-constexpr.h"
+#include "rust-session-manager.h"
#include "rust-tree.h"
#include "tree-core.h"
#include "rust-gcc.h"
@@ -194,6 +195,17 @@ expect_handler (bool likely)
};
}
+static tree
+try_handler_inner (Context *ctx, TyTy::FnType *fntype, bool is_new_api);
+
+const static std::function<tree (Context *, TyTy::FnType *)>
+try_handler (bool is_new_api)
+{
+ return [is_new_api] (Context *ctx, TyTy::FnType *fntype) {
+ return try_handler_inner (ctx, fntype, is_new_api);
+ };
+}
+
inline tree
sorry_handler (Context *ctx, TyTy::FnType *fntype)
{
@@ -241,6 +253,8 @@ static const std::map<std::string,
{"likely", expect_handler (true)},
{"unlikely", expect_handler (false)},
{"assume", assume_handler},
+ {"try", try_handler (false)},
+ {"catch_unwind", try_handler (true)},
};
Intrinsics::Intrinsics (Context *ctx) : ctx (ctx) {}
@@ -315,11 +329,11 @@ compile_fn_params (Context *ctx, TyTy::FnType *fntype, tree fndecl,
{
for (auto &parm : fntype->get_params ())
{
- auto &referenced_param = parm.first;
- auto &param_tyty = parm.second;
+ auto &referenced_param = parm.get_pattern ();
+ auto param_tyty = parm.get_type ();
auto compiled_param_type = TyTyResolveCompile::compile (ctx, param_tyty);
- location_t param_locus = referenced_param->get_locus ();
+ location_t param_locus = referenced_param.get_locus ();
Bvariable *compiled_param_var
= CompileFnParam::compile (ctx, fndecl, referenced_param,
compiled_param_type, param_locus);
@@ -496,9 +510,10 @@ transmute_handler (Context *ctx, TyTy::FnType *fntype)
rust_error_at (fntype->get_locus (),
"cannot transmute between types of different sizes, or "
"dependently-sized types");
- rust_inform (fntype->get_ident ().locus, "source type: %qs (%lu bits)",
- fntype->get_params ().at (0).second->as_string ().c_str (),
- (unsigned long) source_size);
+ rust_inform (
+ fntype->get_ident ().locus, "source type: %qs (%lu bits)",
+ fntype->get_params ().at (0).get_type ()->as_string ().c_str (),
+ (unsigned long) source_size);
rust_inform (fntype->get_ident ().locus, "target type: %qs (%lu bits)",
fntype->get_return_type ()->as_string ().c_str (),
(unsigned long) target_size);
@@ -1226,7 +1241,7 @@ assume_handler (Context *ctx, TyTy::FnType *fntype)
// TODO: make sure this is actually helping the compiler optimize
rust_assert (fntype->get_params ().size () == 1);
- rust_assert (fntype->param_at (0).second->get_kind ()
+ rust_assert (fntype->param_at (0).get_type ()->get_kind ()
== TyTy::TypeKind::BOOL);
tree lookup = NULL_TREE;
@@ -1265,5 +1280,100 @@ assume_handler (Context *ctx, TyTy::FnType *fntype)
return fndecl;
}
+static tree
+try_handler_inner (Context *ctx, TyTy::FnType *fntype, bool is_new_api)
+{
+ rust_assert (fntype->get_params ().size () == 3);
+
+ tree lookup = NULL_TREE;
+ if (check_for_cached_intrinsic (ctx, fntype, &lookup))
+ return lookup;
+ auto fndecl = compile_intrinsic_function (ctx, fntype);
+
+ enter_intrinsic_block (ctx, fndecl);
+
+ // The following tricks are needed to make sure the try-catch blocks are not
+ // optimized away
+ TREE_READONLY (fndecl) = 0;
+ DECL_DISREGARD_INLINE_LIMITS (fndecl) = 1;
+ DECL_ATTRIBUTES (fndecl) = tree_cons (get_identifier ("always_inline"),
+ NULL_TREE, DECL_ATTRIBUTES (fndecl));
+
+ // BUILTIN try_handler FN BODY BEGIN
+ // setup the params
+ std::vector<Bvariable *> param_vars;
+ compile_fn_params (ctx, fntype, fndecl, &param_vars);
+ if (!Backend::function_set_parameters (fndecl, param_vars))
+ return error_mark_node;
+ tree enclosing_scope = NULL_TREE;
+
+ bool panic_is_abort = Session::get_instance ().options.get_panic_strategy ()
+ == CompileOptions::PanicStrategy::Abort;
+ tree try_fn = Backend::var_expression (param_vars[0], UNDEF_LOCATION);
+ tree user_data = Backend::var_expression (param_vars[1], UNDEF_LOCATION);
+ tree catch_fn = Backend::var_expression (param_vars[2], UNDEF_LOCATION);
+ tree normal_return_stmt = NULL_TREE;
+ tree error_return_stmt = NULL_TREE;
+ tree try_call = Backend::call_expression (try_fn, {user_data}, nullptr,
+ BUILTINS_LOCATION);
+ tree catch_call = NULL_TREE;
+ tree try_block = Backend::block (fndecl, enclosing_scope, {}, UNDEF_LOCATION,
+ UNDEF_LOCATION);
+
+ if (is_new_api)
+ {
+ auto ret_type = TyTyResolveCompile::get_unit_type ();
+ auto ret_expr = Backend::constructor_expression (ret_type, false, {}, -1,
+ UNDEF_LOCATION);
+ normal_return_stmt
+ = Backend::return_statement (fndecl, ret_expr, BUILTINS_LOCATION);
+ error_return_stmt
+ = Backend::return_statement (fndecl, ret_expr, BUILTINS_LOCATION);
+ }
+ else
+ {
+ normal_return_stmt = Backend::return_statement (fndecl, integer_zero_node,
+ BUILTINS_LOCATION);
+ error_return_stmt = Backend::return_statement (fndecl, integer_one_node,
+ BUILTINS_LOCATION);
+ }
+ Backend::block_add_statements (try_block,
+ std::vector<tree>{try_call,
+ normal_return_stmt});
+ if (panic_is_abort)
+ {
+ // skip building the try-catch construct
+ ctx->add_statement (try_block);
+ finalize_intrinsic_block (ctx, fndecl);
+ return fndecl;
+ }
+
+ tree eh_pointer
+ = build_call_expr (builtin_decl_explicit (BUILT_IN_EH_POINTER), 1,
+ integer_zero_node);
+ catch_call = Backend::call_expression (catch_fn, {user_data, eh_pointer},
+ NULL_TREE, BUILTINS_LOCATION);
+
+ tree catch_block = Backend::block (fndecl, enclosing_scope, {},
+ UNDEF_LOCATION, UNDEF_LOCATION);
+ Backend::block_add_statements (catch_block,
+ std::vector<tree>{catch_call,
+ error_return_stmt});
+ // emulate what cc1plus is doing for C++ try-catch
+ tree inner_eh_construct
+ = Backend::exception_handler_statement (catch_call, NULL_TREE,
+ error_return_stmt,
+ BUILTINS_LOCATION);
+ // TODO(liushuyu): eh_personality needs to be implemented as a runtime thing
+ auto eh_construct
+ = Backend::exception_handler_statement (try_block, inner_eh_construct,
+ NULL_TREE, BUILTINS_LOCATION);
+ ctx->add_statement (eh_construct);
+ // BUILTIN try_handler FN BODY END
+ finalize_intrinsic_block (ctx, fndecl);
+
+ return fndecl;
+}
+
} // namespace Compile
} // namespace Rust
diff --git a/gcc/rust/backend/rust-compile-item.cc b/gcc/rust/backend/rust-compile-item.cc
index 0878716..52cd59f 100644
--- a/gcc/rust/backend/rust-compile-item.cc
+++ b/gcc/rust/backend/rust-compile-item.cc
@@ -35,10 +35,16 @@ CompileItem::visit (HIR::StaticItem &var)
return;
}
+ HIR::Expr &const_value_expr = var.get_expr ();
+
TyTy::BaseType *resolved_type = nullptr;
+ TyTy::BaseType *expr_type = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (var.get_mappings ().get_hirid (),
&resolved_type);
rust_assert (ok);
+ ok = ctx->get_tyctx ()->lookup_type (
+ const_value_expr.get_mappings ().get_hirid (), &expr_type);
+ rust_assert (ok);
tree type = TyTyResolveCompile::compile (ctx, resolved_type);
@@ -60,10 +66,11 @@ CompileItem::visit (HIR::StaticItem &var)
rust_assert (canonical_path.has_value ());
- HIR::Expr *const_value_expr = var.get_expr ().get ();
ctx->push_const_context ();
- tree value = compile_constant_item (resolved_type, *canonical_path,
- const_value_expr, var.get_locus ());
+ tree value
+ = compile_constant_item (var.get_mappings ().get_hirid (), expr_type,
+ resolved_type, *canonical_path, const_value_expr,
+ var.get_locus (), const_value_expr.get_locus ());
ctx->pop_const_context ();
std::string name = canonical_path->get ();
@@ -89,16 +96,21 @@ CompileItem::visit (HIR::StaticItem &var)
void
CompileItem::visit (HIR::ConstantItem &constant)
{
+ HIR::Expr &const_value_expr = constant.get_expr ();
auto &mappings = constant.get_mappings ();
if (ctx->lookup_const_decl (mappings.get_hirid (), &reference))
return;
// resolve the type
- TyTy::BaseType *resolved_type = nullptr;
+ TyTy::BaseType *constant_type = nullptr;
+ TyTy::BaseType *expr_type = nullptr;
bool ok
- = ctx->get_tyctx ()->lookup_type (mappings.get_hirid (), &resolved_type);
+ = ctx->get_tyctx ()->lookup_type (mappings.get_hirid (), &constant_type);
+ rust_assert (ok);
+ ok = ctx->get_tyctx ()->lookup_type (
+ const_value_expr.get_mappings ().get_hirid (), &expr_type);
rust_assert (ok);
// canonical path
@@ -120,11 +132,12 @@ CompileItem::visit (HIR::ConstantItem &constant)
.value ();
}
- HIR::Expr *const_value_expr = constant.get_expr ().get ();
ctx->push_const_context ();
tree const_expr
- = compile_constant_item (resolved_type, canonical_path, const_value_expr,
- constant.get_locus ());
+ = compile_constant_item (mappings.get_hirid (), expr_type, constant_type,
+ canonical_path, const_value_expr,
+ constant.get_locus (),
+ const_value_expr.get_locus ());
ctx->pop_const_context ();
ctx->push_const (const_expr);
@@ -222,8 +235,7 @@ CompileItem::visit (HIR::Function &function)
function.get_function_params (),
function.get_qualifiers (), function.get_visibility (),
function.get_outer_attrs (), function.get_locus (),
- function.get_definition ().get (), canonical_path,
- fntype);
+ &function.get_definition (), canonical_path, fntype);
reference = address_expression (fndecl, ref_locus);
if (function.get_qualifiers ().is_const ())
@@ -235,7 +247,7 @@ CompileItem::visit (HIR::ImplBlock &impl_block)
{
TyTy::BaseType *self_lookup = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
- impl_block.get_type ()->get_mappings ().get_hirid (), &self_lookup))
+ impl_block.get_type ().get_mappings ().get_hirid (), &self_lookup))
{
rust_error_at (impl_block.get_locus (), "failed to resolve type of impl");
return;
diff --git a/gcc/rust/backend/rust-compile-pattern.cc b/gcc/rust/backend/rust-compile-pattern.cc
index ffa1fa7..4e352fd 100644
--- a/gcc/rust/backend/rust-compile-pattern.cc
+++ b/gcc/rust/backend/rust-compile-pattern.cc
@@ -21,6 +21,7 @@
#include "rust-compile-resolve-path.h"
#include "rust-constexpr.h"
#include "rust-compile-type.h"
+#include "print-tree.h"
namespace Rust {
namespace Compile {
@@ -57,17 +58,14 @@ CompilePatternCheckExpr::visit (HIR::PathInExpression &pattern)
rust_assert (ok);
// find discriminant field of scrutinee
- tree scrutinee_record_expr
- = Backend::struct_field_expression (match_scrutinee_expr, 0,
- pattern.get_locus ());
tree scrutinee_expr_qualifier_expr
- = Backend::struct_field_expression (scrutinee_record_expr, 0,
+ = Backend::struct_field_expression (match_scrutinee_expr, 0,
pattern.get_locus ());
// must be enum
match_scrutinee_expr = scrutinee_expr_qualifier_expr;
- HIR::Expr *discrim_expr = variant->get_discriminant ();
+ HIR::Expr &discrim_expr = variant->get_discriminant ();
tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
check_expr
@@ -80,10 +78,9 @@ void
CompilePatternCheckExpr::visit (HIR::LiteralPattern &pattern)
{
// Compile the literal
- HIR::LiteralExpr *litexpr
- = new HIR::LiteralExpr (pattern.get_mappings (), pattern.get_literal (),
- pattern.get_locus (),
- std::vector<AST::Attribute> ());
+ auto litexpr = std::make_unique<HIR::LiteralExpr> (
+ HIR::LiteralExpr (pattern.get_mappings (), pattern.get_literal (),
+ pattern.get_locus (), std::vector<AST::Attribute> ()));
// Note: Floating point literals are currently accepted but will likely be
// forbidden in LiteralPatterns in a future version of Rust.
@@ -95,7 +92,7 @@ CompilePatternCheckExpr::visit (HIR::LiteralPattern &pattern)
rust_sorry_at (pattern.get_locus (), "floating-point literal in pattern");
}
- tree lit = CompileExpr::Compile (litexpr, ctx);
+ tree lit = CompileExpr::Compile (*litexpr, ctx);
check_expr = Backend::comparison_expression (ComparisonOperator::EQUAL,
match_scrutinee_expr, lit,
@@ -103,19 +100,17 @@ CompilePatternCheckExpr::visit (HIR::LiteralPattern &pattern)
}
static tree
-compile_range_pattern_bound (HIR::RangePatternBound *bound,
+compile_range_pattern_bound (HIR::RangePatternBound &bound,
Analysis::NodeMapping mappings, location_t locus,
Context *ctx)
{
tree result = NULL_TREE;
- switch (bound->get_bound_type ())
+ switch (bound.get_bound_type ())
{
case HIR::RangePatternBound::RangePatternBoundType::LITERAL: {
- HIR::RangePatternBoundLiteral &ref
- = *static_cast<HIR::RangePatternBoundLiteral *> (bound);
+ auto &ref = static_cast<HIR::RangePatternBoundLiteral &> (bound);
- HIR::LiteralExpr *litexpr
- = new HIR::LiteralExpr (mappings, ref.get_literal (), locus,
+ HIR::LiteralExpr litexpr (mappings, ref.get_literal (), locus,
std::vector<AST::Attribute> ());
result = CompileExpr::Compile (litexpr, ctx);
@@ -123,8 +118,7 @@ compile_range_pattern_bound (HIR::RangePatternBound *bound,
break;
case HIR::RangePatternBound::RangePatternBoundType::PATH: {
- HIR::RangePatternBoundPath &ref
- = *static_cast<HIR::RangePatternBoundPath *> (bound);
+ auto &ref = static_cast<HIR::RangePatternBoundPath &> (bound);
result = ResolvePathRef::Compile (ref.get_path (), ctx);
@@ -134,8 +128,7 @@ compile_range_pattern_bound (HIR::RangePatternBound *bound,
break;
case HIR::RangePatternBound::RangePatternBoundType::QUALPATH: {
- HIR::RangePatternBoundQualPath &ref
- = *static_cast<HIR::RangePatternBoundQualPath *> (bound);
+ auto &ref = static_cast<HIR::RangePatternBoundQualPath &> (bound);
result = ResolvePathRef::Compile (ref.get_qualified_path (), ctx);
@@ -150,10 +143,10 @@ compile_range_pattern_bound (HIR::RangePatternBound *bound,
void
CompilePatternCheckExpr::visit (HIR::RangePattern &pattern)
{
- tree upper = compile_range_pattern_bound (pattern.get_upper_bound ().get (),
+ tree upper = compile_range_pattern_bound (pattern.get_upper_bound (),
pattern.get_mappings (),
pattern.get_locus (), ctx);
- tree lower = compile_range_pattern_bound (pattern.get_lower_bound ().get (),
+ tree lower = compile_range_pattern_bound (pattern.get_lower_bound (),
pattern.get_mappings (),
pattern.get_locus (), ctx);
@@ -175,7 +168,7 @@ CompilePatternCheckExpr::visit (HIR::ReferencePattern &pattern)
{
match_scrutinee_expr
= indirect_expression (match_scrutinee_expr, pattern.get_locus ());
- pattern.get_referenced_pattern ()->accept_vis (*this);
+ pattern.get_referenced_pattern ().accept_vis (*this);
}
void
@@ -183,14 +176,13 @@ CompilePatternCheckExpr::visit (HIR::AltPattern &pattern)
{
auto &alts = pattern.get_alts ();
- check_expr = CompilePatternCheckExpr::Compile (alts.at (0).get (),
+ check_expr = CompilePatternCheckExpr::Compile (*alts.at (0),
match_scrutinee_expr, ctx);
auto end = alts.end ();
for (auto i = alts.begin () + 1; i != end; i++)
{
tree next_expr
- = CompilePatternCheckExpr::Compile (i->get (), match_scrutinee_expr,
- ctx);
+ = CompilePatternCheckExpr::Compile (**i, match_scrutinee_expr, ctx);
check_expr = Backend::arithmetic_or_logical_expression (
ArithmeticOrLogicalOperator::BITWISE_OR, check_expr, next_expr,
(*i)->get_locus ());
@@ -229,15 +221,12 @@ CompilePatternCheckExpr::visit (HIR::StructPattern &pattern)
// // would be DECL_QUALIFIER i think. For now this will just access the
// // first record field and its respective qualifier because it will
// // always be set because this is all a big special union
- HIR::Expr *discrim_expr = variant->get_discriminant ();
+ HIR::Expr &discrim_expr = variant->get_discriminant ();
tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
// find discriminant field of scrutinee
- tree scrutinee_record_expr
- = Backend::struct_field_expression (match_scrutinee_expr, variant_index,
- pattern.get_path ().get_locus ());
tree scrutinee_expr_qualifier_expr
- = Backend::struct_field_expression (scrutinee_record_expr, 0,
+ = Backend::struct_field_expression (match_scrutinee_expr, 0,
pattern.get_path ().get_locus ());
check_expr
@@ -246,7 +235,7 @@ CompilePatternCheckExpr::visit (HIR::StructPattern &pattern)
discrim_expr_node,
pattern.get_path ().get_locus ());
- match_scrutinee_expr = scrutinee_record_expr;
+ match_scrutinee_expr = scrutinee_expr_qualifier_expr;
}
else
{
@@ -282,11 +271,11 @@ CompilePatternCheckExpr::visit (HIR::StructPattern &pattern)
ident.get_locus ());
tree check_expr_sub
- = CompilePatternCheckExpr::Compile (ident.get_pattern ().get (),
+ = CompilePatternCheckExpr::Compile (ident.get_pattern (),
field_expr, ctx);
check_expr = Backend::arithmetic_or_logical_expression (
ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
- check_expr_sub, ident.get_pattern ()->get_locus ());
+ check_expr_sub, ident.get_pattern ().get_locus ());
}
break;
@@ -301,8 +290,6 @@ CompilePatternCheckExpr::visit (HIR::StructPattern &pattern)
void
CompilePatternCheckExpr::visit (HIR::TupleStructPattern &pattern)
{
- size_t tuple_field_index;
-
// lookup the type
TyTy::BaseType *lookup = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (
@@ -313,6 +300,7 @@ CompilePatternCheckExpr::visit (HIR::TupleStructPattern &pattern)
rust_assert (lookup->get_kind () == TyTy::TypeKind::ADT);
TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (lookup);
+ int variant_index = 0;
rust_assert (adt->number_of_variants () > 0);
TyTy::VariantDef *variant = nullptr;
if (adt->is_enum ())
@@ -323,20 +311,16 @@ CompilePatternCheckExpr::visit (HIR::TupleStructPattern &pattern)
pattern.get_path ().get_mappings ().get_hirid (), &variant_id);
rust_assert (ok);
- int variant_index = 0;
ok = adt->lookup_variant_by_id (variant_id, &variant, &variant_index);
rust_assert (ok);
// find expected discriminant
- HIR::Expr *discrim_expr = variant->get_discriminant ();
+ HIR::Expr &discrim_expr = variant->get_discriminant ();
tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
// find discriminant field of scrutinee
- tree scrutinee_record_expr
- = Backend::struct_field_expression (match_scrutinee_expr, variant_index,
- pattern.get_path ().get_locus ());
tree scrutinee_expr_qualifier_expr
- = Backend::struct_field_expression (scrutinee_record_expr, 0,
+ = Backend::struct_field_expression (match_scrutinee_expr, 0,
pattern.get_path ().get_locus ());
check_expr
@@ -344,21 +328,15 @@ CompilePatternCheckExpr::visit (HIR::TupleStructPattern &pattern)
scrutinee_expr_qualifier_expr,
discrim_expr_node,
pattern.get_path ().get_locus ());
-
- match_scrutinee_expr = scrutinee_record_expr;
- // we are offsetting by + 1 here since the first field in the record
- // is always the discriminator
- tuple_field_index = 1;
}
else
{
variant = adt->get_variants ().at (0);
check_expr = boolean_true_node;
- tuple_field_index = 0;
}
- std::unique_ptr<HIR::TupleStructItems> &items = pattern.get_items ();
- switch (items->get_item_type ())
+ HIR::TupleStructItems &items = pattern.get_items ();
+ switch (items.get_item_type ())
{
case HIR::TupleStructItems::RANGED: {
// TODO
@@ -368,21 +346,30 @@ CompilePatternCheckExpr::visit (HIR::TupleStructPattern &pattern)
case HIR::TupleStructItems::MULTIPLE: {
HIR::TupleStructItemsNoRange &items_no_range
- = static_cast<HIR::TupleStructItemsNoRange &> (*items.get ());
+ = static_cast<HIR::TupleStructItemsNoRange &> (items);
rust_assert (items_no_range.get_patterns ().size ()
== variant->num_fields ());
+ size_t tuple_field_index = 0;
for (auto &pattern : items_no_range.get_patterns ())
{
+ // find payload union field of scrutinee
+ tree payload_ref
+ = Backend::struct_field_expression (match_scrutinee_expr, 1,
+ pattern->get_locus ());
+
+ tree variant_ref
+ = Backend::struct_field_expression (payload_ref, variant_index,
+ pattern->get_locus ());
+
tree field_expr
- = Backend::struct_field_expression (match_scrutinee_expr,
+ = Backend::struct_field_expression (variant_ref,
tuple_field_index++,
pattern->get_locus ());
tree check_expr_sub
- = CompilePatternCheckExpr::Compile (pattern.get (), field_expr,
- ctx);
+ = CompilePatternCheckExpr::Compile (*pattern, field_expr, ctx);
check_expr = Backend::arithmetic_or_logical_expression (
ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
check_expr_sub, pattern->get_locus ());
@@ -397,7 +384,7 @@ CompilePatternCheckExpr::visit (HIR::TuplePattern &pattern)
{
check_expr = boolean_true_node;
- switch (pattern.get_items ()->get_item_type ())
+ switch (pattern.get_items ().get_item_type ())
{
case HIR::TuplePatternItems::RANGED: {
// TODO
@@ -407,7 +394,7 @@ CompilePatternCheckExpr::visit (HIR::TuplePattern &pattern)
case HIR::TuplePatternItems::MULTIPLE: {
auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
- *pattern.get_items ());
+ pattern.get_items ());
size_t tuple_field_index = 0;
for (auto &pat : items.get_patterns ())
@@ -418,7 +405,7 @@ CompilePatternCheckExpr::visit (HIR::TuplePattern &pattern)
pat->get_locus ());
tree check_expr_sub
- = CompilePatternCheckExpr::Compile (pat.get (), field_expr, ctx);
+ = CompilePatternCheckExpr::Compile (*pat, field_expr, ctx);
check_expr = Backend::arithmetic_or_logical_expression (
ArithmeticOrLogicalOperator::BITWISE_AND, check_expr,
check_expr_sub, pat->get_locus ());
@@ -459,8 +446,8 @@ CompilePatternBindings::visit (HIR::TupleStructPattern &pattern)
rust_assert (variant->get_variant_type ()
== TyTy::VariantDef::VariantType::TUPLE);
- std::unique_ptr<HIR::TupleStructItems> &items = pattern.get_items ();
- switch (items->get_item_type ())
+ HIR::TupleStructItems &items = pattern.get_items ();
+ switch (items.get_item_type ())
{
case HIR::TupleStructItems::RANGED: {
// TODO
@@ -470,20 +457,22 @@ CompilePatternBindings::visit (HIR::TupleStructPattern &pattern)
case HIR::TupleStructItems::MULTIPLE: {
HIR::TupleStructItemsNoRange &items_no_range
- = static_cast<HIR::TupleStructItemsNoRange &> (*items.get ());
+ = static_cast<HIR::TupleStructItemsNoRange &> (items);
rust_assert (items_no_range.get_patterns ().size ()
== variant->num_fields ());
if (adt->is_enum ())
{
- // we are offsetting by + 1 here since the first field in the record
- // is always the discriminator
- size_t tuple_field_index = 1;
+ size_t tuple_field_index = 0;
for (auto &pattern : items_no_range.get_patterns ())
{
+ tree payload_accessor_union
+ = Backend::struct_field_expression (match_scrutinee_expr, 1,
+ pattern->get_locus ());
+
tree variant_accessor
- = Backend::struct_field_expression (match_scrutinee_expr,
+ = Backend::struct_field_expression (payload_accessor_union,
variant_index,
pattern->get_locus ());
@@ -576,16 +565,18 @@ CompilePatternBindings::visit (HIR::StructPattern &pattern)
tree binding = error_mark_node;
if (adt->is_enum ())
{
+ tree payload_accessor_union
+ = Backend::struct_field_expression (match_scrutinee_expr, 1,
+ ident.get_locus ());
+
tree variant_accessor
- = Backend::struct_field_expression (match_scrutinee_expr,
+ = Backend::struct_field_expression (payload_accessor_union,
variant_index,
ident.get_locus ());
- // we are offsetting by + 1 here since the first field in the
- // record is always the discriminator
- binding = Backend::struct_field_expression (variant_accessor,
- offs + 1,
- ident.get_locus ());
+ binding
+ = Backend::struct_field_expression (variant_accessor, offs,
+ ident.get_locus ());
}
else
{
@@ -609,8 +600,8 @@ CompilePatternBindings::visit (HIR::ReferencePattern &pattern)
tree derefed
= indirect_expression (match_scrutinee_expr, pattern.get_locus ());
- CompilePatternBindings::Compile (pattern.get_referenced_pattern ().get (),
- derefed, ctx);
+ CompilePatternBindings::Compile (pattern.get_referenced_pattern (), derefed,
+ ctx);
}
void
@@ -621,6 +612,92 @@ CompilePatternBindings::visit (HIR::IdentifierPattern &pattern)
}
void
+CompilePatternBindings::visit (HIR::TuplePattern &pattern)
+{
+ rust_assert (pattern.has_tuple_pattern_items ());
+
+ // lookup the type
+ TyTy::BaseType *ty = nullptr;
+ bool ok
+ = ctx->get_tyctx ()->lookup_type (pattern.get_mappings ().get_hirid (),
+ &ty);
+ rust_assert (ok);
+
+ switch (pattern.get_items ().get_item_type ())
+ {
+ case HIR::TuplePatternItems::ItemType::RANGED: {
+ size_t tuple_idx = 0;
+ auto &items
+ = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
+
+ auto &items_lower = items.get_lower_patterns ();
+ auto &items_upper = items.get_upper_patterns ();
+
+ for (auto &sub : items_lower)
+ {
+ TyTy::BaseType *ty_sub = nullptr;
+ HirId sub_id = sub->get_mappings ().get_hirid ();
+ bool ok = ctx->get_tyctx ()->lookup_type (sub_id, &ty_sub);
+ rust_assert (ok);
+
+ tree sub_init
+ = Backend::struct_field_expression (match_scrutinee_expr,
+ tuple_idx, sub->get_locus ());
+
+ CompilePatternBindings::Compile (*sub.get (), sub_init, ctx);
+ tuple_idx++;
+ }
+
+ rust_assert (ty->get_kind () == TyTy::TypeKind::TUPLE);
+ tuple_idx = static_cast<TyTy::TupleType &> (*ty).num_fields ()
+ - items_upper.size ();
+
+ for (auto &sub : items_upper)
+ {
+ TyTy::BaseType *ty_sub = nullptr;
+ HirId sub_id = sub->get_mappings ().get_hirid ();
+ bool ok = ctx->get_tyctx ()->lookup_type (sub_id, &ty_sub);
+ rust_assert (ok);
+
+ tree sub_init
+ = Backend::struct_field_expression (match_scrutinee_expr,
+ tuple_idx, sub->get_locus ());
+ CompilePatternBindings::Compile (*sub.get (), sub_init, ctx);
+ tuple_idx++;
+ }
+
+ return;
+ }
+ case HIR::TuplePatternItems::ItemType::MULTIPLE: {
+ size_t tuple_idx = 0;
+ auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
+ pattern.get_items ());
+
+ for (auto &sub : items.get_patterns ())
+ {
+ TyTy::BaseType *ty_sub = nullptr;
+ HirId sub_id = sub->get_mappings ().get_hirid ();
+ bool ok = ctx->get_tyctx ()->lookup_type (sub_id, &ty_sub);
+ rust_assert (ok);
+
+ tree sub_init
+ = Backend::struct_field_expression (match_scrutinee_expr,
+ tuple_idx, sub->get_locus ());
+ CompilePatternBindings::Compile (*sub.get (), sub_init, ctx);
+ tuple_idx++;
+ }
+
+ return;
+ }
+ default: {
+ rust_unreachable ();
+ }
+ }
+}
+
+//
+
+void
CompilePatternLet::visit (HIR::IdentifierPattern &pattern)
{
Bvariable *var = nullptr;
@@ -670,12 +747,12 @@ CompilePatternLet::visit (HIR::TuplePattern &pattern)
tree access_expr = Backend::var_expression (tmp_var, pattern.get_locus ());
ctx->add_statement (init_stmt);
- switch (pattern.get_items ()->get_item_type ())
+ switch (pattern.get_items ().get_item_type ())
{
case HIR::TuplePatternItems::ItemType::RANGED: {
size_t tuple_idx = 0;
auto &items
- = static_cast<HIR::TuplePatternItemsRanged &> (*pattern.get_items ());
+ = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
auto &items_lower = items.get_lower_patterns ();
auto &items_upper = items.get_upper_patterns ();
@@ -719,7 +796,7 @@ CompilePatternLet::visit (HIR::TuplePattern &pattern)
case HIR::TuplePatternItems::ItemType::MULTIPLE: {
size_t tuple_idx = 0;
auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
- *pattern.get_items ());
+ pattern.get_items ());
for (auto &sub : items.get_patterns ())
{
diff --git a/gcc/rust/backend/rust-compile-pattern.h b/gcc/rust/backend/rust-compile-pattern.h
index 521ed0d..c7a62fc 100644
--- a/gcc/rust/backend/rust-compile-pattern.h
+++ b/gcc/rust/backend/rust-compile-pattern.h
@@ -26,11 +26,11 @@ class CompilePatternCheckExpr : public HIRCompileBase,
public HIR::HIRPatternVisitor
{
public:
- static tree Compile (HIR::Pattern *pattern, tree match_scrutinee_expr,
+ static tree Compile (HIR::Pattern &pattern, tree match_scrutinee_expr,
Context *ctx)
{
CompilePatternCheckExpr compiler (ctx, match_scrutinee_expr);
- pattern->accept_vis (compiler);
+ pattern.accept_vis (compiler);
rust_assert (compiler.check_expr);
return compiler.check_expr;
}
@@ -71,17 +71,18 @@ class CompilePatternBindings : public HIRCompileBase,
public HIR::HIRPatternVisitor
{
public:
- static void Compile (HIR::Pattern *pattern, tree match_scrutinee_expr,
+ static void Compile (HIR::Pattern &pattern, tree match_scrutinee_expr,
Context *ctx)
{
CompilePatternBindings compiler (ctx, match_scrutinee_expr);
- pattern->accept_vis (compiler);
+ pattern.accept_vis (compiler);
}
void visit (HIR::StructPattern &pattern) override;
void visit (HIR::TupleStructPattern &pattern) override;
void visit (HIR::ReferencePattern &pattern) override;
void visit (HIR::IdentifierPattern &) override;
+ void visit (HIR::TuplePattern &pattern) override;
// Empty visit for unused Pattern HIR nodes.
void visit (HIR::AltPattern &) override {}
@@ -90,7 +91,6 @@ public:
void visit (HIR::QualifiedPathInExpression &) override {}
void visit (HIR::RangePattern &) override {}
void visit (HIR::SlicePattern &) override {}
- void visit (HIR::TuplePattern &) override {}
void visit (HIR::WildcardPattern &) override {}
protected:
diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc
index 7c9b303..69599cc 100644
--- a/gcc/rust/backend/rust-compile-resolve-path.cc
+++ b/gcc/rust/backend/rust-compile-resolve-path.cc
@@ -81,13 +81,14 @@ ResolvePathRef::attempt_constructor_expression_lookup (
tree compiled_adt_type = TyTyResolveCompile::compile (ctx, adt);
// make the ctor for the union
- HIR::Expr *discrim_expr = variant->get_discriminant ();
+ HIR::Expr &discrim_expr = variant->get_discriminant ();
tree discrim_expr_node = CompileExpr::Compile (discrim_expr, ctx);
tree folded_discrim_expr = fold_expr (discrim_expr_node);
tree qualifier = folded_discrim_expr;
- return Backend::constructor_expression (compiled_adt_type, true, {qualifier},
- union_disriminator, expr_locus);
+ // false for is enum but this is an enum but we have a new layout
+ return Backend::constructor_expression (compiled_adt_type, false, {qualifier},
+ -1, expr_locus);
}
tree
@@ -301,7 +302,7 @@ HIRCompileBase::query_compile (HirId ref, TyTy::BaseType *lookup,
TyTy::BaseType *self = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (
- impl->get_type ()->get_mappings ().get_hirid (), &self);
+ impl->get_type ().get_mappings ().get_hirid (), &self);
rust_assert (ok);
if (!lookup->has_substitutions_defined ())
diff --git a/gcc/rust/backend/rust-compile-stmt.cc b/gcc/rust/backend/rust-compile-stmt.cc
index d8b27ff..a4b5a98 100644
--- a/gcc/rust/backend/rust-compile-stmt.cc
+++ b/gcc/rust/backend/rust-compile-stmt.cc
@@ -40,13 +40,13 @@ CompileStmt::Compile (HIR::Stmt *stmt, Context *ctx)
void
CompileStmt::visit (HIR::ExprStmt &stmt)
{
- translated = CompileExpr::Compile (stmt.get_expr ().get (), ctx);
+ translated = CompileExpr::Compile (stmt.get_expr (), ctx);
}
void
CompileStmt::visit (HIR::LetStmt &stmt)
{
- HIR::Pattern &stmt_pattern = *stmt.get_pattern ();
+ HIR::Pattern &stmt_pattern = stmt.get_pattern ();
HirId stmt_id = stmt_pattern.get_mappings ().get_hirid ();
TyTy::BaseType *ty = nullptr;
@@ -68,7 +68,7 @@ CompileStmt::visit (HIR::LetStmt &stmt)
if (!stmt.has_init_expr ())
return;
- tree init = CompileExpr::Compile (stmt.get_init_expr ().get (), ctx);
+ tree init = CompileExpr::Compile (stmt.get_init_expr (), ctx);
// FIXME use error_mark_node, check that CompileExpr returns error_mark_node
// on failure and make this an assertion
if (init == nullptr)
@@ -76,11 +76,11 @@ CompileStmt::visit (HIR::LetStmt &stmt)
TyTy::BaseType *actual = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (
- stmt.get_init_expr ()->get_mappings ().get_hirid (), &actual);
+ stmt.get_init_expr ().get_mappings ().get_hirid (), &actual);
rust_assert (ok);
- location_t lvalue_locus = stmt.get_pattern ()->get_locus ();
- location_t rvalue_locus = stmt.get_init_expr ()->get_locus ();
+ location_t lvalue_locus = stmt.get_pattern ().get_locus ();
+ location_t rvalue_locus = stmt.get_init_expr ().get_locus ();
TyTy::BaseType *expected = ty;
init = coercion_site (stmt.get_mappings ().get_hirid (), init, actual,
expected, lvalue_locus, rvalue_locus);
diff --git a/gcc/rust/backend/rust-compile-struct-field-expr.cc b/gcc/rust/backend/rust-compile-struct-field-expr.cc
index 4a3b26c..0ac25e7 100644
--- a/gcc/rust/backend/rust-compile-struct-field-expr.cc
+++ b/gcc/rust/backend/rust-compile-struct-field-expr.cc
@@ -27,22 +27,22 @@ CompileStructExprField::CompileStructExprField (Context *ctx)
{}
tree
-CompileStructExprField::Compile (HIR::StructExprField *field, Context *ctx)
+CompileStructExprField::Compile (HIR::StructExprField &field, Context *ctx)
{
CompileStructExprField compiler (ctx);
- switch (field->get_kind ())
+ switch (field.get_kind ())
{
case HIR::StructExprField::StructExprFieldKind::IDENTIFIER:
- compiler.visit (static_cast<HIR::StructExprFieldIdentifier &> (*field));
+ compiler.visit (static_cast<HIR::StructExprFieldIdentifier &> (field));
break;
case HIR::StructExprField::StructExprFieldKind::IDENTIFIER_VALUE:
compiler.visit (
- static_cast<HIR::StructExprFieldIdentifierValue &> (*field));
+ static_cast<HIR::StructExprFieldIdentifierValue &> (field));
break;
case HIR::StructExprField::StructExprFieldKind::INDEX_VALUE:
- compiler.visit (static_cast<HIR::StructExprFieldIndexValue &> (*field));
+ compiler.visit (static_cast<HIR::StructExprFieldIndexValue &> (field));
break;
}
return compiler.translated;
@@ -51,13 +51,13 @@ CompileStructExprField::Compile (HIR::StructExprField *field, Context *ctx)
void
CompileStructExprField::visit (HIR::StructExprFieldIdentifierValue &field)
{
- translated = CompileExpr::Compile (field.get_value ().get (), ctx);
+ translated = CompileExpr::Compile (field.get_value (), ctx);
}
void
CompileStructExprField::visit (HIR::StructExprFieldIndexValue &field)
{
- translated = CompileExpr::Compile (field.get_value ().get (), ctx);
+ translated = CompileExpr::Compile (field.get_value (), ctx);
}
void
@@ -74,7 +74,7 @@ CompileStructExprField::visit (HIR::StructExprFieldIdentifier &field)
HIR::GenericArgs::create_empty ());
HIR::PathInExpression expr (mappings_copy2, {seg}, field.get_locus (), false,
{});
- translated = CompileExpr::Compile (&expr, ctx);
+ translated = CompileExpr::Compile (expr, ctx);
}
} // namespace Compile
diff --git a/gcc/rust/backend/rust-compile-struct-field-expr.h b/gcc/rust/backend/rust-compile-struct-field-expr.h
index f1d7055..055019c 100644
--- a/gcc/rust/backend/rust-compile-struct-field-expr.h
+++ b/gcc/rust/backend/rust-compile-struct-field-expr.h
@@ -27,7 +27,7 @@ namespace Compile {
class CompileStructExprField : private HIRCompileBase
{
public:
- static tree Compile (HIR::StructExprField *field, Context *ctx);
+ static tree Compile (HIR::StructExprField &field, Context *ctx);
protected:
void visit (HIR::StructExprFieldIdentifierValue &field);
diff --git a/gcc/rust/backend/rust-compile-type.cc b/gcc/rust/backend/rust-compile-type.cc
index b546a05..85e7865 100644
--- a/gcc/rust/backend/rust-compile-type.cc
+++ b/gcc/rust/backend/rust-compile-type.cc
@@ -22,6 +22,7 @@
#include "rust-gcc.h"
#include "tree.h"
+#include "stor-layout.h"
namespace Rust {
namespace Compile {
@@ -208,12 +209,12 @@ TyTyResolveCompile::visit (const TyTy::FnType &type)
for (auto &param_pair : type.get_params ())
{
- auto param_tyty = param_pair.second;
+ auto param_tyty = param_pair.get_type ();
auto compiled_param_type
= TyTyResolveCompile::compile (ctx, param_tyty, trait_object_mode);
auto compiled_param = Backend::typed_identifier (
- param_pair.first->as_string (), compiled_param_type,
+ param_pair.get_pattern ().as_string (), compiled_param_type,
ctx->get_mappings ().lookup_location (param_tyty->get_ref ()));
parameters.push_back (compiled_param);
@@ -268,8 +269,8 @@ TyTyResolveCompile::visit (const TyTy::ADTType &type)
fields.push_back (std::move (f));
}
- type_record = type.is_union () ? Backend::union_type (fields)
- : Backend::struct_type (fields);
+ type_record = type.is_union () ? Backend::union_type (fields, false)
+ : Backend::struct_type (fields, false);
}
else
{
@@ -297,21 +298,39 @@ TyTyResolveCompile::visit (const TyTy::ADTType &type)
// Ada, qual_union_types might still work for this but I am not 100% sure.
// I ran into some issues lets reuse our normal union and ask Ada people
// about it.
+ //
+ // I think the above is actually wrong and it should actually be this
+ //
+ // struct {
+ // int RUST$ENUM$DISR; // take into account the repr for this TODO
+ // union {
+ // // Variant A
+ // struct {
+ // // No additional fields
+ // } A;
+
+ // // Variant B
+ // struct {
+ // // No additional fields
+ // } B;
+
+ // // Variant C
+ // struct {
+ // char c;
+ // } C;
+
+ // // Variant D
+ // struct {
+ // int64_t x;
+ // int64_t y;
+ // } D;
+ // } payload; // The union of all variant data
+ // };
std::vector<tree> variant_records;
for (auto &variant : type.get_variants ())
{
std::vector<Backend::typed_identifier> fields;
-
- // add in the qualifier field for the variant
- tree enumeral_type
- = TyTyResolveCompile::get_implicit_enumeral_node_type ();
- Backend::typed_identifier f (RUST_ENUM_DISR_FIELD_NAME, enumeral_type,
- ctx->get_mappings ().lookup_location (
- variant->get_id ()));
- fields.push_back (std::move (f));
-
- // compile the rest of the fields
for (size_t i = 0; i < variant->num_fields (); i++)
{
const TyTy::StructFieldType *field
@@ -335,9 +354,6 @@ TyTyResolveCompile::visit (const TyTy::ADTType &type)
= Backend::named_type (variant->get_ident ().path.get (),
variant_record, variant->get_ident ().locus);
- // set the qualifier to be a builtin
- DECL_ARTIFICIAL (TYPE_FIELDS (variant_record)) = 1;
-
// add them to the list
variant_records.push_back (named_variant_record);
}
@@ -358,8 +374,27 @@ TyTyResolveCompile::visit (const TyTy::ADTType &type)
enum_fields.push_back (std::move (f));
}
+ //
+ location_t locus = ctx->get_mappings ().lookup_location (type.get_ref ());
+
// finally make the union or the enum
- type_record = Backend::union_type (enum_fields);
+ tree variants_union = Backend::union_type (enum_fields, false);
+ layout_type (variants_union);
+ tree named_union_record
+ = Backend::named_type ("payload", variants_union, locus);
+
+ // create the overall struct
+ tree enumeral_type
+ = TyTyResolveCompile::get_implicit_enumeral_node_type ();
+ Backend::typed_identifier discrim (RUST_ENUM_DISR_FIELD_NAME,
+ enumeral_type, locus);
+ Backend::typed_identifier variants_union_field ("payload",
+ named_union_record,
+ locus);
+
+ std::vector<Backend::typed_identifier> fields
+ = {discrim, variants_union_field};
+ type_record = Backend::struct_type (fields, false);
}
// Handle repr options
@@ -381,6 +416,7 @@ TyTyResolveCompile::visit (const TyTy::ADTType &type)
SET_TYPE_ALIGN (type_record, repr.align * 8);
TYPE_USER_ALIGN (type_record) = 1;
}
+ layout_type (type_record);
std::string named_struct_str
= type.get_ident ().path.get () + type.subst_as_string ();
@@ -428,7 +464,7 @@ TyTyResolveCompile::visit (const TyTy::ArrayType &type)
= TyTyResolveCompile::compile (ctx, type.get_element_type ());
ctx->push_const_context ();
- tree capacity_expr = CompileExpr::Compile (&type.get_capacity_expr (), ctx);
+ tree capacity_expr = CompileExpr::Compile (type.get_capacity_expr (), ctx);
ctx->pop_const_context ();
tree folded_capacity_expr = fold_expr (capacity_expr);
diff --git a/gcc/rust/backend/rust-compile-var-decl.h b/gcc/rust/backend/rust-compile-var-decl.h
index 6b6af77..4c46a7b 100644
--- a/gcc/rust/backend/rust-compile-var-decl.h
+++ b/gcc/rust/backend/rust-compile-var-decl.h
@@ -68,12 +68,12 @@ public:
void visit (HIR::TuplePattern &pattern) override
{
- switch (pattern.get_items ()->get_item_type ())
+ switch (pattern.get_items ().get_item_type ())
{
case HIR::TuplePatternItems::ItemType::MULTIPLE: {
rust_assert (TREE_CODE (translated_type) == RECORD_TYPE);
auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
- *pattern.get_items ());
+ pattern.get_items ());
size_t offs = 0;
for (auto &sub : items.get_patterns ())
diff --git a/gcc/rust/backend/rust-compile.cc b/gcc/rust/backend/rust-compile.cc
index 7e0a9b6..7b00066 100644
--- a/gcc/rust/backend/rust-compile.cc
+++ b/gcc/rust/backend/rust-compile.cc
@@ -259,17 +259,17 @@ HIRCompileBase::compute_address_for_trait_item (
HIR::ImplBlock *impl_block = item.second;
rust_assert (impl_block != nullptr);
- // Lookup type for potentially associated impl.
- std::unique_ptr<HIR::Type> &self_type_path = impl_block->get_type ();
-
// Checks for empty impl blocks, triggered by Sized trait.
- if (self_type_path == nullptr)
+ if (!impl_block->has_type ())
continue;
+ // Lookup type for potentially associated impl.
+ HIR::Type &self_type_path = impl_block->get_type ();
+
// Convert HIR::Type to TyTy::BaseType
TyTy::BaseType *self = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (
- self_type_path->get_mappings ().get_hirid (), &self);
+ self_type_path.get_mappings ().get_hirid (), &self);
rust_assert (ok);
diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc
index bfd7d95..2f2bbbd 100644
--- a/gcc/rust/backend/rust-constexpr.cc
+++ b/gcc/rust/backend/rust-constexpr.cc
@@ -2929,8 +2929,13 @@ eval_store_expression (const constexpr_ctx *ctx, tree t, bool lval,
}
}
+ if (*non_constant_p)
+ return t;
+
/* Don't share a CONSTRUCTOR that might be changed later. */
init = unshare_constructor (init);
+ if (init == NULL_TREE)
+ return t;
if (*valp && TREE_CODE (*valp) == CONSTRUCTOR
&& TREE_CODE (init) == CONSTRUCTOR)
@@ -3585,9 +3590,6 @@ eval_call_expression (const constexpr_ctx *ctx, tree t, bool lval,
result = *ctx->global->values.get (res);
if (result == NULL_TREE && !*non_constant_p)
{
- if (!ctx->quiet)
- error ("%<constexpr%> call flows off the end "
- "of the function");
*non_constant_p = true;
}
}
diff --git a/gcc/rust/backend/rust-mangle-legacy.cc b/gcc/rust/backend/rust-mangle-legacy.cc
index 2c0ddd9..7671982 100644
--- a/gcc/rust/backend/rust-mangle-legacy.cc
+++ b/gcc/rust/backend/rust-mangle-legacy.cc
@@ -21,7 +21,6 @@
#include "rust-unicode.h"
#include "rust-diagnostics.h"
#include "rust-system.h"
-#include <sstream>
namespace Rust {
namespace Compile {
diff --git a/gcc/rust/backend/rust-mangle-v0.cc b/gcc/rust/backend/rust-mangle-v0.cc
index d604dcf..d0df4ab 100644
--- a/gcc/rust/backend/rust-mangle-v0.cc
+++ b/gcc/rust/backend/rust-mangle-v0.cc
@@ -25,7 +25,6 @@
#include "rust-unicode.h"
#include "rust-punycode.h"
#include "rust-compile-type.h"
-#include <sstream>
namespace Rust {
namespace Compile {
@@ -328,7 +327,7 @@ v0_inherent_or_trait_impl_path (Rust::Compile::Context *ctx,
// lookup impl type
TyTy::BaseType *impl_ty = nullptr;
ok = ctx->get_tyctx ()->lookup_type (
- impl_block->get_type ()->get_mappings ().get_hirid (), &impl_ty);
+ impl_block->get_type ().get_mappings ().get_hirid (), &impl_ty);
rust_assert (ok);
// FIXME: dummy value for now
@@ -342,7 +341,7 @@ v0_inherent_or_trait_impl_path (Rust::Compile::Context *ctx,
TyTy::BaseType *trait_ty = nullptr;
ok = ctx->get_tyctx ()->lookup_type (
- impl_block->get_trait_ref ()->get_mappings ().get_hirid (), &trait_ty);
+ impl_block->get_trait_ref ().get_mappings ().get_hirid (), &trait_ty);
rust_assert (ok);
v0path.trait_type = v0_type_prefix (ctx, trait_ty);
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc b/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
index 1713bf6..d6acc6a 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.cc
@@ -135,7 +135,7 @@ ExprStmtBuilder::visit (HIR::LiteralExpr &expr)
void
ExprStmtBuilder::visit (HIR::BorrowExpr &expr)
{
- auto operand = visit_expr (*expr.get_expr ());
+ auto operand = visit_expr (expr.get_expr ());
if (ctx.place_db[operand].is_constant ())
{
// Cannot borrow a constant, must create a temporary copy.
@@ -150,7 +150,7 @@ ExprStmtBuilder::visit (HIR::BorrowExpr &expr)
void
ExprStmtBuilder::visit (HIR::DereferenceExpr &expr)
{
- auto operand = visit_expr (*expr.get_expr ());
+ auto operand = visit_expr (expr.get_expr ());
return_place (ctx.place_db.lookup_or_add_path (Place::DEREF,
lookup_type (expr), operand),
expr.get_locus ());
@@ -166,30 +166,31 @@ ExprStmtBuilder::visit (HIR::ErrorPropagationExpr &expr)
void
ExprStmtBuilder::visit (HIR::NegationExpr &expr)
{
- PlaceId operand = visit_expr (*expr.get_expr ());
- return_expr (new Operator<1> ({move_place (operand, expr.get_locus ())}),
+ PlaceId operand = visit_expr (expr.get_expr ());
+ return_expr (new Operator<1> (
+ {move_place (operand, expr.get_expr ().get_locus ())}),
lookup_type (expr), expr.get_locus ());
}
void
ExprStmtBuilder::visit (HIR::ArithmeticOrLogicalExpr &expr)
{
- PlaceId lhs = visit_expr (*expr.get_lhs ());
- PlaceId rhs = visit_expr (*expr.get_rhs ());
+ PlaceId lhs = visit_expr (expr.get_lhs ());
+ PlaceId rhs = visit_expr (expr.get_rhs ());
return_expr (new Operator<2> (
- {move_place (lhs, expr.get_lhs ()->get_locus ()),
- move_place (rhs, expr.get_rhs ()->get_locus ())}),
+ {move_place (lhs, expr.get_lhs ().get_locus ()),
+ move_place (rhs, expr.get_rhs ().get_locus ())}),
lookup_type (expr), expr.get_locus ());
}
void
ExprStmtBuilder::visit (HIR::ComparisonExpr &expr)
{
- PlaceId lhs = visit_expr (*expr.get_lhs ());
- PlaceId rhs = visit_expr (*expr.get_rhs ());
+ PlaceId lhs = visit_expr (expr.get_lhs ());
+ PlaceId rhs = visit_expr (expr.get_rhs ());
return_expr (new Operator<2> (
- {move_place (lhs, expr.get_lhs ()->get_locus ()),
- move_place (rhs, expr.get_rhs ()->get_locus ())}),
+ {move_place (lhs, expr.get_lhs ().get_locus ()),
+ move_place (rhs, expr.get_rhs ().get_locus ())}),
lookup_type (expr), expr.get_locus ());
}
@@ -205,7 +206,7 @@ ExprStmtBuilder::visit (HIR::LazyBooleanExpr &expr)
void
ExprStmtBuilder::visit (HIR::TypeCastExpr &expr)
{
- auto operand = visit_expr (*expr.get_expr ());
+ auto operand = visit_expr (expr.get_expr ());
return_expr (new Operator<1> ({operand}), lookup_type (expr),
expr.get_locus ());
}
@@ -213,8 +214,8 @@ ExprStmtBuilder::visit (HIR::TypeCastExpr &expr)
void
ExprStmtBuilder::visit (HIR::AssignmentExpr &expr)
{
- auto lhs = visit_expr (*expr.get_lhs ());
- auto rhs = visit_expr (*expr.get_rhs ());
+ auto lhs = visit_expr (expr.get_lhs ());
+ auto rhs = visit_expr (expr.get_rhs ());
push_assignment (lhs, rhs, expr.get_locus ());
translated = INVALID_PLACE;
}
@@ -222,25 +223,25 @@ ExprStmtBuilder::visit (HIR::AssignmentExpr &expr)
void
ExprStmtBuilder::visit (HIR::CompoundAssignmentExpr &expr)
{
- auto lhs = visit_expr (*expr.get_lhs ());
- auto rhs = visit_expr (*expr.get_rhs ());
+ auto lhs = visit_expr (expr.get_lhs ());
+ auto rhs = visit_expr (expr.get_rhs ());
push_assignment (lhs, new Operator<2> ({lhs, rhs}), expr.get_locus ());
}
void
ExprStmtBuilder::visit (HIR::GroupedExpr &expr)
{
- return_place (visit_expr (*expr.get_expr_in_parens ()), expr.get_locus ());
+ return_place (visit_expr (expr.get_expr_in_parens ()), expr.get_locus ());
}
void
ExprStmtBuilder::visit (HIR::ArrayExpr &expr)
{
auto &elems = expr.get_internal_elements ();
- switch (elems->get_array_expr_type ())
+ switch (elems.get_array_expr_type ())
{
case HIR::ArrayElems::VALUES: {
- auto &elem_vals = (static_cast<HIR::ArrayElemsValues &> (*elems));
+ auto &elem_vals = (static_cast<HIR::ArrayElemsValues &> (elems));
auto init_values = visit_list (elem_vals.get_values ());
// collect locations
std::vector<location_t> value_locations;
@@ -254,8 +255,8 @@ ExprStmtBuilder::visit (HIR::ArrayExpr &expr)
break;
}
case HIR::ArrayElems::COPIED: {
- auto &elem_copied = (static_cast<HIR::ArrayElemsCopied &> (*elems));
- auto init = visit_expr (*elem_copied.get_elem_to_copy ());
+ auto &elem_copied = (static_cast<HIR::ArrayElemsCopied &> (elems));
+ auto init = visit_expr (elem_copied.get_elem_to_copy ());
return_expr (new InitializerExpr ({init}), lookup_type (expr),
expr.get_locus ());
break;
@@ -266,8 +267,8 @@ ExprStmtBuilder::visit (HIR::ArrayExpr &expr)
void
ExprStmtBuilder::visit (HIR::ArrayIndexExpr &expr)
{
- auto lhs = visit_expr (*expr.get_array_expr ());
- auto rhs = visit_expr (*expr.get_index_expr ());
+ auto lhs = visit_expr (expr.get_array_expr ());
+ auto rhs = visit_expr (expr.get_index_expr ());
// The index is not tracked in BIR.
std::ignore = rhs;
return_place (ctx.place_db.lookup_or_add_path (Place::INDEX,
@@ -286,7 +287,7 @@ ExprStmtBuilder::visit (HIR::TupleExpr &expr)
void
ExprStmtBuilder::visit (HIR::TupleIndexExpr &expr)
{
- auto tuple = visit_expr (*expr.get_tuple_expr ());
+ auto tuple = visit_expr (expr.get_tuple_expr ());
return_place (ctx.place_db.lookup_or_add_path (Place::FIELD,
lookup_type (expr), tuple,
expr.get_tuple_index ()),
@@ -296,7 +297,7 @@ ExprStmtBuilder::visit (HIR::TupleIndexExpr &expr)
void
ExprStmtBuilder::visit (HIR::CallExpr &expr)
{
- PlaceId fn = visit_expr (*expr.get_fnexpr ());
+ PlaceId fn = visit_expr (expr.get_fnexpr ());
std::vector<PlaceId> arguments = visit_list (expr.get_arguments ());
const auto fn_type
@@ -330,7 +331,7 @@ ExprStmtBuilder::visit (HIR::MethodCallExpr &expr)
void
ExprStmtBuilder::visit (HIR::FieldAccessExpr &expr)
{
- auto receiver = visit_expr (*expr.get_receiver_expr ());
+ auto receiver = visit_expr (expr.get_receiver_expr ());
auto type = autoderef (receiver);
rust_assert (type->get_kind () == TyTy::ADT);
auto adt = type->as<TyTy::ADTType> ();
@@ -383,7 +384,7 @@ ExprStmtBuilder::visit (HIR::BlockExpr &block)
if (block.has_expr () && !unreachable)
{
push_assignment (block_ctx.label_var,
- visit_expr (*block.get_final_expr ()),
+ visit_expr (block.get_final_expr ()),
block.get_start_locus ());
}
if (!ctx.get_current_bb ().is_terminated ())
@@ -397,9 +398,9 @@ ExprStmtBuilder::visit (HIR::BlockExpr &block)
}
else if (block.has_expr () && !unreachable)
{
- return_place (visit_expr (*block.get_final_expr (),
+ return_place (visit_expr (block.get_final_expr (),
take_or_create_return_place (
- lookup_type (*block.get_final_expr ()))),
+ lookup_type (block.get_final_expr ()))),
block.get_start_locus ());
}
@@ -426,7 +427,7 @@ ExprStmtBuilder::visit (HIR::BreakExpr &brk)
LoopAndLabelCtx info = brk.has_label () ? get_label_ctx (brk.get_label ())
: get_unnamed_loop_ctx ();
if (brk.has_break_expr ())
- push_assignment (info.label_var, visit_expr (*brk.get_expr ()),
+ push_assignment (info.label_var, visit_expr (brk.get_expr ()),
brk.get_locus ());
start_new_consecutive_bb ();
@@ -438,8 +439,8 @@ ExprStmtBuilder::visit (HIR::BreakExpr &brk)
void
ExprStmtBuilder::visit (HIR::RangeFromToExpr &range)
{
- auto from = visit_expr (*range.get_from_expr ());
- auto to = visit_expr (*range.get_to_expr ());
+ auto from = visit_expr (range.get_from_expr ());
+ auto to = visit_expr (range.get_to_expr ());
return_expr (new InitializerExpr ({from, to}), lookup_type (range),
range.get_locus ());
}
@@ -447,7 +448,7 @@ ExprStmtBuilder::visit (HIR::RangeFromToExpr &range)
void
ExprStmtBuilder::visit (HIR::RangeFromExpr &expr)
{
- auto from = visit_expr (*expr.get_from_expr ());
+ auto from = visit_expr (expr.get_from_expr ());
return_expr (new InitializerExpr ({from}), lookup_type (expr),
expr.get_locus ());
}
@@ -455,7 +456,7 @@ ExprStmtBuilder::visit (HIR::RangeFromExpr &expr)
void
ExprStmtBuilder::visit (HIR::RangeToExpr &expr)
{
- auto to = visit_expr (*expr.get_to_expr ());
+ auto to = visit_expr (expr.get_to_expr ());
return_expr (new InitializerExpr ({to}), lookup_type (expr),
expr.get_locus ());
}
@@ -469,8 +470,8 @@ ExprStmtBuilder::visit (HIR::RangeFullExpr &expr)
void
ExprStmtBuilder::visit (HIR::RangeFromToInclExpr &expr)
{
- auto from = visit_expr (*expr.get_from_expr ());
- auto to = visit_expr (*expr.get_to_expr ());
+ auto from = visit_expr (expr.get_from_expr ());
+ auto to = visit_expr (expr.get_to_expr ());
return_expr (new InitializerExpr ({from, to}), lookup_type (expr),
expr.get_locus ());
}
@@ -478,7 +479,7 @@ ExprStmtBuilder::visit (HIR::RangeFromToInclExpr &expr)
void
ExprStmtBuilder::visit (HIR::RangeToInclExpr &expr)
{
- auto to = visit_expr (*expr.get_to_expr ());
+ auto to = visit_expr (expr.get_to_expr ());
return_expr (new InitializerExpr ({to}), lookup_type (expr),
expr.get_locus ());
}
@@ -489,9 +490,9 @@ ExprStmtBuilder::visit (HIR::ReturnExpr &ret)
if (ret.has_return_expr ())
{
push_assignment (RETURN_VALUE_PLACE,
- move_place (visit_expr (*ret.get_expr ()),
- ret.get_expr ()->get_locus ()),
- ret.get_expr ()->get_locus ());
+ move_place (visit_expr (ret.get_expr ()),
+ ret.get_expr ().get_locus ()),
+ ret.get_expr ().get_locus ());
}
unwind_until (ROOT_SCOPE);
push_return (ret.get_locus ());
@@ -509,7 +510,7 @@ ExprStmtBuilder::visit (HIR::LoopExpr &expr)
{
auto loop = setup_loop (expr);
- std::ignore = visit_expr (*expr.get_loop_block ());
+ std::ignore = visit_expr (expr.get_loop_block ());
if (!ctx.get_current_bb ().is_terminated ())
push_goto (loop.continue_bb);
@@ -521,12 +522,12 @@ ExprStmtBuilder::visit (HIR::WhileLoopExpr &expr)
{
auto loop = setup_loop (expr);
- auto cond_val = visit_expr (*expr.get_predicate_expr ());
+ auto cond_val = visit_expr (expr.get_predicate_expr ());
auto body_bb = new_bb ();
push_switch (cond_val, expr.get_locus (), {body_bb, loop.break_bb});
ctx.current_bb = body_bb;
- std::ignore = visit_expr (*expr.get_loop_block ());
+ std::ignore = visit_expr (expr.get_loop_block ());
push_goto (loop.continue_bb);
ctx.current_bb = loop.break_bb;
@@ -544,15 +545,15 @@ ExprStmtBuilder::visit (HIR::IfExpr &expr)
{
// If without else cannot return a non-unit value (see [E0317]).
- if (expr.get_if_block ()->statements.empty ())
+ if (expr.get_if_block ().statements.empty ())
return;
- push_switch (visit_expr (*expr.get_if_condition ()), expr.get_locus ());
+ push_switch (visit_expr (expr.get_if_condition ()), expr.get_locus ());
BasicBlockId if_block = ctx.current_bb;
ctx.current_bb = new_bb ();
BasicBlockId then_start_block = ctx.current_bb;
- std::ignore = visit_expr (*expr.get_if_block ());
+ std::ignore = visit_expr (expr.get_if_block ());
if (!ctx.get_current_bb ().is_terminated ())
push_goto (INVALID_BB); // Resolved later.
BasicBlockId then_end_block = ctx.current_bb;
@@ -573,8 +574,8 @@ ExprStmtBuilder::visit (HIR::IfExpr &expr)
void
ExprStmtBuilder::visit (HIR::IfExprConseqElse &expr)
{
- push_switch (move_place (visit_expr (*expr.get_if_condition ()),
- expr.get_if_condition ()->get_locus ()),
+ push_switch (move_place (visit_expr (expr.get_if_condition ()),
+ expr.get_if_condition ().get_locus ()),
expr.get_locus ());
BasicBlockId if_end_bb = ctx.current_bb;
@@ -582,14 +583,14 @@ ExprStmtBuilder::visit (HIR::IfExprConseqElse &expr)
ctx.current_bb = new_bb ();
BasicBlockId then_start_bb = ctx.current_bb;
- std::ignore = visit_expr (*expr.get_if_block (), result);
+ std::ignore = visit_expr (expr.get_if_block (), result);
if (!ctx.get_current_bb ().is_terminated ())
push_goto (INVALID_BB); // Resolved later.
BasicBlockId then_end_bb = ctx.current_bb;
ctx.current_bb = new_bb ();
BasicBlockId else_start_bb = ctx.current_bb;
- std::ignore = visit_expr (*expr.get_else_block (), result);
+ std::ignore = visit_expr (expr.get_else_block (), result);
if (!ctx.get_current_bb ().is_terminated ())
push_goto (INVALID_BB); // Resolved later.
BasicBlockId else_end_bb = ctx.current_bb;
@@ -612,18 +613,6 @@ ExprStmtBuilder::visit (HIR::IfExprConseqElse &expr)
}
void
-ExprStmtBuilder::visit (HIR::IfLetExpr &expr)
-{
- rust_sorry_at (expr.get_locus (), "if let expressions are not supported");
-}
-
-void
-ExprStmtBuilder::visit (HIR::IfLetExprConseqElse &expr)
-{
- rust_sorry_at (expr.get_locus (), "if let expressions are not supported");
-}
-
-void
ExprStmtBuilder::visit (HIR::MatchExpr &expr)
{
rust_sorry_at (expr.get_locus (), "match expressions are not supported");
@@ -702,35 +691,35 @@ ExprStmtBuilder::visit (HIR::LetStmt &stmt)
tl::optional<TyTy::BaseType *> type_annotation;
if (stmt.has_type ())
- type_annotation = lookup_type (*stmt.get_type ());
+ type_annotation = lookup_type (stmt.get_type ());
- if (stmt.get_pattern ()->get_pattern_type () == HIR::Pattern::IDENTIFIER)
+ if (stmt.get_pattern ().get_pattern_type () == HIR::Pattern::IDENTIFIER)
{
// Only if a pattern is just an identifier, no destructuring is needed.
// Hoverer PatternBindingBuilder cannot change existing temporary
// (init expr is evaluated before pattern binding) into a
// variable, so it would emit extra assignment.
- auto var = declare_variable (stmt.get_pattern ()->get_mappings ());
+ auto var = declare_variable (stmt.get_pattern ().get_mappings ());
if (stmt.has_type ())
- push_user_type_ascription (var, lookup_type (*stmt.get_type ()));
+ push_user_type_ascription (var, lookup_type (stmt.get_type ()));
if (stmt.has_init_expr ())
- std::ignore = visit_expr (*stmt.get_init_expr (), var);
+ std::ignore = visit_expr (stmt.get_init_expr (), var);
}
else
{
if (stmt.has_init_expr ())
- init = visit_expr (*stmt.get_init_expr ());
+ init = visit_expr (stmt.get_init_expr ());
PatternBindingBuilder (ctx, init, type_annotation)
- .go (*stmt.get_pattern ());
+ .go (stmt.get_pattern ());
}
}
void
ExprStmtBuilder::visit (HIR::ExprStmt &stmt)
{
- PlaceId result = visit_expr (*stmt.get_expr ());
+ PlaceId result = visit_expr (stmt.get_expr ());
// We must read the value for current liveness and we must not store it into
// the same place.
if (result != INVALID_PLACE)
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h
index 574f0f3..daedb68 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-expr-stmt.h
@@ -101,8 +101,6 @@ protected: // Expr
void visit (HIR::IfExprConseqElse &expr) override;
void visit (HIR::InlineAsm &expr) override;
- void visit (HIR::IfLetExpr &expr) override;
- void visit (HIR::IfLetExprConseqElse &expr) override;
void visit (HIR::MatchExpr &expr) override;
void visit (HIR::AwaitExpr &expr) override;
void visit (HIR::AsyncBlockExpr &expr) override;
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h
index f499532..3bc622c 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-lazyboolexpr.h
@@ -63,16 +63,16 @@ public:
protected:
void visit (HIR::LazyBooleanExpr &expr) override
{
- auto lhs = visit_expr (*expr.get_lhs ());
- push_switch (move_place (lhs, expr.get_lhs ()->get_locus ()),
+ auto lhs = visit_expr (expr.get_lhs ());
+ push_switch (move_place (lhs, expr.get_lhs ().get_locus ()),
expr.get_locus (), {short_circuit_bb});
start_new_consecutive_bb ();
- return_place (visit_expr (*expr.get_rhs ()), expr.get_locus ());
+ return_place (visit_expr (expr.get_rhs ()), expr.get_locus ());
}
void visit (HIR::GroupedExpr &expr) override
{
- expr.get_expr_in_parens ()->accept_vis (*this);
+ expr.get_expr_in_parens ().accept_vis (*this);
}
protected:
@@ -193,14 +193,6 @@ public:
{
return_place (ExprStmtBuilder (ctx).build (expr), expr.get_locus ());
}
- void visit (HIR::IfLetExpr &expr) override
- {
- return_place (ExprStmtBuilder (ctx).build (expr), expr.get_locus ());
- }
- void visit (HIR::IfLetExprConseqElse &expr) override
- {
- return_place (ExprStmtBuilder (ctx).build (expr), expr.get_locus ());
- }
void visit (HIR::MatchExpr &expr) override
{
return_place (ExprStmtBuilder (ctx).build (expr), expr.get_locus ());
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc b/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc
index 723ff73..ee37bb0 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.cc
@@ -50,7 +50,7 @@ PatternBindingBuilder::visit (HIR::ReferencePattern &pattern)
return ty->as<TyTy::ReferenceType> ()->get_base ();
});
- pattern.get_referenced_pattern ()->accept_vis (*this);
+ pattern.get_referenced_pattern ().accept_vis (*this);
}
void
@@ -107,7 +107,7 @@ PatternBindingBuilder::visit (HIR::StructPattern &pattern)
init = init.map ([&] (PlaceId id) {
return ctx.place_db.lookup_or_add_path (
- Place::FIELD, lookup_type (*tuple->get_tuple_pattern ()), id,
+ Place::FIELD, lookup_type (tuple->get_tuple_pattern ()), id,
tuple->get_index ());
});
@@ -120,7 +120,7 @@ PatternBindingBuilder::visit (HIR::StructPattern &pattern)
->get_field_type ();
});
- tuple->get_tuple_pattern ()->accept_vis (*this);
+ tuple->get_tuple_pattern ().accept_vis (*this);
break;
}
case HIR::StructPatternField::IDENT_PAT: {
@@ -136,7 +136,7 @@ PatternBindingBuilder::visit (HIR::StructPattern &pattern)
field_ty->get_field_type (),
saved.init.value (),
field_index);
- ident_field->get_pattern ()->accept_vis (*this);
+ ident_field->get_pattern ().accept_vis (*this);
break;
}
case HIR::StructPatternField::IDENT: {
@@ -197,17 +197,17 @@ PatternBindingBuilder::visit (HIR::TuplePattern &pattern)
SavedState saved (this);
size_t index = 0;
- switch (pattern.get_items ()->get_item_type ())
+ switch (pattern.get_items ().get_item_type ())
{
case HIR::TuplePatternItems::MULTIPLE: {
auto &items = static_cast<HIR::TuplePatternItemsMultiple &> (
- *pattern.get_items ());
+ pattern.get_items ());
visit_tuple_fields (items.get_patterns (), saved, index);
break;
}
case HIR::TuplePatternItems::RANGED: {
auto &items
- = static_cast<HIR::TuplePatternItemsRanged &> (*pattern.get_items ());
+ = static_cast<HIR::TuplePatternItemsRanged &> (pattern.get_items ());
auto tyty = ctx.place_db[init.value ()].tyty;
rust_assert (tyty->get_kind () == TyTy::TUPLE);
@@ -242,11 +242,11 @@ PatternBindingBuilder::visit (HIR::TupleStructPattern &pattern)
});
size_t index = 0;
- switch (pattern.get_items ()->get_item_type ())
+ switch (pattern.get_items ().get_item_type ())
{
case HIR::TupleStructItems::RANGED: {
auto &items
- = static_cast<HIR::TupleStructItemsRange &> (*pattern.get_items ());
+ = static_cast<HIR::TupleStructItemsRange &> (pattern.get_items ());
rust_assert (type->get_kind () == TyTy::ADT);
auto adt_ty = static_cast<TyTy::ADTType *> (type);
@@ -263,7 +263,7 @@ PatternBindingBuilder::visit (HIR::TupleStructPattern &pattern)
}
case HIR::TupleStructItems::MULTIPLE: {
auto &items
- = static_cast<HIR::TupleStructItemsNoRange &> (*pattern.get_items ());
+ = static_cast<HIR::TupleStructItemsNoRange &> (pattern.get_items ());
visit_tuple_fields (items.get_patterns (), saved, index);
break;
}
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.h
index 5d4b85a..33ecd23 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-pattern.h
@@ -91,6 +91,7 @@ public:
void visit (HIR::QualifiedPathInExpression &expression) override {}
void visit (HIR::RangePattern &pattern) override {}
};
+
} // namespace BIR
} // namespace Rust
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h
index 53346bf..18ddc19 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder-struct.h
@@ -52,12 +52,12 @@ public:
}
void visit (HIR::StructExprFieldIdentifierValue &field) override
{
- auto value = ExprStmtBuilder (ctx).build (*field.get_value ());
+ auto value = ExprStmtBuilder (ctx).build (field.get_value ());
handle_named_field (field, value);
}
void visit (HIR::StructExprFieldIndexValue &field) override
{
- auto value = ExprStmtBuilder (ctx).build (*field.get_value ());
+ auto value = ExprStmtBuilder (ctx).build (field.get_value ());
coercion_site (value,
struct_ty->get_field_at_index (field.get_tuple_index ())
->get_field_type ());
@@ -149,8 +149,6 @@ protected:
void visit (HIR::WhileLetLoopExpr &expr) override { rust_unreachable (); }
void visit (HIR::IfExpr &expr) override { rust_unreachable (); }
void visit (HIR::IfExprConseqElse &expr) override { rust_unreachable (); }
- void visit (HIR::IfLetExpr &expr) override { rust_unreachable (); }
- void visit (HIR::IfLetExprConseqElse &expr) override { rust_unreachable (); }
void visit (HIR::MatchExpr &expr) override { rust_unreachable (); }
void visit (HIR::AwaitExpr &expr) override { rust_unreachable (); }
void visit (HIR::AsyncBlockExpr &expr) override { rust_unreachable (); }
diff --git a/gcc/rust/checks/errors/borrowck/rust-bir-builder.h b/gcc/rust/checks/errors/borrowck/rust-bir-builder.h
index 63d3262..e5bdb46 100644
--- a/gcc/rust/checks/errors/borrowck/rust-bir-builder.h
+++ b/gcc/rust/checks/errors/borrowck/rust-bir-builder.h
@@ -49,7 +49,7 @@ public:
for (auto &param : function.get_function_params ())
handle_param (param);
- handle_body (*function.get_definition ());
+ handle_body (function.get_definition ());
auto region_hir_map
= map_region_to_hir (function.get_generic_params (), ctx.fn_free_regions);
@@ -118,14 +118,14 @@ private:
void handle_param (HIR::FunctionParam &param)
{
- auto param_type = lookup_type (*param.get_param_name ());
+ auto param_type = lookup_type (param.get_param_name ());
auto &pattern = param.get_param_name ();
- if (pattern->get_pattern_type () == HIR::Pattern::IDENTIFIER
- && !static_cast<HIR::IdentifierPattern &> (*pattern).get_is_ref ())
+ if (pattern.get_pattern_type () == HIR::Pattern::IDENTIFIER
+ && !static_cast<HIR::IdentifierPattern &> (pattern).get_is_ref ())
{
// Avoid useless temporary variable for parameter to look like MIR.
- translated = declare_variable (pattern->get_mappings ());
+ translated = declare_variable (pattern.get_mappings ());
ctx.arguments.push_back (translated);
}
else
@@ -133,11 +133,9 @@ private:
translated = ctx.place_db.add_temporary (param_type);
ctx.arguments.push_back (translated);
PatternBindingBuilder (ctx, translated, tl::nullopt)
- .go (*param.get_param_name ());
+ .go (param.get_param_name ());
}
- rust_assert (param.get_type () != nullptr);
-
// Set parameter place to use functions regions, not the fresh ones.
ctx.place_db[translated].regions
= bind_regions (Resolver::TypeCheckContext::get ()
@@ -159,7 +157,7 @@ private:
body.get_end_locus ());
}
auto return_location = body.has_expr ()
- ? body.get_final_expr ()->get_locus ()
+ ? body.get_final_expr ().get_locus ()
: body.get_end_locus ();
push_return (return_location);
}
diff --git a/gcc/rust/checks/errors/borrowck/rust-function-collector.h b/gcc/rust/checks/errors/borrowck/rust-function-collector.h
index 51109d7..5de503d 100644
--- a/gcc/rust/checks/errors/borrowck/rust-function-collector.h
+++ b/gcc/rust/checks/errors/borrowck/rust-function-collector.h
@@ -56,13 +56,13 @@ protected:
void visit (HIR::Function &function) override
{
functions.push_back (&function);
- function.get_definition ()->accept_vis (*this);
+ function.get_definition ().accept_vis (*this);
}
void visit (HIR::ClosureExpr &closure) override
{
closures.push_back (&closure);
- closure.get_expr ()->accept_vis (*this);
+ closure.get_expr ().accept_vis (*this);
}
// TODO: recurse for nested closures and functions.
@@ -119,8 +119,6 @@ public:
void visit (HIR::WhileLetLoopExpr &expr) override {}
void visit (HIR::IfExpr &expr) override {}
void visit (HIR::IfExprConseqElse &expr) override {}
- void visit (HIR::IfLetExpr &expr) override {}
- void visit (HIR::IfLetExprConseqElse &expr) override {}
void visit (HIR::MatchExpr &expr) override {}
void visit (HIR::AwaitExpr &expr) override {}
void visit (HIR::AsyncBlockExpr &expr) override {}
diff --git a/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc b/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
index 01d8ea5..dcc768f 100644
--- a/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
+++ b/gcc/rust/checks/errors/privacy/rust-privacy-reporter.cc
@@ -22,6 +22,7 @@
#include "rust-hir-stmt.h"
#include "rust-hir-item.h"
#include "rust-attribute-values.h"
+#include "rust-immutable-name-resolution-context.h"
namespace Rust {
namespace Privacy {
@@ -93,6 +94,14 @@ static bool
is_child_module (Analysis::Mappings &mappings, NodeId parent,
NodeId possible_child)
{
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ return nr_ctx.values.is_module_descendant (parent, possible_child);
+ }
+
auto children = mappings.lookup_module_children (parent);
if (!children)
@@ -118,8 +127,16 @@ PrivacyReporter::check_for_privacy_violation (const NodeId &use_id,
{
NodeId ref_node_id = UNKNOWN_NODEID;
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ if (auto id = nr_ctx.lookup (use_id))
+ ref_node_id = *id;
+ }
// FIXME: Don't assert here - we might be dealing with a type
- if (!resolver.lookup_resolved_name (use_id, &ref_node_id))
+ else if (!resolver.lookup_resolved_name (use_id, &ref_node_id))
resolver.lookup_resolved_type (use_id, &ref_node_id);
// FIXME: Assert here. For now, we return since this causes issues when
@@ -258,16 +275,13 @@ PrivacyReporter::check_base_type_privacy (Analysis::NodeMapping &node_mappings,
}
void
-PrivacyReporter::check_type_privacy (const HIR::Type *type)
+PrivacyReporter::check_type_privacy (const HIR::Type &type)
{
- rust_assert (type);
-
TyTy::BaseType *lookup = nullptr;
- rust_assert (
- ty_ctx.lookup_type (type->get_mappings ().get_hirid (), &lookup));
+ rust_assert (ty_ctx.lookup_type (type.get_mappings ().get_hirid (), &lookup));
- auto node_mappings = type->get_mappings ();
- return check_base_type_privacy (node_mappings, lookup, type->get_locus ());
+ auto node_mappings = type.get_mappings ();
+ return check_base_type_privacy (node_mappings, lookup, type.get_locus ());
}
void
@@ -317,100 +331,98 @@ PrivacyReporter::visit (HIR::LiteralExpr &)
void
PrivacyReporter::visit (HIR::BorrowExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::DereferenceExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::ErrorPropagationExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::NegationExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::ArithmeticOrLogicalExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::ComparisonExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::LazyBooleanExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::TypeCastExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::AssignmentExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::CompoundAssignmentExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::GroupedExpr &expr)
{
- expr.get_expr_in_parens ()->accept_vis (*this);
+ expr.get_expr_in_parens ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::ArrayExpr &expr)
{
- HIR::ArrayElems &elements = *expr.get_internal_elements ();
+ HIR::ArrayElems &elements = expr.get_internal_elements ();
switch (elements.get_array_expr_type ())
{
case HIR::ArrayElems::ArrayExprType::VALUES: {
- HIR::ArrayElemsValues &elems
- = static_cast<HIR::ArrayElemsValues &> (elements);
+ auto &elems = static_cast<HIR::ArrayElemsValues &> (elements);
for (auto &value : elems.get_values ())
value->accept_vis (*this);
}
return;
case HIR::ArrayElems::ArrayExprType::COPIED:
- HIR::ArrayElemsCopied &elems
- = static_cast<HIR::ArrayElemsCopied &> (elements);
- elems.get_elem_to_copy ()->accept_vis (*this);
+ auto &elems = static_cast<HIR::ArrayElemsCopied &> (elements);
+ elems.get_elem_to_copy ().accept_vis (*this);
}
}
void
PrivacyReporter::visit (HIR::ArrayIndexExpr &expr)
{
- expr.get_array_expr ()->accept_vis (*this);
- expr.get_index_expr ()->accept_vis (*this);
+ expr.get_array_expr ().accept_vis (*this);
+ expr.get_index_expr ().accept_vis (*this);
}
void
@@ -423,7 +435,7 @@ PrivacyReporter::visit (HIR::TupleExpr &expr)
void
PrivacyReporter::visit (HIR::TupleIndexExpr &expr)
{
- expr.get_tuple_expr ()->accept_vis (*this);
+ expr.get_tuple_expr ().accept_vis (*this);
}
void
@@ -439,13 +451,13 @@ PrivacyReporter::visit (HIR::StructExprFieldIdentifier &)
void
PrivacyReporter::visit (HIR::StructExprFieldIdentifierValue &field)
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::StructExprFieldIndexValue &field)
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void
@@ -458,7 +470,7 @@ PrivacyReporter::visit (HIR::StructExprStructFields &expr)
void
PrivacyReporter::visit (HIR::CallExpr &expr)
{
- expr.get_fnexpr ()->accept_vis (*this);
+ expr.get_fnexpr ().accept_vis (*this);
for (auto &param : expr.get_arguments ())
param->accept_vis (*this);
@@ -467,7 +479,7 @@ PrivacyReporter::visit (HIR::CallExpr &expr)
void
PrivacyReporter::visit (HIR::MethodCallExpr &expr)
{
- expr.get_receiver ()->accept_vis (*this);
+ expr.get_receiver ().accept_vis (*this);
for (auto &param : expr.get_arguments ())
param->accept_vis (*this);
@@ -476,7 +488,7 @@ PrivacyReporter::visit (HIR::MethodCallExpr &expr)
void
PrivacyReporter::visit (HIR::FieldAccessExpr &expr)
{
- expr.get_receiver_expr ()->accept_vis (*this);
+ expr.get_receiver_expr ().accept_vis (*this);
// FIXME: We should also check if the field is public?
}
@@ -493,9 +505,8 @@ PrivacyReporter::visit (HIR::BlockExpr &expr)
for (auto &stmt : expr.get_statements ())
stmt->accept_vis (*this);
- auto &last_expr = expr.get_final_expr ();
- if (last_expr)
- last_expr->accept_vis (*this);
+ if (expr.has_final_expr ())
+ expr.get_final_expr ().accept_vis (*this);
}
void
@@ -505,28 +516,27 @@ PrivacyReporter::visit (HIR::ContinueExpr &)
void
PrivacyReporter::visit (HIR::BreakExpr &expr)
{
- auto &break_expr = expr.get_expr ();
- if (break_expr)
- break_expr->accept_vis (*this);
+ if (expr.has_break_expr ())
+ expr.get_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::RangeFromToExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::RangeFromExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::RangeToExpr &expr)
{
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
@@ -536,8 +546,8 @@ PrivacyReporter::visit (HIR::RangeFullExpr &)
void
PrivacyReporter::visit (HIR::RangeFromToInclExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
@@ -549,70 +559,55 @@ PrivacyReporter::visit (HIR::RangeToInclExpr &)
void
PrivacyReporter::visit (HIR::ReturnExpr &expr)
{
- if (expr.get_expr ())
- expr.get_expr ()->accept_vis (*this);
+ if (expr.has_expr ())
+ expr.get_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::UnsafeBlockExpr &expr)
{
- expr.get_block_expr ()->accept_vis (*this);
+ expr.get_block_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::LoopExpr &expr)
{
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::WhileLoopExpr &expr)
{
- expr.get_predicate_expr ()->accept_vis (*this);
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_predicate_expr ().accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::WhileLetLoopExpr &expr)
{
- expr.get_cond ()->accept_vis (*this);
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_cond ().accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::IfExpr &expr)
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::IfExprConseqElse &expr)
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
- expr.get_else_block ()->accept_vis (*this);
-}
-
-void
-PrivacyReporter::visit (HIR::IfLetExpr &)
-{
- // TODO: We need to visit the if_let_expr
- // TODO: We need to visit the block as well
-}
-
-void
-PrivacyReporter::visit (HIR::IfLetExprConseqElse &)
-{
- // TODO: We need to visit the if_let_expr
- // TODO: We need to visit the if_block as well
- // TODO: We need to visit the else_block as well
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
+ expr.get_else_block ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::MatchExpr &expr)
{
- expr.get_scrutinee_expr ()->accept_vis (*this);
+ expr.get_scrutinee_expr ().accept_vis (*this);
}
void
@@ -655,9 +650,9 @@ void
PrivacyReporter::visit (HIR::Function &function)
{
for (auto &param : function.get_function_params ())
- check_type_privacy (param.get_type ().get ());
+ check_type_privacy (param.get_type ());
- function.get_definition ()->accept_vis (*this);
+ function.get_definition ().accept_vis (*this);
}
void
@@ -714,14 +709,14 @@ void
PrivacyReporter::visit (HIR::ConstantItem &const_item)
{
// TODO: We need to visit the type
- const_item.get_expr ()->accept_vis (*this);
+ const_item.get_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::StaticItem &static_item)
{
// TODO: We need to visit the type
- static_item.get_expr ()->accept_vis (*this);
+ static_item.get_expr ().accept_vis (*this);
}
void
@@ -754,17 +749,17 @@ PrivacyReporter::visit (HIR::EmptyStmt &)
void
PrivacyReporter::visit (HIR::LetStmt &stmt)
{
- if (stmt.get_type ())
- check_type_privacy (stmt.get_type ().get ());
+ if (stmt.has_type ())
+ check_type_privacy (stmt.get_type ());
- if (stmt.get_init_expr ())
- stmt.get_init_expr ()->accept_vis (*this);
+ if (stmt.has_init_expr ())
+ stmt.get_init_expr ().accept_vis (*this);
}
void
PrivacyReporter::visit (HIR::ExprStmt &stmt)
{
- stmt.get_expr ()->accept_vis (*this);
+ stmt.get_expr ().accept_vis (*this);
}
} // namespace Privacy
diff --git a/gcc/rust/checks/errors/privacy/rust-privacy-reporter.h b/gcc/rust/checks/errors/privacy/rust-privacy-reporter.h
index c4f94ab..5111a3e 100644
--- a/gcc/rust/checks/errors/privacy/rust-privacy-reporter.h
+++ b/gcc/rust/checks/errors/privacy/rust-privacy-reporter.h
@@ -75,7 +75,7 @@ types
* @param type Reference to an explicit type used in a statement, expression
* or parameter
*/
- void check_type_privacy (const HIR::Type *type);
+ void check_type_privacy (const HIR::Type &type);
virtual void visit (HIR::StructExprFieldIdentifier &field);
virtual void visit (HIR::StructExprFieldIdentifierValue &field);
@@ -121,8 +121,6 @@ types
virtual void visit (HIR::WhileLetLoopExpr &expr);
virtual void visit (HIR::IfExpr &expr);
virtual void visit (HIR::IfExprConseqElse &expr);
- virtual void visit (HIR::IfLetExpr &expr);
- virtual void visit (HIR::IfLetExprConseqElse &expr);
virtual void visit (HIR::MatchExpr &expr);
virtual void visit (HIR::AwaitExpr &expr);
virtual void visit (HIR::AsyncBlockExpr &expr);
diff --git a/gcc/rust/checks/errors/privacy/rust-reachability.cc b/gcc/rust/checks/errors/privacy/rust-reachability.cc
index 9e0cb82..1e57674 100644
--- a/gcc/rust/checks/errors/privacy/rust-reachability.cc
+++ b/gcc/rust/checks/errors/privacy/rust-reachability.cc
@@ -132,7 +132,7 @@ ReachabilityVisitor::visit (HIR::StructStruct &struct_item)
{
for (auto &field : struct_item.get_fields ())
if (field.get_visibility ().is_public ())
- ctx.update_reachability (field.get_field_type ()->get_mappings (),
+ ctx.update_reachability (field.get_field_type ().get_mappings (),
struct_reach);
}
diff --git a/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc b/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
index 464ce86..f0da745 100644
--- a/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
+++ b/gcc/rust/checks/errors/privacy/rust-visibility-resolver.cc
@@ -20,6 +20,10 @@
#include "rust-ast.h"
#include "rust-hir.h"
#include "rust-hir-item.h"
+#include "rust-immutable-name-resolution-context.h"
+
+// for flag_name_resolution_2_0
+#include "options.h"
namespace Rust {
namespace Privacy {
@@ -61,7 +65,22 @@ VisibilityResolver::resolve_module_path (const HIR::SimplePath &restriction,
"cannot use non-module path as privacy restrictor");
NodeId ref_node_id = UNKNOWN_NODEID;
- if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ if (auto id = nr_ctx.lookup (ast_node_id))
+ {
+ ref_node_id = *id;
+ }
+ else
+ {
+ invalid_path.emit ();
+ return false;
+ }
+ }
+ else if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))
{
invalid_path.emit ();
return false;
diff --git a/gcc/rust/checks/errors/rust-ast-validation.cc b/gcc/rust/checks/errors/rust-ast-validation.cc
index 7938286..59b2805 100644
--- a/gcc/rust/checks/errors/rust-ast-validation.cc
+++ b/gcc/rust/checks/errors/rust-ast-validation.cc
@@ -56,7 +56,7 @@ ASTValidation::visit (AST::LoopLabel &label)
void
ASTValidation::visit (AST::ConstantItem &const_item)
{
- if (!const_item.has_expr () && context.back () != Context::TRAIT_IMPL)
+ if (!const_item.has_expr () && ctx.peek () != Kind::TRAIT_IMPL)
{
rust_error_at (const_item.get_locus (),
"associated constant in %<impl%> without body");
@@ -82,23 +82,19 @@ ASTValidation::visit (AST::Function &function)
"functions cannot be both %<const%> and %<async%>");
if (qualifiers.is_const ()
- && (context.back () == Context::TRAIT_IMPL
- || context.back () == Context::TRAIT))
+ && (ctx.peek () == Kind::TRAIT_IMPL || ctx.peek () == Kind::TRAIT))
rust_error_at (function.get_locus (), ErrorCode::E0379,
"functions in traits cannot be declared %<const%>");
// may change soon
if (qualifiers.is_async ()
- && (context.back () == Context::TRAIT_IMPL
- || context.back () == Context::TRAIT))
+ && (ctx.peek () == Kind::TRAIT_IMPL || ctx.peek () == Kind::TRAIT))
rust_error_at (function.get_locus (), ErrorCode::E0706,
"functions in traits cannot be declared %<async%>");
// if not an associated function but has a self parameter
- if (context.back () != Context::TRAIT
- && context.back () != Context::TRAIT_IMPL
- && context.back () != Context::INHERENT_IMPL
- && function.has_self_param ())
+ if (ctx.peek () != Kind::TRAIT && ctx.peek () != Kind::TRAIT_IMPL
+ && ctx.peek () != Kind::INHERENT_IMPL && function.has_self_param ())
rust_error_at (
function.get_self_param ().get_locus (),
"%<self%> parameter is only allowed in associated functions");
@@ -140,11 +136,11 @@ ASTValidation::visit (AST::Function &function)
{
if (!function.has_body ())
{
- if (context.back () == Context::INHERENT_IMPL
- || context.back () == Context::TRAIT_IMPL)
+ if (ctx.peek () == Kind::INHERENT_IMPL
+ || ctx.peek () == Kind::TRAIT_IMPL)
rust_error_at (function.get_locus (),
"associated function in %<impl%> without body");
- else if (context.back () != Context::TRAIT)
+ else if (ctx.peek () != Kind::TRAIT)
rust_error_at (function.get_locus (),
"free function without a body");
}
diff --git a/gcc/rust/checks/errors/rust-const-checker.cc b/gcc/rust/checks/errors/rust-const-checker.cc
index 84c09dd..97b3528 100644
--- a/gcc/rust/checks/errors/rust-const-checker.cc
+++ b/gcc/rust/checks/errors/rust-const-checker.cc
@@ -161,72 +161,72 @@ ConstChecker::visit (LiteralExpr &)
void
ConstChecker::visit (BorrowExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
ConstChecker::visit (DereferenceExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
ConstChecker::visit (ErrorPropagationExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
ConstChecker::visit (NegationExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
ConstChecker::visit (ArithmeticOrLogicalExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
ConstChecker::visit (ComparisonExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
ConstChecker::visit (LazyBooleanExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
ConstChecker::visit (TypeCastExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
ConstChecker::visit (AssignmentExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
ConstChecker::visit (CompoundAssignmentExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
ConstChecker::visit (GroupedExpr &expr)
{
- expr.get_expr_in_parens ()->accept_vis (*this);
+ expr.get_expr_in_parens ().accept_vis (*this);
}
void
@@ -239,11 +239,11 @@ ConstChecker::visit (ArrayElemsValues &elems)
void
ConstChecker::visit (ArrayElemsCopied &elems)
{
- elems.get_elem_to_copy ()->accept_vis (*this);
+ elems.get_elem_to_copy ().accept_vis (*this);
const_context.enter (elems.get_mappings ().get_hirid ());
- elems.get_num_copies_expr ()->accept_vis (*this);
+ elems.get_num_copies_expr ().accept_vis (*this);
const_context.exit ();
}
@@ -251,14 +251,14 @@ ConstChecker::visit (ArrayElemsCopied &elems)
void
ConstChecker::visit (ArrayExpr &expr)
{
- expr.get_internal_elements ()->accept_vis (*this);
+ expr.get_internal_elements ().accept_vis (*this);
}
void
ConstChecker::visit (ArrayIndexExpr &expr)
{
- expr.get_array_expr ()->accept_vis (*this);
- expr.get_index_expr ()->accept_vis (*this);
+ expr.get_array_expr ().accept_vis (*this);
+ expr.get_index_expr ().accept_vis (*this);
}
void
@@ -271,7 +271,7 @@ ConstChecker::visit (TupleExpr &expr)
void
ConstChecker::visit (TupleIndexExpr &expr)
{
- expr.get_tuple_expr ()->accept_vis (*this);
+ expr.get_tuple_expr ().accept_vis (*this);
}
void
@@ -285,13 +285,13 @@ ConstChecker::visit (StructExprFieldIdentifier &)
void
ConstChecker::visit (StructExprFieldIdentifierValue &field)
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void
ConstChecker::visit (StructExprFieldIndexValue &field)
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void
@@ -352,10 +352,10 @@ ConstChecker::check_function_call (HirId fn_id, location_t locus)
void
ConstChecker::visit (CallExpr &expr)
{
- if (!expr.get_fnexpr ())
+ if (!expr.has_fnexpr ())
return;
- NodeId ast_node_id = expr.get_fnexpr ()->get_mappings ().get_nodeid ();
+ NodeId ast_node_id = expr.get_fnexpr ().get_mappings ().get_nodeid ();
NodeId ref_node_id;
if (flag_name_resolution_2_0)
@@ -388,7 +388,7 @@ ConstChecker::visit (CallExpr &expr)
void
ConstChecker::visit (MethodCallExpr &expr)
{
- expr.get_receiver ()->accept_vis (*this);
+ expr.get_receiver ().accept_vis (*this);
for (auto &arg : expr.get_arguments ())
arg->accept_vis (*this);
@@ -397,13 +397,13 @@ ConstChecker::visit (MethodCallExpr &expr)
void
ConstChecker::visit (FieldAccessExpr &expr)
{
- expr.get_receiver_expr ()->accept_vis (*this);
+ expr.get_receiver_expr ().accept_vis (*this);
}
void
ConstChecker::visit (ClosureExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
@@ -413,7 +413,7 @@ ConstChecker::visit (BlockExpr &expr)
stmt->accept_vis (*this);
if (expr.has_expr ())
- expr.get_final_expr ()->accept_vis (*this);
+ expr.get_final_expr ().accept_vis (*this);
}
void
@@ -424,26 +424,26 @@ void
ConstChecker::visit (BreakExpr &expr)
{
if (expr.has_break_expr ())
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
ConstChecker::visit (RangeFromToExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
ConstChecker::visit (RangeFromExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
}
void
ConstChecker::visit (RangeToExpr &expr)
{
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
@@ -453,8 +453,8 @@ ConstChecker::visit (RangeFullExpr &)
void
ConstChecker::visit (RangeFromToInclExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
@@ -467,73 +467,57 @@ void
ConstChecker::visit (ReturnExpr &expr)
{
if (expr.has_return_expr ())
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
ConstChecker::visit (UnsafeBlockExpr &expr)
{
- expr.get_block_expr ()->accept_vis (*this);
+ expr.get_block_expr ().accept_vis (*this);
}
void
ConstChecker::visit (LoopExpr &expr)
{
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
ConstChecker::visit (WhileLoopExpr &expr)
{
- expr.get_predicate_expr ()->accept_vis (*this);
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_predicate_expr ().accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
ConstChecker::visit (WhileLetLoopExpr &expr)
{
- expr.get_cond ()->accept_vis (*this);
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_cond ().accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
ConstChecker::visit (IfExpr &expr)
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
}
void
ConstChecker::visit (IfExprConseqElse &expr)
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
- expr.get_else_block ()->accept_vis (*this);
-}
-
-void
-ConstChecker::visit (IfLetExpr &expr)
-{
- expr.get_scrutinee_expr ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
-}
-
-void
-ConstChecker::visit (IfLetExprConseqElse &expr)
-{
- expr.get_scrutinee_expr ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
-
- // TODO: Visit else expression
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
+ expr.get_else_block ().accept_vis (*this);
}
void
ConstChecker::visit (MatchExpr &expr)
{
- expr.get_scrutinee_expr ()->accept_vis (*this);
+ expr.get_scrutinee_expr ().accept_vis (*this);
for (auto &match_arm : expr.get_match_cases ())
- match_arm.get_expr ()->accept_vis (*this);
+ match_arm.get_expr ().accept_vis (*this);
}
void
@@ -606,9 +590,9 @@ ConstChecker::visit (Function &function)
ConstGenericCtx::Function);
for (auto &param : function.get_function_params ())
- param.get_type ()->accept_vis (*this);
+ param.get_type ().accept_vis (*this);
- function.get_definition ()->accept_vis (*this);
+ function.get_definition ().accept_vis (*this);
if (const_fn)
const_context.exit ();
@@ -652,7 +636,7 @@ ConstChecker::visit (EnumItemDiscriminant &item)
{
const_context.enter (item.get_mappings ().get_hirid ());
- item.get_discriminant_expression ()->accept_vis (*this);
+ item.get_discriminant_expression ().accept_vis (*this);
const_context.exit ();
}
@@ -676,7 +660,7 @@ ConstChecker::visit (ConstantItem &const_item)
{
const_context.enter (const_item.get_mappings ().get_hirid ());
- const_item.get_expr ()->accept_vis (*this);
+ const_item.get_expr ().accept_vis (*this);
const_context.exit ();
}
@@ -686,7 +670,7 @@ ConstChecker::visit (StaticItem &static_item)
{
const_context.enter (static_item.get_mappings ().get_hirid ());
- static_item.get_expr ()->accept_vis (*this);
+ static_item.get_expr ().accept_vis (*this);
const_context.exit ();
}
@@ -694,15 +678,15 @@ ConstChecker::visit (StaticItem &static_item)
void
ConstChecker::visit (TraitItemFunc &item)
{
- if (item.has_block_defined ())
- item.get_block_expr ()->accept_vis (*this);
+ if (item.has_definition ())
+ item.get_block_expr ().accept_vis (*this);
}
void
ConstChecker::visit (TraitItemConst &item)
{
if (item.has_expr ())
- item.get_expr ()->accept_vis (*this);
+ item.get_expr ().accept_vis (*this);
}
void
@@ -837,13 +821,13 @@ void
ConstChecker::visit (LetStmt &stmt)
{
if (stmt.has_init_expr ())
- stmt.get_init_expr ()->accept_vis (*this);
+ stmt.get_init_expr ().accept_vis (*this);
}
void
ConstChecker::visit (ExprStmt &stmt)
{
- stmt.get_expr ()->accept_vis (*this);
+ stmt.get_expr ().accept_vis (*this);
}
void
@@ -891,7 +875,7 @@ ConstChecker::visit (ArrayType &type)
{
const_context.enter (type.get_mappings ().get_hirid ());
- type.get_size_expr ()->accept_vis (*this);
+ type.get_size_expr ().accept_vis (*this);
const_context.exit ();
}
diff --git a/gcc/rust/checks/errors/rust-const-checker.h b/gcc/rust/checks/errors/rust-const-checker.h
index 8890761..9a618b8 100644
--- a/gcc/rust/checks/errors/rust-const-checker.h
+++ b/gcc/rust/checks/errors/rust-const-checker.h
@@ -128,8 +128,6 @@ private:
virtual void visit (WhileLetLoopExpr &expr) override;
virtual void visit (IfExpr &expr) override;
virtual void visit (IfExprConseqElse &expr) override;
- virtual void visit (IfLetExpr &expr) override;
- virtual void visit (IfLetExprConseqElse &expr) override;
virtual void visit (MatchExpr &expr) override;
virtual void visit (AwaitExpr &expr) override;
virtual void visit (AsyncBlockExpr &expr) override;
diff --git a/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc b/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
index f46f429..79416b5 100644
--- a/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
+++ b/gcc/rust/checks/errors/rust-hir-pattern-analysis.cc
@@ -92,72 +92,72 @@ PatternChecker::visit (LiteralExpr &)
void
PatternChecker::visit (BorrowExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (DereferenceExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (ErrorPropagationExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (NegationExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (ArithmeticOrLogicalExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PatternChecker::visit (ComparisonExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PatternChecker::visit (LazyBooleanExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PatternChecker::visit (TypeCastExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (AssignmentExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PatternChecker::visit (CompoundAssignmentExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
PatternChecker::visit (GroupedExpr &expr)
{
- expr.get_expr_in_parens ()->accept_vis (*this);
+ expr.get_expr_in_parens ().accept_vis (*this);
}
void
@@ -170,20 +170,20 @@ PatternChecker::visit (ArrayElemsValues &elems)
void
PatternChecker::visit (ArrayElemsCopied &elems)
{
- elems.get_elem_to_copy ()->accept_vis (*this);
+ elems.get_elem_to_copy ().accept_vis (*this);
}
void
PatternChecker::visit (ArrayExpr &expr)
{
- expr.get_internal_elements ()->accept_vis (*this);
+ expr.get_internal_elements ().accept_vis (*this);
}
void
PatternChecker::visit (ArrayIndexExpr &expr)
{
- expr.get_array_expr ()->accept_vis (*this);
- expr.get_index_expr ()->accept_vis (*this);
+ expr.get_array_expr ().accept_vis (*this);
+ expr.get_index_expr ().accept_vis (*this);
}
void
@@ -196,7 +196,7 @@ PatternChecker::visit (TupleExpr &expr)
void
PatternChecker::visit (TupleIndexExpr &expr)
{
- expr.get_tuple_expr ()->accept_vis (*this);
+ expr.get_tuple_expr ().accept_vis (*this);
}
void
@@ -210,13 +210,13 @@ PatternChecker::visit (StructExprFieldIdentifier &)
void
PatternChecker::visit (StructExprFieldIdentifierValue &field)
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void
PatternChecker::visit (StructExprFieldIndexValue &field)
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void
@@ -233,10 +233,10 @@ PatternChecker::visit (StructExprStructBase &)
void
PatternChecker::visit (CallExpr &expr)
{
- if (!expr.get_fnexpr ())
+ if (!expr.has_fnexpr ())
return;
- NodeId ast_node_id = expr.get_fnexpr ()->get_mappings ().get_nodeid ();
+ NodeId ast_node_id = expr.get_fnexpr ().get_mappings ().get_nodeid ();
NodeId ref_node_id;
if (flag_name_resolution_2_0)
{
@@ -266,7 +266,7 @@ PatternChecker::visit (CallExpr &expr)
void
PatternChecker::visit (MethodCallExpr &expr)
{
- expr.get_receiver ()->accept_vis (*this);
+ expr.get_receiver ().accept_vis (*this);
for (auto &arg : expr.get_arguments ())
arg->accept_vis (*this);
@@ -275,13 +275,13 @@ PatternChecker::visit (MethodCallExpr &expr)
void
PatternChecker::visit (FieldAccessExpr &expr)
{
- expr.get_receiver_expr ()->accept_vis (*this);
+ expr.get_receiver_expr ().accept_vis (*this);
}
void
PatternChecker::visit (ClosureExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
@@ -291,7 +291,7 @@ PatternChecker::visit (BlockExpr &expr)
stmt->accept_vis (*this);
if (expr.has_expr ())
- expr.get_final_expr ()->accept_vis (*this);
+ expr.get_final_expr ().accept_vis (*this);
}
void
@@ -302,26 +302,26 @@ void
PatternChecker::visit (BreakExpr &expr)
{
if (expr.has_break_expr ())
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (RangeFromToExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
PatternChecker::visit (RangeFromExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
}
void
PatternChecker::visit (RangeToExpr &expr)
{
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
@@ -331,92 +331,76 @@ PatternChecker::visit (RangeFullExpr &)
void
PatternChecker::visit (RangeFromToInclExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
PatternChecker::visit (RangeToInclExpr &expr)
{
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
PatternChecker::visit (ReturnExpr &expr)
{
if (expr.has_return_expr ())
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (UnsafeBlockExpr &expr)
{
- expr.get_block_expr ()->accept_vis (*this);
+ expr.get_block_expr ().accept_vis (*this);
}
void
PatternChecker::visit (LoopExpr &expr)
{
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
PatternChecker::visit (WhileLoopExpr &expr)
{
- expr.get_predicate_expr ()->accept_vis (*this);
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_predicate_expr ().accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
PatternChecker::visit (WhileLetLoopExpr &expr)
{
- expr.get_cond ()->accept_vis (*this);
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_cond ().accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
PatternChecker::visit (IfExpr &expr)
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
}
void
PatternChecker::visit (IfExprConseqElse &expr)
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
- expr.get_else_block ()->accept_vis (*this);
-}
-
-void
-PatternChecker::visit (IfLetExpr &expr)
-{
- expr.get_scrutinee_expr ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
-}
-
-void
-PatternChecker::visit (IfLetExprConseqElse &expr)
-{
- expr.get_scrutinee_expr ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
-
- expr.get_else_block ()->accept_vis (*this);
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
+ expr.get_else_block ().accept_vis (*this);
}
void
PatternChecker::visit (MatchExpr &expr)
{
- expr.get_scrutinee_expr ()->accept_vis (*this);
+ expr.get_scrutinee_expr ().accept_vis (*this);
for (auto &match_arm : expr.get_match_cases ())
- match_arm.get_expr ()->accept_vis (*this);
+ match_arm.get_expr ().accept_vis (*this);
// match expressions are only an entrypoint
TyTy::BaseType *scrutinee_ty;
bool ok = tyctx.lookup_type (
- expr.get_scrutinee_expr ()->get_mappings ().get_hirid (), &scrutinee_ty);
+ expr.get_scrutinee_expr ().get_mappings ().get_hirid (), &scrutinee_ty);
rust_assert (ok);
check_match_usefulness (&tyctx, scrutinee_ty, expr);
@@ -484,7 +468,7 @@ PatternChecker::visit (UseDeclaration &)
void
PatternChecker::visit (Function &function)
{
- function.get_definition ()->accept_vis (*this);
+ function.get_definition ().accept_vis (*this);
}
void
@@ -526,27 +510,27 @@ PatternChecker::visit (Union &)
void
PatternChecker::visit (ConstantItem &const_item)
{
- const_item.get_expr ()->accept_vis (*this);
+ const_item.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (StaticItem &static_item)
{
- static_item.get_expr ()->accept_vis (*this);
+ static_item.get_expr ().accept_vis (*this);
}
void
PatternChecker::visit (TraitItemFunc &item)
{
- if (item.has_block_defined ())
- item.get_block_expr ()->accept_vis (*this);
+ if (item.has_definition ())
+ item.get_block_expr ().accept_vis (*this);
}
void
PatternChecker::visit (TraitItemConst &item)
{
if (item.has_expr ())
- item.get_expr ()->accept_vis (*this);
+ item.get_expr ().accept_vis (*this);
}
void
@@ -675,13 +659,13 @@ void
PatternChecker::visit (LetStmt &stmt)
{
if (stmt.has_init_expr ())
- stmt.get_init_expr ()->accept_vis (*this);
+ stmt.get_init_expr ().accept_vis (*this);
}
void
PatternChecker::visit (ExprStmt &stmt)
{
- stmt.get_expr ()->accept_vis (*this);
+ stmt.get_expr ().accept_vis (*this);
}
void
@@ -1177,33 +1161,34 @@ WitnessMatrix::extend (const WitnessMatrix &other)
// forward declarations
static DeconstructedPat
-lower_pattern (Resolver::TypeCheckContext *ctx, HIR::Pattern *pattern,
+lower_pattern (Resolver::TypeCheckContext *ctx, HIR::Pattern &pattern,
TyTy::BaseType *scrutinee_ty);
static DeconstructedPat
lower_tuple_pattern (Resolver::TypeCheckContext *ctx,
- HIR::TupleStructPattern *pattern,
+ HIR::TupleStructPattern &pattern,
TyTy::VariantDef *variant, Constructor &ctor)
{
int arity = variant->get_fields ().size ();
- HIR::TupleStructItems *elems = pattern->get_items ().get ();
+ HIR::TupleStructItems &elems = pattern.get_items ();
std::vector<DeconstructedPat> fields;
- switch (elems->get_item_type ())
+ switch (elems.get_item_type ())
{
case HIR::TupleStructItems::ItemType::MULTIPLE: {
- HIR::TupleStructItemsNoRange *multiple
- = static_cast<HIR::TupleStructItemsNoRange *> (elems);
+ HIR::TupleStructItemsNoRange &multiple
+ = static_cast<HIR::TupleStructItemsNoRange &> (elems);
rust_assert (variant->get_fields ().size ()
- == multiple->get_patterns ().size ());
- for (size_t i = 0; i < multiple->get_patterns ().size (); i++)
+ == multiple.get_patterns ().size ());
+
+ for (size_t i = 0; i < multiple.get_patterns ().size (); i++)
{
fields.push_back (
- lower_pattern (ctx, multiple->get_patterns ().at (i).get (),
+ lower_pattern (ctx, *multiple.get_patterns ().at (i),
variant->get_fields ().at (i)->get_field_type ()));
}
- return DeconstructedPat (ctor, arity, fields, pattern->get_locus ());
+ return DeconstructedPat (ctor, arity, fields, pattern.get_locus ());
}
break;
case HIR::TupleStructItems::ItemType::RANGED: {
@@ -1219,7 +1204,7 @@ lower_tuple_pattern (Resolver::TypeCheckContext *ctx,
static DeconstructedPat
lower_struct_pattern (Resolver::TypeCheckContext *ctx,
- HIR::StructPattern *pattern, TyTy::VariantDef *variant,
+ HIR::StructPattern &pattern, TyTy::VariantDef *variant,
Constructor ctor)
{
int arity = variant->get_fields ().size ();
@@ -1227,7 +1212,7 @@ lower_struct_pattern (Resolver::TypeCheckContext *ctx,
// Initialize all field patterns to wildcard.
std::vector<DeconstructedPat> fields
= std::vector<DeconstructedPat> (arity, DeconstructedPat::make_wildcard (
- pattern->get_locus ()));
+ pattern.get_locus ()));
std::map<std::string, int> field_map;
for (int i = 0; i < arity; i++)
@@ -1237,7 +1222,7 @@ lower_struct_pattern (Resolver::TypeCheckContext *ctx,
}
// Fill in the fields with the present patterns.
- HIR::StructPatternElements elems = pattern->get_struct_pattern_elems ();
+ HIR::StructPatternElements elems = pattern.get_struct_pattern_elems ();
for (auto &elem : elems.get_struct_pattern_fields ())
{
switch (elem->get_item_type ())
@@ -1248,7 +1233,7 @@ lower_struct_pattern (Resolver::TypeCheckContext *ctx,
int field_idx
= field_map.at (ident->get_identifier ().as_string ());
fields.at (field_idx)
- = DeconstructedPat::make_wildcard (pattern->get_locus ());
+ = DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::StructPatternField::ItemType::IDENT_PAT: {
@@ -1257,7 +1242,7 @@ lower_struct_pattern (Resolver::TypeCheckContext *ctx,
int field_idx
= field_map.at (ident_pat->get_identifier ().as_string ());
fields.at (field_idx) = lower_pattern (
- ctx, ident_pat->get_pattern ().get (),
+ ctx, ident_pat->get_pattern (),
variant->get_fields ().at (field_idx)->get_field_type ());
}
break;
@@ -1272,19 +1257,19 @@ lower_struct_pattern (Resolver::TypeCheckContext *ctx,
}
}
- return DeconstructedPat{ctor, arity, fields, pattern->get_locus ()};
+ return DeconstructedPat{ctor, arity, fields, pattern.get_locus ()};
};
static DeconstructedPat
-lower_pattern (Resolver::TypeCheckContext *ctx, HIR::Pattern *pattern,
+lower_pattern (Resolver::TypeCheckContext *ctx, HIR::Pattern &pattern,
TyTy::BaseType *scrutinee_ty)
{
- HIR::Pattern::PatternType pat_type = pattern->get_pattern_type ();
+ HIR::Pattern::PatternType pat_type = pattern.get_pattern_type ();
switch (pat_type)
{
case HIR::Pattern::PatternType::WILDCARD:
case HIR::Pattern::PatternType::IDENTIFIER: {
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::Pattern::PatternType::PATH: {
@@ -1292,12 +1277,12 @@ lower_pattern (Resolver::TypeCheckContext *ctx, HIR::Pattern *pattern,
// structs
// https://doc.rust-lang.org/reference/patterns.html#path-patterns
// unimplemented. Treat this pattern as wildcard for now.
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::Pattern::PatternType::REFERENCE: {
// TODO: unimplemented. Treat this pattern as wildcard for now.
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::Pattern::PatternType::STRUCT:
@@ -1305,15 +1290,15 @@ lower_pattern (Resolver::TypeCheckContext *ctx, HIR::Pattern *pattern,
HirId path_id = UNKNOWN_HIRID;
if (pat_type == HIR::Pattern::PatternType::STRUCT)
{
- HIR::StructPattern *struct_pattern
- = static_cast<HIR::StructPattern *> (pattern);
- path_id = struct_pattern->get_path ().get_mappings ().get_hirid ();
+ HIR::StructPattern &struct_pattern
+ = static_cast<HIR::StructPattern &> (pattern);
+ path_id = struct_pattern.get_path ().get_mappings ().get_hirid ();
}
else
{
- HIR::TupleStructPattern *tuple_pattern
- = static_cast<HIR::TupleStructPattern *> (pattern);
- path_id = tuple_pattern->get_path ().get_mappings ().get_hirid ();
+ HIR::TupleStructPattern &tuple_pattern
+ = static_cast<HIR::TupleStructPattern &> (pattern);
+ path_id = tuple_pattern.get_path ().get_mappings ().get_hirid ();
}
rust_assert (scrutinee_ty->get_kind () == TyTy::TypeKind::ADT);
@@ -1346,46 +1331,46 @@ lower_pattern (Resolver::TypeCheckContext *ctx, HIR::Pattern *pattern,
if (pat_type == HIR::Pattern::PatternType::STRUCT)
{
- HIR::StructPattern *struct_pattern
- = static_cast<HIR::StructPattern *> (pattern);
+ HIR::StructPattern &struct_pattern
+ = static_cast<HIR::StructPattern &> (pattern);
return lower_struct_pattern (ctx, struct_pattern, variant, ctor);
}
else
{
- HIR::TupleStructPattern *tuple_pattern
- = static_cast<HIR::TupleStructPattern *> (pattern);
+ HIR::TupleStructPattern &tuple_pattern
+ = static_cast<HIR::TupleStructPattern &> (pattern);
return lower_tuple_pattern (ctx, tuple_pattern, variant, ctor);
}
}
break;
case HIR::Pattern::PatternType::TUPLE: {
// TODO: unimplemented. Treat this pattern as wildcard for now.
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::Pattern::PatternType::SLICE: {
// TODO: unimplemented. Treat this pattern as wildcard for now.
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::Pattern::PatternType::ALT: {
// TODO: unimplemented. Treat this pattern as wildcard for now.
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::Pattern::PatternType::LITERAL: {
// TODO: unimplemented. Treat this pattern as wildcard for now.
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::Pattern::PatternType::RANGE: {
// TODO: unimplemented. Treat this pattern as wildcard for now.
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
case HIR::Pattern::PatternType::GROUPED: {
// TODO: unimplemented. Treat this pattern as wildcard for now.
- return DeconstructedPat::make_wildcard (pattern->get_locus ());
+ return DeconstructedPat::make_wildcard (pattern.get_locus ());
}
break;
default: {
@@ -1401,8 +1386,7 @@ lower_arm (Resolver::TypeCheckContext *ctx, HIR::MatchCase &arm,
rust_assert (arm.get_arm ().get_patterns ().size () > 0);
DeconstructedPat pat
- = lower_pattern (ctx, arm.get_arm ().get_patterns ().at (0).get (),
- scrutinee_ty);
+ = lower_pattern (ctx, *arm.get_arm ().get_patterns ().at (0), scrutinee_ty);
return MatchArm (pat, arm.get_arm ().has_match_arm_guard ());
}
@@ -1511,8 +1495,9 @@ emit_exhaustiveness_error (Resolver::TypeCheckContext *ctx,
HIR::MatchExpr &expr, WitnessMatrix &witness)
{
TyTy::BaseType *scrutinee_ty;
- bool ok = ctx->lookup_type (
- expr.get_scrutinee_expr ()->get_mappings ().get_hirid (), &scrutinee_ty);
+ bool ok
+ = ctx->lookup_type (expr.get_scrutinee_expr ().get_mappings ().get_hirid (),
+ &scrutinee_ty);
rust_assert (ok);
if (!witness.empty ())
@@ -1530,7 +1515,7 @@ emit_exhaustiveness_error (Resolver::TypeCheckContext *ctx,
if (i != witness.get_stacks ().size () - 1)
buf << " and ";
}
- rust_error_at (expr.get_scrutinee_expr ()->get_locus (),
+ rust_error_at (expr.get_scrutinee_expr ().get_locus (),
"non-exhaustive patterns: %s not covered",
buf.str ().c_str ());
}
@@ -1545,6 +1530,9 @@ void
check_match_usefulness (Resolver::TypeCheckContext *ctx,
TyTy::BaseType *scrutinee_ty, HIR::MatchExpr &expr)
{
+ if (!expr.has_match_arms ())
+ return;
+
// Lower the arms to a more convenient representation.
std::vector<MatrixRow> rows;
for (auto &arm : expr.get_match_cases ())
diff --git a/gcc/rust/checks/errors/rust-hir-pattern-analysis.h b/gcc/rust/checks/errors/rust-hir-pattern-analysis.h
index 1af02ba..9c43d41 100644
--- a/gcc/rust/checks/errors/rust-hir-pattern-analysis.h
+++ b/gcc/rust/checks/errors/rust-hir-pattern-analysis.h
@@ -102,8 +102,6 @@ private:
virtual void visit (WhileLetLoopExpr &expr) override;
virtual void visit (IfExpr &expr) override;
virtual void visit (IfExprConseqElse &expr) override;
- virtual void visit (IfLetExpr &expr) override;
- virtual void visit (IfLetExprConseqElse &expr) override;
virtual void visit (HIR::MatchExpr &expr) override;
virtual void visit (AwaitExpr &expr) override;
virtual void visit (AsyncBlockExpr &expr) override;
diff --git a/gcc/rust/checks/errors/rust-readonly-check.cc b/gcc/rust/checks/errors/rust-readonly-check.cc
index b899898..c128933 100644
--- a/gcc/rust/checks/errors/rust-readonly-check.cc
+++ b/gcc/rust/checks/errors/rust-readonly-check.cc
@@ -19,10 +19,13 @@
#include "rust-readonly-check.h"
#include "rust-tree.h"
#include "rust-gcc.h"
+#include "print-tree.h"
namespace Rust {
namespace Analysis {
+static std::map<tree, int> assignment_map = {};
+
// ported over from c-family/c-warn.cc
void
readonly_error (location_t loc, tree arg, enum lvalue_use use)
@@ -106,37 +109,68 @@ readonly_error (location_t loc, tree arg, enum lvalue_use use)
}
static void
-check_decl (tree *t)
+emit_error (tree *t, tree lhs, enum lvalue_use use)
{
- if (TREE_CODE (*t) == MODIFY_EXPR)
+ readonly_error (EXPR_LOCATION (*t), lhs, use);
+ TREE_OPERAND (*t, 0) = error_mark_node;
+}
+
+static void
+check_modify_expr (tree *t)
+{
+ tree lhs = TREE_OPERAND (*t, 0);
+ if (TREE_CODE (lhs) == ARRAY_REF || TREE_CODE (lhs) == COMPONENT_REF)
+ lhs = TREE_OPERAND (lhs, 0);
+
+ tree lhs_type = TREE_TYPE (lhs);
+ if (TYPE_READONLY (lhs_type) || TREE_READONLY (lhs) || TREE_CONSTANT (lhs))
{
- tree lhs = TREE_OPERAND (*t, 0);
- if (TREE_READONLY (lhs) || TREE_CONSTANT (lhs))
+ if (TREE_CODE (lhs) != VAR_DECL)
+ emit_error (t, lhs, lv_assign);
+ else if (!DECL_ARTIFICIAL (lhs))
{
- readonly_error (EXPR_LOCATION (*t), lhs, lv_assign);
- TREE_OPERAND (*t, 0) = error_mark_node;
+ if (DECL_INITIAL (lhs) != NULL)
+ emit_error (t, lhs, lv_assign);
+ else
+ {
+ if (assignment_map.find (lhs) == assignment_map.end ())
+ {
+ assignment_map.insert ({lhs, 0});
+ }
+ assignment_map[lhs]++;
+
+ if (assignment_map[lhs] > 1)
+ emit_error (t, lhs, lv_assign);
+ }
}
}
}
-static tree
-readonly_walk_fn (tree *t, int *, void *)
+static void
+check_decl (tree *t)
{
switch (TREE_CODE (*t))
{
case MODIFY_EXPR:
- check_decl (t);
+ check_modify_expr (t);
break;
default:
break;
}
+}
+
+static tree
+readonly_walk_fn (tree *t, int *, void *)
+{
+ check_decl (t);
return NULL_TREE;
}
void
ReadonlyCheck::Lint (Compile::Context &ctx)
{
+ assignment_map.clear ();
for (auto &fndecl : ctx.get_func_decls ())
{
for (tree p = DECL_ARGUMENTS (fndecl); p != NULL_TREE; p = DECL_CHAIN (p))
@@ -148,12 +182,14 @@ ReadonlyCheck::Lint (Compile::Context &ctx)
&readonly_walk_fn, &ctx);
}
+ assignment_map.clear ();
for (auto &var : ctx.get_var_decls ())
{
tree decl = var->get_decl ();
check_decl (&decl);
}
+ assignment_map.clear ();
for (auto &const_decl : ctx.get_const_decls ())
{
check_decl (&const_decl);
diff --git a/gcc/rust/checks/errors/rust-unsafe-checker.cc b/gcc/rust/checks/errors/rust-unsafe-checker.cc
index 4c8db3a..fadfd9d 100644
--- a/gcc/rust/checks/errors/rust-unsafe-checker.cc
+++ b/gcc/rust/checks/errors/rust-unsafe-checker.cc
@@ -23,6 +23,10 @@
#include "rust-hir-item.h"
#include "rust-attribute-values.h"
#include "rust-system.h"
+#include "rust-immutable-name-resolution-context.h"
+
+// for flag_name_resolution_2_0
+#include "options.h"
namespace Rust {
namespace HIR {
@@ -216,8 +220,23 @@ UnsafeChecker::visit (PathInExpression &path)
NodeId ast_node_id = path.get_mappings ().get_nodeid ();
NodeId ref_node_id;
- if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))
- return;
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ auto resolved = nr_ctx.lookup (ast_node_id);
+
+ if (!resolved.has_value ())
+ return;
+
+ ref_node_id = resolved.value ();
+ }
+ else
+ {
+ if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))
+ return;
+ }
if (auto definition_id = mappings.lookup_node_to_hir (ref_node_id))
{
@@ -260,14 +279,14 @@ UnsafeChecker::visit (LiteralExpr &)
void
UnsafeChecker::visit (BorrowExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (DereferenceExpr &expr)
{
TyTy::BaseType *to_deref_type;
- auto to_deref = expr.get_expr ()->get_mappings ().get_hirid ();
+ auto to_deref = expr.get_expr ().get_mappings ().get_hirid ();
rust_assert (context.lookup_type (to_deref, &to_deref_type));
@@ -280,60 +299,60 @@ UnsafeChecker::visit (DereferenceExpr &expr)
void
UnsafeChecker::visit (ErrorPropagationExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (NegationExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (ArithmeticOrLogicalExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
UnsafeChecker::visit (ComparisonExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
UnsafeChecker::visit (LazyBooleanExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
UnsafeChecker::visit (TypeCastExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (AssignmentExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
UnsafeChecker::visit (CompoundAssignmentExpr &expr)
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void
UnsafeChecker::visit (GroupedExpr &expr)
{
- expr.get_expr_in_parens ()->accept_vis (*this);
+ expr.get_expr_in_parens ().accept_vis (*this);
}
void
@@ -346,20 +365,20 @@ UnsafeChecker::visit (ArrayElemsValues &elems)
void
UnsafeChecker::visit (ArrayElemsCopied &elems)
{
- elems.get_elem_to_copy ()->accept_vis (*this);
+ elems.get_elem_to_copy ().accept_vis (*this);
}
void
UnsafeChecker::visit (ArrayExpr &expr)
{
- expr.get_internal_elements ()->accept_vis (*this);
+ expr.get_internal_elements ().accept_vis (*this);
}
void
UnsafeChecker::visit (ArrayIndexExpr &expr)
{
- expr.get_array_expr ()->accept_vis (*this);
- expr.get_index_expr ()->accept_vis (*this);
+ expr.get_array_expr ().accept_vis (*this);
+ expr.get_index_expr ().accept_vis (*this);
}
void
@@ -372,7 +391,7 @@ UnsafeChecker::visit (TupleExpr &expr)
void
UnsafeChecker::visit (TupleIndexExpr &expr)
{
- expr.get_tuple_expr ()->accept_vis (*this);
+ expr.get_tuple_expr ().accept_vis (*this);
}
void
@@ -386,13 +405,13 @@ UnsafeChecker::visit (StructExprFieldIdentifier &)
void
UnsafeChecker::visit (StructExprFieldIdentifierValue &field)
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void
UnsafeChecker::visit (StructExprFieldIndexValue &field)
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void
@@ -409,17 +428,32 @@ UnsafeChecker::visit (StructExprStructBase &)
void
UnsafeChecker::visit (CallExpr &expr)
{
- if (!expr.get_fnexpr ())
+ if (!expr.has_fnexpr ())
return;
- NodeId ast_node_id = expr.get_fnexpr ()->get_mappings ().get_nodeid ();
+ NodeId ast_node_id = expr.get_fnexpr ().get_mappings ().get_nodeid ();
NodeId ref_node_id;
// There are no unsafe types, and functions are defined in the name resolver.
// If we can't find the name, then we're dealing with a type and should return
// early.
- if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))
- return;
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ auto resolved = nr_ctx.lookup (ast_node_id);
+
+ if (!resolved.has_value ())
+ return;
+
+ ref_node_id = resolved.value ();
+ }
+ else
+ {
+ if (!resolver.lookup_resolved_name (ast_node_id, &ref_node_id))
+ return;
+ }
if (auto definition_id = mappings.lookup_node_to_hir (ref_node_id))
{
@@ -448,14 +482,14 @@ UnsafeChecker::visit (MethodCallExpr &expr)
context.lookup_type (expr.get_method_name ().get_mappings ().get_hirid (),
&method_type);
- auto fn = *static_cast<TyTy::FnType *> (method_type);
+ auto &fn = static_cast<TyTy::FnType &> (*method_type);
auto method = mappings.lookup_hir_implitem (fn.get_ref ());
if (!unsafe_context.is_in_context () && method)
check_unsafe_call (static_cast<Function *> (method->first),
expr.get_locus (), "method");
- expr.get_receiver ()->accept_vis (*this);
+ expr.get_receiver ().accept_vis (*this);
for (auto &arg : expr.get_arguments ())
arg->accept_vis (*this);
@@ -464,14 +498,14 @@ UnsafeChecker::visit (MethodCallExpr &expr)
void
UnsafeChecker::visit (FieldAccessExpr &expr)
{
- expr.get_receiver_expr ()->accept_vis (*this);
+ expr.get_receiver_expr ().accept_vis (*this);
if (unsafe_context.is_in_context ())
return;
TyTy::BaseType *receiver_ty;
auto ok = context.lookup_type (
- expr.get_receiver_expr ()->get_mappings ().get_hirid (), &receiver_ty);
+ expr.get_receiver_expr ().get_mappings ().get_hirid (), &receiver_ty);
rust_assert (ok);
if (receiver_ty->get_kind () == TyTy::TypeKind::ADT)
@@ -487,7 +521,7 @@ UnsafeChecker::visit (FieldAccessExpr &expr)
void
UnsafeChecker::visit (ClosureExpr &expr)
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
@@ -497,7 +531,7 @@ UnsafeChecker::visit (BlockExpr &expr)
stmt->accept_vis (*this);
if (expr.has_expr ())
- expr.get_final_expr ()->accept_vis (*this);
+ expr.get_final_expr ().accept_vis (*this);
}
void
@@ -508,26 +542,26 @@ void
UnsafeChecker::visit (BreakExpr &expr)
{
if (expr.has_break_expr ())
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (RangeFromToExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (RangeFromExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (RangeToExpr &expr)
{
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
@@ -537,21 +571,21 @@ UnsafeChecker::visit (RangeFullExpr &)
void
UnsafeChecker::visit (RangeFromToInclExpr &expr)
{
- expr.get_from_expr ()->accept_vis (*this);
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_from_expr ().accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (RangeToInclExpr &expr)
{
- expr.get_to_expr ()->accept_vis (*this);
+ expr.get_to_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (ReturnExpr &expr)
{
if (expr.has_return_expr ())
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void
@@ -559,7 +593,7 @@ UnsafeChecker::visit (UnsafeBlockExpr &expr)
{
unsafe_context.enter (expr.get_mappings ().get_hirid ());
- expr.get_block_expr ()->accept_vis (*this);
+ expr.get_block_expr ().accept_vis (*this);
unsafe_context.exit ();
}
@@ -567,61 +601,45 @@ UnsafeChecker::visit (UnsafeBlockExpr &expr)
void
UnsafeChecker::visit (LoopExpr &expr)
{
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
UnsafeChecker::visit (WhileLoopExpr &expr)
{
- expr.get_predicate_expr ()->accept_vis (*this);
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_predicate_expr ().accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
UnsafeChecker::visit (WhileLetLoopExpr &expr)
{
- expr.get_cond ()->accept_vis (*this);
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_cond ().accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void
UnsafeChecker::visit (IfExpr &expr)
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
}
void
UnsafeChecker::visit (IfExprConseqElse &expr)
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
- expr.get_else_block ()->accept_vis (*this);
-}
-
-void
-UnsafeChecker::visit (IfLetExpr &expr)
-{
- expr.get_scrutinee_expr ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
-}
-
-void
-UnsafeChecker::visit (IfLetExprConseqElse &expr)
-{
- expr.get_scrutinee_expr ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
-
- // TODO: Visit else expression
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
+ expr.get_else_block ().accept_vis (*this);
}
void
UnsafeChecker::visit (MatchExpr &expr)
{
- expr.get_scrutinee_expr ()->accept_vis (*this);
+ expr.get_scrutinee_expr ().accept_vis (*this);
for (auto &match_arm : expr.get_match_cases ())
- match_arm.get_expr ()->accept_vis (*this);
+ match_arm.get_expr ().accept_vis (*this);
}
void
@@ -698,7 +716,7 @@ UnsafeChecker::visit (Function &function)
if (is_unsafe_fn)
unsafe_context.enter (function.get_mappings ().get_hirid ());
- function.get_definition ()->accept_vis (*this);
+ function.get_definition ().accept_vis (*this);
if (is_unsafe_fn)
unsafe_context.exit ();
@@ -746,27 +764,27 @@ UnsafeChecker::visit (Union &)
void
UnsafeChecker::visit (ConstantItem &const_item)
{
- const_item.get_expr ()->accept_vis (*this);
+ const_item.get_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (StaticItem &static_item)
{
- static_item.get_expr ()->accept_vis (*this);
+ static_item.get_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (TraitItemFunc &item)
{
- if (item.has_block_defined ())
- item.get_block_expr ()->accept_vis (*this);
+ if (item.has_definition ())
+ item.get_block_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (TraitItemConst &item)
{
if (item.has_expr ())
- item.get_expr ()->accept_vis (*this);
+ item.get_expr ().accept_vis (*this);
}
void
@@ -913,13 +931,13 @@ void
UnsafeChecker::visit (LetStmt &stmt)
{
if (stmt.has_init_expr ())
- stmt.get_init_expr ()->accept_vis (*this);
+ stmt.get_init_expr ().accept_vis (*this);
}
void
UnsafeChecker::visit (ExprStmt &stmt)
{
- stmt.get_expr ()->accept_vis (*this);
+ stmt.get_expr ().accept_vis (*this);
}
void
diff --git a/gcc/rust/checks/errors/rust-unsafe-checker.h b/gcc/rust/checks/errors/rust-unsafe-checker.h
index 1fa1fe0..8dc6ab7 100644
--- a/gcc/rust/checks/errors/rust-unsafe-checker.h
+++ b/gcc/rust/checks/errors/rust-unsafe-checker.h
@@ -110,12 +110,10 @@ private:
virtual void visit (WhileLetLoopExpr &expr) override;
virtual void visit (IfExpr &expr) override;
virtual void visit (IfExprConseqElse &expr) override;
- virtual void visit (IfLetExpr &expr) override;
- virtual void visit (IfLetExprConseqElse &expr) override;
virtual void visit (MatchExpr &expr) override;
virtual void visit (AwaitExpr &expr) override;
virtual void visit (AsyncBlockExpr &expr) override;
- virtual void visit (InlineAsm &expr);
+ virtual void visit (InlineAsm &expr) override;
virtual void visit (TypeParam &param) override;
virtual void visit (ConstGenericParam &param) override;
virtual void visit (LifetimeWhereClauseItem &item) override;
diff --git a/gcc/rust/checks/lints/rust-lint-marklive.cc b/gcc/rust/checks/lints/rust-lint-marklive.cc
index ca26a66..4b524d7 100644
--- a/gcc/rust/checks/lints/rust-lint-marklive.cc
+++ b/gcc/rust/checks/lints/rust-lint-marklive.cc
@@ -124,7 +124,7 @@ MarkLive::visit (HIR::PathInExpression &expr)
void
MarkLive::visit (HIR::MethodCallExpr &expr)
{
- expr.get_receiver ()->accept_vis (*this);
+ expr.get_receiver ().accept_vis (*this);
visit_path_segment (expr.get_method_name ());
for (auto &argument : expr.get_arguments ())
argument->accept_vis (*this);
@@ -182,14 +182,14 @@ void
MarkLive::visit (HIR::FieldAccessExpr &expr)
{
// visit receiver at first
- expr.get_receiver_expr ()->accept_vis (*this);
+ expr.get_receiver_expr ().accept_vis (*this);
// resolve the receiver back to ADT type
TyTy::BaseType *receiver = nullptr;
if (!tyctx->lookup_type (
- expr.get_receiver_expr ()->get_mappings ().get_hirid (), &receiver))
+ expr.get_receiver_expr ().get_mappings ().get_hirid (), &receiver))
{
- rust_error_at (expr.get_receiver_expr ()->get_locus (),
+ rust_error_at (expr.get_receiver_expr ().get_locus (),
"unresolved type for receiver");
}
@@ -221,7 +221,7 @@ MarkLive::visit (HIR::FieldAccessExpr &expr)
rust_assert (ok);
if (index >= variant->num_fields ())
{
- rust_error_at (expr.get_receiver_expr ()->get_locus (),
+ rust_error_at (expr.get_receiver_expr ().get_locus (),
"cannot access struct %s by index: %lu",
adt->get_name ().c_str (), (unsigned long) index);
return;
@@ -236,7 +236,7 @@ void
MarkLive::visit (HIR::TupleIndexExpr &expr)
{
// TODO: unused tuple field detection
- expr.get_tuple_expr ()->accept_vis (*this);
+ expr.get_tuple_expr ().accept_vis (*this);
}
void
@@ -249,13 +249,13 @@ MarkLive::visit (HIR::TypeAlias &alias)
= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
if (auto id = nr_ctx.lookup (
- alias.get_type_aliased ()->get_mappings ().get_nodeid ()))
+ alias.get_type_aliased ().get_mappings ().get_nodeid ()))
ast_node_id = *id;
}
else
{
resolver->lookup_resolved_type (
- alias.get_type_aliased ()->get_mappings ().get_nodeid (), &ast_node_id);
+ alias.get_type_aliased ().get_mappings ().get_nodeid (), &ast_node_id);
}
if (auto hid = mappings.lookup_node_to_hir (ast_node_id))
diff --git a/gcc/rust/checks/lints/rust-lint-marklive.h b/gcc/rust/checks/lints/rust-lint-marklive.h
index 92b4502..86d96fc 100644
--- a/gcc/rust/checks/lints/rust-lint-marklive.h
+++ b/gcc/rust/checks/lints/rust-lint-marklive.h
@@ -43,44 +43,44 @@ public:
void visit (HIR::BorrowExpr &expr) override
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void visit (HIR::DereferenceExpr &expr) override
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void visit (HIR::NegationExpr &expr) override
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void visit (HIR::LazyBooleanExpr &expr) override
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void visit (HIR::TypeCastExpr &expr) override
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void visit (HIR::GroupedExpr &expr) override
{
- expr.get_expr_in_parens ()->accept_vis (*this);
+ expr.get_expr_in_parens ().accept_vis (*this);
}
void visit (HIR::ArrayExpr &expr) override
{
- expr.get_internal_elements ()->accept_vis (*this);
+ expr.get_internal_elements ().accept_vis (*this);
}
void visit (HIR::ArrayIndexExpr &expr) override
{
- expr.get_array_expr ()->accept_vis (*this);
- expr.get_index_expr ()->accept_vis (*this);
+ expr.get_array_expr ().accept_vis (*this);
+ expr.get_index_expr ().accept_vis (*this);
}
void visit (HIR::ArrayElemsValues &expr) override
@@ -107,57 +107,57 @@ public:
}
if (expr.has_expr ())
{
- expr.get_final_expr ()->accept_vis (*this);
+ expr.get_final_expr ().accept_vis (*this);
}
}
void visit (HIR::UnsafeBlockExpr &expr) override
{
- expr.get_block_expr ()->accept_vis (*this);
+ expr.get_block_expr ().accept_vis (*this);
}
void visit (HIR::LoopExpr &expr) override
{
- expr.get_loop_block ()->accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
}
void visit (HIR::BreakExpr &expr) override
{
if (expr.has_break_expr ())
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void visit (HIR::WhileLoopExpr &expr) override
{
- expr.get_loop_block ()->accept_vis (*this);
- expr.get_predicate_expr ()->accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
+ expr.get_predicate_expr ().accept_vis (*this);
}
void visit (HIR::Function &function) override
{
- function.get_definition ()->accept_vis (*this);
+ function.get_definition ().accept_vis (*this);
}
void visit (HIR::ReturnExpr &expr) override
{
if (expr.has_return_expr ())
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
void visit (HIR::WhileLetLoopExpr &expr) override
{
- expr.get_loop_block ()->accept_vis (*this);
- expr.get_cond ()->accept_vis (*this);
+ expr.get_loop_block ().accept_vis (*this);
+ expr.get_cond ().accept_vis (*this);
}
void visit (HIR::ExprStmt &stmt) override
{
- stmt.get_expr ()->accept_vis (*this);
+ stmt.get_expr ().accept_vis (*this);
}
void visit (HIR::CallExpr &expr) override
{
- expr.get_fnexpr ()->accept_vis (*this);
+ expr.get_fnexpr ().accept_vis (*this);
for (auto &argument : expr.get_arguments ())
argument->accept_vis (*this);
}
@@ -169,8 +169,8 @@ public:
}
void visit (HIR::ComparisonExpr &expr) override
{
- expr.get_lhs ()->accept_vis (*this);
- expr.get_rhs ()->accept_vis (*this);
+ expr.get_lhs ().accept_vis (*this);
+ expr.get_rhs ().accept_vis (*this);
}
void visit (HIR::AssignmentExpr &expr) override
@@ -187,33 +187,33 @@ public:
void visit (HIR::IfExpr &expr) override
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
}
void visit (HIR::IfExprConseqElse &expr) override
{
- expr.get_if_condition ()->accept_vis (*this);
- expr.get_if_block ()->accept_vis (*this);
- expr.get_else_block ()->accept_vis (*this);
+ expr.get_if_condition ().accept_vis (*this);
+ expr.get_if_block ().accept_vis (*this);
+ expr.get_else_block ().accept_vis (*this);
}
void visit (HIR::MatchExpr &expr) override
{
- expr.get_scrutinee_expr ()->accept_vis (*this);
+ expr.get_scrutinee_expr ().accept_vis (*this);
std::vector<HIR::MatchCase> &cases = expr.get_match_cases ();
for (auto &&caz : cases)
{
auto case_arm = caz.get_arm ();
if (case_arm.has_match_arm_guard ())
- case_arm.get_guard_expr ()->accept_vis (*this);
- caz.get_expr ()->accept_vis (*this);
+ case_arm.get_guard_expr ().accept_vis (*this);
+ caz.get_expr ().accept_vis (*this);
}
}
void visit (HIR::TraitItemFunc &item) override
{
- item.get_block_expr ()->accept_vis (*this);
+ item.get_block_expr ().accept_vis (*this);
}
void visit (HIR::ImplBlock &impl) override
@@ -228,7 +228,7 @@ public:
{
if (stmt.has_init_expr ())
{
- stmt.get_init_expr ()->accept_vis (*this);
+ stmt.get_init_expr ().accept_vis (*this);
}
}
@@ -247,18 +247,18 @@ public:
stct.get_struct_name ().accept_vis (*this);
if (stct.has_struct_base ())
{
- stct.struct_base->base_struct->accept_vis (*this);
+ stct.get_struct_base ().get_base ().accept_vis (*this);
}
}
virtual void visit (HIR::StructExprFieldIdentifierValue &field) override
{
- field.get_value ()->accept_vis (*this);
+ field.get_value ().accept_vis (*this);
}
void visit (HIR::StructExprStructBase &stct) override
{
- stct.get_struct_base ()->base_struct->accept_vis (*this);
+ stct.get_struct_base ().get_base ().accept_vis (*this);
}
void visit (HIR::Module &module) override
@@ -269,7 +269,7 @@ public:
void visit (HIR::ClosureExpr &expr) override
{
- expr.get_expr ()->accept_vis (*this);
+ expr.get_expr ().accept_vis (*this);
}
private:
diff --git a/gcc/rust/expand/rust-derive-clone.cc b/gcc/rust/expand/rust-derive-clone.cc
index 18436be..7620abe 100644
--- a/gcc/rust/expand/rust-derive-clone.cc
+++ b/gcc/rust/expand/rust-derive-clone.cc
@@ -17,7 +17,13 @@
// <http://www.gnu.org/licenses/>.
#include "rust-derive-clone.h"
+#include "rust-ast.h"
+#include "rust-ast-dump.h"
+#include "rust-expr.h"
#include "rust-item.h"
+#include "rust-path.h"
+#include "rust-pattern.h"
+#include "rust-system.h"
namespace Rust {
namespace AST {
@@ -28,6 +34,15 @@ DeriveClone::clone_call (std::unique_ptr<Expr> &&to_clone)
// $crate::core::clone::Clone::clone for the fully qualified path - we don't
// link with `core` yet so that might be an issue. Use `Clone::clone` for now?
// TODO: Factor this function inside the DeriveAccumulator
+
+ // Interestingly, later versions of Rust have a `clone_fn` lang item which
+ // corresponds to this. But because we are first targeting 1.49, we cannot use
+ // it yet. Once we target a new, more recent version of the language, we'll
+ // have figured out how to compile and distribute `core`, meaning we'll be
+ // able to directly call `::core::clone::Clone::clone()`
+
+ // Not sure how to call it properly in the meantime...
+
auto path = std::unique_ptr<Expr> (
new PathInExpression (builder.path_in_expression ({"Clone", "clone"})));
@@ -77,10 +92,7 @@ DeriveClone::clone_impl (
std::unique_ptr<AssociatedItem> &&clone_fn, std::string name,
const std::vector<std::unique_ptr<GenericParam>> &type_generics)
{
- // should that be `$crate::core::clone::Clone` instead?
- auto segments = std::vector<std::unique_ptr<TypePathSegment>> ();
- segments.emplace_back (builder.type_path_segment ("Clone"));
- auto clone = TypePath (std::move (segments), loc);
+ auto clone = builder.type_path (LangItem::Kind::CLONE);
auto trait_items = std::vector<std::unique_ptr<AssociatedItem>> ();
trait_items.emplace_back (std::move (clone_fn));
@@ -227,24 +239,216 @@ DeriveClone::visit_struct (StructStruct &item)
item.get_generic_params ());
}
+PathInExpression
+DeriveClone::variant_match_path (Enum &item, const Identifier &variant)
+{
+ return PathInExpression ({builder.path_segment (
+ item.get_identifier ().as_string ()),
+ builder.path_segment (variant.as_string ())},
+ {}, loc, false);
+}
+
+MatchCase
+DeriveClone::clone_enum_identifier (Enum &item,
+ const std::unique_ptr<EnumItem> &variant)
+{
+ auto variant_path = variant_match_path (item, variant->get_identifier ());
+
+ auto pattern = std::unique_ptr<Pattern> (new ReferencePattern (
+ std::unique_ptr<Pattern> (new PathInExpression (variant_path)), false,
+ false, loc));
+ auto expr = std::unique_ptr<Expr> (new PathInExpression (variant_path));
+
+ return builder.match_case (std::move (pattern), std::move (expr));
+}
+
+MatchCase
+DeriveClone::clone_enum_tuple (Enum &item, const EnumItemTuple &variant)
+{
+ auto variant_path = variant_match_path (item, variant.get_identifier ());
+
+ auto patterns = std::vector<std::unique_ptr<Pattern>> ();
+ auto cloned_patterns = std::vector<std::unique_ptr<Expr>> ();
+
+ for (size_t i = 0; i < variant.get_tuple_fields ().size (); i++)
+ {
+ // The pattern we're creating for each field is `self_<i>` where `i` is
+ // the index of the field. It doesn't actually matter what we use, as long
+ // as it's ordered, unique, and that we can reuse it in the match case's
+ // return expression to clone the field.
+ auto pattern_str = "__self_" + std::to_string (i);
+
+ patterns.emplace_back (builder.identifier_pattern (pattern_str));
+
+ // Now, for each tuple's element, we create a new expression calling
+ // `clone` on it for the match case's return expression
+ cloned_patterns.emplace_back (
+ clone_call (builder.ref (builder.identifier (pattern_str))));
+ }
+
+ auto pattern_items = std::unique_ptr<TupleStructItems> (
+ new TupleStructItemsNoRange (std::move (patterns)));
+
+ auto pattern = std::unique_ptr<Pattern> (
+ new ReferencePattern (std::unique_ptr<Pattern> (new TupleStructPattern (
+ variant_path, std::move (pattern_items))),
+ false, false, loc));
+
+ auto expr
+ = builder.call (std::unique_ptr<Expr> (new PathInExpression (variant_path)),
+ std::move (cloned_patterns));
+
+ return builder.match_case (std::move (pattern), std::move (expr));
+}
+
+MatchCase
+DeriveClone::clone_enum_struct (Enum &item, const EnumItemStruct &variant)
+{
+ auto variant_path = variant_match_path (item, variant.get_identifier ());
+
+ auto field_patterns = std::vector<std::unique_ptr<StructPatternField>> ();
+ auto cloned_fields = std::vector<std::unique_ptr<StructExprField>> ();
+
+#if 0
+ // NOTE: We currently do not support compiling struct patterns where an
+ // identifier is assigned a new pattern, e.g. Bloop { f0: x }
+ // This is the code we should eventually produce as it mimics what rustc does
+ // - which is probably here for a good reason. In the meantime, we can just
+ // use the field's identifier as the pattern: Bloop { f0 }
+ // We can then clone the field directly instead of calling `clone()` on the
+ // new pattern.
+ // TODO: Figure out if that is actually needed and why rustc does it?
+
+ for (size_t i = 0; i < variant.get_struct_fields ().size (); i++)
+ {
+ auto &field = variant.get_struct_fields ()[i];
+
+ // Just like for tuples, the pattern we're creating for each field is
+ // `self_<i>` where `i` is the index of the field. It doesn't actually
+ // matter what we use, as long as it's ordered, unique, and that we can
+ // reuse it in the match case's return expression to clone the field.
+ auto pattern_str = "__self_" + std::to_string (i);
+
+ field_patterns.emplace_back (
+ std::unique_ptr<StructPatternField> (new StructPatternFieldIdentPat (
+ field.get_field_name (), builder.identifier_pattern (pattern_str), {},
+ loc)));
+
+ cloned_fields.emplace_back (
+ std::unique_ptr<StructExprField> (new StructExprFieldIdentifierValue (
+ field.get_field_name (),
+ clone_call (builder.ref (builder.identifier (pattern_str))), {},
+ loc)));
+ }
+#endif
+
+ for (const auto &field : variant.get_struct_fields ())
+ {
+ // We match on the struct's fields, and then recreate an instance of that
+ // struct, cloning each field
+
+ field_patterns.emplace_back (
+ std::unique_ptr<StructPatternField> (new StructPatternFieldIdent (
+ field.get_field_name (), false /* is_ref? true? */, false, {}, loc)));
+
+ cloned_fields.emplace_back (
+ std::unique_ptr<StructExprField> (new StructExprFieldIdentifierValue (
+ field.get_field_name (),
+ clone_call (builder.ref (
+ builder.identifier (field.get_field_name ().as_string ()))),
+ {}, loc)));
+ }
+
+ auto pattern_elts = StructPatternElements (std::move (field_patterns));
+
+ auto pattern = std::unique_ptr<Pattern> (
+ new ReferencePattern (std::unique_ptr<Pattern> (new StructPattern (
+ variant_path, loc, pattern_elts)),
+ false, false, loc));
+ auto expr = std::unique_ptr<Expr> (
+ new StructExprStructFields (variant_path, std::move (cloned_fields), loc));
+
+ return builder.match_case (std::move (pattern), std::move (expr));
+}
+
void
DeriveClone::visit_enum (Enum &item)
{
- rust_sorry_at (item.get_locus (), "cannot derive %qs for these items yet",
- "Clone");
+ // Create an arm for each variant of the enum:
+ // - For enum item variants (simple identifiers), just create the same
+ // variant.
+ // - For struct and tuple variants, destructure the pattern and call clone for
+ // each field.
+
+ auto cases = std::vector<MatchCase> ();
+
+ for (const auto &variant : item.get_variants ())
+ {
+ switch (variant->get_enum_item_kind ())
+ {
+ // Identifiers and discriminated variants are the same for a clone - we
+ // just return the same variant
+ case EnumItem::Kind::Identifier:
+ case EnumItem::Kind::Discriminant:
+ cases.emplace_back (clone_enum_identifier (item, variant));
+ break;
+ case EnumItem::Kind::Tuple:
+ cases.emplace_back (
+ clone_enum_tuple (item, static_cast<EnumItemTuple &> (*variant)));
+ break;
+ case EnumItem::Kind::Struct:
+ cases.emplace_back (
+ clone_enum_struct (item, static_cast<EnumItemStruct &> (*variant)));
+ break;
+ }
+ }
+
+ // match self { ... }
+ auto match = builder.match (builder.identifier ("self"), std::move (cases));
+
+ expanded = clone_impl (clone_fn (std::move (match)),
+ item.get_identifier ().as_string (),
+ item.get_generic_params ());
}
void
DeriveClone::visit_union (Union &item)
{
// FIXME: Should be $crate::core::clone::AssertParamIsCopy (or similar)
+ // (Rust-GCC#3329)
+
+ auto copy_path = TypePath (vec (builder.type_path_segment ("Copy")), loc);
+ auto sized_path = TypePath (vec (builder.type_path_segment ("Sized")), loc);
+
+ auto copy_bound = std::unique_ptr<TypeParamBound> (
+ new TraitBound (copy_path, item.get_locus ()));
+ auto sized_bound = std::unique_ptr<TypeParamBound> (
+ new TraitBound (sized_path, item.get_locus (), false, true));
+
+ auto bounds = std::vector<std::unique_ptr<TypeParamBound>> ();
+ bounds.emplace_back (std::move (copy_bound));
+ bounds.emplace_back (std::move (sized_bound));
+
+ // struct AssertParamIsCopy<T: Copy + ?Sized> { _t: PhantomData<T> }
+ auto assert_param_is_copy = "AssertParamIsCopy";
+ auto t = std::unique_ptr<GenericParam> (
+ new TypeParam (Identifier ("T"), item.get_locus (), std::move (bounds)));
+ auto assert_param_is_copy_struct = builder.struct_struct (
+ assert_param_is_copy, vec (std::move (t)),
+ {StructField (
+ Identifier ("_t"),
+ builder.single_generic_type_path (
+ LangItem::Kind::PHANTOM_DATA,
+ GenericArgs (
+ {}, {GenericArg::create_type (builder.single_type_path ("T"))}, {})),
+ Visibility::create_private (), item.get_locus ())});
// <Self>
auto arg = GenericArg::create_type (builder.single_type_path ("Self"));
// AssertParamIsCopy::<Self>
auto type = std::unique_ptr<TypePathSegment> (
- new TypePathSegmentGeneric (PathIdentSegment ("AssertParamIsCopy", loc),
+ new TypePathSegmentGeneric (PathIdentSegment (assert_param_is_copy, loc),
false, GenericArgs ({}, {arg}, {}, loc), loc));
auto type_paths = std::vector<std::unique_ptr<TypePathSegment>> ();
type_paths.emplace_back (std::move (type));
@@ -252,11 +456,12 @@ DeriveClone::visit_union (Union &item)
auto full_path
= std::unique_ptr<Type> (new TypePath ({std::move (type_paths)}, loc));
- auto stmts = std::vector<std::unique_ptr<Stmt>> ();
- stmts.emplace_back (
- builder.let (builder.wildcard (), std::move (full_path), nullptr));
auto tail_expr = builder.deref (builder.identifier ("self"));
+ auto stmts
+ = vec (std::move (assert_param_is_copy_struct),
+ builder.let (builder.wildcard (), std::move (full_path), nullptr));
+
auto block = builder.block (std::move (stmts), std::move (tail_expr));
expanded = clone_impl (clone_fn (std::move (block)),
diff --git a/gcc/rust/expand/rust-derive-clone.h b/gcc/rust/expand/rust-derive-clone.h
index 4a43b2a..d48ec5d 100644
--- a/gcc/rust/expand/rust-derive-clone.h
+++ b/gcc/rust/expand/rust-derive-clone.h
@@ -63,6 +63,21 @@ private:
clone_impl (std::unique_ptr<AssociatedItem> &&clone_fn, std::string name,
const std::vector<std::unique_ptr<GenericParam>> &type_generics);
+ /**
+ * Get the path to use for matching and creating a variant when matching on an
+ * enum. E.g. for the `Option` enum, with the `None` variant, this will create
+ * a path `Option::None`
+ */
+ PathInExpression variant_match_path (Enum &item, const Identifier &variant);
+
+ /**
+ * Implementation of clone for all possible variants of an enum
+ */
+ MatchCase clone_enum_identifier (Enum &item,
+ const std::unique_ptr<EnumItem> &variant);
+ MatchCase clone_enum_tuple (Enum &item, const EnumItemTuple &variant);
+ MatchCase clone_enum_struct (Enum &item, const EnumItemStruct &variant);
+
virtual void visit_struct (StructStruct &item);
virtual void visit_tuple (TupleStruct &item);
virtual void visit_enum (Enum &item);
diff --git a/gcc/rust/expand/rust-derive-copy.cc b/gcc/rust/expand/rust-derive-copy.cc
index 1de7290..31b4819 100644
--- a/gcc/rust/expand/rust-derive-copy.cc
+++ b/gcc/rust/expand/rust-derive-copy.cc
@@ -18,6 +18,9 @@
#include "rust-derive-copy.h"
#include "rust-ast-full.h"
+#include "rust-hir-map.h"
+#include "rust-mapping-common.h"
+#include "rust-path.h"
namespace Rust {
namespace AST {
@@ -41,10 +44,7 @@ DeriveCopy::copy_impl (
std::string name,
const std::vector<std::unique_ptr<GenericParam>> &type_generics)
{
- // `$crate::core::marker::Copy` instead
- auto segments = std::vector<std::unique_ptr<TypePathSegment>> ();
- segments.emplace_back (builder.type_path_segment ("Copy"));
- auto copy = TypePath (std::move (segments), loc);
+ auto copy = builder.type_path (LangItem::Kind::COPY);
// we need to build up the generics for this impl block which will be just a
// clone of the types specified ones
@@ -116,7 +116,7 @@ DeriveCopy::copy_impl (
: builder.single_generic_type_path (name, generic_args_for_self);
return std::unique_ptr<Item> (
- new TraitImpl (copy, /* unsafe */ false,
+ new TraitImpl (std::move (copy), /* unsafe */ false,
/* exclam */ false, /* trait items */ {},
std::move (impl_generics), std::move (self_type_path),
WhereClause::create_empty (), Visibility::create_private (),
diff --git a/gcc/rust/expand/rust-derive.h b/gcc/rust/expand/rust-derive.h
index 967064c..1924432 100644
--- a/gcc/rust/expand/rust-derive.h
+++ b/gcc/rust/expand/rust-derive.h
@@ -81,8 +81,6 @@ private:
virtual void visit (Lifetime &lifetime) override final{};
virtual void visit (LifetimeParam &lifetime_param) override final{};
virtual void visit (ConstGenericParam &const_param) override final{};
- virtual void visit (RegularPath &path) override final{};
- virtual void visit (LangItemPath &path) override final{};
virtual void visit (PathInExpression &path) override final{};
virtual void visit (TypePathSegment &segment) override final{};
virtual void visit (TypePathSegmentGeneric &segment) override final{};
diff --git a/gcc/rust/expand/rust-expand-format-args.cc b/gcc/rust/expand/rust-expand-format-args.cc
index c8087ee..af6182f 100644
--- a/gcc/rust/expand/rust-expand-format-args.cc
+++ b/gcc/rust/expand/rust-expand-format-args.cc
@@ -120,7 +120,7 @@ expand_format_args (AST::FormatArgs &fmt,
auto pieces = builder.ref (builder.array (std::move (static_pieces)));
auto args_slice = builder.ref (builder.array (std::move (args_array)));
- auto final_path = make_unique<AST::PathInExpression> (
+ auto final_path = std::make_unique<AST::PathInExpression> (
builder.path_in_expression ({"core", "fmt", "Arguments", "new_v1"}));
auto final_args = std::vector<std::unique_ptr<AST::Expr>> ();
final_args.emplace_back (std::move (pieces));
diff --git a/gcc/rust/expand/rust-macro-builtins-asm.cc b/gcc/rust/expand/rust-macro-builtins-asm.cc
index 5ed24d6..78e308a 100644
--- a/gcc/rust/expand/rust-macro-builtins-asm.cc
+++ b/gcc/rust/expand/rust-macro-builtins-asm.cc
@@ -17,7 +17,6 @@
// <http://www.gnu.org/licenses/>.
#include "expected.h"
-#include "rust-make-unique.h"
#include "rust-macro-builtins-asm.h"
#include "rust-ast-fragment.h"
#include "rust-ast.h"
@@ -858,9 +857,9 @@ parse_asm (location_t invoc_locus, AST::MacroInvocData &invoc,
// properly.
if (semicolon == AST::InvocKind::Semicoloned)
single_vec.emplace_back (AST::SingleASTNode (
- Rust::make_unique<AST::ExprStmt> (std::move (node), invoc_locus,
- semicolon
- == AST::InvocKind::Semicoloned)));
+ std::make_unique<AST::ExprStmt> (std::move (node), invoc_locus,
+ semicolon
+ == AST::InvocKind::Semicoloned)));
else
single_vec.emplace_back (AST::SingleASTNode (std::move (node)));
diff --git a/gcc/rust/expand/rust-macro-builtins-helpers.cc b/gcc/rust/expand/rust-macro-builtins-helpers.cc
index 55d113c..864379a 100644
--- a/gcc/rust/expand/rust-macro-builtins-helpers.cc
+++ b/gcc/rust/expand/rust-macro-builtins-helpers.cc
@@ -36,7 +36,7 @@ check_for_eager_invocations (
std::vector<std::unique_ptr<AST::MacroInvocation>> pending;
for (auto &expr : expressions)
- if (expr->get_ast_kind () == AST::Kind::MACRO_INVOCATION)
+ if (expr->get_expr_kind () == AST::Expr::Kind::MacroInvocation)
pending.emplace_back (std::unique_ptr<AST::MacroInvocation> (
static_cast<AST::MacroInvocation *> (expr->clone_expr ().release ())));
diff --git a/gcc/rust/expand/rust-macro-builtins-utility.cc b/gcc/rust/expand/rust-macro-builtins-utility.cc
index 2da7d18..9ea854e 100644
--- a/gcc/rust/expand/rust-macro-builtins-utility.cc
+++ b/gcc/rust/expand/rust-macro-builtins-utility.cc
@@ -117,7 +117,7 @@ MacroBuiltin::concat_handler (location_t invoc_locus,
for (auto &expr : expanded_expr)
{
if (!expr->is_literal ()
- && expr->get_ast_kind () != AST::Kind::MACRO_INVOCATION)
+ && expr->get_expr_kind () != AST::Expr::Kind::MacroInvocation)
{
has_error = true;
rust_error_at (expr->get_locus (), "expected a literal");
@@ -296,4 +296,4 @@ MacroBuiltin::stringify_handler (location_t invoc_locus,
return AST::Fragment ({node}, std::move (token));
}
-} // namespace Rust \ No newline at end of file
+} // namespace Rust
diff --git a/gcc/rust/hir/rust-ast-lower-base.cc b/gcc/rust/hir/rust-ast-lower-base.cc
index 18e6fff..35a2509 100644
--- a/gcc/rust/hir/rust-ast-lower-base.cc
+++ b/gcc/rust/hir/rust-ast-lower-base.cc
@@ -25,6 +25,7 @@
#include "rust-diagnostics.h"
#include "rust-item.h"
#include "rust-system.h"
+#include "rust-attributes.h"
namespace Rust {
namespace HIR {
@@ -63,12 +64,6 @@ ASTLoweringBase::visit (AST::ConstGenericParam &)
// rust-path.h
void
-ASTLoweringBase::visit (AST::RegularPath &)
-{}
-void
-ASTLoweringBase::visit (AST::LangItemPath &)
-{}
-void
ASTLoweringBase::visit (AST::PathInExpression &)
{}
void
@@ -751,7 +746,7 @@ ASTLoweringBase::handle_outer_attributes (const ItemWrapper &item)
for (const auto &attr : item.get_outer_attrs ())
{
const auto &str_path = attr.get_path ().as_string ();
- if (!is_known_attribute (str_path))
+ if (!Analysis::Attributes::is_known (str_path))
{
rust_error_at (attr.get_locus (), "unknown attribute");
continue;
@@ -815,13 +810,6 @@ ASTLoweringBase::handle_lang_item_attribute (const ItemWrapper &item,
}
bool
-ASTLoweringBase::is_known_attribute (const std::string &attribute_path) const
-{
- const auto &lookup = attr_mappings->lookup_builtin (attribute_path);
- return !lookup.is_error ();
-}
-
-bool
ASTLoweringBase::attribute_handled_in_another_pass (
const std::string &attribute_path) const
{
diff --git a/gcc/rust/hir/rust-ast-lower-base.h b/gcc/rust/hir/rust-ast-lower-base.h
index 4cb098b..1bd1343 100644
--- a/gcc/rust/hir/rust-ast-lower-base.h
+++ b/gcc/rust/hir/rust-ast-lower-base.h
@@ -84,8 +84,6 @@ public:
// virtual void visit(TraitImplItem& trait_impl_item);
// rust-path.h
- virtual void visit (AST::RegularPath &path);
- virtual void visit (AST::LangItemPath &path);
virtual void visit (AST::PathInExpression &path);
virtual void visit (AST::TypePathSegment &segment);
virtual void visit (AST::TypePathSegmentGeneric &segment);
diff --git a/gcc/rust/hir/rust-ast-lower-block.h b/gcc/rust/hir/rust-ast-lower-block.h
index be6ca64..a39c010 100644
--- a/gcc/rust/hir/rust-ast-lower-block.h
+++ b/gcc/rust/hir/rust-ast-lower-block.h
@@ -115,7 +115,7 @@ class ASTLoweringIfLetBlock : public ASTLoweringBase
using Rust::HIR::ASTLoweringBase::visit;
public:
- static HIR::IfLetExpr *translate (AST::IfLetExpr &expr)
+ static HIR::MatchExpr *translate (AST::IfLetExpr &expr)
{
ASTLoweringIfLetBlock resolver;
expr.accept_vis (resolver);
@@ -135,7 +135,10 @@ public:
private:
ASTLoweringIfLetBlock () : ASTLoweringBase (), translated (nullptr) {}
- HIR::IfLetExpr *translated;
+ void desugar_iflet (AST::IfLetExpr &, HIR::Expr **, HIR::Expr *,
+ std::vector<HIR::MatchCase> &);
+
+ HIR::MatchExpr *translated;
};
class ASTLoweringExprWithBlock : public ASTLoweringBase
@@ -149,9 +152,7 @@ public:
ASTLoweringExprWithBlock resolver;
expr.accept_vis (resolver);
if (resolver.translated != nullptr)
- {
- resolver.mappings.insert_hir_expr (resolver.translated);
- }
+ resolver.mappings.insert_hir_expr (resolver.translated);
*terminated = resolver.terminated;
return resolver.translated;
diff --git a/gcc/rust/hir/rust-ast-lower-expr.cc b/gcc/rust/hir/rust-ast-lower-expr.cc
index 9dd88b4..7ccb251 100644
--- a/gcc/rust/hir/rust-ast-lower-expr.cc
+++ b/gcc/rust/hir/rust-ast-lower-expr.cc
@@ -17,6 +17,7 @@
// <http://www.gnu.org/licenses/>.
#include "rust-ast-lower-expr.h"
+#include "optional.h"
#include "rust-ast-lower-base.h"
#include "rust-ast-lower-block.h"
#include "rust-ast-lower-struct-field-expr.h"
@@ -77,7 +78,7 @@ ASTLoweringExpr::visit (AST::TupleIndexExpr &expr)
void
ASTLoweringExpr::visit (AST::TupleExpr &expr)
{
- std::vector<std::unique_ptr<HIR::Expr> > tuple_elements;
+ std::vector<std::unique_ptr<HIR::Expr>> tuple_elements;
for (auto &e : expr.get_tuple_elems ())
{
HIR::Expr *t = ASTLoweringExpr::translate (*e);
@@ -174,7 +175,7 @@ ASTLoweringExpr::visit (AST::CallExpr &expr)
HIR::Expr *func = ASTLoweringExpr::translate (expr.get_function_expr ());
auto const &in_params = expr.get_params ();
- std::vector<std::unique_ptr<HIR::Expr> > params;
+ std::vector<std::unique_ptr<HIR::Expr>> params;
for (auto &param : in_params)
{
auto trans = ASTLoweringExpr::translate (*param);
@@ -200,7 +201,7 @@ ASTLoweringExpr::visit (AST::MethodCallExpr &expr)
HIR::Expr *receiver = ASTLoweringExpr::translate (expr.get_receiver_expr ());
auto const &in_params = expr.get_params ();
- std::vector<std::unique_ptr<HIR::Expr> > params;
+ std::vector<std::unique_ptr<HIR::Expr>> params;
for (auto &param : in_params)
{
auto trans = ASTLoweringExpr::translate (*param);
@@ -290,7 +291,7 @@ ASTLoweringExpr::visit (AST::ArrayIndexExpr &expr)
void
ASTLoweringExpr::visit (AST::ArrayElemsValues &elems)
{
- std::vector<std::unique_ptr<HIR::Expr> > elements;
+ std::vector<std::unique_ptr<HIR::Expr>> elements;
for (auto &elem : elems.get_values ())
{
HIR::Expr *translated_elem = ASTLoweringExpr::translate (*elem);
@@ -511,16 +512,18 @@ ASTLoweringExpr::visit (AST::StructExprStructFields &struct_expr)
HIR::PathInExpression copied_path (*path);
delete path;
- HIR::StructBase *base = nullptr;
+ tl::optional<std::unique_ptr<HIR::StructBase>> base = tl::nullopt;
if (struct_expr.has_struct_base ())
{
HIR::Expr *translated_base = ASTLoweringExpr::translate (
struct_expr.get_struct_base ().get_base_struct ());
- base = new HIR::StructBase (std::unique_ptr<HIR::Expr> (translated_base));
+ base = tl::optional<std::unique_ptr<HIR::StructBase>> (
+ std::make_unique<StructBase> (
+ std::unique_ptr<HIR::Expr> (translated_base)));
}
auto const &in_fields = struct_expr.get_fields ();
- std::vector<std::unique_ptr<HIR::StructExprField> > fields;
+ std::vector<std::unique_ptr<HIR::StructExprField>> fields;
for (auto &field : in_fields)
{
HIR::StructExprField *translated
@@ -535,7 +538,8 @@ ASTLoweringExpr::visit (AST::StructExprStructFields &struct_expr)
translated
= new HIR::StructExprStructFields (mapping, copied_path, std::move (fields),
- struct_expr.get_locus (), base,
+ struct_expr.get_locus (),
+ std::move (base),
struct_expr.get_inner_attrs (),
struct_expr.get_outer_attrs ());
}
diff --git a/gcc/rust/hir/rust-ast-lower-item.cc b/gcc/rust/hir/rust-ast-lower-item.cc
index 171737a..ae938d9 100644
--- a/gcc/rust/hir/rust-ast-lower-item.cc
+++ b/gcc/rust/hir/rust-ast-lower-item.cc
@@ -572,6 +572,12 @@ ASTLoweringItem::visit (AST::Trait &trait)
generic_params = lower_generic_params (trait.get_generic_params ());
}
+ // TODO: separate "Self" from normal generic parameters
+ // in HIR as well as in AST?
+ HIR::GenericParam *self_param
+ = ASTLowerGenericParam::translate (trait.get_implicit_self ());
+ generic_params.emplace (generic_params.begin (), self_param);
+
std::vector<std::unique_ptr<HIR::TypeParamBound>> type_param_bounds;
if (trait.has_type_param_bounds ())
{
diff --git a/gcc/rust/hir/rust-ast-lower-stmt.cc b/gcc/rust/hir/rust-ast-lower-stmt.cc
index c359459..fd2cdfb 100644
--- a/gcc/rust/hir/rust-ast-lower-stmt.cc
+++ b/gcc/rust/hir/rust-ast-lower-stmt.cc
@@ -16,6 +16,7 @@
// along with GCC; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+#include "optional.h"
#include "rust-ast-lower-item.h"
#include "rust-ast-lower-stmt.h"
#include "rust-ast-lower-type.h"
@@ -68,12 +69,18 @@ ASTLoweringStmt::visit (AST::LetStmt &stmt)
{
HIR::Pattern *variables
= ASTLoweringPattern::translate (stmt.get_pattern (), true);
- HIR::Type *type = stmt.has_type ()
- ? ASTLoweringType::translate (stmt.get_type ())
- : nullptr;
- HIR::Expr *init_expression
- = stmt.has_init_expr () ? ASTLoweringExpr::translate (stmt.get_init_expr ())
- : nullptr;
+
+ tl::optional<std::unique_ptr<Type>> type = tl::nullopt;
+
+ if (stmt.has_type ())
+ type
+ = std::unique_ptr<Type> (ASTLoweringType::translate (stmt.get_type ()));
+
+ tl::optional<std::unique_ptr<HIR::Expr>> init_expression = tl::nullopt;
+
+ if (stmt.has_init_expr ())
+ init_expression = std::unique_ptr<HIR::Expr> (
+ ASTLoweringExpr::translate (stmt.get_init_expr ()));
auto crate_num = mappings.get_current_crate ();
Analysis::NodeMapping mapping (crate_num, stmt.get_node_id (),
@@ -81,8 +88,7 @@ ASTLoweringStmt::visit (AST::LetStmt &stmt)
UNKNOWN_LOCAL_DEFID);
translated
= new HIR::LetStmt (mapping, std::unique_ptr<HIR::Pattern> (variables),
- std::unique_ptr<HIR::Expr> (init_expression),
- std::unique_ptr<HIR::Type> (type),
+ std::move (init_expression), std::move (type),
stmt.get_outer_attrs (), stmt.get_locus ());
}
@@ -157,5 +163,11 @@ ASTLoweringStmt::visit (AST::TraitImpl &impl_block)
translated = ASTLoweringItem::translate (impl_block);
}
+void
+ASTLoweringStmt::visit (AST::StaticItem &var)
+{
+ translated = ASTLoweringItem::translate (var);
+}
+
} // namespace HIR
} // namespace Rust
diff --git a/gcc/rust/hir/rust-ast-lower-stmt.h b/gcc/rust/hir/rust-ast-lower-stmt.h
index 5b1e1b9..737a5f8 100644
--- a/gcc/rust/hir/rust-ast-lower-stmt.h
+++ b/gcc/rust/hir/rust-ast-lower-stmt.h
@@ -45,6 +45,7 @@ public:
void visit (AST::Trait &trait) override;
void visit (AST::InherentImpl &impl_block) override;
void visit (AST::TraitImpl &impl_block) override;
+ void visit (AST::StaticItem &var) override;
private:
ASTLoweringStmt () : translated (nullptr), terminated (false) {}
diff --git a/gcc/rust/hir/rust-ast-lower-type.cc b/gcc/rust/hir/rust-ast-lower-type.cc
index 7d6ac5d..8df418b 100644
--- a/gcc/rust/hir/rust-ast-lower-type.cc
+++ b/gcc/rust/hir/rust-ast-lower-type.cc
@@ -17,7 +17,11 @@
// <http://www.gnu.org/licenses/>.
#include "rust-ast-lower-type.h"
-#include "rust-attribute-values.h"
+#include "rust-hir-map.h"
+#include "rust-hir-path.h"
+#include "rust-hir-type.h"
+#include "rust-path.h"
+#include "rust-pattern.h"
namespace Rust {
namespace HIR {
@@ -70,11 +74,20 @@ ASTLowerTypePath::visit (AST::TypePathSegment &segment)
Analysis::NodeMapping mapping (crate_num, segment.get_node_id (), hirid,
UNKNOWN_LOCAL_DEFID);
- HIR::PathIdentSegment ident (segment.get_ident_segment ().as_string ());
- translated_segment
- = new HIR::TypePathSegment (std::move (mapping), ident,
- segment.get_separating_scope_resolution (),
- segment.get_locus ());
+ if (segment.is_lang_item ())
+ {
+ translated_segment = new HIR::TypePathSegment (std::move (mapping),
+ segment.get_lang_item (),
+ segment.get_locus ());
+ }
+ else
+ {
+ HIR::PathIdentSegment ident (segment.get_ident_segment ().as_string ());
+ translated_segment
+ = new HIR::TypePathSegment (std::move (mapping), ident,
+ segment.get_separating_scope_resolution (),
+ segment.get_locus ());
+ }
}
void
@@ -82,10 +95,6 @@ ASTLowerTypePath::visit (AST::TypePathSegmentGeneric &segment)
{
std::vector<HIR::GenericArgsBinding> binding_args; // TODO
- std::string segment_name = segment.get_ident_segment ().as_string ();
- bool has_separating_scope_resolution
- = segment.get_separating_scope_resolution ();
-
auto generic_args = lower_generic_args (segment.get_generic_args ());
auto crate_num = mappings.get_current_crate ();
@@ -93,10 +102,24 @@ ASTLowerTypePath::visit (AST::TypePathSegmentGeneric &segment)
Analysis::NodeMapping mapping (crate_num, segment.get_node_id (), hirid,
UNKNOWN_LOCAL_DEFID);
- translated_segment
- = new HIR::TypePathSegmentGeneric (std::move (mapping), segment_name,
- has_separating_scope_resolution,
- generic_args, segment.get_locus ());
+ if (segment.is_lang_item ())
+ {
+ translated_segment
+ = new HIR::TypePathSegmentGeneric (std::move (mapping),
+ segment.get_lang_item (),
+ generic_args, segment.get_locus ());
+ }
+ else
+ {
+ std::string segment_name = segment.get_ident_segment ().as_string ();
+ bool has_separating_scope_resolution
+ = segment.get_separating_scope_resolution ();
+
+ translated_segment
+ = new HIR::TypePathSegmentGeneric (std::move (mapping), segment_name,
+ has_separating_scope_resolution,
+ generic_args, segment.get_locus ());
+ }
}
void
@@ -436,6 +459,24 @@ ASTLoweringType::visit (AST::TraitObjectType &type)
type.get_locus (), type.is_dyn ());
}
+void
+ASTLoweringType::visit (AST::ParenthesisedType &type)
+{
+ auto *inner = ASTLoweringType::translate (*type.get_type_in_parens (),
+ default_to_static_lifetime);
+
+ auto crate_num = mappings.get_current_crate ();
+ Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
+ mappings.get_next_hir_id (crate_num),
+ mappings.get_next_localdef_id (crate_num));
+
+ // FIXME: Do we actually need to know if a type is parenthesized in the HIR?
+ // or can we just use the type in parens?
+ translated
+ = new HIR::ParenthesisedType (mapping, std::unique_ptr<HIR::Type> (inner),
+ type.get_locus ());
+}
+
HIR::GenericParam *
ASTLowerGenericParam::translate (AST::GenericParam &param)
{
@@ -502,9 +543,11 @@ ASTLowerGenericParam::visit (AST::TypeParam &param)
}
}
- HIR::Type *type = param.has_type ()
- ? ASTLoweringType::translate (param.get_type ())
- : nullptr;
+ tl::optional<std::unique_ptr<HIR::Type>> type = tl::nullopt;
+ if (param.has_type ())
+ type
+ = tl::optional<std::unique_ptr<HIR::Type>> (std::unique_ptr<HIR::Type> (
+ ASTLoweringType::translate (param.get_type ())));
auto crate_num = mappings.get_current_crate ();
Analysis::NodeMapping mapping (crate_num, param.get_node_id (),
@@ -514,8 +557,7 @@ ASTLowerGenericParam::visit (AST::TypeParam &param)
translated
= new HIR::TypeParam (mapping, param.get_type_representation (),
param.get_locus (), std::move (type_param_bounds),
- std::unique_ptr<Type> (type),
- param.get_outer_attrs ());
+ std::move (type), param.get_outer_attrs ());
}
HIR::TypeParamBound *
diff --git a/gcc/rust/hir/rust-ast-lower-type.h b/gcc/rust/hir/rust-ast-lower-type.h
index 5bb9a7e..af0b4be 100644
--- a/gcc/rust/hir/rust-ast-lower-type.h
+++ b/gcc/rust/hir/rust-ast-lower-type.h
@@ -21,6 +21,8 @@
#include "rust-ast-lower-base.h"
#include "rust-ast-lower-expr.h"
+#include "rust-hir-path.h"
+#include "rust-type.h"
namespace Rust {
namespace HIR {
@@ -78,6 +80,7 @@ public:
void visit (AST::NeverType &type) override;
void visit (AST::TraitObjectTypeOneBound &type) override;
void visit (AST::TraitObjectType &type) override;
+ void visit (AST::ParenthesisedType &type) override;
private:
ASTLoweringType (bool default_to_static_lifetime)
diff --git a/gcc/rust/hir/rust-ast-lower.cc b/gcc/rust/hir/rust-ast-lower.cc
index 5a5c93f..a94a843 100644
--- a/gcc/rust/hir/rust-ast-lower.cc
+++ b/gcc/rust/hir/rust-ast-lower.cc
@@ -24,6 +24,8 @@
#include "rust-ast-lower-type.h"
#include "rust-ast-lower-pattern.h"
#include "rust-ast-lower-struct-field-expr.h"
+#include "rust-expr.h"
+#include "rust-hir-expr.h"
namespace Rust {
namespace HIR {
@@ -102,7 +104,11 @@ ASTLoweringBlock::visit (AST::BlockExpr &expr)
for (auto &s : expr.get_statements ())
{
- if (s->get_ast_kind () == AST::Kind::MACRO_INVOCATION)
+ // FIXME: We basically need to do that check for *every* single node in
+ // the AST. this isn't realistic and this should be turned into an
+ // optional, debug-visitor instead, which goes through the entire AST and
+ // checks if any of the nodes are macro invocations
+ if (s->get_stmt_kind () == AST::Stmt::Kind::MacroInvocation)
rust_fatal_error (
s->get_locus (),
"macro invocations should not get lowered to HIR - At "
@@ -198,62 +204,144 @@ ASTLoweringIfBlock::visit (AST::IfExprConseqElse &expr)
std::unique_ptr<HIR::ExprWithBlock> (else_block), expr.get_locus ());
}
+/**
+ * Lowers the common part "if let 'pattern' = 'expr' { 'if_block' }" of
+ * IfLetExpr[ConseqElse]:
+ * - 'expr' is lowered into *BRANCH_VALUE
+ * - 'pattern' + 'if_block' are lowered and resulting ARM pushed in MATCH_ARMS
+ * - 'KASE_ELSE_EXPR' is the lowered HIR to be used in the else part.
+ *
+ * Looks like:
+ *
+ * match (expr) {
+ * pattern => {if_block}
+ * _ => kase_else_expr
+ * }
+ *
+ */
void
-ASTLoweringIfLetBlock::visit (AST::IfLetExpr &expr)
+ASTLoweringIfLetBlock::desugar_iflet (AST::IfLetExpr &expr,
+ HIR::Expr **branch_value,
+ HIR::Expr *kase_else_expr,
+ std::vector<HIR::MatchCase> &match_arms)
{
- std::vector<std::unique_ptr<HIR::Pattern>> patterns;
+ HIR::Expr *kase_expr;
+ std::vector<std::unique_ptr<HIR::Pattern>> match_arm_patterns;
+
+ *branch_value = ASTLoweringExpr::translate (expr.get_value_expr ());
+ kase_expr = ASTLoweringExpr::translate (expr.get_if_block ());
+
+ // (stable) if let only accepts a single pattern, but (unstable) if let chains
+ // need more than one pattern.
+ // We don't support if let chains, so only support a single pattern.
+ rust_assert (expr.get_patterns ().size () == 1);
+
for (auto &pattern : expr.get_patterns ())
{
HIR::Pattern *ptrn = ASTLoweringPattern::translate (*pattern);
- patterns.push_back (std::unique_ptr<HIR::Pattern> (ptrn));
+ match_arm_patterns.push_back (std::unique_ptr<HIR::Pattern> (ptrn));
}
- HIR::Expr *value_ptr = ASTLoweringExpr::translate (expr.get_value_expr ());
- bool ignored_terminated = false;
- HIR::BlockExpr *block
- = ASTLoweringBlock::translate (expr.get_if_block (), &ignored_terminated);
+ // The match arm corresponding to the if let pattern when it matches.
+ HIR::MatchArm arm (std::move (match_arm_patterns), expr.get_locus (), nullptr,
+ {});
auto crate_num = mappings.get_current_crate ();
Analysis::NodeMapping mapping (crate_num, expr.get_node_id (),
mappings.get_next_hir_id (crate_num),
UNKNOWN_LOCAL_DEFID);
- translated = new HIR::IfLetExpr (mapping, std::move (patterns),
- std::unique_ptr<HIR::Expr> (value_ptr),
- std::unique_ptr<HIR::BlockExpr> (block),
- expr.get_locus ());
+ HIR::MatchCase kase (std::move (mapping), std::move (arm),
+ std::unique_ptr<HIR::Expr> (kase_expr));
+ match_arms.push_back (std::move (kase));
+
+ // The default match arm when the if let pattern does not match
+ std::vector<std::unique_ptr<HIR::Pattern>> match_arm_patterns_wildcard;
+ Analysis::NodeMapping mapping_default (crate_num, expr.get_node_id (),
+ mappings.get_next_hir_id (crate_num),
+ UNKNOWN_LOCAL_DEFID);
+
+ std::unique_ptr<HIR::WildcardPattern> wc
+ = std::unique_ptr<HIR::WildcardPattern> (
+ new HIR::WildcardPattern (mapping_default, expr.get_locus ()));
+
+ match_arm_patterns_wildcard.push_back (std::move (wc));
+
+ HIR::MatchArm arm_default (std::move (match_arm_patterns_wildcard),
+ expr.get_locus (), nullptr, {});
+
+ HIR::MatchCase kase_else (std::move (mapping_default),
+ std::move (arm_default),
+ std::unique_ptr<HIR::Expr> (kase_else_expr));
+ match_arms.push_back (std::move (kase_else));
}
void
-ASTLoweringIfLetBlock::visit (AST::IfLetExprConseqElse &expr)
+ASTLoweringIfLetBlock::visit (AST::IfLetExpr &expr)
{
- std::vector<std::unique_ptr<HIR::Pattern>> patterns;
- for (auto &pattern : expr.get_patterns ())
- {
- HIR::Pattern *ptrn = ASTLoweringPattern::translate (*pattern);
- patterns.push_back (std::unique_ptr<HIR::Pattern> (ptrn));
- }
- HIR::Expr *value_ptr = ASTLoweringExpr::translate (expr.get_value_expr ());
+ // Desugar:
+ // if let Some(y) = some_value {
+ // bar();
+ // }
+ //
+ // into:
+ //
+ // match some_value {
+ // Some(y) => {bar();},
+ // _ => ()
+ // }
+
+ HIR::Expr *branch_value;
- bool ignored_terminated = false;
- HIR::BlockExpr *block
- = ASTLoweringBlock::translate (expr.get_if_block (), &ignored_terminated);
+ std::vector<HIR::MatchCase> match_arms;
+ auto crate_num = mappings.get_current_crate ();
+ Analysis::NodeMapping mapping (crate_num, expr.get_node_id (),
+ mappings.get_next_hir_id (crate_num),
+ UNKNOWN_LOCAL_DEFID);
- HIR::ExprWithBlock *else_block
- = ASTLoweringExprWithBlock::translate (expr.get_else_block (),
- &ignored_terminated);
+ HIR::TupleExpr *unit
+ = new HIR::TupleExpr (mapping, {}, {}, {}, expr.get_locus ());
+
+ desugar_iflet (expr, &branch_value, unit, match_arms);
- rust_assert (else_block);
+ translated
+ = new HIR::MatchExpr (mapping, std::unique_ptr<HIR::Expr> (branch_value),
+ std::move (match_arms), {}, {}, expr.get_locus ());
+}
+
+void
+ASTLoweringIfLetBlock::visit (AST::IfLetExprConseqElse &expr)
+{
+ // desugar:
+ // if let Some(y) = some_value {
+ // bar();
+ // } else {
+ // baz();
+ // }
+ //
+ // into
+ // match some_value {
+ // Some(y) => {bar();},
+ // _ => {baz();}
+ // }
+ //
+
+ HIR::Expr *branch_value;
+ std::vector<HIR::MatchCase> match_arms;
+
+ HIR::Expr *kase_else_expr
+ = ASTLoweringExpr::translate (expr.get_else_block ());
+
+ desugar_iflet (expr, &branch_value, kase_else_expr, match_arms);
auto crate_num = mappings.get_current_crate ();
Analysis::NodeMapping mapping (crate_num, expr.get_node_id (),
mappings.get_next_hir_id (crate_num),
UNKNOWN_LOCAL_DEFID);
- translated = new HIR::IfLetExprConseqElse (
- mapping, std::move (patterns), std::unique_ptr<HIR::Expr> (value_ptr),
- std::unique_ptr<HIR::BlockExpr> (block),
- std::unique_ptr<HIR::ExprWithBlock> (else_block), expr.get_locus ());
+ translated
+ = new HIR::MatchExpr (mapping, std::unique_ptr<HIR::Expr> (branch_value),
+ std::move (match_arms), {}, {}, expr.get_locus ());
}
// rust-ast-lower-struct-field-expr.h
diff --git a/gcc/rust/hir/rust-ast-lower.h b/gcc/rust/hir/rust-ast-lower.h
index 079ffa9..cc74082 100644
--- a/gcc/rust/hir/rust-ast-lower.h
+++ b/gcc/rust/hir/rust-ast-lower.h
@@ -39,6 +39,11 @@ struct_field_name_exists (std::vector<HIR::StructField> &fields,
Visibility
translate_visibility (const AST::Visibility &vis);
+/**
+ * Main base class used for lowering AST to HIR.
+ *
+ * Every subclass should provide a translate() method that takes an AST node and
+ * lowers it to some HIR stored in the TRANSLATED member. */
class ASTLowering
{
public:
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc
index b441377..798179d 100644
--- a/gcc/rust/hir/rust-hir-dump.cc
+++ b/gcc/rust/hir/rust-hir-dump.cc
@@ -22,9 +22,9 @@
#include "rust-hir-path.h"
#include "rust-hir-type.h"
#include "rust-hir.h"
-#include <string>
#include "rust-attribute-values.h"
#include "tree/rust-hir-expr.h"
+#include "rust-system.h"
namespace Rust {
namespace HIR {
@@ -359,7 +359,8 @@ Dump::do_matcharm (MatchArm &e)
// FIXME Can't remember how to handle that. Let's see later.
// do_outer_attrs(e);
visit_collection ("match_arm_patterns", e.get_patterns ());
- visit_field ("guard_expr", e.get_guard_expr ());
+ if (e.has_match_arm_guard ())
+ visit_field ("guard_expr", e.get_guard_expr ());
end ("MatchArm");
}
@@ -403,7 +404,8 @@ Dump::do_qualifiedpathtype (QualifiedPathType &e)
do_mappings (e.get_mappings ());
visit_field ("type", e.get_type ());
- visit_field ("trait", e.get_trait ());
+ if (e.has_as_clause ())
+ visit_field ("trait", e.get_trait ());
}
void
@@ -464,17 +466,6 @@ Dump::do_baseloopexpr (BaseLoopExpr &e)
}
void
-Dump::do_ifletexpr (IfLetExpr &e)
-{
- do_expr (e);
-
- visit_collection ("match_arm_patterns", e.get_patterns ());
-
- visit_field ("value", e.get_scrutinee_expr ());
- visit_field ("if_block", e.get_if_block ());
-}
-
-void
Dump::do_struct (Struct &e)
{
do_vis_item (e);
@@ -531,7 +522,8 @@ Dump::do_traitfunctiondecl (TraitFunctionDecl &e)
else
put_field ("function_params", "empty");
- visit_field ("return_type", e.get_return_type ());
+ if (e.has_return_type ())
+ visit_field ("return_type", e.get_return_type ());
if (e.has_where_clause ())
put_field ("where_clause", e.get_where_clause ().as_string ());
@@ -811,7 +803,7 @@ Dump::visit (QualifiedPathInType &e)
end_field ("path_type");
begin_field ("associated_segment");
- do_typepathsegment (*e.get_associated_segment ());
+ do_typepathsegment (e.get_associated_segment ());
end_field ("associated_segment");
visit_collection ("segments", e.get_segments ());
@@ -922,7 +914,7 @@ Dump::visit (ArithmeticOrLogicalExpr &e)
}
put_field ("expr_type", str);
do_operatorexpr (e);
- visit_field ("right_expr", *e.get_rhs ());
+ visit_field ("right_expr", e.get_rhs ());
end ("ArithmeticOrLogicalExpr");
}
@@ -957,7 +949,7 @@ Dump::visit (ComparisonExpr &e)
}
put_field ("expr_type", str);
do_operatorexpr (e);
- visit_field ("right_expr", *e.get_rhs ());
+ visit_field ("right_expr", e.get_rhs ());
end ("ComparisonExpr");
}
@@ -980,7 +972,7 @@ Dump::visit (LazyBooleanExpr &e)
}
do_operatorexpr (e);
- visit_field ("right_expr", *e.get_rhs ());
+ visit_field ("right_expr", e.get_rhs ());
end ("LazyBooleanExpr");
}
@@ -998,7 +990,7 @@ Dump::visit (AssignmentExpr &e)
{
begin ("AssignmentExpr");
do_operatorexpr (e);
- visit_field ("right_expr", *e.get_rhs ());
+ visit_field ("right_expr", e.get_rhs ());
end ("AssignmentExpr");
}
@@ -1008,7 +1000,7 @@ Dump::visit (CompoundAssignmentExpr &e)
begin ("CompoundAssignmentExpr");
do_operatorexpr (e);
- visit_field ("right_expr", *e.get_rhs ());
+ visit_field ("right_expr", e.get_rhs ());
std::string str;
@@ -1182,7 +1174,7 @@ Dump::visit (StructExprStructFields &e)
if (!e.has_struct_base ())
put_field ("struct_base", "none");
else
- put_field ("struct_base", e.get_struct_base ()->as_string ());
+ put_field ("struct_base", e.get_struct_base ().as_string ());
end ("StructExprStructFields");
}
@@ -1193,7 +1185,7 @@ Dump::visit (StructExprStructBase &e)
begin ("StructExprStructBase");
do_structexprstruct (e);
- put_field ("struct_base", e.get_struct_base ()->as_string ());
+ put_field ("struct_base", e.get_struct_base ().as_string ());
end ("StructExprStructBase");
}
@@ -1252,13 +1244,17 @@ Dump::visit (ClosureExpr &e)
auto oa = param.get_outer_attrs ();
do_outer_attrs (oa);
visit_field ("pattern", param.get_pattern ());
- visit_field ("type", param.get_type ());
+
+ if (param.has_type_given ())
+ visit_field ("type", param.get_type ());
+
end ("ClosureParam");
}
end_field ("params");
}
- visit_field ("return_type", e.get_return_type ());
+ if (e.has_return_type ())
+ visit_field ("return_type", e.get_return_type ());
visit_field ("expr", e.get_expr ());
end ("ClosureExpr");
@@ -1275,7 +1271,8 @@ Dump::visit (BlockExpr &e)
visit_collection ("statements", e.get_statements ());
- visit_field ("expr", e.get_final_expr ());
+ if (e.has_final_expr ())
+ visit_field ("expr", e.get_final_expr ());
end ("BlockExpr");
}
@@ -1304,7 +1301,8 @@ Dump::visit (BreakExpr &e)
else
put_field ("label", "none");
- visit_field ("break_expr ", e.get_expr ());
+ if (e.has_break_expr ())
+ visit_field ("break_expr ", e.get_expr ());
end ("BreakExpr");
}
@@ -1374,7 +1372,8 @@ Dump::visit (ReturnExpr &e)
begin ("ReturnExpr");
do_mappings (e.get_mappings ());
- visit_field ("return_expr", e.get_expr ());
+ if (e.has_return_expr ())
+ visit_field ("return_expr", e.get_expr ());
end ("ReturnExpr");
}
@@ -1442,23 +1441,6 @@ Dump::visit (IfExprConseqElse &e)
}
void
-Dump::visit (IfLetExpr &e)
-{
- begin ("IfLetExpr");
- do_ifletexpr (e);
- end ("IfLetExpr");
-}
-
-void
-Dump::visit (IfLetExprConseqElse &e)
-{
- begin ("IfLetExprConseqElse");
- do_ifletexpr (e);
- visit_field ("else_block", e.get_else_block ());
- end ("IfLetExprConseqElse");
-}
-
-void
Dump::visit (MatchExpr &e)
{
begin ("MatchExpr");
@@ -1517,7 +1499,8 @@ Dump::visit (TypeParam &e)
visit_collection ("type_param_bounds", e.get_type_param_bounds ());
- visit_field ("type", e.get_type ());
+ if (e.has_type ())
+ visit_field ("type", e.get_type ());
end ("TypeParam");
}
@@ -1683,7 +1666,8 @@ Dump::visit (Function &e)
put_field ("function_params", "empty");
}
- visit_field ("return_type", e.get_return_type ());
+ if (e.has_function_return_type ())
+ visit_field ("return_type", e.get_return_type ());
if (!e.has_where_clause ())
put_field ("where_clause", "none");
@@ -1712,7 +1696,7 @@ Dump::visit (TypeAlias &e)
else
put_field ("where clause", e.get_where_clause ().as_string ());
- put_field ("type", e.get_type_aliased ()->as_string ());
+ put_field ("type", e.get_type_aliased ().as_string ());
end ("TypeAlias");
}
@@ -1916,7 +1900,8 @@ Dump::visit (TraitItemFunc &e)
do_traitfunctiondecl (e.get_decl ());
- visit_field ("block_expr", e.get_block_expr ());
+ if (e.has_definition ())
+ visit_field ("block_expr", e.get_block_expr ());
end ("TraitItemFunc");
}
@@ -2031,7 +2016,8 @@ Dump::visit (ExternalFunctionItem &e)
put_field ("has_variadics", std::to_string (e.is_variadic ()));
- visit_field ("return_type", e.get_return_type ());
+ if (e.has_return_type ())
+ visit_field ("return_type", e.get_return_type ());
end ("ExternalFunctionItem");
}
@@ -2078,7 +2064,7 @@ Dump::visit (IdentifierPattern &e)
put_field ("mut", std::to_string (e.is_mut ()));
if (e.has_pattern_to_bind ())
- put_field ("to_bind", e.get_to_bind ()->as_string ());
+ put_field ("to_bind", e.get_to_bind ().as_string ());
else
put_field ("to_bind", "none");
@@ -2122,8 +2108,8 @@ Dump::visit (RangePattern &e)
{
begin ("RangePattern");
do_mappings (e.get_mappings ());
- put_field ("lower", e.get_lower_bound ()->as_string ());
- put_field ("upper", e.get_upper_bound ()->as_string ());
+ put_field ("lower", e.get_lower_bound ().as_string ());
+ put_field ("upper", e.get_upper_bound ().as_string ());
put_field ("has_ellipsis_syntax",
std::to_string (e.get_has_ellipsis_syntax ()));
end ("RangePattern");
@@ -2135,7 +2121,7 @@ Dump::visit (ReferencePattern &e)
begin ("ReferencePattern");
do_mappings (e.get_mappings ());
put_field ("mut", std::to_string (e.is_mut ()));
- put_field ("pattern", e.get_referenced_pattern ()->as_string ());
+ put_field ("pattern", e.get_referenced_pattern ().as_string ());
end ("ReferencePattern");
}
@@ -2147,7 +2133,7 @@ Dump::visit (StructPatternFieldTuplePat &e)
auto oa = e.get_outer_attrs ();
do_outer_attrs (oa);
put_field ("index", std::to_string (e.get_index ()));
- put_field ("tuple_pattern", e.get_tuple_pattern ()->as_string ());
+ put_field ("tuple_pattern", e.get_tuple_pattern ().as_string ());
end ("StructPatternFieldTuplePat");
}
@@ -2158,7 +2144,7 @@ Dump::visit (StructPatternFieldIdentPat &e)
auto oa = e.get_outer_attrs ();
do_outer_attrs (oa);
put_field ("ident", e.get_identifier ().as_string ());
- put_field ("ident_pattern", e.get_pattern ()->as_string ());
+ put_field ("ident_pattern", e.get_pattern ().as_string ());
end ("StructPatternFieldIdentPat");
}
@@ -2276,10 +2262,12 @@ Dump::visit (LetStmt &e)
auto oa = e.get_outer_attrs ();
do_outer_attrs (oa);
- put_field ("variable_pattern", e.get_pattern ()->as_string ());
+ put_field ("variable_pattern", e.get_pattern ().as_string ());
- visit_field ("type", e.get_type ());
- visit_field ("init_expr", e.get_init_expr ());
+ if (e.has_type ())
+ visit_field ("type", e.get_type ());
+ if (e.has_init_expr ())
+ visit_field ("init_expr", e.get_init_expr ());
end ("LetStmt");
}
@@ -2337,7 +2325,7 @@ Dump::visit (ParenthesisedType &e)
{
begin ("ParenthesisedType");
do_type (e);
- put_field ("type_in_parens", e.get_type_in_parens ()->as_string ());
+ put_field ("type_in_parens", e.get_type_in_parens ().as_string ());
end ("ParenthesisedType");
}
@@ -2373,7 +2361,7 @@ Dump::visit (RawPointerType &e)
begin ("RawPointerType");
do_type (e);
put_field ("mut", Rust::enum_to_str (e.get_mut ()));
- put_field ("type", e.get_type ()->as_string ());
+ put_field ("type", e.get_type ().as_string ());
end ("RawPointerType");
}
@@ -2384,7 +2372,7 @@ Dump::visit (ReferenceType &e)
do_type (e);
put_field ("lifetime", e.get_lifetime ().as_string ());
put_field ("mut", enum_to_str (e.get_mut ()));
- put_field ("type", e.get_base_type ()->as_string ());
+ put_field ("type", e.get_base_type ().as_string ());
end ("ReferenceType");
}
diff --git a/gcc/rust/hir/rust-hir-dump.h b/gcc/rust/hir/rust-hir-dump.h
index b3a2020..8683dee 100644
--- a/gcc/rust/hir/rust-hir-dump.h
+++ b/gcc/rust/hir/rust-hir-dump.h
@@ -80,7 +80,6 @@ private:
void do_type (Type &);
void do_expr (Expr &);
void do_ifexpr (IfExpr &);
- void do_ifletexpr (IfLetExpr &);
void do_pathexpr (PathExpr &);
void do_pathpattern (PathPattern &);
void do_genericargs (GenericArgs &);
@@ -162,8 +161,6 @@ private:
virtual void visit (WhileLetLoopExpr &) override;
virtual void visit (IfExpr &) override;
virtual void visit (IfExprConseqElse &) override;
- virtual void visit (IfLetExpr &) override;
- virtual void visit (IfLetExprConseqElse &) override;
virtual void visit (MatchExpr &) override;
virtual void visit (AwaitExpr &) override;
diff --git a/gcc/rust/hir/tree/rust-hir-attrs.h b/gcc/rust/hir/tree/rust-hir-attrs.h
new file mode 100644
index 0000000..3e2b1d8
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-attrs.h
@@ -0,0 +1,56 @@
+
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_ATTRS_H
+#define RUST_HIR_ATTRS_H
+
+#include "rust-ast.h"
+
+namespace Rust {
+namespace HIR {
+
+class WithOuterAttrs
+{
+protected:
+ AST::AttrVec outer_attrs;
+
+public:
+ AST::AttrVec &get_outer_attrs () { return outer_attrs; }
+ const AST::AttrVec &get_outer_attrs () const { return outer_attrs; }
+
+ WithOuterAttrs (AST::AttrVec outer_attrs)
+ : outer_attrs (std::move (outer_attrs)){};
+};
+
+class WithInnerAttrs
+{
+protected:
+ AST::AttrVec inner_attrs;
+
+public:
+ AST::AttrVec get_inner_attrs () const { return inner_attrs; }
+
+ WithInnerAttrs (AST::AttrVec inner_attrs)
+ : inner_attrs (std::move (inner_attrs)){};
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-bound-abstract.h b/gcc/rust/hir/tree/rust-hir-bound-abstract.h
new file mode 100644
index 0000000..ffc915b
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-bound-abstract.h
@@ -0,0 +1,65 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_BOUND_ABSTRACT_H
+#define RUST_HIR_BOUND_ABSTRACT_H
+
+#include "rust-hir-visitable.h"
+#include "rust-system.h"
+#include "rust-hir-map.h"
+
+namespace Rust {
+namespace HIR {
+
+/* Abstract base class representing a type param bound - Lifetime and TraitBound
+ * extends it */
+class TypeParamBound : public FullVisitable
+{
+public:
+ using FullVisitable::accept_vis;
+ enum BoundType
+ {
+ LIFETIME,
+ TRAITBOUND
+ };
+
+ virtual ~TypeParamBound () {}
+
+ // Unique pointer custom clone function
+ std::unique_ptr<TypeParamBound> clone_type_param_bound () const
+ {
+ return std::unique_ptr<TypeParamBound> (clone_type_param_bound_impl ());
+ }
+
+ virtual std::string as_string () const = 0;
+
+ virtual Analysis::NodeMapping get_mappings () const = 0;
+
+ virtual location_t get_locus () const = 0;
+
+ virtual BoundType get_bound_type () const = 0;
+
+protected:
+ // Clone function implementation as pure virtual method
+ virtual TypeParamBound *clone_type_param_bound_impl () const = 0;
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-bound.h b/gcc/rust/hir/tree/rust-hir-bound.h
new file mode 100644
index 0000000..78bb133
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-bound.h
@@ -0,0 +1,94 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_BOUND_H
+#define RUST_HIR_BOUND_H
+
+#include "rust-hir-bound-abstract.h"
+#include "rust-common.h"
+#include "rust-hir-path.h"
+
+namespace Rust {
+namespace HIR {
+
+// Represents a lifetime (and is also a kind of type param bound)
+class Lifetime : public TypeParamBound
+{
+private:
+ AST::Lifetime::LifetimeType lifetime_type;
+ std::string lifetime_name;
+ location_t locus;
+ Analysis::NodeMapping mappings;
+
+public:
+ // Constructor
+ Lifetime (Analysis::NodeMapping mapping, AST::Lifetime::LifetimeType type,
+ std::string name, location_t locus)
+ : lifetime_type (type), lifetime_name (std::move (name)), locus (locus),
+ mappings (mapping)
+ {}
+
+ // Returns true if the lifetime is in an error state.
+ bool is_error () const
+ {
+ return lifetime_type == AST::Lifetime::LifetimeType::NAMED
+ && lifetime_name.empty ();
+ }
+
+ static Lifetime error ()
+ {
+ return Lifetime (Analysis::NodeMapping::get_error (),
+ AST::Lifetime::LifetimeType::NAMED, "", UNDEF_LOCATION);
+ }
+
+ std::string as_string () const override;
+
+ void accept_vis (HIRFullVisitor &vis) override;
+
+ WARN_UNUSED_RESULT const std::string &get_name () const
+ {
+ return lifetime_name;
+ }
+
+ AST::Lifetime::LifetimeType get_lifetime_type () const
+ {
+ return lifetime_type;
+ }
+
+ location_t get_locus () const override final { return locus; }
+
+ Analysis::NodeMapping get_mappings () const override final
+ {
+ return mappings;
+ }
+
+ BoundType get_bound_type () const final override { return LIFETIME; }
+
+protected:
+ /* Use covariance to implement clone function as returning this object rather
+ * than base */
+ Lifetime *clone_type_param_bound_impl () const override
+ {
+ return new Lifetime (*this);
+ }
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-expr-abstract.h b/gcc/rust/hir/tree/rust-hir-expr-abstract.h
new file mode 100644
index 0000000..ecf9bd1
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-expr-abstract.h
@@ -0,0 +1,174 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_EXPR_ABSTRACT_H
+#define RUST_HIR_EXPR_ABSTRACT_H
+
+#include "rust-ast.h"
+#include "rust-hir-visitable.h"
+#include "rust-hir-node.h"
+
+namespace Rust {
+namespace HIR {
+
+// Base expression HIR node - abstract
+class Expr : public Node, virtual public FullVisitable
+{
+public:
+ using FullVisitable::accept_vis;
+
+protected:
+ AST::AttrVec outer_attrs;
+ Analysis::NodeMapping mappings;
+
+public:
+ enum BlockType
+ {
+ WITH_BLOCK,
+ WITHOUT_BLOCK,
+ };
+
+ enum ExprType
+ {
+ Lit,
+ Operator,
+ Grouped,
+ Array,
+ ArrayIndex,
+ Tuple,
+ TupleIdx,
+ Struct,
+ Call,
+ MethodCall,
+ FieldAccess,
+ Closure,
+ Block,
+ Continue,
+ Break,
+ Range,
+ Return,
+ UnsafeBlock,
+ BaseLoop,
+ If,
+ IfLet,
+ Match,
+ Await,
+ AsyncBlock,
+ Path,
+ InlineAsm,
+ };
+
+ BaseKind get_hir_kind () override final { return Node::BaseKind::EXPR; }
+
+ const AST::AttrVec &get_outer_attrs () const { return outer_attrs; }
+
+ // Unique pointer custom clone function
+ std::unique_ptr<Expr> clone_expr () const
+ {
+ return std::unique_ptr<Expr> (clone_expr_impl ());
+ }
+
+ // TODO: make pure virtual if move out outer attributes to derived classes
+ virtual std::string as_string () const;
+
+ virtual ~Expr () {}
+
+ virtual location_t get_locus () const = 0;
+
+ const Analysis::NodeMapping &get_mappings () const { return mappings; }
+
+ // Clone function implementation as pure virtual method
+ virtual Expr *clone_expr_impl () const = 0;
+
+ virtual BlockType get_block_expr_type () const = 0;
+
+ virtual ExprType get_expression_type () const = 0;
+
+ virtual void accept_vis (HIRExpressionVisitor &vis) = 0;
+
+protected:
+ // Constructor
+ Expr (Analysis::NodeMapping mappings,
+ AST::AttrVec outer_attribs = AST::AttrVec ());
+
+ // TODO: think of less hacky way to implement this kind of thing
+ // Sets outer attributes.
+ void set_outer_attrs (AST::AttrVec outer_attrs_to_set)
+ {
+ outer_attrs = std::move (outer_attrs_to_set);
+ }
+};
+
+// HIR node for an expression without an accompanying block - abstract
+class ExprWithoutBlock : public Expr
+{
+protected:
+ // Constructor
+ ExprWithoutBlock (Analysis::NodeMapping mappings,
+ AST::AttrVec outer_attribs = AST::AttrVec ());
+
+ // pure virtual clone implementation
+ virtual ExprWithoutBlock *clone_expr_without_block_impl () const = 0;
+
+ /* Save having to specify two clone methods in derived classes by making expr
+ * clone return exprwithoutblock clone. Hopefully won't affect performance too
+ * much. */
+ ExprWithoutBlock *clone_expr_impl () const override
+ {
+ return clone_expr_without_block_impl ();
+ }
+
+public:
+ // Unique pointer custom clone function
+ std::unique_ptr<ExprWithoutBlock> clone_expr_without_block () const
+ {
+ return std::unique_ptr<ExprWithoutBlock> (clone_expr_without_block_impl ());
+ }
+
+ BlockType get_block_expr_type () const final override
+ {
+ return BlockType::WITHOUT_BLOCK;
+ };
+};
+
+// Base path expression HIR node - abstract
+class PathExpr : public ExprWithoutBlock
+{
+protected:
+ PathExpr (Analysis::NodeMapping mappings, AST::AttrVec outer_attribs)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs))
+ {}
+
+public:
+ /* Replaces the outer attributes of this path expression with the given outer
+ * attributes. */
+ void replace_outer_attrs (AST::AttrVec outer_attrs)
+ {
+ set_outer_attrs (std::move (outer_attrs));
+ }
+
+ ExprType get_expression_type () const final override
+ {
+ return ExprType::Path;
+ }
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-expr.cc b/gcc/rust/hir/tree/rust-hir-expr.cc
new file mode 100644
index 0000000..2ded789
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-expr.cc
@@ -0,0 +1,1484 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include "rust-hir-expr.h"
+#include "rust-operators.h"
+#include "rust-hir-stmt.h"
+
+namespace Rust {
+namespace HIR {
+
+Expr::Expr (Analysis::NodeMapping mappings, AST::AttrVec outer_attribs)
+ : outer_attrs (std::move (outer_attribs)), mappings (std::move (mappings))
+{}
+
+ExprWithoutBlock::ExprWithoutBlock (Analysis::NodeMapping mappings,
+ AST::AttrVec outer_attribs)
+ : Expr (std::move (mappings), std::move (outer_attribs))
+{}
+
+LoopLabel::LoopLabel (Analysis::NodeMapping mapping, Lifetime loop_label,
+ location_t locus)
+ : label (std::move (loop_label)), locus (locus), mappings (mapping)
+{}
+
+ExprWithBlock::ExprWithBlock (Analysis::NodeMapping mappings,
+ AST::AttrVec outer_attrs)
+ : Expr (std::move (mappings), std::move (outer_attrs))
+{}
+
+LiteralExpr::LiteralExpr (Analysis::NodeMapping mappings,
+ std::string value_as_string, Literal::LitType type,
+ PrimitiveCoreType type_hint, location_t locus,
+ AST::AttrVec outer_attrs)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attrs)),
+ literal (std::move (value_as_string), type, type_hint), locus (locus)
+{}
+
+LiteralExpr::LiteralExpr (Analysis::NodeMapping mappings, Literal literal,
+ location_t locus, AST::AttrVec outer_attrs)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attrs)),
+ literal (std::move (literal)), locus (locus)
+{}
+
+OperatorExpr::OperatorExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> main_or_left_expr,
+ AST::AttrVec outer_attribs, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ locus (locus), main_or_left_expr (std::move (main_or_left_expr))
+{}
+
+OperatorExpr::OperatorExpr (OperatorExpr const &other)
+ : ExprWithoutBlock (other), locus (other.locus),
+ main_or_left_expr (other.main_or_left_expr->clone_expr ())
+{}
+
+OperatorExpr &
+OperatorExpr::operator= (OperatorExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ main_or_left_expr = other.main_or_left_expr->clone_expr ();
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+BorrowExpr::BorrowExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> borrow_lvalue, Mutability mut,
+ AST::AttrVec outer_attribs, location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (borrow_lvalue),
+ std::move (outer_attribs), locus),
+ mut (mut)
+{}
+
+DereferenceExpr::DereferenceExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> deref_lvalue,
+ AST::AttrVec outer_attribs, location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (deref_lvalue),
+ std::move (outer_attribs), locus)
+{}
+
+ErrorPropagationExpr::ErrorPropagationExpr (
+ Analysis::NodeMapping mappings, std::unique_ptr<Expr> potential_error_value,
+ AST::AttrVec outer_attribs, location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (potential_error_value),
+ std::move (outer_attribs), locus)
+{}
+
+NegationExpr::NegationExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> negated_value,
+ ExprType expr_kind, AST::AttrVec outer_attribs,
+ location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (negated_value),
+ std::move (outer_attribs), locus),
+ expr_type (expr_kind)
+{}
+
+ArithmeticOrLogicalExpr::ArithmeticOrLogicalExpr (
+ Analysis::NodeMapping mappings, std::unique_ptr<Expr> left_value,
+ std::unique_ptr<Expr> right_value, ExprType expr_kind, location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (left_value), AST::AttrVec (),
+ locus),
+ expr_type (expr_kind), right_expr (std::move (right_value))
+{}
+
+ArithmeticOrLogicalExpr::ArithmeticOrLogicalExpr (
+ ArithmeticOrLogicalExpr const &other)
+ : OperatorExpr (other), expr_type (other.expr_type),
+ right_expr (other.right_expr->clone_expr ())
+{}
+
+ArithmeticOrLogicalExpr &
+ArithmeticOrLogicalExpr::operator= (ArithmeticOrLogicalExpr const &other)
+{
+ OperatorExpr::operator= (other);
+ // main_or_left_expr = other.main_or_left_expr->clone_expr();
+ right_expr = other.right_expr->clone_expr ();
+ expr_type = other.expr_type;
+
+ return *this;
+}
+
+ComparisonExpr::ComparisonExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> left_value,
+ std::unique_ptr<Expr> right_value,
+ ExprType comparison_kind, location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (left_value), AST::AttrVec (),
+ locus),
+ expr_type (comparison_kind), right_expr (std::move (right_value))
+{}
+
+ComparisonExpr::ComparisonExpr (ComparisonExpr const &other)
+ : OperatorExpr (other), expr_type (other.expr_type),
+ right_expr (other.right_expr->clone_expr ())
+{}
+
+ComparisonExpr &
+ComparisonExpr::operator= (ComparisonExpr const &other)
+{
+ OperatorExpr::operator= (other);
+ // main_or_left_expr = other.main_or_left_expr->clone_expr();
+ right_expr = other.right_expr->clone_expr ();
+ expr_type = other.expr_type;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+LazyBooleanExpr::LazyBooleanExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> left_bool_expr,
+ std::unique_ptr<Expr> right_bool_expr,
+ ExprType expr_kind, location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (left_bool_expr),
+ AST::AttrVec (), locus),
+ expr_type (expr_kind), right_expr (std::move (right_bool_expr))
+{}
+
+LazyBooleanExpr::LazyBooleanExpr (LazyBooleanExpr const &other)
+ : OperatorExpr (other), expr_type (other.expr_type),
+ right_expr (other.right_expr->clone_expr ())
+{}
+
+LazyBooleanExpr &
+LazyBooleanExpr::operator= (LazyBooleanExpr const &other)
+{
+ OperatorExpr::operator= (other);
+ // main_or_left_expr = other.main_or_left_expr->clone_expr();
+ right_expr = other.right_expr->clone_expr ();
+ expr_type = other.expr_type;
+
+ return *this;
+}
+
+TypeCastExpr::TypeCastExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> expr_to_cast,
+ std::unique_ptr<Type> type_to_cast_to,
+ location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (expr_to_cast),
+ AST::AttrVec (), locus),
+ type_to_convert_to (std::move (type_to_cast_to))
+{}
+
+TypeCastExpr::TypeCastExpr (TypeCastExpr const &other)
+ : OperatorExpr (other),
+ type_to_convert_to (other.type_to_convert_to->clone_type ())
+{}
+
+TypeCastExpr &
+TypeCastExpr::operator= (TypeCastExpr const &other)
+{
+ OperatorExpr::operator= (other);
+ // main_or_left_expr = other.main_or_left_expr->clone_expr();
+ type_to_convert_to = other.type_to_convert_to->clone_type ();
+
+ return *this;
+}
+
+AssignmentExpr::AssignmentExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> value_to_assign_to,
+ std::unique_ptr<Expr> value_to_assign,
+ location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (value_to_assign_to),
+ AST::AttrVec (), locus),
+ right_expr (std::move (value_to_assign))
+{}
+
+AssignmentExpr::AssignmentExpr (AssignmentExpr const &other)
+ : OperatorExpr (other), right_expr (other.right_expr->clone_expr ())
+{}
+
+AssignmentExpr &
+AssignmentExpr::operator= (AssignmentExpr const &other)
+{
+ OperatorExpr::operator= (other);
+ // main_or_left_expr = other.main_or_left_expr->clone_expr();
+ right_expr = other.right_expr->clone_expr ();
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+CompoundAssignmentExpr::CompoundAssignmentExpr (
+ Analysis::NodeMapping mappings, std::unique_ptr<Expr> value_to_assign_to,
+ std::unique_ptr<Expr> value_to_assign, ExprType expr_kind, location_t locus)
+ : OperatorExpr (std::move (mappings), std::move (value_to_assign_to),
+ AST::AttrVec (), locus),
+ expr_type (expr_kind), right_expr (std::move (value_to_assign))
+{}
+
+CompoundAssignmentExpr::CompoundAssignmentExpr (
+ CompoundAssignmentExpr const &other)
+ : OperatorExpr (other), expr_type (other.expr_type),
+ right_expr (other.right_expr->clone_expr ())
+{}
+
+CompoundAssignmentExpr &
+CompoundAssignmentExpr::operator= (CompoundAssignmentExpr const &other)
+{
+ OperatorExpr::operator= (other);
+ // main_or_left_expr = other.main_or_left_expr->clone_expr();
+ right_expr = other.right_expr->clone_expr ();
+ expr_type = other.expr_type;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+GroupedExpr::GroupedExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> parenthesised_expr,
+ AST::AttrVec inner_attribs,
+ AST::AttrVec outer_attribs, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ WithInnerAttrs (std::move (inner_attribs)),
+ expr_in_parens (std::move (parenthesised_expr)), locus (locus)
+{}
+
+GroupedExpr::GroupedExpr (GroupedExpr const &other)
+ : ExprWithoutBlock (other), WithInnerAttrs (other.inner_attrs),
+ expr_in_parens (other.expr_in_parens->clone_expr ()), locus (other.locus)
+{}
+
+GroupedExpr &
+GroupedExpr::operator= (GroupedExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ inner_attrs = other.inner_attrs;
+ expr_in_parens = other.expr_in_parens->clone_expr ();
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+ArrayElemsValues::ArrayElemsValues (Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<Expr>> elems)
+ : ArrayElems (mappings), values (std::move (elems))
+{}
+
+ArrayElemsValues::ArrayElemsValues (ArrayElemsValues const &other)
+ : ArrayElems (other)
+{
+ values.reserve (other.values.size ());
+ for (const auto &e : other.values)
+ values.push_back (e->clone_expr ());
+}
+
+ArrayElemsValues &
+ArrayElemsValues::operator= (ArrayElemsValues const &other)
+{
+ values.reserve (other.values.size ());
+ for (const auto &e : other.values)
+ values.push_back (e->clone_expr ());
+
+ return *this;
+}
+
+ArrayElemsCopied::ArrayElemsCopied (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> copied_elem,
+ std::unique_ptr<Expr> copy_amount)
+ : ArrayElems (mappings), elem_to_copy (std::move (copied_elem)),
+ num_copies (std::move (copy_amount))
+{}
+
+ArrayElemsCopied::ArrayElemsCopied (ArrayElemsCopied const &other)
+ : ArrayElems (other), elem_to_copy (other.elem_to_copy->clone_expr ()),
+ num_copies (other.num_copies->clone_expr ())
+{}
+
+ArrayElemsCopied &
+ArrayElemsCopied::operator= (ArrayElemsCopied const &other)
+{
+ elem_to_copy = other.elem_to_copy->clone_expr ();
+ num_copies = other.num_copies->clone_expr ();
+
+ return *this;
+}
+
+ArrayExpr::ArrayExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<ArrayElems> array_elems,
+ AST::AttrVec inner_attribs, AST::AttrVec outer_attribs,
+ location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ WithInnerAttrs (std::move (inner_attribs)),
+ internal_elements (std::move (array_elems)), locus (locus)
+{}
+
+ArrayExpr::ArrayExpr (ArrayExpr const &other)
+ : ExprWithoutBlock (other), WithInnerAttrs (other.inner_attrs),
+ locus (other.locus)
+{
+ if (other.has_array_elems ())
+ internal_elements = other.internal_elements->clone_array_elems ();
+}
+
+ArrayExpr &
+ArrayExpr::operator= (ArrayExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ inner_attrs = other.inner_attrs;
+ if (other.has_array_elems ())
+ internal_elements = other.internal_elements->clone_array_elems ();
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+ArrayIndexExpr::ArrayIndexExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> array_expr,
+ std::unique_ptr<Expr> array_index_expr,
+ AST::AttrVec outer_attribs, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ array_expr (std::move (array_expr)),
+ index_expr (std::move (array_index_expr)), locus (locus)
+{}
+
+ArrayIndexExpr::ArrayIndexExpr (ArrayIndexExpr const &other)
+ : ExprWithoutBlock (other), array_expr (other.array_expr->clone_expr ()),
+ index_expr (other.index_expr->clone_expr ()), locus (other.locus)
+{}
+
+ArrayIndexExpr &
+ArrayIndexExpr::operator= (ArrayIndexExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ array_expr = other.array_expr->clone_expr ();
+ index_expr = other.index_expr->clone_expr ();
+ // outer_attrs = other.outer_attrs;
+ locus = other.locus;
+
+ return *this;
+}
+
+TupleExpr::TupleExpr (Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<Expr>> tuple_elements,
+ AST::AttrVec inner_attribs, AST::AttrVec outer_attribs,
+ location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ WithInnerAttrs (std::move (inner_attribs)),
+ tuple_elems (std::move (tuple_elements)), locus (locus)
+{}
+
+TupleExpr::TupleExpr (TupleExpr const &other)
+ : ExprWithoutBlock (other), WithInnerAttrs (other.inner_attrs),
+ locus (other.locus)
+{
+ tuple_elems.reserve (other.tuple_elems.size ());
+ for (const auto &e : other.tuple_elems)
+ tuple_elems.push_back (e->clone_expr ());
+}
+
+TupleExpr &
+TupleExpr::operator= (TupleExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ inner_attrs = other.inner_attrs;
+ locus = other.locus;
+
+ tuple_elems.reserve (other.tuple_elems.size ());
+ for (const auto &e : other.tuple_elems)
+ tuple_elems.push_back (e->clone_expr ());
+
+ return *this;
+}
+
+TupleIndexExpr::TupleIndexExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> tuple_expr,
+ TupleIndex index, AST::AttrVec outer_attribs,
+ location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ tuple_expr (std::move (tuple_expr)), tuple_index (index), locus (locus)
+{}
+
+TupleIndexExpr::TupleIndexExpr (TupleIndexExpr const &other)
+ : ExprWithoutBlock (other), tuple_expr (other.tuple_expr->clone_expr ()),
+ tuple_index (other.tuple_index), locus (other.locus)
+{}
+
+TupleIndexExpr &
+TupleIndexExpr::operator= (TupleIndexExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ tuple_expr = other.tuple_expr->clone_expr ();
+ tuple_index = other.tuple_index;
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+StructExpr::StructExpr (Analysis::NodeMapping mappings,
+ PathInExpression struct_path,
+ AST::AttrVec outer_attribs)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ struct_name (std::move (struct_path))
+{}
+
+StructExprStruct::StructExprStruct (Analysis::NodeMapping mappings,
+ PathInExpression struct_path,
+ AST::AttrVec inner_attribs,
+ AST::AttrVec outer_attribs,
+ location_t locus)
+ : StructExpr (std::move (mappings), std::move (struct_path),
+ std::move (outer_attribs)),
+ WithInnerAttrs (std::move (inner_attribs)), locus (locus)
+{}
+
+StructBase::StructBase (std::unique_ptr<Expr> base_struct_ptr)
+ : base_struct (std::move (base_struct_ptr))
+{}
+
+StructBase::StructBase (StructBase const &other)
+{
+ /* HACK: gets around base_struct pointer being null (e.g. if no struct base
+ * exists) */
+ if (other.base_struct != nullptr)
+ other.base_struct->clone_expr ();
+}
+
+StructBase &
+StructBase::operator= (StructBase const &other)
+{
+ base_struct = other.base_struct->clone_expr ();
+
+ return *this;
+}
+
+StructExprField::StructExprField (Analysis::NodeMapping mapping,
+ location_t locus)
+ : mappings (mapping), locus (locus)
+{}
+
+StructExprFieldIdentifier::StructExprFieldIdentifier (
+ Analysis::NodeMapping mapping, Identifier field_identifier, location_t locus)
+ : StructExprField (mapping, locus), field_name (std::move (field_identifier))
+{}
+
+StructExprFieldWithVal::StructExprFieldWithVal (
+ Analysis::NodeMapping mapping, std::unique_ptr<Expr> field_value,
+ location_t locus)
+ : StructExprField (mapping, locus), value (std::move (field_value))
+{}
+
+StructExprFieldWithVal::StructExprFieldWithVal (
+ StructExprFieldWithVal const &other)
+ : StructExprField (other.mappings, other.locus),
+ value (other.value->clone_expr ())
+{}
+
+StructExprFieldWithVal &
+StructExprFieldWithVal::operator= (StructExprFieldWithVal const &other)
+{
+ value = other.value->clone_expr ();
+ mappings = other.mappings;
+ locus = other.locus;
+
+ return *this;
+}
+
+StructExprFieldIdentifierValue::StructExprFieldIdentifierValue (
+ Analysis::NodeMapping mapping, Identifier field_identifier,
+ std::unique_ptr<Expr> field_value, location_t locus)
+ : StructExprFieldWithVal (mapping, std::move (field_value), locus),
+ field_name (std::move (field_identifier))
+{}
+
+StructExprFieldIndexValue::StructExprFieldIndexValue (
+ Analysis::NodeMapping mapping, TupleIndex tuple_index,
+ std::unique_ptr<Expr> field_value, location_t locus)
+ : StructExprFieldWithVal (mapping, std::move (field_value), locus),
+ index (tuple_index)
+{}
+
+StructExprStructFields::StructExprStructFields (
+ Analysis::NodeMapping mappings, PathInExpression struct_path,
+ std::vector<std::unique_ptr<StructExprField>> expr_fields, location_t locus,
+ tl::optional<std::unique_ptr<StructBase>> base_struct,
+ AST::AttrVec inner_attribs = AST::AttrVec (),
+ AST::AttrVec outer_attribs = AST::AttrVec ())
+ : StructExprStruct (std::move (mappings), std::move (struct_path),
+ std::move (inner_attribs), std::move (outer_attribs),
+ locus),
+ fields (std::move (expr_fields)), struct_base (std::move (base_struct))
+{}
+
+StructExprStructFields::StructExprStructFields (
+ StructExprStructFields const &other)
+ : StructExprStruct (other),
+ struct_base (other.has_struct_base ()
+ ? tl::optional<std::unique_ptr<StructBase>> (
+ std::make_unique<StructBase> (*other.struct_base.value ()))
+ : tl::nullopt),
+ union_index (other.union_index)
+{
+ fields.reserve (other.fields.size ());
+ for (const auto &e : other.fields)
+ fields.push_back (e->clone_struct_expr_field ());
+}
+
+StructExprStructFields &
+StructExprStructFields::operator= (StructExprStructFields const &other)
+{
+ StructExprStruct::operator= (other);
+ struct_base = other.has_struct_base ()
+ ? tl::optional<std::unique_ptr<StructBase>> (
+ std::make_unique<StructBase> (*other.struct_base.value ()))
+ : tl::nullopt;
+ union_index = other.union_index;
+
+ fields.reserve (other.fields.size ());
+ for (const auto &e : other.fields)
+ fields.push_back (e->clone_struct_expr_field ());
+
+ return *this;
+}
+
+StructExprStructBase::StructExprStructBase (Analysis::NodeMapping mappings,
+ PathInExpression struct_path,
+ StructBase base_struct,
+ AST::AttrVec inner_attribs,
+ AST::AttrVec outer_attribs,
+ location_t locus)
+ : StructExprStruct (std::move (mappings), std::move (struct_path),
+ std::move (inner_attribs), std::move (outer_attribs),
+ locus),
+ struct_base (std::move (base_struct))
+{}
+
+CallExpr::CallExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> function_expr,
+ std::vector<std::unique_ptr<Expr>> function_params,
+ AST::AttrVec outer_attribs, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ function (std::move (function_expr)), params (std::move (function_params)),
+ locus (locus)
+{}
+
+CallExpr::CallExpr (CallExpr const &other)
+ : ExprWithoutBlock (other), function (other.function->clone_expr ()),
+ locus (other.locus)
+/*, params(other.params),*/ {
+ params.reserve (other.params.size ());
+ for (const auto &e : other.params)
+ params.push_back (e->clone_expr ());
+}
+
+CallExpr &
+CallExpr::operator= (CallExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ function = other.function->clone_expr ();
+ locus = other.locus;
+ // params = other.params;
+ // outer_attrs = other.outer_attrs;
+
+ params.reserve (other.params.size ());
+ for (const auto &e : other.params)
+ params.push_back (e->clone_expr ());
+
+ return *this;
+}
+
+MethodCallExpr::MethodCallExpr (
+ Analysis::NodeMapping mappings, std::unique_ptr<Expr> call_receiver,
+ PathExprSegment method_path, std::vector<std::unique_ptr<Expr>> method_params,
+ AST::AttrVec outer_attribs, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ receiver (std::move (call_receiver)), method_name (std::move (method_path)),
+ params (std::move (method_params)), locus (locus)
+{}
+
+MethodCallExpr::MethodCallExpr (MethodCallExpr const &other)
+ : ExprWithoutBlock (other), receiver (other.receiver->clone_expr ()),
+ method_name (other.method_name), locus (other.locus)
+/*, params(other.params),*/ {
+ params.reserve (other.params.size ());
+ for (const auto &e : other.params)
+ params.push_back (e->clone_expr ());
+}
+
+MethodCallExpr &
+MethodCallExpr::operator= (MethodCallExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ receiver = other.receiver->clone_expr ();
+ method_name = other.method_name;
+ locus = other.locus;
+ // params = other.params;
+ // outer_attrs = other.outer_attrs;
+
+ params.reserve (other.params.size ());
+ for (const auto &e : other.params)
+ params.push_back (e->clone_expr ());
+
+ return *this;
+}
+
+FieldAccessExpr::FieldAccessExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> field_access_receiver,
+ Identifier field_name,
+ AST::AttrVec outer_attribs, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ receiver (std::move (field_access_receiver)),
+ field (std::move (field_name)), locus (locus)
+{}
+
+FieldAccessExpr::FieldAccessExpr (FieldAccessExpr const &other)
+ : ExprWithoutBlock (other), receiver (other.receiver->clone_expr ()),
+ field (other.field), locus (other.locus)
+{}
+
+FieldAccessExpr &
+FieldAccessExpr::operator= (FieldAccessExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ receiver = other.receiver->clone_expr ();
+ field = other.field;
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+ClosureParam::ClosureParam (std::unique_ptr<Pattern> param_pattern,
+ location_t locus, std::unique_ptr<Type> param_type,
+ std::vector<AST::Attribute> outer_attrs)
+ : outer_attrs (std::move (outer_attrs)), pattern (std::move (param_pattern)),
+ type (std::move (param_type)), locus (locus)
+{}
+
+ClosureParam::ClosureParam (ClosureParam const &other)
+ : pattern (other.pattern->clone_pattern ())
+{
+ // guard to protect from null pointer dereference
+ if (other.pattern != nullptr)
+ pattern = other.pattern->clone_pattern ();
+ if (other.type != nullptr)
+ type = other.type->clone_type ();
+}
+
+ClosureParam &
+ClosureParam::operator= (ClosureParam const &other)
+{
+ outer_attrs = other.outer_attrs;
+
+ // guard to protect from null pointer dereference
+ if (other.pattern != nullptr)
+ pattern = other.pattern->clone_pattern ();
+ else
+ pattern = nullptr;
+ if (other.type != nullptr)
+ type = other.type->clone_type ();
+ else
+ type = nullptr;
+
+ return *this;
+}
+
+ClosureExpr::ClosureExpr (Analysis::NodeMapping mappings,
+ std::vector<ClosureParam> closure_params,
+ std::unique_ptr<Type> closure_return_type,
+ std::unique_ptr<Expr> closure_expr, bool has_move,
+ AST::AttrVec outer_attribs, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ has_move (has_move), params (std::move (closure_params)), locus (locus),
+ return_type (std::move (closure_return_type)),
+ expr (std::move (closure_expr))
+{}
+
+ClosureExpr::ClosureExpr (ClosureExpr const &other)
+ : ExprWithoutBlock (other.get_mappings (), other.get_outer_attrs ())
+{
+ return_type
+ = other.has_return_type () ? other.return_type->clone_type () : nullptr;
+ expr = other.expr->clone_expr ();
+ params = other.params;
+ has_move = other.has_move;
+}
+
+ClosureExpr &
+ClosureExpr::operator= (ClosureExpr const &other)
+{
+ mappings = other.mappings;
+ return_type
+ = other.has_return_type () ? other.return_type->clone_type () : nullptr;
+ expr = other.expr->clone_expr ();
+ params = other.params;
+ has_move = other.has_move;
+
+ return *this;
+}
+
+BlockExpr::BlockExpr (Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<Stmt>> block_statements,
+ std::unique_ptr<Expr> block_expr, bool tail_reachable,
+ AST::AttrVec inner_attribs, AST::AttrVec outer_attribs,
+ LoopLabel label, location_t start_locus,
+ location_t end_locus)
+ : ExprWithBlock (std::move (mappings), std::move (outer_attribs)),
+ WithInnerAttrs (std::move (inner_attribs)),
+ statements (std::move (block_statements)), expr (std::move (block_expr)),
+ tail_reachable (tail_reachable), label (std::move (label)),
+ start_locus (start_locus), end_locus (end_locus)
+{}
+
+BlockExpr::BlockExpr (BlockExpr const &other)
+ : ExprWithBlock (other), /*statements(other.statements),*/
+ WithInnerAttrs (other.inner_attrs), label (other.label),
+ start_locus (other.start_locus), end_locus (other.end_locus)
+{
+ // guard to protect from null pointer dereference
+ if (other.expr != nullptr)
+ expr = other.expr->clone_expr ();
+
+ statements.reserve (other.statements.size ());
+ for (const auto &e : other.statements)
+ statements.push_back (e->clone_stmt ());
+}
+
+BlockExpr &
+BlockExpr::operator= (BlockExpr const &other)
+{
+ ExprWithBlock::operator= (other);
+ // statements = other.statements;
+ expr = other.expr->clone_expr ();
+ inner_attrs = other.inner_attrs;
+ start_locus = other.end_locus;
+ end_locus = other.end_locus;
+ // outer_attrs = other.outer_attrs;
+
+ statements.reserve (other.statements.size ());
+ for (const auto &e : other.statements)
+ statements.push_back (e->clone_stmt ());
+
+ return *this;
+}
+
+ContinueExpr::ContinueExpr (Analysis::NodeMapping mappings, location_t locus,
+ Lifetime label, AST::AttrVec outer_attribs)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ label (std::move (label)), locus (locus)
+{}
+
+BreakExpr::BreakExpr (Analysis::NodeMapping mappings, location_t locus,
+ Lifetime break_label, std::unique_ptr<Expr> expr_in_break,
+ AST::AttrVec outer_attribs)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ label (std::move (break_label)), break_expr (std::move (expr_in_break)),
+ locus (locus)
+{}
+
+BreakExpr::BreakExpr (BreakExpr const &other)
+ : ExprWithoutBlock (other), label (other.label), locus (other.locus)
+{
+ // guard to protect from null pointer dereference
+ if (other.break_expr != nullptr)
+ break_expr = other.break_expr->clone_expr ();
+}
+
+BreakExpr &
+BreakExpr::operator= (BreakExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ label = other.label;
+ break_expr = other.break_expr->clone_expr ();
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+RangeExpr::RangeExpr (Analysis::NodeMapping mappings, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), AST::AttrVec ()), locus (locus)
+{}
+
+RangeFromToExpr::RangeFromToExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> range_from,
+ std::unique_ptr<Expr> range_to,
+ location_t locus)
+ : RangeExpr (std::move (mappings), locus), from (std::move (range_from)),
+ to (std::move (range_to))
+{}
+
+RangeFromToExpr::RangeFromToExpr (RangeFromToExpr const &other)
+ : RangeExpr (other), from (other.from->clone_expr ()),
+ to (other.to->clone_expr ())
+{}
+
+RangeFromToExpr &
+RangeFromToExpr::operator= (RangeFromToExpr const &other)
+{
+ RangeExpr::operator= (other);
+ from = other.from->clone_expr ();
+ to = other.to->clone_expr ();
+
+ return *this;
+}
+
+RangeFromExpr::RangeFromExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> range_from,
+ location_t locus)
+ : RangeExpr (std::move (mappings), locus), from (std::move (range_from))
+{}
+
+RangeFromExpr::RangeFromExpr (RangeFromExpr const &other)
+ : RangeExpr (other), from (other.from->clone_expr ())
+{}
+
+RangeFromExpr &
+RangeFromExpr::operator= (RangeFromExpr const &other)
+{
+ RangeExpr::operator= (other);
+ from = other.from->clone_expr ();
+
+ return *this;
+}
+
+RangeToExpr::RangeToExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> range_to, location_t locus)
+ : RangeExpr (std::move (mappings), locus), to (std::move (range_to))
+{}
+
+RangeToExpr::RangeToExpr (RangeToExpr const &other)
+ : RangeExpr (other), to (other.to->clone_expr ())
+{}
+
+RangeToExpr &
+RangeToExpr::operator= (RangeToExpr const &other)
+{
+ RangeExpr::operator= (other);
+ to = other.to->clone_expr ();
+
+ return *this;
+}
+
+RangeFullExpr::RangeFullExpr (Analysis::NodeMapping mappings, location_t locus)
+ : RangeExpr (std::move (mappings), locus)
+{}
+
+RangeFromToInclExpr::RangeFromToInclExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> range_from,
+ std::unique_ptr<Expr> range_to,
+ location_t locus)
+ : RangeExpr (std::move (mappings), locus), from (std::move (range_from)),
+ to (std::move (range_to))
+{}
+
+RangeFromToInclExpr::RangeFromToInclExpr (RangeFromToInclExpr const &other)
+ : RangeExpr (other), from (other.from->clone_expr ()),
+ to (other.to->clone_expr ())
+{}
+
+RangeFromToInclExpr &
+RangeFromToInclExpr::operator= (RangeFromToInclExpr const &other)
+{
+ RangeExpr::operator= (other);
+ from = other.from->clone_expr ();
+ to = other.to->clone_expr ();
+
+ return *this;
+}
+
+RangeToInclExpr::RangeToInclExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> range_to,
+ location_t locus)
+ : RangeExpr (std::move (mappings), locus), to (std::move (range_to))
+{}
+
+RangeToInclExpr::RangeToInclExpr (RangeToInclExpr const &other)
+ : RangeExpr (other), to (other.to->clone_expr ())
+{}
+
+RangeToInclExpr &
+RangeToInclExpr::operator= (RangeToInclExpr const &other)
+{
+ RangeExpr::operator= (other);
+ to = other.to->clone_expr ();
+
+ return *this;
+}
+
+ReturnExpr::ReturnExpr (Analysis::NodeMapping mappings, location_t locus,
+ std::unique_ptr<Expr> returned_expr,
+ AST::AttrVec outer_attribs)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ return_expr (std::move (returned_expr)), locus (locus)
+{}
+
+ReturnExpr::ReturnExpr (ReturnExpr const &other)
+ : ExprWithoutBlock (other), locus (other.locus)
+{
+ // guard to protect from null pointer dereference
+ if (other.return_expr != nullptr)
+ return_expr = other.return_expr->clone_expr ();
+}
+
+ReturnExpr &
+ReturnExpr::operator= (ReturnExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ return_expr = other.return_expr->clone_expr ();
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+UnsafeBlockExpr::UnsafeBlockExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<BlockExpr> block_expr,
+ AST::AttrVec outer_attribs, location_t locus)
+ : ExprWithBlock (std::move (mappings), std::move (outer_attribs)),
+ expr (std::move (block_expr)), locus (locus)
+{}
+
+UnsafeBlockExpr::UnsafeBlockExpr (UnsafeBlockExpr const &other)
+ : ExprWithBlock (other), expr (other.expr->clone_block_expr ()),
+ locus (other.locus)
+{}
+
+UnsafeBlockExpr &
+UnsafeBlockExpr::operator= (UnsafeBlockExpr const &other)
+{
+ ExprWithBlock::operator= (other);
+ expr = other.expr->clone_block_expr ();
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+BaseLoopExpr::BaseLoopExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<BlockExpr> loop_block,
+ location_t locus, LoopLabel loop_label,
+ AST::AttrVec outer_attribs)
+ : ExprWithBlock (std::move (mappings), std::move (outer_attribs)),
+ loop_label (std::move (loop_label)), loop_block (std::move (loop_block)),
+ locus (locus)
+{}
+
+BaseLoopExpr::BaseLoopExpr (BaseLoopExpr const &other)
+ : ExprWithBlock (other), loop_label (other.loop_label),
+ loop_block (other.loop_block->clone_block_expr ()), locus (other.locus)
+{}
+
+BaseLoopExpr &
+BaseLoopExpr::operator= (BaseLoopExpr const &other)
+{
+ ExprWithBlock::operator= (other);
+ loop_block = other.loop_block->clone_block_expr ();
+ loop_label = other.loop_label;
+ locus = other.locus;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+LoopExpr::LoopExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<BlockExpr> loop_block, location_t locus,
+ LoopLabel loop_label, AST::AttrVec outer_attribs)
+ : BaseLoopExpr (std::move (mappings), std::move (loop_block), locus,
+ std::move (loop_label), std::move (outer_attribs))
+{}
+
+WhileLoopExpr::WhileLoopExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> loop_condition,
+ std::unique_ptr<BlockExpr> loop_block,
+ location_t locus, LoopLabel loop_label,
+ AST::AttrVec outer_attribs)
+ : BaseLoopExpr (std::move (mappings), std::move (loop_block), locus,
+ std::move (loop_label), std::move (outer_attribs)),
+ condition (std::move (loop_condition))
+{}
+
+WhileLoopExpr::WhileLoopExpr (WhileLoopExpr const &other)
+ : BaseLoopExpr (other), condition (other.condition->clone_expr ())
+{}
+
+WhileLoopExpr &
+WhileLoopExpr::operator= (WhileLoopExpr const &other)
+{
+ BaseLoopExpr::operator= (other);
+ condition = other.condition->clone_expr ();
+ // loop_block = other.loop_block->clone_block_expr();
+ // loop_label = other.loop_label;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+WhileLetLoopExpr::WhileLetLoopExpr (
+ Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
+ std::unique_ptr<Expr> condition, std::unique_ptr<BlockExpr> loop_block,
+ location_t locus, LoopLabel loop_label, AST::AttrVec outer_attribs)
+ : BaseLoopExpr (std::move (mappings), std::move (loop_block), locus,
+ std::move (loop_label), std::move (outer_attribs)),
+ match_arm_patterns (std::move (match_arm_patterns)),
+ condition (std::move (condition))
+{}
+
+WhileLetLoopExpr::WhileLetLoopExpr (WhileLetLoopExpr const &other)
+ : BaseLoopExpr (other),
+ /*match_arm_patterns(other.match_arm_patterns),*/ condition (
+ other.condition->clone_expr ())
+{
+ match_arm_patterns.reserve (other.match_arm_patterns.size ());
+ for (const auto &e : other.match_arm_patterns)
+ match_arm_patterns.push_back (e->clone_pattern ());
+}
+
+WhileLetLoopExpr &
+WhileLetLoopExpr::operator= (WhileLetLoopExpr const &other)
+{
+ BaseLoopExpr::operator= (other);
+ // match_arm_patterns = other.match_arm_patterns;
+ condition = other.condition->clone_expr ();
+ // loop_block = other.loop_block->clone_block_expr();
+ // loop_label = other.loop_label;
+ // outer_attrs = other.outer_attrs;
+
+ match_arm_patterns.reserve (other.match_arm_patterns.size ());
+ for (const auto &e : other.match_arm_patterns)
+ match_arm_patterns.push_back (e->clone_pattern ());
+
+ return *this;
+}
+
+IfExpr::IfExpr (Analysis::NodeMapping mappings, std::unique_ptr<Expr> condition,
+ std::unique_ptr<BlockExpr> if_block, location_t locus)
+ : ExprWithBlock (std::move (mappings), AST::AttrVec ()),
+ condition (std::move (condition)), if_block (std::move (if_block)),
+ locus (locus)
+{}
+
+IfExpr::IfExpr (IfExpr const &other)
+ : ExprWithBlock (other), condition (other.condition->clone_expr ()),
+ if_block (other.if_block->clone_block_expr ()), locus (other.locus)
+{}
+
+IfExpr &
+IfExpr::operator= (IfExpr const &other)
+{
+ ExprWithBlock::operator= (other);
+ condition = other.condition->clone_expr ();
+ if_block = other.if_block->clone_block_expr ();
+ locus = other.locus;
+
+ return *this;
+}
+
+IfExprConseqElse::IfExprConseqElse (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> condition,
+ std::unique_ptr<BlockExpr> if_block,
+ std::unique_ptr<ExprWithBlock> else_block,
+ location_t locus)
+ : IfExpr (std::move (mappings), std::move (condition), std::move (if_block),
+ locus),
+ else_block (std::move (else_block))
+{}
+
+IfExprConseqElse::IfExprConseqElse (IfExprConseqElse const &other)
+ : IfExpr (other), else_block (other.else_block->clone_expr_with_block ())
+{}
+
+IfExprConseqElse &
+IfExprConseqElse::operator= (IfExprConseqElse const &other)
+{
+ IfExpr::operator= (other);
+ // condition = other.condition->clone_expr();
+ // if_block = other.if_block->clone_block_expr();
+ else_block = other.else_block->clone_expr_with_block ();
+
+ return *this;
+}
+
+MatchArm::MatchArm (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
+ location_t locus, std::unique_ptr<Expr> guard_expr,
+ AST::AttrVec outer_attrs)
+ : outer_attrs (std::move (outer_attrs)),
+ match_arm_patterns (std::move (match_arm_patterns)),
+ guard_expr (std::move (guard_expr)), locus (locus)
+{}
+
+MatchArm::MatchArm (MatchArm const &other) : outer_attrs (other.outer_attrs)
+{
+ // guard to protect from null pointer dereference
+ if (other.guard_expr != nullptr)
+ guard_expr = other.guard_expr->clone_expr ();
+
+ match_arm_patterns.reserve (other.match_arm_patterns.size ());
+ for (const auto &e : other.match_arm_patterns)
+ match_arm_patterns.push_back (e->clone_pattern ());
+
+ locus = other.locus;
+}
+
+MatchArm &
+MatchArm::operator= (MatchArm const &other)
+{
+ outer_attrs = other.outer_attrs;
+
+ if (other.guard_expr != nullptr)
+ guard_expr = other.guard_expr->clone_expr ();
+
+ match_arm_patterns.clear ();
+ match_arm_patterns.reserve (other.match_arm_patterns.size ());
+ for (const auto &e : other.match_arm_patterns)
+ match_arm_patterns.push_back (e->clone_pattern ());
+
+ return *this;
+}
+
+MatchCase::MatchCase (Analysis::NodeMapping mappings, MatchArm arm,
+ std::unique_ptr<Expr> expr)
+ : mappings (mappings), arm (std::move (arm)), expr (std::move (expr))
+{}
+
+MatchCase::MatchCase (const MatchCase &other)
+ : mappings (other.mappings), arm (other.arm), expr (other.expr->clone_expr ())
+{}
+
+MatchCase &
+MatchCase::operator= (const MatchCase &other)
+{
+ mappings = other.mappings;
+ arm = other.arm;
+ expr = other.expr->clone_expr ();
+
+ return *this;
+}
+
+MatchExpr::MatchExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> branch_value,
+ std::vector<MatchCase> match_arms,
+ AST::AttrVec inner_attrs, AST::AttrVec outer_attrs,
+ location_t locus)
+ : ExprWithBlock (std::move (mappings), std::move (outer_attrs)),
+ WithInnerAttrs (std::move (inner_attrs)),
+ branch_value (std::move (branch_value)),
+ match_arms (std::move (match_arms)), locus (locus)
+{}
+
+MatchExpr::MatchExpr (MatchExpr const &other)
+ : ExprWithBlock (other), WithInnerAttrs (other.inner_attrs),
+ branch_value (other.branch_value->clone_expr ()),
+ match_arms (other.match_arms), locus (other.locus)
+{
+ /*match_arms.reserve (other.match_arms.size ());
+ for (const auto &e : other.match_arms)
+ match_arms.push_back (e->clone_match_case ());*/
+}
+
+MatchExpr &
+MatchExpr::operator= (MatchExpr const &other)
+{
+ ExprWithBlock::operator= (other);
+ branch_value = other.branch_value->clone_expr ();
+ inner_attrs = other.inner_attrs;
+ match_arms = other.match_arms;
+ // outer_attrs = other.outer_attrs;
+ locus = other.locus;
+
+ /*match_arms.reserve (other.match_arms.size ());
+ for (const auto &e : other.match_arms)
+ match_arms.push_back (e->clone_match_case ());*/
+
+ return *this;
+}
+
+AwaitExpr::AwaitExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<Expr> awaited_expr,
+ AST::AttrVec outer_attrs, location_t locus)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attrs)),
+ awaited_expr (std::move (awaited_expr)), locus (locus)
+{}
+
+AwaitExpr::AwaitExpr (AwaitExpr const &other)
+ : ExprWithoutBlock (other), awaited_expr (other.awaited_expr->clone_expr ()),
+ locus (other.locus)
+{}
+
+AwaitExpr &
+AwaitExpr::operator= (AwaitExpr const &other)
+{
+ ExprWithoutBlock::operator= (other);
+ awaited_expr = other.awaited_expr->clone_expr ();
+ locus = other.locus;
+
+ return *this;
+}
+
+AsyncBlockExpr::AsyncBlockExpr (Analysis::NodeMapping mappings,
+ std::unique_ptr<BlockExpr> block_expr,
+ bool has_move, AST::AttrVec outer_attrs,
+ location_t locus)
+ : ExprWithBlock (std::move (mappings), std::move (outer_attrs)),
+ has_move (has_move), block_expr (std::move (block_expr)), locus (locus)
+{}
+
+AsyncBlockExpr::AsyncBlockExpr (AsyncBlockExpr const &other)
+ : ExprWithBlock (other), has_move (other.has_move),
+ block_expr (other.block_expr->clone_block_expr ()), locus (other.locus)
+{}
+
+AsyncBlockExpr &
+AsyncBlockExpr::operator= (AsyncBlockExpr const &other)
+{
+ ExprWithBlock::operator= (other);
+ has_move = other.has_move;
+ block_expr = other.block_expr->clone_block_expr ();
+ locus = other.locus;
+
+ return *this;
+}
+
+OperatorExprMeta::OperatorExprMeta (HIR::CompoundAssignmentExpr &expr)
+ : node_mappings (expr.get_mappings ()),
+ lvalue_mappings (expr.get_expr ().get_mappings ()),
+ locus (expr.get_locus ())
+{}
+
+OperatorExprMeta::OperatorExprMeta (HIR::ArithmeticOrLogicalExpr &expr)
+ : node_mappings (expr.get_mappings ()),
+ lvalue_mappings (expr.get_expr ().get_mappings ()),
+ locus (expr.get_locus ())
+{}
+
+OperatorExprMeta::OperatorExprMeta (HIR::NegationExpr &expr)
+ : node_mappings (expr.get_mappings ()),
+ lvalue_mappings (expr.get_expr ().get_mappings ()),
+ locus (expr.get_locus ())
+{}
+
+OperatorExprMeta::OperatorExprMeta (HIR::DereferenceExpr &expr)
+ : node_mappings (expr.get_mappings ()),
+ lvalue_mappings (expr.get_expr ().get_mappings ()),
+ locus (expr.get_locus ())
+{}
+
+OperatorExprMeta::OperatorExprMeta (HIR::ArrayIndexExpr &expr)
+ : node_mappings (expr.get_mappings ()),
+ lvalue_mappings (expr.get_array_expr ().get_mappings ()),
+ locus (expr.get_locus ())
+{}
+
+OperatorExprMeta::OperatorExprMeta (HIR::ComparisonExpr &expr)
+ : node_mappings (expr.get_mappings ()),
+ lvalue_mappings (expr.get_expr ().get_mappings ()),
+ locus (expr.get_locus ())
+{}
+
+AnonConst::AnonConst (NodeId id, std::unique_ptr<Expr> expr)
+ : id (id), expr (std::move (expr))
+{
+ rust_assert (this->expr != nullptr);
+}
+
+AnonConst::AnonConst (const AnonConst &other)
+{
+ id = other.id;
+ expr = other.expr->clone_expr ();
+}
+
+AnonConst
+AnonConst::operator= (const AnonConst &other)
+{
+ id = other.id;
+ expr = other.expr->clone_expr ();
+ return *this;
+}
+
+InlineAsmOperand::In::In (
+ const tl::optional<struct AST::InlineAsmRegOrRegClass> &reg,
+ std::unique_ptr<Expr> expr)
+ : reg (reg), expr (std::move (expr))
+{
+ rust_assert (this->expr != nullptr);
+}
+
+InlineAsmOperand::In::In (const struct In &other)
+{
+ reg = other.reg;
+
+ expr = other.expr->clone_expr ();
+}
+
+InlineAsmOperand::In
+InlineAsmOperand::In::operator= (const struct In &other)
+{
+ reg = other.reg;
+ expr = other.expr->clone_expr ();
+
+ return *this;
+}
+
+InlineAsmOperand::Out::Out (
+ tl::optional<struct AST::InlineAsmRegOrRegClass> &reg, bool late,
+ std::unique_ptr<Expr> expr)
+ : reg (reg), late (late), expr (std::move (expr))
+{
+ rust_assert (this->expr != nullptr);
+}
+
+InlineAsmOperand::Out::Out (const struct Out &other)
+{
+ reg = other.reg;
+ late = other.late;
+ expr = other.expr->clone_expr ();
+}
+
+InlineAsmOperand::Out
+InlineAsmOperand::Out::operator= (const struct Out &other)
+{
+ reg = other.reg;
+ late = other.late;
+ expr = other.expr->clone_expr ();
+ return *this;
+}
+
+InlineAsmOperand::InOut::InOut (
+ tl::optional<struct AST::InlineAsmRegOrRegClass> &reg, bool late,
+ std::unique_ptr<Expr> expr)
+ : reg (reg), late (late), expr (std::move (expr))
+{
+ rust_assert (this->expr != nullptr);
+}
+
+InlineAsmOperand::InOut::InOut (const struct InOut &other)
+{
+ reg = other.reg;
+ late = other.late;
+ expr = other.expr->clone_expr ();
+}
+
+InlineAsmOperand::InOut
+InlineAsmOperand::InOut::operator= (const struct InOut &other)
+{
+ reg = other.reg;
+ late = other.late;
+ expr = other.expr->clone_expr ();
+
+ return *this;
+}
+
+InlineAsmOperand::SplitInOut::SplitInOut (
+ tl::optional<struct AST::InlineAsmRegOrRegClass> &reg, bool late,
+ std::unique_ptr<Expr> in_expr, std::unique_ptr<Expr> out_expr)
+ : reg (reg), late (late), in_expr (std::move (in_expr)),
+ out_expr (std::move (out_expr))
+{
+ rust_assert (this->in_expr != nullptr);
+ rust_assert (this->out_expr != nullptr);
+}
+
+InlineAsmOperand::SplitInOut::SplitInOut (const struct SplitInOut &other)
+{
+ reg = other.reg;
+ late = other.late;
+ in_expr = other.in_expr->clone_expr ();
+ out_expr = other.out_expr->clone_expr ();
+}
+
+InlineAsmOperand::SplitInOut
+InlineAsmOperand::SplitInOut::operator= (const struct SplitInOut &other)
+{
+ reg = other.reg;
+ late = other.late;
+ in_expr = other.in_expr->clone_expr ();
+ out_expr = other.out_expr->clone_expr ();
+
+ return *this;
+}
+
+InlineAsmOperand::Sym::Sym (std::unique_ptr<Expr> expr)
+ : expr (std::move (expr))
+{
+ rust_assert (this->expr != nullptr);
+}
+
+InlineAsmOperand::Sym::Sym (const struct Sym &other)
+{
+ expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
+}
+
+InlineAsmOperand::Sym
+InlineAsmOperand::Sym::operator= (const struct Sym &other)
+{
+ expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
+ return *this;
+}
+
+InlineAsmOperand::Label::Label (tl::optional<std::string> label_name,
+ std::unique_ptr<Expr> expr)
+ : expr (std::move (expr))
+{
+ rust_assert (this->expr != nullptr);
+ if (label_name.has_value ())
+ this->label_name = label_name.value ();
+}
+
+InlineAsmOperand::Label::Label (const struct Label &other)
+{
+ expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
+}
+
+InlineAsmOperand::Label
+InlineAsmOperand::Label::operator= (const struct Label &other)
+{
+ expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
+ return *this;
+}
+
+InlineAsm::InlineAsm (location_t locus, bool is_global_asm,
+ std::vector<AST::InlineAsmTemplatePiece> template_,
+ std::vector<AST::TupleTemplateStr> template_strs,
+ std::vector<HIR::InlineAsmOperand> operands,
+ std::vector<AST::TupleClobber> clobber_abi,
+ std::set<AST::InlineAsmOption> options,
+ Analysis::NodeMapping mappings,
+ AST::AttrVec outer_attribs)
+ : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
+ locus (locus), is_global_asm (is_global_asm),
+ template_ (std::move (template_)),
+ template_strs (std::move (template_strs)), operands (std::move (operands)),
+ clobber_abi (std::move (clobber_abi)), options (std::move (options))
+{}
+
+} // namespace HIR
+} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-expr.h b/gcc/rust/hir/tree/rust-hir-expr.h
index 1ee1066..f8f2128 100644
--- a/gcc/rust/hir/tree/rust-hir-expr.h
+++ b/gcc/rust/hir/tree/rust-hir-expr.h
@@ -19,12 +19,13 @@
#ifndef RUST_HIR_EXPR_H
#define RUST_HIR_EXPR_H
+#include "rust-hir-expr-abstract.h"
+#include "rust-hir-literal.h"
#include "rust-common.h"
-#include "rust-ast-full-decls.h"
-#include "rust-hir.h"
-#include "rust-hir-path.h"
-#include "rust-operators.h"
+#include "rust-hir-bound.h"
+#include "rust-hir-attrs.h"
#include "rust-expr.h"
+
namespace Rust {
namespace HIR {
@@ -32,7 +33,7 @@ namespace HIR {
// TODO: inline?
class LoopLabel /*: public Node*/
{
- Lifetime label; // or type LIFETIME_OR_LABEL
+ Lifetime label; // of type LIFETIME_OR_LABEL
location_t locus;
@@ -42,9 +43,7 @@ public:
std::string as_string () const;
LoopLabel (Analysis::NodeMapping mapping, Lifetime loop_label,
- location_t locus)
- : label (std::move (loop_label)), locus (locus), mappings (mapping)
- {}
+ location_t locus);
// Returns whether the LoopLabel is in an error state.
bool is_error () const { return label.is_error (); }
@@ -62,9 +61,7 @@ class ExprWithBlock : public Expr
// TODO: should this mean that a BlockExpr should be a member variable?
protected:
ExprWithBlock (Analysis::NodeMapping mappings,
- AST::AttrVec outer_attrs = AST::AttrVec ())
- : Expr (std::move (mappings), std::move (outer_attrs))
- {}
+ AST::AttrVec outer_attrs = AST::AttrVec ());
// pure virtual clone implementation
virtual ExprWithBlock *clone_expr_with_block_impl () const = 0;
@@ -106,16 +103,10 @@ public:
LiteralExpr (Analysis::NodeMapping mappings, std::string value_as_string,
Literal::LitType type, PrimitiveCoreType type_hint,
- location_t locus, AST::AttrVec outer_attrs)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attrs)),
- literal (std::move (value_as_string), type, type_hint), locus (locus)
- {}
+ location_t locus, AST::AttrVec outer_attrs);
LiteralExpr (Analysis::NodeMapping mappings, Literal literal,
- location_t locus, AST::AttrVec outer_attrs)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attrs)),
- literal (std::move (literal)), locus (locus)
- {}
+ location_t locus, AST::AttrVec outer_attrs);
// Unique pointer custom clone function
std::unique_ptr<LiteralExpr> clone_literal_expr () const
@@ -180,27 +171,13 @@ protected:
// Constructor (only for initialisation of expr purposes)
OperatorExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> main_or_left_expr,
- AST::AttrVec outer_attribs, location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- locus (locus), main_or_left_expr (std::move (main_or_left_expr))
- {}
+ AST::AttrVec outer_attribs, location_t locus);
// Copy constructor (only for initialisation of expr purposes)
- OperatorExpr (OperatorExpr const &other)
- : ExprWithoutBlock (other), locus (other.locus),
- main_or_left_expr (other.main_or_left_expr->clone_expr ())
- {}
+ OperatorExpr (OperatorExpr const &other);
// Overload assignment operator to deep copy expr
- OperatorExpr &operator= (OperatorExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- main_or_left_expr = other.main_or_left_expr->clone_expr ();
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ OperatorExpr &operator= (OperatorExpr const &other);
// move constructors
OperatorExpr (OperatorExpr &&other) = default;
@@ -209,7 +186,7 @@ protected:
public:
location_t get_locus () const override final { return locus; }
- std::unique_ptr<Expr> &get_expr () { return main_or_left_expr; }
+ Expr &get_expr () { return *main_or_left_expr; }
ExprType get_expression_type () const override final
{
@@ -228,11 +205,7 @@ public:
BorrowExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> borrow_lvalue, Mutability mut,
- AST::AttrVec outer_attribs, location_t locus)
- : OperatorExpr (std::move (mappings), std::move (borrow_lvalue),
- std::move (outer_attribs), locus),
- mut (mut)
- {}
+ AST::AttrVec outer_attribs, location_t locus);
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
@@ -265,10 +238,7 @@ public:
// Constructor calls OperatorExpr's protected constructor
DereferenceExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> deref_lvalue,
- AST::AttrVec outer_attribs, location_t locus)
- : OperatorExpr (std::move (mappings), std::move (deref_lvalue),
- std::move (outer_attribs), locus)
- {}
+ AST::AttrVec outer_attribs, location_t locus);
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
@@ -298,10 +268,7 @@ public:
// Constructor calls OperatorExpr's protected constructor
ErrorPropagationExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> potential_error_value,
- AST::AttrVec outer_attribs, location_t locus)
- : OperatorExpr (std::move (mappings), std::move (potential_error_value),
- std::move (outer_attribs), locus)
- {}
+ AST::AttrVec outer_attribs, location_t locus);
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
@@ -342,11 +309,7 @@ public:
// Constructor calls OperatorExpr's protected constructor
NegationExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> negated_value, ExprType expr_kind,
- AST::AttrVec outer_attribs, location_t locus)
- : OperatorExpr (std::move (mappings), std::move (negated_value),
- std::move (outer_attribs), locus),
- expr_type (expr_kind)
- {}
+ AST::AttrVec outer_attribs, location_t locus);
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
@@ -388,29 +351,14 @@ public:
ArithmeticOrLogicalExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> left_value,
std::unique_ptr<Expr> right_value,
- ExprType expr_kind, location_t locus)
- : OperatorExpr (std::move (mappings), std::move (left_value),
- AST::AttrVec (), locus),
- expr_type (expr_kind), right_expr (std::move (right_value))
- {}
+ ExprType expr_kind, location_t locus);
// outer attributes not allowed
// Copy constructor - probably required due to unique pointer
- ArithmeticOrLogicalExpr (ArithmeticOrLogicalExpr const &other)
- : OperatorExpr (other), expr_type (other.expr_type),
- right_expr (other.right_expr->clone_expr ())
- {}
+ ArithmeticOrLogicalExpr (ArithmeticOrLogicalExpr const &other);
// Overload assignment operator
- ArithmeticOrLogicalExpr &operator= (ArithmeticOrLogicalExpr const &other)
- {
- OperatorExpr::operator= (other);
- // main_or_left_expr = other.main_or_left_expr->clone_expr();
- right_expr = other.right_expr->clone_expr ();
- expr_type = other.expr_type;
-
- return *this;
- }
+ ArithmeticOrLogicalExpr &operator= (ArithmeticOrLogicalExpr const &other);
// move constructors
ArithmeticOrLogicalExpr (ArithmeticOrLogicalExpr &&other) = default;
@@ -423,8 +371,8 @@ public:
void visit_lhs (HIRFullVisitor &vis) { main_or_left_expr->accept_vis (vis); }
void visit_rhs (HIRFullVisitor &vis) { right_expr->accept_vis (vis); }
- std::unique_ptr<Expr> &get_lhs () { return main_or_left_expr; }
- std::unique_ptr<Expr> &get_rhs () { return right_expr; }
+ Expr &get_lhs () { return *main_or_left_expr; }
+ Expr &get_rhs () { return *right_expr; }
std::string get_operator_str () const;
@@ -465,30 +413,14 @@ public:
ComparisonExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> left_value,
std::unique_ptr<Expr> right_value, ExprType comparison_kind,
- location_t locus)
- : OperatorExpr (std::move (mappings), std::move (left_value),
- AST::AttrVec (), locus),
- expr_type (comparison_kind), right_expr (std::move (right_value))
- {}
+ location_t locus);
// outer attributes not allowed
// Copy constructor also calls OperatorExpr's protected constructor
- ComparisonExpr (ComparisonExpr const &other)
- : OperatorExpr (other), expr_type (other.expr_type),
- right_expr (other.right_expr->clone_expr ())
- {}
+ ComparisonExpr (ComparisonExpr const &other);
// Overload assignment operator to deep copy
- ComparisonExpr &operator= (ComparisonExpr const &other)
- {
- OperatorExpr::operator= (other);
- // main_or_left_expr = other.main_or_left_expr->clone_expr();
- right_expr = other.right_expr->clone_expr ();
- expr_type = other.expr_type;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ ComparisonExpr &operator= (ComparisonExpr const &other);
// move constructors
ComparisonExpr (ComparisonExpr &&other) = default;
@@ -497,8 +429,8 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_lhs () { return main_or_left_expr; }
- std::unique_ptr<Expr> &get_rhs () { return right_expr; }
+ Expr &get_lhs () { return *main_or_left_expr; }
+ Expr &get_rhs () { return *right_expr; }
ExprType get_kind () { return expr_type; }
@@ -536,29 +468,14 @@ public:
LazyBooleanExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> left_bool_expr,
std::unique_ptr<Expr> right_bool_expr, ExprType expr_kind,
- location_t locus)
- : OperatorExpr (std::move (mappings), std::move (left_bool_expr),
- AST::AttrVec (), locus),
- expr_type (expr_kind), right_expr (std::move (right_bool_expr))
- {}
+ location_t locus);
// outer attributes not allowed
// Copy constructor also calls OperatorExpr's protected constructor
- LazyBooleanExpr (LazyBooleanExpr const &other)
- : OperatorExpr (other), expr_type (other.expr_type),
- right_expr (other.right_expr->clone_expr ())
- {}
+ LazyBooleanExpr (LazyBooleanExpr const &other);
// Overload assignment operator to deep copy
- LazyBooleanExpr &operator= (LazyBooleanExpr const &other)
- {
- OperatorExpr::operator= (other);
- // main_or_left_expr = other.main_or_left_expr->clone_expr();
- right_expr = other.right_expr->clone_expr ();
- expr_type = other.expr_type;
-
- return *this;
- }
+ LazyBooleanExpr &operator= (LazyBooleanExpr const &other);
// move constructors
LazyBooleanExpr (LazyBooleanExpr &&other) = default;
@@ -571,8 +488,8 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_lhs () { return main_or_left_expr; }
- std::unique_ptr<Expr> &get_rhs () { return right_expr; }
+ Expr &get_lhs () { return *main_or_left_expr; }
+ Expr &get_rhs () { return *right_expr; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -602,28 +519,14 @@ public:
// Constructor requires calling protected constructor of OperatorExpr
TypeCastExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> expr_to_cast,
- std::unique_ptr<Type> type_to_cast_to, location_t locus)
- : OperatorExpr (std::move (mappings), std::move (expr_to_cast),
- AST::AttrVec (), locus),
- type_to_convert_to (std::move (type_to_cast_to))
- {}
+ std::unique_ptr<Type> type_to_cast_to, location_t locus);
// outer attributes not allowed
// Copy constructor also requires calling protected constructor
- TypeCastExpr (TypeCastExpr const &other)
- : OperatorExpr (other),
- type_to_convert_to (other.type_to_convert_to->clone_type ())
- {}
+ TypeCastExpr (TypeCastExpr const &other);
// Overload assignment operator to deep copy
- TypeCastExpr &operator= (TypeCastExpr const &other)
- {
- OperatorExpr::operator= (other);
- // main_or_left_expr = other.main_or_left_expr->clone_expr();
- type_to_convert_to = other.type_to_convert_to->clone_type ();
-
- return *this;
- }
+ TypeCastExpr &operator= (TypeCastExpr const &other);
// move constructors as not supported in c++03
TypeCastExpr (TypeCastExpr &&other) = default;
@@ -633,12 +536,9 @@ public:
void accept_vis (HIRExpressionVisitor &vis) override;
// FIXME: isn't it the same as get_expr() from parent?
- std::unique_ptr<Expr> &get_casted_expr () { return main_or_left_expr; }
+ Expr &get_casted_expr () { return *main_or_left_expr; }
- std::unique_ptr<Type> &get_type_to_convert_to ()
- {
- return type_to_convert_to;
- }
+ Type &get_type_to_convert_to () { return *type_to_convert_to; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -667,28 +567,14 @@ public:
// Call OperatorExpr constructor to initialise left_expr
AssignmentExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> value_to_assign_to,
- std::unique_ptr<Expr> value_to_assign, location_t locus)
- : OperatorExpr (std::move (mappings), std::move (value_to_assign_to),
- AST::AttrVec (), locus),
- right_expr (std::move (value_to_assign))
- {}
+ std::unique_ptr<Expr> value_to_assign, location_t locus);
// outer attributes not allowed
// Call OperatorExpr constructor in copy constructor, as well as clone
- AssignmentExpr (AssignmentExpr const &other)
- : OperatorExpr (other), right_expr (other.right_expr->clone_expr ())
- {}
+ AssignmentExpr (AssignmentExpr const &other);
// Overload assignment operator to clone unique_ptr right_expr
- AssignmentExpr &operator= (AssignmentExpr const &other)
- {
- OperatorExpr::operator= (other);
- // main_or_left_expr = other.main_or_left_expr->clone_expr();
- right_expr = other.right_expr->clone_expr ();
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ AssignmentExpr &operator= (AssignmentExpr const &other);
// move constructors
AssignmentExpr (AssignmentExpr &&other) = default;
@@ -700,8 +586,8 @@ public:
void visit_lhs (HIRFullVisitor &vis) { main_or_left_expr->accept_vis (vis); }
void visit_rhs (HIRFullVisitor &vis) { right_expr->accept_vis (vis); }
- std::unique_ptr<Expr> &get_lhs () { return main_or_left_expr; }
- std::unique_ptr<Expr> &get_rhs () { return right_expr; }
+ Expr &get_lhs () { return *main_or_left_expr; }
+ Expr &get_rhs () { return *right_expr; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -738,30 +624,14 @@ public:
CompoundAssignmentExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> value_to_assign_to,
std::unique_ptr<Expr> value_to_assign,
- ExprType expr_kind, location_t locus)
- : OperatorExpr (std::move (mappings), std::move (value_to_assign_to),
- AST::AttrVec (), locus),
- expr_type (expr_kind), right_expr (std::move (value_to_assign))
- {}
+ ExprType expr_kind, location_t locus);
// outer attributes not allowed
// Have clone in copy constructor
- CompoundAssignmentExpr (CompoundAssignmentExpr const &other)
- : OperatorExpr (other), expr_type (other.expr_type),
- right_expr (other.right_expr->clone_expr ())
- {}
+ CompoundAssignmentExpr (CompoundAssignmentExpr const &other);
// Overload assignment operator to clone
- CompoundAssignmentExpr &operator= (CompoundAssignmentExpr const &other)
- {
- OperatorExpr::operator= (other);
- // main_or_left_expr = other.main_or_left_expr->clone_expr();
- right_expr = other.right_expr->clone_expr ();
- expr_type = other.expr_type;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ CompoundAssignmentExpr &operator= (CompoundAssignmentExpr const &other);
// move constructors
CompoundAssignmentExpr (CompoundAssignmentExpr &&other) = default;
@@ -770,9 +640,9 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_lhs () { return main_or_left_expr; }
+ Expr &get_lhs () { return *main_or_left_expr; }
- std::unique_ptr<Expr> &get_rhs () { return right_expr; }
+ Expr &get_rhs () { return *right_expr; }
void visit_lhs (HIRFullVisitor &vis) { main_or_left_expr->accept_vis (vis); }
void visit_rhs (HIRFullVisitor &vis) { right_expr->accept_vis (vis); }
@@ -801,29 +671,13 @@ public:
GroupedExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> parenthesised_expr,
AST::AttrVec inner_attribs, AST::AttrVec outer_attribs,
- location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- WithInnerAttrs (std::move (inner_attribs)),
- expr_in_parens (std::move (parenthesised_expr)), locus (locus)
- {}
+ location_t locus);
// Copy constructor includes clone for expr_in_parens
- GroupedExpr (GroupedExpr const &other)
- : ExprWithoutBlock (other), WithInnerAttrs (other.inner_attrs),
- expr_in_parens (other.expr_in_parens->clone_expr ()), locus (other.locus)
- {}
+ GroupedExpr (GroupedExpr const &other);
// Overloaded assignment operator to clone expr_in_parens
- GroupedExpr &operator= (GroupedExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- inner_attrs = other.inner_attrs;
- expr_in_parens = other.expr_in_parens->clone_expr ();
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ GroupedExpr &operator= (GroupedExpr const &other);
// move constructors
GroupedExpr (GroupedExpr &&other) = default;
@@ -834,7 +688,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_expr_in_parens () { return expr_in_parens; }
+ Expr &get_expr_in_parens () { return *expr_in_parens; }
ExprType get_expression_type () const override final
{
@@ -896,33 +750,19 @@ protected:
// Value array elements
class ArrayElemsValues : public ArrayElems
{
- std::vector<std::unique_ptr<Expr> > values;
+ std::vector<std::unique_ptr<Expr>> values;
// TODO: should this store location data?
public:
ArrayElemsValues (Analysis::NodeMapping mappings,
- std::vector<std::unique_ptr<Expr> > elems)
- : ArrayElems (mappings), values (std::move (elems))
- {}
+ std::vector<std::unique_ptr<Expr>> elems);
// copy constructor with vector clone
- ArrayElemsValues (ArrayElemsValues const &other) : ArrayElems (other)
- {
- values.reserve (other.values.size ());
- for (const auto &e : other.values)
- values.push_back (e->clone_expr ());
- }
+ ArrayElemsValues (ArrayElemsValues const &other);
// overloaded assignment operator with vector clone
- ArrayElemsValues &operator= (ArrayElemsValues const &other)
- {
- values.reserve (other.values.size ());
- for (const auto &e : other.values)
- values.push_back (e->clone_expr ());
-
- return *this;
- }
+ ArrayElemsValues &operator= (ArrayElemsValues const &other);
// move constructors
ArrayElemsValues (ArrayElemsValues &&other) = default;
@@ -934,7 +774,7 @@ public:
size_t get_num_elements () const { return values.size (); }
- std::vector<std::unique_ptr<Expr> > &get_values () { return values; }
+ std::vector<std::unique_ptr<Expr>> &get_values () { return values; }
ArrayElems::ArrayExprType get_array_expr_type () const override final
{
@@ -958,25 +798,13 @@ public:
// Constructor requires pointers for polymorphism
ArrayElemsCopied (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> copied_elem,
- std::unique_ptr<Expr> copy_amount)
- : ArrayElems (mappings), elem_to_copy (std::move (copied_elem)),
- num_copies (std::move (copy_amount))
- {}
+ std::unique_ptr<Expr> copy_amount);
// Copy constructor required due to unique_ptr - uses custom clone
- ArrayElemsCopied (ArrayElemsCopied const &other)
- : ArrayElems (other), elem_to_copy (other.elem_to_copy->clone_expr ()),
- num_copies (other.num_copies->clone_expr ())
- {}
+ ArrayElemsCopied (ArrayElemsCopied const &other);
// Overloaded assignment operator for deep copying
- ArrayElemsCopied &operator= (ArrayElemsCopied const &other)
- {
- elem_to_copy = other.elem_to_copy->clone_expr ();
- num_copies = other.num_copies->clone_expr ();
-
- return *this;
- }
+ ArrayElemsCopied &operator= (ArrayElemsCopied const &other);
// move constructors
ArrayElemsCopied (ArrayElemsCopied &&other) = default;
@@ -986,9 +814,9 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
- std::unique_ptr<Expr> &get_elem_to_copy () { return elem_to_copy; }
+ Expr &get_elem_to_copy () { return *elem_to_copy; }
- std::unique_ptr<Expr> &get_num_copies_expr () { return num_copies; }
+ Expr &get_num_copies_expr () { return *num_copies; }
ArrayElems::ArrayExprType get_array_expr_type () const override final
{
@@ -1019,33 +847,13 @@ public:
ArrayExpr (Analysis::NodeMapping mappings,
std::unique_ptr<ArrayElems> array_elems,
AST::AttrVec inner_attribs, AST::AttrVec outer_attribs,
- location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- WithInnerAttrs (std::move (inner_attribs)),
- internal_elements (std::move (array_elems)), locus (locus)
- {}
+ location_t locus);
// Copy constructor requires cloning ArrayElems for polymorphism to hold
- ArrayExpr (ArrayExpr const &other)
- : ExprWithoutBlock (other), WithInnerAttrs (other.inner_attrs),
- locus (other.locus)
- {
- if (other.has_array_elems ())
- internal_elements = other.internal_elements->clone_array_elems ();
- }
+ ArrayExpr (ArrayExpr const &other);
// Overload assignment operator to clone internal_elements
- ArrayExpr &operator= (ArrayExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- inner_attrs = other.inner_attrs;
- if (other.has_array_elems ())
- internal_elements = other.internal_elements->clone_array_elems ();
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ ArrayExpr &operator= (ArrayExpr const &other);
// move constructors
ArrayExpr (ArrayExpr &&other) = default;
@@ -1056,10 +864,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<ArrayElems> &get_internal_elements ()
- {
- return internal_elements;
- };
+ ArrayElems &get_internal_elements () { return *internal_elements; };
ExprType get_expression_type () const override final
{
@@ -1092,29 +897,13 @@ public:
ArrayIndexExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> array_expr,
std::unique_ptr<Expr> array_index_expr,
- AST::AttrVec outer_attribs, location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- array_expr (std::move (array_expr)),
- index_expr (std::move (array_index_expr)), locus (locus)
- {}
+ AST::AttrVec outer_attribs, location_t locus);
// Copy constructor requires special cloning due to unique_ptr
- ArrayIndexExpr (ArrayIndexExpr const &other)
- : ExprWithoutBlock (other), array_expr (other.array_expr->clone_expr ()),
- index_expr (other.index_expr->clone_expr ()), locus (other.locus)
- {}
+ ArrayIndexExpr (ArrayIndexExpr const &other);
// Overload assignment operator to clone unique_ptrs
- ArrayIndexExpr &operator= (ArrayIndexExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- array_expr = other.array_expr->clone_expr ();
- index_expr = other.index_expr->clone_expr ();
- // outer_attrs = other.outer_attrs;
- locus = other.locus;
-
- return *this;
- }
+ ArrayIndexExpr &operator= (ArrayIndexExpr const &other);
// move constructors
ArrayIndexExpr (ArrayIndexExpr &&other) = default;
@@ -1125,8 +914,8 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_array_expr () { return array_expr; }
- std::unique_ptr<Expr> &get_index_expr () { return index_expr; }
+ Expr &get_array_expr () { return *array_expr; }
+ Expr &get_index_expr () { return *index_expr; }
ExprType get_expression_type () const override final
{
@@ -1152,7 +941,7 @@ protected:
// HIR representation of a tuple
class TupleExpr : public ExprWithoutBlock, public WithInnerAttrs
{
- std::vector<std::unique_ptr<Expr> > tuple_elems;
+ std::vector<std::unique_ptr<Expr>> tuple_elems;
// replaces (inlined version of) TupleElements
location_t locus;
@@ -1161,37 +950,15 @@ public:
std::string as_string () const override;
TupleExpr (Analysis::NodeMapping mappings,
- std::vector<std::unique_ptr<Expr> > tuple_elements,
+ std::vector<std::unique_ptr<Expr>> tuple_elements,
AST::AttrVec inner_attribs, AST::AttrVec outer_attribs,
- location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- WithInnerAttrs (std::move (inner_attribs)),
- tuple_elems (std::move (tuple_elements)), locus (locus)
- {}
+ location_t locus);
// copy constructor with vector clone
- TupleExpr (TupleExpr const &other)
- : ExprWithoutBlock (other), WithInnerAttrs (other.inner_attrs),
- locus (other.locus)
- {
- tuple_elems.reserve (other.tuple_elems.size ());
- for (const auto &e : other.tuple_elems)
- tuple_elems.push_back (e->clone_expr ());
- }
+ TupleExpr (TupleExpr const &other);
// overloaded assignment operator to vector clone
- TupleExpr &operator= (TupleExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- inner_attrs = other.inner_attrs;
- locus = other.locus;
-
- tuple_elems.reserve (other.tuple_elems.size ());
- for (const auto &e : other.tuple_elems)
- tuple_elems.push_back (e->clone_expr ());
-
- return *this;
- }
+ TupleExpr &operator= (TupleExpr const &other);
// move constructors
TupleExpr (TupleExpr &&other) = default;
@@ -1205,14 +972,11 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- const std::vector<std::unique_ptr<Expr> > &get_tuple_elems () const
- {
- return tuple_elems;
- }
- std::vector<std::unique_ptr<Expr> > &get_tuple_elems ()
+ const std::vector<std::unique_ptr<Expr>> &get_tuple_elems () const
{
return tuple_elems;
}
+ std::vector<std::unique_ptr<Expr>> &get_tuple_elems () { return tuple_elems; }
bool is_unit () const { return tuple_elems.size () == 0; }
@@ -1247,28 +1011,13 @@ public:
TupleIndexExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> tuple_expr, TupleIndex index,
- AST::AttrVec outer_attribs, location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- tuple_expr (std::move (tuple_expr)), tuple_index (index), locus (locus)
- {}
+ AST::AttrVec outer_attribs, location_t locus);
// Copy constructor requires a clone for tuple_expr
- TupleIndexExpr (TupleIndexExpr const &other)
- : ExprWithoutBlock (other), tuple_expr (other.tuple_expr->clone_expr ()),
- tuple_index (other.tuple_index), locus (other.locus)
- {}
+ TupleIndexExpr (TupleIndexExpr const &other);
// Overload assignment operator in order to clone
- TupleIndexExpr &operator= (TupleIndexExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- tuple_expr = other.tuple_expr->clone_expr ();
- tuple_index = other.tuple_index;
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ TupleIndexExpr &operator= (TupleIndexExpr const &other);
// move constructors
TupleIndexExpr (TupleIndexExpr &&other) = default;
@@ -1279,7 +1028,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_tuple_expr () { return tuple_expr; }
+ Expr &get_tuple_expr () { return *tuple_expr; }
ExprType get_expression_type () const override final
{
@@ -1310,10 +1059,7 @@ protected:
// Protected constructor to allow initialising struct_name
StructExpr (Analysis::NodeMapping mappings, PathInExpression struct_path,
- AST::AttrVec outer_attribs)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- struct_name (std::move (struct_path))
- {}
+ AST::AttrVec outer_attribs);
public:
PathInExpression &get_struct_name () { return struct_name; }
@@ -1337,11 +1083,7 @@ public:
// Constructor has to call protected constructor of base class
StructExprStruct (Analysis::NodeMapping mappings,
PathInExpression struct_path, AST::AttrVec inner_attribs,
- AST::AttrVec outer_attribs, location_t locus)
- : StructExpr (std::move (mappings), std::move (struct_path),
- std::move (outer_attribs)),
- WithInnerAttrs (std::move (inner_attribs)), locus (locus)
- {}
+ AST::AttrVec outer_attribs, location_t locus);
location_t get_locus () const override final { return locus; }
@@ -1368,33 +1110,21 @@ protected:
* struct */
struct StructBase
{
-public:
+private:
std::unique_ptr<Expr> base_struct;
+public:
// TODO: should this store location data?
- StructBase (std::unique_ptr<Expr> base_struct_ptr)
- : base_struct (std::move (base_struct_ptr))
- {}
+ StructBase (std::unique_ptr<Expr> base_struct_ptr);
// Copy constructor requires clone
- StructBase (StructBase const &other)
- {
- /* HACK: gets around base_struct pointer being null (e.g. if no struct base
- * exists) */
- if (other.base_struct != nullptr)
- other.base_struct->clone_expr ();
- }
+ StructBase (StructBase const &other);
// Destructor
~StructBase () = default;
// Overload assignment operator to clone base_struct
- StructBase &operator= (StructBase const &other)
- {
- base_struct = other.base_struct->clone_expr ();
-
- return *this;
- }
+ StructBase &operator= (StructBase const &other);
// move constructors
StructBase (StructBase &&other) = default;
@@ -1408,7 +1138,7 @@ public:
std::string as_string () const;
- Expr *get_base () { return base_struct.get (); }
+ Expr &get_base () { return *base_struct; }
};
/* Base HIR node for a single struct expression field (in struct instance
@@ -1446,9 +1176,7 @@ protected:
// pure virtual clone implementation
virtual StructExprField *clone_struct_expr_field_impl () const = 0;
- StructExprField (Analysis::NodeMapping mapping, location_t locus)
- : mappings (mapping), locus (locus)
- {}
+ StructExprField (Analysis::NodeMapping mapping, location_t locus);
Analysis::NodeMapping mappings;
location_t locus;
@@ -1463,10 +1191,7 @@ private:
// TODO: should this store location data?
public:
StructExprFieldIdentifier (Analysis::NodeMapping mapping,
- Identifier field_identifier, location_t locus)
- : StructExprField (mapping, locus),
- field_name (std::move (field_identifier))
- {}
+ Identifier field_identifier, location_t locus);
std::string as_string () const override { return field_name.as_string (); }
@@ -1497,25 +1222,13 @@ class StructExprFieldWithVal : public StructExprField
protected:
StructExprFieldWithVal (Analysis::NodeMapping mapping,
- std::unique_ptr<Expr> field_value, location_t locus)
- : StructExprField (mapping, locus), value (std::move (field_value))
- {}
+ std::unique_ptr<Expr> field_value, location_t locus);
// Copy constructor requires clone
- StructExprFieldWithVal (StructExprFieldWithVal const &other)
- : StructExprField (other.mappings, other.locus),
- value (other.value->clone_expr ())
- {}
+ StructExprFieldWithVal (StructExprFieldWithVal const &other);
// Overload assignment operator to clone unique_ptr
- StructExprFieldWithVal &operator= (StructExprFieldWithVal const &other)
- {
- value = other.value->clone_expr ();
- mappings = other.mappings;
- locus = other.locus;
-
- return *this;
- }
+ StructExprFieldWithVal &operator= (StructExprFieldWithVal const &other);
// move constructors
StructExprFieldWithVal (StructExprFieldWithVal &&other) = default;
@@ -1524,7 +1237,7 @@ protected:
public:
std::string as_string () const override;
- std::unique_ptr<Expr> &get_value () { return value; }
+ Expr &get_value () { return *value; }
};
// Identifier and value variant of StructExprField HIR node
@@ -1538,10 +1251,7 @@ public:
StructExprFieldIdentifierValue (Analysis::NodeMapping mapping,
Identifier field_identifier,
std::unique_ptr<Expr> field_value,
- location_t locus)
- : StructExprFieldWithVal (mapping, std::move (field_value), locus),
- field_name (std::move (field_identifier))
- {}
+ location_t locus);
std::string as_string () const override;
@@ -1575,10 +1285,7 @@ public:
StructExprFieldIndexValue (Analysis::NodeMapping mapping,
TupleIndex tuple_index,
std::unique_ptr<Expr> field_value,
- location_t locus)
- : StructExprFieldWithVal (mapping, std::move (field_value), locus),
- index (tuple_index)
- {}
+ location_t locus);
std::string as_string () const override;
@@ -1604,58 +1311,31 @@ protected:
// HIR node of a struct creator with fields
class StructExprStructFields : public StructExprStruct
{
-public:
// std::vector<StructExprField> fields;
- std::vector<std::unique_ptr<StructExprField> > fields;
-
- // bool has_struct_base;
- // FIXME make unique_ptr
- StructBase *struct_base;
+ std::vector<std::unique_ptr<StructExprField>> fields;
+ tl::optional<std::unique_ptr<StructBase>> struct_base;
+public:
// For unions there is just one field, the index
// is set when type checking
int union_index = -1;
std::string as_string () const override;
- bool has_struct_base () const { return struct_base != nullptr; }
+ bool has_struct_base () const { return struct_base.has_value (); }
// Constructor for StructExprStructFields when no struct base is used
StructExprStructFields (
Analysis::NodeMapping mappings, PathInExpression struct_path,
- std::vector<std::unique_ptr<StructExprField> > expr_fields,
- location_t locus, StructBase *base_struct,
- AST::AttrVec inner_attribs = AST::AttrVec (),
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : StructExprStruct (std::move (mappings), std::move (struct_path),
- std::move (inner_attribs), std::move (outer_attribs),
- locus),
- fields (std::move (expr_fields)), struct_base (base_struct)
- {}
+ std::vector<std::unique_ptr<StructExprField>> expr_fields, location_t locus,
+ tl::optional<std::unique_ptr<StructBase>> base_struct,
+ AST::AttrVec inner_attribs, AST::AttrVec outer_attribs);
// copy constructor with vector clone
- StructExprStructFields (StructExprStructFields const &other)
- : StructExprStruct (other), struct_base (other.struct_base),
- union_index (other.union_index)
- {
- fields.reserve (other.fields.size ());
- for (const auto &e : other.fields)
- fields.push_back (e->clone_struct_expr_field ());
- }
+ StructExprStructFields (StructExprStructFields const &other);
// overloaded assignment operator with vector clone
- StructExprStructFields &operator= (StructExprStructFields const &other)
- {
- StructExprStruct::operator= (other);
- struct_base = other.struct_base;
- union_index = other.union_index;
-
- fields.reserve (other.fields.size ());
- for (const auto &e : other.fields)
- fields.push_back (e->clone_struct_expr_field ());
-
- return *this;
- }
+ StructExprStructFields &operator= (StructExprStructFields const &other);
// move constructors
StructExprStructFields (StructExprStructFields &&other) = default;
@@ -1664,20 +1344,20 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::vector<std::unique_ptr<StructExprField> > &get_fields ()
+ std::vector<std::unique_ptr<StructExprField>> &get_fields ()
{
return fields;
};
- const std::vector<std::unique_ptr<StructExprField> > &get_fields () const
+ const std::vector<std::unique_ptr<StructExprField>> &get_fields () const
{
return fields;
};
- StructBase *get_struct_base () { return struct_base; }
+ StructBase &get_struct_base () { return *struct_base.value (); }
- void set_fields_as_owner (
- std::vector<std::unique_ptr<StructExprField> > new_fields)
+ void
+ set_fields_as_owner (std::vector<std::unique_ptr<StructExprField>> new_fields)
{
fields = std::move (new_fields);
}
@@ -1704,26 +1384,15 @@ class StructExprStructBase : public StructExprStruct
StructBase struct_base;
public:
- std::string as_string () const override;
-
- /*inline StructBase get_struct_base() const {
- return struct_base;
- }*/
-
StructExprStructBase (Analysis::NodeMapping mappings,
PathInExpression struct_path, StructBase base_struct,
AST::AttrVec inner_attribs, AST::AttrVec outer_attribs,
- location_t locus)
- : StructExprStruct (std::move (mappings), std::move (struct_path),
- std::move (inner_attribs), std::move (outer_attribs),
- locus),
- struct_base (std::move (base_struct))
- {}
+ location_t locus);
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- StructBase *get_struct_base () { return &struct_base; }
+ StructBase &get_struct_base () { return struct_base; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -1745,45 +1414,21 @@ protected:
class CallExpr : public ExprWithoutBlock
{
std::unique_ptr<Expr> function;
- std::vector<std::unique_ptr<Expr> > params;
+ std::vector<std::unique_ptr<Expr>> params;
location_t locus;
public:
std::string as_string () const override;
CallExpr (Analysis::NodeMapping mappings, std::unique_ptr<Expr> function_expr,
- std::vector<std::unique_ptr<Expr> > function_params,
- AST::AttrVec outer_attribs, location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- function (std::move (function_expr)),
- params (std::move (function_params)), locus (locus)
- {}
+ std::vector<std::unique_ptr<Expr>> function_params,
+ AST::AttrVec outer_attribs, location_t locus);
// copy constructor requires clone
- CallExpr (CallExpr const &other)
- : ExprWithoutBlock (other), function (other.function->clone_expr ()),
- locus (other.locus)
- /*, params(other.params),*/ {
- params.reserve (other.params.size ());
- for (const auto &e : other.params)
- params.push_back (e->clone_expr ());
- }
+ CallExpr (CallExpr const &other);
// Overload assignment operator to clone
- CallExpr &operator= (CallExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- function = other.function->clone_expr ();
- locus = other.locus;
- // params = other.params;
- // outer_attrs = other.outer_attrs;
-
- params.reserve (other.params.size ());
- for (const auto &e : other.params)
- params.push_back (e->clone_expr ());
-
- return *this;
- }
+ CallExpr &operator= (CallExpr const &other);
// move constructors
CallExpr (CallExpr &&other) = default;
@@ -1797,13 +1442,14 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_fnexpr () { return function; }
+ bool has_fnexpr () const { return function != nullptr; }
+ Expr &get_fnexpr () { return *function; }
size_t num_params () const { return params.size (); }
- std::vector<std::unique_ptr<Expr> > &get_arguments () { return params; }
+ std::vector<std::unique_ptr<Expr>> &get_arguments () { return params; }
- const std::vector<std::unique_ptr<Expr> > &get_arguments () const
+ const std::vector<std::unique_ptr<Expr>> &get_arguments () const
{
return params;
}
@@ -1831,7 +1477,7 @@ class MethodCallExpr : public ExprWithoutBlock
{
std::unique_ptr<Expr> receiver;
PathExprSegment method_name;
- std::vector<std::unique_ptr<Expr> > params;
+ std::vector<std::unique_ptr<Expr>> params;
location_t locus;
public:
@@ -1840,40 +1486,14 @@ public:
MethodCallExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> call_receiver,
PathExprSegment method_path,
- std::vector<std::unique_ptr<Expr> > method_params,
- AST::AttrVec outer_attribs, location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- receiver (std::move (call_receiver)),
- method_name (std::move (method_path)), params (std::move (method_params)),
- locus (locus)
- {}
+ std::vector<std::unique_ptr<Expr>> method_params,
+ AST::AttrVec outer_attribs, location_t locus);
// copy constructor required due to cloning
- MethodCallExpr (MethodCallExpr const &other)
- : ExprWithoutBlock (other), receiver (other.receiver->clone_expr ()),
- method_name (other.method_name), locus (other.locus)
- /*, params(other.params),*/ {
- params.reserve (other.params.size ());
- for (const auto &e : other.params)
- params.push_back (e->clone_expr ());
- }
+ MethodCallExpr (MethodCallExpr const &other);
// Overload assignment operator to clone receiver object
- MethodCallExpr &operator= (MethodCallExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- receiver = other.receiver->clone_expr ();
- method_name = other.method_name;
- locus = other.locus;
- // params = other.params;
- // outer_attrs = other.outer_attrs;
-
- params.reserve (other.params.size ());
- for (const auto &e : other.params)
- params.push_back (e->clone_expr ());
-
- return *this;
- }
+ MethodCallExpr &operator= (MethodCallExpr const &other);
// move constructors
MethodCallExpr (MethodCallExpr &&other) = default;
@@ -1884,7 +1504,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_receiver () { return receiver; }
+ Expr &get_receiver () { return *receiver; }
PathExprSegment &get_method_name () { return method_name; };
const PathExprSegment &get_method_name () const { return method_name; };
@@ -1892,9 +1512,9 @@ public:
bool has_params () const { return !params.empty (); }
size_t num_params () const { return params.size (); }
- std::vector<std::unique_ptr<Expr> > &get_arguments () { return params; }
+ std::vector<std::unique_ptr<Expr>> &get_arguments () { return params; }
- const std::vector<std::unique_ptr<Expr> > &get_arguments () const
+ const std::vector<std::unique_ptr<Expr>> &get_arguments () const
{
return params;
}
@@ -1935,29 +1555,13 @@ public:
FieldAccessExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> field_access_receiver,
Identifier field_name, AST::AttrVec outer_attribs,
- location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- receiver (std::move (field_access_receiver)),
- field (std::move (field_name)), locus (locus)
- {}
+ location_t locus);
// Copy constructor required due to unique_ptr cloning
- FieldAccessExpr (FieldAccessExpr const &other)
- : ExprWithoutBlock (other), receiver (other.receiver->clone_expr ()),
- field (other.field), locus (other.locus)
- {}
+ FieldAccessExpr (FieldAccessExpr const &other);
// Overload assignment operator to clone unique_ptr
- FieldAccessExpr &operator= (FieldAccessExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- receiver = other.receiver->clone_expr ();
- field = other.field;
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ FieldAccessExpr &operator= (FieldAccessExpr const &other);
// move constructors
FieldAccessExpr (FieldAccessExpr &&other) = default;
@@ -1968,7 +1572,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_receiver_expr () { return receiver; }
+ Expr &get_receiver_expr () { return *receiver; }
Identifier get_field_name () const { return field; }
@@ -2009,42 +1613,15 @@ public:
// Constructor for closure parameter
ClosureParam (std::unique_ptr<Pattern> param_pattern, location_t locus,
std::unique_ptr<Type> param_type = nullptr,
- std::vector<AST::Attribute> outer_attrs = {})
- : outer_attrs (std::move (outer_attrs)),
- pattern (std::move (param_pattern)), type (std::move (param_type)),
- locus (locus)
- {}
+ std::vector<AST::Attribute> outer_attrs = {});
// Copy constructor required due to cloning as a result of unique_ptrs
- ClosureParam (ClosureParam const &other)
- : pattern (other.pattern->clone_pattern ())
- {
- // guard to protect from null pointer dereference
- if (other.pattern != nullptr)
- pattern = other.pattern->clone_pattern ();
- if (other.type != nullptr)
- type = other.type->clone_type ();
- }
+ ClosureParam (ClosureParam const &other);
~ClosureParam () = default;
// Assignment operator must be overloaded to clone as well
- ClosureParam &operator= (ClosureParam const &other)
- {
- outer_attrs = other.outer_attrs;
-
- // guard to protect from null pointer dereference
- if (other.pattern != nullptr)
- pattern = other.pattern->clone_pattern ();
- else
- pattern = nullptr;
- if (other.type != nullptr)
- type = other.type->clone_type ();
- else
- type = nullptr;
-
- return *this;
- }
+ ClosureParam &operator= (ClosureParam const &other);
// move constructors
ClosureParam (ClosureParam &&other) = default;
@@ -2058,9 +1635,9 @@ public:
}
std::vector<AST::Attribute> &get_outer_attrs () { return outer_attrs; }
- std::unique_ptr<Pattern> &get_pattern () { return pattern; }
+ Pattern &get_pattern () { return *pattern; }
- std::unique_ptr<Type> &get_type () { return type; }
+ Type &get_type () { return *type; }
location_t get_locus () const { return locus; }
};
@@ -2080,36 +1657,13 @@ public:
std::vector<ClosureParam> closure_params,
std::unique_ptr<Type> closure_return_type,
std::unique_ptr<Expr> closure_expr, bool has_move,
- AST::AttrVec outer_attribs, location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- has_move (has_move), params (std::move (closure_params)), locus (locus),
- return_type (std::move (closure_return_type)),
- expr (std::move (closure_expr))
- {}
+ AST::AttrVec outer_attribs, location_t locus);
// Copy constructor requires cloning
- ClosureExpr (ClosureExpr const &other)
- : ExprWithoutBlock (other.get_mappings (), other.get_outer_attrs ())
- {
- return_type
- = other.has_return_type () ? other.return_type->clone_type () : nullptr;
- expr = other.expr->clone_expr ();
- params = other.params;
- has_move = other.has_move;
- }
+ ClosureExpr (ClosureExpr const &other);
// Overload assignment operator to clone unique_ptrs
- ClosureExpr &operator= (ClosureExpr const &other)
- {
- mappings = other.mappings;
- return_type
- = other.has_return_type () ? other.return_type->clone_type () : nullptr;
- expr = other.expr->clone_expr ();
- params = other.params;
- has_move = other.has_move;
-
- return *this;
- }
+ ClosureExpr &operator= (ClosureExpr const &other);
// move constructors
ClosureExpr (ClosureExpr &&other) = default;
@@ -2128,8 +1682,8 @@ public:
bool has_return_type () const { return return_type != nullptr; }
- std::unique_ptr<Type> &get_return_type () { return return_type; };
- std::unique_ptr<Expr> &get_expr () { return expr; }
+ Type &get_return_type () { return *return_type; };
+ Expr &get_expr () { return *expr; }
bool has_params () const { return !params.empty (); }
std::vector<ClosureParam> &get_params () { return params; }
@@ -2158,7 +1712,7 @@ class BlockExpr : public ExprWithBlock, public WithInnerAttrs
{
// FIXME this should be private + get/set
public:
- std::vector<std::unique_ptr<Stmt> > statements;
+ std::vector<std::unique_ptr<Stmt>> statements;
std::unique_ptr<Expr> expr;
bool tail_reachable;
LoopLabel label;
@@ -2178,49 +1732,16 @@ public:
bool is_tail_reachable () const { return tail_reachable; }
BlockExpr (Analysis::NodeMapping mappings,
- std::vector<std::unique_ptr<Stmt> > block_statements,
+ std::vector<std::unique_ptr<Stmt>> block_statements,
std::unique_ptr<Expr> block_expr, bool tail_reachable,
AST::AttrVec inner_attribs, AST::AttrVec outer_attribs,
- LoopLabel label, location_t start_locus, location_t end_locus)
- : ExprWithBlock (std::move (mappings), std::move (outer_attribs)),
- WithInnerAttrs (std::move (inner_attribs)),
- statements (std::move (block_statements)), expr (std::move (block_expr)),
- tail_reachable (tail_reachable), label (std::move (label)),
- start_locus (start_locus), end_locus (end_locus)
- {}
+ LoopLabel label, location_t start_locus, location_t end_locus);
// Copy constructor with clone
- BlockExpr (BlockExpr const &other)
- : ExprWithBlock (other), /*statements(other.statements),*/
- WithInnerAttrs (other.inner_attrs), label (other.label),
- start_locus (other.start_locus), end_locus (other.end_locus)
- {
- // guard to protect from null pointer dereference
- if (other.expr != nullptr)
- expr = other.expr->clone_expr ();
-
- statements.reserve (other.statements.size ());
- for (const auto &e : other.statements)
- statements.push_back (e->clone_stmt ());
- }
+ BlockExpr (BlockExpr const &other);
// Overloaded assignment operator to clone pointer
- BlockExpr &operator= (BlockExpr const &other)
- {
- ExprWithBlock::operator= (other);
- // statements = other.statements;
- expr = other.expr->clone_expr ();
- inner_attrs = other.inner_attrs;
- start_locus = other.end_locus;
- end_locus = other.end_locus;
- // outer_attrs = other.outer_attrs;
-
- statements.reserve (other.statements.size ());
- for (const auto &e : other.statements)
- statements.push_back (e->clone_stmt ());
-
- return *this;
- }
+ BlockExpr &operator= (BlockExpr const &other);
// move constructors
BlockExpr (BlockExpr &&other) = default;
@@ -2243,9 +1764,10 @@ public:
bool is_final_stmt (Stmt *stmt) { return statements.back ().get () == stmt; }
- std::unique_ptr<Expr> &get_final_expr () { return expr; }
+ bool has_final_expr () { return expr != nullptr; }
+ Expr &get_final_expr () { return *expr; }
- std::vector<std::unique_ptr<Stmt> > &get_statements () { return statements; }
+ std::vector<std::unique_ptr<Stmt>> &get_statements () { return statements; }
ExprType get_expression_type () const final override
{
@@ -2292,10 +1814,7 @@ public:
// Constructor for a ContinueExpr with a label.
ContinueExpr (Analysis::NodeMapping mappings, location_t locus,
- Lifetime label, AST::AttrVec outer_attribs = AST::AttrVec ())
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- label (std::move (label)), locus (locus)
- {}
+ Lifetime label, AST::AttrVec outer_attribs = AST::AttrVec ());
location_t get_locus () const override final { return locus; }
@@ -2350,32 +1869,13 @@ public:
BreakExpr (Analysis::NodeMapping mappings, location_t locus,
Lifetime break_label,
std::unique_ptr<Expr> expr_in_break = nullptr,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- label (std::move (break_label)), break_expr (std::move (expr_in_break)),
- locus (locus)
- {}
+ AST::AttrVec outer_attribs = AST::AttrVec ());
// Copy constructor defined to use clone for unique pointer
- BreakExpr (BreakExpr const &other)
- : ExprWithoutBlock (other), label (other.label), locus (other.locus)
- {
- // guard to protect from null pointer dereference
- if (other.break_expr != nullptr)
- break_expr = other.break_expr->clone_expr ();
- }
+ BreakExpr (BreakExpr const &other);
// Overload assignment operator to clone unique pointer
- BreakExpr &operator= (BreakExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- label = other.label;
- break_expr = other.break_expr->clone_expr ();
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ BreakExpr &operator= (BreakExpr const &other);
// move constructors
BreakExpr (BreakExpr &&other) = default;
@@ -2388,7 +1888,7 @@ public:
Lifetime &get_label () { return label; }
- std::unique_ptr<Expr> &get_expr () { return break_expr; }
+ Expr &get_expr () { return *break_expr; }
ExprType get_expression_type () const override final
{
@@ -2415,9 +1915,7 @@ class RangeExpr : public ExprWithoutBlock
protected:
// outer attributes not allowed before range expressions
- RangeExpr (Analysis::NodeMapping mappings, location_t locus)
- : ExprWithoutBlock (std::move (mappings), AST::AttrVec ()), locus (locus)
- {}
+ RangeExpr (Analysis::NodeMapping mappings, location_t locus);
public:
location_t get_locus () const override final { return locus; }
@@ -2440,26 +1938,13 @@ public:
RangeFromToExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> range_from,
- std::unique_ptr<Expr> range_to, location_t locus)
- : RangeExpr (std::move (mappings), locus), from (std::move (range_from)),
- to (std::move (range_to))
- {}
+ std::unique_ptr<Expr> range_to, location_t locus);
// Copy constructor with cloning
- RangeFromToExpr (RangeFromToExpr const &other)
- : RangeExpr (other), from (other.from->clone_expr ()),
- to (other.to->clone_expr ())
- {}
+ RangeFromToExpr (RangeFromToExpr const &other);
// Overload assignment operator to clone unique pointers
- RangeFromToExpr &operator= (RangeFromToExpr const &other)
- {
- RangeExpr::operator= (other);
- from = other.from->clone_expr ();
- to = other.to->clone_expr ();
-
- return *this;
- }
+ RangeFromToExpr &operator= (RangeFromToExpr const &other);
// move constructors
RangeFromToExpr (RangeFromToExpr &&other) = default;
@@ -2468,8 +1953,8 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_from_expr () { return from; }
- std::unique_ptr<Expr> &get_to_expr () { return to; }
+ Expr &get_from_expr () { return *from; }
+ Expr &get_to_expr () { return *to; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -2497,23 +1982,13 @@ public:
std::string as_string () const override;
RangeFromExpr (Analysis::NodeMapping mappings,
- std::unique_ptr<Expr> range_from, location_t locus)
- : RangeExpr (std::move (mappings), locus), from (std::move (range_from))
- {}
+ std::unique_ptr<Expr> range_from, location_t locus);
// Copy constructor with clone
- RangeFromExpr (RangeFromExpr const &other)
- : RangeExpr (other), from (other.from->clone_expr ())
- {}
+ RangeFromExpr (RangeFromExpr const &other);
// Overload assignment operator to clone unique_ptr
- RangeFromExpr &operator= (RangeFromExpr const &other)
- {
- RangeExpr::operator= (other);
- from = other.from->clone_expr ();
-
- return *this;
- }
+ RangeFromExpr &operator= (RangeFromExpr const &other);
// move constructors
RangeFromExpr (RangeFromExpr &&other) = default;
@@ -2522,7 +1997,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_from_expr () { return from; }
+ Expr &get_from_expr () { return *from; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -2551,23 +2026,13 @@ public:
// outer attributes not allowed
RangeToExpr (Analysis::NodeMapping mappings, std::unique_ptr<Expr> range_to,
- location_t locus)
- : RangeExpr (std::move (mappings), locus), to (std::move (range_to))
- {}
+ location_t locus);
// Copy constructor with clone
- RangeToExpr (RangeToExpr const &other)
- : RangeExpr (other), to (other.to->clone_expr ())
- {}
+ RangeToExpr (RangeToExpr const &other);
// Overload assignment operator to clone unique_ptr
- RangeToExpr &operator= (RangeToExpr const &other)
- {
- RangeExpr::operator= (other);
- to = other.to->clone_expr ();
-
- return *this;
- }
+ RangeToExpr &operator= (RangeToExpr const &other);
// move constructors
RangeToExpr (RangeToExpr &&other) = default;
@@ -2576,7 +2041,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_to_expr () { return to; }
+ Expr &get_to_expr () { return *to; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -2601,9 +2066,7 @@ class RangeFullExpr : public RangeExpr
public:
std::string as_string () const override;
- RangeFullExpr (Analysis::NodeMapping mappings, location_t locus)
- : RangeExpr (std::move (mappings), locus)
- {}
+ RangeFullExpr (Analysis::NodeMapping mappings, location_t locus);
// outer attributes not allowed
void accept_vis (HIRFullVisitor &vis) override;
@@ -2637,27 +2100,14 @@ public:
RangeFromToInclExpr (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> range_from,
- std::unique_ptr<Expr> range_to, location_t locus)
- : RangeExpr (std::move (mappings), locus), from (std::move (range_from)),
- to (std::move (range_to))
- {}
+ std::unique_ptr<Expr> range_to, location_t locus);
// outer attributes not allowed
// Copy constructor with clone
- RangeFromToInclExpr (RangeFromToInclExpr const &other)
- : RangeExpr (other), from (other.from->clone_expr ()),
- to (other.to->clone_expr ())
- {}
+ RangeFromToInclExpr (RangeFromToInclExpr const &other);
// Overload assignment operator to use clone
- RangeFromToInclExpr &operator= (RangeFromToInclExpr const &other)
- {
- RangeExpr::operator= (other);
- from = other.from->clone_expr ();
- to = other.to->clone_expr ();
-
- return *this;
- }
+ RangeFromToInclExpr &operator= (RangeFromToInclExpr const &other);
// move constructors
RangeFromToInclExpr (RangeFromToInclExpr &&other) = default;
@@ -2666,8 +2116,8 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_from_expr () { return from; }
- std::unique_ptr<Expr> &get_to_expr () { return to; }
+ Expr &get_from_expr () { return *from; }
+ Expr &get_to_expr () { return *to; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -2695,24 +2145,14 @@ public:
std::string as_string () const override;
RangeToInclExpr (Analysis::NodeMapping mappings,
- std::unique_ptr<Expr> range_to, location_t locus)
- : RangeExpr (std::move (mappings), locus), to (std::move (range_to))
- {}
+ std::unique_ptr<Expr> range_to, location_t locus);
// outer attributes not allowed
// Copy constructor with clone
- RangeToInclExpr (RangeToInclExpr const &other)
- : RangeExpr (other), to (other.to->clone_expr ())
- {}
+ RangeToInclExpr (RangeToInclExpr const &other);
// Overload assignment operator to clone pointer
- RangeToInclExpr &operator= (RangeToInclExpr const &other)
- {
- RangeExpr::operator= (other);
- to = other.to->clone_expr ();
-
- return *this;
- }
+ RangeToInclExpr &operator= (RangeToInclExpr const &other);
// move constructors
RangeToInclExpr (RangeToInclExpr &&other) = default;
@@ -2721,7 +2161,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_to_expr () { return to; };
+ Expr &get_to_expr () { return *to; };
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -2756,30 +2196,13 @@ public:
// Constructor for ReturnExpr.
ReturnExpr (Analysis::NodeMapping mappings, location_t locus,
std::unique_ptr<Expr> returned_expr = nullptr,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- return_expr (std::move (returned_expr)), locus (locus)
- {}
+ AST::AttrVec outer_attribs = AST::AttrVec ());
// Copy constructor with clone
- ReturnExpr (ReturnExpr const &other)
- : ExprWithoutBlock (other), locus (other.locus)
- {
- // guard to protect from null pointer dereference
- if (other.return_expr != nullptr)
- return_expr = other.return_expr->clone_expr ();
- }
+ ReturnExpr (ReturnExpr const &other);
// Overloaded assignment operator to clone return_expr pointer
- ReturnExpr &operator= (ReturnExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- return_expr = other.return_expr->clone_expr ();
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ ReturnExpr &operator= (ReturnExpr const &other);
// move constructors
ReturnExpr (ReturnExpr &&other) = default;
@@ -2790,7 +2213,8 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_expr () { return return_expr; }
+ bool has_expr () { return return_expr != nullptr; }
+ Expr &get_expr () { return *return_expr; }
ExprType get_expression_type () const override final
{
@@ -2825,27 +2249,13 @@ public:
UnsafeBlockExpr (Analysis::NodeMapping mappings,
std::unique_ptr<BlockExpr> block_expr,
- AST::AttrVec outer_attribs, location_t locus)
- : ExprWithBlock (std::move (mappings), std::move (outer_attribs)),
- expr (std::move (block_expr)), locus (locus)
- {}
+ AST::AttrVec outer_attribs, location_t locus);
// Copy constructor with clone
- UnsafeBlockExpr (UnsafeBlockExpr const &other)
- : ExprWithBlock (other), expr (other.expr->clone_block_expr ()),
- locus (other.locus)
- {}
+ UnsafeBlockExpr (UnsafeBlockExpr const &other);
// Overloaded assignment operator to clone
- UnsafeBlockExpr &operator= (UnsafeBlockExpr const &other)
- {
- ExprWithBlock::operator= (other);
- expr = other.expr->clone_block_expr ();
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ UnsafeBlockExpr &operator= (UnsafeBlockExpr const &other);
// move constructors
UnsafeBlockExpr (UnsafeBlockExpr &&other) = default;
@@ -2856,7 +2266,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<BlockExpr> &get_block_expr () { return expr; }
+ BlockExpr &get_block_expr () { return *expr; }
ExprType get_expression_type () const override final
{
@@ -2894,29 +2304,13 @@ protected:
BaseLoopExpr (Analysis::NodeMapping mappings,
std::unique_ptr<BlockExpr> loop_block, location_t locus,
LoopLabel loop_label,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : ExprWithBlock (std::move (mappings), std::move (outer_attribs)),
- loop_label (std::move (loop_label)), loop_block (std::move (loop_block)),
- locus (locus)
- {}
+ AST::AttrVec outer_attribs = AST::AttrVec ());
// Copy constructor for BaseLoopExpr with clone
- BaseLoopExpr (BaseLoopExpr const &other)
- : ExprWithBlock (other), loop_label (other.loop_label),
- loop_block (other.loop_block->clone_block_expr ()), locus (other.locus)
- {}
+ BaseLoopExpr (BaseLoopExpr const &other);
// Overloaded assignment operator to clone
- BaseLoopExpr &operator= (BaseLoopExpr const &other)
- {
- ExprWithBlock::operator= (other);
- loop_block = other.loop_block->clone_block_expr ();
- loop_label = other.loop_label;
- locus = other.locus;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ BaseLoopExpr &operator= (BaseLoopExpr const &other);
// move constructors
BaseLoopExpr (BaseLoopExpr &&other) = default;
@@ -2932,7 +2326,7 @@ public:
location_t get_locus () const override final { return locus; }
- std::unique_ptr<HIR::BlockExpr> &get_loop_block () { return loop_block; };
+ HIR::BlockExpr &get_loop_block () { return *loop_block; };
LoopLabel &get_loop_label () { return loop_label; }
};
@@ -2946,10 +2340,7 @@ public:
// Constructor for LoopExpr
LoopExpr (Analysis::NodeMapping mappings,
std::unique_ptr<BlockExpr> loop_block, location_t locus,
- LoopLabel loop_label, AST::AttrVec outer_attribs = AST::AttrVec ())
- : BaseLoopExpr (std::move (mappings), std::move (loop_block), locus,
- std::move (loop_label), std::move (outer_attribs))
- {}
+ LoopLabel loop_label, AST::AttrVec outer_attribs = AST::AttrVec ());
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
@@ -2980,28 +2371,13 @@ public:
std::unique_ptr<Expr> loop_condition,
std::unique_ptr<BlockExpr> loop_block, location_t locus,
LoopLabel loop_label,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : BaseLoopExpr (std::move (mappings), std::move (loop_block), locus,
- std::move (loop_label), std::move (outer_attribs)),
- condition (std::move (loop_condition))
- {}
+ AST::AttrVec outer_attribs = AST::AttrVec ());
// Copy constructor with clone
- WhileLoopExpr (WhileLoopExpr const &other)
- : BaseLoopExpr (other), condition (other.condition->clone_expr ())
- {}
+ WhileLoopExpr (WhileLoopExpr const &other);
// Overloaded assignment operator to clone
- WhileLoopExpr &operator= (WhileLoopExpr const &other)
- {
- BaseLoopExpr::operator= (other);
- condition = other.condition->clone_expr ();
- // loop_block = other.loop_block->clone_block_expr();
- // loop_label = other.loop_label;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ WhileLoopExpr &operator= (WhileLoopExpr const &other);
// move constructors
WhileLoopExpr (WhileLoopExpr &&other) = default;
@@ -3010,7 +2386,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_predicate_expr () { return condition; }
+ Expr &get_predicate_expr () { return *condition; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -3032,7 +2408,7 @@ protected:
class WhileLetLoopExpr : public BaseLoopExpr
{
// MatchArmPatterns patterns;
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns; // inlined
+ std::vector<std::unique_ptr<Pattern>> match_arm_patterns; // inlined
std::unique_ptr<Expr> condition;
public:
@@ -3040,44 +2416,17 @@ public:
// Constructor with a loop label
WhileLetLoopExpr (Analysis::NodeMapping mappings,
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
+ std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
std::unique_ptr<Expr> condition,
std::unique_ptr<BlockExpr> loop_block, location_t locus,
LoopLabel loop_label,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : BaseLoopExpr (std::move (mappings), std::move (loop_block), locus,
- std::move (loop_label), std::move (outer_attribs)),
- match_arm_patterns (std::move (match_arm_patterns)),
- condition (std::move (condition))
- {}
+ AST::AttrVec outer_attribs = AST::AttrVec ());
// Copy constructor with clone
- WhileLetLoopExpr (WhileLetLoopExpr const &other)
- : BaseLoopExpr (other),
- /*match_arm_patterns(other.match_arm_patterns),*/ condition (
- other.condition->clone_expr ())
- {
- match_arm_patterns.reserve (other.match_arm_patterns.size ());
- for (const auto &e : other.match_arm_patterns)
- match_arm_patterns.push_back (e->clone_pattern ());
- }
+ WhileLetLoopExpr (WhileLetLoopExpr const &other);
// Overloaded assignment operator to clone pointers
- WhileLetLoopExpr &operator= (WhileLetLoopExpr const &other)
- {
- BaseLoopExpr::operator= (other);
- // match_arm_patterns = other.match_arm_patterns;
- condition = other.condition->clone_expr ();
- // loop_block = other.loop_block->clone_block_expr();
- // loop_label = other.loop_label;
- // outer_attrs = other.outer_attrs;
-
- match_arm_patterns.reserve (other.match_arm_patterns.size ());
- for (const auto &e : other.match_arm_patterns)
- match_arm_patterns.push_back (e->clone_pattern ());
-
- return *this;
- }
+ WhileLetLoopExpr &operator= (WhileLetLoopExpr const &other);
// move constructors
WhileLetLoopExpr (WhileLetLoopExpr &&other) = default;
@@ -3086,8 +2435,8 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_cond () { return condition; }
- std::vector<std::unique_ptr<Pattern> > &get_patterns ()
+ Expr &get_cond () { return *condition; }
+ std::vector<std::unique_ptr<Pattern>> &get_patterns ()
{
return match_arm_patterns;
}
@@ -3108,9 +2457,6 @@ protected:
}
};
-// forward decl for IfExpr
-class IfLetExpr;
-
// Base if expression with no "else" or "if let" HIR node
class IfExpr : public ExprWithBlock
{
@@ -3123,29 +2469,14 @@ public:
std::string as_string () const override;
IfExpr (Analysis::NodeMapping mappings, std::unique_ptr<Expr> condition,
- std::unique_ptr<BlockExpr> if_block, location_t locus)
- : ExprWithBlock (std::move (mappings), AST::AttrVec ()),
- condition (std::move (condition)), if_block (std::move (if_block)),
- locus (locus)
- {}
+ std::unique_ptr<BlockExpr> if_block, location_t locus);
// outer attributes are never allowed on IfExprs
// Copy constructor with clone
- IfExpr (IfExpr const &other)
- : ExprWithBlock (other), condition (other.condition->clone_expr ()),
- if_block (other.if_block->clone_block_expr ()), locus (other.locus)
- {}
+ IfExpr (IfExpr const &other);
// Overloaded assignment operator to clone expressions
- IfExpr &operator= (IfExpr const &other)
- {
- ExprWithBlock::operator= (other);
- condition = other.condition->clone_expr ();
- if_block = other.if_block->clone_block_expr ();
- locus = other.locus;
-
- return *this;
- }
+ IfExpr &operator= (IfExpr const &other);
// move constructors
IfExpr (IfExpr &&other) = default;
@@ -3169,8 +2500,8 @@ public:
void vis_if_condition (HIRFullVisitor &vis) { condition->accept_vis (vis); }
void vis_if_block (HIRFullVisitor &vis) { if_block->accept_vis (vis); }
- std::unique_ptr<Expr> &get_if_condition () { return condition; }
- std::unique_ptr<BlockExpr> &get_if_block () { return if_block; }
+ Expr &get_if_condition () { return *condition; }
+ BlockExpr &get_if_block () { return *if_block; }
ExprType get_expression_type () const final override { return ExprType::If; }
@@ -3201,28 +2532,15 @@ public:
IfExprConseqElse (Analysis::NodeMapping mappings,
std::unique_ptr<Expr> condition,
std::unique_ptr<BlockExpr> if_block,
- std::unique_ptr<ExprWithBlock> else_block, location_t locus)
- : IfExpr (std::move (mappings), std::move (condition), std::move (if_block),
- locus),
- else_block (std::move (else_block))
- {}
+ std::unique_ptr<ExprWithBlock> else_block,
+ location_t locus);
// again, outer attributes not allowed
// Copy constructor with clone
- IfExprConseqElse (IfExprConseqElse const &other)
- : IfExpr (other), else_block (other.else_block->clone_expr_with_block ())
- {}
+ IfExprConseqElse (IfExprConseqElse const &other);
// Overloaded assignment operator with cloning
- IfExprConseqElse &operator= (IfExprConseqElse const &other)
- {
- IfExpr::operator= (other);
- // condition = other.condition->clone_expr();
- // if_block = other.if_block->clone_block_expr();
- else_block = other.else_block->clone_expr_with_block ();
-
- return *this;
- }
+ IfExprConseqElse &operator= (IfExprConseqElse const &other);
// move constructors
IfExprConseqElse (IfExprConseqElse &&other) = default;
@@ -3233,7 +2551,7 @@ public:
void vis_else_block (HIRFullVisitor &vis) { else_block->accept_vis (vis); }
- std::unique_ptr<ExprWithBlock> &get_else_block () { return else_block; }
+ ExprWithBlock &get_else_block () { return *else_block; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -3258,183 +2576,12 @@ protected:
}
};
-// Basic "if let" expression HIR node with no else
-class IfLetExpr : public ExprWithBlock
-{
- // MatchArmPatterns patterns;
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns; // inlined
- std::unique_ptr<Expr> value;
- std::unique_ptr<BlockExpr> if_block;
-
- location_t locus;
-
-public:
- std::string as_string () const override;
-
- IfLetExpr (Analysis::NodeMapping mappings,
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
- std::unique_ptr<Expr> value, std::unique_ptr<BlockExpr> if_block,
- location_t locus)
- : ExprWithBlock (std::move (mappings), AST::AttrVec ()),
- match_arm_patterns (std::move (match_arm_patterns)),
- value (std::move (value)), if_block (std::move (if_block)), locus (locus)
- {}
- // outer attributes not allowed on if let exprs either
-
- // copy constructor with clone
- IfLetExpr (IfLetExpr const &other)
- : ExprWithBlock (other),
- /*match_arm_patterns(other.match_arm_patterns),*/ value (
- other.value->clone_expr ()),
- if_block (other.if_block->clone_block_expr ()), locus (other.locus)
- {
- match_arm_patterns.reserve (other.match_arm_patterns.size ());
- for (const auto &e : other.match_arm_patterns)
- match_arm_patterns.push_back (e->clone_pattern ());
- }
-
- // overload assignment operator to clone
- IfLetExpr &operator= (IfLetExpr const &other)
- {
- ExprWithBlock::operator= (other);
- // match_arm_patterns = other.match_arm_patterns;
- value = other.value->clone_expr ();
- if_block = other.if_block->clone_block_expr ();
- locus = other.locus;
-
- match_arm_patterns.reserve (other.match_arm_patterns.size ());
- for (const auto &e : other.match_arm_patterns)
- match_arm_patterns.push_back (e->clone_pattern ());
-
- return *this;
- }
-
- // move constructors
- IfLetExpr (IfLetExpr &&other) = default;
- IfLetExpr &operator= (IfLetExpr &&other) = default;
-
- // Unique pointer custom clone function
- std::unique_ptr<IfLetExpr> clone_if_let_expr () const
- {
- return std::unique_ptr<IfLetExpr> (clone_if_let_expr_impl ());
- }
-
- location_t get_locus () const override final { return locus; }
-
- void accept_vis (HIRFullVisitor &vis) override;
- void accept_vis (HIRExpressionVisitor &vis) override;
-
- std::unique_ptr<Expr> &get_scrutinee_expr () { return value; }
-
- std::vector<std::unique_ptr<Pattern> > &get_patterns ()
- {
- return match_arm_patterns;
- }
-
- std::unique_ptr<BlockExpr> &get_if_block () { return if_block; }
-
- ExprType get_expression_type () const final override
- {
- return ExprType::IfLet;
- }
-
-protected:
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- IfLetExpr *clone_expr_impl () const override { return new IfLetExpr (*this); }
-
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- IfLetExpr *clone_expr_with_block_impl () const override
- {
- return new IfLetExpr (*this);
- }
-
- // Base clone function but still concrete as concrete base class
- virtual IfLetExpr *clone_if_let_expr_impl () const
- {
- return new IfLetExpr (*this);
- }
-};
-
-/* HIR node representing "if let" expression with an "else" expression at the
- * end */
-class IfLetExprConseqElse : public IfLetExpr
-{
- std::unique_ptr<ExprWithBlock> else_block;
-
-public:
- std::string as_string () const override;
-
- IfLetExprConseqElse (
- Analysis::NodeMapping mappings,
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
- std::unique_ptr<Expr> value, std::unique_ptr<BlockExpr> if_block,
- std::unique_ptr<ExprWithBlock> else_block, location_t locus)
- : IfLetExpr (std::move (mappings), std::move (match_arm_patterns),
- std::move (value), std::move (if_block), locus),
- else_block (std::move (else_block))
- {}
- // outer attributes not allowed
-
- // copy constructor with clone
- IfLetExprConseqElse (IfLetExprConseqElse const &other)
- : IfLetExpr (other), else_block (other.else_block->clone_expr_with_block ())
- {}
-
- // overload assignment operator to clone
- IfLetExprConseqElse &operator= (IfLetExprConseqElse const &other)
- {
- IfLetExpr::operator= (other);
- // match_arm_patterns = other.match_arm_patterns;
- // value = other.value->clone_expr();
- // if_block = other.if_block->clone_block_expr();
- else_block = other.else_block->clone_expr_with_block ();
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
-
- // move constructors
- IfLetExprConseqElse (IfLetExprConseqElse &&other) = default;
- IfLetExprConseqElse &operator= (IfLetExprConseqElse &&other) = default;
-
- void accept_vis (HIRFullVisitor &vis) override;
- void accept_vis (HIRExpressionVisitor &vis) override;
-
- void vis_else_block (HIRFullVisitor &vis) { else_block->accept_vis (vis); }
-
- std::unique_ptr<ExprWithBlock> &get_else_block () { return else_block; }
-
-protected:
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- IfLetExprConseqElse *clone_expr_impl () const override
- {
- return new IfLetExprConseqElse (*this);
- }
-
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- IfLetExprConseqElse *clone_expr_with_block_impl () const override
- {
- return new IfLetExprConseqElse (*this);
- }
-
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- IfLetExprConseqElse *clone_if_let_expr_impl () const override
- {
- return new IfLetExprConseqElse (*this);
- }
-};
-
// Match arm expression
struct MatchArm
{
private:
AST::AttrVec outer_attrs;
- std::vector<std::unique_ptr<Pattern> > match_arm_patterns;
+ std::vector<std::unique_ptr<Pattern>> match_arm_patterns;
std::unique_ptr<Expr> guard_expr;
location_t locus;
@@ -3443,45 +2590,17 @@ public:
bool has_match_arm_guard () const { return guard_expr != nullptr; }
// Constructor for match arm with a guard expression
- MatchArm (std::vector<std::unique_ptr<Pattern> > match_arm_patterns,
+ MatchArm (std::vector<std::unique_ptr<Pattern>> match_arm_patterns,
location_t locus, std::unique_ptr<Expr> guard_expr = nullptr,
- AST::AttrVec outer_attrs = AST::AttrVec ())
- : outer_attrs (std::move (outer_attrs)),
- match_arm_patterns (std::move (match_arm_patterns)),
- guard_expr (std::move (guard_expr)), locus (locus)
- {}
+ AST::AttrVec outer_attrs = AST::AttrVec ());
// Copy constructor with clone
- MatchArm (MatchArm const &other) : outer_attrs (other.outer_attrs)
- {
- // guard to protect from null pointer dereference
- if (other.guard_expr != nullptr)
- guard_expr = other.guard_expr->clone_expr ();
-
- match_arm_patterns.reserve (other.match_arm_patterns.size ());
- for (const auto &e : other.match_arm_patterns)
- match_arm_patterns.push_back (e->clone_pattern ());
-
- locus = other.locus;
- }
+ MatchArm (MatchArm const &other);
~MatchArm () = default;
// Overload assignment operator to clone
- MatchArm &operator= (MatchArm const &other)
- {
- outer_attrs = other.outer_attrs;
-
- if (other.guard_expr != nullptr)
- guard_expr = other.guard_expr->clone_expr ();
-
- match_arm_patterns.clear ();
- match_arm_patterns.reserve (other.match_arm_patterns.size ());
- for (const auto &e : other.match_arm_patterns)
- match_arm_patterns.push_back (e->clone_pattern ());
-
- return *this;
- }
+ MatchArm &operator= (MatchArm const &other);
// move constructors
MatchArm (MatchArm &&other) = default;
@@ -3494,17 +2613,17 @@ public:
static MatchArm create_error ()
{
location_t locus = UNDEF_LOCATION;
- return MatchArm (std::vector<std::unique_ptr<Pattern> > (), locus);
+ return MatchArm (std::vector<std::unique_ptr<Pattern>> (), locus);
}
std::string as_string () const;
- std::vector<std::unique_ptr<Pattern> > &get_patterns ()
+ std::vector<std::unique_ptr<Pattern>> &get_patterns ()
{
return match_arm_patterns;
}
- std::unique_ptr<Expr> &get_guard_expr () { return guard_expr; }
+ Expr &get_guard_expr () { return *guard_expr; }
location_t get_locus () const { return locus; }
};
@@ -3520,23 +2639,11 @@ private:
public:
MatchCase (Analysis::NodeMapping mappings, MatchArm arm,
- std::unique_ptr<Expr> expr)
- : mappings (mappings), arm (std::move (arm)), expr (std::move (expr))
- {}
-
- MatchCase (const MatchCase &other)
- : mappings (other.mappings), arm (other.arm),
- expr (other.expr->clone_expr ())
- {}
+ std::unique_ptr<Expr> expr);
- MatchCase &operator= (const MatchCase &other)
- {
- mappings = other.mappings;
- arm = other.arm;
- expr = other.expr->clone_expr ();
+ MatchCase (const MatchCase &other);
- return *this;
- }
+ MatchCase &operator= (const MatchCase &other);
MatchCase (MatchCase &&other) = default;
MatchCase &operator= (MatchCase &&other) = default;
@@ -3548,7 +2655,7 @@ public:
Analysis::NodeMapping get_mappings () const { return mappings; }
MatchArm &get_arm () { return arm; }
- std::unique_ptr<Expr> &get_expr () { return expr; }
+ Expr &get_expr () { return *expr; }
};
// Match expression HIR node
@@ -3565,40 +2672,13 @@ public:
MatchExpr (Analysis::NodeMapping mappings, std::unique_ptr<Expr> branch_value,
std::vector<MatchCase> match_arms, AST::AttrVec inner_attrs,
- AST::AttrVec outer_attrs, location_t locus)
- : ExprWithBlock (std::move (mappings), std::move (outer_attrs)),
- WithInnerAttrs (std::move (inner_attrs)),
- branch_value (std::move (branch_value)),
- match_arms (std::move (match_arms)), locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// Copy constructor requires clone due to unique_ptr
- MatchExpr (MatchExpr const &other)
- : ExprWithBlock (other), WithInnerAttrs (other.inner_attrs),
- branch_value (other.branch_value->clone_expr ()),
- match_arms (other.match_arms), locus (other.locus)
- {
- /*match_arms.reserve (other.match_arms.size ());
- for (const auto &e : other.match_arms)
- match_arms.push_back (e->clone_match_case ());*/
- }
+ MatchExpr (MatchExpr const &other);
// Overloaded assignment operator to clone due to unique_ptr
- MatchExpr &operator= (MatchExpr const &other)
- {
- ExprWithBlock::operator= (other);
- branch_value = other.branch_value->clone_expr ();
- inner_attrs = other.inner_attrs;
- match_arms = other.match_arms;
- // outer_attrs = other.outer_attrs;
- locus = other.locus;
-
- /*match_arms.reserve (other.match_arms.size ());
- for (const auto &e : other.match_arms)
- match_arms.push_back (e->clone_match_case ());*/
-
- return *this;
- }
+ MatchExpr &operator= (MatchExpr const &other);
// move constructors
MatchExpr (MatchExpr &&other) = default;
@@ -3609,7 +2689,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_scrutinee_expr () { return branch_value; }
+ Expr &get_scrutinee_expr () { return *branch_value; }
AST::AttrVec get_inner_attrs () const { return inner_attrs; }
const std::vector<MatchCase> &get_match_cases () const { return match_arms; }
std::vector<MatchCase> &get_match_cases () { return match_arms; }
@@ -3641,26 +2721,13 @@ class AwaitExpr : public ExprWithoutBlock
public:
// TODO: ensure outer attributes are actually allowed
AwaitExpr (Analysis::NodeMapping mappings, std::unique_ptr<Expr> awaited_expr,
- AST::AttrVec outer_attrs, location_t locus)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attrs)),
- awaited_expr (std::move (awaited_expr)), locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// copy constructor with clone
- AwaitExpr (AwaitExpr const &other)
- : ExprWithoutBlock (other),
- awaited_expr (other.awaited_expr->clone_expr ()), locus (other.locus)
- {}
+ AwaitExpr (AwaitExpr const &other);
// overloaded assignment operator with clone
- AwaitExpr &operator= (AwaitExpr const &other)
- {
- ExprWithoutBlock::operator= (other);
- awaited_expr = other.awaited_expr->clone_expr ();
- locus = other.locus;
-
- return *this;
- }
+ AwaitExpr &operator= (AwaitExpr const &other);
// move constructors
AwaitExpr (AwaitExpr &&other) = default;
@@ -3673,7 +2740,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
- std::unique_ptr<Expr> &get_awaited_expr () { return awaited_expr; }
+ Expr &get_awaited_expr () { return *awaited_expr; }
ExprType get_expression_type () const final override
{
@@ -3699,27 +2766,13 @@ class AsyncBlockExpr : public ExprWithBlock
public:
AsyncBlockExpr (Analysis::NodeMapping mappings,
std::unique_ptr<BlockExpr> block_expr, bool has_move,
- AST::AttrVec outer_attrs, location_t locus)
- : ExprWithBlock (std::move (mappings), std::move (outer_attrs)),
- has_move (has_move), block_expr (std::move (block_expr)), locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// copy constructor with clone
- AsyncBlockExpr (AsyncBlockExpr const &other)
- : ExprWithBlock (other), has_move (other.has_move),
- block_expr (other.block_expr->clone_block_expr ()), locus (other.locus)
- {}
+ AsyncBlockExpr (AsyncBlockExpr const &other);
// overloaded assignment operator to clone
- AsyncBlockExpr &operator= (AsyncBlockExpr const &other)
- {
- ExprWithBlock::operator= (other);
- has_move = other.has_move;
- block_expr = other.block_expr->clone_block_expr ();
- locus = other.locus;
-
- return *this;
- }
+ AsyncBlockExpr &operator= (AsyncBlockExpr const &other);
// move constructors
AsyncBlockExpr (AsyncBlockExpr &&other) = default;
@@ -3730,7 +2783,7 @@ public:
location_t get_locus () const override final { return locus; }
bool get_has_move () const { return has_move; }
- std::unique_ptr<BlockExpr> &get_block_expr () { return block_expr; }
+ BlockExpr &get_block_expr () { return *block_expr; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRExpressionVisitor &vis) override;
@@ -3753,35 +2806,17 @@ protected:
class OperatorExprMeta
{
public:
- OperatorExprMeta (HIR::CompoundAssignmentExpr &expr)
- : node_mappings (expr.get_mappings ()),
- lvalue_mappings (expr.get_expr ()->get_mappings ()),
- locus (expr.get_locus ())
- {}
+ OperatorExprMeta (HIR::CompoundAssignmentExpr &expr);
- OperatorExprMeta (HIR::ArithmeticOrLogicalExpr &expr)
- : node_mappings (expr.get_mappings ()),
- lvalue_mappings (expr.get_expr ()->get_mappings ()),
- locus (expr.get_locus ())
- {}
+ OperatorExprMeta (HIR::ArithmeticOrLogicalExpr &expr);
- OperatorExprMeta (HIR::NegationExpr &expr)
- : node_mappings (expr.get_mappings ()),
- lvalue_mappings (expr.get_expr ()->get_mappings ()),
- locus (expr.get_locus ())
- {}
+ OperatorExprMeta (HIR::NegationExpr &expr);
- OperatorExprMeta (HIR::DereferenceExpr &expr)
- : node_mappings (expr.get_mappings ()),
- lvalue_mappings (expr.get_expr ()->get_mappings ()),
- locus (expr.get_locus ())
- {}
+ OperatorExprMeta (HIR::DereferenceExpr &expr);
- OperatorExprMeta (HIR::ArrayIndexExpr &expr)
- : node_mappings (expr.get_mappings ()),
- lvalue_mappings (expr.get_array_expr ()->get_mappings ()),
- locus (expr.get_locus ())
- {}
+ OperatorExprMeta (HIR::ArrayIndexExpr &expr);
+
+ OperatorExprMeta (HIR::ComparisonExpr &expr);
const Analysis::NodeMapping &get_mappings () const { return node_mappings; }
@@ -3856,25 +2891,13 @@ struct AnonConst
{
NodeId id;
std::unique_ptr<Expr> expr;
- AnonConst (NodeId id, std::unique_ptr<Expr> expr)
- : id (id), expr (std::move (expr))
- {
- rust_assert (this->expr != nullptr);
- }
- AnonConst (const AnonConst &other)
- {
- id = other.id;
- expr = other.expr->clone_expr ();
- }
- AnonConst operator= (const AnonConst &other)
- {
- id = other.id;
- expr = other.expr->clone_expr ();
- return *this;
- }
+ AnonConst (NodeId id, std::unique_ptr<Expr> expr);
+
+ AnonConst (const AnonConst &other);
+
+ AnonConst operator= (const AnonConst &other);
};
-;
class InlineAsmOperand
{
@@ -3885,26 +2908,11 @@ public:
std::unique_ptr<Expr> expr;
In (const tl::optional<struct AST::InlineAsmRegOrRegClass> &reg,
- std::unique_ptr<Expr> expr)
- : reg (reg), expr (std::move (expr))
- {
- rust_assert (this->expr != nullptr);
- }
-
- In (const struct In &other)
- {
- reg = other.reg;
-
- expr = other.expr->clone_expr ();
- }
-
- In operator= (const struct In &other)
- {
- reg = other.reg;
- expr = other.expr->clone_expr ();
-
- return *this;
- }
+ std::unique_ptr<Expr> expr);
+
+ In (const struct In &other);
+
+ In operator= (const struct In &other);
};
struct Out
@@ -3914,26 +2922,11 @@ public:
std::unique_ptr<Expr> expr; // can be null
Out (tl::optional<struct AST::InlineAsmRegOrRegClass> &reg, bool late,
- std::unique_ptr<Expr> expr)
- : reg (reg), late (late), expr (std::move (expr))
- {
- rust_assert (this->expr != nullptr);
- }
-
- Out (const struct Out &other)
- {
- reg = other.reg;
- late = other.late;
- expr = other.expr->clone_expr ();
- }
-
- Out operator= (const struct Out &other)
- {
- reg = other.reg;
- late = other.late;
- expr = other.expr->clone_expr ();
- return *this;
- }
+ std::unique_ptr<Expr> expr);
+
+ Out (const struct Out &other);
+
+ Out operator= (const struct Out &other);
};
struct InOut
@@ -3943,27 +2936,11 @@ public:
std::unique_ptr<Expr> expr; // this can't be null
InOut (tl::optional<struct AST::InlineAsmRegOrRegClass> &reg, bool late,
- std::unique_ptr<Expr> expr)
- : reg (reg), late (late), expr (std::move (expr))
- {
- rust_assert (this->expr != nullptr);
- }
-
- InOut (const struct InOut &other)
- {
- reg = other.reg;
- late = other.late;
- expr = other.expr->clone_expr ();
- }
-
- InOut operator= (const struct InOut &other)
- {
- reg = other.reg;
- late = other.late;
- expr = other.expr->clone_expr ();
-
- return *this;
- }
+ std::unique_ptr<Expr> expr);
+
+ InOut (const struct InOut &other);
+
+ InOut operator= (const struct InOut &other);
};
struct SplitInOut
@@ -3975,31 +2952,11 @@ public:
SplitInOut (tl::optional<struct AST::InlineAsmRegOrRegClass> &reg,
bool late, std::unique_ptr<Expr> in_expr,
- std::unique_ptr<Expr> out_expr)
- : reg (reg), late (late), in_expr (std::move (in_expr)),
- out_expr (std::move (out_expr))
- {
- rust_assert (this->in_expr != nullptr);
- rust_assert (this->out_expr != nullptr);
- }
-
- SplitInOut (const struct SplitInOut &other)
- {
- reg = other.reg;
- late = other.late;
- in_expr = other.in_expr->clone_expr ();
- out_expr = other.out_expr->clone_expr ();
- }
-
- SplitInOut operator= (const struct SplitInOut &other)
- {
- reg = other.reg;
- late = other.late;
- in_expr = other.in_expr->clone_expr ();
- out_expr = other.out_expr->clone_expr ();
-
- return *this;
- }
+ std::unique_ptr<Expr> out_expr);
+
+ SplitInOut (const struct SplitInOut &other);
+
+ SplitInOut operator= (const struct SplitInOut &other);
};
struct Const
@@ -4011,20 +2968,11 @@ public:
{
std::unique_ptr<Expr> expr;
- Sym (std::unique_ptr<Expr> expr) : expr (std::move (expr))
- {
- rust_assert (this->expr != nullptr);
- }
- Sym (const struct Sym &other)
- {
- expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
- }
-
- Sym operator= (const struct Sym &other)
- {
- expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
- return *this;
- }
+ Sym (std::unique_ptr<Expr> expr);
+
+ Sym (const struct Sym &other);
+
+ Sym operator= (const struct Sym &other);
};
struct Label
@@ -4032,23 +2980,11 @@ public:
std::string label_name;
std::unique_ptr<Expr> expr;
- Label (tl::optional<std::string> label_name, std::unique_ptr<Expr> expr)
- : expr (std::move (expr))
- {
- rust_assert (this->expr != nullptr);
- if (label_name.has_value ())
- this->label_name = label_name.value ();
- }
- Label (const struct Label &other)
- {
- expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
- }
-
- Label operator= (const struct Label &other)
- {
- expr = std::unique_ptr<Expr> (other.expr->clone_expr ());
- return *this;
- }
+ Label (tl::optional<std::string> label_name, std::unique_ptr<Expr> expr);
+
+ Label (const struct Label &other);
+
+ Label operator= (const struct Label &other);
};
private:
@@ -4062,7 +2998,6 @@ private:
tl::optional<struct Const> cnst;
tl::optional<struct Sym> sym;
tl::optional<struct Label> label;
- location_t locus;
public:
InlineAsmOperand (const InlineAsmOperand &other)
@@ -4105,6 +3040,7 @@ public:
struct Sym get_sym () const { return sym.value (); }
struct Label get_label () const { return label.value (); }
};
+
// Inline Assembly Node
class InlineAsm : public ExprWithoutBlock
{
@@ -4166,6 +3102,7 @@ public:
// INFO: An inline asm is asm!, which is the opposite of a global_asm()
return !this->is_global_asm;
}
+
InlineAsm (location_t locus, bool is_global_asm,
std::vector<AST::InlineAsmTemplatePiece> template_,
std::vector<AST::TupleTemplateStr> template_strs,
@@ -4173,16 +3110,9 @@ public:
std::vector<AST::TupleClobber> clobber_abi,
std::set<AST::InlineAsmOption> options,
Analysis::NodeMapping mappings,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs)),
- locus (locus), is_global_asm (is_global_asm),
- template_ (std::move (template_)),
- template_strs (std::move (template_strs)),
- operands (std::move (operands)), clobber_abi (std::move (clobber_abi)),
- options (std::move (options))
-
- {}
+ AST::AttrVec outer_attribs = AST::AttrVec ());
};
+
} // namespace HIR
} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-full-decls.h b/gcc/rust/hir/tree/rust-hir-full-decls.h
index 64be7bf..c64c8bf 100644
--- a/gcc/rust/hir/tree/rust-hir-full-decls.h
+++ b/gcc/rust/hir/tree/rust-hir-full-decls.h
@@ -113,8 +113,6 @@ class WhileLoopExpr;
class WhileLetLoopExpr;
class IfExpr;
class IfExprConseqElse;
-class IfLetExpr;
-class IfLetExprConseqElse;
struct MatchArm;
// class MatchCase;
// class MatchCaseBlockExpr;
diff --git a/gcc/rust/hir/tree/rust-hir-generic-param.cc b/gcc/rust/hir/tree/rust-hir-generic-param.cc
new file mode 100644
index 0000000..e5afa8e
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-generic-param.cc
@@ -0,0 +1,95 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include "rust-hir-generic-param.h"
+
+namespace Rust {
+namespace HIR {
+
+GenericParam::GenericParam (Analysis::NodeMapping mapping,
+ enum GenericKind kind)
+ : mappings (mapping), kind (kind)
+{}
+
+LifetimeParam::LifetimeParam (Analysis::NodeMapping mappings, Lifetime lifetime,
+ location_t locus,
+ std::vector<Lifetime> lifetime_bounds,
+ AST::AttrVec outer_attrs)
+ : GenericParam (mappings, GenericKind::LIFETIME),
+ lifetime (std::move (lifetime)),
+ lifetime_bounds (std::move (lifetime_bounds)),
+ outer_attrs (std::move (outer_attrs)), locus (locus)
+{}
+
+LifetimeParam::LifetimeParam (LifetimeParam const &other)
+ : GenericParam (other.mappings, GenericKind::LIFETIME),
+ lifetime (other.lifetime), lifetime_bounds (other.lifetime_bounds),
+ outer_attrs (other.outer_attrs), locus (other.locus)
+{}
+
+LifetimeParam &
+LifetimeParam::operator= (LifetimeParam const &other)
+{
+ lifetime = other.lifetime;
+ lifetime_bounds = other.lifetime_bounds;
+ outer_attrs = other.outer_attrs;
+ locus = other.locus;
+ mappings = other.mappings;
+
+ return *this;
+}
+
+ConstGenericParam::ConstGenericParam (std::string name,
+ std::unique_ptr<Type> type,
+ std::unique_ptr<Expr> default_expression,
+ Analysis::NodeMapping mapping,
+ location_t locus)
+ : GenericParam (mapping, GenericKind::CONST), name (std::move (name)),
+ type (std::move (type)),
+ default_expression (std::move (default_expression)), locus (locus)
+{}
+
+ConstGenericParam::ConstGenericParam (const ConstGenericParam &other)
+ : GenericParam (other)
+{
+ name = other.name;
+ locus = other.locus;
+
+ if (other.type)
+ type = other.type->clone_type ();
+ if (other.default_expression)
+ default_expression = other.default_expression->clone_expr ();
+}
+
+std::string
+ConstGenericParam::as_string () const
+{
+ auto result = "ConstGenericParam: " + name + " : " + type->as_string ();
+
+ if (default_expression)
+ result += " = " + default_expression->as_string ();
+
+ return result;
+}
+
+void
+ConstGenericParam::accept_vis (HIRFullVisitor &)
+{}
+
+} // namespace HIR
+} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-generic-param.h b/gcc/rust/hir/tree/rust-hir-generic-param.h
new file mode 100644
index 0000000..a1c59bf
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-generic-param.h
@@ -0,0 +1,190 @@
+
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_GENERIC_PARAM_H
+#define RUST_HIR_GENERIC_PARAM_H
+
+#include "rust-hir-visitable.h"
+#include "rust-hir-bound.h"
+
+namespace Rust {
+namespace HIR {
+
+/* Base generic parameter in HIR. Abstract - can be represented by a Lifetime or
+ * Type param */
+class GenericParam : public FullVisitable
+{
+public:
+ using FullVisitable::accept_vis;
+
+ virtual ~GenericParam () {}
+
+ enum class GenericKind
+ {
+ TYPE,
+ LIFETIME,
+ CONST,
+ };
+
+ virtual AST::AttrVec &get_outer_attrs () = 0;
+ virtual bool has_outer_attribute () const = 0;
+
+ // Unique pointer custom clone function
+ std::unique_ptr<GenericParam> clone_generic_param () const
+ {
+ return std::unique_ptr<GenericParam> (clone_generic_param_impl ());
+ }
+
+ virtual std::string as_string () const = 0;
+
+ virtual location_t get_locus () const = 0;
+
+ Analysis::NodeMapping get_mappings () const { return mappings; }
+
+ enum GenericKind get_kind () const { return kind; }
+
+protected:
+ // Clone function implementation as pure virtual method
+ virtual GenericParam *clone_generic_param_impl () const = 0;
+
+ Analysis::NodeMapping mappings;
+
+ enum GenericKind kind;
+
+ GenericParam (Analysis::NodeMapping mapping,
+ enum GenericKind kind = GenericKind::TYPE);
+};
+
+// A lifetime generic parameter (as opposed to a type generic parameter)
+class LifetimeParam : public GenericParam
+{
+ Lifetime lifetime;
+
+ // bool has_lifetime_bounds;
+ // LifetimeBounds lifetime_bounds;
+ std::vector<Lifetime> lifetime_bounds; // inlined LifetimeBounds
+
+ AST::AttrVec outer_attrs;
+
+ location_t locus;
+
+public:
+ Lifetime get_lifetime () { return lifetime; }
+
+ // Returns whether the lifetime param has any lifetime bounds.
+ bool has_lifetime_bounds () const { return !lifetime_bounds.empty (); }
+
+ std::vector<Lifetime> &get_lifetime_bounds () { return lifetime_bounds; }
+
+ // Returns whether the lifetime param has an outer attribute.
+ bool has_outer_attribute () const override { return outer_attrs.size () > 1; }
+
+ AST::AttrVec &get_outer_attrs () override { return outer_attrs; }
+
+ // Returns whether the lifetime param is in an error state.
+ bool is_error () const { return lifetime.is_error (); }
+
+ // Constructor
+ LifetimeParam (Analysis::NodeMapping mappings, Lifetime lifetime,
+ location_t locus = UNDEF_LOCATION,
+ std::vector<Lifetime> lifetime_bounds
+ = std::vector<Lifetime> (),
+ AST::AttrVec outer_attrs = std::vector<AST::Attribute> ());
+
+ // TODO: remove copy and assignment operator definitions - not required
+
+ // Copy constructor with clone
+ LifetimeParam (LifetimeParam const &other);
+
+ // Overloaded assignment operator to clone attribute
+ LifetimeParam &operator= (LifetimeParam const &other);
+
+ // move constructors
+ LifetimeParam (LifetimeParam &&other) = default;
+ LifetimeParam &operator= (LifetimeParam &&other) = default;
+
+ std::string as_string () const override;
+
+ void accept_vis (HIRFullVisitor &vis) override;
+
+ location_t get_locus () const override final { return locus; }
+
+protected:
+ /* Use covariance to implement clone function as returning this object rather
+ * than base */
+ LifetimeParam *clone_generic_param_impl () const override
+ {
+ return new LifetimeParam (*this);
+ }
+};
+
+class ConstGenericParam : public GenericParam
+{
+public:
+ ConstGenericParam (std::string name, std::unique_ptr<Type> type,
+ std::unique_ptr<Expr> default_expression,
+ Analysis::NodeMapping mapping, location_t locus);
+
+ ConstGenericParam (const ConstGenericParam &other);
+
+ bool has_outer_attribute () const override { return false; }
+
+ AST::AttrVec &get_outer_attrs () override { return outer_attrs; }
+
+ std::string as_string () const override final;
+
+ void accept_vis (HIRFullVisitor &vis) override final;
+
+ location_t get_locus () const override final { return locus; };
+
+ bool has_default_expression () { return default_expression != nullptr; }
+
+ std::string get_name () { return name; }
+ Type &get_type ()
+ {
+ rust_assert (type);
+ return *type;
+ }
+ Expr &get_default_expression () { return *default_expression; }
+
+protected:
+ /* Use covariance to implement clone function as returning this object rather
+ * than base */
+ ConstGenericParam *clone_generic_param_impl () const override
+ {
+ return new ConstGenericParam (*this);
+ }
+
+private:
+ std::string name;
+ std::unique_ptr<Type> type;
+
+ /* const params have no outer attrs, should be empty */
+ AST::AttrVec outer_attrs = std::vector<AST::Attribute> ();
+
+ /* Optional - can be a null pointer if there is no default expression */
+ std::unique_ptr<Expr> default_expression;
+
+ location_t locus;
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-item.cc b/gcc/rust/hir/tree/rust-hir-item.cc
new file mode 100644
index 0000000..cff06d3
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-item.cc
@@ -0,0 +1,1020 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include "rust-hir-item.h"
+#include "optional.h"
+
+namespace Rust {
+namespace HIR {
+
+TypeParam::TypeParam (
+ Analysis::NodeMapping mappings, Identifier type_representation,
+ location_t locus,
+ std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
+ tl::optional<std::unique_ptr<Type>> type, AST::AttrVec outer_attrs)
+ : GenericParam (mappings), outer_attrs (std::move (outer_attrs)),
+ type_representation (std::move (type_representation)),
+ type_param_bounds (std::move (type_param_bounds)), type (std::move (type)),
+ locus (locus)
+{}
+
+TypeParam::TypeParam (TypeParam const &other)
+ : GenericParam (other.mappings), outer_attrs (other.outer_attrs),
+ type_representation (other.type_representation), locus (other.locus)
+{
+ // guard to prevent null pointer dereference
+ if (other.has_type ())
+ type = {other.type.value ()->clone_type ()};
+ else
+ type = tl::nullopt;
+
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+}
+
+TypeParam &
+TypeParam::operator= (TypeParam const &other)
+{
+ type_representation = other.type_representation;
+ outer_attrs = other.outer_attrs;
+ locus = other.locus;
+ mappings = other.mappings;
+
+ // guard to prevent null pointer dereference
+ if (other.has_type ())
+ type = {other.type.value ()->clone_type ()};
+ else
+ type = tl::nullopt;
+
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+
+ return *this;
+}
+
+Analysis::NodeMapping
+TypeParam::get_type_mappings () const
+{
+ rust_assert (type.has_value ());
+ return type.value ()->get_mappings ();
+}
+
+std::vector<std::unique_ptr<TypeParamBound>> &
+TypeParam::get_type_param_bounds ()
+{
+ return type_param_bounds;
+}
+
+TypeBoundWhereClauseItem::TypeBoundWhereClauseItem (
+ Analysis::NodeMapping mappings, std::vector<LifetimeParam> for_lifetimes,
+ std::unique_ptr<Type> bound_type,
+ std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
+ location_t locus)
+ : for_lifetimes (std::move (for_lifetimes)),
+ bound_type (std::move (bound_type)),
+ type_param_bounds (std::move (type_param_bounds)),
+ mappings (std::move (mappings)), locus (locus)
+{}
+
+TypeBoundWhereClauseItem::TypeBoundWhereClauseItem (
+ TypeBoundWhereClauseItem const &other)
+ : for_lifetimes (other.for_lifetimes),
+ bound_type (other.bound_type->clone_type ()), mappings (other.mappings)
+{
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+}
+
+TypeBoundWhereClauseItem &
+TypeBoundWhereClauseItem::operator= (TypeBoundWhereClauseItem const &other)
+{
+ mappings = other.mappings;
+ for_lifetimes = other.for_lifetimes;
+ bound_type = other.bound_type->clone_type ();
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+
+ return *this;
+}
+
+std::vector<std::unique_ptr<TypeParamBound>> &
+TypeBoundWhereClauseItem::get_type_param_bounds ()
+{
+ return type_param_bounds;
+}
+
+SelfParam::SelfParam (Analysis::NodeMapping mappings,
+ ImplicitSelfKind self_kind, Lifetime lifetime, Type *type)
+ : self_kind (self_kind), lifetime (std::move (lifetime)), type (type),
+ mappings (mappings)
+{}
+
+SelfParam::SelfParam (Analysis::NodeMapping mappings,
+ std::unique_ptr<Type> type, bool is_mut, location_t locus)
+ : self_kind (is_mut ? ImplicitSelfKind::MUT : ImplicitSelfKind::IMM),
+ lifetime (
+ Lifetime (mappings, AST::Lifetime::LifetimeType::NAMED, "", locus)),
+ type (std::move (type)), locus (locus), mappings (mappings)
+{}
+
+SelfParam::SelfParam (Analysis::NodeMapping mappings, Lifetime lifetime,
+ bool is_mut, location_t locus)
+ : self_kind (is_mut ? ImplicitSelfKind::MUT_REF : ImplicitSelfKind::IMM_REF),
+ lifetime (std::move (lifetime)), locus (locus), mappings (mappings)
+{}
+
+SelfParam::SelfParam (SelfParam const &other)
+ : self_kind (other.self_kind), lifetime (other.lifetime), locus (other.locus),
+ mappings (other.mappings)
+{
+ if (other.type != nullptr)
+ type = other.type->clone_type ();
+}
+
+SelfParam &
+SelfParam::operator= (SelfParam const &other)
+{
+ if (other.type != nullptr)
+ type = other.type->clone_type ();
+
+ self_kind = other.self_kind;
+ lifetime = other.lifetime;
+ locus = other.locus;
+ mappings = other.mappings;
+
+ return *this;
+}
+
+Mutability
+SelfParam::get_mut () const
+{
+ return (self_kind == ImplicitSelfKind::MUT
+ || self_kind == ImplicitSelfKind::MUT_REF)
+ ? Mutability::Mut
+ : Mutability::Imm;
+}
+
+bool
+SelfParam::is_mut () const
+{
+ return self_kind == ImplicitSelfKind::MUT
+ || self_kind == ImplicitSelfKind::MUT_REF;
+}
+
+bool
+SelfParam::is_ref () const
+{
+ return self_kind == ImplicitSelfKind::IMM_REF
+ || self_kind == ImplicitSelfKind::MUT_REF;
+}
+
+FunctionParam::FunctionParam (Analysis::NodeMapping mappings,
+ std::unique_ptr<Pattern> param_name,
+ std::unique_ptr<Type> param_type,
+ location_t locus)
+ : param_name (std::move (param_name)), type (std::move (param_type)),
+ locus (locus), mappings (mappings)
+{}
+
+FunctionParam::FunctionParam (FunctionParam const &other)
+ : param_name (other.param_name->clone_pattern ()),
+ type (other.type->clone_type ()), locus (other.locus),
+ mappings (other.mappings)
+{}
+
+FunctionParam &
+FunctionParam::operator= (FunctionParam const &other)
+{
+ param_name = other.param_name->clone_pattern ();
+ type = other.type->clone_type ();
+ locus = other.locus;
+ mappings = other.mappings;
+
+ return *this;
+}
+
+VisItem &
+VisItem::operator= (VisItem const &other)
+{
+ Item::operator= (other);
+ visibility = other.visibility;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+VisItem::VisItem (VisItem const &other)
+ : Item (other), visibility (other.visibility)
+{}
+
+Module::Module (Analysis::NodeMapping mappings, Identifier module_name,
+ location_t locus, std::vector<std::unique_ptr<Item>> items,
+ Visibility visibility, AST::AttrVec inner_attrs,
+ AST::AttrVec outer_attrs)
+ : VisItem (std::move (mappings), std::move (visibility),
+ std::move (outer_attrs)),
+ WithInnerAttrs (std::move (inner_attrs)), module_name (module_name),
+ locus (locus), items (std::move (items))
+{}
+
+Module::Module (Module const &other)
+ : VisItem (other), WithInnerAttrs (other.inner_attrs), module_name ("")
+{
+ items.reserve (other.items.size ());
+ for (const auto &e : other.items)
+ items.push_back (e->clone_item ());
+}
+
+Module &
+Module::operator= (Module const &other)
+{
+ VisItem::operator= (other);
+ inner_attrs = other.inner_attrs;
+
+ items.reserve (other.items.size ());
+ for (const auto &e : other.items)
+ items.push_back (e->clone_item ());
+
+ return *this;
+}
+
+Function::Function (Analysis::NodeMapping mappings, Identifier function_name,
+ FunctionQualifiers qualifiers,
+ std::vector<std::unique_ptr<GenericParam>> generic_params,
+ std::vector<FunctionParam> function_params,
+ std::unique_ptr<Type> return_type, WhereClause where_clause,
+ std::unique_ptr<BlockExpr> function_body, Visibility vis,
+ AST::AttrVec outer_attrs, SelfParam self, location_t locus)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ qualifiers (std::move (qualifiers)),
+ function_name (std::move (function_name)),
+ generic_params (std::move (generic_params)),
+ function_params (std::move (function_params)),
+ return_type (std::move (return_type)),
+ where_clause (std::move (where_clause)),
+ function_body (std::move (function_body)), self (std::move (self)),
+ locus (locus)
+{}
+
+Function::Function (Function const &other)
+ : VisItem (other), qualifiers (other.qualifiers),
+ function_name (other.function_name),
+ function_params (other.function_params), where_clause (other.where_clause),
+ function_body (other.function_body->clone_block_expr ()), self (other.self),
+ locus (other.locus)
+{
+ // guard to prevent null dereference (always required)
+ if (other.return_type != nullptr)
+ return_type = other.return_type->clone_type ();
+ else
+ return_type = nullptr;
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+}
+
+Function &
+Function::operator= (Function const &other)
+{
+ VisItem::operator= (other);
+ function_name = other.function_name;
+ qualifiers = other.qualifiers;
+ function_params = other.function_params;
+
+ // guard to prevent null dereference (always required)
+ if (other.return_type != nullptr)
+ return_type = other.return_type->clone_type ();
+ else
+ return_type = nullptr;
+
+ where_clause = other.where_clause;
+ function_body = other.function_body->clone_block_expr ();
+ locus = other.locus;
+ self = other.self;
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ return *this;
+}
+
+TypeAlias::TypeAlias (Analysis::NodeMapping mappings, Identifier new_type_name,
+ std::vector<std::unique_ptr<GenericParam>> generic_params,
+ WhereClause where_clause,
+ std::unique_ptr<Type> existing_type, Visibility vis,
+ AST::AttrVec outer_attrs, location_t locus)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ new_type_name (std::move (new_type_name)),
+ generic_params (std::move (generic_params)),
+ where_clause (std::move (where_clause)),
+ existing_type (std::move (existing_type)), locus (locus)
+{}
+
+TypeAlias::TypeAlias (TypeAlias const &other)
+ : VisItem (other), new_type_name (other.new_type_name),
+ where_clause (other.where_clause),
+ existing_type (other.existing_type->clone_type ()), locus (other.locus)
+{
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+}
+
+TypeAlias &
+TypeAlias::operator= (TypeAlias const &other)
+{
+ VisItem::operator= (other);
+ new_type_name = other.new_type_name;
+ where_clause = other.where_clause;
+ existing_type = other.existing_type->clone_type ();
+ locus = other.locus;
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ return *this;
+}
+
+StructField::StructField (Analysis::NodeMapping mappings, Identifier field_name,
+ std::unique_ptr<Type> field_type, Visibility vis,
+ location_t locus, AST::AttrVec outer_attrs)
+ : outer_attrs (std::move (outer_attrs)), visibility (std::move (vis)),
+ field_name (std::move (field_name)), field_type (std::move (field_type)),
+ mappings (mappings), locus (locus)
+{}
+
+StructField::StructField (StructField const &other)
+ : outer_attrs (other.outer_attrs), visibility (other.visibility),
+ field_name (other.field_name), field_type (other.field_type->clone_type ()),
+ mappings (other.mappings)
+{}
+
+StructField &
+StructField::operator= (StructField const &other)
+{
+ field_name = other.field_name;
+ field_type = other.field_type->clone_type ();
+ visibility = other.visibility;
+ outer_attrs = other.outer_attrs;
+ mappings = other.mappings;
+
+ return *this;
+}
+
+TupleField::TupleField (Analysis::NodeMapping mapping,
+ std::unique_ptr<Type> field_type, Visibility vis,
+ location_t locus, AST::AttrVec outer_attrs)
+ : outer_attrs (std::move (outer_attrs)), visibility (std::move (vis)),
+ field_type (std::move (field_type)), locus (locus), mappings (mapping)
+{}
+
+TupleField::TupleField (TupleField const &other)
+ : outer_attrs (other.outer_attrs), visibility (other.visibility),
+ field_type (other.field_type->clone_type ()), locus (other.locus),
+ mappings (other.mappings)
+{}
+
+TupleField &
+TupleField::operator= (TupleField const &other)
+{
+ field_type = other.field_type->clone_type ();
+ visibility = other.visibility;
+ outer_attrs = other.outer_attrs;
+ locus = other.locus;
+ mappings = other.mappings;
+
+ return *this;
+}
+
+TupleStruct::TupleStruct (
+ Analysis::NodeMapping mappings, std::vector<TupleField> fields,
+ Identifier struct_name,
+ std::vector<std::unique_ptr<GenericParam>> generic_params,
+ WhereClause where_clause, Visibility vis, AST::AttrVec outer_attrs,
+ location_t locus)
+ : Struct (std::move (mappings), std::move (struct_name),
+ std::move (generic_params), std::move (where_clause),
+ std::move (vis), locus, std::move (outer_attrs)),
+ fields (std::move (fields))
+{}
+
+EnumItem::EnumItem (Analysis::NodeMapping mappings, Identifier variant_name,
+ AST::AttrVec outer_attrs, location_t locus)
+ : Item (std::move (mappings), std::move (outer_attrs)),
+ variant_name (std::move (variant_name)), locus (locus)
+{}
+
+EnumItemTuple::EnumItemTuple (Analysis::NodeMapping mappings,
+ Identifier variant_name,
+ std::vector<TupleField> tuple_fields,
+ AST::AttrVec outer_attrs, location_t locus)
+ : EnumItem (std::move (mappings), std::move (variant_name),
+ std::move (outer_attrs), locus),
+ tuple_fields (std::move (tuple_fields))
+{}
+
+EnumItemStruct::EnumItemStruct (Analysis::NodeMapping mappings,
+ Identifier variant_name,
+ std::vector<StructField> struct_fields,
+ AST::AttrVec outer_attrs, location_t locus)
+ : EnumItem (std::move (mappings), std::move (variant_name),
+ std::move (outer_attrs), locus),
+ struct_fields (std::move (struct_fields))
+{}
+
+EnumItemDiscriminant::EnumItemDiscriminant (Analysis::NodeMapping mappings,
+ Identifier variant_name,
+ std::unique_ptr<Expr> expr,
+ AST::AttrVec outer_attrs,
+ location_t locus)
+ : EnumItem (std::move (mappings), std::move (variant_name),
+ std::move (outer_attrs), locus),
+ expression (std::move (expr))
+{}
+
+EnumItemDiscriminant::EnumItemDiscriminant (EnumItemDiscriminant const &other)
+ : EnumItem (other), expression (other.expression->clone_expr ())
+{}
+
+EnumItemDiscriminant &
+EnumItemDiscriminant::operator= (EnumItemDiscriminant const &other)
+{
+ EnumItem::operator= (other);
+ expression = other.expression->clone_expr ();
+ // variant_name = other.variant_name;
+ // outer_attrs = other.outer_attrs;
+
+ return *this;
+}
+
+Enum::Enum (Analysis::NodeMapping mappings, Identifier enum_name,
+ Visibility vis,
+ std::vector<std::unique_ptr<GenericParam>> generic_params,
+ WhereClause where_clause,
+ std::vector<std::unique_ptr<EnumItem>> items,
+ AST::AttrVec outer_attrs, location_t locus)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ enum_name (std::move (enum_name)),
+ generic_params (std::move (generic_params)),
+ where_clause (std::move (where_clause)), items (std::move (items)),
+ locus (locus)
+{}
+
+Enum::Enum (Enum const &other)
+ : VisItem (other), enum_name (other.enum_name),
+ where_clause (other.where_clause), locus (other.locus)
+{
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ items.reserve (other.items.size ());
+ for (const auto &e : other.items)
+ items.push_back (e->clone_enum_item ());
+}
+
+Enum &
+Enum::operator= (Enum const &other)
+{
+ VisItem::operator= (other);
+ enum_name = other.enum_name;
+ where_clause = other.where_clause;
+ locus = other.locus;
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ items.reserve (other.items.size ());
+ for (const auto &e : other.items)
+ items.push_back (e->clone_enum_item ());
+
+ return *this;
+}
+
+Union::Union (Analysis::NodeMapping mappings, Identifier union_name,
+ Visibility vis,
+ std::vector<std::unique_ptr<GenericParam>> generic_params,
+ WhereClause where_clause, std::vector<StructField> variants,
+ AST::AttrVec outer_attrs, location_t locus)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ union_name (std::move (union_name)),
+ generic_params (std::move (generic_params)),
+ where_clause (std::move (where_clause)), variants (std::move (variants)),
+ locus (locus)
+{}
+
+Union::Union (Union const &other)
+ : VisItem (other), union_name (other.union_name),
+ where_clause (other.where_clause), variants (other.variants),
+ locus (other.locus)
+{
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+}
+
+Union &
+Union::operator= (Union const &other)
+{
+ VisItem::operator= (other);
+ union_name = other.union_name;
+ where_clause = other.where_clause;
+ variants = other.variants;
+ locus = other.locus;
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ return *this;
+}
+
+ConstantItem::ConstantItem (Analysis::NodeMapping mappings, Identifier ident,
+ Visibility vis, std::unique_ptr<Type> type,
+ std::unique_ptr<Expr> const_expr,
+ AST::AttrVec outer_attrs, location_t locus)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ identifier (std::move (ident)), type (std::move (type)),
+ const_expr (std::move (const_expr)), locus (locus)
+{}
+
+ConstantItem::ConstantItem (ConstantItem const &other)
+ : VisItem (other), identifier (other.identifier),
+ type (other.type->clone_type ()),
+ const_expr (other.const_expr->clone_expr ()), locus (other.locus)
+{}
+
+ConstantItem &
+ConstantItem::operator= (ConstantItem const &other)
+{
+ VisItem::operator= (other);
+ identifier = other.identifier;
+ type = other.type->clone_type ();
+ const_expr = other.const_expr->clone_expr ();
+ locus = other.locus;
+
+ return *this;
+}
+
+StaticItem::StaticItem (Analysis::NodeMapping mappings, Identifier name,
+ Mutability mut, std::unique_ptr<Type> type,
+ std::unique_ptr<Expr> expr, Visibility vis,
+ AST::AttrVec outer_attrs, location_t locus)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ mut (mut), name (std::move (name)), type (std::move (type)),
+ expr (std::move (expr)), locus (locus)
+{}
+
+StaticItem::StaticItem (StaticItem const &other)
+ : VisItem (other), mut (other.mut), name (other.name),
+ type (other.type->clone_type ()), expr (other.expr->clone_expr ()),
+ locus (other.locus)
+{}
+
+StaticItem &
+StaticItem::operator= (StaticItem const &other)
+{
+ VisItem::operator= (other);
+ name = other.name;
+ mut = other.mut;
+ type = other.type->clone_type ();
+ expr = other.expr->clone_expr ();
+ locus = other.locus;
+
+ return *this;
+}
+
+TraitFunctionDecl::TraitFunctionDecl (
+ Identifier function_name, FunctionQualifiers qualifiers,
+ std::vector<std::unique_ptr<GenericParam>> generic_params, SelfParam self,
+ std::vector<FunctionParam> function_params, std::unique_ptr<Type> return_type,
+ WhereClause where_clause)
+ : qualifiers (std::move (qualifiers)),
+ function_name (std::move (function_name)),
+ generic_params (std::move (generic_params)),
+ function_params (std::move (function_params)),
+ return_type (std::move (return_type)),
+ where_clause (std::move (where_clause)), self (std::move (self))
+{}
+
+TraitFunctionDecl::TraitFunctionDecl (TraitFunctionDecl const &other)
+ : qualifiers (other.qualifiers), function_name (other.function_name),
+ function_params (other.function_params),
+ return_type (other.return_type->clone_type ()),
+ where_clause (other.where_clause), self (other.self)
+{
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+}
+
+TraitFunctionDecl &
+TraitFunctionDecl::operator= (TraitFunctionDecl const &other)
+{
+ function_name = other.function_name;
+ qualifiers = other.qualifiers;
+ function_params = other.function_params;
+ return_type = other.return_type->clone_type ();
+ where_clause = other.where_clause;
+ self = other.self;
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ return *this;
+}
+
+TraitItemFunc::TraitItemFunc (Analysis::NodeMapping mappings,
+ TraitFunctionDecl decl,
+ std::unique_ptr<BlockExpr> block_expr,
+ AST::AttrVec outer_attrs, location_t locus)
+ : TraitItem (mappings), outer_attrs (std::move (outer_attrs)),
+ decl (std::move (decl)), block_expr (std::move (block_expr)), locus (locus)
+{}
+
+TraitItemFunc::TraitItemFunc (TraitItemFunc const &other)
+ : TraitItem (other.mappings), outer_attrs (other.outer_attrs),
+ decl (other.decl), locus (other.locus)
+{
+ if (other.block_expr != nullptr)
+ block_expr = other.block_expr->clone_block_expr ();
+}
+
+TraitItemFunc &
+TraitItemFunc::operator= (TraitItemFunc const &other)
+{
+ TraitItem::operator= (other);
+ outer_attrs = other.outer_attrs;
+ decl = other.decl;
+ locus = other.locus;
+ mappings = other.mappings;
+ if (other.block_expr != nullptr)
+ block_expr = other.block_expr->clone_block_expr ();
+
+ return *this;
+}
+
+TraitItemConst::TraitItemConst (Analysis::NodeMapping mappings, Identifier name,
+ std::unique_ptr<Type> type,
+ std::unique_ptr<Expr> expr,
+ AST::AttrVec outer_attrs, location_t locus)
+ : TraitItem (mappings), outer_attrs (std::move (outer_attrs)),
+ name (std::move (name)), type (std::move (type)), expr (std::move (expr)),
+ locus (locus)
+{}
+
+TraitItemConst::TraitItemConst (TraitItemConst const &other)
+ : TraitItem (other.mappings), outer_attrs (other.outer_attrs),
+ name (other.name), type (other.type->clone_type ()),
+ expr (other.expr->clone_expr ()), locus (other.locus)
+{}
+
+TraitItemConst &
+TraitItemConst::operator= (TraitItemConst const &other)
+{
+ TraitItem::operator= (other);
+ outer_attrs = other.outer_attrs;
+ name = other.name;
+ type = other.type->clone_type ();
+ expr = other.expr->clone_expr ();
+ locus = other.locus;
+ mappings = other.mappings;
+
+ return *this;
+}
+
+TraitItemType::TraitItemType (
+ Analysis::NodeMapping mappings, Identifier name,
+ std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
+ AST::AttrVec outer_attrs, location_t locus)
+ : TraitItem (mappings), outer_attrs (std::move (outer_attrs)),
+ name (std::move (name)), type_param_bounds (std::move (type_param_bounds)),
+ locus (locus)
+{}
+
+TraitItemType::TraitItemType (TraitItemType const &other)
+ : TraitItem (other.mappings), outer_attrs (other.outer_attrs),
+ name (other.name), locus (other.locus)
+{
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+}
+
+TraitItemType &
+TraitItemType::operator= (TraitItemType const &other)
+{
+ TraitItem::operator= (other);
+ outer_attrs = other.outer_attrs;
+ name = other.name;
+ locus = other.locus;
+ mappings = other.mappings;
+
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+
+ return *this;
+}
+
+Trait::Trait (Analysis::NodeMapping mappings, Identifier name,
+ Unsafety unsafety,
+ std::vector<std::unique_ptr<GenericParam>> generic_params,
+ std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
+ WhereClause where_clause,
+ std::vector<std::unique_ptr<TraitItem>> trait_items,
+ Visibility vis, AST::AttrVec outer_attrs, location_t locus)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ unsafety (unsafety), name (std::move (name)),
+ generic_params (std::move (generic_params)),
+ type_param_bounds (std::move (type_param_bounds)),
+ where_clause (std::move (where_clause)),
+ trait_items (std::move (trait_items)), locus (locus)
+{}
+
+Trait::Trait (Trait const &other)
+ : VisItem (other), unsafety (other.unsafety), name (other.name),
+ where_clause (other.where_clause), locus (other.locus)
+{
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+
+ trait_items.reserve (other.trait_items.size ());
+ for (const auto &e : other.trait_items)
+ trait_items.push_back (e->clone_trait_item ());
+}
+
+Trait &
+Trait::operator= (Trait const &other)
+{
+ VisItem::operator= (other);
+ name = other.name;
+ unsafety = other.unsafety;
+ where_clause = other.where_clause;
+ locus = other.locus;
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+
+ trait_items.reserve (other.trait_items.size ());
+ for (const auto &e : other.trait_items)
+ trait_items.push_back (e->clone_trait_item ());
+
+ return *this;
+}
+
+ImplBlock::ImplBlock (Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<ImplItem>> impl_items,
+ std::vector<std::unique_ptr<GenericParam>> generic_params,
+ std::unique_ptr<Type> impl_type,
+ std::unique_ptr<TypePath> trait_ref,
+ WhereClause where_clause, BoundPolarity polarity,
+ Visibility vis, AST::AttrVec inner_attrs,
+ AST::AttrVec outer_attrs, location_t locus, bool unsafe)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ WithInnerAttrs (std::move (inner_attrs)),
+ generic_params (std::move (generic_params)),
+ impl_type (std::move (impl_type)), trait_ref (std::move (trait_ref)),
+ where_clause (std::move (where_clause)), polarity (polarity), locus (locus),
+ impl_items (std::move (impl_items)), unsafe (unsafe)
+{}
+
+ImplBlock::ImplBlock (ImplBlock const &other)
+ : VisItem (other), WithInnerAttrs (other.inner_attrs),
+ impl_type (other.impl_type->clone_type ()),
+ where_clause (other.where_clause), polarity (other.polarity),
+ locus (other.locus), unsafe (other.unsafe)
+{
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ impl_items.reserve (other.impl_items.size ());
+ for (const auto &e : other.impl_items)
+ impl_items.push_back (e->clone_inherent_impl_item ());
+}
+
+ImplBlock &
+ImplBlock::operator= (ImplBlock const &other)
+{
+ VisItem::operator= (other);
+ impl_type = other.impl_type->clone_type ();
+ where_clause = other.where_clause;
+ polarity = other.polarity;
+ inner_attrs = other.inner_attrs;
+ locus = other.locus;
+ unsafe = other.unsafe;
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ impl_items.reserve (other.impl_items.size ());
+ for (const auto &e : other.impl_items)
+ impl_items.push_back (e->clone_inherent_impl_item ());
+
+ return *this;
+}
+
+ExternalItem::ExternalItem (Analysis::NodeMapping mappings,
+ Identifier item_name, Visibility vis,
+ AST::AttrVec outer_attrs, location_t locus)
+ : mappings (mappings), outer_attrs (std::move (outer_attrs)),
+ visibility (std::move (vis)), item_name (std::move (item_name)),
+ locus (locus)
+{}
+
+ExternalItem::ExternalItem (ExternalItem const &other)
+ : mappings (other.mappings), outer_attrs (other.outer_attrs),
+ visibility (other.visibility), item_name (other.item_name),
+ locus (other.locus)
+{}
+
+ExternalItem &
+ExternalItem::operator= (ExternalItem const &other)
+{
+ mappings = other.mappings;
+ item_name = other.item_name;
+ visibility = other.visibility;
+ outer_attrs = other.outer_attrs;
+ locus = other.locus;
+
+ return *this;
+}
+
+ExternalStaticItem::ExternalStaticItem (Analysis::NodeMapping mappings,
+ Identifier item_name,
+ std::unique_ptr<Type> item_type,
+ Mutability mut, Visibility vis,
+ AST::AttrVec outer_attrs,
+ location_t locus)
+ : ExternalItem (std::move (mappings), std::move (item_name), std::move (vis),
+ std::move (outer_attrs), locus),
+ mut (mut), item_type (std::move (item_type))
+{}
+
+ExternalStaticItem::ExternalStaticItem (ExternalStaticItem const &other)
+ : ExternalItem (other), mut (other.mut),
+ item_type (other.item_type->clone_type ())
+{}
+
+ExternalStaticItem &
+ExternalStaticItem::operator= (ExternalStaticItem const &other)
+{
+ ExternalItem::operator= (other);
+ item_type = other.item_type->clone_type ();
+ mut = other.mut;
+
+ return *this;
+}
+
+NamedFunctionParam::NamedFunctionParam (Analysis::NodeMapping mappings,
+ Identifier name,
+ std::unique_ptr<Type> param_type)
+ : name (std::move (name)), param_type (std::move (param_type)),
+ mappings (std::move (mappings))
+{}
+
+NamedFunctionParam::NamedFunctionParam (NamedFunctionParam const &other)
+ : name (other.name), param_type (other.param_type->clone_type ()),
+ mappings (other.mappings)
+{}
+
+NamedFunctionParam &
+NamedFunctionParam::operator= (NamedFunctionParam const &other)
+{
+ mappings = other.mappings;
+ name = other.name;
+ param_type = other.param_type->clone_type ();
+ // has_name = other.has_name;
+
+ return *this;
+}
+
+ExternalFunctionItem::ExternalFunctionItem (
+ Analysis::NodeMapping mappings, Identifier item_name,
+ std::vector<std::unique_ptr<GenericParam>> generic_params,
+ std::unique_ptr<Type> return_type, WhereClause where_clause,
+ std::vector<NamedFunctionParam> function_params, bool has_variadics,
+ Visibility vis, AST::AttrVec outer_attrs, location_t locus)
+ : ExternalItem (std::move (mappings), std::move (item_name), std::move (vis),
+ std::move (outer_attrs), locus),
+ generic_params (std::move (generic_params)),
+ return_type (std::move (return_type)),
+ where_clause (std::move (where_clause)),
+ function_params (std::move (function_params)), has_variadics (has_variadics)
+{}
+
+ExternalFunctionItem::ExternalFunctionItem (ExternalFunctionItem const &other)
+ : ExternalItem (other), where_clause (other.where_clause),
+ function_params (other.function_params), has_variadics (other.has_variadics)
+{
+ if (other.return_type)
+ return_type = other.return_type->clone_type ();
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+}
+
+ExternalFunctionItem &
+ExternalFunctionItem::operator= (ExternalFunctionItem const &other)
+{
+ ExternalItem::operator= (other);
+
+ where_clause = other.where_clause;
+ function_params = other.function_params;
+ has_variadics = other.has_variadics;
+
+ if (other.return_type)
+ return_type = other.return_type->clone_type ();
+
+ generic_params.reserve (other.generic_params.size ());
+ for (const auto &e : other.generic_params)
+ generic_params.push_back (e->clone_generic_param ());
+
+ return *this;
+}
+
+ExternalTypeItem::ExternalTypeItem (Analysis::NodeMapping mappings,
+ Identifier item_name, Visibility vis,
+ location_t locus)
+ : ExternalItem (std::move (mappings), std::move (item_name),
+ Visibility (std::move (vis)),
+ /* FIXME: Is that correct? */
+ {}, locus)
+{}
+
+ExternalTypeItem::ExternalTypeItem (ExternalTypeItem const &other)
+ : ExternalItem (other)
+{}
+
+ExternBlock::ExternBlock (
+ Analysis::NodeMapping mappings, ABI abi,
+ std::vector<std::unique_ptr<ExternalItem>> extern_items, Visibility vis,
+ AST::AttrVec inner_attrs, AST::AttrVec outer_attrs, location_t locus)
+ : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
+ WithInnerAttrs (std::move (inner_attrs)), abi (abi),
+ extern_items (std::move (extern_items)), locus (locus)
+{}
+
+ExternBlock::ExternBlock (ExternBlock const &other)
+ : VisItem (other), WithInnerAttrs (other.inner_attrs), abi (other.abi),
+ locus (other.locus)
+{
+ extern_items.reserve (other.extern_items.size ());
+ for (const auto &e : other.extern_items)
+ extern_items.push_back (e->clone_external_item ());
+}
+
+ExternBlock &
+ExternBlock::operator= (ExternBlock const &other)
+{
+ VisItem::operator= (other);
+ abi = other.abi;
+ inner_attrs = other.inner_attrs;
+ locus = other.locus;
+
+ extern_items.reserve (other.extern_items.size ());
+ for (const auto &e : other.extern_items)
+ extern_items.push_back (e->clone_external_item ());
+
+ return *this;
+}
+
+} // namespace HIR
+} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-item.h b/gcc/rust/hir/tree/rust-hir-item.h
index 1f53e85..4744717 100644
--- a/gcc/rust/hir/tree/rust-hir-item.h
+++ b/gcc/rust/hir/tree/rust-hir-item.h
@@ -19,18 +19,77 @@
#ifndef RUST_HIR_ITEM_H
#define RUST_HIR_ITEM_H
+#include "optional.h"
#include "rust-abi.h"
-#include "rust-ast-full-decls.h"
+#include "rust-hir-stmt.h"
#include "rust-common.h"
-#include "rust-hir-expr.h"
-#include "rust-hir.h"
-#include "rust-hir-path.h"
+#include "rust-hir-visibility.h"
+#include "rust-hir-generic-param.h"
+#include "rust-system.h"
namespace Rust {
namespace HIR {
-// forward decls
-class BlockExpr;
-class TypePath;
+
+// Rust "item" HIR node (declaration of top-level/module-level allowed stuff)
+class Item : public Stmt, public WithOuterAttrs
+{
+ // TODO: should outer attrs be defined here or in each derived class?
+public:
+ enum class ItemKind
+ {
+ Static,
+ Constant,
+ TypeAlias,
+ Function,
+ UseDeclaration,
+ ExternBlock,
+ ExternCrate,
+ Struct,
+ Union,
+ Enum,
+ EnumItem, // FIXME: ARTHUR: Do we need that?
+ Trait,
+ Impl,
+ Module,
+ };
+
+ static std::string item_kind_string (ItemKind kind);
+
+ virtual ItemKind get_item_kind () const = 0;
+
+ // Unique pointer custom clone function
+ std::unique_ptr<Item> clone_item () const
+ {
+ return std::unique_ptr<Item> (clone_item_impl ());
+ }
+
+ BaseKind get_hir_kind () override { return Node::BaseKind::ITEM; }
+
+ std::string as_string () const override;
+
+ /* Adds crate names to the vector passed by reference, if it can
+ * (polymorphism). */
+ virtual void
+ add_crate_name (std::vector<std::string> &names ATTRIBUTE_UNUSED) const
+ {}
+
+ bool is_item () const override final { return true; }
+
+protected:
+ // Constructor
+ Item (Analysis::NodeMapping mappings,
+ AST::AttrVec outer_attribs = AST::AttrVec ())
+ : Stmt (std::move (mappings)), WithOuterAttrs (std::move (outer_attribs))
+ {}
+
+ // Clone function implementation as pure virtual method
+ virtual Item *clone_item_impl () const = 0;
+
+ /* Save having to specify two clone methods in derived classes by making
+ * statement clone return item clone. Hopefully won't affect performance too
+ * much. */
+ Item *clone_stmt_impl () const override { return clone_item_impl (); }
+};
// A type generic parameter (as opposed to a lifetime generic parameter)
class TypeParam : public GenericParam
@@ -44,14 +103,13 @@ class TypeParam : public GenericParam
std::vector<std::unique_ptr<TypeParamBound>>
type_param_bounds; // inlined form
- // bool has_type;
- std::unique_ptr<Type> type;
+ tl::optional<std::unique_ptr<Type>> type;
location_t locus;
public:
// Returns whether the type of the type param has been specified.
- bool has_type () const { return type != nullptr; }
+ bool has_type () const { return type.has_value (); }
// Returns whether the type param has type param bounds.
bool has_type_param_bounds () const { return !type_param_bounds.empty (); }
@@ -64,50 +122,18 @@ public:
location_t locus = UNDEF_LOCATION,
std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds
= std::vector<std::unique_ptr<TypeParamBound>> (),
- std::unique_ptr<Type> type = nullptr,
- AST::AttrVec outer_attrs = std::vector<AST::Attribute> ())
- : GenericParam (mappings), outer_attrs (std::move (outer_attrs)),
- type_representation (std::move (type_representation)),
- type_param_bounds (std::move (type_param_bounds)),
- type (std::move (type)), locus (locus)
- {}
+ tl::optional<std::unique_ptr<Type>> type = tl::nullopt,
+ AST::AttrVec outer_attrs = std::vector<AST::Attribute> ());
// Copy constructor uses clone
- TypeParam (TypeParam const &other)
- : GenericParam (other.mappings), outer_attrs (other.outer_attrs),
- type_representation (other.type_representation), locus (other.locus)
- {
- // guard to prevent null pointer dereference
- if (other.type != nullptr)
- type = other.type->clone_type ();
-
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
- }
+ TypeParam (TypeParam const &other);
// Overloaded assignment operator to clone
- TypeParam &operator= (TypeParam const &other)
- {
- type_representation = other.type_representation;
- outer_attrs = other.outer_attrs;
- locus = other.locus;
- mappings = other.mappings;
-
- // guard to prevent null pointer dereference
- if (other.type != nullptr)
- type = other.type->clone_type ();
- else
- type = nullptr;
+ TypeParam &operator= (TypeParam const &other);
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
-
- return *this;
- }
// move constructors
TypeParam (TypeParam &&other) = default;
+
TypeParam &operator= (TypeParam &&other) = default;
std::string as_string () const override;
@@ -118,18 +144,15 @@ public:
Identifier get_type_representation () const { return type_representation; }
- std::unique_ptr<Type> &get_type () { return type; }
-
- Analysis::NodeMapping get_type_mappings () const
+ Type &get_type ()
{
- rust_assert (type != nullptr);
- return type->get_mappings ();
+ rust_assert (*type);
+ return *type.value ();
}
- std::vector<std::unique_ptr<TypeParamBound>> &get_type_param_bounds ()
- {
- return type_param_bounds;
- }
+ Analysis::NodeMapping get_type_mappings () const;
+
+ std::vector<std::unique_ptr<TypeParamBound>> &get_type_param_bounds ();
protected:
// Clone function implementation as (not pure) virtual method
@@ -234,35 +257,13 @@ public:
Analysis::NodeMapping mappings, std::vector<LifetimeParam> for_lifetimes,
std::unique_ptr<Type> bound_type,
std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
- location_t locus)
- : for_lifetimes (std::move (for_lifetimes)),
- bound_type (std::move (bound_type)),
- type_param_bounds (std::move (type_param_bounds)),
- mappings (std::move (mappings)), locus (locus)
- {}
+ location_t locus);
// Copy constructor requires clone
- TypeBoundWhereClauseItem (TypeBoundWhereClauseItem const &other)
- : for_lifetimes (other.for_lifetimes),
- bound_type (other.bound_type->clone_type ()), mappings (other.mappings)
- {
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
- }
+ TypeBoundWhereClauseItem (TypeBoundWhereClauseItem const &other);
// Overload assignment operator to clone
- TypeBoundWhereClauseItem &operator= (TypeBoundWhereClauseItem const &other)
- {
- mappings = other.mappings;
- for_lifetimes = other.for_lifetimes;
- bound_type = other.bound_type->clone_type ();
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
-
- return *this;
- }
+ TypeBoundWhereClauseItem &operator= (TypeBoundWhereClauseItem const &other);
// move constructors
TypeBoundWhereClauseItem (TypeBoundWhereClauseItem &&other) = default;
@@ -277,12 +278,9 @@ public:
std::vector<LifetimeParam> &get_for_lifetimes () { return for_lifetimes; }
- std::unique_ptr<Type> &get_bound_type () { return bound_type; }
+ Type &get_bound_type () { return *bound_type; }
- std::vector<std::unique_ptr<TypeParamBound>> &get_type_param_bounds ()
- {
- return type_param_bounds;
- }
+ std::vector<std::unique_ptr<TypeParamBound>> &get_type_param_bounds ();
Analysis::NodeMapping get_mappings () const override final
{
@@ -379,51 +377,22 @@ private:
Analysis::NodeMapping mappings;
SelfParam (Analysis::NodeMapping mappings, ImplicitSelfKind self_kind,
- Lifetime lifetime, Type *type)
- : self_kind (self_kind), lifetime (std::move (lifetime)), type (type),
- mappings (mappings)
- {}
+ Lifetime lifetime, Type *type);
public:
// Type-based self parameter (not ref, no lifetime)
SelfParam (Analysis::NodeMapping mappings, std::unique_ptr<Type> type,
- bool is_mut, location_t locus)
- : self_kind (is_mut ? ImplicitSelfKind::MUT : ImplicitSelfKind::IMM),
- lifetime (
- Lifetime (mappings, AST::Lifetime::LifetimeType::NAMED, "", locus)),
- type (std::move (type)), locus (locus), mappings (mappings)
- {}
+ bool is_mut, location_t locus);
// Lifetime-based self parameter (is ref, no type)
SelfParam (Analysis::NodeMapping mappings, Lifetime lifetime, bool is_mut,
- location_t locus)
- : self_kind (is_mut ? ImplicitSelfKind::MUT_REF
- : ImplicitSelfKind::IMM_REF),
- lifetime (std::move (lifetime)), locus (locus), mappings (mappings)
- {}
+ location_t locus);
// Copy constructor requires clone
- SelfParam (SelfParam const &other)
- : self_kind (other.self_kind), lifetime (other.lifetime),
- locus (other.locus), mappings (other.mappings)
- {
- if (other.type != nullptr)
- type = other.type->clone_type ();
- }
+ SelfParam (SelfParam const &other);
// Overload assignment operator to use clone
- SelfParam &operator= (SelfParam const &other)
- {
- if (other.type != nullptr)
- type = other.type->clone_type ();
-
- self_kind = other.self_kind;
- lifetime = other.lifetime;
- locus = other.locus;
- mappings = other.mappings;
-
- return *this;
- }
+ SelfParam &operator= (SelfParam const &other);
// move constructors
SelfParam (SelfParam &&other) = default;
@@ -452,29 +421,19 @@ public:
ImplicitSelfKind get_self_kind () const { return self_kind; }
- std::unique_ptr<Type> &get_type () { return type; }
+ Type &get_type ()
+ {
+ rust_assert (type);
+ return *type;
+ }
Analysis::NodeMapping get_mappings () { return mappings; }
- Mutability get_mut () const
- {
- return (self_kind == ImplicitSelfKind::MUT
- || self_kind == ImplicitSelfKind::MUT_REF)
- ? Mutability::Mut
- : Mutability::Imm;
- }
+ Mutability get_mut () const;
- bool is_mut () const
- {
- return self_kind == ImplicitSelfKind::MUT
- || self_kind == ImplicitSelfKind::MUT_REF;
- }
+ bool is_mut () const;
- bool is_ref () const
- {
- return self_kind == ImplicitSelfKind::IMM_REF
- || self_kind == ImplicitSelfKind::MUT_REF;
- }
+ bool is_ref () const;
};
// Qualifiers for function, i.e. const, unsafe, extern etc.
@@ -516,28 +475,13 @@ struct FunctionParam
public:
FunctionParam (Analysis::NodeMapping mappings,
std::unique_ptr<Pattern> param_name,
- std::unique_ptr<Type> param_type, location_t locus)
- : param_name (std::move (param_name)), type (std::move (param_type)),
- locus (locus), mappings (mappings)
- {}
+ std::unique_ptr<Type> param_type, location_t locus);
// Copy constructor uses clone
- FunctionParam (FunctionParam const &other)
- : param_name (other.param_name->clone_pattern ()),
- type (other.type->clone_type ()), locus (other.locus),
- mappings (other.mappings)
- {}
+ FunctionParam (FunctionParam const &other);
// Overload assignment operator to use clone
- FunctionParam &operator= (FunctionParam const &other)
- {
- param_name = other.param_name->clone_pattern ();
- type = other.type->clone_type ();
- locus = other.locus;
- mappings = other.mappings;
-
- return *this;
- }
+ FunctionParam &operator= (FunctionParam const &other);
// move constructors
FunctionParam (FunctionParam &&other) = default;
@@ -547,63 +491,15 @@ public:
location_t get_locus () const { return locus; }
- std::unique_ptr<Pattern> &get_param_name () { return param_name; }
-
- std::unique_ptr<Type> &get_type () { return type; }
-
- const Analysis::NodeMapping &get_mappings () const { return mappings; }
-};
-
-// Visibility of an item
-struct Visibility
-{
-public:
- enum VisType
- {
- PRIVATE,
- PUBLIC,
- RESTRICTED,
- ERROR,
- };
-
-private:
- VisType vis_type;
- HIR::SimplePath path;
- location_t locus;
+ Pattern &get_param_name () { return *param_name; }
- // should this store location info?
-
-public:
- Visibility (VisType vis_type,
- HIR::SimplePath path = HIR::SimplePath::create_empty (),
- location_t locus = UNDEF_LOCATION)
- : vis_type (vis_type), path (std::move (path)), locus (locus)
- {}
-
- // Returns whether visibility is in an error state.
- bool is_error () const { return vis_type == ERROR; }
-
- // Does the current visibility refer to a simple `pub <item>` entirely public
- bool is_public () const { return vis_type == PUBLIC; }
-
- // Is the current visibility public restricted to a certain path
- bool is_restricted () const { return vis_type == RESTRICTED; }
-
- // Creates an error visibility.
- static Visibility create_error ()
+ Type &get_type ()
{
- return Visibility (ERROR, HIR::SimplePath::create_empty ());
+ rust_assert (type);
+ return *type;
}
- VisType get_vis_type () const { return vis_type; }
-
- const HIR::SimplePath &get_path () const
- {
- rust_assert (!is_error ());
- return path;
- }
-
- std::string as_string () const;
+ const Analysis::NodeMapping &get_mappings () const { return mappings; }
};
// Item that supports visibility - abstract base class
@@ -620,18 +516,10 @@ protected:
{}
// Visibility copy constructor
- VisItem (VisItem const &other) : Item (other), visibility (other.visibility)
- {}
+ VisItem (VisItem const &other);
// Overload assignment operator to clone
- VisItem &operator= (VisItem const &other)
- {
- Item::operator= (other);
- visibility = other.visibility;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ VisItem &operator= (VisItem const &other);
// move constructors
VisItem (VisItem &&other) = default;
@@ -673,34 +561,13 @@ public:
location_t locus, std::vector<std::unique_ptr<Item>> items,
Visibility visibility = Visibility::create_error (),
AST::AttrVec inner_attrs = AST::AttrVec (),
- AST::AttrVec outer_attrs = AST::AttrVec ())
- : VisItem (std::move (mappings), std::move (visibility),
- std::move (outer_attrs)),
- WithInnerAttrs (std::move (inner_attrs)), module_name (module_name),
- locus (locus), items (std::move (items))
- {}
+ AST::AttrVec outer_attrs = AST::AttrVec ());
// Copy constructor with vector clone
- Module (Module const &other)
- : VisItem (other), WithInnerAttrs (other.inner_attrs), module_name ("")
- {
- items.reserve (other.items.size ());
- for (const auto &e : other.items)
- items.push_back (e->clone_item ());
- }
+ Module (Module const &other);
// Overloaded assignment operator with vector clone
- Module &operator= (Module const &other)
- {
- VisItem::operator= (other);
- inner_attrs = other.inner_attrs;
-
- items.reserve (other.items.size ());
- for (const auto &e : other.items)
- items.push_back (e->clone_item ());
-
- return *this;
- }
+ Module &operator= (Module const &other);
// move constructors
Module (Module &&other) = default;
@@ -1056,7 +923,7 @@ public:
location_t get_locus () const override final { return locus; }
ItemKind get_item_kind () const override { return ItemKind::UseDeclaration; }
- std::unique_ptr<UseTree> &get_use_tree () { return use_tree; }
+ UseTree &get_use_tree () { return *use_tree; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
void accept_vis (HIRVisItemVisitor &vis) override;
@@ -1120,63 +987,13 @@ public:
std::vector<FunctionParam> function_params,
std::unique_ptr<Type> return_type, WhereClause where_clause,
std::unique_ptr<BlockExpr> function_body, Visibility vis,
- AST::AttrVec outer_attrs, SelfParam self, location_t locus)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- qualifiers (std::move (qualifiers)),
- function_name (std::move (function_name)),
- generic_params (std::move (generic_params)),
- function_params (std::move (function_params)),
- return_type (std::move (return_type)),
- where_clause (std::move (where_clause)),
- function_body (std::move (function_body)), self (std::move (self)),
- locus (locus)
- {}
+ AST::AttrVec outer_attrs, SelfParam self, location_t locus);
// Copy constructor with clone
- Function (Function const &other)
- : VisItem (other), qualifiers (other.qualifiers),
- function_name (other.function_name),
- function_params (other.function_params),
- where_clause (other.where_clause),
- function_body (other.function_body->clone_block_expr ()),
- self (other.self), locus (other.locus)
- {
- // guard to prevent null dereference (always required)
- if (other.return_type != nullptr)
- return_type = other.return_type->clone_type ();
- else
- return_type = nullptr;
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
- }
+ Function (Function const &other);
// Overloaded assignment operator to clone
- Function &operator= (Function const &other)
- {
- VisItem::operator= (other);
- function_name = other.function_name;
- qualifiers = other.qualifiers;
- function_params = other.function_params;
-
- // guard to prevent null dereference (always required)
- if (other.return_type != nullptr)
- return_type = other.return_type->clone_type ();
- else
- return_type = nullptr;
-
- where_clause = other.where_clause;
- function_body = other.function_body->clone_block_expr ();
- locus = other.locus;
- self = other.self;
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- return *this;
- }
+ Function &operator= (Function const &other);
// move constructors
Function (Function &&other) = default;
@@ -1210,7 +1027,7 @@ public:
}
// TODO: is this better? Or is a "vis_block" better?
- std::unique_ptr<BlockExpr> &get_definition () { return function_body; }
+ BlockExpr &get_definition () { return *function_body; }
const FunctionQualifiers &get_qualifiers () const { return qualifiers; }
@@ -1222,7 +1039,7 @@ public:
bool has_return_type () const { return return_type != nullptr; }
// TODO: is this better? Or is a "vis_block" better?
- std::unique_ptr<Type> &get_return_type () { return return_type; }
+ Type &get_return_type () { return *return_type; }
bool is_method () const { return !self.is_error (); }
@@ -1280,40 +1097,13 @@ public:
TypeAlias (Analysis::NodeMapping mappings, Identifier new_type_name,
std::vector<std::unique_ptr<GenericParam>> generic_params,
WhereClause where_clause, std::unique_ptr<Type> existing_type,
- Visibility vis, AST::AttrVec outer_attrs, location_t locus)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- new_type_name (std::move (new_type_name)),
- generic_params (std::move (generic_params)),
- where_clause (std::move (where_clause)),
- existing_type (std::move (existing_type)), locus (locus)
- {}
+ Visibility vis, AST::AttrVec outer_attrs, location_t locus);
// Copy constructor
- TypeAlias (TypeAlias const &other)
- : VisItem (other), new_type_name (other.new_type_name),
- where_clause (other.where_clause),
- existing_type (other.existing_type->clone_type ()), locus (other.locus)
- {
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
- }
+ TypeAlias (TypeAlias const &other);
// Overloaded assignment operator to clone
- TypeAlias &operator= (TypeAlias const &other)
- {
- VisItem::operator= (other);
- new_type_name = other.new_type_name;
- where_clause = other.where_clause;
- existing_type = other.existing_type->clone_type ();
- locus = other.locus;
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- return *this;
- }
+ TypeAlias &operator= (TypeAlias const &other);
// move constructors
TypeAlias (TypeAlias &&other) = default;
@@ -1337,7 +1127,11 @@ public:
WhereClause &get_where_clause () { return where_clause; }
- std::unique_ptr<Type> &get_type_aliased () { return existing_type; }
+ Type &get_type_aliased ()
+ {
+ rust_assert (existing_type);
+ return *existing_type;
+ }
Identifier get_new_type_name () const { return new_type_name; }
@@ -1468,32 +1262,15 @@ public:
StructField (Analysis::NodeMapping mappings, Identifier field_name,
std::unique_ptr<Type> field_type, Visibility vis,
- location_t locus, AST::AttrVec outer_attrs = AST::AttrVec ())
- : outer_attrs (std::move (outer_attrs)), visibility (std::move (vis)),
- field_name (std::move (field_name)), field_type (std::move (field_type)),
- mappings (mappings), locus (locus)
- {}
+ location_t locus, AST::AttrVec outer_attrs = AST::AttrVec ());
// Copy constructor
- StructField (StructField const &other)
- : outer_attrs (other.outer_attrs), visibility (other.visibility),
- field_name (other.field_name),
- field_type (other.field_type->clone_type ()), mappings (other.mappings)
- {}
+ StructField (StructField const &other);
~StructField () = default;
// Overloaded assignment operator to clone
- StructField &operator= (StructField const &other)
- {
- field_name = other.field_name;
- field_type = other.field_type->clone_type ();
- visibility = other.visibility;
- outer_attrs = other.outer_attrs;
- mappings = other.mappings;
-
- return *this;
- }
+ StructField &operator= (StructField const &other);
// move constructors
StructField (StructField &&other) = default;
@@ -1503,7 +1280,7 @@ public:
Identifier get_field_name () const { return field_name; }
- std::unique_ptr<Type> &get_field_type () { return field_type; }
+ Type &get_field_type () { return *field_type; }
Analysis::NodeMapping get_mappings () const { return mappings; }
@@ -1598,31 +1375,15 @@ public:
// Complete constructor
TupleField (Analysis::NodeMapping mapping, std::unique_ptr<Type> field_type,
Visibility vis, location_t locus,
- AST::AttrVec outer_attrs = AST::AttrVec ())
- : outer_attrs (std::move (outer_attrs)), visibility (std::move (vis)),
- field_type (std::move (field_type)), locus (locus), mappings (mapping)
- {}
+ AST::AttrVec outer_attrs = AST::AttrVec ());
// Copy constructor with clone
- TupleField (TupleField const &other)
- : outer_attrs (other.outer_attrs), visibility (other.visibility),
- field_type (other.field_type->clone_type ()), locus (other.locus),
- mappings (other.mappings)
- {}
+ TupleField (TupleField const &other);
~TupleField () = default;
// Overloaded assignment operator to clone
- TupleField &operator= (TupleField const &other)
- {
- field_type = other.field_type->clone_type ();
- visibility = other.visibility;
- outer_attrs = other.outer_attrs;
- locus = other.locus;
- mappings = other.mappings;
-
- return *this;
- }
+ TupleField &operator= (TupleField const &other);
// move constructors
TupleField (TupleField &&other) = default;
@@ -1640,7 +1401,7 @@ public:
location_t get_locus () const { return locus; }
AST::AttrVec &get_outer_attrs () { return outer_attrs; }
- std::unique_ptr<HIR::Type> &get_field_type () { return field_type; }
+ HIR::Type &get_field_type () { return *field_type; }
};
// Rust tuple declared using struct keyword HIR node
@@ -1656,12 +1417,7 @@ public:
Identifier struct_name,
std::vector<std::unique_ptr<GenericParam>> generic_params,
WhereClause where_clause, Visibility vis,
- AST::AttrVec outer_attrs, location_t locus)
- : Struct (std::move (mappings), std::move (struct_name),
- std::move (generic_params), std::move (where_clause),
- std::move (vis), locus, std::move (outer_attrs)),
- fields (std::move (fields))
- {}
+ AST::AttrVec outer_attrs, location_t locus);
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
@@ -1706,10 +1462,7 @@ public:
};
EnumItem (Analysis::NodeMapping mappings, Identifier variant_name,
- AST::AttrVec outer_attrs, location_t locus)
- : Item (std::move (mappings), std::move (outer_attrs)),
- variant_name (std::move (variant_name)), locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// Unique pointer custom clone function
std::unique_ptr<EnumItem> clone_enum_item () const
@@ -1752,11 +1505,7 @@ public:
EnumItemTuple (Analysis::NodeMapping mappings, Identifier variant_name,
std::vector<TupleField> tuple_fields, AST::AttrVec outer_attrs,
- location_t locus)
- : EnumItem (std::move (mappings), std::move (variant_name),
- std::move (outer_attrs), locus),
- tuple_fields (std::move (tuple_fields))
- {}
+ location_t locus);
std::string as_string () const override;
@@ -1790,11 +1539,7 @@ public:
EnumItemStruct (Analysis::NodeMapping mappings, Identifier variant_name,
std::vector<StructField> struct_fields,
- AST::AttrVec outer_attrs, location_t locus)
- : EnumItem (std::move (mappings), std::move (variant_name),
- std::move (outer_attrs), locus),
- struct_fields (std::move (struct_fields))
- {}
+ AST::AttrVec outer_attrs, location_t locus);
std::string as_string () const override;
@@ -1819,27 +1564,13 @@ class EnumItemDiscriminant : public EnumItem
public:
EnumItemDiscriminant (Analysis::NodeMapping mappings, Identifier variant_name,
std::unique_ptr<Expr> expr, AST::AttrVec outer_attrs,
- location_t locus)
- : EnumItem (std::move (mappings), std::move (variant_name),
- std::move (outer_attrs), locus),
- expression (std::move (expr))
- {}
+ location_t locus);
// Copy constructor with clone
- EnumItemDiscriminant (EnumItemDiscriminant const &other)
- : EnumItem (other), expression (other.expression->clone_expr ())
- {}
+ EnumItemDiscriminant (EnumItemDiscriminant const &other);
// Overloaded assignment operator to clone
- EnumItemDiscriminant &operator= (EnumItemDiscriminant const &other)
- {
- EnumItem::operator= (other);
- expression = other.expression->clone_expr ();
- // variant_name = other.variant_name;
- // outer_attrs = other.outer_attrs;
-
- return *this;
- }
+ EnumItemDiscriminant &operator= (EnumItemDiscriminant const &other);
// move constructors
EnumItemDiscriminant (EnumItemDiscriminant &&other) = default;
@@ -1855,7 +1586,12 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRStmtVisitor &vis) override;
- std::unique_ptr<Expr> &get_discriminant_expression () { return expression; }
+ Expr &get_discriminant_expression () { return *expression; }
+
+ std::unique_ptr<Expr> take_discriminant_expression ()
+ {
+ return std::move (expression);
+ }
protected:
// Clone function implementation as (not pure) virtual method
@@ -1898,48 +1634,15 @@ public:
Enum (Analysis::NodeMapping mappings, Identifier enum_name, Visibility vis,
std::vector<std::unique_ptr<GenericParam>> generic_params,
WhereClause where_clause, std::vector<std::unique_ptr<EnumItem>> items,
- AST::AttrVec outer_attrs, location_t locus)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- enum_name (std::move (enum_name)),
- generic_params (std::move (generic_params)),
- where_clause (std::move (where_clause)), items (std::move (items)),
- locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// TODO: constructor with less arguments
// Copy constructor with vector clone
- Enum (Enum const &other)
- : VisItem (other), enum_name (other.enum_name),
- where_clause (other.where_clause), locus (other.locus)
- {
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- items.reserve (other.items.size ());
- for (const auto &e : other.items)
- items.push_back (e->clone_enum_item ());
- }
+ Enum (Enum const &other);
// Overloaded assignment operator with vector clone
- Enum &operator= (Enum const &other)
- {
- VisItem::operator= (other);
- enum_name = other.enum_name;
- where_clause = other.where_clause;
- locus = other.locus;
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- items.reserve (other.items.size ());
- for (const auto &e : other.items)
- items.push_back (e->clone_enum_item ());
-
- return *this;
- }
+ Enum &operator= (Enum const &other);
// Move constructors
Enum (Enum &&other) = default;
@@ -2007,40 +1710,13 @@ public:
Union (Analysis::NodeMapping mappings, Identifier union_name, Visibility vis,
std::vector<std::unique_ptr<GenericParam>> generic_params,
WhereClause where_clause, std::vector<StructField> variants,
- AST::AttrVec outer_attrs, location_t locus)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- union_name (std::move (union_name)),
- generic_params (std::move (generic_params)),
- where_clause (std::move (where_clause)), variants (std::move (variants)),
- locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// copy constructor with vector clone
- Union (Union const &other)
- : VisItem (other), union_name (other.union_name),
- where_clause (other.where_clause), variants (other.variants),
- locus (other.locus)
- {
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
- }
+ Union (Union const &other);
// overloaded assignment operator with vector clone
- Union &operator= (Union const &other)
- {
- VisItem::operator= (other);
- union_name = other.union_name;
- where_clause = other.where_clause;
- variants = other.variants;
- locus = other.locus;
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- return *this;
- }
+ Union &operator= (Union const &other);
// move constructors
Union (Union &&other) = default;
@@ -2084,29 +1760,12 @@ public:
ConstantItem (Analysis::NodeMapping mappings, Identifier ident,
Visibility vis, std::unique_ptr<Type> type,
std::unique_ptr<Expr> const_expr, AST::AttrVec outer_attrs,
- location_t locus)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- identifier (std::move (ident)), type (std::move (type)),
- const_expr (std::move (const_expr)), locus (locus)
- {}
+ location_t locus);
- ConstantItem (ConstantItem const &other)
- : VisItem (other), identifier (other.identifier),
- type (other.type->clone_type ()),
- const_expr (other.const_expr->clone_expr ()), locus (other.locus)
- {}
+ ConstantItem (ConstantItem const &other);
// Overload assignment operator to clone
- ConstantItem &operator= (ConstantItem const &other)
- {
- VisItem::operator= (other);
- identifier = other.identifier;
- type = other.type->clone_type ();
- const_expr = other.const_expr->clone_expr ();
- locus = other.locus;
-
- return *this;
- }
+ ConstantItem &operator= (ConstantItem const &other);
// move constructors
ConstantItem (ConstantItem &&other) = default;
@@ -2126,9 +1785,13 @@ public:
void accept_vis (HIRImplVisitor &vis) override;
void accept_vis (HIRVisItemVisitor &vis) override;
- std::unique_ptr<Type> &get_type () { return type; }
+ Type &get_type ()
+ {
+ rust_assert (type);
+ return *type;
+ }
- std::unique_ptr<Expr> &get_expr () { return const_expr; }
+ Expr &get_expr () { return *const_expr; }
Identifier get_identifier () const { return identifier; }
@@ -2180,31 +1843,13 @@ public:
StaticItem (Analysis::NodeMapping mappings, Identifier name, Mutability mut,
std::unique_ptr<Type> type, std::unique_ptr<Expr> expr,
- Visibility vis, AST::AttrVec outer_attrs, location_t locus)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- mut (mut), name (std::move (name)), type (std::move (type)),
- expr (std::move (expr)), locus (locus)
- {}
+ Visibility vis, AST::AttrVec outer_attrs, location_t locus);
// Copy constructor with clone
- StaticItem (StaticItem const &other)
- : VisItem (other), mut (other.mut), name (other.name),
- type (other.type->clone_type ()), expr (other.expr->clone_expr ()),
- locus (other.locus)
- {}
+ StaticItem (StaticItem const &other);
// Overloaded assignment operator to clone
- StaticItem &operator= (StaticItem const &other)
- {
- VisItem::operator= (other);
- name = other.name;
- mut = other.mut;
- type = other.type->clone_type ();
- expr = other.expr->clone_expr ();
- locus = other.locus;
-
- return *this;
- }
+ StaticItem &operator= (StaticItem const &other);
// move constructors
StaticItem (StaticItem &&other) = default;
@@ -2222,9 +1867,17 @@ public:
bool is_mut () const { return mut == Mutability::Mut; }
- std::unique_ptr<Expr> &get_expr () { return expr; }
+ Expr &get_expr ()
+ {
+ rust_assert (expr);
+ return *expr;
+ }
- std::unique_ptr<Type> &get_type () { return type; }
+ Type &get_type ()
+ {
+ rust_assert (type);
+ return *type;
+ }
ItemKind get_item_kind () const override { return ItemKind::Static; }
@@ -2253,45 +1906,15 @@ public:
std::vector<std::unique_ptr<GenericParam>> generic_params,
SelfParam self, std::vector<FunctionParam> function_params,
std::unique_ptr<Type> return_type,
- WhereClause where_clause)
- : qualifiers (std::move (qualifiers)),
- function_name (std::move (function_name)),
- generic_params (std::move (generic_params)),
- function_params (std::move (function_params)),
- return_type (std::move (return_type)),
- where_clause (std::move (where_clause)), self (std::move (self))
- {}
+ WhereClause where_clause);
// Copy constructor with clone
- TraitFunctionDecl (TraitFunctionDecl const &other)
- : qualifiers (other.qualifiers), function_name (other.function_name),
- function_params (other.function_params),
- return_type (other.return_type->clone_type ()),
- where_clause (other.where_clause), self (other.self)
- {
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
- }
+ TraitFunctionDecl (TraitFunctionDecl const &other);
~TraitFunctionDecl () = default;
// Overloaded assignment operator with clone
- TraitFunctionDecl &operator= (TraitFunctionDecl const &other)
- {
- function_name = other.function_name;
- qualifiers = other.qualifiers;
- function_params = other.function_params;
- return_type = other.return_type->clone_type ();
- where_clause = other.where_clause;
- self = other.self;
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- return *this;
- }
+ TraitFunctionDecl &operator= (TraitFunctionDecl const &other);
// move constructors
TraitFunctionDecl (TraitFunctionDecl &&other) = default;
@@ -2324,7 +1947,7 @@ public:
return generic_params;
}
- std::unique_ptr<Type> &get_return_type () { return return_type; }
+ Type &get_return_type () { return *return_type; }
std::vector<FunctionParam> &get_function_params () { return function_params; }
@@ -2345,34 +1968,13 @@ public:
TraitItemFunc (Analysis::NodeMapping mappings, TraitFunctionDecl decl,
std::unique_ptr<BlockExpr> block_expr,
- AST::AttrVec outer_attrs, location_t locus)
- : TraitItem (mappings), outer_attrs (std::move (outer_attrs)),
- decl (std::move (decl)), block_expr (std::move (block_expr)),
- locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// Copy constructor with clone
- TraitItemFunc (TraitItemFunc const &other)
- : TraitItem (other.mappings), outer_attrs (other.outer_attrs),
- decl (other.decl), locus (other.locus)
- {
- if (other.block_expr != nullptr)
- block_expr = other.block_expr->clone_block_expr ();
- }
+ TraitItemFunc (TraitItemFunc const &other);
// Overloaded assignment operator to clone
- TraitItemFunc &operator= (TraitItemFunc const &other)
- {
- TraitItem::operator= (other);
- outer_attrs = other.outer_attrs;
- decl = other.decl;
- locus = other.locus;
- mappings = other.mappings;
- if (other.block_expr != nullptr)
- block_expr = other.block_expr->clone_block_expr ();
-
- return *this;
- }
+ TraitItemFunc &operator= (TraitItemFunc const &other);
// move constructors
TraitItemFunc (TraitItemFunc &&other) = default;
@@ -2389,9 +1991,7 @@ public:
const TraitFunctionDecl &get_decl () const { return decl; }
- bool has_block_defined () const { return block_expr != nullptr; }
-
- std::unique_ptr<BlockExpr> &get_block_expr () { return block_expr; }
+ BlockExpr &get_block_expr () { return *block_expr; }
const std::string trait_identifier () const override final
{
@@ -2434,32 +2034,13 @@ public:
TraitItemConst (Analysis::NodeMapping mappings, Identifier name,
std::unique_ptr<Type> type, std::unique_ptr<Expr> expr,
- AST::AttrVec outer_attrs, location_t locus)
- : TraitItem (mappings), outer_attrs (std::move (outer_attrs)),
- name (std::move (name)), type (std::move (type)), expr (std::move (expr)),
- locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// Copy constructor with clones
- TraitItemConst (TraitItemConst const &other)
- : TraitItem (other.mappings), outer_attrs (other.outer_attrs),
- name (other.name), type (other.type->clone_type ()),
- expr (other.expr->clone_expr ()), locus (other.locus)
- {}
+ TraitItemConst (TraitItemConst const &other);
// Overloaded assignment operator to clone
- TraitItemConst &operator= (TraitItemConst const &other)
- {
- TraitItem::operator= (other);
- outer_attrs = other.outer_attrs;
- name = other.name;
- type = other.type->clone_type ();
- expr = other.expr->clone_expr ();
- locus = other.locus;
- mappings = other.mappings;
-
- return *this;
- }
+ TraitItemConst &operator= (TraitItemConst const &other);
// move constructors
TraitItemConst (TraitItemConst &&other) = default;
@@ -2476,9 +2057,17 @@ public:
bool has_expr () const { return expr != nullptr; }
- std::unique_ptr<Type> &get_type () { return type; }
+ Type &get_type ()
+ {
+ rust_assert (type);
+ return *type;
+ }
- std::unique_ptr<Expr> &get_expr () { return expr; }
+ Expr &get_expr ()
+ {
+ rust_assert (expr);
+ return *expr;
+ }
const std::string trait_identifier () const override final
{
@@ -2522,37 +2111,13 @@ public:
TraitItemType (Analysis::NodeMapping mappings, Identifier name,
std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
- AST::AttrVec outer_attrs, location_t locus)
- : TraitItem (mappings), outer_attrs (std::move (outer_attrs)),
- name (std::move (name)),
- type_param_bounds (std::move (type_param_bounds)), locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// Copy constructor with vector clone
- TraitItemType (TraitItemType const &other)
- : TraitItem (other.mappings), outer_attrs (other.outer_attrs),
- name (other.name), locus (other.locus)
- {
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
- }
+ TraitItemType (TraitItemType const &other);
// Overloaded assignment operator with vector clone
- TraitItemType &operator= (TraitItemType const &other)
- {
- TraitItem::operator= (other);
- outer_attrs = other.outer_attrs;
- name = other.name;
- locus = other.locus;
- mappings = other.mappings;
-
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
-
- return *this;
- }
+ TraitItemType &operator= (TraitItemType const &other);
// default move constructors
TraitItemType (TraitItemType &&other) = default;
@@ -2640,56 +2205,13 @@ public:
std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
WhereClause where_clause,
std::vector<std::unique_ptr<TraitItem>> trait_items, Visibility vis,
- AST::AttrVec outer_attrs, location_t locus)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- unsafety (unsafety), name (std::move (name)),
- generic_params (std::move (generic_params)),
- type_param_bounds (std::move (type_param_bounds)),
- where_clause (std::move (where_clause)),
- trait_items (std::move (trait_items)), locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// Copy constructor with vector clone
- Trait (Trait const &other)
- : VisItem (other), unsafety (other.unsafety), name (other.name),
- where_clause (other.where_clause), locus (other.locus)
- {
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
-
- trait_items.reserve (other.trait_items.size ());
- for (const auto &e : other.trait_items)
- trait_items.push_back (e->clone_trait_item ());
- }
+ Trait (Trait const &other);
// Overloaded assignment operator with vector clone
- Trait &operator= (Trait const &other)
- {
- VisItem::operator= (other);
- name = other.name;
- unsafety = other.unsafety;
- where_clause = other.where_clause;
- locus = other.locus;
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
-
- trait_items.reserve (other.trait_items.size ());
- for (const auto &e : other.trait_items)
- trait_items.push_back (e->clone_trait_item ());
-
- return *this;
- }
+ Trait &operator= (Trait const &other);
// default move constructors
Trait (Trait &&other) = default;
@@ -2748,50 +2270,11 @@ public:
std::unique_ptr<Type> impl_type,
std::unique_ptr<TypePath> trait_ref, WhereClause where_clause,
BoundPolarity polarity, Visibility vis, AST::AttrVec inner_attrs,
- AST::AttrVec outer_attrs, location_t locus, bool unsafe = false)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- WithInnerAttrs (std::move (inner_attrs)),
- generic_params (std::move (generic_params)),
- impl_type (std::move (impl_type)), trait_ref (std::move (trait_ref)),
- where_clause (std::move (where_clause)), polarity (polarity),
- locus (locus), impl_items (std::move (impl_items)), unsafe (unsafe)
- {}
-
- ImplBlock (ImplBlock const &other)
- : VisItem (other), WithInnerAttrs (other.inner_attrs),
- impl_type (other.impl_type->clone_type ()),
- where_clause (other.where_clause), polarity (other.polarity),
- locus (other.locus), unsafe (other.unsafe)
- {
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- impl_items.reserve (other.impl_items.size ());
- for (const auto &e : other.impl_items)
- impl_items.push_back (e->clone_inherent_impl_item ());
- }
-
- ImplBlock &operator= (ImplBlock const &other)
- {
- VisItem::operator= (other);
- impl_type = other.impl_type->clone_type ();
- where_clause = other.where_clause;
- polarity = other.polarity;
- inner_attrs = other.inner_attrs;
- locus = other.locus;
- unsafe = other.unsafe;
+ AST::AttrVec outer_attrs, location_t locus, bool unsafe = false);
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
+ ImplBlock (ImplBlock const &other);
- impl_items.reserve (other.impl_items.size ());
- for (const auto &e : other.impl_items)
- impl_items.push_back (e->clone_inherent_impl_item ());
-
- return *this;
- }
+ ImplBlock &operator= (ImplBlock const &other);
ImplBlock (ImplBlock &&other) = default;
ImplBlock &operator= (ImplBlock &&other) = default;
@@ -2828,7 +2311,13 @@ public:
location_t get_locus () const override final { return locus; }
- std::unique_ptr<Type> &get_type () { return impl_type; };
+ Type &get_type ()
+ {
+ rust_assert (impl_type);
+ return *impl_type;
+ };
+
+ bool has_type () { return impl_type != nullptr; }
std::vector<std::unique_ptr<GenericParam>> &get_generic_params ()
{
@@ -2837,7 +2326,7 @@ public:
bool has_trait_ref () const { return trait_ref != nullptr; }
- std::unique_ptr<TypePath> &get_trait_ref () { return trait_ref; }
+ TypePath &get_trait_ref () { return *trait_ref; }
WhereClause &get_where_clause () { return where_clause; }
@@ -2898,30 +2387,13 @@ public:
protected:
ExternalItem (Analysis::NodeMapping mappings, Identifier item_name,
- Visibility vis, AST::AttrVec outer_attrs, location_t locus)
- : mappings (mappings), outer_attrs (std::move (outer_attrs)),
- visibility (std::move (vis)), item_name (std::move (item_name)),
- locus (locus)
- {}
+ Visibility vis, AST::AttrVec outer_attrs, location_t locus);
// Copy constructor
- ExternalItem (ExternalItem const &other)
- : mappings (other.mappings), outer_attrs (other.outer_attrs),
- visibility (other.visibility), item_name (other.item_name),
- locus (other.locus)
- {}
+ ExternalItem (ExternalItem const &other);
// Overloaded assignment operator to clone
- ExternalItem &operator= (ExternalItem const &other)
- {
- mappings = other.mappings;
- item_name = other.item_name;
- visibility = other.visibility;
- outer_attrs = other.outer_attrs;
- locus = other.locus;
-
- return *this;
- }
+ ExternalItem &operator= (ExternalItem const &other);
// move constructors
ExternalItem (ExternalItem &&other) = default;
@@ -2941,27 +2413,13 @@ public:
ExternalStaticItem (Analysis::NodeMapping mappings, Identifier item_name,
std::unique_ptr<Type> item_type, Mutability mut,
Visibility vis, AST::AttrVec outer_attrs,
- location_t locus)
- : ExternalItem (std::move (mappings), std::move (item_name),
- std::move (vis), std::move (outer_attrs), locus),
- mut (mut), item_type (std::move (item_type))
- {}
+ location_t locus);
// Copy constructor
- ExternalStaticItem (ExternalStaticItem const &other)
- : ExternalItem (other), mut (other.mut),
- item_type (other.item_type->clone_type ())
- {}
+ ExternalStaticItem (ExternalStaticItem const &other);
// Overloaded assignment operator to clone
- ExternalStaticItem &operator= (ExternalStaticItem const &other)
- {
- ExternalItem::operator= (other);
- item_type = other.item_type->clone_type ();
- mut = other.mut;
-
- return *this;
- }
+ ExternalStaticItem &operator= (ExternalStaticItem const &other);
// move constructors
ExternalStaticItem (ExternalStaticItem &&other) = default;
@@ -2976,7 +2434,7 @@ public:
Mutability get_mut () { return mut; }
- std::unique_ptr<Type> &get_item_type () { return item_type; }
+ Type &get_item_type () { return *item_type; }
ExternKind get_extern_kind () override { return ExternKind::Static; }
@@ -3001,29 +2459,15 @@ public:
bool has_name () const { return name.as_string () != "_"; }
NamedFunctionParam (Analysis::NodeMapping mappings, Identifier name,
- std::unique_ptr<Type> param_type)
- : name (std::move (name)), param_type (std::move (param_type)),
- mappings (std::move (mappings))
- {}
+ std::unique_ptr<Type> param_type);
// Copy constructor
- NamedFunctionParam (NamedFunctionParam const &other)
- : name (other.name), param_type (other.param_type->clone_type ()),
- mappings (other.mappings)
- {}
+ NamedFunctionParam (NamedFunctionParam const &other);
~NamedFunctionParam () = default;
// Overloaded assignment operator to clone
- NamedFunctionParam &operator= (NamedFunctionParam const &other)
- {
- mappings = other.mappings;
- name = other.name;
- param_type = other.param_type->clone_type ();
- // has_name = other.has_name;
-
- return *this;
- }
+ NamedFunctionParam &operator= (NamedFunctionParam const &other);
// move constructors
NamedFunctionParam (NamedFunctionParam &&other) = default;
@@ -3033,7 +2477,11 @@ public:
Identifier get_param_name () const { return name; }
- std::unique_ptr<Type> &get_type () { return param_type; }
+ Type &get_type ()
+ {
+ rust_assert (param_type);
+ return *param_type;
+ }
Analysis::NodeMapping get_mappings () const { return mappings; }
};
@@ -3075,48 +2523,13 @@ public:
std::vector<std::unique_ptr<GenericParam>> generic_params,
std::unique_ptr<Type> return_type, WhereClause where_clause,
std::vector<NamedFunctionParam> function_params, bool has_variadics,
- Visibility vis, AST::AttrVec outer_attrs, location_t locus)
- : ExternalItem (std::move (mappings), std::move (item_name),
- std::move (vis), std::move (outer_attrs), locus),
- generic_params (std::move (generic_params)),
- return_type (std::move (return_type)),
- where_clause (std::move (where_clause)),
- function_params (std::move (function_params)),
- has_variadics (has_variadics)
- {}
+ Visibility vis, AST::AttrVec outer_attrs, location_t locus);
// Copy constructor with clone
- ExternalFunctionItem (ExternalFunctionItem const &other)
- : ExternalItem (other), where_clause (other.where_clause),
- function_params (other.function_params),
- has_variadics (other.has_variadics)
- {
- if (other.return_type)
- return_type = other.return_type->clone_type ();
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
- }
+ ExternalFunctionItem (ExternalFunctionItem const &other);
// Overloaded assignment operator with clone
- ExternalFunctionItem &operator= (ExternalFunctionItem const &other)
- {
- ExternalItem::operator= (other);
-
- where_clause = other.where_clause;
- function_params = other.function_params;
- has_variadics = other.has_variadics;
-
- if (other.return_type)
- return_type = other.return_type->clone_type ();
-
- generic_params.reserve (other.generic_params.size ());
- for (const auto &e : other.generic_params)
- generic_params.push_back (e->clone_generic_param ());
-
- return *this;
- }
+ ExternalFunctionItem &operator= (ExternalFunctionItem const &other);
// move constructors
ExternalFunctionItem (ExternalFunctionItem &&other) = default;
@@ -3132,7 +2545,7 @@ public:
return generic_params;
}
- std::unique_ptr<Type> &get_return_type () { return return_type; }
+ Type &get_return_type () { return *return_type; }
std::vector<NamedFunctionParam> &get_function_params ()
{
@@ -3156,14 +2569,9 @@ class ExternalTypeItem : public ExternalItem
{
public:
ExternalTypeItem (Analysis::NodeMapping mappings, Identifier item_name,
- Visibility vis, location_t locus)
- : ExternalItem (std::move (mappings), std::move (item_name),
- Visibility (std::move (vis)),
- /* FIXME: Is that correct? */
- {}, locus)
- {}
+ Visibility vis, location_t locus);
- ExternalTypeItem (ExternalTypeItem const &other) : ExternalItem (other) {}
+ ExternalTypeItem (ExternalTypeItem const &other);
ExternalTypeItem (ExternalTypeItem &&other) = default;
ExternalTypeItem &operator= (ExternalTypeItem &&other) = default;
@@ -3203,36 +2611,13 @@ public:
ExternBlock (Analysis::NodeMapping mappings, ABI abi,
std::vector<std::unique_ptr<ExternalItem>> extern_items,
Visibility vis, AST::AttrVec inner_attrs,
- AST::AttrVec outer_attrs, location_t locus)
- : VisItem (std::move (mappings), std::move (vis), std::move (outer_attrs)),
- WithInnerAttrs (std::move (inner_attrs)), abi (abi),
- extern_items (std::move (extern_items)), locus (locus)
- {}
+ AST::AttrVec outer_attrs, location_t locus);
// Copy constructor with vector clone
- ExternBlock (ExternBlock const &other)
- : VisItem (other), WithInnerAttrs (other.inner_attrs), abi (other.abi),
- locus (other.locus)
- {
- extern_items.reserve (other.extern_items.size ());
- for (const auto &e : other.extern_items)
- extern_items.push_back (e->clone_external_item ());
- }
+ ExternBlock (ExternBlock const &other);
// Overloaded assignment operator with vector clone
- ExternBlock &operator= (ExternBlock const &other)
- {
- VisItem::operator= (other);
- abi = other.abi;
- inner_attrs = other.inner_attrs;
- locus = other.locus;
-
- extern_items.reserve (other.extern_items.size ());
- for (const auto &e : other.extern_items)
- extern_items.push_back (e->clone_external_item ());
-
- return *this;
- }
+ ExternBlock &operator= (ExternBlock const &other);
// move constructors
ExternBlock (ExternBlock &&other) = default;
diff --git a/gcc/rust/hir/tree/rust-hir-literal.h b/gcc/rust/hir/tree/rust-hir-literal.h
new file mode 100644
index 0000000..9a97e71
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-literal.h
@@ -0,0 +1,78 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_LITERAL_H
+#define RUST_HIR_LITERAL_H
+
+#include "rust-token.h"
+
+namespace Rust {
+namespace HIR {
+// A literal - value with a type. Used in LiteralExpr and LiteralPattern.
+struct Literal
+{
+public:
+ enum LitType
+ {
+ CHAR,
+ STRING,
+ BYTE,
+ BYTE_STRING,
+ INT,
+ FLOAT,
+ BOOL
+ };
+
+private:
+ std::string value_as_string;
+ LitType type;
+ PrimitiveCoreType type_hint;
+
+public:
+ std::string as_string () const { return value_as_string; }
+
+ LitType get_lit_type () const { return type; }
+
+ PrimitiveCoreType get_type_hint () const { return type_hint; }
+
+ Literal (std::string value_as_string, LitType type,
+ PrimitiveCoreType type_hint)
+ : value_as_string (std::move (value_as_string)), type (type),
+ type_hint (type_hint)
+ {}
+
+ static Literal create_error ()
+ {
+ return Literal ("", CHAR, PrimitiveCoreType::CORETYPE_UNKNOWN);
+ }
+
+ void set_lit_type (LitType lt) { type = lt; }
+
+ // Returns whether literal is in an invalid state.
+ bool is_error () const { return value_as_string == ""; }
+
+ bool is_equal (Literal &other)
+ {
+ return value_as_string == other.value_as_string && type == other.type
+ && type_hint == other.type_hint;
+ }
+};
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-node.h b/gcc/rust/hir/tree/rust-hir-node.h
new file mode 100644
index 0000000..4010c23
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-node.h
@@ -0,0 +1,63 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_NODE_H
+#define RUST_HIR_NODE_H
+
+namespace Rust {
+
+namespace HIR {
+
+class Node
+{
+public:
+ // Kind for downcasting various HIR nodes to other base classes when visiting
+ // them
+ enum BaseKind
+ {
+ /* class ExternalItem */
+ EXTERNAL,
+ /* class TraitItem */
+ TRAIT_ITEM,
+ /* class VisItem */
+ VIS_ITEM,
+ /* class Item */
+ ITEM,
+ /* class ImplItem */
+ IMPL,
+ /* class Type */
+ TYPE,
+ /* class Stmt */
+ STMT,
+ /* class Expr */
+ EXPR,
+ /* class Pattern */
+ PATTERN,
+ };
+
+ /**
+ * Get the kind of HIR node we are dealing with. This is useful for
+ * downcasting to more precise types when necessary, i.e going from an `Item*`
+ * to a `VisItem*`
+ */
+ virtual BaseKind get_hir_kind () = 0;
+};
+
+} // namespace HIR
+} // namespace Rust
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-path.cc b/gcc/rust/hir/tree/rust-hir-path.cc
new file mode 100644
index 0000000..7db2b25
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-path.cc
@@ -0,0 +1,400 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include "rust-hir-path.h"
+#include "optional.h"
+#include "rust-hir-bound.h"
+
+namespace Rust {
+namespace HIR {
+
+GenericArgsBinding::GenericArgsBinding (Identifier ident,
+ std::unique_ptr<Type> type_ptr,
+ location_t locus)
+ : identifier (std::move (ident)), type (std::move (type_ptr)), locus (locus)
+{}
+
+GenericArgsBinding::GenericArgsBinding (GenericArgsBinding const &other)
+ : identifier (other.identifier), type (other.type->clone_type ()),
+ locus (other.locus)
+{}
+
+GenericArgsBinding &
+GenericArgsBinding::operator= (GenericArgsBinding const &other)
+{
+ identifier = other.identifier;
+ type = other.type->clone_type ();
+ locus = other.locus;
+ return *this;
+}
+
+ConstGenericArg::ConstGenericArg (std::unique_ptr<Expr> expression,
+ location_t locus)
+ : expression (std::move (expression)), locus (locus)
+{}
+
+ConstGenericArg::ConstGenericArg (const ConstGenericArg &other)
+ : locus (other.locus)
+{
+ expression = other.expression->clone_expr ();
+}
+
+ConstGenericArg
+ConstGenericArg::operator= (const ConstGenericArg &other)
+{
+ expression = other.expression->clone_expr ();
+ locus = other.locus;
+
+ return *this;
+}
+
+GenericArgs &
+GenericArgs::operator= (GenericArgs const &other)
+{
+ lifetime_args = other.lifetime_args;
+ binding_args = other.binding_args;
+ const_args = other.const_args;
+ locus = other.locus;
+
+ type_args.clear ();
+ type_args.reserve (other.type_args.size ());
+ for (const auto &e : other.type_args)
+ type_args.push_back (e->clone_type ());
+
+ return *this;
+}
+
+GenericArgs::GenericArgs (std::vector<Lifetime> lifetime_args,
+ std::vector<std::unique_ptr<Type> > type_args,
+ std::vector<GenericArgsBinding> binding_args,
+ std::vector<ConstGenericArg> const_args,
+ location_t locus)
+ : lifetime_args (std::move (lifetime_args)),
+ type_args (std::move (type_args)), binding_args (std::move (binding_args)),
+ const_args (std::move (const_args)), locus (locus)
+{}
+
+GenericArgs::GenericArgs (GenericArgs const &other)
+ : lifetime_args (other.lifetime_args), binding_args (other.binding_args),
+ const_args (other.const_args), locus (other.locus)
+{
+ type_args.clear ();
+ type_args.reserve (other.type_args.size ());
+
+ for (const auto &e : other.type_args)
+ type_args.push_back (e->clone_type ());
+}
+
+bool
+GenericArgs::is_empty () const
+{
+ return lifetime_args.size () == 0 && type_args.size () == 0
+ && binding_args.size () == 0;
+}
+
+PathExprSegment::PathExprSegment (Analysis::NodeMapping mappings,
+ PathIdentSegment segment_name,
+ location_t locus, GenericArgs generic_args)
+ : mappings (std::move (mappings)), segment_name (std::move (segment_name)),
+ generic_args (std::move (generic_args)), locus (locus)
+{}
+
+PathExprSegment::PathExprSegment (PathExprSegment const &other)
+ : mappings (other.mappings), segment_name (other.segment_name),
+ generic_args (other.generic_args), locus (other.locus)
+{}
+
+PathExprSegment &
+PathExprSegment::operator= (PathExprSegment const &other)
+{
+ mappings = other.mappings;
+ segment_name = other.segment_name;
+ generic_args = other.generic_args;
+ locus = other.locus;
+
+ return *this;
+}
+
+void
+PathPattern::iterate_path_segments (std::function<bool (PathExprSegment &)> cb)
+{
+ for (auto it = segments.begin (); it != segments.end (); it++)
+ {
+ if (!cb (*it))
+ return;
+ }
+}
+
+PathInExpression::PathInExpression (Analysis::NodeMapping mappings,
+ std::vector<PathExprSegment> path_segments,
+ location_t locus,
+ bool has_opening_scope_resolution,
+ std::vector<AST::Attribute> outer_attrs)
+ : PathPattern (std::move (path_segments)),
+ PathExpr (std::move (mappings), std::move (outer_attrs)),
+ has_opening_scope_resolution (has_opening_scope_resolution), locus (locus)
+{}
+
+bool
+PathInExpression::is_self () const
+
+{
+ if (!is_single_segment ())
+ return false;
+
+ return get_final_segment ().get_segment ().as_string ().compare ("self") == 0;
+}
+
+TypePathSegment::TypePathSegment (Analysis::NodeMapping mappings,
+ PathIdentSegment ident_segment,
+ bool has_separating_scope_resolution,
+ location_t locus)
+ : mappings (std::move (mappings)), ident_segment (std::move (ident_segment)),
+ lang_item (tl::nullopt), locus (locus),
+ has_separating_scope_resolution (has_separating_scope_resolution),
+ type (SegmentType::REG)
+{}
+
+TypePathSegment::TypePathSegment (Analysis::NodeMapping mappings,
+ LangItem::Kind lang_item, location_t locus)
+ : mappings (std::move (mappings)), ident_segment (tl::nullopt),
+ lang_item (lang_item), locus (locus),
+ has_separating_scope_resolution (false), type (SegmentType::REG)
+{}
+
+TypePathSegment::TypePathSegment (Analysis::NodeMapping mappings,
+ std::string segment_name,
+ bool has_separating_scope_resolution,
+ location_t locus)
+ : mappings (std::move (mappings)),
+ ident_segment (PathIdentSegment (std::move (segment_name))),
+ lang_item (tl::nullopt), locus (locus),
+ has_separating_scope_resolution (has_separating_scope_resolution),
+ type (SegmentType::REG)
+{}
+
+TypePathSegmentGeneric::TypePathSegmentGeneric (
+ Analysis::NodeMapping mappings, PathIdentSegment ident_segment,
+ bool has_separating_scope_resolution, GenericArgs generic_args,
+ location_t locus)
+ : TypePathSegment (std::move (mappings), std::move (ident_segment),
+ has_separating_scope_resolution, locus),
+ generic_args (std::move (generic_args))
+{}
+
+TypePathSegmentGeneric::TypePathSegmentGeneric (Analysis::NodeMapping mappings,
+ LangItem::Kind lang_item,
+ GenericArgs generic_args,
+ location_t locus)
+ : TypePathSegment (std::move (mappings), lang_item, locus),
+ generic_args (std::move (generic_args))
+{}
+
+TypePathSegmentGeneric::TypePathSegmentGeneric (
+ Analysis::NodeMapping mappings, std::string segment_name,
+ bool has_separating_scope_resolution, std::vector<Lifetime> lifetime_args,
+ std::vector<std::unique_ptr<Type> > type_args,
+ std::vector<GenericArgsBinding> binding_args,
+ std::vector<ConstGenericArg> const_args, location_t locus)
+ : TypePathSegment (std::move (mappings), std::move (segment_name),
+ has_separating_scope_resolution, locus),
+ generic_args (GenericArgs (std::move (lifetime_args), std::move (type_args),
+ std::move (binding_args), std::move (const_args),
+ locus))
+{}
+
+TypePathFunction::TypePathFunction (std::vector<std::unique_ptr<Type> > inputs,
+ std::unique_ptr<Type> type)
+ : inputs (std::move (inputs)), return_type (std::move (type))
+{}
+
+TypePathFunction::TypePathFunction (TypePathFunction const &other)
+{
+ return_type = other.has_return_type ()
+ ? other.get_return_type ().clone_type ()
+ : nullptr;
+
+ inputs.reserve (other.inputs.size ());
+ for (const auto &e : other.inputs)
+ inputs.push_back (e->clone_type ());
+}
+
+TypePathFunction &
+TypePathFunction::operator= (TypePathFunction const &other)
+{
+ return_type = other.has_return_type ()
+ ? other.get_return_type ().clone_type ()
+ : nullptr;
+
+ inputs.reserve (other.inputs.size ());
+ for (const auto &e : other.inputs)
+ inputs.push_back (e->clone_type ());
+
+ return *this;
+}
+
+TypePathSegmentFunction::TypePathSegmentFunction (
+ Analysis::NodeMapping mappings, PathIdentSegment ident_segment,
+ bool has_separating_scope_resolution, TypePathFunction function_path,
+ location_t locus)
+ : TypePathSegment (std::move (mappings), std::move (ident_segment),
+ has_separating_scope_resolution, locus),
+ function_path (std::move (function_path))
+{}
+
+TypePathSegmentFunction::TypePathSegmentFunction (
+ Analysis::NodeMapping mappings, std::string segment_name,
+ bool has_separating_scope_resolution, TypePathFunction function_path,
+ location_t locus)
+ : TypePathSegment (std::move (mappings), std::move (segment_name),
+ has_separating_scope_resolution, locus),
+ function_path (std::move (function_path))
+{}
+
+TypePath::TypePath (Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<TypePathSegment> > segments,
+ location_t locus, bool has_opening_scope_resolution)
+ : TypeNoBounds (mappings, locus),
+ has_opening_scope_resolution (has_opening_scope_resolution),
+ segments (std::move (segments))
+{}
+
+TypePath::TypePath (TypePath const &other)
+ : TypeNoBounds (other.mappings, other.locus),
+ has_opening_scope_resolution (other.has_opening_scope_resolution)
+{
+ segments.reserve (other.segments.size ());
+ for (const auto &e : other.segments)
+ segments.push_back (e->clone_type_path_segment ());
+}
+
+TypePath &
+TypePath::operator= (TypePath const &other)
+{
+ has_opening_scope_resolution = other.has_opening_scope_resolution;
+ locus = other.locus;
+ mappings = other.mappings;
+
+ segments.reserve (other.segments.size ());
+ for (const auto &e : other.segments)
+ segments.push_back (e->clone_type_path_segment ());
+
+ return *this;
+}
+
+QualifiedPathType::QualifiedPathType (Analysis::NodeMapping mappings,
+ std::unique_ptr<Type> type,
+ std::unique_ptr<TypePath> trait,
+ location_t locus)
+ : type (std::move (type)), trait (std::move (trait)), locus (locus),
+ mappings (mappings)
+{}
+
+QualifiedPathType::QualifiedPathType (QualifiedPathType const &other)
+ : type (other.type->clone_type ()),
+ trait (other.has_as_clause ()
+ ? std::unique_ptr<HIR::TypePath> (new HIR::TypePath (*other.trait))
+ : nullptr),
+ locus (other.locus), mappings (other.mappings)
+{}
+
+QualifiedPathType &
+QualifiedPathType::operator= (QualifiedPathType const &other)
+{
+ type = other.type->clone_type ();
+ locus = other.locus;
+ mappings = other.mappings;
+ trait = other.has_as_clause ()
+ ? std::unique_ptr<HIR::TypePath> (new HIR::TypePath (*other.trait))
+ : nullptr;
+
+ return *this;
+}
+
+bool
+QualifiedPathType::trait_has_generic_args () const
+{
+ rust_assert (has_as_clause ());
+ bool is_generic_seg = trait->get_final_segment ().get_type ()
+ == TypePathSegment::SegmentType::GENERIC;
+ if (!is_generic_seg)
+ return false;
+
+ auto &seg
+ = static_cast<TypePathSegmentGeneric &> (trait->get_final_segment ());
+ return seg.has_generic_args ();
+}
+
+GenericArgs &
+QualifiedPathType::get_trait_generic_args ()
+{
+ rust_assert (trait_has_generic_args ());
+ auto &seg
+ = static_cast<TypePathSegmentGeneric &> (trait->get_final_segment ());
+ return seg.get_generic_args ();
+}
+
+QualifiedPathInExpression::QualifiedPathInExpression (
+ Analysis::NodeMapping mappings, QualifiedPathType qual_path_type,
+ std::vector<PathExprSegment> path_segments, location_t locus,
+ std::vector<AST::Attribute> outer_attrs)
+ : PathPattern (std::move (path_segments)),
+ PathExpr (std::move (mappings), std::move (outer_attrs)),
+ path_type (std::move (qual_path_type)), locus (locus)
+{}
+
+QualifiedPathInType::QualifiedPathInType (
+ Analysis::NodeMapping mappings, QualifiedPathType qual_path_type,
+ std::unique_ptr<TypePathSegment> associated_segment,
+ std::vector<std::unique_ptr<TypePathSegment> > path_segments,
+ location_t locus)
+ : TypeNoBounds (mappings, locus), path_type (std::move (qual_path_type)),
+ associated_segment (std::move (associated_segment)),
+ segments (std::move (path_segments))
+{}
+
+QualifiedPathInType::QualifiedPathInType (QualifiedPathInType const &other)
+ : TypeNoBounds (other.mappings, other.locus), path_type (other.path_type)
+{
+ auto seg = other.associated_segment->clone_type_path_segment_impl ();
+ associated_segment = std::unique_ptr<TypePathSegment> (seg);
+
+ segments.reserve (other.segments.size ());
+ for (const auto &e : other.segments)
+ segments.push_back (e->clone_type_path_segment ());
+}
+
+QualifiedPathInType &
+QualifiedPathInType::operator= (QualifiedPathInType const &other)
+{
+ auto seg = other.associated_segment->clone_type_path_segment_impl ();
+ associated_segment = std::unique_ptr<TypePathSegment> (seg);
+
+ path_type = other.path_type;
+ locus = other.locus;
+ mappings = other.mappings;
+
+ segments.reserve (other.segments.size ());
+ for (const auto &e : other.segments)
+ segments.push_back (e->clone_type_path_segment ());
+
+ return *this;
+}
+
+} // namespace HIR
+} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-path.h b/gcc/rust/hir/tree/rust-hir-path.h
index e406d53..bbb9c2d 100644
--- a/gcc/rust/hir/tree/rust-hir-path.h
+++ b/gcc/rust/hir/tree/rust-hir-path.h
@@ -19,7 +19,10 @@
#ifndef RUST_HIR_PATH_H
#define RUST_HIR_PATH_H
-#include "rust-hir.h"
+#include "rust-hir-simple-path.h"
+#include "rust-hir-type-no-bounds.h"
+#include "rust-hir-pattern-abstract.h"
+#include "rust-hir-expr-abstract.h"
namespace Rust {
namespace HIR {
@@ -76,27 +79,16 @@ public:
// Pointer type for type in constructor to enable polymorphism
GenericArgsBinding (Identifier ident, std::unique_ptr<Type> type_ptr,
- location_t locus = UNDEF_LOCATION)
- : identifier (std::move (ident)), type (std::move (type_ptr)), locus (locus)
- {}
+ location_t locus = UNDEF_LOCATION);
// Copy constructor has to deep copy the type as it is a unique pointer
- GenericArgsBinding (GenericArgsBinding const &other)
- : identifier (other.identifier), type (other.type->clone_type ()),
- locus (other.locus)
- {}
+ GenericArgsBinding (GenericArgsBinding const &other);
// default destructor
~GenericArgsBinding () = default;
// Overload assignment operator to deep copy the pointed-to type
- GenericArgsBinding &operator= (GenericArgsBinding const &other)
- {
- identifier = other.identifier;
- type = other.type->clone_type ();
- locus = other.locus;
- return *this;
- }
+ GenericArgsBinding &operator= (GenericArgsBinding const &other);
// move constructors
GenericArgsBinding (GenericArgsBinding &&other) = default;
@@ -107,8 +99,16 @@ public:
Identifier &get_identifier () { return identifier; }
const Identifier &get_identifier () const { return identifier; }
- std::unique_ptr<Type> &get_type () { return type; }
- const std::unique_ptr<Type> &get_type () const { return type; }
+ Type &get_type ()
+ {
+ rust_assert (type);
+ return *type;
+ }
+ const Type &get_type () const
+ {
+ rust_assert (type);
+ return *type;
+ }
location_t get_locus () const { return locus; }
};
@@ -119,22 +119,11 @@ class ConstGenericArg
// at name-resolution, hence no need for ambiguities here
public:
- ConstGenericArg (std::unique_ptr<Expr> expression, location_t locus)
- : expression (std::move (expression)), locus (locus)
- {}
-
- ConstGenericArg (const ConstGenericArg &other) : locus (other.locus)
- {
- expression = other.expression->clone_expr ();
- }
+ ConstGenericArg (std::unique_ptr<Expr> expression, location_t locus);
- ConstGenericArg operator= (const ConstGenericArg &other)
- {
- expression = other.expression->clone_expr ();
- locus = other.locus;
+ ConstGenericArg (const ConstGenericArg &other);
- return *this;
- }
+ ConstGenericArg operator= (const ConstGenericArg &other);
std::unique_ptr<Expr> &get_expression () { return expression; }
@@ -162,42 +151,15 @@ public:
GenericArgs (std::vector<Lifetime> lifetime_args,
std::vector<std::unique_ptr<Type> > type_args,
std::vector<GenericArgsBinding> binding_args,
- std::vector<ConstGenericArg> const_args, location_t locus)
- : lifetime_args (std::move (lifetime_args)),
- type_args (std::move (type_args)),
- binding_args (std::move (binding_args)),
- const_args (std::move (const_args)), locus (locus)
- {}
+ std::vector<ConstGenericArg> const_args, location_t locus);
// copy constructor with vector clone
- GenericArgs (GenericArgs const &other)
- : lifetime_args (other.lifetime_args), binding_args (other.binding_args),
- const_args (other.const_args), locus (other.locus)
- {
- type_args.clear ();
- type_args.reserve (other.type_args.size ());
-
- for (const auto &e : other.type_args)
- type_args.push_back (e->clone_type ());
- }
+ GenericArgs (GenericArgs const &other);
~GenericArgs () = default;
// overloaded assignment operator to vector clone
- GenericArgs &operator= (GenericArgs const &other)
- {
- lifetime_args = other.lifetime_args;
- binding_args = other.binding_args;
- const_args = other.const_args;
- locus = other.locus;
-
- type_args.clear ();
- type_args.reserve (other.type_args.size ());
- for (const auto &e : other.type_args)
- type_args.push_back (e->clone_type ());
-
- return *this;
- }
+ GenericArgs &operator= (GenericArgs const &other);
// move constructors
GenericArgs (GenericArgs &&other) = default;
@@ -209,11 +171,7 @@ public:
return GenericArgs ({}, {}, {}, {}, locus);
}
- bool is_empty () const
- {
- return lifetime_args.size () == 0 && type_args.size () == 0
- && binding_args.size () == 0;
- }
+ bool is_empty () const;
std::string as_string () const;
@@ -245,25 +203,11 @@ private:
public:
PathExprSegment (Analysis::NodeMapping mappings,
PathIdentSegment segment_name, location_t locus,
- GenericArgs generic_args)
- : mappings (std::move (mappings)), segment_name (std::move (segment_name)),
- generic_args (std::move (generic_args)), locus (locus)
- {}
+ GenericArgs generic_args);
- PathExprSegment (PathExprSegment const &other)
- : mappings (other.mappings), segment_name (other.segment_name),
- generic_args (other.generic_args), locus (other.locus)
- {}
+ PathExprSegment (PathExprSegment const &other);
- PathExprSegment &operator= (PathExprSegment const &other)
- {
- mappings = other.mappings;
- segment_name = other.segment_name;
- generic_args = other.generic_args;
- locus = other.locus;
-
- return *this;
- }
+ PathExprSegment &operator= (PathExprSegment const &other);
// move constructors
PathExprSegment (PathExprSegment &&other) = default;
@@ -308,14 +252,7 @@ public:
std::string as_string () const override;
- void iterate_path_segments (std::function<bool (PathExprSegment &)> cb)
- {
- for (auto it = segments.begin (); it != segments.end (); it++)
- {
- if (!cb (*it))
- return;
- }
- }
+ void iterate_path_segments (std::function<bool (PathExprSegment &)> cb);
size_t get_num_segments () const { return segments.size (); }
@@ -349,11 +286,7 @@ public:
location_t locus = UNDEF_LOCATION,
bool has_opening_scope_resolution = false,
std::vector<AST::Attribute> outer_attrs
- = std::vector<AST::Attribute> ())
- : PathPattern (std::move (path_segments)),
- PathExpr (std::move (mappings), std::move (outer_attrs)),
- has_opening_scope_resolution (has_opening_scope_resolution), locus (locus)
- {}
+ = std::vector<AST::Attribute> ());
// Creates an error state path in expression.
static PathInExpression create_error ()
@@ -385,14 +318,7 @@ public:
bool opening_scope_resolution () { return has_opening_scope_resolution; }
- bool is_self () const
- {
- if (!is_single_segment ())
- return false;
-
- return get_final_segment ().get_segment ().as_string ().compare ("self")
- == 0;
- }
+ bool is_self () const;
const Analysis::NodeMapping &get_mappings () const override final
{
@@ -429,7 +355,8 @@ public:
private:
Analysis::NodeMapping mappings;
- PathIdentSegment ident_segment;
+ tl::optional<PathIdentSegment> ident_segment;
+ tl::optional<LangItem::Kind> lang_item;
location_t locus;
protected:
@@ -456,27 +383,29 @@ public:
TypePathSegment (Analysis::NodeMapping mappings,
PathIdentSegment ident_segment,
- bool has_separating_scope_resolution, location_t locus)
- : mappings (std::move (mappings)),
- ident_segment (std::move (ident_segment)), locus (locus),
- has_separating_scope_resolution (has_separating_scope_resolution),
- type (SegmentType::REG)
- {}
+ bool has_separating_scope_resolution, location_t locus);
+
+ TypePathSegment (Analysis::NodeMapping mappings, LangItem::Kind lang_item,
+ location_t locus);
TypePathSegment (Analysis::NodeMapping mappings, std::string segment_name,
- bool has_separating_scope_resolution, location_t locus)
- : mappings (std::move (mappings)),
- ident_segment (PathIdentSegment (std::move (segment_name))),
- locus (locus),
- has_separating_scope_resolution (has_separating_scope_resolution),
- type (SegmentType::REG)
- {}
+ bool has_separating_scope_resolution, location_t locus);
- virtual std::string as_string () const { return ident_segment.as_string (); }
+ virtual std::string as_string () const
+ {
+ if (ident_segment)
+ return ident_segment->as_string ();
+
+ return LangItem::PrettyString (*lang_item);
+ }
/* Returns whether the type path segment is in an error state. May be virtual
* in future. */
- bool is_error () const { return ident_segment.is_error (); }
+ bool is_error () const
+ {
+ rust_assert (ident_segment);
+ return ident_segment->is_error ();
+ }
/* Returns whether segment is identifier only (as opposed to generic args or
* function). Overriden in derived classes with other segments. */
@@ -489,12 +418,24 @@ public:
const Analysis::NodeMapping &get_mappings () const { return mappings; }
- const PathIdentSegment &get_ident_segment () const { return ident_segment; }
+ const PathIdentSegment &get_ident_segment () const
+ {
+ rust_assert (ident_segment);
+ return *ident_segment;
+ }
+
+ const LangItem::Kind &get_lang_item () const
+ {
+ rust_assert (lang_item);
+ return *lang_item;
+ }
bool is_generic_segment () const
{
return get_type () == SegmentType::GENERIC;
}
+
+ bool is_lang_item () const { return lang_item.has_value (); }
};
// Segment used in type path with generic args
@@ -511,11 +452,11 @@ public:
TypePathSegmentGeneric (Analysis::NodeMapping mappings,
PathIdentSegment ident_segment,
bool has_separating_scope_resolution,
- GenericArgs generic_args, location_t locus)
- : TypePathSegment (std::move (mappings), std::move (ident_segment),
- has_separating_scope_resolution, locus),
- generic_args (std::move (generic_args))
- {}
+ GenericArgs generic_args, location_t locus);
+
+ TypePathSegmentGeneric (Analysis::NodeMapping mappings,
+ LangItem::Kind lang_item, GenericArgs generic_args,
+ location_t locus);
// Constructor from segment name and all args
TypePathSegmentGeneric (Analysis::NodeMapping mappings,
@@ -525,13 +466,7 @@ public:
std::vector<std::unique_ptr<Type> > type_args,
std::vector<GenericArgsBinding> binding_args,
std::vector<ConstGenericArg> const_args,
- location_t locus)
- : TypePathSegment (std::move (mappings), std::move (segment_name),
- has_separating_scope_resolution, locus),
- generic_args (
- GenericArgs (std::move (lifetime_args), std::move (type_args),
- std::move (binding_args), std::move (const_args), locus))
- {}
+ location_t locus);
std::string as_string () const override;
@@ -566,37 +501,15 @@ public:
// Constructor
TypePathFunction (std::vector<std::unique_ptr<Type> > inputs,
- std::unique_ptr<Type> type)
- : inputs (std::move (inputs)), return_type (std::move (type))
- {}
+ std::unique_ptr<Type> type);
// Copy constructor with clone
- TypePathFunction (TypePathFunction const &other)
- {
- return_type = other.has_return_type ()
- ? other.get_return_type ()->clone_type ()
- : nullptr;
-
- inputs.reserve (other.inputs.size ());
- for (const auto &e : other.inputs)
- inputs.push_back (e->clone_type ());
- }
+ TypePathFunction (TypePathFunction const &other);
~TypePathFunction () = default;
// Overloaded assignment operator to clone type
- TypePathFunction &operator= (TypePathFunction const &other)
- {
- return_type = other.has_return_type ()
- ? other.get_return_type ()->clone_type ()
- : nullptr;
-
- inputs.reserve (other.inputs.size ());
- for (const auto &e : other.inputs)
- inputs.push_back (e->clone_type ());
-
- return *this;
- }
+ TypePathFunction &operator= (TypePathFunction const &other);
// move constructors
TypePathFunction (TypePathFunction &&other) = default;
@@ -610,8 +523,8 @@ public:
};
std::vector<std::unique_ptr<Type> > &get_params () { return inputs; };
- const std::unique_ptr<Type> &get_return_type () const { return return_type; };
- std::unique_ptr<Type> &get_return_type () { return return_type; };
+ const Type &get_return_type () const { return *return_type; };
+ Type &get_return_type () { return *return_type; };
};
// Segment used in type path with a function argument
@@ -624,21 +537,13 @@ public:
TypePathSegmentFunction (Analysis::NodeMapping mappings,
PathIdentSegment ident_segment,
bool has_separating_scope_resolution,
- TypePathFunction function_path, location_t locus)
- : TypePathSegment (std::move (mappings), std::move (ident_segment),
- has_separating_scope_resolution, locus),
- function_path (std::move (function_path))
- {}
+ TypePathFunction function_path, location_t locus);
// Constructor with segment name and TypePathFn
TypePathSegmentFunction (Analysis::NodeMapping mappings,
std::string segment_name,
bool has_separating_scope_resolution,
- TypePathFunction function_path, location_t locus)
- : TypePathSegment (std::move (mappings), std::move (segment_name),
- has_separating_scope_resolution, locus),
- function_path (std::move (function_path))
- {}
+ TypePathFunction function_path, location_t locus);
std::string as_string () const override;
@@ -698,35 +603,13 @@ public:
// Constructor
TypePath (Analysis::NodeMapping mappings,
std::vector<std::unique_ptr<TypePathSegment> > segments,
- location_t locus, bool has_opening_scope_resolution = false)
- : TypeNoBounds (mappings, locus),
- has_opening_scope_resolution (has_opening_scope_resolution),
- segments (std::move (segments))
- {}
+ location_t locus, bool has_opening_scope_resolution = false);
// Copy constructor with vector clone
- TypePath (TypePath const &other)
- : TypeNoBounds (other.mappings, other.locus),
- has_opening_scope_resolution (other.has_opening_scope_resolution)
- {
- segments.reserve (other.segments.size ());
- for (const auto &e : other.segments)
- segments.push_back (e->clone_type_path_segment ());
- }
+ TypePath (TypePath const &other);
// Overloaded assignment operator with clone
- TypePath &operator= (TypePath const &other)
- {
- has_opening_scope_resolution = other.has_opening_scope_resolution;
- locus = other.locus;
- mappings = other.mappings;
-
- segments.reserve (other.segments.size ());
- for (const auto &e : other.segments)
- segments.push_back (e->clone_type_path_segment ());
-
- return *this;
- }
+ TypePath &operator= (TypePath const &other);
// move constructors
TypePath (TypePath &&other) = default;
@@ -739,7 +622,7 @@ public:
AST::SimplePath as_simple_path () const;
// Creates a trait bound with a clone of this type path as its only element.
- TraitBound *to_trait_bound (bool in_parens) const override;
+ std::unique_ptr<TraitBound> to_trait_bound (bool in_parens) const override;
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTypeVisitor &vis) override;
@@ -751,10 +634,7 @@ public:
return segments;
}
- std::unique_ptr<TypePathSegment> &get_final_segment ()
- {
- return segments.back ();
- }
+ TypePathSegment &get_final_segment () { return *segments.back (); }
};
class QualifiedPathType
@@ -767,36 +647,16 @@ class QualifiedPathType
public:
// Constructor
QualifiedPathType (Analysis::NodeMapping mappings, std::unique_ptr<Type> type,
- std::unique_ptr<TypePath> trait, location_t locus)
- : type (std::move (type)), trait (std::move (trait)), locus (locus),
- mappings (mappings)
- {}
+ std::unique_ptr<TypePath> trait, location_t locus);
// Copy constructor uses custom deep copy for Type to preserve polymorphism
- QualifiedPathType (QualifiedPathType const &other)
- : type (other.type->clone_type ()),
- trait (other.has_as_clause () ? std::unique_ptr<HIR::TypePath> (
- new HIR::TypePath (*other.trait))
- : nullptr),
- locus (other.locus), mappings (other.mappings)
- {}
+ QualifiedPathType (QualifiedPathType const &other);
// default destructor
~QualifiedPathType () = default;
// overload assignment operator to use custom clone method
- QualifiedPathType &operator= (QualifiedPathType const &other)
- {
- type = other.type->clone_type ();
- locus = other.locus;
- mappings = other.mappings;
- trait
- = other.has_as_clause ()
- ? std::unique_ptr<HIR::TypePath> (new HIR::TypePath (*other.trait))
- : nullptr;
-
- return *this;
- }
+ QualifiedPathType &operator= (QualifiedPathType const &other);
// move constructor
QualifiedPathType (QualifiedPathType &&other) = default;
@@ -811,30 +671,17 @@ public:
Analysis::NodeMapping get_mappings () const { return mappings; }
- std::unique_ptr<Type> &get_type () { return type; }
-
- std::unique_ptr<TypePath> &get_trait () { return trait; }
-
- bool trait_has_generic_args () const
+ Type &get_type ()
{
- rust_assert (has_as_clause ());
- bool is_generic_seg = trait->get_final_segment ()->get_type ()
- == TypePathSegment::SegmentType::GENERIC;
- if (!is_generic_seg)
- return false;
-
- TypePathSegmentGeneric *seg = static_cast<TypePathSegmentGeneric *> (
- trait->get_final_segment ().get ());
- return seg->has_generic_args ();
+ rust_assert (type);
+ return *type;
}
- GenericArgs &get_trait_generic_args ()
- {
- rust_assert (trait_has_generic_args ());
- TypePathSegmentGeneric *seg = static_cast<TypePathSegmentGeneric *> (
- trait->get_final_segment ().get ());
- return seg->get_generic_args ();
- }
+ TypePath &get_trait () { return *trait; }
+
+ bool trait_has_generic_args () const;
+
+ GenericArgs &get_trait_generic_args ();
};
/* HIR node representing a qualified path-in-expression pattern (path that
@@ -852,11 +699,7 @@ public:
std::vector<PathExprSegment> path_segments,
location_t locus = UNDEF_LOCATION,
std::vector<AST::Attribute> outer_attrs
- = std::vector<AST::Attribute> ())
- : PathPattern (std::move (path_segments)),
- PathExpr (std::move (mappings), std::move (outer_attrs)),
- path_type (std::move (qual_path_type)), locus (locus)
- {}
+ = std::vector<AST::Attribute> ());
location_t get_locus () const override final { return locus; }
@@ -917,40 +760,13 @@ public:
Analysis::NodeMapping mappings, QualifiedPathType qual_path_type,
std::unique_ptr<TypePathSegment> associated_segment,
std::vector<std::unique_ptr<TypePathSegment> > path_segments,
- location_t locus = UNDEF_LOCATION)
- : TypeNoBounds (mappings, locus), path_type (std::move (qual_path_type)),
- associated_segment (std::move (associated_segment)),
- segments (std::move (path_segments))
- {}
+ location_t locus = UNDEF_LOCATION);
// Copy constructor with vector clone
- QualifiedPathInType (QualifiedPathInType const &other)
- : TypeNoBounds (other.mappings, other.locus), path_type (other.path_type)
- {
- auto seg = other.associated_segment->clone_type_path_segment_impl ();
- associated_segment = std::unique_ptr<TypePathSegment> (seg);
-
- segments.reserve (other.segments.size ());
- for (const auto &e : other.segments)
- segments.push_back (e->clone_type_path_segment ());
- }
+ QualifiedPathInType (QualifiedPathInType const &other);
// Overloaded assignment operator with vector clone
- QualifiedPathInType &operator= (QualifiedPathInType const &other)
- {
- auto seg = other.associated_segment->clone_type_path_segment_impl ();
- associated_segment = std::unique_ptr<TypePathSegment> (seg);
-
- path_type = other.path_type;
- locus = other.locus;
- mappings = other.mappings;
-
- segments.reserve (other.segments.size ());
- for (const auto &e : other.segments)
- segments.push_back (e->clone_type_path_segment ());
-
- return *this;
- }
+ QualifiedPathInType &operator= (QualifiedPathInType const &other);
// move constructors
QualifiedPathInType (QualifiedPathInType &&other) = default;
@@ -963,10 +779,7 @@ public:
QualifiedPathType &get_path_type () { return path_type; }
- std::unique_ptr<TypePathSegment> &get_associated_segment ()
- {
- return associated_segment;
- }
+ TypePathSegment &get_associated_segment () { return *associated_segment; }
std::vector<std::unique_ptr<TypePathSegment> > &get_segments ()
{
@@ -974,40 +787,6 @@ public:
}
};
-class SimplePathSegment
-{
- Analysis::NodeMapping mappings;
-
-public:
- SimplePathSegment (Analysis::NodeMapping mappings) : mappings (mappings) {}
-
- const Analysis::NodeMapping &get_mappings () const { return mappings; }
-};
-
-class SimplePath
-{
- std::vector<SimplePathSegment> segments;
- Analysis::NodeMapping mappings;
- location_t locus;
-
-public:
- SimplePath (std::vector<SimplePathSegment> segments,
- Analysis::NodeMapping mappings, location_t locus)
- : segments (std::move (segments)), mappings (mappings), locus (locus)
- {}
-
- static HIR::SimplePath create_empty ()
- {
- return HIR::SimplePath ({}, Analysis::NodeMapping::get_error (),
- UNDEF_LOCATION);
- }
-
- bool is_error () const { return segments.empty (); }
-
- const Analysis::NodeMapping &get_mappings () const { return mappings; }
- location_t get_locus () const { return locus; }
-};
-
} // namespace HIR
} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-pattern-abstract.h b/gcc/rust/hir/tree/rust-hir-pattern-abstract.h
new file mode 100644
index 0000000..b156a80
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-pattern-abstract.h
@@ -0,0 +1,82 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_PATTERN_ABSTRACT_H
+#define RUST_HIR_PATTERN_ABSTRACT_H
+
+#include "rust-hir-visitable.h"
+#include "rust-hir-visitor.h"
+#include "rust-hir-node.h"
+#include "rust-system.h"
+
+namespace Rust {
+namespace HIR {
+
+// Pattern base HIR node
+class Pattern : public Node, virtual public FullVisitable
+{
+public:
+ using FullVisitable::accept_vis;
+
+ enum PatternType
+ {
+ PATH,
+ LITERAL,
+ IDENTIFIER,
+ WILDCARD,
+ RANGE,
+ REFERENCE,
+ STRUCT,
+ TUPLE_STRUCT,
+ TUPLE,
+ GROUPED,
+ SLICE,
+ ALT
+ };
+
+ BaseKind get_hir_kind () override final { return PATTERN; }
+
+ // Unique pointer custom clone function
+ std::unique_ptr<Pattern> clone_pattern () const
+ {
+ return std::unique_ptr<Pattern> (clone_pattern_impl ());
+ }
+
+ // possible virtual methods: is_refutable()
+
+ virtual ~Pattern () {}
+
+ virtual std::string as_string () const = 0;
+
+ virtual void accept_vis (HIRPatternVisitor &vis) = 0;
+
+ virtual const Analysis::NodeMapping &get_mappings () const = 0;
+
+ virtual location_t get_locus () const = 0;
+
+ virtual PatternType get_pattern_type () const = 0;
+
+protected:
+ // Clone pattern implementation as pure virtual method
+ virtual Pattern *clone_pattern_impl () const = 0;
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h b/gcc/rust/hir/tree/rust-hir-pattern.h
index e5d8371..5cc5c95 100644
--- a/gcc/rust/hir/tree/rust-hir-pattern.h
+++ b/gcc/rust/hir/tree/rust-hir-pattern.h
@@ -19,12 +19,13 @@
#ifndef RUST_HIR_PATTERN_H
#define RUST_HIR_PATTERN_H
+#include "rust-hir-pattern-abstract.h"
#include "rust-common.h"
-#include "rust-hir.h"
+#include "rust-hir-literal.h"
+#include "rust-hir-path.h"
namespace Rust {
namespace HIR {
-
// Literal pattern HIR node (comparing to a literal)
class LiteralPattern : public Pattern
{
@@ -132,7 +133,7 @@ public:
bool is_mut () const { return mut == Mutability::Mut; }
bool get_is_ref () const { return is_ref; }
- std::unique_ptr<Pattern> &get_to_bind () { return to_bind; }
+ Pattern &get_to_bind () { return *to_bind; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRPatternVisitor &vis) override;
@@ -405,9 +406,9 @@ public:
return PatternType::RANGE;
}
- std::unique_ptr<RangePatternBound> &get_lower_bound () { return lower; }
+ RangePatternBound &get_lower_bound () { return *lower; }
- std::unique_ptr<RangePatternBound> &get_upper_bound () { return upper; }
+ RangePatternBound &get_upper_bound () { return *upper; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -476,7 +477,7 @@ public:
return PatternType::REFERENCE;
}
- std::unique_ptr<Pattern> &get_referenced_pattern () { return pattern; }
+ Pattern &get_referenced_pattern () { return *pattern; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -572,7 +573,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
TupleIndex get_index () { return index; }
- std::unique_ptr<Pattern> &get_tuple_pattern () { return tuple_pattern; }
+ Pattern &get_tuple_pattern () { return *tuple_pattern; }
ItemType get_item_type () const override final { return ItemType::TUPLE_PAT; }
@@ -630,7 +631,7 @@ public:
Identifier get_identifier () const { return ident; }
- std::unique_ptr<Pattern> &get_pattern () { return ident_pattern; }
+ Pattern &get_pattern () { return *ident_pattern; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -1002,7 +1003,7 @@ public:
PathInExpression &get_path () { return path; }
- std::unique_ptr<TupleStructItems> &get_items () { return items; }
+ TupleStructItems &get_items () { return *items; }
const Analysis::NodeMapping &get_mappings () const override final
{
@@ -1221,8 +1222,8 @@ public:
return PatternType::TUPLE;
}
- std::unique_ptr<TuplePatternItems> &get_items () { return items; }
- const std::unique_ptr<TuplePatternItems> &get_items () const { return items; }
+ TuplePatternItems &get_items () { return *items; }
+ const TuplePatternItems &get_items () const { return *items; }
protected:
/* Use covariance to implement clone function as returning this object rather
diff --git a/gcc/rust/hir/tree/rust-hir-simple-path.h b/gcc/rust/hir/tree/rust-hir-simple-path.h
new file mode 100644
index 0000000..7f832ff
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-simple-path.h
@@ -0,0 +1,64 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_SIMPLE_PATH_H
+#define RUST_HIR_SIMPLE_PATH_H
+
+#include "rust-hir-map.h"
+
+namespace Rust {
+namespace HIR {
+
+class SimplePathSegment
+{
+ Analysis::NodeMapping mappings;
+
+public:
+ SimplePathSegment (Analysis::NodeMapping mappings) : mappings (mappings) {}
+
+ const Analysis::NodeMapping &get_mappings () const { return mappings; }
+};
+
+class SimplePath
+{
+ std::vector<SimplePathSegment> segments;
+ Analysis::NodeMapping mappings;
+ location_t locus;
+
+public:
+ SimplePath (std::vector<SimplePathSegment> segments,
+ Analysis::NodeMapping mappings, location_t locus)
+ : segments (std::move (segments)), mappings (mappings), locus (locus)
+ {}
+
+ static HIR::SimplePath create_empty ()
+ {
+ return HIR::SimplePath ({}, Analysis::NodeMapping::get_error (),
+ UNDEF_LOCATION);
+ }
+
+ bool is_error () const { return segments.empty (); }
+
+ const Analysis::NodeMapping &get_mappings () const { return mappings; }
+ location_t get_locus () const { return locus; }
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-stmt.cc b/gcc/rust/hir/tree/rust-hir-stmt.cc
new file mode 100644
index 0000000..025f67e
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-stmt.cc
@@ -0,0 +1,104 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include "rust-hir-stmt.h"
+#include "optional.h"
+#include "rust-system.h"
+
+namespace Rust {
+namespace HIR {
+
+LetStmt::LetStmt (Analysis::NodeMapping mappings,
+ std::unique_ptr<Pattern> variables_pattern,
+ tl::optional<std::unique_ptr<Expr>> init_expr,
+ tl::optional<std::unique_ptr<Type>> type,
+ AST::AttrVec outer_attrs, location_t locus)
+ : Stmt (std::move (mappings)), outer_attrs (std::move (outer_attrs)),
+ variables_pattern (std::move (variables_pattern)), type (std::move (type)),
+ init_expr (std::move (init_expr)), locus (locus)
+{}
+
+LetStmt::LetStmt (LetStmt const &other)
+ : Stmt (other.mappings), outer_attrs (other.outer_attrs), locus (other.locus)
+{
+ // guard to prevent null dereference (only required if error state)
+ if (other.variables_pattern != nullptr)
+ variables_pattern = other.variables_pattern->clone_pattern ();
+
+ // guard to prevent null dereference (always required)
+ if (other.has_init_expr ())
+ init_expr = other.get_init_expr ().clone_expr ();
+
+ if (other.has_type ())
+ type = other.get_type ().clone_type ();
+ else
+ type = tl::nullopt;
+}
+
+LetStmt &
+LetStmt::operator= (LetStmt const &other)
+{
+ outer_attrs = other.outer_attrs;
+ locus = other.locus;
+
+ // guard to prevent null dereference (only required if error state)
+ if (other.variables_pattern != nullptr)
+ variables_pattern = other.variables_pattern->clone_pattern ();
+ else
+ variables_pattern = nullptr;
+
+ // guard to prevent null dereference (always required)
+ if (other.has_init_expr ())
+ init_expr = other.get_init_expr ().clone_expr ();
+ else
+ init_expr = nullptr;
+ if (other.has_type ())
+ type = other.get_type ().clone_type ();
+ else
+ type = tl::nullopt;
+
+ return *this;
+}
+
+ExprStmt::ExprStmt (Analysis::NodeMapping mappings, std::unique_ptr<Expr> expr,
+ location_t locus, bool must_be_unit)
+ : Stmt (std::move (mappings)), expr (std::move (expr)), locus (locus),
+ must_be_unit (must_be_unit)
+{}
+
+ExprStmt::ExprStmt (Analysis::NodeMapping mappings, std::unique_ptr<Expr> expr,
+ location_t locus)
+ : ExprStmt (std::move (mappings), std::move (expr), locus, false)
+{}
+
+ExprStmt::ExprStmt (ExprStmt const &other)
+ : Stmt (other), expr (other.expr->clone_expr ()), locus (other.locus)
+{}
+
+ExprStmt &
+ExprStmt::operator= (ExprStmt const &other)
+{
+ Stmt::operator= (other);
+ expr = other.expr->clone_expr ();
+ locus = other.locus;
+
+ return *this;
+}
+
+} // namespace HIR
+} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-stmt.h b/gcc/rust/hir/tree/rust-hir-stmt.h
index e6e844f..3db1728 100644
--- a/gcc/rust/hir/tree/rust-hir-stmt.h
+++ b/gcc/rust/hir/tree/rust-hir-stmt.h
@@ -22,9 +22,48 @@
#include "rust-hir.h"
#include "rust-hir-path.h"
#include "rust-hir-expr.h"
+#include "rust-system.h"
namespace Rust {
namespace HIR {
+/* Base statement abstract class. Note that most "statements" are not allowed in
+ * top-level module scope - only a subclass of statements called "items" are. */
+class Stmt : public Node, public FullVisitable
+{
+public:
+ using FullVisitable::accept_vis;
+
+ // Unique pointer custom clone function
+ std::unique_ptr<Stmt> clone_stmt () const
+ {
+ return std::unique_ptr<Stmt> (clone_stmt_impl ());
+ }
+
+ BaseKind get_hir_kind () override { return STMT; }
+
+ virtual ~Stmt () {}
+
+ virtual std::string as_string () const = 0;
+
+ virtual void accept_vis (HIRStmtVisitor &vis) = 0;
+
+ virtual location_t get_locus () const = 0;
+
+ virtual bool is_unit_check_needed () const { return false; }
+
+ const Analysis::NodeMapping &get_mappings () const { return mappings; }
+
+ virtual bool is_item () const = 0;
+
+protected:
+ Stmt (Analysis::NodeMapping mappings) : mappings (std::move (mappings)) {}
+
+ // Clone function implementation as pure virtual method
+ virtual Stmt *clone_stmt_impl () const = 0;
+
+ Analysis::NodeMapping mappings;
+};
+
// Just a semi-colon, which apparently is a statement.
class EmptyStmt : public Stmt
{
@@ -59,11 +98,9 @@ class LetStmt : public Stmt
std::unique_ptr<Pattern> variables_pattern;
- // bool has_type;
- std::unique_ptr<Type> type;
+ tl::optional<std::unique_ptr<Type>> type;
- // bool has_init_expr;
- std::unique_ptr<Expr> init_expr;
+ tl::optional<std::unique_ptr<Expr>> init_expr;
location_t locus;
@@ -72,62 +109,24 @@ public:
bool has_outer_attrs () const { return !outer_attrs.empty (); }
// Returns whether let statement has a given return type.
- bool has_type () const { return type != nullptr; }
+ bool has_type () const { return type.has_value (); }
// Returns whether let statement has an initialisation expression.
- bool has_init_expr () const { return init_expr != nullptr; }
+ bool has_init_expr () const { return init_expr.has_value (); }
std::string as_string () const override;
LetStmt (Analysis::NodeMapping mappings,
std::unique_ptr<Pattern> variables_pattern,
- std::unique_ptr<Expr> init_expr, std::unique_ptr<Type> type,
- AST::AttrVec outer_attrs, location_t locus)
- : Stmt (std::move (mappings)), outer_attrs (std::move (outer_attrs)),
- variables_pattern (std::move (variables_pattern)),
- type (std::move (type)), init_expr (std::move (init_expr)), locus (locus)
- {}
+ tl::optional<std::unique_ptr<Expr>> init_expr,
+ tl::optional<std::unique_ptr<Type>> type, AST::AttrVec outer_attrs,
+ location_t locus);
// Copy constructor with clone
- LetStmt (LetStmt const &other)
- : Stmt (other.mappings), outer_attrs (other.outer_attrs),
- locus (other.locus)
- {
- // guard to prevent null dereference (only required if error state)
- if (other.variables_pattern != nullptr)
- variables_pattern = other.variables_pattern->clone_pattern ();
-
- // guard to prevent null dereference (always required)
- if (other.init_expr != nullptr)
- init_expr = other.init_expr->clone_expr ();
- if (other.type != nullptr)
- type = other.type->clone_type ();
- }
+ LetStmt (LetStmt const &other);
// Overloaded assignment operator to clone
- LetStmt &operator= (LetStmt const &other)
- {
- outer_attrs = other.outer_attrs;
- locus = other.locus;
-
- // guard to prevent null dereference (only required if error state)
- if (other.variables_pattern != nullptr)
- variables_pattern = other.variables_pattern->clone_pattern ();
- else
- variables_pattern = nullptr;
-
- // guard to prevent null dereference (always required)
- if (other.init_expr != nullptr)
- init_expr = other.init_expr->clone_expr ();
- else
- init_expr = nullptr;
- if (other.type != nullptr)
- type = other.type->clone_type ();
- else
- type = nullptr;
-
- return *this;
- }
+ LetStmt &operator= (LetStmt const &other);
// move constructors
LetStmt (LetStmt &&other) = default;
@@ -144,11 +143,31 @@ public:
}
std::vector<AST::Attribute> &get_outer_attrs () { return outer_attrs; }
- std::unique_ptr<HIR::Type> &get_type () { return type; }
+ HIR::Type &get_type ()
+ {
+ rust_assert (*type);
+ return *type.value ();
+ }
+
+ const HIR::Type &get_type () const
+ {
+ rust_assert (*type);
+ return *type.value ();
+ }
+
+ HIR::Expr &get_init_expr ()
+ {
+ rust_assert (*init_expr);
+ return *init_expr.value ();
+ }
- std::unique_ptr<HIR::Expr> &get_init_expr () { return init_expr; }
+ const HIR::Expr &get_init_expr () const
+ {
+ rust_assert (*init_expr);
+ return *init_expr.value ();
+ }
- std::unique_ptr<HIR::Pattern> &get_pattern () { return variables_pattern; }
+ HIR::Pattern &get_pattern () { return *variables_pattern; }
bool is_item () const override final { return false; }
@@ -167,15 +186,10 @@ class ExprStmt : public Stmt
public:
ExprStmt (Analysis::NodeMapping mappings, std::unique_ptr<Expr> expr,
- location_t locus, bool must_be_unit)
- : Stmt (std::move (mappings)), expr (std::move (expr)), locus (locus),
- must_be_unit (must_be_unit)
- {}
+ location_t locus, bool must_be_unit);
ExprStmt (Analysis::NodeMapping mappings, std::unique_ptr<Expr> expr,
- location_t locus)
- : ExprStmt (std::move (mappings), std::move (expr), locus, false)
- {}
+ location_t locus);
std::string as_string () const override;
@@ -186,22 +200,13 @@ public:
bool is_item () const override final { return false; }
- std::unique_ptr<Expr> &get_expr () { return expr; }
+ Expr &get_expr () { return *expr; }
// Copy constructor with clone
- ExprStmt (ExprStmt const &other)
- : Stmt (other), expr (other.expr->clone_expr ()), locus (other.locus)
- {}
+ ExprStmt (ExprStmt const &other);
// Overloaded assignment operator to clone
- ExprStmt &operator= (ExprStmt const &other)
- {
- Stmt::operator= (other);
- expr = other.expr->clone_expr ();
- locus = other.locus;
-
- return *this;
- }
+ ExprStmt &operator= (ExprStmt const &other);
// move constructors
ExprStmt (ExprStmt &&other) = default;
diff --git a/gcc/rust/hir/tree/rust-hir-trait-bound.h b/gcc/rust/hir/tree/rust-hir-trait-bound.h
new file mode 100644
index 0000000..d20fa79
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-trait-bound.h
@@ -0,0 +1,87 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_TRAIT_BOUND_H
+#define RUST_HIR_TRAIT_BOUND_H
+
+#include "rust-hir-bound-abstract.h"
+#include "rust-hir-path.h"
+#include "rust-hir-generic-param.h"
+
+namespace Rust {
+namespace HIR {
+
+// A trait bound
+class TraitBound : public TypeParamBound
+{
+ bool in_parens;
+ BoundPolarity polarity;
+ std::vector<LifetimeParam> for_lifetimes;
+ TypePath type_path;
+ location_t locus;
+
+ Analysis::NodeMapping mappings;
+
+public:
+ // Returns whether trait bound has "for" lifetimes
+ bool has_for_lifetimes () const { return !for_lifetimes.empty (); }
+
+ TraitBound (Analysis::NodeMapping mapping, TypePath type_path,
+ location_t locus, bool in_parens = false,
+ BoundPolarity polarity = BoundPolarity::RegularBound,
+ std::vector<LifetimeParam> for_lifetimes
+ = std::vector<LifetimeParam> ())
+ : in_parens (in_parens), polarity (polarity),
+ for_lifetimes (std::move (for_lifetimes)),
+ type_path (std::move (type_path)), locus (locus), mappings (mapping)
+ {}
+
+ std::string as_string () const override;
+
+ location_t get_locus () const override final { return locus; }
+
+ void accept_vis (HIRFullVisitor &vis) override;
+
+ Analysis::NodeMapping get_mappings () const override final
+ {
+ return mappings;
+ }
+
+ std::vector<LifetimeParam> &get_for_lifetimes () { return for_lifetimes; }
+ bool get_in_parens () { return in_parens; }
+ BoundPolarity get_polarity () { return polarity; }
+
+ BoundType get_bound_type () const final override { return TRAITBOUND; }
+
+ TypePath &get_path () { return type_path; }
+
+ const TypePath &get_path () const { return type_path; }
+
+protected:
+ /* Use covariance to implement clone function as returning this object rather
+ * than base */
+ TraitBound *clone_type_param_bound_impl () const override
+ {
+ return new TraitBound (*this);
+ }
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/util/rust-make-unique.h b/gcc/rust/hir/tree/rust-hir-type-abstract.cc
index ef58991..901c603 100644
--- a/gcc/rust/util/rust-make-unique.h
+++ b/gcc/rust/hir/tree/rust-hir-type-abstract.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2020-2025 Free Software Foundation, Inc.
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
// This file is part of GCC.
@@ -16,20 +16,17 @@
// along with GCC; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-#ifndef RUST_MAKE_UNIQUE_H
-#define RUST_MAKE_UNIQUE_H
-
-#include "rust-system.h"
+#include "rust-hir-type-abstract.h"
+#include "rust-hir-trait-bound.h"
namespace Rust {
+namespace HIR {
-template <typename T, typename... Ts>
-std::unique_ptr<T>
-make_unique (Ts &&...params)
+std::unique_ptr<TraitBound>
+Type::to_trait_bound (bool in_parens ATTRIBUTE_UNUSED) const
{
- return std::unique_ptr<T> (new T (std::forward<Ts> (params)...));
+ return std::unique_ptr<TraitBound> (nullptr);
}
+} // namespace HIR
} // namespace Rust
-
-#endif // RUST_MAKE_UNIQUE_H
diff --git a/gcc/rust/hir/tree/rust-hir-type-abstract.h b/gcc/rust/hir/tree/rust-hir-type-abstract.h
new file mode 100644
index 0000000..6142d88
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-type-abstract.h
@@ -0,0 +1,80 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_TYPE_ABSTRACT_H
+#define RUST_HIR_TYPE_ABSTRACT_H
+
+#include "rust-hir-node.h"
+#include "rust-hir-visitable.h"
+#include "rust-system.h"
+#include "rust-hir-map.h"
+
+namespace Rust {
+namespace HIR {
+
+class TraitBound;
+
+// Base class for types as represented in HIR - abstract
+class Type : public Node, public FullVisitable
+{
+public:
+ using FullVisitable::accept_vis;
+ // Unique pointer custom clone function
+ std::unique_ptr<Type> clone_type () const
+ {
+ return std::unique_ptr<Type> (clone_type_impl ());
+ }
+
+ // virtual destructor
+ virtual ~Type () {}
+
+ BaseKind get_hir_kind () override final { return TYPE; }
+
+ virtual std::string as_string () const = 0;
+
+ /* HACK: convert to trait bound. Virtual method overriden by classes that
+ * enable this. */
+ virtual std::unique_ptr<TraitBound>
+ to_trait_bound (bool in_parens ATTRIBUTE_UNUSED) const;
+ /* as pointer, shouldn't require definition beforehand, only forward
+ * declaration. */
+
+ virtual void accept_vis (HIRTypeVisitor &vis) = 0;
+
+ virtual const Analysis::NodeMapping &get_mappings () const
+ {
+ return mappings;
+ }
+ virtual location_t get_locus () const { return locus; }
+
+protected:
+ Type (Analysis::NodeMapping mappings, location_t locus)
+ : mappings (mappings), locus (locus)
+ {}
+
+ // Clone function implementation as pure virtual method
+ virtual Type *clone_type_impl () const = 0;
+
+ Analysis::NodeMapping mappings;
+ location_t locus;
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-type-no-bounds.h b/gcc/rust/hir/tree/rust-hir-type-no-bounds.h
new file mode 100644
index 0000000..b86ff30
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-type-no-bounds.h
@@ -0,0 +1,58 @@
+
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_TYPE_NO_BOUNDS_H
+#define RUST_HIR_TYPE_NO_BOUNDS_H
+
+#include "rust-hir-type-abstract.h"
+
+namespace Rust {
+namespace HIR {
+
+// A type without parentheses? - abstract
+class TypeNoBounds : public Type
+{
+public:
+ // Unique pointer custom clone function
+ std::unique_ptr<TypeNoBounds> clone_type_no_bounds () const
+ {
+ return std::unique_ptr<TypeNoBounds> (clone_type_no_bounds_impl ());
+ }
+
+protected:
+ TypeNoBounds (Analysis::NodeMapping mappings, location_t locus)
+ : Type (mappings, locus)
+ {}
+
+ // Clone function implementation as pure virtual method
+ virtual TypeNoBounds *clone_type_no_bounds_impl () const = 0;
+
+ /* Save having to specify two clone methods in derived classes by making type
+ * clone return typenobounds clone. Hopefully won't affect performance too
+ * much. */
+ TypeNoBounds *clone_type_impl () const override
+ {
+ return clone_type_no_bounds_impl ();
+ }
+};
+
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-type.cc b/gcc/rust/hir/tree/rust-hir-type.cc
new file mode 100644
index 0000000..689d86b
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-type.cc
@@ -0,0 +1,289 @@
+
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include "rust-hir-type.h"
+
+namespace Rust {
+namespace HIR {
+
+ImplTraitType::ImplTraitType (
+ Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
+ location_t locus)
+ : Type (mappings, locus), type_param_bounds (std::move (type_param_bounds))
+{}
+
+ImplTraitType::ImplTraitType (ImplTraitType const &other)
+ : Type (other.mappings, other.locus)
+{
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+}
+
+ImplTraitType &
+ImplTraitType::operator= (ImplTraitType const &other)
+{
+ locus = other.locus;
+ mappings = other.mappings;
+
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+
+ return *this;
+}
+
+TraitObjectType::TraitObjectType (
+ Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
+ location_t locus, bool is_dyn_dispatch)
+ : Type (mappings, locus), has_dyn (is_dyn_dispatch),
+ type_param_bounds (std::move (type_param_bounds))
+{}
+
+TraitObjectType::TraitObjectType (TraitObjectType const &other)
+ : Type (other.mappings, other.locus), has_dyn (other.has_dyn)
+{
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+}
+
+TraitObjectType &
+TraitObjectType::operator= (TraitObjectType const &other)
+{
+ mappings = other.mappings;
+ has_dyn = other.has_dyn;
+ locus = other.locus;
+ type_param_bounds.reserve (other.type_param_bounds.size ());
+ for (const auto &e : other.type_param_bounds)
+ type_param_bounds.push_back (e->clone_type_param_bound ());
+
+ return *this;
+}
+
+ParenthesisedType::ParenthesisedType (Analysis::NodeMapping mappings,
+ std::unique_ptr<Type> type_inside_parens,
+ location_t locus)
+ : TypeNoBounds (mappings, locus),
+ type_in_parens (std::move (type_inside_parens))
+{}
+
+ParenthesisedType::ParenthesisedType (ParenthesisedType const &other)
+ : TypeNoBounds (other.mappings, other.locus),
+ type_in_parens (other.type_in_parens->clone_type ())
+{}
+
+ParenthesisedType &
+ParenthesisedType::operator= (ParenthesisedType const &other)
+{
+ mappings = other.mappings;
+ type_in_parens = other.type_in_parens->clone_type ();
+ locus = other.locus;
+ return *this;
+}
+
+std::unique_ptr<TraitBound>
+ParenthesisedType::to_trait_bound (bool in_parens ATTRIBUTE_UNUSED) const
+{
+ /* NOTE: obviously it is unknown whether the internal type is a trait bound
+ * due to polymorphism, so just let the internal type handle it. As
+ * parenthesised type, it must be in parentheses. */
+ return type_in_parens->to_trait_bound (true);
+}
+
+TupleType::TupleType (Analysis::NodeMapping mappings,
+ std::vector<std::unique_ptr<Type>> elems,
+ location_t locus)
+ : TypeNoBounds (mappings, locus), elems (std::move (elems))
+{}
+
+TupleType::TupleType (TupleType const &other)
+ : TypeNoBounds (other.mappings, other.locus)
+{
+ mappings = other.mappings;
+ elems.reserve (other.elems.size ());
+ for (const auto &e : other.elems)
+ elems.push_back (e->clone_type ());
+}
+
+TupleType &
+TupleType::operator= (TupleType const &other)
+{
+ locus = other.locus;
+
+ elems.reserve (other.elems.size ());
+ for (const auto &e : other.elems)
+ elems.push_back (e->clone_type ());
+
+ return *this;
+}
+
+NeverType::NeverType (Analysis::NodeMapping mappings, location_t locus)
+ : TypeNoBounds (mappings, locus)
+{}
+
+RawPointerType::RawPointerType (Analysis::NodeMapping mappings, Mutability mut,
+ std::unique_ptr<Type> type, location_t locus)
+ : TypeNoBounds (mappings, locus), mut (mut), type (std::move (type))
+{}
+
+RawPointerType::RawPointerType (RawPointerType const &other)
+ : TypeNoBounds (other.mappings, other.locus), mut (other.mut),
+ type (other.type->clone_type ())
+{}
+
+RawPointerType &
+RawPointerType::operator= (RawPointerType const &other)
+{
+ mappings = other.mappings;
+ mut = other.mut;
+ type = other.type->clone_type ();
+ locus = other.locus;
+ return *this;
+}
+
+ReferenceType::ReferenceType (Analysis::NodeMapping mappings, Mutability mut,
+ std::unique_ptr<Type> type_no_bounds,
+ location_t locus, Lifetime lifetime)
+ : TypeNoBounds (mappings, locus), lifetime (std::move (lifetime)), mut (mut),
+ type (std::move (type_no_bounds))
+{}
+
+ReferenceType::ReferenceType (ReferenceType const &other)
+ : TypeNoBounds (other.mappings, other.locus), lifetime (other.lifetime),
+ mut (other.mut), type (other.type->clone_type ())
+{}
+
+ReferenceType &
+ReferenceType::operator= (ReferenceType const &other)
+{
+ mappings = other.mappings;
+ lifetime = other.lifetime;
+ mut = other.mut;
+ type = other.type->clone_type ();
+ locus = other.locus;
+
+ return *this;
+}
+
+ArrayType::ArrayType (Analysis::NodeMapping mappings,
+ std::unique_ptr<Type> type,
+ std::unique_ptr<Expr> array_size, location_t locus)
+ : TypeNoBounds (mappings, locus), elem_type (std::move (type)),
+ size (std::move (array_size))
+{}
+
+ArrayType::ArrayType (ArrayType const &other)
+ : TypeNoBounds (other.mappings, other.locus),
+ elem_type (other.elem_type->clone_type ()), size (other.size->clone_expr ())
+{}
+
+ArrayType &
+ArrayType::operator= (ArrayType const &other)
+{
+ mappings = other.mappings;
+ elem_type = other.elem_type->clone_type ();
+ size = other.size->clone_expr ();
+ locus = other.locus;
+ return *this;
+}
+
+SliceType::SliceType (Analysis::NodeMapping mappings,
+ std::unique_ptr<Type> type, location_t locus)
+ : TypeNoBounds (mappings, locus), elem_type (std::move (type))
+{}
+
+SliceType::SliceType (SliceType const &other)
+ : TypeNoBounds (other.mappings, other.locus),
+ elem_type (other.elem_type->clone_type ())
+{}
+
+SliceType &
+SliceType::operator= (SliceType const &other)
+{
+ mappings = other.mappings;
+ elem_type = other.elem_type->clone_type ();
+ locus = other.locus;
+
+ return *this;
+}
+
+InferredType::InferredType (Analysis::NodeMapping mappings, location_t locus)
+ : TypeNoBounds (mappings, locus)
+{}
+
+MaybeNamedParam::MaybeNamedParam (Identifier name, ParamKind param_kind,
+ std::unique_ptr<Type> param_type,
+ location_t locus)
+ : param_type (std::move (param_type)), param_kind (param_kind),
+ name (std::move (name)), locus (locus)
+{}
+
+MaybeNamedParam::MaybeNamedParam (MaybeNamedParam const &other)
+ : param_type (other.param_type->clone_type ()), param_kind (other.param_kind),
+ name (other.name), locus (other.locus)
+{}
+
+MaybeNamedParam &
+MaybeNamedParam::operator= (MaybeNamedParam const &other)
+{
+ name = other.name;
+ param_kind = other.param_kind;
+ param_type = other.param_type->clone_type ();
+ locus = other.locus;
+
+ return *this;
+}
+
+BareFunctionType::BareFunctionType (
+ Analysis::NodeMapping mappings, std::vector<LifetimeParam> lifetime_params,
+ FunctionQualifiers qualifiers, std::vector<MaybeNamedParam> named_params,
+ bool is_variadic, std::unique_ptr<Type> type, location_t locus)
+ : TypeNoBounds (mappings, locus), for_lifetimes (std::move (lifetime_params)),
+ function_qualifiers (std::move (qualifiers)),
+ params (std::move (named_params)), is_variadic (is_variadic),
+ return_type (std::move (type))
+{}
+
+BareFunctionType::BareFunctionType (BareFunctionType const &other)
+ : TypeNoBounds (other.mappings, other.locus),
+ for_lifetimes (other.for_lifetimes),
+ function_qualifiers (other.function_qualifiers), params (other.params),
+ is_variadic (other.is_variadic),
+ return_type (other.return_type->clone_type ())
+{}
+
+BareFunctionType &
+BareFunctionType::operator= (BareFunctionType const &other)
+{
+ mappings = other.mappings;
+ for_lifetimes = other.for_lifetimes;
+ function_qualifiers = other.function_qualifiers;
+ params = other.params;
+ is_variadic = other.is_variadic;
+ return_type = other.return_type->clone_type ();
+ locus = other.locus;
+
+ return *this;
+}
+
+} // namespace HIR
+} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir-type.h b/gcc/rust/hir/tree/rust-hir-type.h
index e4a9754..e231d78 100644
--- a/gcc/rust/hir/tree/rust-hir-type.h
+++ b/gcc/rust/hir/tree/rust-hir-type.h
@@ -19,73 +19,13 @@
#ifndef RUST_HIR_TYPE_H
#define RUST_HIR_TYPE_H
+#include "rust-hir-type-abstract.h"
#include "rust-common.h"
-#include "rust-hir.h"
-#include "rust-hir-path.h"
+#include "rust-hir-trait-bound.h"
+#include "rust-hir-item.h"
namespace Rust {
namespace HIR {
-// definitions moved to rust-ast.h
-class TypeParamBound;
-class Lifetime;
-
-// A trait bound
-class TraitBound : public TypeParamBound
-{
- bool in_parens;
- BoundPolarity polarity;
- std::vector<LifetimeParam> for_lifetimes;
- TypePath type_path;
- location_t locus;
-
- Analysis::NodeMapping mappings;
-
-public:
- // Returns whether trait bound has "for" lifetimes
- bool has_for_lifetimes () const { return !for_lifetimes.empty (); }
-
- TraitBound (Analysis::NodeMapping mapping, TypePath type_path,
- location_t locus, bool in_parens = false,
- BoundPolarity polarity = BoundPolarity::RegularBound,
- std::vector<LifetimeParam> for_lifetimes
- = std::vector<LifetimeParam> ())
- : in_parens (in_parens), polarity (polarity),
- for_lifetimes (std::move (for_lifetimes)),
- type_path (std::move (type_path)), locus (locus), mappings (mapping)
- {}
-
- std::string as_string () const override;
-
- location_t get_locus () const override final { return locus; }
-
- void accept_vis (HIRFullVisitor &vis) override;
-
- Analysis::NodeMapping get_mappings () const override final
- {
- return mappings;
- }
-
- std::vector<LifetimeParam> &get_for_lifetimes () { return for_lifetimes; }
- bool get_in_parens () { return in_parens; }
- BoundPolarity get_polarity () { return polarity; }
-
- BoundType get_bound_type () const final override { return TRAITBOUND; }
-
- TypePath &get_path () { return type_path; }
-
- const TypePath &get_path () const { return type_path; }
-
-protected:
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- TraitBound *clone_type_param_bound_impl () const override
- {
- return new TraitBound (*this);
- }
-};
-
-// definition moved to rust-ast.h
-class TypeNoBounds;
// An impl trait? Poor reference material here.
class ImplTraitType : public Type
@@ -105,31 +45,13 @@ protected:
public:
ImplTraitType (Analysis::NodeMapping mappings,
std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
- location_t locus)
- : Type (mappings, locus), type_param_bounds (std::move (type_param_bounds))
- {}
+ location_t locus);
// copy constructor with vector clone
- ImplTraitType (ImplTraitType const &other)
- : Type (other.mappings, other.locus)
- {
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
- }
+ ImplTraitType (ImplTraitType const &other);
// overloaded assignment operator to clone
- ImplTraitType &operator= (ImplTraitType const &other)
- {
- locus = other.locus;
- mappings = other.mappings;
-
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
-
- return *this;
- }
+ ImplTraitType &operator= (ImplTraitType const &other);
// move constructors
ImplTraitType (ImplTraitType &&other) = default;
@@ -162,32 +84,13 @@ public:
TraitObjectType (
Analysis::NodeMapping mappings,
std::vector<std::unique_ptr<TypeParamBound>> type_param_bounds,
- location_t locus, bool is_dyn_dispatch)
- : Type (mappings, locus), has_dyn (is_dyn_dispatch),
- type_param_bounds (std::move (type_param_bounds))
- {}
+ location_t locus, bool is_dyn_dispatch);
// copy constructor with vector clone
- TraitObjectType (TraitObjectType const &other)
- : Type (other.mappings, other.locus), has_dyn (other.has_dyn)
- {
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
- }
+ TraitObjectType (TraitObjectType const &other);
// overloaded assignment operator to clone
- TraitObjectType &operator= (TraitObjectType const &other)
- {
- mappings = other.mappings;
- has_dyn = other.has_dyn;
- locus = other.locus;
- type_param_bounds.reserve (other.type_param_bounds.size ());
- for (const auto &e : other.type_param_bounds)
- type_param_bounds.push_back (e->clone_type_param_bound ());
-
- return *this;
- }
+ TraitObjectType &operator= (TraitObjectType const &other);
// move constructors
TraitObjectType (TraitObjectType &&other) = default;
@@ -233,26 +136,15 @@ protected:
public:
// Constructor uses Type pointer for polymorphism
ParenthesisedType (Analysis::NodeMapping mappings,
- std::unique_ptr<Type> type_inside_parens, location_t locus)
- : TypeNoBounds (mappings, locus),
- type_in_parens (std::move (type_inside_parens))
- {}
+ std::unique_ptr<Type> type_inside_parens,
+ location_t locus);
/* Copy constructor uses custom deep copy method for type to preserve
* polymorphism */
- ParenthesisedType (ParenthesisedType const &other)
- : TypeNoBounds (other.mappings, other.locus),
- type_in_parens (other.type_in_parens->clone_type ())
- {}
+ ParenthesisedType (ParenthesisedType const &other);
// overload assignment operator to use custom clone method
- ParenthesisedType &operator= (ParenthesisedType const &other)
- {
- mappings = other.mappings;
- type_in_parens = other.type_in_parens->clone_type ();
- locus = other.locus;
- return *this;
- }
+ ParenthesisedType &operator= (ParenthesisedType const &other);
// default move semantics
ParenthesisedType (ParenthesisedType &&other) = default;
@@ -264,14 +156,10 @@ public:
}
// Creates a trait bound (clone of this one's trait bound) - HACK
- TraitBound *to_trait_bound (bool in_parens ATTRIBUTE_UNUSED) const override
- {
- /* NOTE: obviously it is unknown whether the internal type is a trait bound
- * due to polymorphism, so just let the internal type handle it. As
- * parenthesised type, it must be in parentheses. */
- return type_in_parens->to_trait_bound (true);
- }
- std::unique_ptr<Type> &get_type_in_parens () { return type_in_parens; }
+ std::unique_ptr<TraitBound>
+ to_trait_bound (bool in_parens ATTRIBUTE_UNUSED) const override;
+
+ Type &get_type_in_parens () { return *type_in_parens; }
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTypeVisitor &vis) override;
};
@@ -308,8 +196,6 @@ public:
void accept_vis (HIRTypeVisitor &vis) override;
};
-class TypePath; // definition moved to "rust-path.h"
-
/* A type consisting of the "product" of others (the tuple's elements) in a
* specific order */
class TupleType : public TypeNoBounds
@@ -321,31 +207,13 @@ public:
bool is_unit_type () const { return elems.empty (); }
TupleType (Analysis::NodeMapping mappings,
- std::vector<std::unique_ptr<Type>> elems, location_t locus)
- : TypeNoBounds (mappings, locus), elems (std::move (elems))
- {}
+ std::vector<std::unique_ptr<Type>> elems, location_t locus);
// copy constructor with vector clone
- TupleType (TupleType const &other)
- : TypeNoBounds (other.mappings, other.locus)
- {
- mappings = other.mappings;
- elems.reserve (other.elems.size ());
- for (const auto &e : other.elems)
- elems.push_back (e->clone_type ());
- }
+ TupleType (TupleType const &other);
// overloaded assignment operator to clone
- TupleType &operator= (TupleType const &other)
- {
- locus = other.locus;
-
- elems.reserve (other.elems.size ());
- for (const auto &e : other.elems)
- elems.push_back (e->clone_type ());
-
- return *this;
- }
+ TupleType &operator= (TupleType const &other);
// move constructors
TupleType (TupleType &&other) = default;
@@ -390,9 +258,7 @@ protected:
}
public:
- NeverType (Analysis::NodeMapping mappings, location_t locus)
- : TypeNoBounds (mappings, locus)
- {}
+ NeverType (Analysis::NodeMapping mappings, location_t locus);
std::string as_string () const override { return "! (never type)"; }
@@ -410,25 +276,13 @@ private:
public:
// Constructor requires pointer for polymorphism reasons
RawPointerType (Analysis::NodeMapping mappings, Mutability mut,
- std::unique_ptr<Type> type, location_t locus)
- : TypeNoBounds (mappings, locus), mut (mut), type (std::move (type))
- {}
+ std::unique_ptr<Type> type, location_t locus);
// Copy constructor calls custom polymorphic clone function
- RawPointerType (RawPointerType const &other)
- : TypeNoBounds (other.mappings, other.locus), mut (other.mut),
- type (other.type->clone_type ())
- {}
+ RawPointerType (RawPointerType const &other);
// overload assignment operator to use custom clone method
- RawPointerType &operator= (RawPointerType const &other)
- {
- mappings = other.mappings;
- mut = other.mut;
- type = other.type->clone_type ();
- locus = other.locus;
- return *this;
- }
+ RawPointerType &operator= (RawPointerType const &other);
// default move semantics
RawPointerType (RawPointerType &&other) = default;
@@ -439,7 +293,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTypeVisitor &vis) override;
- std::unique_ptr<Type> &get_type () { return type; }
+ Type &get_type () { return *type; }
Mutability get_mut () const { return mut; }
@@ -447,7 +301,7 @@ public:
bool is_const () const { return mut == Mutability::Imm; }
- std::unique_ptr<Type> &get_base_type () { return type; }
+ Type &get_base_type () { return *type; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -484,28 +338,13 @@ public:
// Constructor
ReferenceType (Analysis::NodeMapping mappings, Mutability mut,
std::unique_ptr<Type> type_no_bounds, location_t locus,
- Lifetime lifetime)
- : TypeNoBounds (mappings, locus), lifetime (std::move (lifetime)),
- mut (mut), type (std::move (type_no_bounds))
- {}
+ Lifetime lifetime);
// Copy constructor with custom clone method
- ReferenceType (ReferenceType const &other)
- : TypeNoBounds (other.mappings, other.locus), lifetime (other.lifetime),
- mut (other.mut), type (other.type->clone_type ())
- {}
+ ReferenceType (ReferenceType const &other);
// Operator overload assignment operator to custom clone the unique pointer
- ReferenceType &operator= (ReferenceType const &other)
- {
- mappings = other.mappings;
- lifetime = other.lifetime;
- mut = other.mut;
- type = other.type->clone_type ();
- locus = other.locus;
-
- return *this;
- }
+ ReferenceType &operator= (ReferenceType const &other);
// move constructors
ReferenceType (ReferenceType &&other) = default;
@@ -520,7 +359,7 @@ public:
Mutability get_mut () const { return mut; }
- std::unique_ptr<Type> &get_base_type () { return type; }
+ Type &get_base_type () { return *type; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -547,27 +386,13 @@ class ArrayType : public TypeNoBounds
public:
// Constructor requires pointers for polymorphism
ArrayType (Analysis::NodeMapping mappings, std::unique_ptr<Type> type,
- std::unique_ptr<Expr> array_size, location_t locus)
- : TypeNoBounds (mappings, locus), elem_type (std::move (type)),
- size (std::move (array_size))
- {}
+ std::unique_ptr<Expr> array_size, location_t locus);
// Copy constructor requires deep copies of both unique pointers
- ArrayType (ArrayType const &other)
- : TypeNoBounds (other.mappings, other.locus),
- elem_type (other.elem_type->clone_type ()),
- size (other.size->clone_expr ())
- {}
+ ArrayType (ArrayType const &other);
// Overload assignment operator to deep copy pointers
- ArrayType &operator= (ArrayType const &other)
- {
- mappings = other.mappings;
- elem_type = other.elem_type->clone_type ();
- size = other.size->clone_expr ();
- locus = other.locus;
- return *this;
- }
+ ArrayType &operator= (ArrayType const &other);
// move constructors
ArrayType (ArrayType &&other) = default;
@@ -578,9 +403,9 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTypeVisitor &vis) override;
- std::unique_ptr<Type> &get_element_type () { return elem_type; }
+ Type &get_element_type () { return *elem_type; }
- std::unique_ptr<Expr> &get_size_expr () { return size; }
+ Expr &get_size_expr () { return *size; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -604,25 +429,13 @@ class SliceType : public TypeNoBounds
public:
// Constructor requires pointer for polymorphism
SliceType (Analysis::NodeMapping mappings, std::unique_ptr<Type> type,
- location_t locus)
- : TypeNoBounds (mappings, locus), elem_type (std::move (type))
- {}
+ location_t locus);
// Copy constructor requires deep copy of Type smart pointer
- SliceType (SliceType const &other)
- : TypeNoBounds (other.mappings, other.locus),
- elem_type (other.elem_type->clone_type ())
- {}
+ SliceType (SliceType const &other);
// Overload assignment operator to deep copy
- SliceType &operator= (SliceType const &other)
- {
- mappings = other.mappings;
- elem_type = other.elem_type->clone_type ();
- locus = other.locus;
-
- return *this;
- }
+ SliceType &operator= (SliceType const &other);
// move constructors
SliceType (SliceType &&other) = default;
@@ -633,7 +446,7 @@ public:
void accept_vis (HIRFullVisitor &vis) override;
void accept_vis (HIRTypeVisitor &vis) override;
- std::unique_ptr<Type> &get_element_type () { return elem_type; }
+ Type &get_element_type () { return *elem_type; }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -669,9 +482,7 @@ protected:
}
public:
- InferredType (Analysis::NodeMapping mappings, location_t locus)
- : TypeNoBounds (mappings, locus)
- {}
+ InferredType (Analysis::NodeMapping mappings, location_t locus);
std::string as_string () const override;
@@ -679,8 +490,6 @@ public:
void accept_vis (HIRTypeVisitor &vis) override;
};
-class QualifiedPathInType; // definition moved to "rust-path.h"
-
// A possibly named param used in a BaseFunctionType
struct MaybeNamedParam
{
@@ -702,29 +511,15 @@ private:
public:
MaybeNamedParam (Identifier name, ParamKind param_kind,
- std::unique_ptr<Type> param_type, location_t locus)
- : param_type (std::move (param_type)), param_kind (param_kind),
- name (std::move (name)), locus (locus)
- {}
+ std::unique_ptr<Type> param_type, location_t locus);
// Copy constructor with clone
- MaybeNamedParam (MaybeNamedParam const &other)
- : param_type (other.param_type->clone_type ()),
- param_kind (other.param_kind), name (other.name), locus (other.locus)
- {}
+ MaybeNamedParam (MaybeNamedParam const &other);
~MaybeNamedParam () = default;
// Overloaded assignment operator with clone
- MaybeNamedParam &operator= (MaybeNamedParam const &other)
- {
- name = other.name;
- param_kind = other.param_kind;
- param_type = other.param_type->clone_type ();
- locus = other.locus;
-
- return *this;
- }
+ MaybeNamedParam &operator= (MaybeNamedParam const &other);
// move constructors
MaybeNamedParam (MaybeNamedParam &&other) = default;
@@ -743,7 +538,7 @@ public:
location_t get_locus () const { return locus; }
- std::unique_ptr<Type> &get_type () { return param_type; }
+ Type &get_type () { return *param_type; }
ParamKind get_param_kind () const { return param_kind; }
@@ -777,36 +572,13 @@ public:
std::vector<LifetimeParam> lifetime_params,
FunctionQualifiers qualifiers,
std::vector<MaybeNamedParam> named_params, bool is_variadic,
- std::unique_ptr<Type> type, location_t locus)
- : TypeNoBounds (mappings, locus),
- for_lifetimes (std::move (lifetime_params)),
- function_qualifiers (std::move (qualifiers)),
- params (std::move (named_params)), is_variadic (is_variadic),
- return_type (std::move (type))
- {}
+ std::unique_ptr<Type> type, location_t locus);
// Copy constructor with clone
- BareFunctionType (BareFunctionType const &other)
- : TypeNoBounds (other.mappings, other.locus),
- for_lifetimes (other.for_lifetimes),
- function_qualifiers (other.function_qualifiers), params (other.params),
- is_variadic (other.is_variadic),
- return_type (other.return_type->clone_type ())
- {}
+ BareFunctionType (BareFunctionType const &other);
// Overload assignment operator to deep copy
- BareFunctionType &operator= (BareFunctionType const &other)
- {
- mappings = other.mappings;
- for_lifetimes = other.for_lifetimes;
- function_qualifiers = other.function_qualifiers;
- params = other.params;
- is_variadic = other.is_variadic;
- return_type = other.return_type->clone_type ();
- locus = other.locus;
-
- return *this;
- }
+ BareFunctionType &operator= (BareFunctionType const &other);
// move constructors
BareFunctionType (BareFunctionType &&other) = default;
@@ -828,7 +600,7 @@ public:
}
// TODO: would a "vis_type" be better?
- std::unique_ptr<Type> &get_return_type () { return return_type; }
+ Type &get_return_type () { return *return_type; }
protected:
/* Use covariance to implement clone function as returning this object rather
diff --git a/gcc/rust/hir/tree/rust-hir-visibility.h b/gcc/rust/hir/tree/rust-hir-visibility.h
new file mode 100644
index 0000000..a750d88
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-visibility.h
@@ -0,0 +1,80 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_VISIBILITY_H
+#define RUST_HIR_VISIBILITY_H
+
+#include "rust-hir-simple-path.h"
+
+namespace Rust {
+namespace HIR {
+// Visibility of an item
+struct Visibility
+{
+public:
+ enum VisType
+ {
+ PRIVATE,
+ PUBLIC,
+ RESTRICTED,
+ ERROR,
+ };
+
+private:
+ VisType vis_type;
+ HIR::SimplePath path;
+ location_t locus;
+
+ // should this store location info?
+
+public:
+ Visibility (VisType vis_type,
+ HIR::SimplePath path = HIR::SimplePath::create_empty (),
+ location_t locus = UNDEF_LOCATION)
+ : vis_type (vis_type), path (std::move (path)), locus (locus)
+ {}
+
+ // Returns whether visibility is in an error state.
+ bool is_error () const { return vis_type == ERROR; }
+
+ // Does the current visibility refer to a simple `pub <item>` entirely public
+ bool is_public () const { return vis_type == PUBLIC; }
+
+ // Is the current visibility public restricted to a certain path
+ bool is_restricted () const { return vis_type == RESTRICTED; }
+
+ // Creates an error visibility.
+ static Visibility create_error ()
+ {
+ return Visibility (ERROR, HIR::SimplePath::create_empty ());
+ }
+
+ VisType get_vis_type () const { return vis_type; }
+
+ const HIR::SimplePath &get_path () const
+ {
+ rust_assert (!is_error ());
+ return path;
+ }
+
+ std::string as_string () const;
+};
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-visitable.h b/gcc/rust/hir/tree/rust-hir-visitable.h
new file mode 100644
index 0000000..9c05cbf
--- /dev/null
+++ b/gcc/rust/hir/tree/rust-hir-visitable.h
@@ -0,0 +1,41 @@
+// Copyright (C) 2020-2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#ifndef RUST_HIR_VISITABLE_H
+#define RUST_HIR_VISITABLE_H
+
+namespace Rust {
+namespace HIR {
+
+class HIRFullVisitor;
+class HIRTraitItemVisitor;
+class HIRImplVisitor;
+class HIRStmtVisitor;
+class HIRExpressionVisitor;
+class HIRTypeVisitor;
+class HIRPatternVisitor;
+
+class FullVisitable
+{
+public:
+ virtual void accept_vis (HIRFullVisitor &vis) = 0;
+};
+} // namespace HIR
+} // namespace Rust
+
+#endif
diff --git a/gcc/rust/hir/tree/rust-hir-visitor.h b/gcc/rust/hir/tree/rust-hir-visitor.h
index e69e951..33e6b7b 100644
--- a/gcc/rust/hir/tree/rust-hir-visitor.h
+++ b/gcc/rust/hir/tree/rust-hir-visitor.h
@@ -19,7 +19,6 @@
#ifndef RUST_HIR_VISITOR_H
#define RUST_HIR_VISITOR_H
-#include "rust-hir-expr.h"
#include "rust-hir-full-decls.h"
namespace Rust {
@@ -81,8 +80,6 @@ public:
virtual void visit (WhileLetLoopExpr &expr) = 0;
virtual void visit (IfExpr &expr) = 0;
virtual void visit (IfExprConseqElse &expr) = 0;
- virtual void visit (IfLetExpr &expr) = 0;
- virtual void visit (IfLetExprConseqElse &expr) = 0;
virtual void visit (MatchExpr &expr) = 0;
virtual void visit (AwaitExpr &expr) = 0;
virtual void visit (AsyncBlockExpr &expr) = 0;
@@ -219,8 +216,6 @@ public:
virtual void visit (WhileLetLoopExpr &) override {}
virtual void visit (IfExpr &) override {}
virtual void visit (IfExprConseqElse &) override {}
- virtual void visit (IfLetExpr &) override {}
- virtual void visit (IfLetExprConseqElse &) override {}
virtual void visit (MatchExpr &) override {}
virtual void visit (AwaitExpr &) override {}
@@ -448,8 +443,6 @@ public:
virtual void visit (WhileLetLoopExpr &expr) = 0;
virtual void visit (IfExpr &expr) = 0;
virtual void visit (IfExprConseqElse &expr) = 0;
- virtual void visit (IfLetExpr &expr) = 0;
- virtual void visit (IfLetExprConseqElse &expr) = 0;
virtual void visit (InlineAsm &expr) = 0;
virtual void visit (MatchExpr &expr) = 0;
virtual void visit (AwaitExpr &expr) = 0;
diff --git a/gcc/rust/hir/tree/rust-hir.cc b/gcc/rust/hir/tree/rust-hir.cc
index f05e506..da1c8b9 100644
--- a/gcc/rust/hir/tree/rust-hir.cc
+++ b/gcc/rust/hir/tree/rust-hir.cc
@@ -70,6 +70,33 @@ get_string_in_delims (std::string str_input, AST::DelimType delim_type)
rust_unreachable ();
}
+Crate::Crate (std::vector<std::unique_ptr<Item>> items,
+ AST::AttrVec inner_attrs, Analysis::NodeMapping mappings)
+ : WithInnerAttrs (std::move (inner_attrs)), items (std::move (items)),
+ mappings (mappings)
+{}
+
+Crate::Crate (Crate const &other)
+ : WithInnerAttrs (other.inner_attrs), mappings (other.mappings)
+{
+ items.reserve (other.items.size ());
+ for (const auto &e : other.items)
+ items.push_back (e->clone_item ());
+}
+
+Crate &
+Crate::operator= (Crate const &other)
+{
+ inner_attrs = other.inner_attrs;
+ mappings = other.mappings;
+
+ items.reserve (other.items.size ());
+ for (const auto &e : other.items)
+ items.push_back (e->clone_item ());
+
+ return *this;
+}
+
std::string
Crate::as_string () const
{
@@ -1572,41 +1599,6 @@ IfExprConseqElse::as_string () const
}
std::string
-IfLetExpr::as_string () const
-{
- std::string str ("IfLetExpr: ");
-
- str += "\n Condition match arm patterns: ";
- if (match_arm_patterns.empty ())
- {
- str += "none";
- }
- else
- {
- for (const auto &pattern : match_arm_patterns)
- {
- str += "\n " + pattern->as_string ();
- }
- }
-
- str += "\n Scrutinee expr: " + value->as_string ();
-
- str += "\n If let block expr: " + if_block->as_string ();
-
- return str;
-}
-
-std::string
-IfLetExprConseqElse::as_string () const
-{
- std::string str = IfLetExpr::as_string ();
-
- str += "\n Else expr: " + else_block->as_string ();
-
- return str;
-}
-
-std::string
RangeFromToInclExpr::as_string () const
{
return from->as_string () + "..=" + to->as_string ();
@@ -2186,7 +2178,7 @@ TypeParam::as_string () const
}
else
{
- str += type->as_string ();
+ str += type.value ()->as_string ();
}
return str;
@@ -2677,12 +2669,12 @@ LetStmt::as_string () const
if (has_type ())
{
- str += " : " + type->as_string ();
+ str += " : " + get_type ().as_string ();
}
if (has_init_expr ())
{
- str += " = " + init_expr->as_string ();
+ str += " = " + get_init_expr ().as_string ();
}
return str;
@@ -2712,14 +2704,14 @@ Expr::as_string () const
}
// hopefully definition here will prevent circular dependency issue
-TraitBound *
+std::unique_ptr<TraitBound>
TypePath::to_trait_bound (bool in_parens) const
{
// create clone FIXME is this required? or is copy constructor automatically
// called?
TypePath copy (*this);
- return new TraitBound (mappings, std::move (copy), copy.get_locus (),
- in_parens);
+ return std::make_unique<TraitBound> (mappings, std::move (copy),
+ copy.get_locus (), in_parens);
}
std::string
@@ -3047,7 +3039,7 @@ StructExprStructFields::as_string () const
}
else
{
- str += struct_base->as_string ();
+ str += (*struct_base)->as_string ();
}
return str;
@@ -4030,6 +4022,12 @@ StructExprStructBase::accept_vis (HIRFullVisitor &vis)
}
void
+StructExprStructBase::accept_vis (HIRExpressionVisitor &vis)
+{
+ vis.visit (*this);
+}
+
+void
CallExpr::accept_vis (HIRFullVisitor &vis)
{
vis.visit (*this);
@@ -4150,18 +4148,6 @@ IfExprConseqElse::accept_vis (HIRFullVisitor &vis)
}
void
-IfLetExpr::accept_vis (HIRFullVisitor &vis)
-{
- vis.visit (*this);
-}
-
-void
-IfLetExprConseqElse::accept_vis (HIRFullVisitor &vis)
-{
- vis.visit (*this);
-}
-
-void
MatchExpr::accept_vis (HIRFullVisitor &vis)
{
vis.visit (*this);
@@ -4912,18 +4898,6 @@ RangeFromToInclExpr::accept_vis (HIRExpressionVisitor &vis)
}
void
-IfLetExprConseqElse::accept_vis (HIRExpressionVisitor &vis)
-{
- vis.visit (*this);
-}
-
-void
-IfLetExpr::accept_vis (HIRExpressionVisitor &vis)
-{
- vis.visit (*this);
-}
-
-void
IfExprConseqElse::accept_vis (HIRExpressionVisitor &vis)
{
vis.visit (*this);
@@ -5211,20 +5185,5 @@ StaticItem::accept_vis (HIRVisItemVisitor &vis)
vis.visit (*this);
}
-std::string
-ConstGenericParam::as_string () const
-{
- auto result = "ConstGenericParam: " + name + " : " + type->as_string ();
-
- if (default_expression)
- result += " = " + default_expression->as_string ();
-
- return result;
-}
-
-void
-ConstGenericParam::accept_vis (HIRFullVisitor &)
-{}
-
} // namespace HIR
} // namespace Rust
diff --git a/gcc/rust/hir/tree/rust-hir.h b/gcc/rust/hir/tree/rust-hir.h
index f8eb22d..ffab5ff 100644
--- a/gcc/rust/hir/tree/rust-hir.h
+++ b/gcc/rust/hir/tree/rust-hir.h
@@ -19,779 +19,24 @@
#ifndef RUST_HIR_BASE_H
#define RUST_HIR_BASE_H
-#include "rust-ast.h"
#include "rust-system.h"
+#include "rust-ast.h"
+#include "rust-hir-visitable.h"
+#include "rust-hir-attrs.h"
+
#include "rust-token.h"
+
#include "rust-location.h"
+
#include "rust-hir-map.h"
#include "rust-diagnostics.h"
+#include "rust-hir-bound.h"
namespace Rust {
+
typedef int TupleIndex;
namespace HIR {
-// foward decl: ast visitor
-class HIRFullVisitor;
-class HIRStmtVisitor;
-class HIRTraitItemVisitor;
-class HIRExternalItemVisitor;
-class HIRVisItemVisitor;
-class HIRExpressionVisitor;
-class HIRPatternVisitor;
-class HIRImplVisitor;
-class HIRTypeVisitor;
-
-class WithOuterAttrs
-{
-protected:
- AST::AttrVec outer_attrs;
-
-public:
- AST::AttrVec &get_outer_attrs () { return outer_attrs; }
- const AST::AttrVec &get_outer_attrs () const { return outer_attrs; }
-
- WithOuterAttrs (AST::AttrVec outer_attrs)
- : outer_attrs (std::move (outer_attrs)){};
-};
-
-class WithInnerAttrs
-{
-protected:
- AST::AttrVec inner_attrs;
-
-public:
- AST::AttrVec get_inner_attrs () const { return inner_attrs; }
- WithInnerAttrs (AST::AttrVec inner_attrs)
- : inner_attrs (std::move (inner_attrs)){};
-};
-
-class FullVisitable
-{
-public:
- virtual void accept_vis (HIRFullVisitor &vis) = 0;
-};
-
-// forward decl for use in token tree method
-class Token;
-
-class Node
-{
-public:
- // Kind for downcasting various HIR nodes to other base classes when visiting
- // them
- enum BaseKind
- {
- /* class ExternalItem */
- EXTERNAL,
- /* class TraitItem */
- TRAIT_ITEM,
- /* class VisItem */
- VIS_ITEM,
- /* class Item */
- ITEM,
- /* class ImplItem */
- IMPL,
- /* class Type */
- TYPE,
- /* class Stmt */
- STMT,
- /* class Expr */
- EXPR,
- /* class Pattern */
- PATTERN,
- };
-
- /**
- * Get the kind of HIR node we are dealing with. This is useful for
- * downcasting to more precise types when necessary, i.e going from an `Item*`
- * to a `VisItem*`
- */
- virtual BaseKind get_hir_kind () = 0;
-};
-
-// A literal - value with a type. Used in LiteralExpr and LiteralPattern.
-struct Literal
-{
-public:
- enum LitType
- {
- CHAR,
- STRING,
- BYTE,
- BYTE_STRING,
- INT,
- FLOAT,
- BOOL
- };
-
-private:
- std::string value_as_string;
- LitType type;
- PrimitiveCoreType type_hint;
-
-public:
- std::string as_string () const { return value_as_string; }
-
- LitType get_lit_type () const { return type; }
-
- PrimitiveCoreType get_type_hint () const { return type_hint; }
-
- Literal (std::string value_as_string, LitType type,
- PrimitiveCoreType type_hint)
- : value_as_string (std::move (value_as_string)), type (type),
- type_hint (type_hint)
- {}
-
- static Literal create_error ()
- {
- return Literal ("", CHAR, PrimitiveCoreType::CORETYPE_UNKNOWN);
- }
-
- void set_lit_type (LitType lt) { type = lt; }
-
- // Returns whether literal is in an invalid state.
- bool is_error () const { return value_as_string == ""; }
-
- bool is_equal (Literal &other)
- {
- return value_as_string == other.value_as_string && type == other.type
- && type_hint == other.type_hint;
- }
-};
-
-/* Base statement abstract class. Note that most "statements" are not allowed in
- * top-level module scope - only a subclass of statements called "items" are. */
-class Stmt : public Node, public FullVisitable
-{
-public:
- using FullVisitable::accept_vis;
-
- // Unique pointer custom clone function
- std::unique_ptr<Stmt> clone_stmt () const
- {
- return std::unique_ptr<Stmt> (clone_stmt_impl ());
- }
-
- BaseKind get_hir_kind () override { return STMT; }
-
- virtual ~Stmt () {}
-
- virtual std::string as_string () const = 0;
-
- virtual void accept_vis (HIRStmtVisitor &vis) = 0;
-
- virtual location_t get_locus () const = 0;
-
- virtual bool is_unit_check_needed () const { return false; }
-
- const Analysis::NodeMapping &get_mappings () const { return mappings; }
-
- virtual bool is_item () const = 0;
-
-protected:
- Stmt (Analysis::NodeMapping mappings) : mappings (std::move (mappings)) {}
-
- // Clone function implementation as pure virtual method
- virtual Stmt *clone_stmt_impl () const = 0;
-
- Analysis::NodeMapping mappings;
-};
-
-// Rust "item" HIR node (declaration of top-level/module-level allowed stuff)
-class Item : public Stmt, public WithOuterAttrs
-{
- // TODO: should outer attrs be defined here or in each derived class?
-public:
- enum class ItemKind
- {
- Static,
- Constant,
- TypeAlias,
- Function,
- UseDeclaration,
- ExternBlock,
- ExternCrate,
- Struct,
- Union,
- Enum,
- EnumItem, // FIXME: ARTHUR: Do we need that?
- Trait,
- Impl,
- Module,
- };
-
- static std::string item_kind_string (ItemKind kind);
-
- virtual ItemKind get_item_kind () const = 0;
-
- // Unique pointer custom clone function
- std::unique_ptr<Item> clone_item () const
- {
- return std::unique_ptr<Item> (clone_item_impl ());
- }
-
- BaseKind get_hir_kind () override { return ITEM; }
-
- std::string as_string () const override;
-
- /* Adds crate names to the vector passed by reference, if it can
- * (polymorphism). */
- virtual void
- add_crate_name (std::vector<std::string> &names ATTRIBUTE_UNUSED) const
- {}
-
- bool is_item () const override final { return true; }
-
-protected:
- // Constructor
- Item (Analysis::NodeMapping mappings,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : Stmt (std::move (mappings)), WithOuterAttrs (std::move (outer_attribs))
- {}
-
- // Clone function implementation as pure virtual method
- virtual Item *clone_item_impl () const = 0;
-
- /* Save having to specify two clone methods in derived classes by making
- * statement clone return item clone. Hopefully won't affect performance too
- * much. */
- Item *clone_stmt_impl () const override { return clone_item_impl (); }
-};
-
-// forward decl of ExprWithoutBlock
-class ExprWithoutBlock;
-
-// Base expression HIR node - abstract
-class Expr : public Node, virtual public FullVisitable
-{
-public:
- using FullVisitable::accept_vis;
-
-protected:
- AST::AttrVec outer_attrs;
- Analysis::NodeMapping mappings;
-
-public:
- enum BlockType
- {
- WITH_BLOCK,
- WITHOUT_BLOCK,
- };
-
- enum ExprType
- {
- Lit,
- Operator,
- Grouped,
- Array,
- ArrayIndex,
- Tuple,
- TupleIdx,
- Struct,
- Call,
- MethodCall,
- FieldAccess,
- Closure,
- Block,
- Continue,
- Break,
- Range,
- Return,
- UnsafeBlock,
- BaseLoop,
- If,
- IfLet,
- Match,
- Await,
- AsyncBlock,
- Path,
- InlineAsm,
- };
-
- BaseKind get_hir_kind () override final { return EXPR; }
-
- const AST::AttrVec &get_outer_attrs () const { return outer_attrs; }
-
- // Unique pointer custom clone function
- std::unique_ptr<Expr> clone_expr () const
- {
- return std::unique_ptr<Expr> (clone_expr_impl ());
- }
-
- // TODO: make pure virtual if move out outer attributes to derived classes
- virtual std::string as_string () const;
-
- virtual ~Expr () {}
-
- virtual location_t get_locus () const = 0;
-
- const Analysis::NodeMapping &get_mappings () const { return mappings; }
-
- // Clone function implementation as pure virtual method
- virtual Expr *clone_expr_impl () const = 0;
-
- virtual BlockType get_block_expr_type () const = 0;
-
- virtual ExprType get_expression_type () const = 0;
-
- virtual void accept_vis (HIRExpressionVisitor &vis) = 0;
-
-protected:
- // Constructor
- Expr (Analysis::NodeMapping mappings,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : outer_attrs (std::move (outer_attribs)), mappings (std::move (mappings))
- {}
-
- // TODO: think of less hacky way to implement this kind of thing
- // Sets outer attributes.
- void set_outer_attrs (AST::AttrVec outer_attrs_to_set)
- {
- outer_attrs = std::move (outer_attrs_to_set);
- }
-};
-
-// HIR node for an expression without an accompanying block - abstract
-class ExprWithoutBlock : public Expr
-{
-protected:
- // Constructor
- ExprWithoutBlock (Analysis::NodeMapping mappings,
- AST::AttrVec outer_attribs = AST::AttrVec ())
- : Expr (std::move (mappings), std::move (outer_attribs))
- {}
-
- // pure virtual clone implementation
- virtual ExprWithoutBlock *clone_expr_without_block_impl () const = 0;
-
- /* Save having to specify two clone methods in derived classes by making expr
- * clone return exprwithoutblock clone. Hopefully won't affect performance too
- * much. */
- ExprWithoutBlock *clone_expr_impl () const override
- {
- return clone_expr_without_block_impl ();
- }
-
-public:
- // Unique pointer custom clone function
- std::unique_ptr<ExprWithoutBlock> clone_expr_without_block () const
- {
- return std::unique_ptr<ExprWithoutBlock> (clone_expr_without_block_impl ());
- }
-
- BlockType get_block_expr_type () const final override
- {
- return BlockType::WITHOUT_BLOCK;
- };
-};
-
-// Pattern base HIR node
-class Pattern : public Node, virtual public FullVisitable
-{
-public:
- using FullVisitable::accept_vis;
-
- enum PatternType
- {
- PATH,
- LITERAL,
- IDENTIFIER,
- WILDCARD,
- RANGE,
- REFERENCE,
- STRUCT,
- TUPLE_STRUCT,
- TUPLE,
- GROUPED,
- SLICE,
- ALT
- };
-
- BaseKind get_hir_kind () override final { return PATTERN; }
-
- // Unique pointer custom clone function
- std::unique_ptr<Pattern> clone_pattern () const
- {
- return std::unique_ptr<Pattern> (clone_pattern_impl ());
- }
-
- // possible virtual methods: is_refutable()
-
- virtual ~Pattern () {}
-
- virtual std::string as_string () const = 0;
-
- virtual void accept_vis (HIRPatternVisitor &vis) = 0;
-
- virtual const Analysis::NodeMapping &get_mappings () const = 0;
-
- virtual location_t get_locus () const = 0;
-
- virtual PatternType get_pattern_type () const = 0;
-
-protected:
- // Clone pattern implementation as pure virtual method
- virtual Pattern *clone_pattern_impl () const = 0;
-};
-
-// forward decl for Type
-class TraitBound;
-
-// Base class for types as represented in HIR - abstract
-class Type : public Node, public FullVisitable
-{
-public:
- using FullVisitable::accept_vis;
- // Unique pointer custom clone function
- std::unique_ptr<Type> clone_type () const
- {
- return std::unique_ptr<Type> (clone_type_impl ());
- }
-
- // virtual destructor
- virtual ~Type () {}
-
- BaseKind get_hir_kind () override final { return TYPE; }
-
- virtual std::string as_string () const = 0;
-
- /* HACK: convert to trait bound. Virtual method overriden by classes that
- * enable this. */
- virtual TraitBound *to_trait_bound (bool in_parens ATTRIBUTE_UNUSED) const
- {
- return nullptr;
- }
- /* as pointer, shouldn't require definition beforehand, only forward
- * declaration. */
-
- virtual void accept_vis (HIRTypeVisitor &vis) = 0;
-
- virtual Analysis::NodeMapping get_mappings () const { return mappings; }
- virtual location_t get_locus () const { return locus; }
-
-protected:
- Type (Analysis::NodeMapping mappings, location_t locus)
- : mappings (mappings), locus (locus)
- {}
-
- // Clone function implementation as pure virtual method
- virtual Type *clone_type_impl () const = 0;
-
- Analysis::NodeMapping mappings;
- location_t locus;
-};
-
-// A type without parentheses? - abstract
-class TypeNoBounds : public Type
-{
-public:
- // Unique pointer custom clone function
- std::unique_ptr<TypeNoBounds> clone_type_no_bounds () const
- {
- return std::unique_ptr<TypeNoBounds> (clone_type_no_bounds_impl ());
- }
-
-protected:
- TypeNoBounds (Analysis::NodeMapping mappings, location_t locus)
- : Type (mappings, locus)
- {}
-
- // Clone function implementation as pure virtual method
- virtual TypeNoBounds *clone_type_no_bounds_impl () const = 0;
-
- /* Save having to specify two clone methods in derived classes by making type
- * clone return typenobounds clone. Hopefully won't affect performance too
- * much. */
- TypeNoBounds *clone_type_impl () const override
- {
- return clone_type_no_bounds_impl ();
- }
-};
-
-/* Abstract base class representing a type param bound - Lifetime and TraitBound
- * extends it */
-class TypeParamBound : public FullVisitable
-{
-public:
- using FullVisitable::accept_vis;
- enum BoundType
- {
- LIFETIME,
- TRAITBOUND
- };
-
- virtual ~TypeParamBound () {}
-
- // Unique pointer custom clone function
- std::unique_ptr<TypeParamBound> clone_type_param_bound () const
- {
- return std::unique_ptr<TypeParamBound> (clone_type_param_bound_impl ());
- }
-
- virtual std::string as_string () const = 0;
-
- virtual Analysis::NodeMapping get_mappings () const = 0;
-
- virtual location_t get_locus () const = 0;
-
- virtual BoundType get_bound_type () const = 0;
-
-protected:
- // Clone function implementation as pure virtual method
- virtual TypeParamBound *clone_type_param_bound_impl () const = 0;
-};
-
-// Represents a lifetime (and is also a kind of type param bound)
-class Lifetime : public TypeParamBound
-{
-private:
- AST::Lifetime::LifetimeType lifetime_type;
- std::string lifetime_name;
- location_t locus;
- Analysis::NodeMapping mappings;
-
-public:
- // Constructor
- Lifetime (Analysis::NodeMapping mapping, AST::Lifetime::LifetimeType type,
- std::string name, location_t locus)
- : lifetime_type (type), lifetime_name (std::move (name)), locus (locus),
- mappings (mapping)
- {}
-
- // Returns true if the lifetime is in an error state.
- bool is_error () const
- {
- return lifetime_type == AST::Lifetime::LifetimeType::NAMED
- && lifetime_name.empty ();
- }
-
- static Lifetime error ()
- {
- return Lifetime (Analysis::NodeMapping::get_error (),
- AST::Lifetime::LifetimeType::NAMED, "", UNDEF_LOCATION);
- }
-
- std::string as_string () const override;
-
- void accept_vis (HIRFullVisitor &vis) override;
-
- WARN_UNUSED_RESULT const std::string &get_name () const
- {
- return lifetime_name;
- }
-
- AST::Lifetime::LifetimeType get_lifetime_type () const
- {
- return lifetime_type;
- }
-
- location_t get_locus () const override final { return locus; }
-
- Analysis::NodeMapping get_mappings () const override final
- {
- return mappings;
- }
-
- BoundType get_bound_type () const final override { return LIFETIME; }
-
-protected:
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- Lifetime *clone_type_param_bound_impl () const override
- {
- return new Lifetime (*this);
- }
-};
-
-/* Base generic parameter in HIR. Abstract - can be represented by a Lifetime or
- * Type param */
-class GenericParam : public FullVisitable
-{
-public:
- using FullVisitable::accept_vis;
-
- virtual ~GenericParam () {}
-
- enum class GenericKind
- {
- TYPE,
- LIFETIME,
- CONST,
- };
-
- virtual AST::AttrVec &get_outer_attrs () = 0;
- virtual bool has_outer_attribute () const = 0;
-
- // Unique pointer custom clone function
- std::unique_ptr<GenericParam> clone_generic_param () const
- {
- return std::unique_ptr<GenericParam> (clone_generic_param_impl ());
- }
-
- virtual std::string as_string () const = 0;
-
- virtual location_t get_locus () const = 0;
-
- Analysis::NodeMapping get_mappings () const { return mappings; }
-
- enum GenericKind get_kind () const { return kind; }
-
-protected:
- // Clone function implementation as pure virtual method
- virtual GenericParam *clone_generic_param_impl () const = 0;
-
- Analysis::NodeMapping mappings;
-
- enum GenericKind kind;
-
- GenericParam (Analysis::NodeMapping mapping,
- enum GenericKind kind = GenericKind::TYPE)
- : mappings (mapping), kind (kind)
- {}
-};
-
-// A lifetime generic parameter (as opposed to a type generic parameter)
-class LifetimeParam : public GenericParam
-{
- Lifetime lifetime;
-
- // bool has_lifetime_bounds;
- // LifetimeBounds lifetime_bounds;
- std::vector<Lifetime> lifetime_bounds; // inlined LifetimeBounds
-
- AST::AttrVec outer_attrs;
-
- location_t locus;
-
-public:
- Lifetime get_lifetime () { return lifetime; }
-
- // Returns whether the lifetime param has any lifetime bounds.
- bool has_lifetime_bounds () const { return !lifetime_bounds.empty (); }
-
- std::vector<Lifetime> &get_lifetime_bounds () { return lifetime_bounds; }
-
- // Returns whether the lifetime param has an outer attribute.
- bool has_outer_attribute () const override { return outer_attrs.size () > 1; }
-
- AST::AttrVec &get_outer_attrs () { return outer_attrs; }
-
- // Returns whether the lifetime param is in an error state.
- bool is_error () const { return lifetime.is_error (); }
-
- // Constructor
- LifetimeParam (Analysis::NodeMapping mappings, Lifetime lifetime,
- location_t locus = UNDEF_LOCATION,
- std::vector<Lifetime> lifetime_bounds
- = std::vector<Lifetime> (),
- AST::AttrVec outer_attrs = std::vector<AST::Attribute> ())
- : GenericParam (mappings, GenericKind::LIFETIME),
- lifetime (std::move (lifetime)),
- lifetime_bounds (std::move (lifetime_bounds)),
- outer_attrs (std::move (outer_attrs)), locus (locus)
- {}
-
- // TODO: remove copy and assignment operator definitions - not required
-
- // Copy constructor with clone
- LifetimeParam (LifetimeParam const &other)
- : GenericParam (other.mappings, GenericKind::LIFETIME),
- lifetime (other.lifetime), lifetime_bounds (other.lifetime_bounds),
- outer_attrs (other.outer_attrs), locus (other.locus)
- {}
-
- // Overloaded assignment operator to clone attribute
- LifetimeParam &operator= (LifetimeParam const &other)
- {
- lifetime = other.lifetime;
- lifetime_bounds = other.lifetime_bounds;
- outer_attrs = other.outer_attrs;
- locus = other.locus;
- mappings = other.mappings;
-
- return *this;
- }
-
- // move constructors
- LifetimeParam (LifetimeParam &&other) = default;
- LifetimeParam &operator= (LifetimeParam &&other) = default;
-
- std::string as_string () const override;
-
- void accept_vis (HIRFullVisitor &vis) override;
-
- location_t get_locus () const override final { return locus; }
-
-protected:
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- LifetimeParam *clone_generic_param_impl () const override
- {
- return new LifetimeParam (*this);
- }
-};
-
-class ConstGenericParam : public GenericParam
-{
-public:
- ConstGenericParam (std::string name, std::unique_ptr<Type> type,
- std::unique_ptr<Expr> default_expression,
- Analysis::NodeMapping mapping, location_t locus)
- : GenericParam (mapping, GenericKind::CONST), name (std::move (name)),
- type (std::move (type)),
- default_expression (std::move (default_expression)), locus (locus)
- {}
-
- ConstGenericParam (const ConstGenericParam &other) : GenericParam (other)
- {
- name = other.name;
- locus = other.locus;
-
- if (other.type)
- type = other.type->clone_type ();
- if (other.default_expression)
- default_expression = other.default_expression->clone_expr ();
- }
-
- bool has_outer_attribute () const override { return false; }
-
- AST::AttrVec &get_outer_attrs () override { return outer_attrs; }
-
- std::string as_string () const override final;
-
- void accept_vis (HIRFullVisitor &vis) override final;
-
- location_t get_locus () const override final { return locus; };
-
- bool has_default_expression () { return default_expression != nullptr; }
-
- std::string get_name () { return name; }
- std::unique_ptr<Type> &get_type () { return type; }
- std::unique_ptr<Expr> &get_default_expression ()
- {
- return default_expression;
- }
-
-protected:
- /* Use covariance to implement clone function as returning this object rather
- * than base */
- ConstGenericParam *clone_generic_param_impl () const override
- {
- return new ConstGenericParam (*this);
- }
-
-private:
- std::string name;
- std::unique_ptr<Type> type;
-
- /* const params have no outer attrs, should be empty */
- AST::AttrVec outer_attrs = std::vector<AST::Attribute> ();
-
- /* Optional - can be a null pointer if there is no default expression */
- std::unique_ptr<Expr> default_expression;
-
- location_t locus;
-};
// Item used in trait declarations - abstract base class
class TraitItem : public Node, public FullVisitable
@@ -892,34 +137,15 @@ class Crate : public WithInnerAttrs
public:
// Constructor
Crate (std::vector<std::unique_ptr<Item>> items, AST::AttrVec inner_attrs,
- Analysis::NodeMapping mappings)
- : WithInnerAttrs (std::move (inner_attrs)), items (std::move (items)),
- mappings (mappings)
- {}
+ Analysis::NodeMapping mappings);
// Copy constructor with vector clone
- Crate (Crate const &other)
- : WithInnerAttrs (other.inner_attrs), mappings (other.mappings)
- {
- items.reserve (other.items.size ());
- for (const auto &e : other.items)
- items.push_back (e->clone_item ());
- }
+ Crate (Crate const &other);
~Crate () = default;
// Overloaded assignment operator with vector clone
- Crate &operator= (Crate const &other)
- {
- inner_attrs = other.inner_attrs;
- mappings = other.mappings;
-
- items.reserve (other.items.size ());
- for (const auto &e : other.items)
- items.push_back (e->clone_item ());
-
- return *this;
- }
+ Crate &operator= (Crate const &other);
// Move constructors
Crate (Crate &&other) = default;
@@ -932,27 +158,6 @@ public:
std::vector<std::unique_ptr<Item>> &get_items () { return items; }
};
-// Base path expression HIR node - abstract
-class PathExpr : public ExprWithoutBlock
-{
-protected:
- PathExpr (Analysis::NodeMapping mappings, AST::AttrVec outer_attribs)
- : ExprWithoutBlock (std::move (mappings), std::move (outer_attribs))
- {}
-
-public:
- /* Replaces the outer attributes of this path expression with the given outer
- * attributes. */
- void replace_outer_attrs (AST::AttrVec outer_attrs)
- {
- set_outer_attrs (std::move (outer_attrs));
- }
-
- ExprType get_expression_type () const final override
- {
- return ExprType::Path;
- }
-};
} // namespace HIR
} // namespace Rust
diff --git a/gcc/rust/lang.opt b/gcc/rust/lang.opt
index ae601eb..0e9aab4 100644
--- a/gcc/rust/lang.opt
+++ b/gcc/rust/lang.opt
@@ -212,4 +212,17 @@ frust-borrowcheck
Rust Var(flag_borrowcheck)
Use the WIP borrow checker.
+frust-panic=
+Rust Joined RejectNegative Enum(frust_panic) Var(flag_rust_panic)
+-frust-edition=[unwind|abort] Panic strategy to compile crate with
+
+Enum
+Name(frust_panic) Type(int) UnknownError(unknown panic strategy %qs)
+
+EnumValue
+Enum(frust_panic) String(unwind) Value(0)
+
+EnumValue
+Enum(frust_panic) String(abort) Value(1)
+
; This comment is to ensure we retain the blank line above.
diff --git a/gcc/rust/lex/rust-token.h b/gcc/rust/lex/rust-token.h
index aa2f308..c683ecd 100644
--- a/gcc/rust/lex/rust-token.h
+++ b/gcc/rust/lex/rust-token.h
@@ -21,7 +21,6 @@
#include "rust-system.h"
#include "rust-linemap.h"
-#include "rust-make-unique.h"
#include "rust-unicode.h"
namespace Rust {
@@ -268,7 +267,7 @@ private:
: token_id (token_id), locus (location), type_hint (CORETYPE_UNKNOWN)
{
// Normalize identifier tokens
- str = Rust::make_unique<std::string> (
+ str = std::make_unique<std::string> (
nfc_normalize_token_string (location, token_id, paramStr));
}
@@ -285,7 +284,7 @@ private:
: token_id (token_id), locus (location), type_hint (CORETYPE_UNKNOWN)
{
// Normalize identifier tokens
- str = Rust::make_unique<std::string> (
+ str = std::make_unique<std::string> (
nfc_normalize_token_string (location, token_id,
paramCodepoint.as_string ()));
}
@@ -296,7 +295,7 @@ private:
: token_id (token_id), locus (location), type_hint (parType)
{
// Normalize identifier tokens
- str = Rust::make_unique<std::string> (
+ str = std::make_unique<std::string> (
nfc_normalize_token_string (location, token_id, paramStr));
}
diff --git a/gcc/rust/metadata/rust-import-archive.cc b/gcc/rust/metadata/rust-import-archive.cc
index 6c392b0..cf24607 100644
--- a/gcc/rust/metadata/rust-import-archive.cc
+++ b/gcc/rust/metadata/rust-import-archive.cc
@@ -7,7 +7,6 @@
#include "rust-system.h"
#include "rust-diagnostics.h"
#include "rust-imports.h"
-#include "rust-make-unique.h"
#ifndef O_BINARY
#define O_BINARY 0
@@ -844,7 +843,7 @@ Import::find_archive_export_data (const std::string &filename, int fd,
if (!afile.initialize ())
return nullptr;
- auto ret = Rust::make_unique<Stream_concatenate> ();
+ auto ret = std::make_unique<Stream_concatenate> ();
bool any_data = false;
bool any_members = false;
@@ -872,7 +871,7 @@ Import::find_archive_export_data (const std::string &filename, int fd,
if (!any_members)
{
// It's normal to have an empty archive file when using gobuild.
- return Rust::make_unique<Stream_from_string> ("");
+ return std::make_unique<Stream_from_string> ("");
}
if (!any_data)
diff --git a/gcc/rust/metadata/rust-imports.cc b/gcc/rust/metadata/rust-imports.cc
index f2ab105..8d5c381 100644
--- a/gcc/rust/metadata/rust-imports.cc
+++ b/gcc/rust/metadata/rust-imports.cc
@@ -21,7 +21,6 @@
#include "rust-imports.h"
#include "rust-object-export.h"
#include "rust-export-metadata.h"
-#include "rust-make-unique.h"
#ifndef O_BINARY
#define O_BINARY 0
@@ -259,7 +258,7 @@ Import::find_export_data (const std::string &filename, int fd,
//
if (memcmp (buf, Metadata::kMagicHeader, sizeof (Metadata::kMagicHeader))
== 0)
- return Rust::make_unique<Stream_from_file> (fd);
+ return std::make_unique<Stream_from_file> (fd);
// See if we can read this as an archive.
if (Import::is_archive_magic (buf))
@@ -291,7 +290,7 @@ Import::find_object_export_data (const std::string &filename, int fd,
if (buf == nullptr)
return nullptr;
- return Rust::make_unique<Stream_from_buffer> (buf, len);
+ return std::make_unique<Stream_from_buffer> (buf, len);
}
// Class Import.
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h
index d5383ad..353e859f 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -29,7 +29,6 @@
#include "rust-token.h"
#define INCLUDE_ALGORITHM
#include "rust-diagnostics.h"
-#include "rust-make-unique.h"
#include "rust-dir-owner.h"
#include "rust-attribute-values.h"
#include "rust-keyword-values.h"
@@ -3683,7 +3682,7 @@ Parser<ManagedTokenSource>::parse_function_param ()
if (lexer.peek_token ()->get_id () == ELLIPSIS) // Unnamed variadic
{
lexer.skip_token (); // Skip ellipsis
- return Rust::make_unique<AST::VariadicParam> (
+ return std::make_unique<AST::VariadicParam> (
AST::VariadicParam (std::move (outer_attrs), locus));
}
@@ -3705,7 +3704,7 @@ Parser<ManagedTokenSource>::parse_function_param ()
if (lexer.peek_token ()->get_id () == ELLIPSIS) // Named variadic
{
lexer.skip_token (); // Skip ellipsis
- return Rust::make_unique<AST::VariadicParam> (
+ return std::make_unique<AST::VariadicParam> (
AST::VariadicParam (std::move (param_pattern), std::move (outer_attrs),
locus));
}
@@ -3716,7 +3715,7 @@ Parser<ManagedTokenSource>::parse_function_param ()
{
return nullptr;
}
- return Rust::make_unique<AST::FunctionParam> (
+ return std::make_unique<AST::FunctionParam> (
AST::FunctionParam (std::move (param_pattern), std::move (param_type),
std::move (outer_attrs), locus));
}
@@ -5937,106 +5936,6 @@ Parser<ManagedTokenSource>::parse_extern_block (AST::Visibility vis,
std::move (outer_attrs), locus));
}
-template <typename ManagedTokenSource>
-AST::NamedFunctionParam
-Parser<ManagedTokenSource>::parse_named_function_param ()
-{
- AST::AttrVec outer_attrs = parse_outer_attributes ();
- location_t locus = lexer.peek_token ()->get_locus ();
-
- if (lexer.peek_token ()->get_id () == ELLIPSIS) // Unnamed variadic
- {
- lexer.skip_token (); // Skip ellipsis
- return AST::NamedFunctionParam (std::move (outer_attrs), locus);
- }
-
- // parse identifier/_
- std::string name;
-
- const_TokenPtr t = lexer.peek_token ();
- location_t name_location = t->get_locus ();
- switch (t->get_id ())
- {
- case IDENTIFIER:
- name = t->get_str ();
- lexer.skip_token ();
- break;
- case UNDERSCORE:
- name = "_";
- lexer.skip_token ();
- break;
- default:
- // this is not a function param, but not necessarily an error
- return AST::NamedFunctionParam::create_error ();
- }
-
- if (!skip_token (COLON))
- {
- // skip after somewhere?
- return AST::NamedFunctionParam::create_error ();
- }
-
- if (lexer.peek_token ()->get_id () == ELLIPSIS) // Named variadic
- {
- lexer.skip_token (); // Skip ellipsis
- return AST::NamedFunctionParam (std::move (name), std::move (outer_attrs),
- locus);
- }
-
- // parse (required) type
- std::unique_ptr<AST::Type> param_type = parse_type ();
- if (param_type == nullptr)
- {
- Error error (
- lexer.peek_token ()->get_locus (),
- "could not parse param type in extern block function declaration");
- add_error (std::move (error));
-
- skip_after_semicolon ();
- return AST::NamedFunctionParam::create_error ();
- }
-
- return AST::NamedFunctionParam (std::move (name), std::move (param_type),
- std::move (outer_attrs), name_location);
-}
-
-template <typename ManagedTokenSource>
-template <typename EndTokenPred>
-std::vector<AST::NamedFunctionParam>
-Parser<ManagedTokenSource>::parse_named_function_params (
- EndTokenPred is_end_token)
-{
- std::vector<AST::NamedFunctionParam> params;
- if (is_end_token (lexer.peek_token ()->get_id ()))
- return params;
-
- auto initial_param = parse_named_function_param ();
- if (initial_param.is_error ())
- return params;
-
- params.push_back (std::move (initial_param));
- auto t = lexer.peek_token ();
- while (t->get_id () == COMMA)
- {
- lexer.skip_token ();
- if (is_end_token (lexer.peek_token ()->get_id ()))
- break;
-
- auto param = parse_named_function_param ();
- if (param.is_error ())
- {
- Error error (lexer.peek_token ()->get_locus (),
- "failed to parse param in c function params");
- add_error (error);
- return std::vector<AST::NamedFunctionParam> ();
- }
- params.push_back (std::move (param));
- t = lexer.peek_token ();
- }
- params.shrink_to_fit ();
- return params;
-}
-
// Parses a single extern block item (static or function declaration).
template <typename ManagedTokenSource>
std::unique_ptr<AST::ExternalItem>
@@ -7124,14 +7023,14 @@ Parser<ManagedTokenSource>::parse_self_param ()
if (has_reference)
{
- return Rust::make_unique<AST::SelfParam> (std::move (lifetime), has_mut,
- locus);
+ return std::make_unique<AST::SelfParam> (std::move (lifetime), has_mut,
+ locus);
}
else
{
// note that type may be nullptr here and that's fine
- return Rust::make_unique<AST::SelfParam> (std::move (type), has_mut,
- locus);
+ return std::make_unique<AST::SelfParam> (std::move (type), has_mut,
+ locus);
}
}
@@ -8693,10 +8592,10 @@ Parser<ManagedTokenSource>::parse_array_expr (AST::AttrVec outer_attrs,
std::vector<std::unique_ptr<AST::Expr>> exprs;
auto array_elems
- = Rust::make_unique<AST::ArrayElemsValues> (std::move (exprs), locus);
- return Rust::make_unique<AST::ArrayExpr> (std::move (array_elems),
- std::move (inner_attrs),
- std::move (outer_attrs), locus);
+ = std::make_unique<AST::ArrayElemsValues> (std::move (exprs), locus);
+ return std::make_unique<AST::ArrayExpr> (std::move (array_elems),
+ std::move (inner_attrs),
+ std::move (outer_attrs), locus);
}
else
{
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 95c0a0b..6c50ba9 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -310,10 +310,6 @@ private:
AST::Lifetime lifetime_from_token (const_TokenPtr tok);
std::unique_ptr<AST::ExternalTypeItem>
parse_external_type_item (AST::Visibility vis, AST::AttrVec outer_attrs);
- AST::NamedFunctionParam parse_named_function_param ();
- template <typename EndTokenPred>
- std::vector<AST::NamedFunctionParam>
- parse_named_function_params (EndTokenPred is_end_token);
std::unique_ptr<AST::TypeAlias> parse_type_alias (AST::Visibility vis,
AST::AttrVec outer_attrs);
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.cc b/gcc/rust/resolve/rust-ast-resolve-base.cc
index b23c1eb..6c35a22 100644
--- a/gcc/rust/resolve/rust-ast-resolve-base.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-base.cc
@@ -72,14 +72,6 @@ ResolverBase::visit (AST::ConstGenericParam &)
{}
void
-ResolverBase::visit (AST::RegularPath &)
-{}
-
-void
-ResolverBase::visit (AST::LangItemPath &)
-{}
-
-void
ResolverBase::visit (AST::PathInExpression &)
{}
diff --git a/gcc/rust/resolve/rust-ast-resolve-base.h b/gcc/rust/resolve/rust-ast-resolve-base.h
index 703460a..0d497f8 100644
--- a/gcc/rust/resolve/rust-ast-resolve-base.h
+++ b/gcc/rust/resolve/rust-ast-resolve-base.h
@@ -40,8 +40,6 @@ public:
void visit (AST::Lifetime &);
void visit (AST::LifetimeParam &);
void visit (AST::ConstGenericParam &);
- void visit (AST::RegularPath &);
- void visit (AST::LangItemPath &);
void visit (AST::PathInExpression &);
void visit (AST::TypePathSegment &);
void visit (AST::TypePathSegmentGeneric &);
diff --git a/gcc/rust/resolve/rust-ast-resolve-expr.cc b/gcc/rust/resolve/rust-ast-resolve-expr.cc
index 7ddf4a9..6524376 100644
--- a/gcc/rust/resolve/rust-ast-resolve-expr.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-expr.cc
@@ -537,7 +537,7 @@ ResolveExpr::visit (AST::BreakExpr &expr)
{
bool funny_error = false;
auto &break_expr = expr.get_break_expr ();
- if (break_expr.get_ast_kind () == AST::Kind::IDENTIFIER)
+ if (break_expr.get_expr_kind () == AST::Expr::Kind::Identifier)
{
/* This is a break with an expression, and the expression is
just a single identifier. See if the identifier is either
diff --git a/gcc/rust/resolve/rust-ast-resolve-item.cc b/gcc/rust/resolve/rust-ast-resolve-item.cc
index 34098bc..b26ac34 100644
--- a/gcc/rust/resolve/rust-ast-resolve-item.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-item.cc
@@ -582,7 +582,14 @@ ResolveItem::visit (AST::InherentImpl &impl_block)
// Setup paths
CanonicalPath self_cpath = CanonicalPath::create_empty ();
bool ok = ResolveTypeToCanonicalPath::go (impl_block.get_type (), self_cpath);
- rust_assert (ok);
+ if (!ok)
+ {
+ resolver->get_name_scope ().pop ();
+ resolver->get_type_scope ().pop ();
+ resolver->get_label_scope ().pop ();
+ return;
+ }
+
rust_debug ("AST::InherentImpl resolve Self: {%s}",
self_cpath.get ().c_str ());
@@ -671,12 +678,20 @@ ResolveItem::visit (AST::TraitImpl &impl_block)
return;
}
- bool ok;
+ bool ok = true;
+
// setup paths
CanonicalPath canonical_trait_type = CanonicalPath::create_empty ();
+
ok = ResolveTypeToCanonicalPath::go (impl_block.get_trait_path (),
canonical_trait_type);
- rust_assert (ok);
+ if (!ok)
+ {
+ resolver->get_name_scope ().pop ();
+ resolver->get_type_scope ().pop ();
+ resolver->get_label_scope ().pop ();
+ return;
+ }
rust_debug ("AST::TraitImpl resolve trait type: {%s}",
canonical_trait_type.get ().c_str ());
@@ -684,7 +699,13 @@ ResolveItem::visit (AST::TraitImpl &impl_block)
CanonicalPath canonical_impl_type = CanonicalPath::create_empty ();
ok = ResolveTypeToCanonicalPath::go (impl_block.get_type (),
canonical_impl_type);
- rust_assert (ok);
+ if (!ok)
+ {
+ resolver->get_name_scope ().pop ();
+ resolver->get_type_scope ().pop ();
+ resolver->get_label_scope ().pop ();
+ return;
+ }
rust_debug ("AST::TraitImpl resolve self: {%s}",
canonical_impl_type.get ().c_str ());
@@ -755,20 +776,14 @@ ResolveItem::visit (AST::Trait &trait)
resolver->push_new_name_rib (resolver->get_name_scope ().peek ());
resolver->push_new_type_rib (resolver->get_type_scope ().peek ());
- // we need to inject an implicit self TypeParam here
- // FIXME: which location should be used for Rust::Identifier `Self`?
- AST::TypeParam *implicit_self
- = new AST::TypeParam ({"Self"}, trait.get_locus ());
- trait.insert_implict_self (
- std::unique_ptr<AST::GenericParam> (implicit_self));
- CanonicalPath Self = CanonicalPath::get_big_self (trait.get_node_id ());
-
+ ResolveGenericParam::go (trait.get_implicit_self (), prefix,
+ canonical_prefix);
for (auto &generic : trait.get_generic_params ())
ResolveGenericParam::go (*generic, prefix, canonical_prefix);
// Self is an implicit TypeParam so lets mark it as such
resolver->get_type_scope ().append_reference_for_def (
- Self.get_node_id (), implicit_self->get_node_id ());
+ trait.get_node_id (), trait.get_implicit_self ().get_node_id ());
if (trait.has_type_param_bounds ())
{
diff --git a/gcc/rust/resolve/rust-ast-resolve-stmt.cc b/gcc/rust/resolve/rust-ast-resolve-stmt.cc
index 2885291..226d8e8 100644
--- a/gcc/rust/resolve/rust-ast-resolve-stmt.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-stmt.cc
@@ -56,5 +56,26 @@ ResolveStmt::visit (AST::TraitImpl &impl_block)
ResolveItem::go (impl_block, prefix, canonical_prefix);
}
+void
+ResolveStmt::visit (AST::StaticItem &var)
+{
+ auto decl = CanonicalPath::new_seg (var.get_node_id (),
+ var.get_identifier ().as_string ());
+ auto path = decl;
+ auto cpath = canonical_prefix.append (decl);
+ mappings.insert_canonical_path (var.get_node_id (), cpath);
+
+ resolver->get_name_scope ().insert (
+ path, var.get_node_id (), var.get_locus (), false, Rib::ItemType::Static,
+ [&] (const CanonicalPath &, NodeId, location_t locus) -> void {
+ rich_location r (line_table, var.get_locus ());
+ r.add_range (locus);
+ rust_error_at (r, "redefined multiple times");
+ });
+
+ ResolveType::go (var.get_type ());
+ ResolveExpr::go (var.get_expr (), path, cpath);
+}
+
} // namespace Resolver
} // namespace Rust
diff --git a/gcc/rust/resolve/rust-ast-resolve-stmt.h b/gcc/rust/resolve/rust-ast-resolve-stmt.h
index 8e64a76..6dfac91 100644
--- a/gcc/rust/resolve/rust-ast-resolve-stmt.h
+++ b/gcc/rust/resolve/rust-ast-resolve-stmt.h
@@ -388,6 +388,7 @@ public:
void visit (AST::Trait &trait) override;
void visit (AST::InherentImpl &impl_block) override;
void visit (AST::TraitImpl &impl_block) override;
+ void visit (AST::StaticItem &var) override;
private:
ResolveStmt (const CanonicalPath &prefix,
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc
index ec5e8a7..63c9dac 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-type.cc
@@ -18,6 +18,9 @@
#include "rust-ast-resolve-type.h"
#include "rust-ast-resolve-expr.h"
+#include "rust-canonical-path.h"
+#include "rust-type.h"
+#include "rust-hir-map.h"
namespace Rust {
namespace Resolver {
@@ -49,6 +52,12 @@ ResolveType::visit (AST::TraitObjectType &type)
}
void
+ResolveType::visit (AST::ParenthesisedType &type)
+{
+ resolved_node = ResolveType::go (*type.get_type_in_parens ());
+}
+
+void
ResolveType::visit (AST::ReferenceType &type)
{
resolved_node = ResolveType::go (type.get_type_referenced ());
@@ -91,45 +100,57 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
for (size_t i = 0; i < path.get_segments ().size (); i++)
{
auto &segment = path.get_segments ().at (i);
- const AST::PathIdentSegment &ident_seg = segment->get_ident_segment ();
bool is_first_segment = i == 0;
- resolved_node_id = UNKNOWN_NODEID;
+ NodeId crate_scope_id = resolver->peek_crate_module_scope ();
+ auto ident_string = segment->is_lang_item ()
+ ? LangItem::PrettyString (segment->get_lang_item ())
+ : segment->get_ident_segment ().as_string ();
- bool in_middle_of_path = i > 0;
- if (in_middle_of_path && segment->is_lower_self_seg ())
- {
- rust_error_at (segment->get_locus (), ErrorCode::E0433,
- "failed to resolve: %qs in paths can only be used "
- "in start position",
- segment->as_string ().c_str ());
- return false;
- }
+ resolved_node_id = UNKNOWN_NODEID;
- NodeId crate_scope_id = resolver->peek_crate_module_scope ();
- if (segment->is_crate_path_seg ())
+ if (segment->is_lang_item ())
{
- // what is the current crate scope node id?
- module_scope_id = crate_scope_id;
- previous_resolved_node_id = module_scope_id;
- resolver->insert_resolved_name (segment->get_node_id (),
- module_scope_id);
-
- continue;
+ resolved_node_id = Analysis::Mappings::get ().get_lang_item_node (
+ segment->get_lang_item ());
+ previous_resolved_node_id = resolved_node_id;
}
- else if (segment->is_super_path_seg ())
+ else
{
- if (module_scope_id == crate_scope_id)
+ bool in_middle_of_path = i > 0;
+ if (in_middle_of_path && segment->is_lower_self_seg ())
{
- rust_error_at (segment->get_locus (),
- "cannot use super at the crate scope");
+ rust_error_at (segment->get_locus (), ErrorCode::E0433,
+ "failed to resolve: %qs in paths can only be used "
+ "in start position",
+ segment->as_string ().c_str ());
return false;
}
- module_scope_id = resolver->peek_parent_module_scope ();
- previous_resolved_node_id = module_scope_id;
- resolver->insert_resolved_name (segment->get_node_id (),
- module_scope_id);
- continue;
+ if (segment->is_crate_path_seg ())
+ {
+ // what is the current crate scope node id?
+ module_scope_id = crate_scope_id;
+ previous_resolved_node_id = module_scope_id;
+ resolver->insert_resolved_name (segment->get_node_id (),
+ module_scope_id);
+
+ continue;
+ }
+ else if (segment->is_super_path_seg ())
+ {
+ if (module_scope_id == crate_scope_id)
+ {
+ rust_error_at (segment->get_locus (),
+ "cannot use super at the crate scope");
+ return false;
+ }
+
+ module_scope_id = resolver->peek_parent_module_scope ();
+ previous_resolved_node_id = module_scope_id;
+ resolver->insert_resolved_name (segment->get_node_id (),
+ module_scope_id);
+ continue;
+ }
}
switch (segment->get_type ())
@@ -169,8 +190,7 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
// name scope first
NodeId resolved_node = UNKNOWN_NODEID;
const CanonicalPath path
- = CanonicalPath::new_seg (segment->get_node_id (),
- ident_seg.as_string ());
+ = CanonicalPath::new_seg (segment->get_node_id (), ident_string);
if (resolver->get_type_scope ().lookup (path, &resolved_node))
{
resolver->insert_resolved_type (segment->get_node_id (),
@@ -183,7 +203,7 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
resolved_node);
resolved_node_id = resolved_node;
}
- else if (segment->is_lower_self_seg ())
+ else if (!segment->is_lang_item () && segment->is_lower_self_seg ())
{
// what is the current crate scope node id?
module_scope_id = crate_scope_id;
@@ -199,8 +219,7 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
&& previous_resolved_node_id == module_scope_id)
{
tl::optional<CanonicalPath &> resolved_child
- = mappings.lookup_module_child (module_scope_id,
- ident_seg.as_string ());
+ = mappings.lookup_module_child (module_scope_id, ident_string);
if (resolved_child.has_value ())
{
NodeId resolved_node = resolved_child->get_node_id ();
@@ -495,10 +514,59 @@ ResolveTypeToCanonicalPath::visit (AST::TraitObjectTypeOneBound &type)
}
void
-ResolveTypeToCanonicalPath::visit (AST::TraitObjectType &)
+ResolveTypeToCanonicalPath::visit (AST::TraitObjectType &type)
{
- // FIXME is this actually allowed? dyn A+B
- rust_unreachable ();
+ rust_assert (!type.get_type_param_bounds ().empty ());
+
+ auto &first_bound = type.get_type_param_bounds ().front ();
+
+ // Is it allowed or even possible to have a lifetime bound as a first bound?
+ if (first_bound->get_bound_type () == AST::TraitBound::LIFETIME)
+ rust_unreachable ();
+
+ auto &trait = static_cast<AST::TraitBound &> (*first_bound);
+
+ CanonicalPath path = CanonicalPath::create_empty ();
+ bool ok = ResolveTypeToCanonicalPath::go (trait.get_type_path (), path);
+
+ // right?
+ rust_assert (ok);
+
+ auto slice_path = "<dyn " + path.get ();
+
+ for (size_t idx = 1; idx < type.get_type_param_bounds ().size (); idx++)
+ {
+ auto &additional_bound = type.get_type_param_bounds ()[idx];
+
+ std::string str;
+
+ switch (additional_bound->get_bound_type ())
+ {
+ case AST::TypeParamBound::TRAIT: {
+ auto bound_path = CanonicalPath::create_empty ();
+
+ auto &bound_type_path
+ = static_cast<AST::TraitBound &> (*additional_bound)
+ .get_type_path ();
+ bool ok
+ = ResolveTypeToCanonicalPath::go (bound_type_path, bound_path);
+
+ if (!ok)
+ continue;
+
+ str = bound_path.get ();
+ break;
+ }
+ case AST::TypeParamBound::LIFETIME:
+ rust_unreachable ();
+ break;
+ }
+ slice_path += " + " + str;
+ }
+
+ slice_path += ">";
+
+ result = CanonicalPath::new_seg (type.get_node_id (), slice_path);
}
void
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.h b/gcc/rust/resolve/rust-ast-resolve-type.h
index 561948e..662f2f5 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.h
+++ b/gcc/rust/resolve/rust-ast-resolve-type.h
@@ -21,6 +21,11 @@
#include "rust-ast-resolve-base.h"
#include "rust-ast-resolve-expr.h"
+#include "rust-diagnostics.h"
+#include "rust-hir-map.h"
+#include "rust-path.h"
+#include "rust-type.h"
+#include "util/rust-hir-map.h"
namespace Rust {
namespace Resolver {
@@ -108,6 +113,8 @@ public:
void visit (AST::TraitObjectType &type) override;
+ void visit (AST::ParenthesisedType &type) override;
+
void visit (AST::SliceType &type) override;
private:
diff --git a/gcc/rust/resolve/rust-default-resolver.cc b/gcc/rust/resolve/rust-default-resolver.cc
index 57b1cc4..7528e79 100644
--- a/gcc/rust/resolve/rust-default-resolver.cc
+++ b/gcc/rust/resolve/rust-default-resolver.cc
@@ -88,21 +88,24 @@ DefaultResolver::visit (AST::TraitImpl &impl)
void
DefaultResolver::visit (AST::StructStruct &type)
{
- // do we need to scope anything here? no, right?
+ auto inner_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
- // we also can't visit `StructField`s by default, so there's nothing to do -
- // correct? or should we do something like
+ ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
+ inner_fn, type.get_struct_name ());
+}
- AST::DefaultASTVisitor::visit (type);
+void
+DefaultResolver::visit (AST::TupleStruct &type)
+{
+ auto inner_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
- // FIXME: ???
+ ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
+ inner_fn, type.get_struct_name ());
}
void
DefaultResolver::visit (AST::Enum &type)
{
- // FIXME: Do we need to scope anything by default?
-
auto variant_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
@@ -110,6 +113,24 @@ DefaultResolver::visit (AST::Enum &type)
}
void
+DefaultResolver::visit (AST::Union &type)
+{
+ auto inner_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
+
+ ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
+ inner_fn, type.get_identifier ());
+}
+
+void
+DefaultResolver::visit (AST::TypeAlias &type)
+{
+ auto inner_fn = [this, &type] () { AST::DefaultASTVisitor::visit (type); };
+
+ ctx.scoped (Rib::Kind::Item /* FIXME: Correct? */, type.get_node_id (),
+ inner_fn, type.get_new_type_name ());
+}
+
+void
DefaultResolver::visit (AST::ClosureExprInner &expr)
{
if (expr.is_marked_for_strip ())
diff --git a/gcc/rust/resolve/rust-default-resolver.h b/gcc/rust/resolve/rust-default-resolver.h
index 9fcddd1..587d7d4 100644
--- a/gcc/rust/resolve/rust-default-resolver.h
+++ b/gcc/rust/resolve/rust-default-resolver.h
@@ -52,7 +52,10 @@ public:
// type dec nodes, which visit their fields or variants by default
void visit (AST::StructStruct &) override;
+ void visit (AST::TupleStruct &) override;
void visit (AST::Enum &) override;
+ void visit (AST::Union &) override;
+ void visit (AST::TypeAlias &) override;
// Visitors that visit their expression node(s)
void visit (AST::ClosureExprInner &) override;
diff --git a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
index 5533048..342f102 100644
--- a/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-early-name-resolver-2.0.cc
@@ -238,6 +238,10 @@ Early::visit (AST::MacroInvocation &invoc)
{
auto path = invoc.get_invoc_data ().get_path ();
+ if (invoc.get_kind () == AST::MacroInvocation::InvocKind::Builtin)
+ for (auto &pending_invoc : invoc.get_pending_eager_invocations ())
+ pending_invoc->accept_vis (*this);
+
// When a macro is invoked by an unqualified identifier (not part of a
// multi-part path), it is first looked up in textual scoping. If this does
// not yield any results, then it is looked up in path-based scoping. If the
diff --git a/gcc/rust/resolve/rust-early-name-resolver.cc b/gcc/rust/resolve/rust-early-name-resolver.cc
index ce427dd..34bac98 100644
--- a/gcc/rust/resolve/rust-early-name-resolver.cc
+++ b/gcc/rust/resolve/rust-early-name-resolver.cc
@@ -17,7 +17,7 @@
// <http://www.gnu.org/licenses/>.
#include "rust-early-name-resolver.h"
-#include "rust-ast-full.h"
+#include "rust-pattern.h"
#include "rust-name-resolver.h"
#include "rust-macro-builtins.h"
#include "rust-attribute-values.h"
@@ -53,7 +53,7 @@ EarlyNameResolver::accumulate_escaped_macros (AST::Module &module)
scoped (module.get_node_id (), [&module, &escaped_macros, this] {
for (auto &item : module.get_items ())
{
- if (item->get_ast_kind () == AST::Kind::MODULE)
+ if (item->get_item_kind () == AST::Item::Kind::Module)
{
auto &module = *static_cast<AST::Module *> (item.get ());
auto new_macros = accumulate_escaped_macros (module);
@@ -64,7 +64,7 @@ EarlyNameResolver::accumulate_escaped_macros (AST::Module &module)
continue;
}
- if (item->get_ast_kind () == AST::Kind::MACRO_RULES_DEFINITION)
+ if (item->get_item_kind () == AST::Item::Kind::MacroRulesDefinition)
escaped_macros.emplace_back (item->clone_item ());
}
});
@@ -113,7 +113,7 @@ EarlyNameResolver::visit (AST::Crate &crate)
{
auto new_macros = std::vector<std::unique_ptr<AST::Item>> ();
- if (item->get_ast_kind () == AST::Kind::MODULE)
+ if (item->get_item_kind () == AST::Item::Kind::Module)
new_macros = accumulate_escaped_macros (
*static_cast<AST::Module *> (item.get ()));
@@ -300,7 +300,7 @@ EarlyNameResolver::visit (AST::Module &module)
{
auto new_macros = std::vector<std::unique_ptr<AST::Item>> ();
- if (item->get_ast_kind () == AST::Kind::MODULE)
+ if (item->get_item_kind () == AST::Item::Kind::Module)
new_macros = accumulate_escaped_macros (
*static_cast<AST::Module *> (item.get ()));
@@ -353,6 +353,8 @@ EarlyNameResolver::visit (AST::TraitItemType &)
void
EarlyNameResolver::visit (AST::Trait &trait)
{
+ // shouldn't need to visit trait.get_implicit_self ()
+
for (auto &generic : trait.get_generic_params ())
generic->accept_vis (*this);
diff --git a/gcc/rust/resolve/rust-forever-stack.cc b/gcc/rust/resolve/rust-forever-stack.cc
new file mode 100644
index 0000000..725ae0e
--- /dev/null
+++ b/gcc/rust/resolve/rust-forever-stack.cc
@@ -0,0 +1,318 @@
+// Copyright (C) 2024 Free Software Foundation, Inc.
+
+// This file is part of GCC.
+
+// GCC is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 3, or (at your option) any later
+// version.
+
+// GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+// for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING3. If not see
+// <http://www.gnu.org/licenses/>.
+
+#include "expected.h"
+#include "rust-ast.h"
+#include "rust-diagnostics.h"
+#include "rust-forever-stack.h"
+#include "rust-rib.h"
+#include "optional.h"
+
+namespace Rust {
+namespace Resolver2_0 {
+
+bool
+ForeverStackStore::Node::is_root () const
+{
+ return !parent.has_value ();
+}
+
+bool
+ForeverStackStore::Node::is_leaf () const
+{
+ return children.empty ();
+}
+
+NodeId
+ForeverStackStore::Node::get_id () const
+{
+ return id;
+}
+
+ForeverStackStore::Node &
+ForeverStackStore::Node::insert_child (NodeId id, tl::optional<Identifier> path,
+ Rib::Kind kind)
+{
+ auto res = children.insert ({Link (id, path), Node (kind, id, *this)});
+
+ rust_debug ("inserting link: Link(%d [%s]): existed? %s", id,
+ path.has_value () ? path.value ().as_string ().c_str ()
+ : "<anon>",
+ !res.second ? "yes" : "no");
+
+ // sanity check on rib kind
+ // pick the value rib, since all ribs should have the same kind anyways
+ rust_assert (res.second || res.first->second.value_rib.kind == kind);
+
+ // verify, if we're using an existing node, our paths don't contradict
+ if (!res.second && path.has_value ())
+ {
+ auto other_path = res.first->first.path;
+ rust_assert (!other_path.has_value ()
+ || other_path.value ().as_string ()
+ == path.value ().as_string ());
+ }
+
+ return res.first->second;
+}
+
+tl::optional<ForeverStackStore::Node &>
+ForeverStackStore::Node::get_child (const Identifier &path)
+{
+ for (auto &ent : children)
+ {
+ if (ent.first.path.has_value ()
+ && ent.first.path->as_string () == path.as_string ())
+ return ent.second;
+ }
+ return tl::nullopt;
+}
+
+tl::optional<const ForeverStackStore::Node &>
+ForeverStackStore::Node::get_child (const Identifier &path) const
+{
+ for (auto &ent : children)
+ {
+ if (ent.first.path.has_value ()
+ && ent.first.path->as_string () == path.as_string ())
+ return ent.second;
+ }
+ return tl::nullopt;
+}
+
+tl::optional<ForeverStackStore::Node &>
+ForeverStackStore::Node::get_parent ()
+{
+ return parent;
+}
+
+tl::optional<const ForeverStackStore::Node &>
+ForeverStackStore::Node::get_parent () const
+{
+ if (parent)
+ return *parent;
+ return tl::nullopt;
+}
+
+tl::optional<const Identifier &>
+ForeverStackStore::Node::get_parent_path () const
+{
+ if (parent.has_value ())
+ for (auto &ent : parent->children)
+ if (ent.first.id == id && ent.first.path.has_value ())
+ return ent.first.path.value ();
+ return tl::nullopt;
+}
+
+Rib &
+ForeverStackStore::Node::get_rib (Namespace ns)
+{
+ switch (ns)
+ {
+ case Namespace::Values:
+ return value_rib;
+ case Namespace::Types:
+ return type_rib;
+ case Namespace::Labels:
+ return label_rib;
+ case Namespace::Macros:
+ return macro_rib;
+ default:
+ rust_unreachable ();
+ }
+}
+
+const Rib &
+ForeverStackStore::Node::get_rib (Namespace ns) const
+{
+ switch (ns)
+ {
+ case Namespace::Values:
+ return value_rib;
+ case Namespace::Types:
+ return type_rib;
+ case Namespace::Labels:
+ return label_rib;
+ case Namespace::Macros:
+ return macro_rib;
+ default:
+ rust_unreachable ();
+ }
+}
+
+tl::expected<NodeId, DuplicateNameError>
+ForeverStackStore::Node::insert (const Identifier &name, NodeId node,
+ Namespace ns)
+{
+ // So what do we do here - if the Rib has already been pushed in an earlier
+ // pass, we might end up in a situation where it is okay to re-add new names.
+ // Do we just ignore that here? Do we keep track of if the Rib is new or not?
+ // should our cursor have info on the current node like "is it newly pushed"?
+ return get_rib (ns).insert (name.as_string (),
+ Rib::Definition::NonShadowable (node));
+}
+
+tl::expected<NodeId, DuplicateNameError>
+ForeverStackStore::Node::insert_shadowable (const Identifier &name, NodeId node,
+ Namespace ns)
+{
+ return get_rib (ns).insert (name.as_string (),
+ Rib::Definition::Shadowable (node));
+}
+
+tl::expected<NodeId, DuplicateNameError>
+ForeverStackStore::Node::insert_globbed (const Identifier &name, NodeId node,
+ Namespace ns)
+{
+ return get_rib (ns).insert (name.as_string (),
+ Rib::Definition::Globbed (node));
+}
+
+void
+ForeverStackStore::Node::reverse_iter (std::function<KeepGoing (Node &)> lambda)
+{
+ for (Node *tmp = this; lambda (*tmp) == KeepGoing::Yes && !tmp->is_root ();
+ tmp = &tmp->parent.value ())
+ ;
+}
+
+void
+ForeverStackStore::Node::reverse_iter (
+ std::function<KeepGoing (const Node &)> lambda) const
+{
+ for (const Node *tmp = this;
+ lambda (*tmp) == KeepGoing::Yes && !tmp->is_root ();
+ tmp = &tmp->parent.value ())
+ ;
+}
+
+void
+ForeverStackStore::Node::child_iter (
+ std::function<KeepGoing (NodeId, tl::optional<const Identifier &>, Node &)>
+ lambda)
+{
+ for (auto &ent : children)
+ {
+ tl::optional<const Identifier &> path;
+ if (ent.first.path.has_value ())
+ path = ent.first.path.value ();
+ auto keep_going = lambda (ent.first.id, path, ent.second);
+ if (keep_going == KeepGoing::No)
+ return;
+ }
+}
+
+void
+ForeverStackStore::Node::child_iter (
+ std::function<KeepGoing (NodeId, tl::optional<const Identifier &>,
+ const Node &)>
+ lambda) const
+{
+ for (auto &ent : children)
+ {
+ tl::optional<const Identifier &> path;
+ if (ent.first.path.has_value ())
+ path = ent.first.path.value ();
+ auto keep_going = lambda (ent.first.id, path, ent.second);
+ if (keep_going == KeepGoing::No)
+ return;
+ }
+}
+
+ForeverStackStore::Node &
+ForeverStackStore::Node::find_closest_module ()
+{
+ // get kind of value_rib
+ // but all ribs should share the same kind anyways
+ if (value_rib.kind == Rib::Kind::Module || !parent.has_value ())
+ return *this;
+ else
+ return parent->find_closest_module ();
+}
+
+const ForeverStackStore::Node &
+ForeverStackStore::Node::find_closest_module () const
+{
+ // get kind of value_rib
+ // but all ribs should share the same kind anyways
+ if (value_rib.kind != Rib::Kind::Module || !parent.has_value ())
+ return *this;
+ else
+ return parent->find_closest_module ();
+}
+
+tl::optional<ForeverStackStore::Node &>
+ForeverStackStore::Node::dfs_node (NodeId to_find)
+{
+ if (id == to_find)
+ return *this;
+
+ for (auto &child : children)
+ {
+ auto candidate = child.second.dfs_node (to_find);
+
+ if (candidate.has_value ())
+ return candidate;
+ }
+
+ return tl::nullopt;
+}
+
+tl::optional<const ForeverStackStore::Node &>
+ForeverStackStore::Node::dfs_node (NodeId to_find) const
+{
+ if (id == to_find)
+ return *this;
+
+ for (auto &child : children)
+ {
+ auto candidate = child.second.dfs_node (to_find);
+
+ if (candidate.has_value ())
+ return candidate;
+ }
+
+ return tl::nullopt;
+}
+
+ForeverStackStore::Node &
+ForeverStackStore::get_root ()
+{
+ return root;
+}
+
+const ForeverStackStore::Node &
+ForeverStackStore::get_root () const
+{
+ return root;
+}
+
+tl::optional<ForeverStackStore::Node &>
+ForeverStackStore::get_node (NodeId node_id)
+{
+ return root.dfs_node (node_id);
+}
+
+tl::optional<const ForeverStackStore::Node &>
+ForeverStackStore::get_node (NodeId node_id) const
+{
+ return root.dfs_node (node_id);
+}
+
+} // namespace Resolver2_0
+} // namespace Rust
diff --git a/gcc/rust/resolve/rust-forever-stack.h b/gcc/rust/resolve/rust-forever-stack.h
index 8c5e207..66e1266 100644
--- a/gcc/rust/resolve/rust-forever-stack.h
+++ b/gcc/rust/resolve/rust-forever-stack.h
@@ -392,6 +392,157 @@ not contain any imports, macro definitions or macro invocations. You can look at
this pass's documentation for more details on this resolution process.
**/
+
+/**
+ * Intended for use by ForeverStack to store Nodes
+ * Unlike ForeverStack, does not store a cursor reference
+ * Intended to make path resolution in multiple namespaces simpler
+ **/
+class ForeverStackStore
+{
+public:
+ ForeverStackStore (NodeId crate_id) : root (Rib::Kind::Normal, crate_id)
+ {
+ rust_assert (root.is_root ());
+ rust_assert (root.is_leaf ());
+ }
+
+private:
+ /**
+ * A link between two Nodes in our trie data structure. This class represents
+ * the edges of the graph
+ */
+ class Link
+ {
+ public:
+ Link (NodeId id, tl::optional<Identifier> path) : id (id), path (path) {}
+
+ bool compare (const Link &other) const { return id < other.id; }
+
+ NodeId id;
+ tl::optional<Identifier> path;
+ };
+
+ /* Link comparison class, which we use in a Node's `children` map */
+ class LinkCmp
+ {
+ public:
+ bool operator() (const Link &lhs, const Link &rhs) const
+ {
+ return lhs.compare (rhs);
+ }
+ };
+
+public:
+ class Node;
+
+ struct DfsResult
+ {
+ Node &first;
+ std::string second;
+ };
+
+ struct ConstDfsResult
+ {
+ const Node &first;
+ std::string second;
+ };
+
+ /* Should we keep going upon seeing a Rib? */
+ enum class KeepGoing
+ {
+ Yes,
+ No,
+ };
+
+ class Node
+ {
+ private:
+ friend class ForeverStackStore::ForeverStackStore;
+
+ Node (Rib::Kind rib_kind, NodeId id, tl::optional<Node &> parent)
+ : value_rib (rib_kind), type_rib (rib_kind), label_rib (rib_kind),
+ macro_rib (rib_kind), id (id), parent (parent)
+ {}
+ Node (Rib::Kind rib_kind, NodeId id) : Node (rib_kind, id, tl::nullopt) {}
+ Node (Rib::Kind rib_kind, NodeId id, Node &parent)
+ : Node (rib_kind, id, tl::optional<Node &> (parent))
+ {}
+
+ public:
+ Node (const Node &) = default;
+ Node (Node &&) = default;
+ Node &operator= (const Node &) = delete;
+ Node &operator= (Node &&) = default;
+
+ bool is_root () const;
+ bool is_leaf () const;
+
+ NodeId get_id () const;
+
+ Node &insert_child (NodeId id, tl::optional<Identifier> path,
+ Rib::Kind kind);
+
+ tl::optional<Node &> get_child (const Identifier &path);
+ tl::optional<const Node &> get_child (const Identifier &path) const;
+
+ tl::optional<Node &> get_parent ();
+ tl::optional<const Node &> get_parent () const;
+
+ // finds the identifier, if any, used to link
+ // this node's parent to this node
+ tl::optional<const Identifier &> get_parent_path () const;
+
+ Rib &get_rib (Namespace ns);
+ const Rib &get_rib (Namespace ns) const;
+
+ tl::expected<NodeId, DuplicateNameError> insert (const Identifier &name,
+ NodeId node, Namespace ns);
+ tl::expected<NodeId, DuplicateNameError>
+ insert_shadowable (const Identifier &name, NodeId node, Namespace ns);
+ tl::expected<NodeId, DuplicateNameError>
+ insert_globbed (const Identifier &name, NodeId node, Namespace ns);
+
+ void reverse_iter (std::function<KeepGoing (Node &)> lambda);
+ void reverse_iter (std::function<KeepGoing (const Node &)> lambda) const;
+
+ void child_iter (std::function<KeepGoing (
+ NodeId, tl::optional<const Identifier &>, Node &)>
+ lambda);
+ void child_iter (std::function<KeepGoing (
+ NodeId, tl::optional<const Identifier &>, const Node &)>
+ lambda) const;
+
+ Node &find_closest_module ();
+ const Node &find_closest_module () const;
+
+ tl::optional<Node &> dfs_node (NodeId to_find);
+ tl::optional<const Node &> dfs_node (NodeId to_find) const;
+
+ private:
+ // per-namespace ribs
+ Rib value_rib;
+ Rib type_rib;
+ Rib label_rib;
+ Rib macro_rib;
+ // all linked nodes
+ std::map<Link, Node, LinkCmp> children;
+
+ NodeId id; // The node id of the Node's scope
+
+ tl::optional<Node &> parent; // `None` only if the node is a root
+ };
+
+ Node &get_root ();
+ const Node &get_root () const;
+
+ tl::optional<Node &> get_node (NodeId node_id);
+ tl::optional<const Node &> get_node (NodeId node_id) const;
+
+private:
+ Node root;
+};
+
template <Namespace N> class ForeverStack
{
public:
@@ -416,7 +567,7 @@ public:
* @param path An optional path if the Rib was created due to a "named"
* lexical scope, like a module's.
*/
- void push (Rib rib, NodeId id, tl::optional<Identifier> path = {});
+ void push (Rib::Kind rib_kind, NodeId id, tl::optional<Identifier> path = {});
/**
* Pop the innermost Rib from the stack
@@ -521,6 +672,12 @@ public:
std::string as_debug_string ();
+ /**
+ * Used to check if a module is a descendant of another module
+ * Intended for use in the privacy checker
+ */
+ bool is_module_descendant (NodeId parent, NodeId child) const;
+
private:
/**
* A link between two Nodes in our trie data structure. This class represents
@@ -608,7 +765,8 @@ private:
template <typename S>
tl::optional<SegIterator<S>>
- find_starting_point (const std::vector<S> &segments, Node &starting_point);
+ find_starting_point (const std::vector<S> &segments,
+ std::reference_wrapper<Node> &starting_point);
template <typename S>
tl::optional<Node &> resolve_segments (Node &starting_point,
@@ -635,6 +793,10 @@ private:
tl::optional<Rib &> dfs_rib (Node &starting_point, NodeId to_find);
tl::optional<const Rib &> dfs_rib (const Node &starting_point,
NodeId to_find) const;
+ // FIXME: Documentation
+ tl::optional<Node &> dfs_node (Node &starting_point, NodeId to_find);
+ tl::optional<const Node &> dfs_node (const Node &starting_point,
+ NodeId to_find) const;
};
} // namespace Resolver2_0
diff --git a/gcc/rust/resolve/rust-forever-stack.hxx b/gcc/rust/resolve/rust-forever-stack.hxx
index 5a5a7c7..d3d7889 100644
--- a/gcc/rust/resolve/rust-forever-stack.hxx
+++ b/gcc/rust/resolve/rust-forever-stack.hxx
@@ -52,9 +52,10 @@ ForeverStack<N>::Node::insert_child (Link link, Node child)
template <Namespace N>
void
-ForeverStack<N>::push (Rib rib, NodeId id, tl::optional<Identifier> path)
+ForeverStack<N>::push (Rib::Kind rib_kind, NodeId id,
+ tl::optional<Identifier> path)
{
- push_inner (rib, Link (id, path));
+ push_inner (rib_kind, Link (id, path));
}
template <Namespace N>
@@ -373,8 +374,8 @@ check_leading_kw_at_start (const S &segment, bool condition)
template <Namespace N>
template <typename S>
tl::optional<typename std::vector<S>::const_iterator>
-ForeverStack<N>::find_starting_point (const std::vector<S> &segments,
- Node &starting_point)
+ForeverStack<N>::find_starting_point (
+ const std::vector<S> &segments, std::reference_wrapper<Node> &starting_point)
{
auto iterator = segments.begin ();
@@ -411,14 +412,15 @@ ForeverStack<N>::find_starting_point (const std::vector<S> &segments,
}
if (seg.is_super_path_seg ())
{
- if (starting_point.is_root ())
+ if (starting_point.get ().is_root ())
{
rust_error_at (seg.get_locus (), ErrorCode::E0433,
"too many leading %<super%> keywords");
return tl::nullopt;
}
- starting_point = find_closest_module (starting_point.parent.value ());
+ starting_point
+ = find_closest_module (starting_point.get ().parent.value ());
continue;
}
@@ -493,12 +495,12 @@ ForeverStack<N>::resolve_path (const std::vector<S> &segments)
if (segments.size () == 1)
return get (segments.back ().as_string ());
- auto starting_point = cursor ();
+ std::reference_wrapper<Node> starting_point = cursor ();
return find_starting_point (segments, starting_point)
.and_then ([this, &segments, &starting_point] (
typename std::vector<S>::const_iterator iterator) {
- return resolve_segments (starting_point, segments, iterator);
+ return resolve_segments (starting_point.get (), segments, iterator);
})
.and_then ([&segments] (Node final_node) {
return final_node.rib.get (segments.back ().as_string ());
@@ -626,12 +628,32 @@ template <Namespace N>
tl::optional<Rib &>
ForeverStack<N>::dfs_rib (ForeverStack<N>::Node &starting_point, NodeId to_find)
{
+ return dfs_node (starting_point, to_find).map ([] (Node &x) -> Rib & {
+ return x.rib;
+ });
+}
+
+template <Namespace N>
+tl::optional<const Rib &>
+ForeverStack<N>::dfs_rib (const ForeverStack<N>::Node &starting_point,
+ NodeId to_find) const
+{
+ return dfs_node (starting_point, to_find).map ([] (Node &x) -> Rib & {
+ return x.rib;
+ });
+}
+
+template <Namespace N>
+tl::optional<typename ForeverStack<N>::Node &>
+ForeverStack<N>::dfs_node (ForeverStack<N>::Node &starting_point,
+ NodeId to_find)
+{
if (starting_point.id == to_find)
- return starting_point.rib;
+ return starting_point;
for (auto &child : starting_point.children)
{
- auto candidate = dfs_rib (child.second, to_find);
+ auto candidate = dfs_node (child.second, to_find);
if (candidate.has_value ())
return candidate;
@@ -641,16 +663,16 @@ ForeverStack<N>::dfs_rib (ForeverStack<N>::Node &starting_point, NodeId to_find)
}
template <Namespace N>
-tl::optional<const Rib &>
-ForeverStack<N>::dfs_rib (const ForeverStack<N>::Node &starting_point,
- NodeId to_find) const
+tl::optional<const typename ForeverStack<N>::Node &>
+ForeverStack<N>::dfs_node (const ForeverStack<N>::Node &starting_point,
+ NodeId to_find) const
{
if (starting_point.id == to_find)
- return starting_point.rib;
+ return starting_point;
for (auto &child : starting_point.children)
{
- auto candidate = dfs_rib (child.second, to_find);
+ auto candidate = dfs_node (child.second, to_find);
if (candidate.has_value ())
return candidate;
@@ -737,6 +759,13 @@ ForeverStack<N>::as_debug_string ()
return stream.str ();
}
+template <Namespace N>
+bool
+ForeverStack<N>::is_module_descendant (NodeId parent, NodeId child) const
+{
+ return dfs_node (dfs_node (root, parent).value (), child).has_value ();
+}
+
// FIXME: Can we add selftests?
} // namespace Resolver2_0
diff --git a/gcc/rust/resolve/rust-late-name-resolver-2.0.cc b/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
index 43f33df..5aea6a4 100644
--- a/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-late-name-resolver-2.0.cc
@@ -18,6 +18,7 @@
#include "optional.h"
#include "rust-ast-full.h"
+#include "rust-diagnostics.h"
#include "rust-hir-map.h"
#include "rust-late-name-resolver-2.0.h"
#include "rust-default-resolver.h"
@@ -100,7 +101,7 @@ Late::setup_builtin_types ()
}
// ...here!
- auto *unit_type = TyTy::TupleType::get_unit_type (next_hir_id ());
+ auto *unit_type = TyTy::TupleType::get_unit_type ();
ty_ctx.insert_builtin (unit_type->get_ref (), next_node_id (), unit_type);
}
@@ -126,8 +127,14 @@ Late::new_label (Identifier name, NodeId id)
void
Late::visit (AST::LetStmt &let)
{
- // so we don't need that method
- DefaultResolver::visit (let);
+ DefaultASTVisitor::visit_outer_attrs (let);
+ if (let.has_type ())
+ visit (let.get_type ());
+ // visit expression before pattern
+ // this makes variable shadowing work properly
+ if (let.has_init_expr ())
+ visit (let.get_init_expr ());
+ visit (let.get_pattern ());
// how do we deal with the fact that `let a = blipbloup` should look for a
// label and cannot go through function ribs, but `let a = blipbloup()` can?
@@ -159,6 +166,18 @@ Late::visit (AST::IdentifierPattern &identifier)
}
void
+Late::visit (AST::SelfParam &param)
+{
+ // handle similar to AST::IdentifierPattern
+
+ DefaultResolver::visit (param);
+ // FIXME: this location should be a bit off
+ // ex: would point to the begining of "mut self" instead of the "self"
+ std::ignore = ctx.values.insert (Identifier ("self", param.get_locus ()),
+ param.get_node_id ());
+}
+
+void
Late::visit (AST::IdentifierExpr &expr)
{
// TODO: same thing as visit(PathInExpression) here?
@@ -199,19 +218,12 @@ Late::visit (AST::PathInExpression &expr)
// in a function item` error here?
// do we emit it in `get<Namespace::Labels>`?
- rust_debug ("[ARTHUR]: %s", expr.as_simple_path ().as_string ().c_str ());
-
- tl::optional<Rib::Definition> resolved = tl::nullopt;
+ auto resolved
+ = ctx.values.resolve_path (expr.get_segments ()).or_else ([&] () {
+ return ctx.types.resolve_path (expr.get_segments ());
+ });
- if (auto value = ctx.values.resolve_path (expr.get_segments ()))
- {
- resolved = value;
- }
- else if (auto type = ctx.types.resolve_path (expr.get_segments ()))
- {
- resolved = type;
- }
- else
+ if (!resolved)
{
rust_error_at (expr.get_locus (),
"could not resolve path expression: %qs",
@@ -225,6 +237,7 @@ Late::visit (AST::PathInExpression &expr)
expr.as_string ().c_str ());
return;
}
+
ctx.map_usage (Usage (expr.get_node_id ()),
Definition (resolved->get_node_id ()));
}
@@ -244,7 +257,23 @@ Late::visit (AST::TypePath &type)
ctx.map_usage (Usage (type.get_node_id ()),
Definition (resolved->get_node_id ()));
else
- rust_unreachable ();
+ rust_error_at (type.get_locus (), "could not resolve type path %qs",
+ str.c_str ());
+
+ DefaultResolver::visit (type);
+}
+
+void
+Late::visit (AST::Trait &trait)
+{
+ // kind of weird how this is done
+ // names are resolved to the node id of trait.get_implicit_self ()
+ // which is then resolved to the node id of trait
+ // we set up the latter mapping here
+ ctx.map_usage (Usage (trait.get_implicit_self ().get_node_id ()),
+ Definition (trait.get_node_id ()));
+
+ DefaultResolver::visit (trait);
}
void
@@ -255,9 +284,18 @@ Late::visit (AST::StructStruct &s)
}
void
+Late::visit (AST::StructExprStruct &s)
+{
+ auto resolved = ctx.types.resolve_path (s.get_struct_name ().get_segments ());
+
+ ctx.map_usage (Usage (s.get_struct_name ().get_node_id ()),
+ Definition (resolved->get_node_id ()));
+}
+
+void
Late::visit (AST::StructExprStructBase &s)
{
- auto resolved = ctx.types.get (s.get_struct_name ().as_string ());
+ auto resolved = ctx.types.resolve_path (s.get_struct_name ().get_segments ());
ctx.map_usage (Usage (s.get_struct_name ().get_node_id ()),
Definition (resolved->get_node_id ()));
@@ -267,7 +305,7 @@ Late::visit (AST::StructExprStructBase &s)
void
Late::visit (AST::StructExprStructFields &s)
{
- auto resolved = ctx.types.get (s.get_struct_name ().as_string ());
+ auto resolved = ctx.types.resolve_path (s.get_struct_name ().get_segments ());
ctx.map_usage (Usage (s.get_struct_name ().get_node_id ()),
Definition (resolved->get_node_id ()));
diff --git a/gcc/rust/resolve/rust-late-name-resolver-2.0.h b/gcc/rust/resolve/rust-late-name-resolver-2.0.h
index 7e33c96..ade78c5 100644
--- a/gcc/rust/resolve/rust-late-name-resolver-2.0.h
+++ b/gcc/rust/resolve/rust-late-name-resolver-2.0.h
@@ -41,11 +41,14 @@ public:
// TODO: Do we need this?
// void visit (AST::Method &) override;
void visit (AST::IdentifierPattern &) override;
+ void visit (AST::SelfParam &) override;
// resolutions
void visit (AST::IdentifierExpr &) override;
void visit (AST::PathInExpression &) override;
void visit (AST::TypePath &) override;
+ void visit (AST::Trait &) override;
+ void visit (AST::StructExprStruct &) override;
void visit (AST::StructExprStructBase &) override;
void visit (AST::StructExprStructFields &) override;
void visit (AST::StructStruct &) override;
diff --git a/gcc/rust/resolve/rust-name-resolution-context.cc b/gcc/rust/resolve/rust-name-resolution-context.cc
index 9bfaa09..1b37521 100644
--- a/gcc/rust/resolve/rust-name-resolution-context.cc
+++ b/gcc/rust/resolve/rust-name-resolution-context.cc
@@ -103,13 +103,13 @@ NameResolutionContext::lookup (NodeId usage) const
}
void
-NameResolutionContext::scoped (Rib rib, NodeId id,
+NameResolutionContext::scoped (Rib::Kind rib_kind, NodeId id,
std::function<void (void)> lambda,
tl::optional<Identifier> path)
{
- values.push (rib, id, path);
- types.push (rib, id, path);
- macros.push (rib, id, path);
+ values.push (rib_kind, id, path);
+ types.push (rib_kind, id, path);
+ macros.push (rib_kind, id, path);
// labels.push (rib, id);
lambda ();
@@ -121,17 +121,18 @@ NameResolutionContext::scoped (Rib rib, NodeId id,
}
void
-NameResolutionContext::scoped (Rib rib, Namespace ns, NodeId scope_id,
+NameResolutionContext::scoped (Rib::Kind rib_kind, Namespace ns,
+ NodeId scope_id,
std::function<void (void)> lambda,
tl::optional<Identifier> path)
{
switch (ns)
{
case Namespace::Values:
- values.push (rib, scope_id, path);
+ values.push (rib_kind, scope_id, path);
break;
case Namespace::Types:
- types.push (rib, scope_id, path);
+ types.push (rib_kind, scope_id, path);
break;
case Namespace::Labels:
case Namespace::Macros:
diff --git a/gcc/rust/resolve/rust-name-resolution-context.h b/gcc/rust/resolve/rust-name-resolution-context.h
index cd6fa93..183ce7f 100644
--- a/gcc/rust/resolve/rust-name-resolution-context.h
+++ b/gcc/rust/resolve/rust-name-resolution-context.h
@@ -185,8 +185,8 @@ public:
* function. This variant of the function enters a new scope in *all*
* namespaces, while the second variant enters a scope in *one* namespace.
*
- * @param rib New `Rib` to create when entering this scope. A function `Rib`,
- * or an item `Rib`... etc
+ * @param rib_kind New `Rib` to create when entering this scope. A function
+ * `Rib`, or an item `Rib`... etc
* @param scope_id node ID of the scope we are entering, e.g the block's
* `NodeId`.
* @param lambda Function to run within that scope
@@ -196,9 +196,10 @@ public:
*/
// FIXME: Do we want to handle something in particular for expected within the
// scoped lambda?
- void scoped (Rib rib, NodeId scope_id, std::function<void (void)> lambda,
+ void scoped (Rib::Kind rib_kind, NodeId scope_id,
+ std::function<void (void)> lambda,
tl::optional<Identifier> path = {});
- void scoped (Rib rib, Namespace ns, NodeId scope_id,
+ void scoped (Rib::Kind rib_kind, Namespace ns, NodeId scope_id,
std::function<void (void)> lambda,
tl::optional<Identifier> path = {});
diff --git a/gcc/rust/resolve/rust-name-resolver.cc b/gcc/rust/resolve/rust-name-resolver.cc
index 21147bd8..0f5b108 100644
--- a/gcc/rust/resolve/rust-name-resolver.cc
+++ b/gcc/rust/resolve/rust-name-resolver.cc
@@ -19,6 +19,9 @@
#include "rust-name-resolver.h"
#include "rust-ast-full.h"
+// for flag_name_resolution_2_0
+#include "options.h"
+
namespace Rust {
namespace Resolver {
@@ -435,8 +438,7 @@ Resolver::generate_builtins ()
set_never_type_node_id (never_node_id);
// unit type ()
- TyTy::TupleType *unit_tyty
- = TyTy::TupleType::get_unit_type (mappings.get_next_hir_id ());
+ TyTy::TupleType *unit_tyty = TyTy::TupleType::get_unit_type ();
std::vector<std::unique_ptr<AST::Type> > elems;
AST::TupleType *unit_type
= new AST::TupleType (std::move (elems), BUILTINS_LOCATION);
@@ -469,6 +471,7 @@ Resolver::setup_builtin (const std::string &name, TyTy::BaseType *tyty)
void
Resolver::insert_resolved_name (NodeId refId, NodeId defId)
{
+ rust_assert (!flag_name_resolution_2_0);
resolved_names[refId] = defId;
get_name_scope ().append_reference_for_def (refId, defId);
insert_captured_item (defId);
@@ -477,6 +480,7 @@ Resolver::insert_resolved_name (NodeId refId, NodeId defId)
bool
Resolver::lookup_resolved_name (NodeId refId, NodeId *defId)
{
+ rust_assert (!flag_name_resolution_2_0);
auto it = resolved_names.find (refId);
if (it == resolved_names.end ())
return false;
@@ -490,6 +494,7 @@ Resolver::insert_resolved_type (NodeId refId, NodeId defId)
{
// auto it = resolved_types.find (refId);
// rust_assert (it == resolved_types.end ());
+ rust_assert (!flag_name_resolution_2_0);
resolved_types[refId] = defId;
get_type_scope ().append_reference_for_def (refId, defId);
@@ -498,6 +503,7 @@ Resolver::insert_resolved_type (NodeId refId, NodeId defId)
bool
Resolver::lookup_resolved_type (NodeId refId, NodeId *defId)
{
+ rust_assert (!flag_name_resolution_2_0);
auto it = resolved_types.find (refId);
if (it == resolved_types.end ())
return false;
@@ -509,6 +515,7 @@ Resolver::lookup_resolved_type (NodeId refId, NodeId *defId)
void
Resolver::insert_resolved_label (NodeId refId, NodeId defId)
{
+ rust_assert (!flag_name_resolution_2_0);
auto it = resolved_labels.find (refId);
rust_assert (it == resolved_labels.end ());
@@ -519,6 +526,7 @@ Resolver::insert_resolved_label (NodeId refId, NodeId defId)
bool
Resolver::lookup_resolved_label (NodeId refId, NodeId *defId)
{
+ rust_assert (!flag_name_resolution_2_0);
auto it = resolved_labels.find (refId);
if (it == resolved_labels.end ())
return false;
@@ -530,6 +538,7 @@ Resolver::lookup_resolved_label (NodeId refId, NodeId *defId)
void
Resolver::insert_resolved_macro (NodeId refId, NodeId defId)
{
+ rust_assert (!flag_name_resolution_2_0);
auto it = resolved_macros.find (refId);
rust_assert (it == resolved_macros.end ());
@@ -540,6 +549,7 @@ Resolver::insert_resolved_macro (NodeId refId, NodeId defId)
bool
Resolver::lookup_resolved_macro (NodeId refId, NodeId *defId)
{
+ rust_assert (!flag_name_resolution_2_0);
auto it = resolved_macros.find (refId);
if (it == resolved_macros.end ())
return false;
@@ -551,6 +561,7 @@ Resolver::lookup_resolved_macro (NodeId refId, NodeId *defId)
void
Resolver::insert_resolved_misc (NodeId refId, NodeId defId)
{
+ rust_assert (!flag_name_resolution_2_0);
auto it = misc_resolved_items.find (refId);
rust_assert (it == misc_resolved_items.end ());
@@ -560,6 +571,7 @@ Resolver::insert_resolved_misc (NodeId refId, NodeId defId)
bool
Resolver::lookup_resolved_misc (NodeId refId, NodeId *defId)
{
+ rust_assert (!flag_name_resolution_2_0);
auto it = misc_resolved_items.find (refId);
if (it == misc_resolved_items.end ())
return false;
diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
index a0d8492..4c6664f 100644
--- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
@@ -87,13 +87,7 @@ TopLevel::visit (AST::Module &module)
if (module.get_kind () == AST::Module::UNLOADED)
module.load_items ();
- auto sub_visitor = [this, &module] () {
- for (auto &item : module.get_items ())
- item->accept_vis (*this);
- };
-
- ctx.scoped (Rib::Kind::Module, module.get_node_id (), sub_visitor,
- module.get_name ());
+ DefaultResolver::visit (module);
if (Analysis::Mappings::get ().lookup_ast_module (module.get_node_id ())
== tl::nullopt)
@@ -103,26 +97,47 @@ TopLevel::visit (AST::Module &module)
void
TopLevel::visit (AST::Trait &trait)
{
- // FIXME: This Self injection is dodgy. It even lead to issues with metadata
- // export in the past (#2349). We cannot tell appart injected parameters from
- // regular ones. Dumping generic parameters highlights this Self in metadata,
- // during debug or proc macro collection. This is clearly a hack.
- //
- // For now I'll keep it here in the new name resolver even if it should
- // probably not be there. We need to find another way to solve this.
- // Maybe an additional attribute to Trait ?
- //
- // From old resolver:
- //// we need to inject an implicit self TypeParam here
- //// FIXME: which location should be used for Rust::Identifier `Self`?
- AST::TypeParam *implicit_self
- = new AST::TypeParam ({"Self"}, trait.get_locus ());
- trait.insert_implict_self (
- std::unique_ptr<AST::GenericParam> (implicit_self));
+ insert_or_error_out (trait.get_identifier ().as_string (), trait,
+ Namespace::Types);
DefaultResolver::visit (trait);
}
+void
+TopLevel::visit (AST::InherentImpl &impl)
+{
+ auto inner_fn = [this, &impl] () {
+ insert_or_error_out (Identifier ("Self", impl.get_type ().get_locus ()),
+ impl.get_type (), Namespace::Types);
+
+ AST::DefaultASTVisitor::visit (impl);
+ };
+
+ ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn);
+}
+
+void
+TopLevel::visit (AST::TraitImpl &impl)
+{
+ auto inner_fn = [this, &impl] () {
+ insert_or_error_out (Identifier ("Self", impl.get_type ().get_locus ()),
+ impl.get_type (), Namespace::Types);
+
+ AST::DefaultASTVisitor::visit (impl);
+ };
+
+ ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn);
+}
+
+void
+TopLevel::visit (AST::TraitItemType &trait_item)
+{
+ insert_or_error_out (trait_item.get_identifier ().as_string (), trait_item,
+ Namespace::Types);
+
+ DefaultResolver::visit (trait_item);
+}
+
template <typename PROC_MACRO>
static void
insert_macros (std::vector<PROC_MACRO> &macros, NameResolutionContext &ctx)
@@ -236,32 +251,12 @@ TopLevel::visit (AST::Function &function)
}
void
-TopLevel::visit (AST::BlockExpr &expr)
-{
- // extracting the lambda from the `scoped` call otherwise the code looks like
- // a hot turd thanks to our .clang-format
-
- auto sub_vis = [this, &expr] () {
- for (auto &stmt : expr.get_statements ())
- stmt->accept_vis (*this);
-
- if (expr.has_tail_expr ())
- expr.get_tail_expr ().accept_vis (*this);
- };
-
- ctx.scoped (Rib::Kind::Normal, expr.get_node_id (), sub_vis);
-}
-
-void
TopLevel::visit (AST::StaticItem &static_item)
{
- auto sub_vis
- = [this, &static_item] () { static_item.get_expr ().accept_vis (*this); };
-
- ctx.scoped (Rib::Kind::Item, static_item.get_node_id (), sub_vis);
-
- insert_or_error_out (static_item.get_identifier ().as_string (), static_item,
+ insert_or_error_out (static_item.get_identifier (), static_item,
Namespace::Values);
+
+ DefaultResolver::visit (static_item);
}
void
@@ -269,6 +264,8 @@ TopLevel::visit (AST::ExternalStaticItem &static_item)
{
insert_or_error_out (static_item.get_identifier ().as_string (), static_item,
Namespace::Values);
+
+ DefaultResolver::visit (static_item);
}
void
@@ -297,11 +294,10 @@ TopLevel::visit (AST::StructStruct &struct_item)
void
TopLevel::visit (AST::TypeParam &type_param)
{
- // Hacky and weird, find a better solution
- // We should probably not even insert self in the first place ?
- if (type_param.get_type_representation ().as_string () != "Self")
- insert_or_error_out (type_param.get_type_representation (), type_param,
- Namespace::Types);
+ insert_or_error_out (type_param.get_type_representation (), type_param,
+ Namespace::Types);
+
+ DefaultResolver::visit (type_param);
}
void
@@ -320,6 +316,8 @@ TopLevel::visit (AST::TupleStruct &tuple_struct)
insert_or_error_out (tuple_struct.get_struct_name (), tuple_struct,
Namespace::Values);
+
+ DefaultResolver::visit (tuple_struct);
}
void
@@ -352,13 +350,7 @@ TopLevel::visit (AST::Enum &enum_item)
insert_or_error_out (enum_item.get_identifier (), enum_item,
Namespace::Types);
- auto field_vis = [this, &enum_item] () {
- for (auto &variant : enum_item.get_variants ())
- variant->accept_vis (*this);
- };
-
- ctx.scoped (Rib::Kind::Item /* FIXME: Is that correct? */,
- enum_item.get_node_id (), field_vis, enum_item.get_identifier ());
+ DefaultResolver::visit (enum_item);
}
void
@@ -366,6 +358,8 @@ TopLevel::visit (AST::Union &union_item)
{
insert_or_error_out (union_item.get_identifier (), union_item,
Namespace::Types);
+
+ DefaultResolver::visit (union_item);
}
void
diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h
index 7f4e295..fabcb5b 100644
--- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h
+++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.h
@@ -148,9 +148,11 @@ private:
void visit (AST::Module &module) override;
void visit (AST::Trait &trait) override;
+ void visit (AST::InherentImpl &impl) override;
+ void visit (AST::TraitImpl &impl) override;
+ void visit (AST::TraitItemType &trait_item) override;
void visit (AST::MacroRulesDefinition &macro) override;
void visit (AST::Function &function) override;
- void visit (AST::BlockExpr &expr) override;
void visit (AST::StaticItem &static_item) override;
void visit (AST::ExternalStaticItem &static_item) override;
void visit (AST::StructStruct &struct_item) override;
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h
index 9d28cf6..414799e 100644
--- a/gcc/rust/rust-backend.h
+++ b/gcc/rust/rust-backend.h
@@ -133,11 +133,11 @@ function_ptr_type (tree result, const std::vector<tree> &praameters,
// Get a struct type.
tree
-struct_type (const std::vector<typed_identifier> &fields);
+struct_type (const std::vector<typed_identifier> &fields, bool layout = true);
// Get a union type.
tree
-union_type (const std::vector<typed_identifier> &fields);
+union_type (const std::vector<typed_identifier> &fields, bool layout = true);
// Get an array type.
tree
@@ -496,7 +496,7 @@ write_global_definitions (const std::vector<tree> &type_decls,
// TODO: make static
tree
-fill_in_fields (tree, const std::vector<typed_identifier> &);
+fill_in_fields (tree, const std::vector<typed_identifier> &, bool);
tree fill_in_array (tree, tree, tree);
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index 273ab78..a6e8ea9 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -592,23 +592,24 @@ function_ptr_type (tree result_type, const std::vector<tree> &parameters,
// Make a struct type.
tree
-struct_type (const std::vector<typed_identifier> &fields)
+struct_type (const std::vector<typed_identifier> &fields, bool layout)
{
- return fill_in_fields (make_node (RECORD_TYPE), fields);
+ return fill_in_fields (make_node (RECORD_TYPE), fields, layout);
}
// Make a union type.
tree
-union_type (const std::vector<typed_identifier> &fields)
+union_type (const std::vector<typed_identifier> &fields, bool layout)
{
- return fill_in_fields (make_node (UNION_TYPE), fields);
+ return fill_in_fields (make_node (UNION_TYPE), fields, layout);
}
// Fill in the fields of a struct or union type.
tree
-fill_in_fields (tree fill, const std::vector<typed_identifier> &fields)
+fill_in_fields (tree fill, const std::vector<typed_identifier> &fields,
+ bool layout)
{
tree field_trees = NULL_TREE;
tree *pp = &field_trees;
@@ -625,7 +626,9 @@ fill_in_fields (tree fill, const std::vector<typed_identifier> &fields)
pp = &DECL_CHAIN (field);
}
TYPE_FIELDS (fill) = field_trees;
- layout_type (fill);
+
+ if (layout)
+ layout_type (fill);
// Because Rust permits converting between named struct types and
// equivalent struct types, for which we use VIEW_CONVERT_EXPR, and
@@ -939,7 +942,7 @@ operator_to_tree_code (NegationOperator op)
case NegationOperator::NEGATE:
return NEGATE_EXPR;
case NegationOperator::NOT:
- return TRUTH_NOT_EXPR;
+ return BIT_NOT_EXPR;
default:
rust_unreachable ();
}
@@ -1103,6 +1106,17 @@ arithmetic_or_logical_expression (ArithmeticOrLogicalOperator op, tree left,
if (floating_point && extended_type != NULL_TREE)
ret = convert (original_type, ret);
+ if (op == ArithmeticOrLogicalOperator::DIVIDE
+ && (integer_zerop (right) || fixed_zerop (right)))
+ {
+ rust_error_at (location, "division by zero");
+ }
+ else if (op == ArithmeticOrLogicalOperator::LEFT_SHIFT
+ && (compare_tree_int (right, TYPE_PRECISION (TREE_TYPE (ret))) >= 0))
+ {
+ rust_error_at (location, "left shift count >= width of type");
+ }
+
return ret;
}
@@ -1338,7 +1352,7 @@ constructor_expression (tree type_tree, bool is_variant,
if (!TREE_CONSTANT (elt->value))
is_constant = false;
}
- gcc_assert (field == NULL_TREE);
+ // gcc_assert (field == NULL_TREE);
}
}
diff --git a/gcc/rust/rust-lang.cc b/gcc/rust/rust-lang.cc
index b84e114..f3a155d 100644
--- a/gcc/rust/rust-lang.cc
+++ b/gcc/rust/rust-lang.cc
@@ -143,6 +143,8 @@ grs_langhook_init_options_struct (struct gcc_options *opts)
opts->x_warn_unused_result = 1;
/* lets warn for infinite recursion*/
opts->x_warn_infinite_recursion = 1;
+ /* Enable exception handling (aka `panic!` in Rust) */
+ opts->x_flag_exceptions = 1;
// nothing yet - used by frontends to change specific options for the language
Rust::Session::get_instance ().init_options ();
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 11ff250..1039fdf 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -17,6 +17,7 @@
// <http://www.gnu.org/licenses/>.
#include "rust-session-manager.h"
+#include "rust-collect-lang-items.h"
#include "rust-diagnostics.h"
#include "rust-hir-pattern-analysis.h"
#include "rust-immutable-name-resolution-context.h"
@@ -265,6 +266,9 @@ Session::handle_option (
case OPT_frust_metadata_output_:
options.set_metadata_output (arg);
break;
+ case OPT_frust_panic_:
+ options.set_panic_strategy (flag_rust_panic);
+ break;
default:
break;
@@ -600,6 +604,8 @@ Session::compile_crate (const char *filename)
if (last_step == CompileOptions::CompileStep::Expansion)
return;
+ AST::CollectLangItems ().go (parsed_crate);
+
auto name_resolution_ctx = Resolver2_0::NameResolutionContext ();
// expansion pipeline stage
diff --git a/gcc/rust/rust-session-manager.h b/gcc/rust/rust-session-manager.h
index b5a715c..73a85b3 100644
--- a/gcc/rust/rust-session-manager.h
+++ b/gcc/rust/rust-session-manager.h
@@ -264,6 +264,13 @@ struct CompileOptions
} compile_until
= CompileStep::End;
+ enum class PanicStrategy
+ {
+ Unwind,
+ Abort,
+ } panic_strategy
+ = PanicStrategy::Unwind;
+
bool dump_option_enabled (DumpOption option) const
{
return dump_options.find (option) != dump_options.end ();
@@ -320,6 +327,13 @@ struct CompileOptions
const CompileStep &get_compile_until () const { return compile_until; }
+ void set_panic_strategy (int strategy)
+ {
+ panic_strategy = static_cast<PanicStrategy> (strategy);
+ }
+
+ const PanicStrategy &get_panic_strategy () const { return panic_strategy; }
+
void set_metadata_output (const std::string &path)
{
metadata_output_path = path;
diff --git a/gcc/rust/typecheck/rust-autoderef.cc b/gcc/rust/typecheck/rust-autoderef.cc
index 7e80b8e..75da391 100644
--- a/gcc/rust/typecheck/rust-autoderef.cc
+++ b/gcc/rust/typecheck/rust-autoderef.cc
@@ -209,7 +209,7 @@ resolve_operator_overload_fn (
== 0)
{
TraitReference *trait_reference
- = TraitResolver::Lookup (*parent->get_trait_ref ().get ());
+ = TraitResolver::Lookup (parent->get_trait_ref ());
if (!trait_reference->is_error ())
{
TyTy::BaseType *lookup = nullptr;
diff --git a/gcc/rust/typecheck/rust-casts.cc b/gcc/rust/typecheck/rust-casts.cc
index 5235069f..90bdef1 100644
--- a/gcc/rust/typecheck/rust-casts.cc
+++ b/gcc/rust/typecheck/rust-casts.cc
@@ -200,6 +200,26 @@ TypeCastRules::cast_rules ()
}
break;
+ case TyTy::TypeKind::FLOAT: {
+ // can only do this for number types not char
+ bool from_char
+ = from.get_ty ()->get_kind () == TyTy::TypeKind::CHAR;
+ if (!from_char)
+ return TypeCoercionRules::CoercionResult{{},
+ to.get_ty ()->clone ()};
+ }
+ break;
+
+ case TyTy::TypeKind::POINTER: {
+ // char can't be casted as a ptr
+ bool from_char
+ = from.get_ty ()->get_kind () == TyTy::TypeKind::CHAR;
+ if (!from_char)
+ return TypeCoercionRules::CoercionResult{{},
+ to.get_ty ()->clone ()};
+ }
+ break;
+
case TyTy::TypeKind::INFER:
case TyTy::TypeKind::USIZE:
case TyTy::TypeKind::ISIZE:
@@ -215,6 +235,12 @@ TypeCastRules::cast_rules ()
case TyTy::TypeKind::FLOAT:
switch (to.get_ty ()->get_kind ())
{
+ case TyTy::TypeKind::USIZE:
+ case TyTy::TypeKind::ISIZE:
+ case TyTy::TypeKind::UINT:
+ case TyTy::TypeKind::INT:
+ return TypeCoercionRules::CoercionResult{{}, to.get_ty ()->clone ()};
+
case TyTy::TypeKind::FLOAT:
return TypeCoercionRules::CoercionResult{{}, to.get_ty ()->clone ()};
@@ -244,12 +270,25 @@ TypeCastRules::cast_rules ()
case TyTy::TypeKind::POINTER:
switch (to.get_ty ()->get_kind ())
{
+ case TyTy::TypeKind::USIZE:
+ case TyTy::TypeKind::ISIZE:
+ case TyTy::TypeKind::UINT:
+ case TyTy::TypeKind::INT: {
+ // refs should not cast to numeric type
+ bool from_ptr
+ = from.get_ty ()->get_kind () == TyTy::TypeKind::POINTER;
+ if (from_ptr)
+ {
+ return TypeCoercionRules::CoercionResult{
+ {}, to.get_ty ()->clone ()};
+ }
+ }
+ break;
+
case TyTy::TypeKind::REF:
case TyTy::TypeKind::POINTER:
return check_ptr_ptr_cast ();
- // FIXME can you cast a pointer to a integral type?
-
default:
return TypeCoercionRules::CoercionResult::get_error ();
}
diff --git a/gcc/rust/typecheck/rust-hir-dot-operator.cc b/gcc/rust/typecheck/rust-hir-dot-operator.cc
index 8e5473f..38bd5b7 100644
--- a/gcc/rust/typecheck/rust-hir-dot-operator.cc
+++ b/gcc/rust/typecheck/rust-hir-dot-operator.cc
@@ -62,7 +62,7 @@ MethodResolver::Select (std::set<MethodCandidate> &candidates,
for (size_t i = 0; i < arguments.size (); i++)
{
TyTy::BaseType *arg = arguments.at (i);
- TyTy::BaseType *param = fn.get_params ().at (i + 1).second;
+ TyTy::BaseType *param = fn.get_params ().at (i + 1).get_type ();
TyTy::BaseType *coerced
= try_coercion (0, TyTy::TyWithLocation (param),
TyTy::TyWithLocation (arg), UNDEF_LOCATION);
@@ -200,104 +200,103 @@ MethodResolver::select (TyTy::BaseType &receiver)
};
std::vector<trait_item_candidate> trait_fns;
- mappings.iterate_impl_blocks (
- [&] (HirId id, HIR::ImplBlock *impl) mutable -> bool {
- bool is_trait_impl = impl->has_trait_ref ();
- if (!is_trait_impl)
- return true;
-
- // look for impl implementation else lookup the associated trait item
- for (auto &impl_item : impl->get_impl_items ())
- {
- bool is_fn = impl_item->get_impl_item_type ()
- == HIR::ImplItem::ImplItemType::FUNCTION;
- if (!is_fn)
- continue;
-
- HIR::Function *func = static_cast<HIR::Function *> (impl_item.get ());
- if (!func->is_method ())
- continue;
-
- bool name_matches = func->get_function_name ().as_string ().compare (
- segment_name.as_string ())
- == 0;
- if (!name_matches)
- continue;
-
- TyTy::BaseType *ty = nullptr;
- if (!query_type (func->get_mappings ().get_hirid (), &ty))
- continue;
- if (ty->get_kind () == TyTy::TypeKind::ERROR)
- continue;
-
- rust_assert (ty->get_kind () == TyTy::TypeKind::FNDEF);
- TyTy::FnType *fnty = static_cast<TyTy::FnType *> (ty);
- const TyTy::BaseType *impl_self
- = TypeCheckItem::ResolveImplBlockSelf (*impl);
-
- // see:
- // https://gcc-rust.zulipchat.com/#narrow/stream/266897-general/topic/Method.20Resolution/near/338646280
- // https://github.com/rust-lang/rust/blob/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_typeck/src/check/method/probe.rs#L650-L660
- bool impl_self_is_ptr
- = impl_self->get_kind () == TyTy::TypeKind::POINTER;
- bool impl_self_is_ref = impl_self->get_kind () == TyTy::TypeKind::REF;
- if (receiver_is_raw_ptr && impl_self_is_ptr)
- {
- const TyTy::PointerType &sptr
- = *static_cast<const TyTy::PointerType *> (impl_self);
- const TyTy::PointerType &ptr
- = *static_cast<const TyTy::PointerType *> (raw);
-
- // we could do this via lang-item assemblies if we refactor this
- bool mut_match = sptr.mutability () == ptr.mutability ();
- if (!mut_match)
- continue;
- }
- else if (receiver_is_ref && impl_self_is_ref)
- {
- const TyTy::ReferenceType &sptr
- = *static_cast<const TyTy::ReferenceType *> (impl_self);
- const TyTy::ReferenceType &ptr
- = *static_cast<const TyTy::ReferenceType *> (raw);
-
- // we could do this via lang-item assemblies if we refactor this
- bool mut_match = sptr.mutability () == ptr.mutability ();
- if (!mut_match)
- continue;
- }
+ mappings.iterate_impl_blocks ([&] (HirId id,
+ HIR::ImplBlock *impl) mutable -> bool {
+ bool is_trait_impl = impl->has_trait_ref ();
+ if (!is_trait_impl)
+ return true;
- inherent_impl_fns.push_back ({func, impl, fnty});
- return true;
- }
+ // look for impl implementation else lookup the associated trait item
+ for (auto &impl_item : impl->get_impl_items ())
+ {
+ bool is_fn = impl_item->get_impl_item_type ()
+ == HIR::ImplItem::ImplItemType::FUNCTION;
+ if (!is_fn)
+ continue;
+
+ HIR::Function *func = static_cast<HIR::Function *> (impl_item.get ());
+ if (!func->is_method ())
+ continue;
+
+ bool name_matches = func->get_function_name ().as_string ().compare (
+ segment_name.as_string ())
+ == 0;
+ if (!name_matches)
+ continue;
+
+ TyTy::BaseType *ty = nullptr;
+ if (!query_type (func->get_mappings ().get_hirid (), &ty))
+ continue;
+ if (ty->get_kind () == TyTy::TypeKind::ERROR)
+ continue;
+
+ rust_assert (ty->get_kind () == TyTy::TypeKind::FNDEF);
+ TyTy::FnType *fnty = static_cast<TyTy::FnType *> (ty);
+ const TyTy::BaseType *impl_self
+ = TypeCheckItem::ResolveImplBlockSelf (*impl);
+
+ // see:
+ // https://gcc-rust.zulipchat.com/#narrow/stream/266897-general/topic/Method.20Resolution/near/338646280
+ // https://github.com/rust-lang/rust/blob/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/compiler/rustc_typeck/src/check/method/probe.rs#L650-L660
+ bool impl_self_is_ptr
+ = impl_self->get_kind () == TyTy::TypeKind::POINTER;
+ bool impl_self_is_ref = impl_self->get_kind () == TyTy::TypeKind::REF;
+ if (receiver_is_raw_ptr && impl_self_is_ptr)
+ {
+ const TyTy::PointerType &sptr
+ = *static_cast<const TyTy::PointerType *> (impl_self);
+ const TyTy::PointerType &ptr
+ = *static_cast<const TyTy::PointerType *> (raw);
+
+ // we could do this via lang-item assemblies if we refactor this
+ bool mut_match = sptr.mutability () == ptr.mutability ();
+ if (!mut_match)
+ continue;
+ }
+ else if (receiver_is_ref && impl_self_is_ref)
+ {
+ const TyTy::ReferenceType &sptr
+ = *static_cast<const TyTy::ReferenceType *> (impl_self);
+ const TyTy::ReferenceType &ptr
+ = *static_cast<const TyTy::ReferenceType *> (raw);
+
+ // we could do this via lang-item assemblies if we refactor this
+ bool mut_match = sptr.mutability () == ptr.mutability ();
+ if (!mut_match)
+ continue;
+ }
+
+ inherent_impl_fns.push_back ({func, impl, fnty});
+ return true;
+ }
- TraitReference *trait_ref
- = TraitResolver::Resolve (*impl->get_trait_ref ().get ());
- rust_assert (!trait_ref->is_error ());
+ TraitReference *trait_ref = TraitResolver::Resolve (impl->get_trait_ref ());
+ rust_assert (!trait_ref->is_error ());
- auto item_ref
- = trait_ref->lookup_trait_item (segment_name.as_string (),
- TraitItemReference::TraitItemType::FN);
- if (item_ref->is_error ())
- return true;
+ auto item_ref
+ = trait_ref->lookup_trait_item (segment_name.as_string (),
+ TraitItemReference::TraitItemType::FN);
+ if (item_ref->is_error ())
+ return true;
- const HIR::Trait *trait = trait_ref->get_hir_trait_ref ();
- HIR::TraitItem *item = item_ref->get_hir_trait_item ();
- if (item->get_item_kind () != HIR::TraitItem::TraitItemKind::FUNC)
- return true;
+ const HIR::Trait *trait = trait_ref->get_hir_trait_ref ();
+ HIR::TraitItem *item = item_ref->get_hir_trait_item ();
+ if (item->get_item_kind () != HIR::TraitItem::TraitItemKind::FUNC)
+ return true;
- HIR::TraitItemFunc *func = static_cast<HIR::TraitItemFunc *> (item);
- if (!func->get_decl ().is_method ())
- return true;
+ HIR::TraitItemFunc *func = static_cast<HIR::TraitItemFunc *> (item);
+ if (!func->get_decl ().is_method ())
+ return true;
- TyTy::BaseType *ty = item_ref->get_tyty ();
- rust_assert (ty->get_kind () == TyTy::TypeKind::FNDEF);
- TyTy::FnType *fnty = static_cast<TyTy::FnType *> (ty);
+ TyTy::BaseType *ty = item_ref->get_tyty ();
+ rust_assert (ty->get_kind () == TyTy::TypeKind::FNDEF);
+ TyTy::FnType *fnty = static_cast<TyTy::FnType *> (ty);
- trait_item_candidate candidate{func, trait, fnty, trait_ref, item_ref};
- trait_fns.push_back (candidate);
+ trait_item_candidate candidate{func, trait, fnty, trait_ref, item_ref};
+ trait_fns.push_back (candidate);
- return true;
- });
+ return true;
+ });
// lookup specified bounds for an associated item
struct precdicate_candidate
diff --git a/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h b/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h
index 5cef1c2..5537b14 100644
--- a/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h
+++ b/gcc/rust/typecheck/rust-hir-inherent-impl-overlap.h
@@ -54,7 +54,7 @@ public:
// impl-type -> [ (item, name), ... ]
// }
- HirId impl_type_id = impl->get_type ()->get_mappings ().get_hirid ();
+ HirId impl_type_id = impl->get_type ().get_mappings ().get_hirid ();
TyTy::BaseType *impl_type = nullptr;
bool ok = query_type (impl_type_id, &impl_type);
if (!ok)
diff --git a/gcc/rust/typecheck/rust-hir-path-probe.cc b/gcc/rust/typecheck/rust-hir-path-probe.cc
index 196cc82..1148b24 100644
--- a/gcc/rust/typecheck/rust-hir-path-probe.cc
+++ b/gcc/rust/typecheck/rust-hir-path-probe.cc
@@ -168,7 +168,7 @@ PathProbeType::Probe (const TyTy::BaseType *receiver,
if (!probe_bounds)
return probe.candidates;
- if (!probe.is_reciever_generic ())
+ if (!probe.is_receiver_generic ())
{
std::vector<std::pair<TraitReference *, HIR::ImplBlock *>> probed_bounds
= TypeBoundsProbe::Probe (receiver);
@@ -297,7 +297,7 @@ PathProbeType::process_impl_item_candidate (HirId id, HIR::ImplItem *item,
HIR::ImplBlock *impl)
{
current_impl = impl;
- HirId impl_ty_id = impl->get_type ()->get_mappings ().get_hirid ();
+ HirId impl_ty_id = impl->get_type ().get_mappings ().get_hirid ();
TyTy::BaseType *impl_block_ty = nullptr;
if (!query_type (impl_ty_id, &impl_block_ty))
return;
@@ -433,7 +433,7 @@ PathProbeType::union_bounds (
}
bool
-PathProbeType::is_reciever_generic () const
+PathProbeType::is_receiver_generic () const
{
const TyTy::BaseType *root = receiver->get_root ();
bool receiver_is_type_param = root->get_kind () == TyTy::TypeKind::PARAM;
@@ -472,8 +472,7 @@ PathProbeImplTrait::process_trait_impl_items_for_candidates ()
if (!impl->has_trait_ref ())
return true;
- TraitReference *resolved
- = TraitResolver::Lookup (*(impl->get_trait_ref ().get ()));
+ TraitReference *resolved = TraitResolver::Lookup (impl->get_trait_ref ());
if (!trait_reference->is_equal (*resolved))
return true;
diff --git a/gcc/rust/typecheck/rust-hir-path-probe.h b/gcc/rust/typecheck/rust-hir-path-probe.h
index 09a6492..59ffeb1 100644
--- a/gcc/rust/typecheck/rust-hir-path-probe.h
+++ b/gcc/rust/typecheck/rust-hir-path-probe.h
@@ -145,7 +145,7 @@ protected:
const std::vector<std::pair<const TraitReference *, HIR::ImplBlock *>> b)
const;
- bool is_reciever_generic () const;
+ bool is_receiver_generic () const;
const TyTy::BaseType *receiver;
const HIR::PathIdentSegment &search;
diff --git a/gcc/rust/typecheck/rust-hir-trait-reference.h b/gcc/rust/typecheck/rust-hir-trait-reference.h
index bdfd987..4197033 100644
--- a/gcc/rust/typecheck/rust-hir-trait-reference.h
+++ b/gcc/rust/typecheck/rust-hir-trait-reference.h
@@ -246,6 +246,8 @@ public:
HIR::ImplBlock *get_impl_block ();
+ location_t get_locus () const;
+
TyTy::BaseType *get_self ();
const TyTy::BaseType *get_self () const;
diff --git a/gcc/rust/typecheck/rust-hir-trait-resolve.cc b/gcc/rust/typecheck/rust-hir-trait-resolve.cc
index ec331cf..8201932 100644
--- a/gcc/rust/typecheck/rust-hir-trait-resolve.cc
+++ b/gcc/rust/typecheck/rust-hir-trait-resolve.cc
@@ -20,6 +20,10 @@
#include "rust-hir-type-check-expr.h"
#include "rust-substitution-mapper.h"
#include "rust-type-util.h"
+#include "rust-immutable-name-resolution-context.h"
+
+// used for flag_name_resolution_2_0
+#include "options.h"
namespace Rust {
namespace Resolver {
@@ -65,7 +69,7 @@ ResolveTraitItemToRef::visit (HIR::TraitItemFunc &fn)
{
// create trait-item-ref
location_t locus = fn.get_locus ();
- bool is_optional = fn.has_block_defined ();
+ bool is_optional = fn.has_definition ();
std::string identifier = fn.get_decl ().get_function_name ().as_string ();
resolved = TraitItemReference (identifier, is_optional,
@@ -110,8 +114,24 @@ TraitResolver::resolve_path_to_trait (const HIR::TypePath &path,
HIR::Trait **resolved) const
{
NodeId ref;
- if (!resolver->lookup_resolved_type (path.get_mappings ().get_nodeid (),
- &ref))
+ bool ok;
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ auto ref_opt = nr_ctx.lookup (path.get_mappings ().get_nodeid ());
+
+ if ((ok = ref_opt.has_value ()))
+ ref = *ref_opt;
+ }
+ else
+ {
+ ok = resolver->lookup_resolved_type (path.get_mappings ().get_nodeid (),
+ &ref);
+ }
+
+ if (!ok)
{
rust_error_at (path.get_locus (), "Failed to resolve path to node-id");
return false;
@@ -196,8 +216,7 @@ TraitResolver::resolve_trait (HIR::Trait *trait_reference)
// The one exception is the implicit Self type of a trait
bool apply_sized = !is_self;
auto param_type
- = TypeResolveGenericParam::Resolve (generic_param.get (),
- apply_sized);
+ = TypeResolveGenericParam::Resolve (*generic_param, apply_sized);
context->insert_type (generic_param->get_mappings (), param_type);
substitutions.push_back (
TyTy::SubstitutionParamMapping (typaram, param_type));
@@ -248,7 +267,7 @@ TraitResolver::resolve_trait (HIR::Trait *trait_reference)
auto predicate = get_predicate_from_bound (
b->get_path (),
- nullptr /*this will setup a PLACEHOLDER for self*/);
+ tl::nullopt /*this will setup a PLACEHOLDER for self*/);
if (predicate.is_error ())
return &TraitReference::error_node ();
@@ -259,6 +278,7 @@ TraitResolver::resolve_trait (HIR::Trait *trait_reference)
}
self->inherit_bounds (specified_bounds);
+ context->block_context ().enter (TypeCheckBlockContextItem (trait_reference));
std::vector<TraitItemReference> item_refs;
for (auto &item : trait_reference->get_trait_items ())
{
@@ -288,6 +308,7 @@ TraitResolver::resolve_trait (HIR::Trait *trait_reference)
// resolve the blocks of functions etc because it can end up in a recursive
// loop of trying to resolve traits as required by the types
tref->on_resolved ();
+ context->block_context ().exit ();
return tref;
}
@@ -364,11 +385,11 @@ TraitItemReference::resolve_item (HIR::TraitItemFunc &func)
auto expected_ret_tyty = resolved_fn_type->get_return_type ();
context->push_return_type (TypeCheckContextItem (&func), expected_ret_tyty);
- auto block_expr_ty = TypeCheckExpr::Resolve (func.get_block_expr ().get ());
+ auto block_expr_ty = TypeCheckExpr::Resolve (func.get_block_expr ());
location_t fn_return_locus
= func.get_decl ().has_return_type ()
- ? func.get_decl ().get_return_type ()->get_locus ()
+ ? func.get_decl ().get_return_type ().get_locus ()
: func.get_locus ();
coercion_site (func.get_mappings ().get_hirid (),
@@ -669,6 +690,12 @@ AssociatedImplTrait::reset_associated_types ()
trait->clear_associated_types ();
}
+location_t
+AssociatedImplTrait::get_locus () const
+{
+ return impl->get_locus ();
+}
+
Analysis::NodeMapping
TraitItemReference::get_parent_trait_mappings () const
{
diff --git a/gcc/rust/typecheck/rust-hir-type-check-base.cc b/gcc/rust/typecheck/rust-hir-type-check-base.cc
index 7e34cef..d8b4b23 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-base.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-base.cc
@@ -374,22 +374,21 @@ TypeCheckBase::resolve_generic_params (
break;
case HIR::GenericParam::GenericKind::CONST: {
- auto param
- = static_cast<HIR::ConstGenericParam *> (generic_param.get ());
- auto specified_type
- = TypeCheckType::Resolve (param->get_type ().get ());
+ auto &param
+ = static_cast<HIR::ConstGenericParam &> (*generic_param);
+ auto specified_type = TypeCheckType::Resolve (param.get_type ());
- if (param->has_default_expression ())
+ if (param.has_default_expression ())
{
- auto expr_type = TypeCheckExpr::Resolve (
- param->get_default_expression ().get ());
-
- coercion_site (
- param->get_mappings ().get_hirid (),
- TyTy::TyWithLocation (specified_type),
- TyTy::TyWithLocation (
- expr_type, param->get_default_expression ()->get_locus ()),
- param->get_locus ());
+ auto expr_type
+ = TypeCheckExpr::Resolve (param.get_default_expression ());
+
+ coercion_site (param.get_mappings ().get_hirid (),
+ TyTy::TyWithLocation (specified_type),
+ TyTy::TyWithLocation (
+ expr_type,
+ param.get_default_expression ().get_locus ()),
+ param.get_locus ());
}
context->insert_type (generic_param->get_mappings (),
@@ -398,8 +397,7 @@ TypeCheckBase::resolve_generic_params (
break;
case HIR::GenericParam::GenericKind::TYPE: {
- auto param_type
- = TypeResolveGenericParam::Resolve (generic_param.get ());
+ auto param_type = TypeResolveGenericParam::Resolve (*generic_param);
context->insert_type (generic_param->get_mappings (), param_type);
substitutions.push_back (TyTy::SubstitutionParamMapping (
diff --git a/gcc/rust/typecheck/rust-hir-type-check-base.h b/gcc/rust/typecheck/rust-hir-type-check-base.h
index 0bc2905..e720b94 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-base.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-base.h
@@ -37,10 +37,10 @@ protected:
TraitReference *resolve_trait_path (HIR::TypePath &);
- TyTy::TypeBoundPredicate
- get_predicate_from_bound (HIR::TypePath &path, HIR::Type *associated_self,
- BoundPolarity polarity
- = BoundPolarity::RegularBound);
+ TyTy::TypeBoundPredicate get_predicate_from_bound (
+ HIR::TypePath &path,
+ tl::optional<std::reference_wrapper<HIR::Type>> associated_self,
+ BoundPolarity polarity = BoundPolarity::RegularBound);
bool check_for_unconstrained (
const std::vector<TyTy::SubstitutionParamMapping> &params_to_constrain,
@@ -55,7 +55,7 @@ protected:
location_t locus);
void resolve_generic_params (
- const std::vector<std::unique_ptr<HIR::GenericParam> > &generic_params,
+ const std::vector<std::unique_ptr<HIR::GenericParam>> &generic_params,
std::vector<TyTy::SubstitutionParamMapping> &substitutions);
TyTy::TypeBoundPredicate get_marker_predicate (LangItem::Kind item_type,
diff --git a/gcc/rust/typecheck/rust-hir-type-check-enumitem.cc b/gcc/rust/typecheck/rust-hir-type-check-enumitem.cc
index a9154c6..4bf7b72 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-enumitem.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-enumitem.cc
@@ -16,6 +16,7 @@
// along with GCC; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+#include "rust-hir-expr.h"
#include "rust-hir-type-check-type.h"
#include "rust-hir-type-check-expr.h"
#include "rust-hir-type-check-enumitem.h"
@@ -29,25 +30,25 @@ namespace Rust {
namespace Resolver {
TyTy::VariantDef *
-TypeCheckEnumItem::Resolve (HIR::EnumItem *item, int64_t last_discriminant)
+TypeCheckEnumItem::Resolve (HIR::EnumItem &item, int64_t last_discriminant)
{
TypeCheckEnumItem resolver (last_discriminant);
- switch (item->get_enum_item_kind ())
+ switch (item.get_enum_item_kind ())
{
case HIR::EnumItem::EnumItemKind::Named:
- resolver.visit (static_cast<HIR::EnumItem &> (*item));
+ resolver.visit (static_cast<HIR::EnumItem &> (item));
break;
case HIR::EnumItem::EnumItemKind::Tuple:
- resolver.visit (static_cast<HIR::EnumItemTuple &> (*item));
+ resolver.visit (static_cast<HIR::EnumItemTuple &> (item));
break;
case HIR::EnumItem::EnumItemKind::Struct:
- resolver.visit (static_cast<HIR::EnumItemStruct &> (*item));
+ resolver.visit (static_cast<HIR::EnumItemStruct &> (item));
break;
case HIR::EnumItem::EnumItemKind::Discriminant:
- resolver.visit (static_cast<HIR::EnumItemDiscriminant &> (*item));
+ resolver.visit (static_cast<HIR::EnumItemDiscriminant &> (item));
break;
}
return resolver.variant;
@@ -68,11 +69,10 @@ TypeCheckEnumItem::visit (HIR::EnumItem &item)
mappings.get_next_hir_id (
item.get_mappings ().get_crate_num ()),
item.get_mappings ().get_local_defid ());
- HIR::LiteralExpr *discim_expr
- = new HIR::LiteralExpr (mapping, std::to_string (last_discriminant),
- HIR::Literal::LitType::INT,
- PrimitiveCoreType::CORETYPE_I64, item.get_locus (),
- {});
+ auto discim_expr = std::make_unique<HIR::LiteralExpr> (
+ HIR::LiteralExpr (mapping, std::to_string (last_discriminant),
+ HIR::Literal::LitType::INT,
+ PrimitiveCoreType::CORETYPE_I64, item.get_locus (), {}));
TyTy::BaseType *isize = nullptr;
bool ok = context->lookup_builtin ("isize", &isize);
@@ -101,7 +101,7 @@ TypeCheckEnumItem::visit (HIR::EnumItem &item)
variant = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
item.get_mappings ().get_defid (),
item.get_identifier ().as_string (), ident,
- discim_expr);
+ std::move (discim_expr));
}
void
@@ -111,13 +111,13 @@ TypeCheckEnumItem::visit (HIR::EnumItemDiscriminant &item)
rust_error_at (item.get_locus (), "discriminant too big");
auto &discriminant = item.get_discriminant_expression ();
- auto capacity_type = TypeCheckExpr::Resolve (discriminant.get ());
+ auto capacity_type = TypeCheckExpr::Resolve (discriminant);
if (capacity_type->get_kind () == TyTy::TypeKind::ERROR)
return;
TyTy::ISizeType *expected_ty
- = new TyTy::ISizeType (discriminant->get_mappings ().get_hirid ());
- context->insert_type (discriminant->get_mappings (), expected_ty);
+ = new TyTy::ISizeType (discriminant.get_mappings ().get_hirid ());
+ context->insert_type (discriminant.get_mappings (), expected_ty);
unify_site (item.get_mappings ().get_hirid (),
TyTy::TyWithLocation (expected_ty),
@@ -145,7 +145,7 @@ TypeCheckEnumItem::visit (HIR::EnumItemDiscriminant &item)
variant = new TyTy::VariantDef (item.get_mappings ().get_hirid (),
item.get_mappings ().get_defid (),
item.get_identifier ().as_string (), ident,
- item.get_discriminant_expression ().get ());
+ item.take_discriminant_expression ());
}
void
@@ -159,7 +159,7 @@ TypeCheckEnumItem::visit (HIR::EnumItemTuple &item)
for (auto &field : item.get_tuple_fields ())
{
TyTy::BaseType *field_type
- = TypeCheckType::Resolve (field.get_field_type ().get ());
+ = TypeCheckType::Resolve (field.get_field_type ());
TyTy::StructFieldType *ty_field
= new TyTy::StructFieldType (field.get_mappings ().get_hirid (),
std::to_string (idx), field_type,
@@ -174,11 +174,10 @@ TypeCheckEnumItem::visit (HIR::EnumItemTuple &item)
mappings.get_next_hir_id (
item.get_mappings ().get_crate_num ()),
item.get_mappings ().get_local_defid ());
- HIR::LiteralExpr *discim_expr
- = new HIR::LiteralExpr (mapping, std::to_string (last_discriminant),
- HIR::Literal::LitType::INT,
- PrimitiveCoreType::CORETYPE_I64, item.get_locus (),
- {});
+ auto discim_expr = std::make_unique<HIR::LiteralExpr> (
+ HIR::LiteralExpr (mapping, std::to_string (last_discriminant),
+ HIR::Literal::LitType::INT,
+ PrimitiveCoreType::CORETYPE_I64, item.get_locus (), {}));
TyTy::BaseType *isize = nullptr;
bool ok = context->lookup_builtin ("isize", &isize);
@@ -208,7 +207,7 @@ TypeCheckEnumItem::visit (HIR::EnumItemTuple &item)
item.get_mappings ().get_defid (),
item.get_identifier ().as_string (), ident,
TyTy::VariantDef::VariantType::TUPLE,
- discim_expr, fields);
+ std::move (discim_expr), fields);
}
void
@@ -221,7 +220,7 @@ TypeCheckEnumItem::visit (HIR::EnumItemStruct &item)
for (auto &field : item.get_struct_fields ())
{
TyTy::BaseType *field_type
- = TypeCheckType::Resolve (field.get_field_type ().get ());
+ = TypeCheckType::Resolve (field.get_field_type ());
TyTy::StructFieldType *ty_field
= new TyTy::StructFieldType (field.get_mappings ().get_hirid (),
field.get_field_name ().as_string (),
@@ -235,11 +234,10 @@ TypeCheckEnumItem::visit (HIR::EnumItemStruct &item)
mappings.get_next_hir_id (
item.get_mappings ().get_crate_num ()),
item.get_mappings ().get_local_defid ());
- HIR::LiteralExpr *discrim_expr
- = new HIR::LiteralExpr (mapping, std::to_string (last_discriminant),
- HIR::Literal::LitType::INT,
- PrimitiveCoreType::CORETYPE_I64, item.get_locus (),
- {});
+ auto discrim_expr = std::make_unique<HIR::LiteralExpr> (
+ HIR::LiteralExpr (mapping, std::to_string (last_discriminant),
+ HIR::Literal::LitType::INT,
+ PrimitiveCoreType::CORETYPE_I64, item.get_locus (), {}));
TyTy::BaseType *isize = nullptr;
bool ok = context->lookup_builtin ("isize", &isize);
@@ -269,7 +267,7 @@ TypeCheckEnumItem::visit (HIR::EnumItemStruct &item)
item.get_mappings ().get_defid (),
item.get_identifier ().as_string (), ident,
TyTy::VariantDef::VariantType::STRUCT,
- discrim_expr, fields);
+ std::move (discrim_expr), fields);
}
} // namespace Resolver
diff --git a/gcc/rust/typecheck/rust-hir-type-check-enumitem.h b/gcc/rust/typecheck/rust-hir-type-check-enumitem.h
index bccffe7..6b01a49 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-enumitem.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-enumitem.h
@@ -28,7 +28,7 @@ namespace Resolver {
class TypeCheckEnumItem : public TypeCheckBase
{
public:
- static TyTy::VariantDef *Resolve (HIR::EnumItem *item,
+ static TyTy::VariantDef *Resolve (HIR::EnumItem &item,
int64_t last_discriminant);
protected:
diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.cc b/gcc/rust/typecheck/rust-hir-type-check-expr.cc
index ba22eaf..113f43f 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-expr.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-expr.cc
@@ -27,6 +27,10 @@
#include "rust-hir-type-check-stmt.h"
#include "rust-hir-type-check-item.h"
#include "rust-type-util.h"
+#include "rust-immutable-name-resolution-context.h"
+
+// for flag_name_resolution_2_0
+#include "options.h"
namespace Rust {
namespace Resolver {
@@ -36,17 +40,17 @@ TypeCheckExpr::TypeCheckExpr () : TypeCheckBase (), infered (nullptr) {}
// Perform type checking on expr. Also runs type unification algorithm.
// Returns the unified type of expr
TyTy::BaseType *
-TypeCheckExpr::Resolve (HIR::Expr *expr)
+TypeCheckExpr::Resolve (HIR::Expr &expr)
{
TypeCheckExpr resolver;
- expr->accept_vis (resolver);
+ expr.accept_vis (resolver);
if (resolver.infered == nullptr)
- return new TyTy::ErrorType (expr->get_mappings ().get_hirid ());
+ return new TyTy::ErrorType (expr.get_mappings ().get_hirid ());
- auto ref = expr->get_mappings ().get_hirid ();
+ auto ref = expr.get_mappings ().get_hirid ();
resolver.infered->set_ref (ref);
- resolver.context->insert_type (expr->get_mappings (), resolver.infered);
+ resolver.context->insert_type (expr.get_mappings (), resolver.infered);
return resolver.infered;
}
@@ -54,10 +58,10 @@ TypeCheckExpr::Resolve (HIR::Expr *expr)
void
TypeCheckExpr::visit (HIR::TupleIndexExpr &expr)
{
- auto resolved = TypeCheckExpr::Resolve (expr.get_tuple_expr ().get ());
+ auto resolved = TypeCheckExpr::Resolve (expr.get_tuple_expr ());
if (resolved->get_kind () == TyTy::TypeKind::ERROR)
{
- rust_error_at (expr.get_tuple_expr ()->get_locus (),
+ rust_error_at (expr.get_tuple_expr ().get_locus (),
"failed to resolve TupleIndexExpr receiver");
return;
}
@@ -73,7 +77,7 @@ TypeCheckExpr::visit (HIR::TupleIndexExpr &expr)
|| resolved->get_kind () == TyTy::TypeKind::TUPLE;
if (!is_valid_type)
{
- rust_error_at (expr.get_tuple_expr ()->get_locus (),
+ rust_error_at (expr.get_tuple_expr ().get_locus (),
"Expected Tuple or ADT got: %s",
resolved->as_string ().c_str ());
return;
@@ -131,19 +135,14 @@ TypeCheckExpr::visit (HIR::TupleExpr &expr)
{
if (expr.is_unit ())
{
- auto unit_node_id = resolver->get_unit_type_node_id ();
- if (!context->lookup_builtin (unit_node_id, &infered))
- {
- rust_error_at (expr.get_locus (),
- "failed to lookup builtin unit type");
- }
+ infered = TyTy::TupleType::get_unit_type ();
return;
}
std::vector<TyTy::TyVar> fields;
for (auto &elem : expr.get_tuple_elems ())
{
- auto field_ty = TypeCheckExpr::Resolve (elem.get ());
+ auto field_ty = TypeCheckExpr::Resolve (*elem);
fields.push_back (TyTy::TyVar (field_ty->get_ref ()));
}
infered = new TyTy::TupleType (expr.get_mappings ().get_hirid (),
@@ -163,12 +162,12 @@ TypeCheckExpr::visit (HIR::ReturnExpr &expr)
auto fn_return_tyty = context->peek_return_type ();
location_t expr_locus = expr.has_return_expr ()
- ? expr.get_expr ()->get_locus ()
+ ? expr.get_expr ().get_locus ()
: expr.get_locus ();
- TyTy::BaseType *expr_ty
- = expr.has_return_expr ()
- ? TypeCheckExpr::Resolve (expr.get_expr ().get ())
- : TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+
+ TyTy::BaseType *expr_ty = expr.has_return_expr ()
+ ? TypeCheckExpr::Resolve (expr.get_expr ())
+ : TyTy::TupleType::get_unit_type ();
coercion_site (expr.get_mappings ().get_hirid (),
TyTy::TyWithLocation (fn_return_tyty),
@@ -180,8 +179,7 @@ TypeCheckExpr::visit (HIR::ReturnExpr &expr)
void
TypeCheckExpr::visit (HIR::CallExpr &expr)
{
- TyTy::BaseType *function_tyty
- = TypeCheckExpr::Resolve (expr.get_fnexpr ().get ());
+ TyTy::BaseType *function_tyty = TypeCheckExpr::Resolve (expr.get_fnexpr ());
rust_debug_loc (expr.get_locus (), "resolved_call_expr to: {%s}",
function_tyty->get_name ().c_str ());
@@ -195,7 +193,7 @@ TypeCheckExpr::visit (HIR::CallExpr &expr)
// lookup variant id
HirId variant_id;
bool ok = context->lookup_variant_definition (
- expr.get_fnexpr ()->get_mappings ().get_hirid (), &variant_id);
+ expr.get_fnexpr ().get_mappings ().get_hirid (), &variant_id);
if (!ok)
{
@@ -209,14 +207,13 @@ TypeCheckExpr::visit (HIR::CallExpr &expr)
ok = adt->lookup_variant_by_id (variant_id, &lookup_variant);
rust_assert (ok);
- variant = *lookup_variant;
+ variant = std::move (*lookup_variant->clone ());
}
else
{
rust_assert (adt->number_of_variants () == 1);
- variant = *adt->get_variants ().at (0);
+ variant = std::move (*adt->get_variants ().at (0)->clone ());
}
-
infered
= TyTy::TypeCheckCallExpr::go (function_tyty, expr, variant, context);
return;
@@ -242,30 +239,30 @@ TypeCheckExpr::visit (HIR::CallExpr &expr)
void
TypeCheckExpr::visit (HIR::AssignmentExpr &expr)
{
- infered = TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
- auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ().get ());
- auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ().get ());
+ auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ());
+ auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ());
coercion_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (lhs, expr.get_lhs ()->get_locus ()),
- TyTy::TyWithLocation (rhs, expr.get_rhs ()->get_locus ()),
+ TyTy::TyWithLocation (lhs, expr.get_lhs ().get_locus ()),
+ TyTy::TyWithLocation (rhs, expr.get_rhs ().get_locus ()),
expr.get_locus ());
}
void
TypeCheckExpr::visit (HIR::CompoundAssignmentExpr &expr)
{
- infered = TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
- auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ().get ());
- auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ().get ());
+ auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ());
+ auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ());
// we dont care about the result of the unify from a compound assignment
// since this is a unit-type expr
coercion_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (lhs, expr.get_lhs ()->get_locus ()),
- TyTy::TyWithLocation (rhs, expr.get_rhs ()->get_locus ()),
+ TyTy::TyWithLocation (lhs, expr.get_lhs ().get_locus ()),
+ TyTy::TyWithLocation (rhs, expr.get_rhs ().get_locus ()),
expr.get_locus ());
auto lang_item_type
@@ -298,8 +295,8 @@ TypeCheckExpr::visit (HIR::LiteralExpr &expr)
void
TypeCheckExpr::visit (HIR::ArithmeticOrLogicalExpr &expr)
{
- auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ().get ());
- auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ().get ());
+ auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ());
+ auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ());
auto lang_item_type = LangItem::OperatorToLangItem (expr.get_expr_type ());
bool operator_overloaded
@@ -323,8 +320,8 @@ TypeCheckExpr::visit (HIR::ArithmeticOrLogicalExpr &expr)
{
case ArithmeticOrLogicalOperator::LEFT_SHIFT:
case ArithmeticOrLogicalOperator::RIGHT_SHIFT: {
- TyTy::TyWithLocation from (rhs, expr.get_rhs ()->get_locus ());
- TyTy::TyWithLocation to (lhs, expr.get_lhs ()->get_locus ());
+ TyTy::TyWithLocation from (rhs, expr.get_rhs ().get_locus ());
+ TyTy::TyWithLocation to (lhs, expr.get_lhs ().get_locus ());
infered = cast_site (expr.get_mappings ().get_hirid (), from, to,
expr.get_locus ());
}
@@ -333,8 +330,8 @@ TypeCheckExpr::visit (HIR::ArithmeticOrLogicalExpr &expr)
default: {
infered = unify_site (
expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (lhs, expr.get_lhs ()->get_locus ()),
- TyTy::TyWithLocation (rhs, expr.get_rhs ()->get_locus ()),
+ TyTy::TyWithLocation (lhs, expr.get_lhs ().get_locus ()),
+ TyTy::TyWithLocation (rhs, expr.get_rhs ().get_locus ()),
expr.get_locus ());
}
break;
@@ -344,12 +341,27 @@ TypeCheckExpr::visit (HIR::ArithmeticOrLogicalExpr &expr)
void
TypeCheckExpr::visit (HIR::ComparisonExpr &expr)
{
- auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ().get ());
- auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ().get ());
+ auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ());
+ auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ());
+
+ auto borrowed_rhs
+ = new TyTy::ReferenceType (mappings.get_next_hir_id (),
+ TyTy::TyVar (rhs->get_ref ()), Mutability::Imm);
+ context->insert_implicit_type (borrowed_rhs->get_ref (), borrowed_rhs);
+
+ auto seg_name = LangItem::ComparisonToSegment (expr.get_expr_type ());
+ auto segment = HIR::PathIdentSegment (seg_name);
+ auto lang_item_type = LangItem::ComparisonToLangItem (expr.get_expr_type ());
+
+ bool operator_overloaded
+ = resolve_operator_overload (lang_item_type, expr, lhs, borrowed_rhs,
+ segment);
+ if (operator_overloaded)
+ return;
unify_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (lhs, expr.get_lhs ()->get_locus ()),
- TyTy::TyWithLocation (rhs, expr.get_rhs ()->get_locus ()),
+ TyTy::TyWithLocation (lhs, expr.get_lhs ().get_locus ()),
+ TyTy::TyWithLocation (rhs, expr.get_rhs ().get_locus ()),
expr.get_locus ());
bool ok = context->lookup_builtin ("bool", &infered);
@@ -359,8 +371,8 @@ TypeCheckExpr::visit (HIR::ComparisonExpr &expr)
void
TypeCheckExpr::visit (HIR::LazyBooleanExpr &expr)
{
- auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ().get ());
- auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ().get ());
+ auto lhs = TypeCheckExpr::Resolve (expr.get_lhs ());
+ auto rhs = TypeCheckExpr::Resolve (expr.get_rhs ());
// we expect the lhs and rhs must be bools at this point
TyTy::BaseType *boolean_node = nullptr;
@@ -370,27 +382,27 @@ TypeCheckExpr::visit (HIR::LazyBooleanExpr &expr)
// verify the lhs and rhs before unifying together
lhs = unify_site (expr.get_mappings ().get_hirid (),
TyTy::TyWithLocation (boolean_node,
- expr.get_lhs ()->get_locus ()),
- TyTy::TyWithLocation (lhs, expr.get_lhs ()->get_locus ()),
+ expr.get_lhs ().get_locus ()),
+ TyTy::TyWithLocation (lhs, expr.get_lhs ().get_locus ()),
expr.get_locus ());
rhs = unify_site (expr.get_mappings ().get_hirid (),
TyTy::TyWithLocation (boolean_node,
- expr.get_rhs ()->get_locus ()),
- TyTy::TyWithLocation (rhs, expr.get_rhs ()->get_locus ()),
+ expr.get_rhs ().get_locus ()),
+ TyTy::TyWithLocation (rhs, expr.get_rhs ().get_locus ()),
expr.get_locus ());
infered
= unify_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (lhs, expr.get_lhs ()->get_locus ()),
- TyTy::TyWithLocation (rhs, expr.get_rhs ()->get_locus ()),
+ TyTy::TyWithLocation (lhs, expr.get_lhs ().get_locus ()),
+ TyTy::TyWithLocation (rhs, expr.get_rhs ().get_locus ()),
expr.get_locus ());
}
void
TypeCheckExpr::visit (HIR::NegationExpr &expr)
{
- auto negated_expr_ty = TypeCheckExpr::Resolve (expr.get_expr ().get ());
+ auto negated_expr_ty = TypeCheckExpr::Resolve (expr.get_expr ());
// check for operator overload
auto lang_item_type
@@ -455,17 +467,16 @@ TypeCheckExpr::visit (HIR::IfExpr &expr)
bool ok = context->lookup_builtin ("bool", &bool_ty);
rust_assert (ok);
- TyTy::BaseType *cond_type
- = TypeCheckExpr::Resolve (expr.get_if_condition ().get ());
+ TyTy::BaseType *cond_type = TypeCheckExpr::Resolve (expr.get_if_condition ());
unify_site (expr.get_mappings ().get_hirid (), TyTy::TyWithLocation (bool_ty),
TyTy::TyWithLocation (cond_type,
- expr.get_if_condition ()->get_locus ()),
+ expr.get_if_condition ().get_locus ()),
expr.get_locus ());
- TypeCheckExpr::Resolve (expr.get_if_block ().get ());
+ TypeCheckExpr::Resolve (expr.get_if_block ());
- infered = TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
}
void
@@ -475,78 +486,15 @@ TypeCheckExpr::visit (HIR::IfExprConseqElse &expr)
bool ok = context->lookup_builtin ("bool", &bool_ty);
rust_assert (ok);
- TyTy::BaseType *cond_type
- = TypeCheckExpr::Resolve (expr.get_if_condition ().get ());
+ TyTy::BaseType *cond_type = TypeCheckExpr::Resolve (expr.get_if_condition ());
unify_site (expr.get_mappings ().get_hirid (), TyTy::TyWithLocation (bool_ty),
TyTy::TyWithLocation (cond_type,
- expr.get_if_condition ()->get_locus ()),
+ expr.get_if_condition ().get_locus ()),
expr.get_locus ());
- auto if_blk_resolved = TypeCheckExpr::Resolve (expr.get_if_block ().get ());
- auto else_blk_resolved
- = TypeCheckExpr::Resolve (expr.get_else_block ().get ());
-
- if (if_blk_resolved->get_kind () == TyTy::NEVER)
- infered = else_blk_resolved;
- else if (else_blk_resolved->get_kind () == TyTy::NEVER)
- infered = if_blk_resolved;
- else
- {
- infered = unify_site (
- expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (if_blk_resolved,
- expr.get_if_block ()->get_locus ()),
- TyTy::TyWithLocation (else_blk_resolved,
- expr.get_else_block ()->get_locus ()),
- expr.get_locus ());
- }
-}
-
-void
-TypeCheckExpr::visit (HIR::IfLetExpr &expr)
-{
- // this needs to perform a least upper bound coercion on the blocks and then
- // unify the scruintee and arms
- TyTy::BaseType *scrutinee_tyty
- = TypeCheckExpr::Resolve (expr.get_scrutinee_expr ().get ());
-
- for (auto &pattern : expr.get_patterns ())
- {
- TyTy::BaseType *kase_arm_ty
- = TypeCheckPattern::Resolve (pattern.get (), scrutinee_tyty);
-
- unify_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (scrutinee_tyty),
- TyTy::TyWithLocation (kase_arm_ty, pattern->get_locus ()),
- expr.get_locus ());
- }
-
- TypeCheckExpr::Resolve (expr.get_if_block ().get ());
-
- infered = TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
-}
-
-void
-TypeCheckExpr::visit (HIR::IfLetExprConseqElse &expr)
-{
- TyTy::BaseType *scrutinee_tyty
- = TypeCheckExpr::Resolve (expr.get_scrutinee_expr ().get ());
-
- for (auto &pattern : expr.get_patterns ())
- {
- TyTy::BaseType *kase_arm_ty
- = TypeCheckPattern::Resolve (pattern.get (), scrutinee_tyty);
-
- unify_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (scrutinee_tyty),
- TyTy::TyWithLocation (kase_arm_ty, pattern->get_locus ()),
- expr.get_locus ());
- }
-
- auto if_blk_resolved = TypeCheckExpr::Resolve (expr.get_if_block ().get ());
- auto else_blk_resolved
- = TypeCheckExpr::Resolve (expr.get_else_block ().get ());
+ auto if_blk_resolved = TypeCheckExpr::Resolve (expr.get_if_block ());
+ auto else_blk_resolved = TypeCheckExpr::Resolve (expr.get_else_block ());
if (if_blk_resolved->get_kind () == TyTy::NEVER)
infered = else_blk_resolved;
@@ -554,20 +502,20 @@ TypeCheckExpr::visit (HIR::IfLetExprConseqElse &expr)
infered = if_blk_resolved;
else
{
- infered = unify_site (
- expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (if_blk_resolved,
- expr.get_if_block ()->get_locus ()),
- TyTy::TyWithLocation (else_blk_resolved,
- expr.get_else_block ()->get_locus ()),
- expr.get_locus ());
+ infered
+ = unify_site (expr.get_mappings ().get_hirid (),
+ TyTy::TyWithLocation (if_blk_resolved,
+ expr.get_if_block ().get_locus ()),
+ TyTy::TyWithLocation (
+ else_blk_resolved, expr.get_else_block ().get_locus ()),
+ expr.get_locus ());
}
}
void
TypeCheckExpr::visit (HIR::UnsafeBlockExpr &expr)
{
- infered = TypeCheckExpr::Resolve (expr.get_block_expr ().get ());
+ infered = TypeCheckExpr::Resolve (expr.get_block_expr ());
}
void
@@ -582,7 +530,7 @@ TypeCheckExpr::visit (HIR::BlockExpr &expr)
if (!s->is_item ())
continue;
- TypeCheckStmt::Resolve (s.get ());
+ TypeCheckStmt::Resolve (*s);
}
for (auto &s : expr.get_statements ())
@@ -590,7 +538,7 @@ TypeCheckExpr::visit (HIR::BlockExpr &expr)
if (s->is_item ())
continue;
- auto resolved = TypeCheckStmt::Resolve (s.get ());
+ auto resolved = TypeCheckStmt::Resolve (*s);
if (resolved == nullptr)
{
rust_error_at (s->get_locus (), "failure to resolve type");
@@ -599,8 +547,7 @@ TypeCheckExpr::visit (HIR::BlockExpr &expr)
if (s->is_unit_check_needed () && !resolved->is_unit ())
{
- auto unit
- = TyTy::TupleType::get_unit_type (s->get_mappings ().get_hirid ());
+ auto unit = TyTy::TupleType::get_unit_type ();
resolved
= unify_site (s->get_mappings ().get_hirid (),
TyTy::TyWithLocation (unit),
@@ -609,10 +556,9 @@ TypeCheckExpr::visit (HIR::BlockExpr &expr)
}
if (expr.has_expr ())
- infered = TypeCheckExpr::Resolve (expr.get_final_expr ().get ())->clone ();
+ infered = TypeCheckExpr::Resolve (expr.get_final_expr ())->clone ();
else if (expr.is_tail_reachable ())
- infered
- = TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
else if (expr.has_label ())
{
TyTy::BaseType *loop_context_type = context->pop_loop_context ();
@@ -624,8 +570,7 @@ TypeCheckExpr::visit (HIR::BlockExpr &expr)
!= TyTy::InferType::GENERAL));
infered = loop_context_type_infered ? loop_context_type
- : TyTy::TupleType::get_unit_type (
- expr.get_mappings ().get_hirid ());
+ : TyTy::TupleType::get_unit_type ();
}
else
{
@@ -665,14 +610,13 @@ TypeCheckExpr::visit (HIR::RangeFromToExpr &expr)
// resolve the range expressions and these types must unify then we use that
// type to substitute into the ADT
- TyTy::BaseType *from_ty
- = TypeCheckExpr::Resolve (expr.get_from_expr ().get ());
- TyTy::BaseType *to_ty = TypeCheckExpr::Resolve (expr.get_to_expr ().get ());
+ TyTy::BaseType *from_ty = TypeCheckExpr::Resolve (expr.get_from_expr ());
+ TyTy::BaseType *to_ty = TypeCheckExpr::Resolve (expr.get_to_expr ());
TyTy::BaseType *unified = unify_site (
expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (from_ty, expr.get_from_expr ()->get_locus ()),
- TyTy::TyWithLocation (to_ty, expr.get_to_expr ()->get_locus ()),
+ TyTy::TyWithLocation (from_ty, expr.get_from_expr ().get_locus ()),
+ TyTy::TyWithLocation (to_ty, expr.get_to_expr ().get_locus ()),
expr.get_locus ());
// substitute it in
@@ -717,8 +661,7 @@ TypeCheckExpr::visit (HIR::RangeFromExpr &expr)
// resolve the range expressions and these types must unify then we use that
// type to substitute into the ADT
- TyTy::BaseType *from_ty
- = TypeCheckExpr::Resolve (expr.get_from_expr ().get ());
+ TyTy::BaseType *from_ty = TypeCheckExpr::Resolve (expr.get_from_expr ());
// substitute it in
std::vector<TyTy::SubstitutionArg> subst_mappings;
@@ -762,7 +705,7 @@ TypeCheckExpr::visit (HIR::RangeToExpr &expr)
// resolve the range expressions and these types must unify then we use that
// type to substitute into the ADT
- TyTy::BaseType *from_ty = TypeCheckExpr::Resolve (expr.get_to_expr ().get ());
+ TyTy::BaseType *from_ty = TypeCheckExpr::Resolve (expr.get_to_expr ());
// substitute it in
std::vector<TyTy::SubstitutionArg> subst_mappings;
@@ -786,38 +729,38 @@ typecheck_inline_asm_operand (HIR::InlineAsm &expr)
{
case RegisterType::In: {
auto in = operand.get_in ();
- TypeCheckExpr::Resolve (in.expr.get ());
+ TypeCheckExpr::Resolve (*in.expr);
break;
}
case RegisterType::Out: {
auto out = operand.get_out ();
- TypeCheckExpr::Resolve (out.expr.get ());
+ TypeCheckExpr::Resolve (*out.expr);
break;
}
case RegisterType::InOut: {
auto in_out = operand.get_in_out ();
- TypeCheckExpr::Resolve (in_out.expr.get ());
+ TypeCheckExpr::Resolve (*in_out.expr);
break;
}
case RegisterType::SplitInOut: {
auto split_in_out = operand.get_split_in_out ();
- TypeCheckExpr::Resolve (split_in_out.in_expr.get ());
- TypeCheckExpr::Resolve (split_in_out.out_expr.get ());
+ TypeCheckExpr::Resolve (*split_in_out.in_expr);
+ TypeCheckExpr::Resolve (*split_in_out.out_expr);
break;
}
case RegisterType::Const: {
auto anon_const = operand.get_const ().anon_const;
- TypeCheckExpr::Resolve (anon_const.expr.get ());
+ TypeCheckExpr::Resolve (*anon_const.expr);
break;
}
case RegisterType::Sym: {
auto sym = operand.get_sym ();
- TypeCheckExpr::Resolve (sym.expr.get ());
+ TypeCheckExpr::Resolve (*sym.expr);
break;
}
case RegisterType::Label: {
auto label = operand.get_label ();
- TypeCheckExpr::Resolve (label.expr.get ());
+ TypeCheckExpr::Resolve (*label.expr);
break;
}
}
@@ -834,8 +777,7 @@ TypeCheckExpr::visit (HIR::InlineAsm &expr)
if (expr.options.count (AST::InlineAsmOption::NORETURN) == 1)
infered = new TyTy::NeverType (expr.get_mappings ().get_hirid ());
else
- infered
- = TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
}
void
@@ -897,13 +839,12 @@ TypeCheckExpr::visit (HIR::RangeFromToInclExpr &expr)
// resolve the range expressions and these types must unify then we use that
// type to substitute into the ADT
- TyTy::BaseType *from_ty
- = TypeCheckExpr::Resolve (expr.get_from_expr ().get ());
- TyTy::BaseType *to_ty = TypeCheckExpr::Resolve (expr.get_to_expr ().get ());
+ TyTy::BaseType *from_ty = TypeCheckExpr::Resolve (expr.get_from_expr ());
+ TyTy::BaseType *to_ty = TypeCheckExpr::Resolve (expr.get_to_expr ());
TyTy::BaseType *unified = unify_site (
expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (from_ty, expr.get_from_expr ()->get_locus ()),
- TyTy::TyWithLocation (to_ty, expr.get_to_expr ()->get_locus ()),
+ TyTy::TyWithLocation (from_ty, expr.get_from_expr ().get_locus ()),
+ TyTy::TyWithLocation (to_ty, expr.get_to_expr ().get_locus ()),
expr.get_locus ());
// substitute it in
@@ -920,11 +861,11 @@ TypeCheckExpr::visit (HIR::RangeFromToInclExpr &expr)
void
TypeCheckExpr::visit (HIR::ArrayIndexExpr &expr)
{
- auto array_expr_ty = TypeCheckExpr::Resolve (expr.get_array_expr ().get ());
+ auto array_expr_ty = TypeCheckExpr::Resolve (expr.get_array_expr ());
if (array_expr_ty->get_kind () == TyTy::TypeKind::ERROR)
return;
- auto index_expr_ty = TypeCheckExpr::Resolve (expr.get_index_expr ().get ());
+ auto index_expr_ty = TypeCheckExpr::Resolve (expr.get_index_expr ());
if (index_expr_ty->get_kind () == TyTy::TypeKind::ERROR)
return;
@@ -947,10 +888,10 @@ TypeCheckExpr::visit (HIR::ArrayIndexExpr &expr)
if (maybe_simple_array_access
&& direct_array_expr_ty->get_kind () == TyTy::TypeKind::ARRAY)
{
- unify_site (expr.get_index_expr ()->get_mappings ().get_hirid (),
+ unify_site (expr.get_index_expr ().get_mappings ().get_hirid (),
TyTy::TyWithLocation (size_ty),
TyTy::TyWithLocation (index_expr_ty,
- expr.get_index_expr ()->get_locus ()),
+ expr.get_index_expr ().get_locus ()),
expr.get_locus ());
TyTy::ArrayType *array_type
@@ -977,8 +918,8 @@ TypeCheckExpr::visit (HIR::ArrayIndexExpr &expr)
// error[E0277]: the type `[{integer}]` cannot be indexed by `u32`
rich_location r (line_table, expr.get_locus ());
- r.add_range (expr.get_array_expr ()->get_locus ());
- r.add_range (expr.get_index_expr ()->get_locus ());
+ r.add_range (expr.get_array_expr ().get_locus ());
+ r.add_range (expr.get_index_expr ().get_locus ());
rust_error_at (r, ErrorCode::E0277,
"the type %qs cannot be indexed by %qs",
array_expr_ty->get_name ().c_str (),
@@ -988,7 +929,7 @@ TypeCheckExpr::visit (HIR::ArrayIndexExpr &expr)
void
TypeCheckExpr::visit (HIR::ArrayExpr &expr)
{
- HIR::ArrayElems &elements = *expr.get_internal_elements ();
+ auto &elements = expr.get_internal_elements ();
HIR::Expr *capacity_expr = nullptr;
TyTy::BaseType *element_type = nullptr;
@@ -997,25 +938,24 @@ TypeCheckExpr::visit (HIR::ArrayExpr &expr)
case HIR::ArrayElems::ArrayExprType::COPIED: {
HIR::ArrayElemsCopied &elems
= static_cast<HIR::ArrayElemsCopied &> (elements);
- element_type
- = TypeCheckExpr::Resolve (elems.get_elem_to_copy ().get ());
+ element_type = TypeCheckExpr::Resolve (elems.get_elem_to_copy ());
auto capacity_type
- = TypeCheckExpr::Resolve (elems.get_num_copies_expr ().get ());
+ = TypeCheckExpr::Resolve (elems.get_num_copies_expr ());
TyTy::BaseType *expected_ty = nullptr;
bool ok = context->lookup_builtin ("usize", &expected_ty);
rust_assert (ok);
- context->insert_type (elems.get_num_copies_expr ()->get_mappings (),
+ context->insert_type (elems.get_num_copies_expr ().get_mappings (),
expected_ty);
- unify_site (
- expr.get_mappings ().get_hirid (), TyTy::TyWithLocation (expected_ty),
- TyTy::TyWithLocation (capacity_type,
- elems.get_num_copies_expr ()->get_locus ()),
- expr.get_locus ());
+ unify_site (expr.get_mappings ().get_hirid (),
+ TyTy::TyWithLocation (expected_ty),
+ TyTy::TyWithLocation (
+ capacity_type, elems.get_num_copies_expr ().get_locus ()),
+ expr.get_locus ());
- capacity_expr = elems.get_num_copies_expr ().get ();
+ capacity_expr = &elems.get_num_copies_expr ();
}
break;
@@ -1026,7 +966,7 @@ TypeCheckExpr::visit (HIR::ArrayExpr &expr)
std::vector<TyTy::BaseType *> types;
for (auto &elem : elems.get_values ())
{
- types.push_back (TypeCheckExpr::Resolve (elem.get ()));
+ types.push_back (TypeCheckExpr::Resolve (*elem));
}
// this is a LUB
@@ -1070,7 +1010,7 @@ void
TypeCheckExpr::visit (HIR::StructExprStruct &struct_expr)
{
TyTy::BaseType *struct_path_ty
- = TypeCheckExpr::Resolve (&struct_expr.get_struct_name ());
+ = TypeCheckExpr::Resolve (struct_expr.get_struct_name ());
if (struct_path_ty->get_kind () != TyTy::TypeKind::ADT)
{
rust_error_at (struct_expr.get_struct_name ().get_locus (),
@@ -1102,19 +1042,19 @@ TypeCheckExpr::visit (HIR::StructExprStruct &struct_expr)
void
TypeCheckExpr::visit (HIR::StructExprStructFields &struct_expr)
{
- infered = TypeCheckStructExpr::Resolve (&struct_expr);
+ infered = TypeCheckStructExpr::Resolve (struct_expr);
}
void
TypeCheckExpr::visit (HIR::GroupedExpr &expr)
{
- infered = TypeCheckExpr::Resolve (expr.get_expr_in_parens ().get ());
+ infered = TypeCheckExpr::Resolve (expr.get_expr_in_parens ());
}
void
TypeCheckExpr::visit (HIR::FieldAccessExpr &expr)
{
- auto struct_base = TypeCheckExpr::Resolve (expr.get_receiver_expr ().get ());
+ auto struct_base = TypeCheckExpr::Resolve (expr.get_receiver_expr ());
// FIXME does this require autoderef here?
if (struct_base->get_kind () == TyTy::TypeKind::REF)
@@ -1156,10 +1096,10 @@ TypeCheckExpr::visit (HIR::FieldAccessExpr &expr)
void
TypeCheckExpr::visit (HIR::MethodCallExpr &expr)
{
- auto receiver_tyty = TypeCheckExpr::Resolve (expr.get_receiver ().get ());
+ auto receiver_tyty = TypeCheckExpr::Resolve (expr.get_receiver ());
if (receiver_tyty->get_kind () == TyTy::TypeKind::ERROR)
{
- rust_error_at (expr.get_receiver ()->get_locus (),
+ rust_error_at (expr.get_receiver ().get_locus (),
"failed to resolve receiver in MethodCallExpr");
return;
}
@@ -1218,7 +1158,7 @@ TypeCheckExpr::visit (HIR::MethodCallExpr &expr)
// stored onto the receiver to so as we don't trigger duplicate deref mappings
// ICE when an argument is a method call
HirId autoderef_mappings_id
- = expr.get_receiver ()->get_mappings ().get_hirid ();
+ = expr.get_receiver ().get_mappings ().get_hirid ();
context->insert_autoderef_mappings (autoderef_mappings_id,
std::move (candidate.adjustments));
@@ -1266,7 +1206,7 @@ TypeCheckExpr::visit (HIR::MethodCallExpr &expr)
if (impl_self_infer->get_kind () == TyTy::TypeKind::ERROR)
{
rich_location r (line_table, expr.get_locus ());
- r.add_range (impl.get_type ()->get_locus ());
+ r.add_range (impl.get_type ().get_locus ());
rust_error_at (
r, "failed to resolve impl type for method call resolution");
return;
@@ -1317,8 +1257,17 @@ TypeCheckExpr::visit (HIR::MethodCallExpr &expr)
// store the expected fntype
context->insert_type (expr.get_method_name ().get_mappings (), lookup);
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
+ Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
+
+ nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
+ Resolver2_0::Definition (resolved_node_id));
+ }
// set up the resolved name on the path
- if (resolver->get_name_scope ().decl_was_declared_here (resolved_node_id))
+ else if (resolver->get_name_scope ().decl_was_declared_here (
+ resolved_node_id))
{
resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
resolved_node_id);
@@ -1338,11 +1287,10 @@ TypeCheckExpr::visit (HIR::LoopExpr &expr)
{
context->push_new_loop_context (expr.get_mappings ().get_hirid (),
expr.get_locus ());
- TyTy::BaseType *block_expr
- = TypeCheckExpr::Resolve (expr.get_loop_block ().get ());
+ TyTy::BaseType *block_expr = TypeCheckExpr::Resolve (expr.get_loop_block ());
if (!block_expr->is_unit ())
{
- rust_error_at (expr.get_loop_block ()->get_locus (),
+ rust_error_at (expr.get_loop_block ().get_locus (),
"expected %<()%> got %s",
block_expr->as_string ().c_str ());
return;
@@ -1356,10 +1304,8 @@ TypeCheckExpr::visit (HIR::LoopExpr &expr)
&& (((TyTy::InferType *) loop_context_type)->get_infer_kind ()
!= TyTy::InferType::GENERAL));
- infered
- = loop_context_type_infered
- ? loop_context_type
- : TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+ infered = loop_context_type_infered ? loop_context_type
+ : TyTy::TupleType::get_unit_type ();
}
void
@@ -1367,20 +1313,19 @@ TypeCheckExpr::visit (HIR::WhileLoopExpr &expr)
{
context->push_new_while_loop_context (expr.get_mappings ().get_hirid ());
- TypeCheckExpr::Resolve (expr.get_predicate_expr ().get ());
- TyTy::BaseType *block_expr
- = TypeCheckExpr::Resolve (expr.get_loop_block ().get ());
+ TypeCheckExpr::Resolve (expr.get_predicate_expr ());
+ TyTy::BaseType *block_expr = TypeCheckExpr::Resolve (expr.get_loop_block ());
if (!block_expr->is_unit ())
{
- rust_error_at (expr.get_loop_block ()->get_locus (),
+ rust_error_at (expr.get_loop_block ().get_locus (),
"expected %<()%> got %s",
block_expr->as_string ().c_str ());
return;
}
context->pop_loop_context ();
- infered = TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
}
void
@@ -1396,7 +1341,7 @@ TypeCheckExpr::visit (HIR::BreakExpr &expr)
if (expr.has_break_expr ())
{
TyTy::BaseType *break_expr_tyty
- = TypeCheckExpr::Resolve (expr.get_expr ().get ());
+ = TypeCheckExpr::Resolve (expr.get_expr ());
TyTy::BaseType *loop_context = context->peek_loop_context ();
if (loop_context->get_kind () == TyTy::TypeKind::ERROR)
@@ -1411,7 +1356,7 @@ TypeCheckExpr::visit (HIR::BreakExpr &expr)
= unify_site (expr.get_mappings ().get_hirid (),
TyTy::TyWithLocation (loop_context),
TyTy::TyWithLocation (break_expr_tyty,
- expr.get_expr ()->get_locus ()),
+ expr.get_expr ().get_locus ()),
expr.get_locus ());
context->swap_head_loop_context (unified_ty);
}
@@ -1435,8 +1380,9 @@ TypeCheckExpr::visit (HIR::ContinueExpr &expr)
void
TypeCheckExpr::visit (HIR::BorrowExpr &expr)
{
- TyTy::BaseType *resolved_base
- = TypeCheckExpr::Resolve (expr.get_expr ().get ());
+ TyTy::BaseType *resolved_base = TypeCheckExpr::Resolve (expr.get_expr ());
+ if (resolved_base->is<TyTy::ErrorType> ())
+ return;
// In Rust this is valid because of DST's
//
@@ -1466,8 +1412,7 @@ TypeCheckExpr::visit (HIR::BorrowExpr &expr)
void
TypeCheckExpr::visit (HIR::DereferenceExpr &expr)
{
- TyTy::BaseType *resolved_base
- = TypeCheckExpr::Resolve (expr.get_expr ().get ());
+ TyTy::BaseType *resolved_base = TypeCheckExpr::Resolve (expr.get_expr ());
rust_debug_loc (expr.get_locus (), "attempting deref operator overload");
auto lang_item_type = LangItem::Kind::DEREF;
@@ -1508,14 +1453,14 @@ void
TypeCheckExpr::visit (HIR::TypeCastExpr &expr)
{
TyTy::BaseType *expr_to_convert
- = TypeCheckExpr::Resolve (expr.get_casted_expr ().get ());
+ = TypeCheckExpr::Resolve (expr.get_casted_expr ());
TyTy::BaseType *tyty_to_convert_to
- = TypeCheckType::Resolve (expr.get_type_to_convert_to ().get ());
+ = TypeCheckType::Resolve (expr.get_type_to_convert_to ());
TyTy::TyWithLocation from (expr_to_convert,
- expr.get_casted_expr ()->get_locus ());
+ expr.get_casted_expr ().get_locus ());
TyTy::TyWithLocation to (tyty_to_convert_to,
- expr.get_type_to_convert_to ()->get_locus ());
+ expr.get_type_to_convert_to ().get_locus ());
infered = cast_site (expr.get_mappings ().get_hirid (), from, to,
expr.get_locus ());
}
@@ -1526,7 +1471,19 @@ TypeCheckExpr::visit (HIR::MatchExpr &expr)
// this needs to perform a least upper bound coercion on the blocks and then
// unify the scruintee and arms
TyTy::BaseType *scrutinee_tyty
- = TypeCheckExpr::Resolve (expr.get_scrutinee_expr ().get ());
+ = TypeCheckExpr::Resolve (expr.get_scrutinee_expr ());
+
+ // https://github.com/Rust-GCC/gccrs/issues/3231#issuecomment-2462660048
+ // https://github.com/rust-lang/rust/blob/3d1dba830a564d1118361345d7ada47a05241f45/compiler/rustc_hir_typeck/src/_match.rs#L32-L36
+ if (!expr.has_match_arms ())
+ {
+ // this is a special case where rustc returns !
+ TyTy::BaseType *lookup = nullptr;
+ bool ok = context->lookup_builtin ("!", &lookup);
+ rust_assert (ok);
+ infered = lookup->clone ();
+ return;
+ }
bool saw_error = false;
std::vector<TyTy::BaseType *> kase_block_tys;
@@ -1537,7 +1494,7 @@ TypeCheckExpr::visit (HIR::MatchExpr &expr)
for (auto &pattern : kase_arm.get_patterns ())
{
TyTy::BaseType *kase_arm_ty
- = TypeCheckPattern::Resolve (pattern.get (), scrutinee_tyty);
+ = TypeCheckPattern::Resolve (*pattern, scrutinee_tyty);
if (kase_arm_ty->get_kind () == TyTy ::TypeKind::ERROR)
{
saw_error = true;
@@ -1547,7 +1504,7 @@ TypeCheckExpr::visit (HIR::MatchExpr &expr)
TyTy::BaseType *checked_kase = unify_site (
expr.get_mappings ().get_hirid (),
TyTy::TyWithLocation (scrutinee_tyty,
- expr.get_scrutinee_expr ()->get_locus ()),
+ expr.get_scrutinee_expr ().get_locus ()),
TyTy::TyWithLocation (kase_arm_ty, pattern->get_locus ()),
expr.get_locus ());
if (checked_kase->get_kind () == TyTy::TypeKind::ERROR)
@@ -1558,8 +1515,7 @@ TypeCheckExpr::visit (HIR::MatchExpr &expr)
}
// check the kase type
- TyTy::BaseType *kase_block_ty
- = TypeCheckExpr::Resolve (kase.get_expr ().get ());
+ TyTy::BaseType *kase_block_ty = TypeCheckExpr::Resolve (kase.get_expr ());
kase_block_tys.push_back (kase_block_ty);
}
if (saw_error)
@@ -1567,8 +1523,7 @@ TypeCheckExpr::visit (HIR::MatchExpr &expr)
if (kase_block_tys.size () == 0)
{
- infered
- = TyTy::TupleType::get_unit_type (expr.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
return;
}
@@ -1577,9 +1532,10 @@ TypeCheckExpr::visit (HIR::MatchExpr &expr)
for (size_t i = 1; i < kase_block_tys.size (); i++)
{
TyTy::BaseType *kase_ty = kase_block_tys.at (i);
- infered = unify_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (infered),
- TyTy::TyWithLocation (kase_ty), expr.get_locus ());
+ infered
+ = coercion_site (expr.get_mappings ().get_hirid (),
+ TyTy::TyWithLocation (infered),
+ TyTy::TyWithLocation (kase_ty), expr.get_locus ());
}
}
@@ -1603,17 +1559,17 @@ TypeCheckExpr::visit (HIR::ClosureExpr &expr)
TyTy::BaseType *param_tyty = nullptr;
if (p.has_type_given ())
{
- param_tyty = TypeCheckType::Resolve (p.get_type ().get ());
+ param_tyty = TypeCheckType::Resolve (p.get_type ());
}
else
{
- param_tyty = ClosureParamInfer::Resolve (p.get_pattern ().get ());
+ param_tyty = ClosureParamInfer::Resolve (p.get_pattern ());
}
TyTy::TyVar param_ty (param_tyty->get_ref ());
parameter_types.push_back (param_ty);
- TypeCheckPattern::Resolve (p.get_pattern ().get (), param_ty.get_tyty ());
+ TypeCheckPattern::Resolve (p.get_pattern (), param_ty.get_tyty ());
}
// we generate an implicit hirid for the closure args
@@ -1624,18 +1580,17 @@ TypeCheckExpr::visit (HIR::ClosureExpr &expr)
context->insert_implicit_type (closure_args);
location_t result_type_locus = expr.has_return_type ()
- ? expr.get_return_type ()->get_locus ()
+ ? expr.get_return_type ().get_locus ()
: expr.get_locus ();
TyTy::TyVar result_type
= expr.has_return_type ()
? TyTy::TyVar (
- TypeCheckType::Resolve (expr.get_return_type ().get ())->get_ref ())
+ TypeCheckType::Resolve (expr.get_return_type ())->get_ref ())
: TyTy::TyVar::get_implicit_infer_var (expr.get_locus ());
// resolve the block
- location_t closure_expr_locus = expr.get_expr ()->get_locus ();
- TyTy::BaseType *closure_expr_ty
- = TypeCheckExpr::Resolve (expr.get_expr ().get ());
+ location_t closure_expr_locus = expr.get_expr ().get_locus ();
+ TyTy::BaseType *closure_expr_ty = TypeCheckExpr::Resolve (expr.get_expr ());
coercion_site (expr.get_mappings ().get_hirid (),
TyTy::TyWithLocation (result_type.get_tyty (),
result_type_locus),
@@ -1701,10 +1656,10 @@ TypeCheckExpr::visit (HIR::ClosureExpr &expr)
}
bool
-TypeCheckExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
- HIR::OperatorExprMeta expr,
- TyTy::BaseType *lhs,
- TyTy::BaseType *rhs)
+TypeCheckExpr::resolve_operator_overload (
+ LangItem::Kind lang_item_type, HIR::OperatorExprMeta expr,
+ TyTy::BaseType *lhs, TyTy::BaseType *rhs,
+ HIR::PathIdentSegment specified_segment)
{
// look up lang item for arithmetic type
std::string associated_item_name = LangItem::ToString (lang_item_type);
@@ -1722,7 +1677,9 @@ TypeCheckExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
current_context = context->peek_context ();
}
- auto segment = HIR::PathIdentSegment (associated_item_name);
+ auto segment = specified_segment.is_error ()
+ ? HIR::PathIdentSegment (associated_item_name)
+ : specified_segment;
auto candidates = MethodResolver::Probe (lhs, segment);
// remove any recursive candidates
@@ -1822,13 +1779,23 @@ TypeCheckExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
HIR::ImplBlock *parent = impl_item.first;
HIR::Function *fn = impl_item.second;
- if (parent->has_trait_ref ()
- && fn->get_function_name ().as_string ().compare (
- associated_item_name)
- == 0)
+ bool is_deref = lang_item_type == LangItem::Kind::DEREF
+ || lang_item_type == LangItem::Kind::DEREF_MUT;
+ bool is_deref_match = fn->get_function_name ().as_string ().compare (
+ LangItem::ToString (LangItem::Kind::DEREF))
+ == 0
+ || fn->get_function_name ().as_string ().compare (
+ LangItem::ToString (LangItem::Kind::DEREF_MUT))
+ == 0;
+
+ bool is_recursive_op
+ = fn->get_function_name ().as_string ().compare (associated_item_name)
+ == 0
+ || (is_deref && is_deref_match);
+ if (parent->has_trait_ref () && is_recursive_op)
{
TraitReference *trait_reference
- = TraitResolver::Lookup (*parent->get_trait_ref ().get ());
+ = TraitResolver::Lookup (parent->get_trait_ref ());
if (!trait_reference->is_error ())
{
TyTy::BaseType *lookup = nullptr;
@@ -1842,7 +1809,8 @@ TypeCheckExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
bool is_lang_item_impl
= trait_reference->get_mappings ().get_defid ()
- == respective_lang_item_id;
+ == respective_lang_item_id
+ || (is_deref && is_deref_match);
bool self_is_lang_item_self
= fntype->get_self_type ()->is_equal (*adjusted_self);
bool recursive_operator_overload
@@ -1867,11 +1835,11 @@ TypeCheckExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
// type check the arguments if required
TyTy::FnType *type = static_cast<TyTy::FnType *> (lookup);
rust_assert (type->num_params () > 0);
- auto fnparam = type->param_at (0);
+ auto &fnparam = type->param_at (0);
// typecheck the self
unify_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (fnparam.second),
+ TyTy::TyWithLocation (fnparam.get_type ()),
TyTy::TyWithLocation (adjusted_self), expr.get_locus ());
if (rhs == nullptr)
{
@@ -1880,9 +1848,9 @@ TypeCheckExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
else
{
rust_assert (type->num_params () == 2);
- auto fnparam = type->param_at (1);
+ auto &fnparam = type->param_at (1);
unify_site (expr.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (fnparam.second),
+ TyTy::TyWithLocation (fnparam.get_type ()),
TyTy::TyWithLocation (rhs), expr.get_locus ());
}
@@ -1898,8 +1866,19 @@ TypeCheckExpr::resolve_operator_overload (LangItem::Kind lang_item_type,
context->insert_operator_overload (expr.get_mappings ().get_hirid (), type);
// set up the resolved name on the path
- resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
- resolved_node_id);
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
+ Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
+
+ nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
+ Resolver2_0::Definition (resolved_node_id));
+ }
+ else
+ {
+ resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
+ resolved_node_id);
+ }
// return the result of the function back
infered = function_ret_tyty;
@@ -1996,8 +1975,8 @@ TypeCheckExpr::resolve_fn_trait_call (HIR::CallExpr &expr,
// store the adjustments for code-generation to know what to do which must be
// stored onto the receiver to so as we don't trigger duplicate deref mappings
// ICE when an argument is a method call
- HIR::Expr *fnexpr = expr.get_fnexpr ().get ();
- HirId autoderef_mappings_id = fnexpr->get_mappings ().get_hirid ();
+ HIR::Expr &fnexpr = expr.get_fnexpr ();
+ HirId autoderef_mappings_id = fnexpr.get_mappings ().get_hirid ();
context->insert_autoderef_mappings (autoderef_mappings_id,
std::move (candidate.adjustments));
context->insert_receiver (expr.get_mappings ().get_hirid (), receiver_tyty);
@@ -2034,7 +2013,7 @@ TypeCheckExpr::resolve_fn_trait_call (HIR::CallExpr &expr,
std::vector<TyTy::TyVar> call_args;
for (auto &arg : expr.get_arguments ())
{
- TyTy::BaseType *a = TypeCheckExpr::Resolve (arg.get ());
+ TyTy::BaseType *a = TypeCheckExpr::Resolve (*arg);
call_args.push_back (TyTy::TyVar (a->get_ref ()));
}
@@ -2068,8 +2047,19 @@ TypeCheckExpr::resolve_fn_trait_call (HIR::CallExpr &expr,
context->insert_operator_overload (expr.get_mappings ().get_hirid (), fn);
// set up the resolved name on the path
- resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
- resolved_node_id);
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
+ Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
+
+ nr_ctx.map_usage (Resolver2_0::Usage (expr.get_mappings ().get_nodeid ()),
+ Resolver2_0::Definition (resolved_node_id));
+ }
+ else
+ {
+ resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
+ resolved_node_id);
+ }
// return the result of the function back
*result = function_ret_tyty;
diff --git a/gcc/rust/typecheck/rust-hir-type-check-expr.h b/gcc/rust/typecheck/rust-hir-type-check-expr.h
index 7192cf4..2a0022c 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-expr.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-expr.h
@@ -29,7 +29,7 @@ namespace Resolver {
class TypeCheckExpr : private TypeCheckBase, private HIR::HIRExpressionVisitor
{
public:
- static TyTy::BaseType *Resolve (HIR::Expr *expr);
+ static TyTy::BaseType *Resolve (HIR::Expr &expr);
void visit (HIR::TupleIndexExpr &expr) override;
void visit (HIR::TupleExpr &expr) override;
@@ -45,8 +45,6 @@ public:
void visit (HIR::NegationExpr &expr) override;
void visit (HIR::IfExpr &expr) override;
void visit (HIR::IfExprConseqElse &expr) override;
- void visit (HIR::IfLetExpr &expr) override;
- void visit (HIR::IfLetExprConseqElse &) override;
void visit (HIR::BlockExpr &expr) override;
void visit (HIR::UnsafeBlockExpr &expr) override;
void visit (HIR::ArrayIndexExpr &expr) override;
@@ -99,7 +97,9 @@ public:
protected:
bool resolve_operator_overload (LangItem::Kind lang_item_type,
HIR::OperatorExprMeta expr,
- TyTy::BaseType *lhs, TyTy::BaseType *rhs);
+ TyTy::BaseType *lhs, TyTy::BaseType *rhs,
+ HIR::PathIdentSegment specified_segment
+ = HIR::PathIdentSegment::create_error ());
bool resolve_fn_trait_call (HIR::CallExpr &expr,
TyTy::BaseType *function_tyty,
diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.cc b/gcc/rust/typecheck/rust-hir-type-check-implitem.cc
index 0036e9a..937a8a8 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-implitem.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-implitem.cc
@@ -18,6 +18,8 @@
#include "rust-hir-type-check-implitem.h"
#include "rust-diagnostics.h"
+#include "rust-hir-full-decls.h"
+#include "rust-hir-pattern.h"
#include "rust-hir-type-check-base.h"
#include "rust-hir-type-check-type.h"
#include "rust-hir-type-check-expr.h"
@@ -38,27 +40,26 @@ TypeCheckTopLevelExternItem::TypeCheckTopLevelExternItem (
{}
TyTy::BaseType *
-TypeCheckTopLevelExternItem::Resolve (HIR::ExternalItem *item,
+TypeCheckTopLevelExternItem::Resolve (HIR::ExternalItem &item,
const HIR::ExternBlock &parent)
{
// is it already resolved?
auto context = TypeCheckContext::get ();
TyTy::BaseType *resolved = nullptr;
bool already_resolved
- = context->lookup_type (item->get_mappings ().get_hirid (), &resolved);
+ = context->lookup_type (item.get_mappings ().get_hirid (), &resolved);
if (already_resolved)
return resolved;
TypeCheckTopLevelExternItem resolver (parent);
- item->accept_vis (resolver);
+ item.accept_vis (resolver);
return resolver.resolved;
}
void
TypeCheckTopLevelExternItem::visit (HIR::ExternalStaticItem &item)
{
- TyTy::BaseType *actual_type
- = TypeCheckType::Resolve (item.get_item_type ().get ());
+ TyTy::BaseType *actual_type = TypeCheckType::Resolve (item.get_item_type ());
context->insert_type (item.get_mappings (), actual_type);
resolved = actual_type;
@@ -89,7 +90,7 @@ TypeCheckTopLevelExternItem::visit (HIR::ExternalFunctionItem &function)
case HIR::GenericParam::GenericKind::TYPE: {
auto param_type
- = TypeResolveGenericParam::Resolve (generic_param.get ());
+ = TypeResolveGenericParam::Resolve (*generic_param);
context->insert_type (generic_param->get_mappings (),
param_type);
@@ -106,19 +107,17 @@ TypeCheckTopLevelExternItem::visit (HIR::ExternalFunctionItem &function)
{
for (auto &where_clause_item : function.get_where_clause ().get_items ())
{
- ResolveWhereClauseItem::Resolve (*where_clause_item.get (),
+ ResolveWhereClauseItem::Resolve (*where_clause_item,
region_constraints);
}
}
TyTy::BaseType *ret_type = nullptr;
if (!function.has_return_type ())
- ret_type
- = TyTy::TupleType::get_unit_type (function.get_mappings ().get_hirid ());
+ ret_type = TyTy::TupleType::get_unit_type ();
else
{
- auto resolved
- = TypeCheckType::Resolve (function.get_return_type ().get ());
+ auto resolved = TypeCheckType::Resolve (function.get_return_type ());
if (resolved == nullptr)
{
rust_error_at (function.get_locus (),
@@ -128,14 +127,14 @@ TypeCheckTopLevelExternItem::visit (HIR::ExternalFunctionItem &function)
ret_type = resolved->clone ();
ret_type->set_ref (
- function.get_return_type ()->get_mappings ().get_hirid ());
+ function.get_return_type ().get_mappings ().get_hirid ());
}
- std::vector<std::pair<HIR::Pattern *, TyTy::BaseType *> > params;
+ std::vector<TyTy::FnParam> params;
for (auto &param : function.get_function_params ())
{
// get the name as well required for later on
- auto param_tyty = TypeCheckType::Resolve (param.get_type ().get ());
+ auto param_tyty = TypeCheckType::Resolve (param.get_type ());
// these are implicit mappings and not used
auto crate_num = mappings.get_current_crate ();
@@ -143,14 +142,12 @@ TypeCheckTopLevelExternItem::visit (HIR::ExternalFunctionItem &function)
mappings.get_next_hir_id (crate_num),
UNKNOWN_LOCAL_DEFID);
- HIR::IdentifierPattern *param_pattern
- = new HIR::IdentifierPattern (mapping, param.get_param_name (),
- UNDEF_LOCATION, false, Mutability::Imm,
- std::unique_ptr<HIR::Pattern> (nullptr));
+ auto param_pattern = std::make_unique<HIR::IdentifierPattern> (
+ HIR::IdentifierPattern (mapping, param.get_param_name (),
+ UNDEF_LOCATION, false, Mutability::Imm,
+ std::unique_ptr<HIR::Pattern> (nullptr)));
- params.push_back (
- std::pair<HIR::Pattern *, TyTy::BaseType *> (param_pattern,
- param_tyty));
+ params.push_back (TyTy::FnParam (std::move (param_pattern), param_tyty));
context->insert_type (param.get_mappings (), param_tyty);
@@ -317,7 +314,7 @@ TypeCheckTopLevelExternItem::visit (HIR::ExternalTypeItem &type)
}
TypeCheckImplItem::TypeCheckImplItem (
- HIR::ImplBlock *parent, TyTy::BaseType *self,
+ HIR::ImplBlock &parent, TyTy::BaseType *self,
std::vector<TyTy::SubstitutionParamMapping> substitutions)
: TypeCheckBase (), parent (parent), self (self),
substitutions (substitutions)
@@ -325,20 +322,24 @@ TypeCheckImplItem::TypeCheckImplItem (
TyTy::BaseType *
TypeCheckImplItem::Resolve (
- HIR::ImplBlock *parent, HIR::ImplItem *item, TyTy::BaseType *self,
+ HIR::ImplBlock &parent, HIR::ImplItem &item, TyTy::BaseType *self,
std::vector<TyTy::SubstitutionParamMapping> substitutions)
{
// is it already resolved?
auto context = TypeCheckContext::get ();
TyTy::BaseType *resolved = nullptr;
bool already_resolved
- = context->lookup_type (item->get_impl_mappings ().get_hirid (), &resolved);
+ = context->lookup_type (item.get_impl_mappings ().get_hirid (), &resolved);
if (already_resolved)
return resolved;
// resolve
TypeCheckImplItem resolver (parent, self, substitutions);
- item->accept_vis (resolver);
+ resolver.context->block_context ().enter (
+ TypeCheckBlockContextItem (&parent));
+ item.accept_vis (resolver);
+ resolver.context->block_context ().exit ();
+
return resolver.result;
}
@@ -359,12 +360,10 @@ TypeCheckImplItem::visit (HIR::Function &function)
TyTy::BaseType *ret_type = nullptr;
if (!function.has_function_return_type ())
- ret_type
- = TyTy::TupleType::get_unit_type (function.get_mappings ().get_hirid ());
+ ret_type = TyTy::TupleType::get_unit_type ();
else
{
- auto resolved
- = TypeCheckType::Resolve (function.get_return_type ().get ());
+ auto resolved = TypeCheckType::Resolve (function.get_return_type ());
if (resolved == nullptr)
{
rust_error_at (function.get_locus (),
@@ -374,10 +373,10 @@ TypeCheckImplItem::visit (HIR::Function &function)
ret_type = resolved->clone ();
ret_type->set_ref (
- function.get_return_type ()->get_mappings ().get_hirid ());
+ function.get_return_type ().get_mappings ().get_hirid ());
}
- std::vector<std::pair<HIR::Pattern *, TyTy::BaseType *> > params;
+ std::vector<TyTy::FnParam> params;
if (function.is_method ())
{
// these are implicit mappings and not used
@@ -391,16 +390,18 @@ TypeCheckImplItem::visit (HIR::Function &function)
// reuse the HIR identifier pattern which requires it
HIR::SelfParam &self_param = function.get_self_param ();
// FIXME: which location should be used for Rust::Identifier for `self`?
- HIR::IdentifierPattern *self_pattern = new HIR::IdentifierPattern (
- mapping, {"self"}, self_param.get_locus (), self_param.is_ref (),
- self_param.get_mut (), std::unique_ptr<HIR::Pattern> (nullptr));
+ std::unique_ptr<HIR::Pattern> self_pattern
+ = std::make_unique<HIR::IdentifierPattern> (
+ HIR::IdentifierPattern (mapping, {"self"}, self_param.get_locus (),
+ self_param.is_ref (), self_param.get_mut (),
+ std::unique_ptr<HIR::Pattern> (nullptr)));
// might have a specified type
TyTy::BaseType *self_type = nullptr;
if (self_param.has_type ())
{
- std::unique_ptr<HIR::Type> &specified_type = self_param.get_type ();
- self_type = TypeCheckType::Resolve (specified_type.get ());
+ auto &specified_type = self_param.get_type ();
+ self_type = TypeCheckType::Resolve (specified_type);
}
else
{
@@ -450,19 +451,19 @@ TypeCheckImplItem::visit (HIR::Function &function)
}
context->insert_type (self_param.get_mappings (), self_type);
- params.push_back (
- std::pair<HIR::Pattern *, TyTy::BaseType *> (self_pattern, self_type));
+ params.push_back (TyTy::FnParam (std::move (self_pattern), self_type));
}
for (auto &param : function.get_function_params ())
{
// get the name as well required for later on
- auto param_tyty = TypeCheckType::Resolve (param.get_type ().get ());
- params.push_back (std::pair<HIR::Pattern *, TyTy::BaseType *> (
- param.get_param_name ().get (), param_tyty));
+ auto param_tyty = TypeCheckType::Resolve (param.get_type ());
context->insert_type (param.get_mappings (), param_tyty);
- TypeCheckPattern::Resolve (param.get_param_name ().get (), param_tyty);
+ TypeCheckPattern::Resolve (param.get_param_name (), param_tyty);
+
+ params.push_back (
+ TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
}
tl::optional<CanonicalPath> canonical_path;
@@ -504,17 +505,16 @@ TypeCheckImplItem::visit (HIR::Function &function)
context->push_return_type (TypeCheckContextItem (parent, &function),
expected_ret_tyty);
- auto block_expr_ty
- = TypeCheckExpr::Resolve (function.get_definition ().get ());
+ auto block_expr_ty = TypeCheckExpr::Resolve (function.get_definition ());
location_t fn_return_locus = function.has_function_return_type ()
- ? function.get_return_type ()->get_locus ()
+ ? function.get_return_type ().get_locus ()
: function.get_locus ();
- coercion_site (function.get_definition ()->get_mappings ().get_hirid (),
+ coercion_site (function.get_definition ().get_mappings ().get_hirid (),
TyTy::TyWithLocation (expected_ret_tyty, fn_return_locus),
TyTy::TyWithLocation (block_expr_ty),
- function.get_definition ()->get_locus ());
+ function.get_definition ().get_locus ());
context->pop_return_type ();
}
@@ -522,14 +522,13 @@ TypeCheckImplItem::visit (HIR::Function &function)
void
TypeCheckImplItem::visit (HIR::ConstantItem &constant)
{
- TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ().get ());
- TyTy::BaseType *expr_type
- = TypeCheckExpr::Resolve (constant.get_expr ().get ());
+ TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ());
+ TyTy::BaseType *expr_type = TypeCheckExpr::Resolve (constant.get_expr ());
TyTy::BaseType *unified = unify_site (
constant.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (type, constant.get_type ()->get_locus ()),
- TyTy::TyWithLocation (expr_type, constant.get_expr ()->get_locus ()),
+ TyTy::TyWithLocation (type, constant.get_type ().get_locus ()),
+ TyTy::TyWithLocation (expr_type, constant.get_expr ().get_locus ()),
constant.get_locus ());
context->insert_type (constant.get_mappings (), unified);
result = unified;
@@ -544,7 +543,7 @@ TypeCheckImplItem::visit (HIR::TypeAlias &alias)
resolve_generic_params (alias.get_generic_params (), substitutions);
TyTy::BaseType *actual_type
- = TypeCheckType::Resolve (alias.get_type_aliased ().get ());
+ = TypeCheckType::Resolve (alias.get_type_aliased ());
context->insert_type (alias.get_mappings (), actual_type);
result = actual_type;
@@ -557,7 +556,7 @@ TypeCheckImplItem::visit (HIR::TypeAlias &alias)
}
TypeCheckImplItemWithTrait::TypeCheckImplItemWithTrait (
- HIR::ImplBlock *parent, TyTy::BaseType *self,
+ HIR::ImplBlock &parent, TyTy::BaseType *self,
TyTy::TypeBoundPredicate &trait_reference,
std::vector<TyTy::SubstitutionParamMapping> substitutions)
: TypeCheckBase (), trait_reference (trait_reference),
@@ -569,13 +568,13 @@ TypeCheckImplItemWithTrait::TypeCheckImplItemWithTrait (
TyTy::TypeBoundPredicateItem
TypeCheckImplItemWithTrait::Resolve (
- HIR::ImplBlock *parent, HIR::ImplItem *item, TyTy::BaseType *self,
+ HIR::ImplBlock &parent, HIR::ImplItem &item, TyTy::BaseType *self,
TyTy::TypeBoundPredicate &trait_reference,
std::vector<TyTy::SubstitutionParamMapping> substitutions)
{
TypeCheckImplItemWithTrait resolver (parent, self, trait_reference,
substitutions);
- item->accept_vis (resolver);
+ item.accept_vis (resolver);
return resolver.resolved_trait_item;
}
@@ -584,7 +583,7 @@ TypeCheckImplItemWithTrait::visit (HIR::ConstantItem &constant)
{
// normal resolution of the item
TyTy::BaseType *lookup
- = TypeCheckImplItem::Resolve (parent, &constant, self, substitutions);
+ = TypeCheckImplItem::Resolve (parent, constant, self, substitutions);
// map the impl item to the associated trait item
const auto tref = trait_reference.get ();
@@ -637,7 +636,7 @@ TypeCheckImplItemWithTrait::visit (HIR::TypeAlias &type)
{
// normal resolution of the item
TyTy::BaseType *lookup
- = TypeCheckImplItem::Resolve (parent, &type, self, substitutions);
+ = TypeCheckImplItem::Resolve (parent, type, self, substitutions);
// map the impl item to the associated trait item
const auto tref = trait_reference.get ();
@@ -698,7 +697,7 @@ TypeCheckImplItemWithTrait::visit (HIR::Function &function)
{
// normal resolution of the item
TyTy::BaseType *lookup
- = TypeCheckImplItem::Resolve (parent, &function, self, substitutions);
+ = TypeCheckImplItem::Resolve (parent, function, self, substitutions);
// map the impl item to the associated trait item
const auto tref = trait_reference.get ();
diff --git a/gcc/rust/typecheck/rust-hir-type-check-implitem.h b/gcc/rust/typecheck/rust-hir-type-check-implitem.h
index 4fb2256..14f6a05 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-implitem.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-implitem.h
@@ -29,7 +29,7 @@ class TypeCheckTopLevelExternItem : public TypeCheckBase,
public HIR::HIRExternalItemVisitor
{
public:
- static TyTy::BaseType *Resolve (HIR::ExternalItem *item,
+ static TyTy::BaseType *Resolve (HIR::ExternalItem &item,
const HIR::ExternBlock &parent);
void visit (HIR::ExternalStaticItem &item) override;
@@ -47,7 +47,7 @@ class TypeCheckImplItem : public TypeCheckBase, public HIR::HIRImplVisitor
{
public:
static TyTy::BaseType *
- Resolve (HIR::ImplBlock *parent, HIR::ImplItem *item, TyTy::BaseType *self,
+ Resolve (HIR::ImplBlock &parent, HIR::ImplItem &item, TyTy::BaseType *self,
std::vector<TyTy::SubstitutionParamMapping> substitutions);
void visit (HIR::Function &function) override;
@@ -55,10 +55,10 @@ public:
void visit (HIR::TypeAlias &type_alias) override;
protected:
- TypeCheckImplItem (HIR::ImplBlock *parent, TyTy::BaseType *self,
+ TypeCheckImplItem (HIR::ImplBlock &parent, TyTy::BaseType *self,
std::vector<TyTy::SubstitutionParamMapping> substitutions);
- HIR::ImplBlock *parent;
+ HIR::ImplBlock &parent;
TyTy::BaseType *self;
std::vector<TyTy::SubstitutionParamMapping> substitutions;
@@ -70,7 +70,7 @@ class TypeCheckImplItemWithTrait : public TypeCheckBase,
{
public:
static TyTy::TypeBoundPredicateItem
- Resolve (HIR::ImplBlock *parent, HIR::ImplItem *item, TyTy::BaseType *self,
+ Resolve (HIR::ImplBlock &parent, HIR::ImplItem &item, TyTy::BaseType *self,
TyTy::TypeBoundPredicate &trait_reference,
std::vector<TyTy::SubstitutionParamMapping> substitutions);
@@ -86,7 +86,7 @@ protected:
private:
TypeCheckImplItemWithTrait (
- HIR::ImplBlock *parent, TyTy::BaseType *self,
+ HIR::ImplBlock &parent, TyTy::BaseType *self,
TyTy::TypeBoundPredicate &trait_reference,
std::vector<TyTy::SubstitutionParamMapping> substitutions);
@@ -95,7 +95,7 @@ private:
TyTy::TypeBoundPredicate &trait_reference;
TyTy::TypeBoundPredicateItem resolved_trait_item;
- HIR::ImplBlock *parent;
+ HIR::ImplBlock &parent;
TyTy::BaseType *self;
std::vector<TyTy::SubstitutionParamMapping> substitutions;
TyTy::RegionConstraints region_constraints;
diff --git a/gcc/rust/typecheck/rust-hir-type-check-item.cc b/gcc/rust/typecheck/rust-hir-type-check-item.cc
index 4ea6852..85ffb9f 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-item.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-item.cc
@@ -17,6 +17,7 @@
// <http://www.gnu.org/licenses/>.
#include "rust-hir-type-check-item.h"
+#include "optional.h"
#include "rust-canonical-path.h"
#include "rust-diagnostics.h"
#include "rust-hir-type-check-enumitem.h"
@@ -150,7 +151,7 @@ void
TypeCheckItem::visit (HIR::TypeAlias &alias)
{
TyTy::BaseType *actual_type
- = TypeCheckType::Resolve (alias.get_type_aliased ().get ());
+ = TypeCheckType::Resolve (alias.get_type_aliased ());
context->insert_type (alias.get_mappings (), actual_type);
@@ -182,7 +183,7 @@ TypeCheckItem::visit (HIR::TupleStruct &struct_decl)
for (auto &field : struct_decl.get_fields ())
{
TyTy::BaseType *field_type
- = TypeCheckType::Resolve (field.get_field_type ().get ());
+ = TypeCheckType::Resolve (field.get_field_type ());
auto *ty_field
= new TyTy::StructFieldType (field.get_mappings ().get_hirid (),
std::to_string (idx), field_type,
@@ -222,7 +223,7 @@ TypeCheckItem::visit (HIR::TupleStruct &struct_decl)
new TyTy::VariantDef (struct_decl.get_mappings ().get_hirid (),
struct_decl.get_mappings ().get_defid (),
struct_decl.get_identifier ().as_string (), ident,
- TyTy::VariantDef::VariantType::TUPLE, nullptr,
+ TyTy::VariantDef::VariantType::TUPLE, tl::nullopt,
std::move (fields)));
// Process #[repr(X)] attribute, if any
@@ -231,7 +232,8 @@ TypeCheckItem::visit (HIR::TupleStruct &struct_decl)
= parse_repr_options (attrs, struct_decl.get_locus ());
auto *type = new TyTy::ADTType (
- struct_decl.get_mappings ().get_hirid (), mappings.get_next_hir_id (),
+ struct_decl.get_mappings ().get_hirid (),
+ struct_decl.get_mappings ().get_hirid (),
struct_decl.get_identifier ().as_string (), ident,
TyTy::ADTType::ADTKind::TUPLE_STRUCT, std::move (variants),
std::move (substitutions), repr,
@@ -264,7 +266,7 @@ TypeCheckItem::visit (HIR::StructStruct &struct_decl)
for (auto &field : struct_decl.get_fields ())
{
TyTy::BaseType *field_type
- = TypeCheckType::Resolve (field.get_field_type ().get ());
+ = TypeCheckType::Resolve (field.get_field_type ());
auto *ty_field
= new TyTy::StructFieldType (field.get_mappings ().get_hirid (),
field.get_field_name ().as_string (),
@@ -303,7 +305,7 @@ TypeCheckItem::visit (HIR::StructStruct &struct_decl)
new TyTy::VariantDef (struct_decl.get_mappings ().get_hirid (),
struct_decl.get_mappings ().get_defid (),
struct_decl.get_identifier ().as_string (), ident,
- TyTy::VariantDef::VariantType::STRUCT, nullptr,
+ TyTy::VariantDef::VariantType::STRUCT, tl::nullopt,
std::move (fields)));
// Process #[repr(X)] attribute, if any
@@ -312,7 +314,8 @@ TypeCheckItem::visit (HIR::StructStruct &struct_decl)
= parse_repr_options (attrs, struct_decl.get_locus ());
auto *type = new TyTy::ADTType (
- struct_decl.get_mappings ().get_hirid (), mappings.get_next_hir_id (),
+ struct_decl.get_mappings ().get_hirid (),
+ struct_decl.get_mappings ().get_hirid (),
struct_decl.get_identifier ().as_string (), ident,
TyTy::ADTType::ADTKind::STRUCT_STRUCT, std::move (variants),
std::move (substitutions), repr,
@@ -339,7 +342,7 @@ TypeCheckItem::visit (HIR::Enum &enum_decl)
for (auto &variant : enum_decl.get_variants ())
{
TyTy::VariantDef *field_type
- = TypeCheckEnumItem::Resolve (variant.get (), discriminant_value);
+ = TypeCheckEnumItem::Resolve (*variant, discriminant_value);
discriminant_value++;
variants.push_back (field_type);
@@ -369,7 +372,7 @@ TypeCheckItem::visit (HIR::Enum &enum_decl)
// multi variant ADT
auto *type
= new TyTy::ADTType (enum_decl.get_mappings ().get_hirid (),
- mappings.get_next_hir_id (),
+ enum_decl.get_mappings ().get_hirid (),
enum_decl.get_identifier ().as_string (), ident,
TyTy::ADTType::ADTKind::ENUM, std::move (variants),
std::move (substitutions));
@@ -398,7 +401,7 @@ TypeCheckItem::visit (HIR::Union &union_decl)
for (auto &variant : union_decl.get_variants ())
{
TyTy::BaseType *variant_type
- = TypeCheckType::Resolve (variant.get_field_type ().get ());
+ = TypeCheckType::Resolve (variant.get_field_type ());
auto *ty_variant
= new TyTy::StructFieldType (variant.get_mappings ().get_hirid (),
variant.get_field_name ().as_string (),
@@ -435,12 +438,12 @@ TypeCheckItem::visit (HIR::Union &union_decl)
new TyTy::VariantDef (union_decl.get_mappings ().get_hirid (),
union_decl.get_mappings ().get_defid (),
union_decl.get_identifier ().as_string (), ident,
- TyTy::VariantDef::VariantType::STRUCT, nullptr,
+ TyTy::VariantDef::VariantType::STRUCT, tl::nullopt,
std::move (fields)));
auto *type
= new TyTy::ADTType (union_decl.get_mappings ().get_hirid (),
- mappings.get_next_hir_id (),
+ union_decl.get_mappings ().get_hirid (),
union_decl.get_identifier ().as_string (), ident,
TyTy::ADTType::ADTKind::UNION, std::move (variants),
std::move (substitutions));
@@ -454,14 +457,14 @@ TypeCheckItem::visit (HIR::Union &union_decl)
void
TypeCheckItem::visit (HIR::StaticItem &var)
{
- TyTy::BaseType *type = TypeCheckType::Resolve (var.get_type ().get ());
- TyTy::BaseType *expr_type = TypeCheckExpr::Resolve (var.get_expr ().get ());
+ TyTy::BaseType *type = TypeCheckType::Resolve (var.get_type ());
+ TyTy::BaseType *expr_type = TypeCheckExpr::Resolve (var.get_expr ());
TyTy::BaseType *unified
= coercion_site (var.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (type, var.get_type ()->get_locus ()),
+ TyTy::TyWithLocation (type, var.get_type ().get_locus ()),
TyTy::TyWithLocation (expr_type,
- var.get_expr ()->get_locus ()),
+ var.get_expr ().get_locus ()),
var.get_locus ());
context->insert_type (var.get_mappings (), unified);
infered = unified;
@@ -470,14 +473,13 @@ TypeCheckItem::visit (HIR::StaticItem &var)
void
TypeCheckItem::visit (HIR::ConstantItem &constant)
{
- TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ().get ());
- TyTy::BaseType *expr_type
- = TypeCheckExpr::Resolve (constant.get_expr ().get ());
+ TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ());
+ TyTy::BaseType *expr_type = TypeCheckExpr::Resolve (constant.get_expr ());
TyTy::BaseType *unified = unify_site (
constant.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (type, constant.get_type ()->get_locus ()),
- TyTy::TyWithLocation (expr_type, constant.get_expr ()->get_locus ()),
+ TyTy::TyWithLocation (type, constant.get_type ().get_locus ()),
+ TyTy::TyWithLocation (expr_type, constant.get_expr ().get_locus ()),
constant.get_locus ());
context->insert_type (constant.get_mappings (), unified);
infered = unified;
@@ -491,8 +493,8 @@ TypeCheckItem::visit (HIR::ImplBlock &impl_block)
TraitReference *trait_reference = &TraitReference::error_node ();
if (impl_block.has_trait_ref ())
{
- std::unique_ptr<HIR::TypePath> &ref = impl_block.get_trait_ref ();
- trait_reference = TraitResolver::Resolve (*ref);
+ HIR::TypePath &ref = impl_block.get_trait_ref ();
+ trait_reference = TraitResolver::Resolve (ref);
if (trait_reference->is_error ())
return;
}
@@ -513,8 +515,7 @@ TypeCheckItem::visit (HIR::ImplBlock &impl_block)
// resolve each impl_item
for (auto &impl_item : impl_block.get_impl_items ())
{
- TypeCheckImplItem::Resolve (&impl_block, impl_item.get (), self,
- substitutions);
+ TypeCheckImplItem::Resolve (impl_block, *impl_item, self, substitutions);
}
// validate the impl items
@@ -538,7 +539,7 @@ TypeCheckItem::resolve_impl_item (HIR::ImplBlock &impl_block,
TyTy::BaseType *self = resolve_impl_block_self (impl_block);
- return TypeCheckImplItem::Resolve (&impl_block, &item, self, substitutions);
+ return TypeCheckImplItem::Resolve (impl_block, item, self, substitutions);
}
void
@@ -558,12 +559,10 @@ TypeCheckItem::visit (HIR::Function &function)
TyTy::BaseType *ret_type = nullptr;
if (!function.has_function_return_type ())
- ret_type
- = TyTy::TupleType::get_unit_type (function.get_mappings ().get_hirid ());
+ ret_type = TyTy::TupleType::get_unit_type ();
else
{
- auto resolved
- = TypeCheckType::Resolve (function.get_return_type ().get ());
+ auto resolved = TypeCheckType::Resolve (function.get_return_type ());
if (resolved->get_kind () == TyTy::TypeKind::ERROR)
{
rust_error_at (function.get_locus (),
@@ -573,18 +572,18 @@ TypeCheckItem::visit (HIR::Function &function)
ret_type = resolved->clone ();
ret_type->set_ref (
- function.get_return_type ()->get_mappings ().get_hirid ());
+ function.get_return_type ().get_mappings ().get_hirid ());
}
- std::vector<std::pair<HIR::Pattern *, TyTy::BaseType *>> params;
+ std::vector<TyTy::FnParam> params;
for (auto &param : function.get_function_params ())
{
// get the name as well required for later on
- auto param_tyty = TypeCheckType::Resolve (param.get_type ().get ());
- params.emplace_back (param.get_param_name ().get (), param_tyty);
-
+ auto param_tyty = TypeCheckType::Resolve (param.get_type ());
context->insert_type (param.get_mappings (), param_tyty);
- TypeCheckPattern::Resolve (param.get_param_name ().get (), param_tyty);
+ TypeCheckPattern::Resolve (param.get_param_name (), param_tyty);
+ params.push_back (
+ TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
}
auto path = CanonicalPath::create_empty ();
@@ -627,16 +626,15 @@ TypeCheckItem::visit (HIR::Function &function)
expected_ret_tyty);
context->switch_to_fn_body ();
- auto block_expr_ty
- = TypeCheckExpr::Resolve (function.get_definition ().get ());
+ auto block_expr_ty = TypeCheckExpr::Resolve (function.get_definition ());
location_t fn_return_locus = function.has_function_return_type ()
- ? function.get_return_type ()->get_locus ()
+ ? function.get_return_type ().get_locus ()
: function.get_locus ();
- coercion_site (function.get_definition ()->get_mappings ().get_hirid (),
+ coercion_site (function.get_definition ().get_mappings ().get_hirid (),
TyTy::TyWithLocation (expected_ret_tyty, fn_return_locus),
TyTy::TyWithLocation (block_expr_ty),
- function.get_definition ()->get_locus ());
+ function.get_definition ().get_locus ());
context->pop_return_type ();
@@ -690,7 +688,7 @@ TypeCheckItem::visit (HIR::ExternBlock &extern_block)
{
for (auto &item : extern_block.get_extern_items ())
{
- TypeCheckTopLevelExternItem::Resolve (item.get (), extern_block);
+ TypeCheckTopLevelExternItem::Resolve (*item, extern_block);
}
}
@@ -712,17 +710,25 @@ TypeCheckItem::resolve_impl_block_substitutions (HIR::ImplBlock &impl_block,
TraitReference *trait_reference = &TraitReference::error_node ();
if (impl_block.has_trait_ref ())
{
- std::unique_ptr<HIR::TypePath> &ref = impl_block.get_trait_ref ();
- trait_reference = TraitResolver::Resolve (*ref);
+ auto &ref = impl_block.get_trait_ref ();
+ trait_reference = TraitResolver::Resolve (ref);
rust_assert (!trait_reference->is_error ());
// we don't error out here see: gcc/testsuite/rust/compile/traits2.rs
// for example
- specified_bound
- = get_predicate_from_bound (*ref, impl_block.get_type ().get ());
+ specified_bound = get_predicate_from_bound (ref, impl_block.get_type ());
}
- TyTy::BaseType *self = TypeCheckType::Resolve (impl_block.get_type ().get ());
+ TyTy::BaseType *self = TypeCheckType::Resolve (impl_block.get_type ());
+
+ if (self->is<TyTy::ErrorType> ())
+ {
+ // we cannot check for unconstrained type arguments when the Self type is
+ // not resolved it will just add extra errors that dont help as well as
+ // the case where this could just be a recursive type query that should
+ // fail and will work later on anyway
+ return {substitutions, region_constraints};
+ }
// inherit the bounds
if (!specified_bound.is_error ())
@@ -749,14 +755,14 @@ TypeCheckItem::validate_trait_impl_block (
auto specified_bound = TyTy::TypeBoundPredicate::error ();
if (impl_block.has_trait_ref ())
{
- std::unique_ptr<HIR::TypePath> &ref = impl_block.get_trait_ref ();
+ auto &ref = impl_block.get_trait_ref ();
+ trait_reference = TraitResolver::Resolve (ref);
if (trait_reference->is_error ())
return;
// we don't error out here see: gcc/testsuite/rust/compile/traits2.rs
// for example
- specified_bound
- = get_predicate_from_bound (*ref, impl_block.get_type ().get ());
+ specified_bound = get_predicate_from_bound (ref, impl_block.get_type ());
}
bool is_trait_impl_block = !trait_reference->is_error ();
@@ -766,8 +772,7 @@ TypeCheckItem::validate_trait_impl_block (
if (!specified_bound.is_error ())
{
auto trait_item_ref
- = TypeCheckImplItemWithTrait::Resolve (&impl_block,
- impl_item.get (), self,
+ = TypeCheckImplItemWithTrait::Resolve (impl_block, *impl_item, self,
specified_bound,
substitutions);
if (!trait_item_ref.is_error ())
@@ -840,7 +845,7 @@ TypeCheckItem::validate_trait_impl_block (
TyTy::BaseType *
TypeCheckItem::resolve_impl_block_self (HIR::ImplBlock &impl_block)
{
- return TypeCheckType::Resolve (impl_block.get_type ().get ());
+ return TypeCheckType::Resolve (impl_block.get_type ());
}
} // namespace Resolver
diff --git a/gcc/rust/typecheck/rust-hir-type-check-path.cc b/gcc/rust/typecheck/rust-hir-type-check-path.cc
index c655209..4c7dec1 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-path.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-path.cc
@@ -34,8 +34,7 @@ void
TypeCheckExpr::visit (HIR::QualifiedPathInExpression &expr)
{
HIR::QualifiedPathType qual_path_type = expr.get_path_type ();
- TyTy::BaseType *root
- = TypeCheckType::Resolve (qual_path_type.get_type ().get ());
+ TyTy::BaseType *root = TypeCheckType::Resolve (qual_path_type.get_type ());
if (root->get_kind () == TyTy::TypeKind::ERROR)
return;
@@ -48,8 +47,8 @@ TypeCheckExpr::visit (HIR::QualifiedPathInExpression &expr)
}
// Resolve the trait now
- std::unique_ptr<HIR::TypePath> &trait_path_ref = qual_path_type.get_trait ();
- TraitReference *trait_ref = TraitResolver::Resolve (*trait_path_ref.get ());
+ HIR::TypePath &trait_path_ref = qual_path_type.get_trait ();
+ TraitReference *trait_ref = TraitResolver::Resolve (trait_path_ref);
if (trait_ref->is_error ())
return;
@@ -64,8 +63,7 @@ TypeCheckExpr::visit (HIR::QualifiedPathInExpression &expr)
// get the predicate for the bound
auto specified_bound
- = get_predicate_from_bound (*trait_path_ref.get (),
- qual_path_type.get_type ().get ());
+ = get_predicate_from_bound (trait_path_ref, qual_path_type.get_type ());
if (specified_bound.is_error ())
return;
@@ -155,8 +153,20 @@ TypeCheckExpr::visit (HIR::QualifiedPathInExpression &expr)
bool fully_resolved = expr.get_segments ().size () <= 1;
if (fully_resolved)
{
- resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
- root_resolved_node_id);
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
+ Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
+
+ nr_ctx.map_usage (Resolver2_0::Usage (
+ expr.get_mappings ().get_nodeid ()),
+ Resolver2_0::Definition (root_resolved_node_id));
+ }
+ else
+ {
+ resolver->insert_resolved_name (expr.get_mappings ().get_nodeid (),
+ root_resolved_node_id);
+ }
context->insert_receiver (expr.get_mappings ().get_hirid (), root);
return;
}
@@ -245,6 +255,7 @@ TypeCheckExpr::resolve_root_path (HIR::PathInExpression &expr, size_t *offset,
auto seg_is_module = mappings.lookup_module (ref).has_value ();
auto seg_is_crate = mappings.is_local_hirid_crate (ref);
+ auto seg_is_pattern = mappings.lookup_hir_pattern (ref).has_value ();
if (seg_is_module || seg_is_crate)
{
// A::B::C::this_is_a_module::D::E::F
@@ -321,7 +332,7 @@ TypeCheckExpr::resolve_root_path (HIR::PathInExpression &expr, size_t *offset,
if (lookup->get_kind () == TyTy::TypeKind::ERROR)
return new TyTy::ErrorType (expr.get_mappings ().get_hirid ());
}
- else if (lookup->needs_generic_substitutions ())
+ else if (lookup->needs_generic_substitutions () && !seg_is_pattern)
{
lookup = SubstMapper::InferSubst (lookup, expr.get_locus ());
}
@@ -343,12 +354,13 @@ TypeCheckExpr::resolve_segments (NodeId root_resolved_node_id,
{
NodeId resolved_node_id = root_resolved_node_id;
TyTy::BaseType *prev_segment = tyseg;
- bool reciever_is_generic = prev_segment->get_kind () == TyTy::TypeKind::PARAM;
+ bool receiver_is_generic = prev_segment->get_kind () == TyTy::TypeKind::PARAM;
+ bool receiver_is_dyn = prev_segment->get_kind () == TyTy::TypeKind::DYNAMIC;
for (size_t i = offset; i < segments.size (); i++)
{
HIR::PathExprSegment &seg = segments.at (i);
- bool probe_impls = !reciever_is_generic;
+ bool probe_impls = !receiver_is_generic;
// probe the path is done in two parts one where we search impls if no
// candidate is found then we search extensions from traits
@@ -423,7 +435,7 @@ TypeCheckExpr::resolve_segments (NodeId root_resolved_node_id,
}
}
- if (associated_impl_block != nullptr)
+ if (associated_impl_block != nullptr && !receiver_is_dyn)
{
// associated types
HirId impl_block_id
@@ -456,7 +468,7 @@ TypeCheckExpr::resolve_segments (NodeId root_resolved_node_id,
{
// we need to setup with apropriate bounds
HIR::TypePath &bound_path
- = *associated->get_impl_block ()->get_trait_ref ().get ();
+ = associated->get_impl_block ()->get_trait_ref ();
const auto &trait_ref = *TraitResolver::Resolve (bound_path);
rust_assert (!trait_ref.is_error ());
@@ -480,7 +492,7 @@ TypeCheckExpr::resolve_segments (NodeId root_resolved_node_id,
if (tyseg->get_kind () == TyTy::TypeKind::ERROR)
return;
}
- else if (tyseg->needs_generic_substitutions () && !reciever_is_generic)
+ else if (tyseg->needs_generic_substitutions () && !receiver_is_generic)
{
location_t locus = seg.get_locus ();
tyseg = SubstMapper::InferSubst (tyseg, locus);
@@ -490,18 +502,19 @@ TypeCheckExpr::resolve_segments (NodeId root_resolved_node_id,
}
rust_assert (resolved_node_id != UNKNOWN_NODEID);
- if (tyseg->needs_generic_substitutions () && !reciever_is_generic)
- {
- location_t locus = segments.back ().get_locus ();
- tyseg = SubstMapper::InferSubst (tyseg, locus);
- if (tyseg->get_kind () == TyTy::TypeKind::ERROR)
- return;
- }
-
context->insert_receiver (expr_mappings.get_hirid (), prev_segment);
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
+ Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
+
+ nr_ctx.map_usage (Resolver2_0::Usage (expr_mappings.get_nodeid ()),
+ Resolver2_0::Definition (resolved_node_id));
+ }
// name scope first
- if (resolver->get_name_scope ().decl_was_declared_here (resolved_node_id))
+ else if (resolver->get_name_scope ().decl_was_declared_here (
+ resolved_node_id))
{
resolver->insert_resolved_name (expr_mappings.get_nodeid (),
resolved_node_id);
diff --git a/gcc/rust/typecheck/rust-hir-type-check-pattern.cc b/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
index 88e4d32f..a118d15 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-pattern.cc
@@ -33,15 +33,15 @@ TypeCheckPattern::TypeCheckPattern (TyTy::BaseType *parent)
{}
TyTy::BaseType *
-TypeCheckPattern::Resolve (HIR::Pattern *pattern, TyTy::BaseType *parent)
+TypeCheckPattern::Resolve (HIR::Pattern &pattern, TyTy::BaseType *parent)
{
TypeCheckPattern resolver (parent);
- pattern->accept_vis (resolver);
+ pattern.accept_vis (resolver);
if (resolver.infered == nullptr)
- return new TyTy::ErrorType (pattern->get_mappings ().get_hirid ());
+ return new TyTy::ErrorType (pattern.get_mappings ().get_hirid ());
- resolver.context->insert_type (pattern->get_mappings (), resolver.infered);
+ resolver.context->insert_type (pattern.get_mappings (), resolver.infered);
return resolver.infered;
}
@@ -49,7 +49,7 @@ void
TypeCheckPattern::visit (HIR::PathInExpression &pattern)
{
// Pattern must be enum variants, sturcts, constants, or associated constansts
- TyTy::BaseType *pattern_ty = TypeCheckExpr::Resolve (&pattern);
+ TyTy::BaseType *pattern_ty = TypeCheckExpr::Resolve (pattern);
NodeId ref_node_id = UNKNOWN_NODEID;
bool maybe_item = false;
@@ -161,7 +161,7 @@ TypeCheckPattern::visit (HIR::PathInExpression &pattern)
void
TypeCheckPattern::visit (HIR::TupleStructPattern &pattern)
{
- TyTy::BaseType *pattern_ty = TypeCheckExpr::Resolve (&pattern.get_path ());
+ TyTy::BaseType *pattern_ty = TypeCheckExpr::Resolve (pattern.get_path ());
if (pattern_ty->get_kind () != TyTy::TypeKind::ADT)
{
rust_error_at (
@@ -210,8 +210,8 @@ TypeCheckPattern::visit (HIR::TupleStructPattern &pattern)
// error[E0023]: this pattern has 0 fields, but the corresponding tuple
// variant has 1 field
- std::unique_ptr<HIR::TupleStructItems> &items = pattern.get_items ();
- switch (items->get_item_type ())
+ auto &items = pattern.get_items ();
+ switch (items.get_item_type ())
{
case HIR::TupleStructItems::RANGED: {
// TODO
@@ -221,7 +221,7 @@ TypeCheckPattern::visit (HIR::TupleStructPattern &pattern)
case HIR::TupleStructItems::MULTIPLE: {
HIR::TupleStructItemsNoRange &items_no_range
- = static_cast<HIR::TupleStructItemsNoRange &> (*items.get ());
+ = static_cast<HIR::TupleStructItemsNoRange &> (items);
if (items_no_range.get_patterns ().size () != variant->num_fields ())
{
@@ -247,7 +247,7 @@ TypeCheckPattern::visit (HIR::TupleStructPattern &pattern)
// setup the type on this pattern type
context->insert_type (pattern->get_mappings (), fty);
- TypeCheckPattern::Resolve (pattern.get (), fty);
+ TypeCheckPattern::Resolve (*pattern, fty);
}
}
break;
@@ -266,7 +266,7 @@ emit_invalid_field_error (location_t loc, Rust::TyTy::VariantDef *variant,
void
TypeCheckPattern::visit (HIR::StructPattern &pattern)
{
- TyTy::BaseType *pattern_ty = TypeCheckExpr::Resolve (&pattern.get_path ());
+ TyTy::BaseType *pattern_ty = TypeCheckExpr::Resolve (pattern.get_path ());
if (pattern_ty->get_kind () != TyTy::TypeKind::ADT)
{
rust_error_at (pattern.get_locus (),
@@ -324,7 +324,7 @@ TypeCheckPattern::visit (HIR::StructPattern &pattern)
case HIR::StructPatternField::ItemType::IDENT_PAT: {
HIR::StructPatternFieldIdentPat &ident
- = static_cast<HIR::StructPatternFieldIdentPat &> (*field.get ());
+ = static_cast<HIR::StructPatternFieldIdentPat &> (*field);
TyTy::StructFieldType *field = nullptr;
if (!variant->lookup_field (ident.get_identifier ().as_string (),
@@ -337,13 +337,13 @@ TypeCheckPattern::visit (HIR::StructPattern &pattern)
named_fields.push_back (ident.get_identifier ().as_string ());
TyTy::BaseType *fty = field->get_field_type ();
- TypeCheckPattern::Resolve (ident.get_pattern ().get (), fty);
+ TypeCheckPattern::Resolve (ident.get_pattern (), fty);
}
break;
case HIR::StructPatternField::ItemType::IDENT: {
HIR::StructPatternFieldIdent &ident
- = static_cast<HIR::StructPatternFieldIdent &> (*field.get ());
+ = static_cast<HIR::StructPatternFieldIdent &> (*field);
TyTy::StructFieldType *field = nullptr;
if (!variant->lookup_field (ident.get_identifier ().as_string (),
@@ -440,12 +440,11 @@ void
TypeCheckPattern::visit (HIR::TuplePattern &pattern)
{
std::unique_ptr<HIR::TuplePatternItems> items;
- switch (pattern.get_items ()->get_item_type ())
+ switch (pattern.get_items ().get_item_type ())
{
case HIR::TuplePatternItems::ItemType::MULTIPLE: {
- HIR::TuplePatternItemsMultiple &ref
- = *static_cast<HIR::TuplePatternItemsMultiple *> (
- pattern.get_items ().get ());
+ auto &ref = static_cast<HIR::TuplePatternItemsMultiple &> (
+ pattern.get_items ());
auto resolved_parent = parent->destructure ();
if (resolved_parent->get_kind () != TyTy::TUPLE)
@@ -474,8 +473,7 @@ TypeCheckPattern::visit (HIR::TuplePattern &pattern)
auto &p = patterns[i];
TyTy::BaseType *par_type = par.get_field (i);
- TyTy::BaseType *elem
- = TypeCheckPattern::Resolve (p.get (), par_type);
+ TyTy::BaseType *elem = TypeCheckPattern::Resolve (*p, par_type);
pattern_elems.push_back (TyTy::TyVar (elem->get_ref ()));
}
infered = new TyTy::TupleType (pattern.get_mappings ().get_hirid (),
@@ -543,10 +541,10 @@ TypeCheckPattern::visit (HIR::ReferencePattern &pattern)
return;
}
- TyTy::ReferenceType *ref_ty_ty = static_cast<TyTy::ReferenceType *> (parent);
+ auto &ref_ty_ty = static_cast<TyTy::ReferenceType &> (*parent);
TyTy::BaseType *infered_base
- = TypeCheckPattern::Resolve (pattern.get_referenced_pattern ().get (),
- ref_ty_ty->get_base ());
+ = TypeCheckPattern::Resolve (pattern.get_referenced_pattern (),
+ ref_ty_ty.get_base ());
infered = new TyTy::ReferenceType (pattern.get_mappings ().get_hirid (),
TyTy::TyVar (infered_base->get_ref ()),
pattern.is_mut () ? Mutability::Mut
@@ -578,15 +576,14 @@ TypeCheckPattern::emit_pattern_size_error (const HIR::Pattern &pattern,
TyTy::BaseType *
TypeCheckPattern::typecheck_range_pattern_bound (
- std::unique_ptr<Rust::HIR::RangePatternBound> &bound,
- Analysis::NodeMapping mappings, location_t locus)
+ Rust::HIR::RangePatternBound &bound, Analysis::NodeMapping mappings,
+ location_t locus)
{
TyTy::BaseType *resolved_bound = nullptr;
- switch (bound->get_bound_type ())
+ switch (bound.get_bound_type ())
{
case HIR::RangePatternBound::RangePatternBoundType::LITERAL: {
- HIR::RangePatternBoundLiteral &ref
- = *static_cast<HIR::RangePatternBoundLiteral *> (bound.get ());
+ auto &ref = static_cast<HIR::RangePatternBoundLiteral &> (bound);
HIR::Literal lit = ref.get_literal ();
@@ -595,18 +592,16 @@ TypeCheckPattern::typecheck_range_pattern_bound (
break;
case HIR::RangePatternBound::RangePatternBoundType::PATH: {
- HIR::RangePatternBoundPath &ref
- = *static_cast<HIR::RangePatternBoundPath *> (bound.get ());
+ auto &ref = static_cast<HIR::RangePatternBoundPath &> (bound);
- resolved_bound = TypeCheckExpr::Resolve (&ref.get_path ());
+ resolved_bound = TypeCheckExpr::Resolve (ref.get_path ());
}
break;
case HIR::RangePatternBound::RangePatternBoundType::QUALPATH: {
- HIR::RangePatternBoundQualPath &ref
- = *static_cast<HIR::RangePatternBoundQualPath *> (bound.get ());
+ auto &ref = static_cast<HIR::RangePatternBoundQualPath &> (bound);
- resolved_bound = TypeCheckExpr::Resolve (&ref.get_qualified_path ());
+ resolved_bound = TypeCheckExpr::Resolve (ref.get_qualified_path ());
}
break;
}
@@ -623,7 +618,7 @@ TypeCheckPattern::visit (HIR::AltPattern &pattern)
std::vector<TyTy::BaseType *> types;
for (auto &alt_pattern : alts)
{
- types.push_back (TypeCheckPattern::Resolve (alt_pattern.get (), parent));
+ types.push_back (TypeCheckPattern::Resolve (*alt_pattern, parent));
}
TyTy::BaseType *alt_pattern_type
@@ -642,16 +637,16 @@ TypeCheckPattern::visit (HIR::AltPattern &pattern)
}
TyTy::BaseType *
-ClosureParamInfer::Resolve (HIR::Pattern *pattern)
+ClosureParamInfer::Resolve (HIR::Pattern &pattern)
{
ClosureParamInfer resolver;
- pattern->accept_vis (resolver);
+ pattern.accept_vis (resolver);
if (resolver.infered->get_kind () != TyTy::TypeKind::ERROR)
{
resolver.context->insert_implicit_type (resolver.infered);
resolver.mappings.insert_location (resolver.infered->get_ref (),
- pattern->get_locus ());
+ pattern.get_locus ());
}
return resolver.infered;
}
@@ -682,7 +677,7 @@ void
ClosureParamInfer::visit (HIR::ReferencePattern &pattern)
{
TyTy::BaseType *element
- = ClosureParamInfer::Resolve (pattern.get_referenced_pattern ().get ());
+ = ClosureParamInfer::Resolve (pattern.get_referenced_pattern ());
HirId id = pattern.get_mappings ().get_hirid ();
infered = new TyTy::ReferenceType (id, TyTy::TyVar (element->get_ref ()),
diff --git a/gcc/rust/typecheck/rust-hir-type-check-pattern.h b/gcc/rust/typecheck/rust-hir-type-check-pattern.h
index ba45b65..d477181 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-pattern.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-pattern.h
@@ -28,7 +28,7 @@ namespace Resolver {
class TypeCheckPattern : public TypeCheckBase, public HIR::HIRPatternVisitor
{
public:
- static TyTy::BaseType *Resolve (HIR::Pattern *pattern,
+ static TyTy::BaseType *Resolve (HIR::Pattern &pattern,
TyTy::BaseType *parent);
void visit (HIR::PathInExpression &pattern) override;
@@ -47,9 +47,10 @@ public:
private:
TypeCheckPattern (TyTy::BaseType *parent);
- TyTy::BaseType *typecheck_range_pattern_bound (
- std::unique_ptr<Rust::HIR::RangePatternBound> &bound,
- Analysis::NodeMapping mappings, location_t locus);
+ TyTy::BaseType *
+ typecheck_range_pattern_bound (Rust::HIR::RangePatternBound &bound,
+ Analysis::NodeMapping mappings,
+ location_t locus);
void emit_pattern_size_error (const HIR::Pattern &pattern,
size_t expected_field_count,
@@ -62,7 +63,7 @@ private:
class ClosureParamInfer : private TypeCheckBase, private HIR::HIRPatternVisitor
{
public:
- static TyTy::BaseType *Resolve (HIR::Pattern *pattern);
+ static TyTy::BaseType *Resolve (HIR::Pattern &pattern);
void visit (HIR::PathInExpression &pattern) override;
void visit (HIR::StructPattern &pattern) override;
diff --git a/gcc/rust/typecheck/rust-hir-type-check-stmt.cc b/gcc/rust/typecheck/rust-hir-type-check-stmt.cc
index 6d27d3d..4e53856 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-stmt.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-stmt.cc
@@ -28,23 +28,23 @@ namespace Rust {
namespace Resolver {
TyTy::BaseType *
-TypeCheckStmt::Resolve (HIR::Stmt *stmt)
+TypeCheckStmt::Resolve (HIR::Stmt &stmt)
{
TypeCheckStmt resolver;
- stmt->accept_vis (resolver);
+ stmt.accept_vis (resolver);
return resolver.infered;
}
void
TypeCheckStmt::visit (HIR::ExprStmt &stmt)
{
- infered = TypeCheckExpr::Resolve (stmt.get_expr ().get ());
+ infered = TypeCheckExpr::Resolve (stmt.get_expr ());
}
void
TypeCheckStmt::visit (HIR::EmptyStmt &stmt)
{
- infered = TyTy::TupleType::get_unit_type (stmt.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
}
void
@@ -52,21 +52,20 @@ TypeCheckStmt::visit (HIR::ExternBlock &extern_block)
{
for (auto &item : extern_block.get_extern_items ())
{
- TypeCheckTopLevelExternItem::Resolve (item.get (), extern_block);
+ TypeCheckTopLevelExternItem::Resolve (*item, extern_block);
}
}
void
TypeCheckStmt::visit (HIR::ConstantItem &constant)
{
- TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ().get ());
- TyTy::BaseType *expr_type
- = TypeCheckExpr::Resolve (constant.get_expr ().get ());
+ TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ());
+ TyTy::BaseType *expr_type = TypeCheckExpr::Resolve (constant.get_expr ());
infered = coercion_site (
constant.get_mappings ().get_hirid (),
- TyTy::TyWithLocation (type, constant.get_type ()->get_locus ()),
- TyTy::TyWithLocation (expr_type, constant.get_expr ()->get_locus ()),
+ TyTy::TyWithLocation (type, constant.get_type ().get_locus ()),
+ TyTy::TyWithLocation (expr_type, constant.get_expr ().get_locus ()),
constant.get_locus ());
context->insert_type (constant.get_mappings (), infered);
}
@@ -74,15 +73,15 @@ TypeCheckStmt::visit (HIR::ConstantItem &constant)
void
TypeCheckStmt::visit (HIR::LetStmt &stmt)
{
- infered = TyTy::TupleType::get_unit_type (stmt.get_mappings ().get_hirid ());
+ infered = TyTy::TupleType::get_unit_type ();
- HIR::Pattern &stmt_pattern = *stmt.get_pattern ();
+ auto &stmt_pattern = stmt.get_pattern ();
TyTy::BaseType *init_expr_ty = nullptr;
location_t init_expr_locus = UNKNOWN_LOCATION;
if (stmt.has_init_expr ())
{
- init_expr_locus = stmt.get_init_expr ()->get_locus ();
- init_expr_ty = TypeCheckExpr::Resolve (stmt.get_init_expr ().get ());
+ init_expr_locus = stmt.get_init_expr ().get_locus ();
+ init_expr_ty = TypeCheckExpr::Resolve (stmt.get_init_expr ());
if (init_expr_ty->get_kind () == TyTy::TypeKind::ERROR)
return;
@@ -94,8 +93,8 @@ TypeCheckStmt::visit (HIR::LetStmt &stmt)
location_t specified_ty_locus;
if (stmt.has_type ())
{
- specified_ty = TypeCheckType::Resolve (stmt.get_type ().get ());
- specified_ty_locus = stmt.get_type ()->get_locus ();
+ specified_ty = TypeCheckType::Resolve (stmt.get_type ());
+ specified_ty_locus = stmt.get_type ().get_locus ();
}
// let x:i32 = 123;
@@ -105,19 +104,19 @@ TypeCheckStmt::visit (HIR::LetStmt &stmt)
TyTy::TyWithLocation (specified_ty, specified_ty_locus),
TyTy::TyWithLocation (init_expr_ty, init_expr_locus),
stmt.get_locus ());
- TypeCheckPattern::Resolve (&stmt_pattern, specified_ty);
+ TypeCheckPattern::Resolve (stmt_pattern, specified_ty);
}
else
{
// let x:i32;
if (specified_ty != nullptr)
{
- TypeCheckPattern::Resolve (&stmt_pattern, specified_ty);
+ TypeCheckPattern::Resolve (stmt_pattern, specified_ty);
}
// let x = 123;
else if (init_expr_ty != nullptr)
{
- TypeCheckPattern::Resolve (&stmt_pattern, init_expr_ty);
+ TypeCheckPattern::Resolve (stmt_pattern, init_expr_ty);
}
// let x;
else
@@ -127,7 +126,7 @@ TypeCheckStmt::visit (HIR::LetStmt &stmt)
TyTy::InferType::InferTypeKind::GENERAL,
TyTy::InferType::TypeHint::Default (),
stmt.get_locus ());
- TypeCheckPattern::Resolve (&stmt_pattern, infer);
+ TypeCheckPattern::Resolve (stmt_pattern, infer);
}
}
}
@@ -135,12 +134,12 @@ TypeCheckStmt::visit (HIR::LetStmt &stmt)
void
TypeCheckStmt::visit (HIR::TypePath &path)
{
- infered = TypeCheckType::Resolve (&path);
+ infered = TypeCheckType::Resolve (path);
}
void
TypeCheckStmt::visit (HIR::QualifiedPathInType &path)
{
- infered = TypeCheckType::Resolve (&path);
+ infered = TypeCheckType::Resolve (path);
}
void
diff --git a/gcc/rust/typecheck/rust-hir-type-check-stmt.h b/gcc/rust/typecheck/rust-hir-type-check-stmt.h
index 6d91372..d679805 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-stmt.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-stmt.h
@@ -28,7 +28,7 @@ namespace Resolver {
class TypeCheckStmt : private TypeCheckBase, private HIR::HIRStmtVisitor
{
public:
- static TyTy::BaseType *Resolve (HIR::Stmt *stmt);
+ static TyTy::BaseType *Resolve (HIR::Stmt &stmt);
void visit (HIR::ExprStmt &stmt) override;
void visit (HIR::EmptyStmt &stmt) override;
diff --git a/gcc/rust/typecheck/rust-hir-type-check-struct-field.h b/gcc/rust/typecheck/rust-hir-type-check-struct-field.h
index cfa17ac..800f7ca 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-struct-field.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-struct-field.h
@@ -33,7 +33,7 @@ namespace Resolver {
class TypeCheckStructExpr : public TypeCheckBase
{
public:
- static TyTy::BaseType *Resolve (HIR::StructExprStructFields *expr);
+ static TyTy::BaseType *Resolve (HIR::StructExprStructFields &expr);
// Helper for making any errors
static Error
@@ -49,7 +49,7 @@ protected:
bool visit (HIR::StructExprFieldIdentifier &field);
private:
- TypeCheckStructExpr (HIR::Expr *e);
+ TypeCheckStructExpr (HIR::Expr &e);
// result
TyTy::BaseType *resolved;
diff --git a/gcc/rust/typecheck/rust-hir-type-check-struct.cc b/gcc/rust/typecheck/rust-hir-type-check-struct.cc
index 5018829..40c42b2 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-struct.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-struct.cc
@@ -24,18 +24,18 @@
namespace Rust {
namespace Resolver {
-TypeCheckStructExpr::TypeCheckStructExpr (HIR::Expr *e)
+TypeCheckStructExpr::TypeCheckStructExpr (HIR::Expr &e)
: TypeCheckBase (),
- resolved (new TyTy::ErrorType (e->get_mappings ().get_hirid ())),
+ resolved (new TyTy::ErrorType (e.get_mappings ().get_hirid ())),
struct_path_resolved (nullptr),
variant (&TyTy::VariantDef::get_error_node ())
{}
TyTy::BaseType *
-TypeCheckStructExpr::Resolve (HIR::StructExprStructFields *expr)
+TypeCheckStructExpr::Resolve (HIR::StructExprStructFields &expr)
{
TypeCheckStructExpr resolver (expr);
- resolver.resolve (*expr);
+ resolver.resolve (expr);
return resolver.resolved;
}
@@ -43,7 +43,7 @@ void
TypeCheckStructExpr::resolve (HIR::StructExprStructFields &struct_expr)
{
TyTy::BaseType *struct_path_ty
- = TypeCheckExpr::Resolve (&struct_expr.get_struct_name ());
+ = TypeCheckExpr::Resolve (struct_expr.get_struct_name ());
if (struct_path_ty->get_kind () != TyTy::TypeKind::ADT)
{
rust_error_at (struct_expr.get_struct_name ().get_locus (),
@@ -56,17 +56,18 @@ TypeCheckStructExpr::resolve (HIR::StructExprStructFields &struct_expr)
if (struct_expr.has_struct_base ())
{
TyTy::BaseType *base_resolved
- = TypeCheckExpr::Resolve (struct_expr.struct_base->base_struct.get ());
+ = TypeCheckExpr::Resolve (struct_expr.get_struct_base ().get_base ());
TyTy::BaseType *base_unify = unify_site (
- struct_expr.struct_base->base_struct->get_mappings ().get_hirid (),
+ struct_expr.get_struct_base ().get_base ().get_mappings ().get_hirid (),
TyTy::TyWithLocation (struct_path_resolved),
TyTy::TyWithLocation (base_resolved),
- struct_expr.struct_base->base_struct->get_locus ());
+ struct_expr.get_struct_base ().get_base ().get_locus ());
if (base_unify->get_kind () != struct_path_ty->get_kind ())
{
- rust_fatal_error (struct_expr.struct_base->base_struct->get_locus (),
- "incompatible types for base struct reference");
+ rust_fatal_error (
+ struct_expr.get_struct_base ().get_base ().get_locus (),
+ "incompatible types for base struct reference");
return;
}
@@ -190,26 +191,29 @@ TypeCheckStructExpr::resolve (HIR::StructExprStructFields &struct_expr)
for (auto &missing : missing_fields)
{
HIR::Expr *receiver
- = struct_expr.struct_base->base_struct->clone_expr_impl ();
+ = struct_expr.get_struct_base ().get_base ().clone_expr_impl ();
HIR::StructExprField *implicit_field = nullptr;
AST::AttrVec outer_attribs;
auto crate_num = mappings.get_current_crate ();
- Analysis::NodeMapping mapping (
- crate_num,
- struct_expr.struct_base->base_struct->get_mappings ()
- .get_nodeid (),
- mappings.get_next_hir_id (crate_num), UNKNOWN_LOCAL_DEFID);
+ Analysis::NodeMapping mapping (crate_num,
+ struct_expr.get_struct_base ()
+ .get_base ()
+ .get_mappings ()
+ .get_nodeid (),
+ mappings.get_next_hir_id (
+ crate_num),
+ UNKNOWN_LOCAL_DEFID);
HIR::Expr *field_value = new HIR::FieldAccessExpr (
mapping, std::unique_ptr<HIR::Expr> (receiver), missing,
std::move (outer_attribs),
- struct_expr.struct_base->base_struct->get_locus ());
+ struct_expr.get_struct_base ().get_base ().get_locus ());
implicit_field = new HIR::StructExprFieldIdentifierValue (
mapping, missing, std::unique_ptr<HIR::Expr> (field_value),
- struct_expr.struct_base->base_struct->get_locus ());
+ struct_expr.get_struct_base ().get_base ().get_locus ());
size_t field_index;
bool ok = variant->lookup_field (missing, nullptr, &field_index);
@@ -284,8 +288,8 @@ TypeCheckStructExpr::visit (HIR::StructExprFieldIdentifierValue &field)
return false;
}
- TyTy::BaseType *value = TypeCheckExpr::Resolve (field.get_value ().get ());
- location_t value_locus = field.get_value ()->get_locus ();
+ TyTy::BaseType *value = TypeCheckExpr::Resolve (field.get_value ());
+ location_t value_locus = field.get_value ().get_locus ();
HirId coercion_site_id = field.get_mappings ().get_hirid ();
resolved_field_value_expr
@@ -330,8 +334,8 @@ TypeCheckStructExpr::visit (HIR::StructExprFieldIndexValue &field)
return false;
}
- TyTy::BaseType *value = TypeCheckExpr::Resolve (field.get_value ().get ());
- location_t value_locus = field.get_value ()->get_locus ();
+ TyTy::BaseType *value = TypeCheckExpr::Resolve (field.get_value ());
+ location_t value_locus = field.get_value ().get_locus ();
HirId coercion_site_id = field.get_mappings ().get_hirid ();
resolved_field_value_expr
@@ -385,7 +389,7 @@ TypeCheckStructExpr::visit (HIR::StructExprFieldIdentifier &field)
HIR::GenericArgs::create_empty ());
HIR::PathInExpression expr (mappings_copy2, {seg}, field.get_locus (), false,
{});
- TyTy::BaseType *value = TypeCheckExpr::Resolve (&expr);
+ TyTy::BaseType *value = TypeCheckExpr::Resolve (expr);
location_t value_locus = expr.get_locus ();
HirId coercion_site_id = field.get_mappings ().get_hirid ();
diff --git a/gcc/rust/typecheck/rust-hir-type-check-type.cc b/gcc/rust/typecheck/rust-hir-type-check-type.cc
index f7ae8cc..a7d28a6 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-type.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check-type.cc
@@ -18,6 +18,8 @@
#include "rust-hir-type-check-type.h"
#include "options.h"
+#include "optional.h"
+#include "rust-hir-map.h"
#include "rust-hir-trait-resolve.h"
#include "rust-hir-type-check-expr.h"
#include "rust-hir-path-probe.h"
@@ -26,18 +28,19 @@
#include "rust-mapping-common.h"
#include "rust-substitution-mapper.h"
#include "rust-type-util.h"
+#include "rust-system.h"
namespace Rust {
namespace Resolver {
HIR::GenericArgs
-TypeCheckResolveGenericArguments::resolve (HIR::TypePathSegment *segment)
+TypeCheckResolveGenericArguments::resolve (HIR::TypePathSegment &segment)
{
- TypeCheckResolveGenericArguments resolver (segment->get_locus ());
- switch (segment->get_type ())
+ TypeCheckResolveGenericArguments resolver (segment.get_locus ());
+ switch (segment.get_type ())
{
case HIR::TypePathSegment::SegmentType::GENERIC:
- resolver.visit (static_cast<HIR::TypePathSegmentGeneric &> (*segment));
+ resolver.visit (static_cast<HIR::TypePathSegmentGeneric &> (segment));
break;
default:
@@ -53,20 +56,20 @@ TypeCheckResolveGenericArguments::visit (HIR::TypePathSegmentGeneric &generic)
}
TyTy::BaseType *
-TypeCheckType::Resolve (HIR::Type *type)
+TypeCheckType::Resolve (HIR::Type &type)
{
// is it already resolved?
auto context = TypeCheckContext::get ();
TyTy::BaseType *resolved = nullptr;
bool already_resolved
- = context->lookup_type (type->get_mappings ().get_hirid (), &resolved);
+ = context->lookup_type (type.get_mappings ().get_hirid (), &resolved);
if (already_resolved)
return resolved;
- TypeCheckType resolver (type->get_mappings ().get_hirid ());
- type->accept_vis (resolver);
+ TypeCheckType resolver (type.get_mappings ().get_hirid ());
+ type.accept_vis (resolver);
rust_assert (resolver.translated != nullptr);
- resolver.context->insert_type (type->get_mappings (), resolver.translated);
+ resolver.context->insert_type (type.get_mappings (), resolver.translated);
return resolver.translated;
}
@@ -82,20 +85,20 @@ TypeCheckType::visit (HIR::BareFunctionType &fntype)
TyTy::BaseType *return_type;
if (fntype.has_return_type ())
{
- return_type = TypeCheckType::Resolve (fntype.get_return_type ().get ());
+ return_type = TypeCheckType::Resolve (fntype.get_return_type ());
}
else
{
// needs a new implicit ID
HirId ref = mappings.get_next_hir_id ();
- return_type = TyTy::TupleType::get_unit_type (ref);
+ return_type = TyTy::TupleType::get_unit_type ();
context->insert_implicit_type (ref, return_type);
}
std::vector<TyTy::TyVar> params;
for (auto &param : fntype.get_function_params ())
{
- TyTy::BaseType *ptype = TypeCheckType::Resolve (param.get_type ().get ());
+ TyTy::BaseType *ptype = TypeCheckType::Resolve (param.get_type ());
params.push_back (TyTy::TyVar (ptype->get_ref ()));
}
@@ -109,19 +112,14 @@ TypeCheckType::visit (HIR::TupleType &tuple)
{
if (tuple.is_unit_type ())
{
- auto unit_node_id = resolver->get_unit_type_node_id ();
- if (!context->lookup_builtin (unit_node_id, &translated))
- {
- rust_error_at (tuple.get_locus (),
- "failed to lookup builtin unit type");
- }
+ translated = TyTy::TupleType::get_unit_type ();
return;
}
std::vector<TyTy::TyVar> fields;
for (auto &elem : tuple.get_elems ())
{
- auto field_ty = TypeCheckType::Resolve (elem.get ());
+ auto field_ty = TypeCheckType::Resolve (*elem);
fields.push_back (TyTy::TyVar (field_ty->get_ref ()));
}
@@ -136,11 +134,16 @@ TypeCheckType::visit (HIR::TypePath &path)
// this can happen so we need to look up the root then resolve the
// remaining segments if possible
+ bool wasBigSelf = false;
size_t offset = 0;
NodeId resolved_node_id = UNKNOWN_NODEID;
- TyTy::BaseType *root = resolve_root_path (path, &offset, &resolved_node_id);
+ TyTy::BaseType *root
+ = resolve_root_path (path, &offset, &resolved_node_id, &wasBigSelf);
if (root->get_kind () == TyTy::TypeKind::ERROR)
- return;
+ {
+ rust_debug_loc (path.get_locus (), "failed to resolve type-path type");
+ return;
+ }
TyTy::BaseType *path_type = root->clone ();
path_type->set_ref (path.get_mappings ().get_hirid ());
@@ -150,21 +153,25 @@ TypeCheckType::visit (HIR::TypePath &path)
if (fully_resolved)
{
translated = path_type;
+ rust_debug_loc (path.get_locus (), "root resolved type-path to: [%s]",
+ translated->debug_str ().c_str ());
return;
}
translated
= resolve_segments (resolved_node_id, path.get_mappings ().get_hirid (),
path.get_segments (), offset, path_type,
- path.get_mappings (), path.get_locus ());
+ path.get_mappings (), path.get_locus (), wasBigSelf);
+
+ rust_debug_loc (path.get_locus (), "resolved type-path to: [%s]",
+ translated->debug_str ().c_str ());
}
void
TypeCheckType::visit (HIR::QualifiedPathInType &path)
{
HIR::QualifiedPathType qual_path_type = path.get_path_type ();
- TyTy::BaseType *root
- = TypeCheckType::Resolve (qual_path_type.get_type ().get ());
+ TyTy::BaseType *root = TypeCheckType::Resolve (qual_path_type.get_type ());
if (root->get_kind () == TyTy::TypeKind::ERROR)
{
rust_debug_loc (path.get_locus (), "failed to resolve the root");
@@ -175,22 +182,39 @@ TypeCheckType::visit (HIR::QualifiedPathInType &path)
{
// then this is just a normal path-in-expression
NodeId root_resolved_node_id = UNKNOWN_NODEID;
- bool ok = resolver->lookup_resolved_type (
- qual_path_type.get_type ()->get_mappings ().get_nodeid (),
- &root_resolved_node_id);
+ bool ok = false;
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ if (auto id = nr_ctx.lookup (
+ qual_path_type.get_type ().get_mappings ().get_nodeid ()))
+ {
+ root_resolved_node_id = *id;
+ ok = true;
+ }
+ }
+ else
+ {
+ ok = resolver->lookup_resolved_type (
+ qual_path_type.get_type ().get_mappings ().get_nodeid (),
+ &root_resolved_node_id);
+ }
rust_assert (ok);
- translated = resolve_segments (root_resolved_node_id,
- path.get_mappings ().get_hirid (),
- path.get_segments (), 0, translated,
- path.get_mappings (), path.get_locus ());
+ translated
+ = resolve_segments (root_resolved_node_id,
+ path.get_mappings ().get_hirid (),
+ path.get_segments (), 0, translated,
+ path.get_mappings (), path.get_locus (), false);
return;
}
// Resolve the trait now
- std::unique_ptr<HIR::TypePath> &trait_path_ref = qual_path_type.get_trait ();
- TraitReference *trait_ref = TraitResolver::Resolve (*trait_path_ref.get ());
+ auto &trait_path_ref = qual_path_type.get_trait ();
+ TraitReference *trait_ref = TraitResolver::Resolve (trait_path_ref);
if (trait_ref->is_error ())
return;
@@ -203,9 +227,8 @@ TypeCheckType::visit (HIR::QualifiedPathInType &path)
}
// get the predicate for the bound
- auto specified_bound
- = get_predicate_from_bound (*qual_path_type.get_trait ().get (),
- qual_path_type.get_type ().get ());
+ auto specified_bound = get_predicate_from_bound (qual_path_type.get_trait (),
+ qual_path_type.get_type ());
if (specified_bound.is_error ())
return;
@@ -213,18 +236,17 @@ TypeCheckType::visit (HIR::QualifiedPathInType &path)
root->inherit_bounds ({specified_bound});
// lookup the associated item from the specified bound
- std::unique_ptr<HIR::TypePathSegment> &item_seg
- = path.get_associated_segment ();
- HIR::PathIdentSegment item_seg_identifier = item_seg->get_ident_segment ();
+ HIR::TypePathSegment &item_seg = path.get_associated_segment ();
+ HIR::PathIdentSegment item_seg_identifier = item_seg.get_ident_segment ();
TyTy::TypeBoundPredicateItem item
= specified_bound.lookup_associated_item (item_seg_identifier.as_string ());
if (item.is_error ())
{
std::string item_seg_ident_name, rich_msg;
- item_seg_ident_name = qual_path_type.get_trait ()->as_string ();
+ item_seg_ident_name = qual_path_type.get_trait ().as_string ();
rich_msg = "not found in `" + item_seg_ident_name + "`";
- rich_location richloc (line_table, item_seg->get_locus ());
+ rich_location richloc (line_table, item_seg.get_locus ());
richloc.add_fixit_replace (rich_msg.c_str ());
rust_error_at (richloc, ErrorCode::E0576,
@@ -296,17 +318,16 @@ TypeCheckType::visit (HIR::QualifiedPathInType &path)
}
// turbo-fish segment path::<ty>
- if (item_seg->get_type () == HIR::TypePathSegment::SegmentType::GENERIC)
+ if (item_seg.get_type () == HIR::TypePathSegment::SegmentType::GENERIC)
{
- HIR::TypePathSegmentGeneric &generic_seg
- = static_cast<HIR::TypePathSegmentGeneric &> (*item_seg.get ());
+ auto &generic_seg = static_cast<HIR::TypePathSegmentGeneric &> (item_seg);
// turbo-fish segment path::<ty>
if (generic_seg.has_generic_args ())
{
if (!translated->has_substitutions_defined ())
{
- rust_error_at (item_seg->get_locus (),
+ rust_error_at (item_seg.get_locus (),
"substitutions not supported for %s",
translated->as_string ().c_str ());
translated
@@ -325,8 +346,21 @@ TypeCheckType::visit (HIR::QualifiedPathInType &path)
bool fully_resolved = path.get_segments ().empty ();
if (fully_resolved)
{
- resolver->insert_resolved_type (path.get_mappings ().get_nodeid (),
- root_resolved_node_id);
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
+ Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
+
+ nr_ctx.map_usage (Resolver2_0::Usage (
+ path.get_mappings ().get_nodeid ()),
+ Resolver2_0::Definition (root_resolved_node_id));
+ }
+ else
+ {
+ resolver->insert_resolved_type (path.get_mappings ().get_nodeid (),
+ root_resolved_node_id);
+ }
+
context->insert_receiver (path.get_mappings ().get_hirid (), root);
return;
}
@@ -334,15 +368,18 @@ TypeCheckType::visit (HIR::QualifiedPathInType &path)
translated
= resolve_segments (root_resolved_node_id,
path.get_mappings ().get_hirid (), path.get_segments (),
- 0, translated, path.get_mappings (), path.get_locus ());
+ 0, translated, path.get_mappings (), path.get_locus (),
+ false);
}
TyTy::BaseType *
TypeCheckType::resolve_root_path (HIR::TypePath &path, size_t *offset,
- NodeId *root_resolved_node_id)
+ NodeId *root_resolved_node_id,
+ bool *wasBigSelf)
{
TyTy::BaseType *root_tyty = nullptr;
*offset = 0;
+
for (size_t i = 0; i < path.get_num_segments (); i++)
{
std::unique_ptr<HIR::TypePathSegment> &seg = path.get_segments ().at (i);
@@ -354,19 +391,25 @@ TypeCheckType::resolve_root_path (HIR::TypePath &path, size_t *offset,
// then lookup the reference_node_id
NodeId ref_node_id = UNKNOWN_NODEID;
- // FIXME: HACK: ARTHUR: Remove this
- if (flag_name_resolution_2_0)
+ if (seg->is_lang_item ())
+ ref_node_id = Analysis::Mappings::get ().get_lang_item_node (
+ seg->get_lang_item ());
+ else
{
- auto nr_ctx
- = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
- // assign the ref_node_id if we've found something
- nr_ctx.lookup (path.get_mappings ().get_nodeid ())
- .map ([&ref_node_id, &path] (NodeId resolved) {
- ref_node_id = resolved;
- });
+ // FIXME: HACK: ARTHUR: Remove this
+ if (flag_name_resolution_2_0)
+ {
+ auto nr_ctx = Resolver2_0::ImmutableNameResolutionContext::get ()
+ .resolver ();
+
+ // assign the ref_node_id if we've found something
+ nr_ctx.lookup (path.get_mappings ().get_nodeid ())
+ .map (
+ [&ref_node_id] (NodeId resolved) { ref_node_id = resolved; });
+ }
+ else if (!resolver->lookup_resolved_name (ast_node_id, &ref_node_id))
+ resolver->lookup_resolved_type (ast_node_id, &ref_node_id);
}
- else if (!resolver->lookup_resolved_name (ast_node_id, &ref_node_id))
- resolver->lookup_resolved_type (ast_node_id, &ref_node_id);
// ref_node_id is the NodeId that the segments refers to.
if (ref_node_id == UNKNOWN_NODEID)
@@ -375,12 +418,15 @@ TypeCheckType::resolve_root_path (HIR::TypePath &path, size_t *offset,
{
rust_error_at (seg->get_locus (),
"unknown reference for resolved name: %qs",
- seg->get_ident_segment ().as_string ().c_str ());
+ seg->as_string ().c_str ());
return new TyTy::ErrorType (path.get_mappings ().get_hirid ());
}
return root_tyty;
}
+ if (seg->is_ident_only () && seg->as_string () == "Self")
+ *wasBigSelf = true;
+
// node back to HIR
tl::optional<HirId> hid = mappings.lookup_node_to_hir (ref_node_id);
if (!hid.has_value ())
@@ -426,11 +472,8 @@ TypeCheckType::resolve_root_path (HIR::TypePath &path, size_t *offset,
if (!query_type (ref, &lookup))
{
if (is_root)
- {
- rust_error_at (seg->get_locus (),
- "failed to resolve root segment");
- return new TyTy::ErrorType (path.get_mappings ().get_hirid ());
- }
+ return new TyTy::ErrorType (path.get_mappings ().get_hirid ());
+
return root_tyty;
}
@@ -457,13 +500,13 @@ TypeCheckType::resolve_root_path (HIR::TypePath &path, size_t *offset,
// turbo-fish segment path::<ty>
if (seg->is_generic_segment ())
{
- HIR::TypePathSegmentGeneric *generic_segment
- = static_cast<HIR::TypePathSegmentGeneric *> (seg.get ());
+ auto &generic_segment
+ = static_cast<HIR::TypePathSegmentGeneric &> (*seg);
auto regions = context->regions_from_generic_args (
- generic_segment->get_generic_args ());
+ generic_segment.get_generic_args ());
lookup = SubstMapper::Resolve (lookup, path.get_locus (),
- &generic_segment->get_generic_args (),
+ &generic_segment.get_generic_args (),
regions);
if (lookup->get_kind () == TyTy::TypeKind::ERROR)
return new TyTy::ErrorType (seg->get_mappings ().get_hirid ());
@@ -490,12 +533,57 @@ TypeCheckType::resolve_root_path (HIR::TypePath &path, size_t *offset,
return root_tyty;
}
+bool
+TypeCheckType::resolve_associated_type (const std::string &search,
+ TypeCheckBlockContextItem &ctx,
+ TyTy::BaseType **result)
+{
+ if (ctx.is_trait_block ())
+ {
+ HIR::Trait &trait = ctx.get_trait ();
+ for (auto &item : trait.get_trait_items ())
+ {
+ if (item->get_item_kind () != HIR::TraitItem::TraitItemKind::TYPE)
+ continue;
+
+ if (item->trait_identifier () == search)
+ {
+ HirId item_id = item->get_mappings ().get_hirid ();
+ if (query_type (item_id, result))
+ return true;
+ }
+ }
+
+ // FIXME
+ // query any parent trait?
+
+ return false;
+ }
+
+ // look for any segment in here which matches
+ HIR::ImplBlock &block = ctx.get_impl_block ();
+ for (auto &item : block.get_impl_items ())
+ {
+ if (item->get_impl_item_type () != HIR::ImplItem::TYPE_ALIAS)
+ continue;
+
+ if (item->get_impl_item_name () == search)
+ {
+ HirId item_id = item->get_impl_mappings ().get_hirid ();
+ if (query_type (item_id, result))
+ return true;
+ }
+ }
+
+ return false;
+}
+
TyTy::BaseType *
TypeCheckType::resolve_segments (
NodeId root_resolved_node_id, HirId expr_id,
std::vector<std::unique_ptr<HIR::TypePathSegment>> &segments, size_t offset,
TyTy::BaseType *tyseg, const Analysis::NodeMapping &expr_mappings,
- location_t expr_locus)
+ location_t expr_locus, bool tySegIsBigSelf)
{
NodeId resolved_node_id = root_resolved_node_id;
TyTy::BaseType *prev_segment = tyseg;
@@ -508,76 +596,95 @@ TypeCheckType::resolve_segments (
bool probe_bounds = true;
bool probe_impls = !reciever_is_generic;
bool ignore_mandatory_trait_items = !reciever_is_generic;
+ bool first_segment = i == offset;
+ bool selfResolveOk = false;
- // probe the path is done in two parts one where we search impls if no
- // candidate is found then we search extensions from traits
- auto candidates
- = PathProbeType::Probe (prev_segment, seg->get_ident_segment (),
- probe_impls, false,
- ignore_mandatory_trait_items);
- if (candidates.size () == 0)
+ if (first_segment && tySegIsBigSelf
+ && context->block_context ().is_in_context ()
+ && context->block_context ().peek ().is_impl_block ())
+ {
+ TypeCheckBlockContextItem ctx = context->block_context ().peek ();
+ TyTy::BaseType *lookup = nullptr;
+ selfResolveOk
+ = resolve_associated_type (seg->as_string (), ctx, &lookup);
+ if (selfResolveOk)
+ {
+ prev_segment = tyseg;
+ tyseg = lookup;
+ }
+ }
+ if (!selfResolveOk)
{
- candidates
+ // probe the path is done in two parts one where we search impls if no
+ // candidate is found then we search extensions from traits
+ auto candidates
= PathProbeType::Probe (prev_segment, seg->get_ident_segment (),
- false, probe_bounds,
+ probe_impls, false,
ignore_mandatory_trait_items);
-
if (candidates.size () == 0)
{
- rust_error_at (
- seg->get_locus (),
- "failed to resolve path segment using an impl Probe");
+ candidates
+ = PathProbeType::Probe (prev_segment, seg->get_ident_segment (),
+ false, probe_bounds,
+ ignore_mandatory_trait_items);
+ if (candidates.size () == 0)
+ {
+ rust_error_at (
+ seg->get_locus (),
+ "failed to resolve path segment using an impl Probe");
+ return new TyTy::ErrorType (expr_id);
+ }
+ }
+
+ if (candidates.size () > 1)
+ {
+ ReportMultipleCandidateError::Report (candidates,
+ seg->get_ident_segment (),
+ seg->get_locus ());
return new TyTy::ErrorType (expr_id);
}
- }
- if (candidates.size () > 1)
- {
- ReportMultipleCandidateError::Report (candidates,
- seg->get_ident_segment (),
- seg->get_locus ());
- return new TyTy::ErrorType (expr_id);
- }
+ auto &candidate = *candidates.begin ();
+ prev_segment = tyseg;
+ tyseg = candidate.ty;
- auto &candidate = *candidates.begin ();
- prev_segment = tyseg;
- tyseg = candidate.ty;
+ if (candidate.is_enum_candidate ())
+ {
+ TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (tyseg);
+ auto last_variant = adt->get_variants ();
+ TyTy::VariantDef *variant = last_variant.back ();
- if (candidate.is_enum_candidate ())
- {
- TyTy::ADTType *adt = static_cast<TyTy::ADTType *> (tyseg);
- auto last_variant = adt->get_variants ();
- TyTy::VariantDef *variant = last_variant.back ();
-
- rich_location richloc (line_table, seg->get_locus ());
- richloc.add_fixit_replace ("not a type");
-
- rust_error_at (richloc, ErrorCode::E0573,
- "expected type, found variant of %<%s::%s%>",
- adt->get_name ().c_str (),
- variant->get_identifier ().c_str ());
- return new TyTy::ErrorType (expr_id);
- }
+ rich_location richloc (line_table, seg->get_locus ());
+ richloc.add_fixit_replace ("not a type");
- if (candidate.is_impl_candidate ())
- {
- resolved_node_id
- = candidate.item.impl.impl_item->get_impl_mappings ().get_nodeid ();
- }
- else
- {
- resolved_node_id
- = candidate.item.trait.item_ref->get_mappings ().get_nodeid ();
+ rust_error_at (richloc, ErrorCode::E0573,
+ "expected type, found variant of %<%s::%s%>",
+ adt->get_name ().c_str (),
+ variant->get_identifier ().c_str ());
+ return new TyTy::ErrorType (expr_id);
+ }
+
+ if (candidate.is_impl_candidate ())
+ {
+ resolved_node_id
+ = candidate.item.impl.impl_item->get_impl_mappings ()
+ .get_nodeid ();
+ }
+ else
+ {
+ resolved_node_id
+ = candidate.item.trait.item_ref->get_mappings ().get_nodeid ();
+ }
}
if (seg->is_generic_segment ())
{
- auto *generic_segment
- = static_cast<HIR::TypePathSegmentGeneric *> (seg.get ());
+ auto &generic_segment
+ = static_cast<HIR::TypePathSegmentGeneric &> (*seg);
std::vector<TyTy::Region> regions;
for (auto &lifetime :
- generic_segment->get_generic_args ().get_lifetime_args ())
+ generic_segment.get_generic_args ().get_lifetime_args ())
{
auto region = context->lookup_and_resolve_lifetime (lifetime);
if (!region.has_value ())
@@ -590,7 +697,7 @@ TypeCheckType::resolve_segments (
}
tyseg = SubstMapper::Resolve (tyseg, expr_locus,
- &generic_segment->get_generic_args (),
+ &generic_segment.get_generic_args (),
regions);
if (tyseg->get_kind () == TyTy::TypeKind::ERROR)
return new TyTy::ErrorType (expr_id);
@@ -600,33 +707,53 @@ TypeCheckType::resolve_segments (
context->insert_receiver (expr_mappings.get_hirid (), prev_segment);
rust_assert (resolved_node_id != UNKNOWN_NODEID);
- // lookup if the name resolver was able to canonically resolve this or not
- NodeId path_resolved_id = UNKNOWN_NODEID;
- if (resolver->lookup_resolved_name (expr_mappings.get_nodeid (),
- &path_resolved_id))
- {
- rust_assert (path_resolved_id == resolved_node_id);
- }
- // check the type scope
- else if (resolver->lookup_resolved_type (expr_mappings.get_nodeid (),
- &path_resolved_id))
+ if (flag_name_resolution_2_0)
{
- rust_assert (path_resolved_id == resolved_node_id);
+ auto &nr_ctx = const_cast<Resolver2_0::NameResolutionContext &> (
+ Resolver2_0::ImmutableNameResolutionContext::get ().resolver ());
+
+ auto old = nr_ctx.lookup (expr_mappings.get_nodeid ());
+ if (old.has_value ())
+ {
+ rust_assert (*old == resolved_node_id);
+ }
+ else
+ {
+ nr_ctx.map_usage (Resolver2_0::Usage (expr_mappings.get_nodeid ()),
+ Resolver2_0::Definition (resolved_node_id));
+ }
}
else
{
- // name scope first
- if (resolver->get_name_scope ().decl_was_declared_here (resolved_node_id))
+ // lookup if the name resolver was able to canonically resolve this or not
+ NodeId path_resolved_id = UNKNOWN_NODEID;
+ if (resolver->lookup_resolved_name (expr_mappings.get_nodeid (),
+ &path_resolved_id))
{
- resolver->insert_resolved_name (expr_mappings.get_nodeid (),
- resolved_node_id);
+ rust_assert (path_resolved_id == resolved_node_id);
}
// check the type scope
- else if (resolver->get_type_scope ().decl_was_declared_here (
- resolved_node_id))
+ else if (resolver->lookup_resolved_type (expr_mappings.get_nodeid (),
+ &path_resolved_id))
{
- resolver->insert_resolved_type (expr_mappings.get_nodeid (),
- resolved_node_id);
+ rust_assert (path_resolved_id == resolved_node_id);
+ }
+ else
+ {
+ // name scope first
+ if (resolver->get_name_scope ().decl_was_declared_here (
+ resolved_node_id))
+ {
+ resolver->insert_resolved_name (expr_mappings.get_nodeid (),
+ resolved_node_id);
+ }
+ // check the type scope
+ else if (resolver->get_type_scope ().decl_was_declared_here (
+ resolved_node_id))
+ {
+ resolver->insert_resolved_type (expr_mappings.get_nodeid (),
+ resolved_node_id);
+ }
}
}
@@ -639,6 +766,11 @@ TypeCheckType::visit (HIR::TraitObjectType &type)
std::vector<TyTy::TypeBoundPredicate> specified_bounds;
for (auto &bound : type.get_type_param_bounds ())
{
+ // TODO: here we need to check if there are additional bounds that aren't
+ // auto traits. this is an error. for example, `dyn A + Sized + Sync` is
+ // okay, because Sized and Sync are both auto traits but `dyn A + Copy +
+ // Clone` is not okay and should error out.
+
if (bound->get_bound_type ()
!= HIR::TypeParamBound::BoundType::TRAITBOUND)
continue;
@@ -654,7 +786,7 @@ TypeCheckType::visit (HIR::TraitObjectType &type)
TyTy::TypeBoundPredicate predicate = get_predicate_from_bound (
trait_bound.get_path (),
- nullptr /*this will setup a PLACEHOLDER for self*/);
+ tl::nullopt /*this will setup a PLACEHOLDER for self*/);
if (!predicate.is_error ()
&& predicate.is_object_safe (true, type.get_locus ()))
@@ -668,35 +800,39 @@ TypeCheckType::visit (HIR::TraitObjectType &type)
}
void
+TypeCheckType::visit (HIR::ParenthesisedType &type)
+{
+ translated = TypeCheckType::Resolve (type.get_type_in_parens ());
+}
+
+void
TypeCheckType::visit (HIR::ArrayType &type)
{
- auto capacity_type = TypeCheckExpr::Resolve (type.get_size_expr ().get ());
+ auto capacity_type = TypeCheckExpr::Resolve (type.get_size_expr ());
if (capacity_type->get_kind () == TyTy::TypeKind::ERROR)
return;
TyTy::BaseType *expected_ty = nullptr;
bool ok = context->lookup_builtin ("usize", &expected_ty);
rust_assert (ok);
- context->insert_type (type.get_size_expr ()->get_mappings (), expected_ty);
+ context->insert_type (type.get_size_expr ().get_mappings (), expected_ty);
- unify_site (type.get_size_expr ()->get_mappings ().get_hirid (),
+ unify_site (type.get_size_expr ().get_mappings ().get_hirid (),
TyTy::TyWithLocation (expected_ty),
TyTy::TyWithLocation (capacity_type,
- type.get_size_expr ()->get_locus ()),
- type.get_size_expr ()->get_locus ());
+ type.get_size_expr ().get_locus ()),
+ type.get_size_expr ().get_locus ());
- TyTy::BaseType *base
- = TypeCheckType::Resolve (type.get_element_type ().get ());
+ TyTy::BaseType *base = TypeCheckType::Resolve (type.get_element_type ());
translated = new TyTy::ArrayType (type.get_mappings ().get_hirid (),
- type.get_locus (), *type.get_size_expr (),
+ type.get_locus (), type.get_size_expr (),
TyTy::TyVar (base->get_ref ()));
}
void
TypeCheckType::visit (HIR::SliceType &type)
{
- TyTy::BaseType *base
- = TypeCheckType::Resolve (type.get_element_type ().get ());
+ TyTy::BaseType *base = TypeCheckType::Resolve (type.get_element_type ());
translated
= new TyTy::SliceType (type.get_mappings ().get_hirid (), type.get_locus (),
TyTy::TyVar (base->get_ref ()));
@@ -704,7 +840,7 @@ TypeCheckType::visit (HIR::SliceType &type)
void
TypeCheckType::visit (HIR::ReferenceType &type)
{
- TyTy::BaseType *base = TypeCheckType::Resolve (type.get_base_type ().get ());
+ TyTy::BaseType *base = TypeCheckType::Resolve (type.get_base_type ());
rust_assert (type.has_lifetime ());
auto region = context->lookup_and_resolve_lifetime (type.get_lifetime ());
if (!region.has_value ())
@@ -721,7 +857,7 @@ TypeCheckType::visit (HIR::ReferenceType &type)
void
TypeCheckType::visit (HIR::RawPointerType &type)
{
- TyTy::BaseType *base = TypeCheckType::Resolve (type.get_base_type ().get ());
+ TyTy::BaseType *base = TypeCheckType::Resolve (type.get_base_type ());
translated
= new TyTy::PointerType (type.get_mappings ().get_hirid (),
TyTy::TyVar (base->get_ref ()), type.get_mut ());
@@ -747,21 +883,21 @@ TypeCheckType::visit (HIR::NeverType &type)
}
TyTy::ParamType *
-TypeResolveGenericParam::Resolve (HIR::GenericParam *param, bool apply_sized)
+TypeResolveGenericParam::Resolve (HIR::GenericParam &param, bool apply_sized)
{
TypeResolveGenericParam resolver (apply_sized);
- switch (param->get_kind ())
+ switch (param.get_kind ())
{
case HIR::GenericParam::GenericKind::TYPE:
- resolver.visit (static_cast<HIR::TypeParam &> (*param));
+ resolver.visit (static_cast<HIR::TypeParam &> (param));
break;
case HIR::GenericParam::GenericKind::CONST:
- resolver.visit (static_cast<HIR::ConstGenericParam &> (*param));
+ resolver.visit (static_cast<HIR::ConstGenericParam &> (param));
break;
case HIR::GenericParam::GenericKind::LIFETIME:
- resolver.visit (static_cast<HIR::LifetimeParam &> (*param));
+ resolver.visit (static_cast<HIR::LifetimeParam &> (param));
break;
}
return resolver.resolved;
@@ -783,9 +919,9 @@ void
TypeResolveGenericParam::visit (HIR::TypeParam &param)
{
if (param.has_type ())
- TypeCheckType::Resolve (param.get_type ().get ());
+ TypeCheckType::Resolve (param.get_type ());
- HIR::Type *implicit_self_bound = nullptr;
+ std::unique_ptr<HIR::Type> implicit_self_bound = nullptr;
if (param.has_type_param_bounds ())
{
// We need two possible parameter types. One with no Bounds and one with
@@ -803,8 +939,8 @@ TypeResolveGenericParam::visit (HIR::TypeParam &param)
param.get_mappings ().get_nodeid (),
implicit_id,
param.get_mappings ().get_local_defid ());
- implicit_self_bound
- = new HIR::TypePath (mappings, {}, BUILTINS_LOCATION, false);
+ implicit_self_bound = std::make_unique<HIR::TypePath> (
+ HIR::TypePath (mappings, {}, BUILTINS_LOCATION, false));
}
std::map<DefId, std::vector<TyTy::TypeBoundPredicate>> predicates;
@@ -833,13 +969,13 @@ TypeResolveGenericParam::visit (HIR::TypeParam &param)
switch (bound->get_bound_type ())
{
case HIR::TypeParamBound::BoundType::TRAITBOUND: {
- HIR::TraitBound *b
- = static_cast<HIR::TraitBound *> (bound.get ());
+ HIR::TraitBound &b = static_cast<HIR::TraitBound &> (*bound);
- TyTy::TypeBoundPredicate predicate
- = get_predicate_from_bound (b->get_path (),
- implicit_self_bound,
- b->get_polarity ());
+ TyTy::TypeBoundPredicate predicate = get_predicate_from_bound (
+ b.get_path (),
+ tl::optional<std::reference_wrapper<HIR::Type>> (
+ std::ref (*implicit_self_bound)),
+ b.get_polarity ());
if (!predicate.is_error ())
{
switch (predicate.get_polarity ())
@@ -852,7 +988,7 @@ TypeResolveGenericParam::visit (HIR::TypeParam &param)
else
{
// emit error message
- rich_location r (line_table, b->get_locus ());
+ rich_location r (line_table, b.get_locus ());
r.add_range (predicate.get ()->get_locus ());
rust_error_at (
r, "antibound for %s is not applied here",
@@ -950,7 +1086,7 @@ ResolveWhereClauseItem::visit (HIR::TypeBoundWhereClauseItem &item)
}
auto &binding_type_path = item.get_bound_type ();
- TyTy::BaseType *binding = TypeCheckType::Resolve (binding_type_path.get ());
+ TyTy::BaseType *binding = TypeCheckType::Resolve (binding_type_path);
// FIXME double check there might be a trait cycle here see TypeParam handling
@@ -963,8 +1099,7 @@ ResolveWhereClauseItem::visit (HIR::TypeBoundWhereClauseItem &item)
auto *b = static_cast<HIR::TraitBound *> (bound.get ());
TyTy::TypeBoundPredicate predicate
- = get_predicate_from_bound (b->get_path (),
- binding_type_path.get ());
+ = get_predicate_from_bound (b->get_path (), binding_type_path);
if (!predicate.is_error ())
specified_bounds.push_back (std::move (predicate));
}
@@ -994,16 +1129,32 @@ ResolveWhereClauseItem::visit (HIR::TypeBoundWhereClauseItem &item)
// When we apply these bounds we must lookup which type this binding
// resolves to, as this is the type which will be used during resolution
// of the block.
- NodeId ast_node_id = binding_type_path->get_mappings ().get_nodeid ();
+ NodeId ast_node_id = binding_type_path.get_mappings ().get_nodeid ();
// then lookup the reference_node_id
NodeId ref_node_id = UNKNOWN_NODEID;
- if (!resolver->lookup_resolved_type (ast_node_id, &ref_node_id))
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ if (auto id = nr_ctx.lookup (ast_node_id))
+ ref_node_id = *id;
+ }
+ else
+ {
+ NodeId id = UNKNOWN_NODEID;
+
+ if (resolver->lookup_resolved_type (ast_node_id, &id))
+ ref_node_id = id;
+ }
+
+ if (ref_node_id == UNKNOWN_NODEID)
{
// FIXME
rust_error_at (UNDEF_LOCATION,
"Failed to lookup type reference for node: %s",
- binding_type_path->as_string ().c_str ());
+ binding_type_path.as_string ().c_str ());
return;
}
@@ -1016,7 +1167,7 @@ ResolveWhereClauseItem::visit (HIR::TypeBoundWhereClauseItem &item)
{
rust_error_at (mappings.lookup_location (*hid),
"Failed to resolve where-clause binding type: %s",
- binding_type_path->as_string ().c_str ());
+ binding_type_path.as_string ().c_str ());
return;
}
diff --git a/gcc/rust/typecheck/rust-hir-type-check-type.h b/gcc/rust/typecheck/rust-hir-type-check-type.h
index a440250..1da01b8 100644
--- a/gcc/rust/typecheck/rust-hir-type-check-type.h
+++ b/gcc/rust/typecheck/rust-hir-type-check-type.h
@@ -31,7 +31,7 @@ namespace Resolver {
class TypeCheckResolveGenericArguments : public TypeCheckBase
{
public:
- static HIR::GenericArgs resolve (HIR::TypePathSegment *segment);
+ static HIR::GenericArgs resolve (HIR::TypePathSegment &segment);
void visit (HIR::TypePathSegmentGeneric &generic);
@@ -46,7 +46,7 @@ private:
class TypeCheckType : public TypeCheckBase, public HIR::HIRTypeVisitor
{
public:
- static TyTy::BaseType *Resolve (HIR::Type *type);
+ static TyTy::BaseType *Resolve (HIR::Type &type);
void visit (HIR::BareFunctionType &fntype) override;
void visit (HIR::TupleType &tuple) override;
@@ -59,6 +59,7 @@ public:
void visit (HIR::InferredType &type) override;
void visit (HIR::NeverType &type) override;
void visit (HIR::TraitObjectType &type) override;
+ void visit (HIR::ParenthesisedType &type) override;
void visit (HIR::TypePathSegmentFunction &segment) override
{ /* TODO */
@@ -69,9 +70,6 @@ public:
void visit (HIR::ImplTraitType &type) override
{ /* TODO */
}
- void visit (HIR::ParenthesisedType &type) override
- { /* TODO */
- }
void visit (HIR::ImplTraitTypeOneBound &type) override
{ /* TODO */
}
@@ -82,13 +80,18 @@ private:
{}
TyTy::BaseType *resolve_root_path (HIR::TypePath &path, size_t *offset,
- NodeId *root_resolved_node_id);
+ NodeId *root_resolved_node_id,
+ bool *wasBigSelf);
TyTy::BaseType *resolve_segments (
NodeId root_resolved_node_id, HirId expr_id,
std::vector<std::unique_ptr<HIR::TypePathSegment>> &segments, size_t offset,
TyTy::BaseType *tyseg, const Analysis::NodeMapping &expr_mappings,
- location_t expr_locus);
+ location_t expr_locus, bool tySegIsBigSelf);
+
+ bool resolve_associated_type (const std::string &search,
+ TypeCheckBlockContextItem &ctx,
+ TyTy::BaseType **result);
TyTy::BaseType *translated;
};
@@ -96,7 +99,7 @@ private:
class TypeResolveGenericParam : public TypeCheckBase
{
public:
- static TyTy::ParamType *Resolve (HIR::GenericParam *param,
+ static TyTy::ParamType *Resolve (HIR::GenericParam &param,
bool apply_sized = true);
protected:
diff --git a/gcc/rust/typecheck/rust-hir-type-check.cc b/gcc/rust/typecheck/rust-hir-type-check.cc
index 45cb75d..a198ad3 100644
--- a/gcc/rust/typecheck/rust-hir-type-check.cc
+++ b/gcc/rust/typecheck/rust-hir-type-check.cc
@@ -19,10 +19,15 @@
#include "rust-hir-type-check.h"
#include "rust-hir-full.h"
#include "rust-hir-inherent-impl-overlap.h"
+#include "rust-hir-pattern.h"
#include "rust-hir-type-check-expr.h"
#include "rust-hir-type-check-item.h"
#include "rust-hir-type-check-pattern.h"
#include "rust-hir-type-check-struct-field.h"
+#include "rust-immutable-name-resolution-context.h"
+
+// for flag_name_resolution_2_0
+#include "options.h"
extern bool
saw_errors (void);
@@ -136,11 +141,10 @@ TyTy::BaseType *
TraitItemReference::get_type_from_constant (
/*const*/ HIR::TraitItemConst &constant) const
{
- TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ().get ());
+ TyTy::BaseType *type = TypeCheckType::Resolve (constant.get_type ());
if (constant.has_expr ())
{
- TyTy::BaseType *expr
- = TypeCheckExpr::Resolve (constant.get_expr ().get ());
+ TyTy::BaseType *expr = TypeCheckExpr::Resolve (constant.get_expr ());
return unify_site (constant.get_mappings ().get_hirid (),
TyTy::TyWithLocation (type),
@@ -181,7 +185,7 @@ TraitItemReference::get_type_from_fn (/*const*/ HIR::TraitItemFunc &fn) const
case HIR::GenericParam::GenericKind::TYPE: {
auto param_type
- = TypeResolveGenericParam::Resolve (generic_param.get ());
+ = TypeResolveGenericParam::Resolve (*generic_param);
context->insert_type (generic_param->get_mappings (),
param_type);
@@ -202,11 +206,10 @@ TraitItemReference::get_type_from_fn (/*const*/ HIR::TraitItemFunc &fn) const
TyTy::BaseType *ret_type = nullptr;
if (!function.has_return_type ())
- ret_type = TyTy::TupleType::get_unit_type (fn.get_mappings ().get_hirid ());
+ ret_type = TyTy::TupleType::get_unit_type ();
else
{
- auto resolved
- = TypeCheckType::Resolve (function.get_return_type ().get ());
+ auto resolved = TypeCheckType::Resolve (function.get_return_type ());
if (resolved->get_kind () == TyTy::TypeKind::ERROR)
{
rust_error_at (fn.get_locus (), "failed to resolve return type");
@@ -215,10 +218,11 @@ TraitItemReference::get_type_from_fn (/*const*/ HIR::TraitItemFunc &fn) const
ret_type = resolved->clone ();
ret_type->set_ref (
- function.get_return_type ()->get_mappings ().get_hirid ());
+ function.get_return_type ().get_mappings ().get_hirid ());
}
- std::vector<std::pair<HIR::Pattern *, TyTy::BaseType *> > params;
+ std::vector<TyTy::FnParam> params;
+
if (function.is_method ())
{
// these are implicit mappings and not used
@@ -232,16 +236,17 @@ TraitItemReference::get_type_from_fn (/*const*/ HIR::TraitItemFunc &fn) const
// for compilation to know parameter names. The types are ignored
// but we reuse the HIR identifier pattern which requires it
HIR::SelfParam &self_param = function.get_self ();
- HIR::IdentifierPattern *self_pattern = new HIR::IdentifierPattern (
- mapping, {"self"}, self_param.get_locus (), self_param.is_ref (),
- self_param.is_mut () ? Mutability::Mut : Mutability::Imm,
- std::unique_ptr<HIR::Pattern> (nullptr));
+ std::unique_ptr<HIR::Pattern> self_pattern
+ = std::make_unique<HIR::IdentifierPattern> (HIR::IdentifierPattern (
+ mapping, {"self"}, self_param.get_locus (), self_param.is_ref (),
+ self_param.is_mut () ? Mutability::Mut : Mutability::Imm,
+ std::unique_ptr<HIR::Pattern> (nullptr)));
// might have a specified type
TyTy::BaseType *self_type = nullptr;
if (self_param.has_type ())
{
- std::unique_ptr<HIR::Type> &specified_type = self_param.get_type ();
- self_type = TypeCheckType::Resolve (specified_type.get ());
+ HIR::Type &specified_type = self_param.get_type ();
+ self_type = TypeCheckType::Resolve (specified_type);
}
else
{
@@ -283,24 +288,38 @@ TraitItemReference::get_type_from_fn (/*const*/ HIR::TraitItemFunc &fn) const
}
context->insert_type (self_param.get_mappings (), self_type);
- params.push_back (
- std::pair<HIR::Pattern *, TyTy::BaseType *> (self_pattern, self_type));
+ params.push_back (TyTy::FnParam (std::move (self_pattern), self_type));
}
for (auto &param : function.get_function_params ())
{
// get the name as well required for later on
- auto param_tyty = TypeCheckType::Resolve (param.get_type ().get ());
- params.push_back (std::pair<HIR::Pattern *, TyTy::BaseType *> (
- param.get_param_name ().get (), param_tyty));
-
+ auto param_tyty = TypeCheckType::Resolve (param.get_type ());
context->insert_type (param.get_mappings (), param_tyty);
- TypeCheckPattern::Resolve (param.get_param_name ().get (), param_tyty);
+ TypeCheckPattern::Resolve (param.get_param_name (), param_tyty);
+ // FIXME: Should we take the name ? Use a shared pointer instead ?
+ params.push_back (
+ TyTy::FnParam (param.get_param_name ().clone_pattern (), param_tyty));
}
auto &mappings = Analysis::Mappings::get ();
- auto canonical_path
- = mappings.lookup_canonical_path (fn.get_mappings ().get_nodeid ());
+
+ tl::optional<CanonicalPath> canonical_path;
+ if (flag_name_resolution_2_0)
+ {
+ auto &nr_ctx
+ = Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
+
+ canonical_path
+ = nr_ctx.values.to_canonical_path (fn.get_mappings ().get_nodeid ());
+ }
+ else
+ {
+ canonical_path
+ = mappings.lookup_canonical_path (fn.get_mappings ().get_nodeid ());
+ }
+
+ rust_assert (canonical_path);
RustIdent ident{*canonical_path, fn.get_locus ()};
auto resolved = new TyTy::FnType (
diff --git a/gcc/rust/typecheck/rust-hir-type-check.h b/gcc/rust/typecheck/rust-hir-type-check.h
index fa49e06..ef1f2dd 100644
--- a/gcc/rust/typecheck/rust-hir-type-check.h
+++ b/gcc/rust/typecheck/rust-hir-type-check.h
@@ -22,6 +22,7 @@
#include "rust-hir-map.h"
#include "rust-tyty.h"
#include "rust-hir-trait-reference.h"
+#include "rust-stacked-contexts.h"
#include "rust-autoderef.h"
#include "rust-tyty-region.h"
#include "rust-tyty-variance-analysis.h"
@@ -42,7 +43,7 @@ public:
};
TypeCheckContextItem (HIR::Function *item);
- TypeCheckContextItem (HIR::ImplBlock *impl_block, HIR::Function *item);
+ TypeCheckContextItem (HIR::ImplBlock &impl_block, HIR::Function *item);
TypeCheckContextItem (HIR::TraitItemFunc *trait_item);
TypeCheckContextItem (const TypeCheckContextItem &other);
@@ -82,6 +83,37 @@ private:
Item item;
};
+class TypeCheckBlockContextItem
+{
+public:
+ enum ItemType
+ {
+ IMPL_BLOCK,
+ TRAIT
+ };
+
+ TypeCheckBlockContextItem (HIR::ImplBlock *block);
+ TypeCheckBlockContextItem (HIR::Trait *trait);
+
+ bool is_impl_block () const;
+ bool is_trait_block () const;
+
+ HIR::ImplBlock &get_impl_block ();
+ HIR::Trait &get_trait ();
+
+private:
+ union Item
+ {
+ HIR::ImplBlock *block;
+ HIR::Trait *trait;
+
+ Item (HIR::ImplBlock *block);
+ Item (HIR::Trait *trait);
+ };
+ ItemType type;
+ Item item;
+};
+
/**
* Interned lifetime representation in TyTy
*
@@ -135,6 +167,7 @@ public:
bool lookup_builtin (NodeId id, TyTy::BaseType **type);
bool lookup_builtin (std::string name, TyTy::BaseType **type);
void insert_builtin (HirId id, NodeId ref, TyTy::BaseType *type);
+ const std::vector<std::unique_ptr<TyTy::BaseType>> &get_builtins () const;
void insert_type (const Analysis::NodeMapping &mappings,
TyTy::BaseType *type);
@@ -153,6 +186,9 @@ public:
void push_return_type (TypeCheckContextItem item,
TyTy::BaseType *return_type);
void pop_return_type ();
+
+ StackedContexts<TypeCheckBlockContextItem> &block_context ();
+
void iterate (std::function<bool (HirId, TyTy::BaseType *)> cb);
bool have_loop_context () const;
@@ -244,6 +280,7 @@ private:
std::vector<std::pair<TypeCheckContextItem, TyTy::BaseType *>>
return_type_stack;
std::vector<TyTy::BaseType *> loop_type_stack;
+ StackedContexts<TypeCheckBlockContextItem> block_stack;
std::map<DefId, TraitReference> trait_context;
std::map<HirId, TyTy::BaseType *> receiver_context;
std::map<HirId, AssociatedImplTrait> associated_impl_traits;
diff --git a/gcc/rust/typecheck/rust-type-util.cc b/gcc/rust/typecheck/rust-type-util.cc
index 0ed7124..b758752 100644
--- a/gcc/rust/typecheck/rust-type-util.cc
+++ b/gcc/rust/typecheck/rust-type-util.cc
@@ -99,8 +99,9 @@ query_type (HirId reference, TyTy::BaseType **result)
auto block = mappings.lookup_hir_extern_block (extern_item->second);
rust_assert (block.has_value ());
- *result = TypeCheckTopLevelExternItem::Resolve (extern_item->first,
- *block.value ());
+ *result
+ = TypeCheckTopLevelExternItem::Resolve (*extern_item.value ().first,
+ *block.value ());
context->query_completed (reference);
return true;
}
diff --git a/gcc/rust/typecheck/rust-typecheck-context.cc b/gcc/rust/typecheck/rust-typecheck-context.cc
index 8f7a8a4..8ff8839 100644
--- a/gcc/rust/typecheck/rust-typecheck-context.cc
+++ b/gcc/rust/typecheck/rust-typecheck-context.cc
@@ -73,6 +73,12 @@ TypeCheckContext::insert_builtin (HirId id, NodeId ref, TyTy::BaseType *type)
builtins.push_back (std::unique_ptr<TyTy::BaseType> (type));
}
+const std::vector<std::unique_ptr<TyTy::BaseType>> &
+TypeCheckContext::get_builtins () const
+{
+ return builtins;
+}
+
void
TypeCheckContext::insert_type (const Analysis::NodeMapping &mappings,
TyTy::BaseType *type)
@@ -171,6 +177,12 @@ TypeCheckContext::peek_context ()
return return_type_stack.back ().first;
}
+StackedContexts<TypeCheckBlockContextItem> &
+TypeCheckContext::block_context ()
+{
+ return block_stack;
+}
+
void
TypeCheckContext::iterate (std::function<bool (HirId, TyTy::BaseType *)> cb)
{
@@ -640,9 +652,9 @@ TypeCheckContextItem::TypeCheckContextItem (HIR::Function *item)
: type (ItemType::ITEM), item (item)
{}
-TypeCheckContextItem::TypeCheckContextItem (HIR::ImplBlock *impl_block,
+TypeCheckContextItem::TypeCheckContextItem (HIR::ImplBlock &impl_block,
HIR::Function *item)
- : type (ItemType::IMPL_ITEM), item (impl_block, item)
+ : type (ItemType::IMPL_ITEM), item (&impl_block, item)
{}
TypeCheckContextItem::TypeCheckContextItem (HIR::TraitItemFunc *trait_item)
@@ -796,5 +808,43 @@ TypeCheckContextItem::get_defid () const
return UNKNOWN_DEFID;
}
+// TypeCheckBlockContextItem
+
+TypeCheckBlockContextItem::Item::Item (HIR::ImplBlock *b) : block (b) {}
+
+TypeCheckBlockContextItem::Item::Item (HIR::Trait *t) : trait (t) {}
+
+TypeCheckBlockContextItem::TypeCheckBlockContextItem (HIR::ImplBlock *block)
+ : type (TypeCheckBlockContextItem::ItemType::IMPL_BLOCK), item (block)
+{}
+
+TypeCheckBlockContextItem::TypeCheckBlockContextItem (HIR::Trait *trait)
+ : type (TypeCheckBlockContextItem::ItemType::TRAIT), item (trait)
+{}
+
+bool
+TypeCheckBlockContextItem::is_impl_block () const
+{
+ return type == IMPL_BLOCK;
+}
+
+bool
+TypeCheckBlockContextItem::is_trait_block () const
+{
+ return type == TRAIT;
+}
+
+HIR::ImplBlock &
+TypeCheckBlockContextItem::get_impl_block ()
+{
+ return *(item.block);
+}
+
+HIR::Trait &
+TypeCheckBlockContextItem::get_trait ()
+{
+ return *(item.trait);
+}
+
} // namespace Resolver
} // namespace Rust
diff --git a/gcc/rust/typecheck/rust-tyty-bounds.cc b/gcc/rust/typecheck/rust-tyty-bounds.cc
index b73e592..5db96cc 100644
--- a/gcc/rust/typecheck/rust-tyty-bounds.cc
+++ b/gcc/rust/typecheck/rust-tyty-bounds.cc
@@ -16,6 +16,7 @@
// along with GCC; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
+#include "rust-hir-full-decls.h"
#include "rust-hir-type-bounds.h"
#include "rust-hir-trait-resolve.h"
#include "rust-substitution-mapper.h"
@@ -70,7 +71,7 @@ TypeBoundsProbe::scan ()
if (!impl->has_trait_ref ())
return true;
- HirId impl_ty_id = impl->get_type ()->get_mappings ().get_hirid ();
+ HirId impl_ty_id = impl->get_type ().get_mappings ().get_hirid ();
TyTy::BaseType *impl_type = nullptr;
if (!query_type (impl_ty_id, &impl_type))
return true;
@@ -81,7 +82,7 @@ TypeBoundsProbe::scan ()
return true;
}
- possible_trait_paths.push_back ({impl->get_trait_ref ().get (), impl});
+ possible_trait_paths.push_back ({&impl->get_trait_ref (), impl});
return true;
});
@@ -182,9 +183,10 @@ TypeCheckBase::resolve_trait_path (HIR::TypePath &path)
}
TyTy::TypeBoundPredicate
-TypeCheckBase::get_predicate_from_bound (HIR::TypePath &type_path,
- HIR::Type *associated_self,
- BoundPolarity polarity)
+TypeCheckBase::get_predicate_from_bound (
+ HIR::TypePath &type_path,
+ tl::optional<std::reference_wrapper<HIR::Type>> associated_self,
+ BoundPolarity polarity)
{
TyTy::TypeBoundPredicate lookup = TyTy::TypeBoundPredicate::error ();
bool already_resolved
@@ -202,29 +204,29 @@ TypeCheckBase::get_predicate_from_bound (HIR::TypePath &type_path,
= HIR::GenericArgs::create_empty (type_path.get_locus ());
auto &final_seg = type_path.get_final_segment ();
- switch (final_seg->get_type ())
+ switch (final_seg.get_type ())
{
case HIR::TypePathSegment::SegmentType::GENERIC: {
- auto final_generic_seg
- = static_cast<HIR::TypePathSegmentGeneric *> (final_seg.get ());
- if (final_generic_seg->has_generic_args ())
+ auto &final_generic_seg
+ = static_cast<HIR::TypePathSegmentGeneric &> (final_seg);
+ if (final_generic_seg.has_generic_args ())
{
- args = final_generic_seg->get_generic_args ();
+ args = final_generic_seg.get_generic_args ();
}
}
break;
case HIR::TypePathSegment::SegmentType::FUNCTION: {
- auto final_function_seg
- = static_cast<HIR::TypePathSegmentFunction *> (final_seg.get ());
- auto &fn = final_function_seg->get_function_path ();
+ auto &final_function_seg
+ = static_cast<HIR::TypePathSegmentFunction &> (final_seg);
+ auto &fn = final_function_seg.get_function_path ();
// we need to make implicit generic args which must be an implicit
// Tuple
auto crate_num = mappings.get_current_crate ();
HirId implicit_args_id = mappings.get_next_hir_id ();
Analysis::NodeMapping mapping (crate_num,
- final_seg->get_mappings ().get_nodeid (),
+ final_seg.get_mappings ().get_nodeid (),
implicit_args_id, UNKNOWN_LOCAL_DEFID);
std::vector<std::unique_ptr<HIR::Type>> params_copy;
@@ -233,36 +235,34 @@ TypeCheckBase::get_predicate_from_bound (HIR::TypePath &type_path,
params_copy.push_back (p->clone_type ());
}
- HIR::TupleType *implicit_tuple
- = new HIR::TupleType (mapping, std::move (params_copy),
- final_seg->get_locus ());
-
std::vector<std::unique_ptr<HIR::Type>> inputs;
- inputs.push_back (std::unique_ptr<HIR::Type> (implicit_tuple));
+ inputs.push_back (
+ std::make_unique<HIR::TupleType> (mapping, std::move (params_copy),
+ final_seg.get_locus ()));
// resolve the fn_once_output type which assumes there must be an output
// set
rust_assert (fn.has_return_type ());
- TypeCheckType::Resolve (fn.get_return_type ().get ());
+ TypeCheckType::Resolve (fn.get_return_type ());
HIR::TraitItem *trait_item
= mappings
.lookup_trait_item_lang_item (LangItem::Kind::FN_ONCE_OUTPUT,
- final_seg->get_locus ())
+ final_seg.get_locus ())
.value ();
std::vector<HIR::GenericArgsBinding> bindings;
- location_t output_locus = fn.get_return_type ()->get_locus ();
+ location_t output_locus = fn.get_return_type ().get_locus ();
HIR::GenericArgsBinding binding (Identifier (
trait_item->trait_identifier ()),
- fn.get_return_type ()->clone_type (),
+ fn.get_return_type ().clone_type (),
output_locus);
bindings.push_back (std::move (binding));
args = HIR::GenericArgs ({} /* lifetimes */,
std::move (inputs) /* type_args*/,
std::move (bindings) /* binding_args*/,
- {} /* const_args */, final_seg->get_locus ());
+ {} /* const_args */, final_seg.get_locus ());
}
break;
@@ -271,11 +271,11 @@ TypeCheckBase::get_predicate_from_bound (HIR::TypePath &type_path,
break;
}
- if (associated_self != nullptr)
+ if (associated_self.has_value ())
{
std::vector<std::unique_ptr<HIR::Type>> type_args;
- type_args.push_back (
- std::unique_ptr<HIR::Type> (associated_self->clone_type ()));
+ type_args.push_back (std::unique_ptr<HIR::Type> (
+ associated_self.value ().get ().clone_type ()));
for (auto &arg : args.get_type_args ())
{
type_args.push_back (std::unique_ptr<HIR::Type> (arg->clone_type ()));
@@ -292,7 +292,7 @@ TypeCheckBase::get_predicate_from_bound (HIR::TypePath &type_path,
if (!args.is_empty () || predicate.requires_generic_args ())
{
// this is applying generic arguments to a trait reference
- predicate.apply_generic_arguments (&args, associated_self != nullptr);
+ predicate.apply_generic_arguments (&args, associated_self.has_value ());
}
context->insert_resolved_predicate (type_path.get_mappings ().get_hirid (),
diff --git a/gcc/rust/typecheck/rust-tyty-call.cc b/gcc/rust/typecheck/rust-tyty-call.cc
index ad3b2c3..2e0830e 100644
--- a/gcc/rust/typecheck/rust-tyty-call.cc
+++ b/gcc/rust/typecheck/rust-tyty-call.cc
@@ -80,7 +80,7 @@ TypeCheckCallExpr::visit (ADTType &type)
BaseType *field_tyty = field->get_field_type ();
location_t arg_locus = argument->get_locus ();
- BaseType *arg = Resolver::TypeCheckExpr::Resolve (argument.get ());
+ BaseType *arg = Resolver::TypeCheckExpr::Resolve (*argument);
if (arg->get_kind () == TyTy::TypeKind::ERROR)
{
rust_error_at (argument->get_locus (),
@@ -139,26 +139,19 @@ TypeCheckCallExpr::visit (FnType &type)
for (auto &argument : call.get_arguments ())
{
location_t arg_locus = argument->get_locus ();
- auto argument_expr_tyty
- = Resolver::TypeCheckExpr::Resolve (argument.get ());
- if (argument_expr_tyty->get_kind () == TyTy::TypeKind::ERROR)
- {
- rust_error_at (
- argument->get_locus (),
- "failed to resolve type for argument expr in CallExpr");
- return;
- }
+ auto argument_expr_tyty = Resolver::TypeCheckExpr::Resolve (*argument);
+ if (argument_expr_tyty->is<TyTy::ErrorType> ())
+ return;
// it might be a variadic function
if (i < type.num_params ())
{
- auto fnparam = type.param_at (i);
- HIR::Pattern *fn_param_pattern = fnparam.first;
- BaseType *param_ty = fnparam.second;
+ auto &fnparam = type.param_at (i);
+ BaseType *param_ty = fnparam.get_type ();
location_t param_locus
- = fn_param_pattern == nullptr
- ? mappings.lookup_location (param_ty->get_ref ())
- : fn_param_pattern->get_locus ();
+ = fnparam.has_pattern ()
+ ? fnparam.get_pattern ().get_locus ()
+ : mappings.lookup_location (param_ty->get_ref ());
HirId coercion_side_id = argument->get_mappings ().get_hirid ();
auto resolved_argument_type
@@ -272,8 +265,7 @@ TypeCheckCallExpr::visit (FnPtr &type)
{
location_t arg_locus = argument->get_locus ();
BaseType *fnparam = type.get_param_type_at (i);
- auto argument_expr_tyty
- = Resolver::TypeCheckExpr::Resolve (argument.get ());
+ auto argument_expr_tyty = Resolver::TypeCheckExpr::Resolve (*argument);
if (argument_expr_tyty->get_kind () == TyTy::TypeKind::ERROR)
{
rust_error_at (
@@ -322,8 +314,7 @@ TypeCheckMethodCallExpr::go (FnType *ref, HIR::MethodCallExpr &call,
std::vector<Argument> args;
for (auto &arg : call.get_arguments ())
{
- BaseType *argument_expr_tyty
- = Resolver::TypeCheckExpr::Resolve (arg.get ());
+ BaseType *argument_expr_tyty = Resolver::TypeCheckExpr::Resolve (*arg);
if (argument_expr_tyty->get_kind () == TyTy::TypeKind::ERROR)
{
rust_error_at (arg->get_locus (),
@@ -337,7 +328,7 @@ TypeCheckMethodCallExpr::go (FnType *ref, HIR::MethodCallExpr &call,
TypeCheckMethodCallExpr checker (call.get_mappings (), args,
call.get_locus (),
- call.get_receiver ()->get_locus (),
+ call.get_receiver ().get_locus (),
adjusted_self, context);
return checker.check (*ref);
}
@@ -377,13 +368,12 @@ TypeCheckMethodCallExpr::check (FnType &type)
{
location_t arg_locus = argument.get_locus ();
- auto fnparam = type.param_at (i);
- HIR::Pattern *fn_param_pattern = fnparam.first;
- BaseType *param_ty = fnparam.second;
+ auto &fnparam = type.param_at (i);
+ BaseType *param_ty = fnparam.get_type ();
location_t param_locus
- = fn_param_pattern == nullptr
- ? mappings.lookup_location (param_ty->get_ref ())
- : fn_param_pattern->get_locus ();
+ = fnparam.has_pattern ()
+ ? fnparam.get_pattern ().get_locus ()
+ : mappings.lookup_location (param_ty->get_ref ());
auto argument_expr_tyty = argument.get_argument_type ();
HirId coercion_side_id = argument.get_mappings ().get_hirid ();
diff --git a/gcc/rust/typecheck/rust-tyty-call.h b/gcc/rust/typecheck/rust-tyty-call.h
index 67cfe30..00ac655 100644
--- a/gcc/rust/typecheck/rust-tyty-call.h
+++ b/gcc/rust/typecheck/rust-tyty-call.h
@@ -73,14 +73,12 @@ private:
TypeCheckCallExpr (HIR::CallExpr &c, TyTy::VariantDef &variant,
Resolver::TypeCheckContext *context)
: resolved (new TyTy::ErrorType (c.get_mappings ().get_hirid ())), call (c),
- variant (variant), context (context),
- mappings (Analysis::Mappings::get ())
+ variant (variant), mappings (Analysis::Mappings::get ())
{}
BaseType *resolved;
HIR::CallExpr &call;
TyTy::VariantDef &variant;
- Resolver::TypeCheckContext *context;
Analysis::Mappings &mappings;
};
diff --git a/gcc/rust/typecheck/rust-tyty-cmp.h b/gcc/rust/typecheck/rust-tyty-cmp.h
index c384287..7088b58 100644
--- a/gcc/rust/typecheck/rust-tyty-cmp.h
+++ b/gcc/rust/typecheck/rust-tyty-cmp.h
@@ -735,8 +735,8 @@ public:
for (size_t i = 0; i < base->num_params (); i++)
{
- auto a = base->param_at (i).second;
- auto b = type.param_at (i).second;
+ auto a = base->param_at (i).get_type ();
+ auto b = type.param_at (i).get_type ();
if (!a->can_eq (b, emit_error_flag))
{
@@ -831,7 +831,7 @@ public:
for (size_t i = 0; i < base->num_params (); i++)
{
auto this_param = base->get_param_type_at (i);
- auto other_param = type.param_at (i).second;
+ auto other_param = type.param_at (i).get_type ();
if (!this_param->can_eq (other_param, emit_error_flag))
{
BaseCmp::visit (type);
diff --git a/gcc/rust/typecheck/rust-tyty-subst.cc b/gcc/rust/typecheck/rust-tyty-subst.cc
index a3ebf0a..a12ad91 100644
--- a/gcc/rust/typecheck/rust-tyty-subst.cc
+++ b/gcc/rust/typecheck/rust-tyty-subst.cc
@@ -630,12 +630,10 @@ SubstitutionRef::get_mappings_from_generic_args (
for (auto &binding : args.get_binding_args ())
{
BaseType *resolved
- = Resolver::TypeCheckType::Resolve (binding.get_type ().get ());
+ = Resolver::TypeCheckType::Resolve (binding.get_type ());
if (resolved == nullptr
|| resolved->get_kind () == TyTy::TypeKind::ERROR)
{
- rust_error_at (binding.get_locus (),
- "failed to resolve type arguments");
return SubstitutionArgumentMappings::error ();
}
@@ -698,10 +696,9 @@ SubstitutionRef::get_mappings_from_generic_args (
std::vector<SubstitutionArg> mappings = used_arguments.get_mappings ();
for (auto &arg : args.get_type_args ())
{
- BaseType *resolved = Resolver::TypeCheckType::Resolve (arg.get ());
+ BaseType *resolved = Resolver::TypeCheckType::Resolve (*arg);
if (resolved == nullptr || resolved->get_kind () == TyTy::TypeKind::ERROR)
{
- rust_error_at (args.get_locus (), "failed to resolve type arguments");
return SubstitutionArgumentMappings::error ();
}
diff --git a/gcc/rust/typecheck/rust-tyty.cc b/gcc/rust/typecheck/rust-tyty.cc
index e0a8745..f0c967e 100644
--- a/gcc/rust/typecheck/rust-tyty.cc
+++ b/gcc/rust/typecheck/rust-tyty.cc
@@ -18,6 +18,7 @@
#include "rust-tyty.h"
+#include "optional.h"
#include "rust-tyty-visitor.h"
#include "rust-hir-map.h"
#include "rust-location.h"
@@ -31,6 +32,7 @@
#include "rust-hir-type-bounds.h"
#include "options.h"
+#include "rust-system.h"
namespace Rust {
namespace TyTy {
@@ -593,9 +595,9 @@ BaseType::monomorphized_clone () const
}
else if (auto fn = x->try_as<const FnType> ())
{
- std::vector<std::pair<HIR::Pattern *, BaseType *>> cloned_params;
+ std::vector<TyTy::FnParam> cloned_params;
for (auto &p : fn->get_params ())
- cloned_params.push_back ({p.first, p.second->monomorphized_clone ()});
+ cloned_params.push_back (p.monomorphized_clone ());
BaseType *retty = fn->get_return_type ()->monomorphized_clone ();
return new FnType (fn->get_ref (), fn->get_ty_ref (), fn->get_id (),
@@ -686,7 +688,7 @@ BaseType::is_concrete () const
{
for (const auto &param : fn->get_params ())
{
- if (!param.second->is_concrete ())
+ if (!param.get_type ()->is_concrete ())
return false;
}
return fn->get_return_type ()->is_concrete ();
@@ -1341,9 +1343,10 @@ VariantDef::variant_type_string (VariantType type)
}
VariantDef::VariantDef (HirId id, DefId defid, std::string identifier,
- RustIdent ident, HIR::Expr *discriminant)
+ RustIdent ident,
+ tl::optional<std::unique_ptr<HIR::Expr>> &&discriminant)
: id (id), defid (defid), identifier (identifier), ident (ident),
- discriminant (discriminant)
+ discriminant (std::move (discriminant))
{
type = VariantType::NUM;
@@ -1352,41 +1355,22 @@ VariantDef::VariantDef (HirId id, DefId defid, std::string identifier,
VariantDef::VariantDef (HirId id, DefId defid, std::string identifier,
RustIdent ident, VariantType type,
- HIR::Expr *discriminant,
+ tl::optional<std::unique_ptr<HIR::Expr>> &&discriminant,
std::vector<StructFieldType *> fields)
: id (id), defid (defid), identifier (identifier), ident (ident), type (type),
- discriminant (discriminant), fields (fields)
+ discriminant (std::move (discriminant)), fields (fields)
{
rust_assert ((type == VariantType::NUM && fields.empty ())
|| (type == VariantType::TUPLE || type == VariantType::STRUCT));
}
-VariantDef::VariantDef (const VariantDef &other)
- : id (other.id), defid (other.defid), identifier (other.identifier),
- ident (other.ident), type (other.type), discriminant (other.discriminant),
- fields (other.fields)
-{}
-
-VariantDef &
-VariantDef::operator= (const VariantDef &other)
-{
- id = other.id;
- identifier = other.identifier;
- type = other.type;
- discriminant = other.discriminant;
- fields = other.fields;
- ident = other.ident;
-
- return *this;
-}
-
VariantDef &
VariantDef::get_error_node ()
{
static VariantDef node
= VariantDef (UNKNOWN_HIRID, UNKNOWN_DEFID, "",
{Resolver::CanonicalPath::create_empty (), UNKNOWN_LOCATION},
- nullptr);
+ tl::nullopt);
return node;
}
@@ -1475,18 +1459,31 @@ VariantDef::lookup_field (const std::string &lookup,
return false;
}
-HIR::Expr *
+HIR::Expr &
+VariantDef::get_discriminant ()
+{
+ return *discriminant.value ();
+}
+
+const HIR::Expr &
VariantDef::get_discriminant () const
{
- rust_assert (discriminant != nullptr);
- return discriminant;
+ return *discriminant.value ();
+}
+
+bool
+VariantDef::has_discriminant () const
+{
+ return discriminant.has_value ();
}
std::string
VariantDef::as_string () const
{
if (type == VariantType::NUM)
- return identifier + " = " + discriminant->as_string ();
+ return identifier
+ + (has_discriminant () ? " = " + get_discriminant ().as_string ()
+ : "");
std::string buffer;
for (size_t i = 0; i < fields.size (); ++i)
@@ -1533,8 +1530,13 @@ VariantDef::clone () const
for (auto &f : fields)
cloned_fields.push_back ((StructFieldType *) f->clone ());
- return new VariantDef (id, defid, identifier, ident, type, discriminant,
- cloned_fields);
+ auto &&discriminant_opt = has_discriminant ()
+ ? tl::optional<std::unique_ptr<HIR::Expr>> (
+ get_discriminant ().clone_expr ())
+ : tl::nullopt;
+
+ return new VariantDef (id, defid, identifier, ident, type,
+ std::move (discriminant_opt), cloned_fields);
}
VariantDef *
@@ -1544,8 +1546,13 @@ VariantDef::monomorphized_clone () const
for (auto &f : fields)
cloned_fields.push_back ((StructFieldType *) f->monomorphized_clone ());
- return new VariantDef (id, defid, identifier, ident, type, discriminant,
- cloned_fields);
+ auto discriminant_opt = has_discriminant ()
+ ? tl::optional<std::unique_ptr<HIR::Expr>> (
+ get_discriminant ().clone_expr ())
+ : tl::nullopt;
+
+ return new VariantDef (id, defid, identifier, ident, type,
+ std::move (discriminant_opt), cloned_fields);
}
const RustIdent &
@@ -1747,9 +1754,13 @@ TupleType::TupleType (HirId ref, HirId ty_ref, location_t locus,
{}
TupleType *
-TupleType::get_unit_type (HirId ref)
+TupleType::get_unit_type ()
{
- return new TupleType (ref, BUILTINS_LOCATION);
+ static TupleType *ret = nullptr;
+ if (ret == nullptr)
+ ret = new TupleType (Analysis::Mappings::get ().get_next_hir_id (),
+ BUILTINS_LOCATION);
+ return ret;
}
size_t
@@ -1891,9 +1902,9 @@ FnType::as_string () const
std::string params_str = "";
for (auto &param : params)
{
- auto pattern = param.first;
- auto ty = param.second;
- params_str += pattern->as_string () + " " + ty->as_string ();
+ auto &pattern = param.get_pattern ();
+ auto ty = param.get_type ();
+ params_str += pattern.as_string () + " " + ty->as_string ();
params_str += ",";
}
@@ -1914,7 +1925,7 @@ FnType::is_equal (const BaseType &other) const
if (get_kind () != other.get_kind ())
return false;
- auto other2 = static_cast<const FnType &> (other);
+ auto &other2 = static_cast<const FnType &> (other);
if (get_identifier ().compare (other2.get_identifier ()) != 0)
return false;
@@ -1948,8 +1959,8 @@ FnType::is_equal (const BaseType &other) const
for (size_t i = 0; i < num_params (); i++)
{
- auto lhs = param_at (i).second;
- auto rhs = other2.param_at (i).second;
+ auto lhs = param_at (i).get_type ();
+ auto rhs = other2.param_at (i).get_type ();
if (!lhs->is_equal (*rhs))
return false;
}
@@ -1959,9 +1970,9 @@ FnType::is_equal (const BaseType &other) const
BaseType *
FnType::clone () const
{
- std::vector<std::pair<HIR::Pattern *, BaseType *>> cloned_params;
+ std::vector<TyTy::FnParam> cloned_params;
for (auto &p : params)
- cloned_params.push_back ({p.first, p.second->clone ()});
+ cloned_params.push_back (p.clone ());
return new FnType (get_ref (), get_ty_ref (), get_id (), get_identifier (),
ident, flags, abi, std::move (cloned_params),
@@ -2035,7 +2046,7 @@ FnType::handle_substitions (SubstitutionArgumentMappings &subst_mappings)
for (auto &param : fn->get_params ())
{
- auto fty = param.second;
+ auto fty = param.get_type ();
bool is_param_ty = fty->get_kind () == TypeKind::PARAM;
if (is_param_ty)
@@ -2054,7 +2065,7 @@ FnType::handle_substitions (SubstitutionArgumentMappings &subst_mappings)
{
auto new_field = argt->clone ();
new_field->set_ref (fty->get_ref ());
- param.second = new_field;
+ param.set_type (new_field);
}
else
{
@@ -2078,7 +2089,7 @@ FnType::handle_substitions (SubstitutionArgumentMappings &subst_mappings)
auto new_field = concrete->clone ();
new_field->set_ref (fty->get_ref ());
- param.second = new_field;
+ param.set_type (new_field);
}
}
@@ -3539,7 +3550,17 @@ bool
PlaceholderType::can_resolve () const
{
auto context = Resolver::TypeCheckContext::get ();
- return context->lookup_associated_type_mapping (get_ty_ref (), nullptr);
+
+ BaseType *lookup = nullptr;
+ HirId mapping;
+
+ if (!context->lookup_associated_type_mapping (get_ty_ref (), &mapping))
+ return false;
+
+ if (!context->lookup_type (mapping, &lookup))
+ return false;
+
+ return lookup != nullptr;
}
BaseType *
diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h
index 3975029..a41837e 100644
--- a/gcc/rust/typecheck/rust-tyty.h
+++ b/gcc/rust/typecheck/rust-tyty.h
@@ -28,6 +28,7 @@
#include "rust-tyty-subst.h"
#include "rust-tyty-region.h"
#include "rust-system.h"
+#include "rust-hir.h"
namespace Rust {
@@ -447,7 +448,7 @@ public:
std::vector<TyVar> fields = std::vector<TyVar> (),
std::set<HirId> refs = std::set<HirId> ());
- static TupleType *get_unit_type (HirId ref);
+ static TupleType *get_unit_type ();
void accept_vis (TyVisitor &vis) override;
void accept_vis (TyConstVisitor &vis) const override;
@@ -567,16 +568,13 @@ public:
static std::string variant_type_string (VariantType type);
VariantDef (HirId id, DefId defid, std::string identifier, RustIdent ident,
- HIR::Expr *discriminant);
+ tl::optional<std::unique_ptr<HIR::Expr>> &&discriminant);
VariantDef (HirId id, DefId defid, std::string identifier, RustIdent ident,
- VariantType type, HIR::Expr *discriminant,
+ VariantType type,
+ tl::optional<std::unique_ptr<HIR::Expr>> &&discriminant,
std::vector<StructFieldType *> fields);
- VariantDef (const VariantDef &other);
-
- VariantDef &operator= (const VariantDef &other);
-
static VariantDef &get_error_node ();
bool is_error () const;
@@ -597,7 +595,10 @@ public:
bool lookup_field (const std::string &lookup, StructFieldType **field_lookup,
size_t *index) const;
- HIR::Expr *get_discriminant () const;
+ bool has_discriminant () const;
+
+ HIR::Expr &get_discriminant ();
+ const HIR::Expr &get_discriminant () const;
std::string as_string () const;
@@ -615,8 +616,10 @@ private:
std::string identifier;
RustIdent ident;
VariantType type;
+
// can either be a structure or a discriminant value
- HIR::Expr *discriminant;
+ tl::optional<std::unique_ptr<HIR::Expr>> discriminant;
+
std::vector<StructFieldType *> fields;
};
@@ -652,7 +655,7 @@ public:
std::vector<SubstitutionParamMapping> subst_refs,
SubstitutionArgumentMappings generic_arguments
= SubstitutionArgumentMappings::error (),
- RegionConstraints region_constraints = {},
+ RegionConstraints region_constraints = RegionConstraints{},
std::set<HirId> refs = std::set<HirId> ())
: BaseType (ref, ref, TypeKind::ADT, ident, refs),
SubstitutionRef (std::move (subst_refs), std::move (generic_arguments),
@@ -665,7 +668,7 @@ public:
std::vector<SubstitutionParamMapping> subst_refs,
SubstitutionArgumentMappings generic_arguments
= SubstitutionArgumentMappings::error (),
- RegionConstraints region_constraints = {},
+ RegionConstraints region_constraints = RegionConstraints{},
std::set<HirId> refs = std::set<HirId> ())
: BaseType (ref, ty_ref, TypeKind::ADT, ident, refs),
SubstitutionRef (std::move (subst_refs), std::move (generic_arguments),
@@ -678,7 +681,7 @@ public:
std::vector<SubstitutionParamMapping> subst_refs, ReprOptions repr,
SubstitutionArgumentMappings generic_arguments
= SubstitutionArgumentMappings::error (),
- RegionConstraints region_constraints = {},
+ RegionConstraints region_constraints = RegionConstraints{},
std::set<HirId> refs = std::set<HirId> ())
: BaseType (ref, ty_ref, TypeKind::ADT, ident, refs),
SubstitutionRef (std::move (subst_refs), std::move (generic_arguments),
@@ -767,6 +770,39 @@ private:
ReprOptions repr;
};
+class FnParam
+{
+public:
+ FnParam (std::unique_ptr<HIR::Pattern> pattern, BaseType *type)
+ : pattern (std::move (pattern)), type (type)
+ {}
+
+ FnParam (const FnParam &) = delete;
+ FnParam (FnParam &&) = default;
+ FnParam &operator= (FnParam &&) = default;
+
+ HIR::Pattern &get_pattern () { return *pattern; }
+ const HIR::Pattern &get_pattern () const { return *pattern; }
+
+ bool has_pattern () { return pattern != nullptr; }
+ BaseType *get_type () const { return type; }
+ void set_type (BaseType *new_type) { type = new_type; }
+
+ FnParam clone () const
+ {
+ return FnParam (pattern->clone_pattern (), type->clone ());
+ }
+
+ FnParam monomorphized_clone () const
+ {
+ return FnParam (pattern->clone_pattern (), type->monomorphized_clone ());
+ }
+
+private:
+ std::unique_ptr<HIR::Pattern> pattern;
+ BaseType *type;
+};
+
class FnType : public CallableTypeInterface, public SubstitutionRef
{
public:
@@ -778,9 +814,8 @@ public:
static const uint8_t FNTYPE_IS_VARADIC_FLAG = 0X04;
FnType (HirId ref, DefId id, std::string identifier, RustIdent ident,
- uint8_t flags, ABI abi,
- std::vector<std::pair<HIR::Pattern *, BaseType *>> params,
- BaseType *type, std::vector<SubstitutionParamMapping> subst_refs,
+ uint8_t flags, ABI abi, std::vector<FnParam> params, BaseType *type,
+ std::vector<SubstitutionParamMapping> subst_refs,
SubstitutionArgumentMappings substitution_argument_mappings,
RegionConstraints region_constraints,
std::set<HirId> refs = std::set<HirId> ())
@@ -795,8 +830,7 @@ public:
}
FnType (HirId ref, HirId ty_ref, DefId id, std::string identifier,
- RustIdent ident, uint8_t flags, ABI abi,
- std::vector<std::pair<HIR::Pattern *, BaseType *>> params,
+ RustIdent ident, uint8_t flags, ABI abi, std::vector<FnParam> params,
BaseType *type, std::vector<SubstitutionParamMapping> subst_refs,
SubstitutionArgumentMappings substitution_argument_mappings,
RegionConstraints region_constraints,
@@ -804,13 +838,16 @@ public:
: CallableTypeInterface (ref, ty_ref, TypeKind::FNDEF, ident, refs),
SubstitutionRef (std::move (subst_refs), substitution_argument_mappings,
region_constraints),
- params (params), type (type), flags (flags), identifier (identifier),
- id (id), abi (abi)
+ params (std::move (params)), type (type), flags (flags),
+ identifier (identifier), id (id), abi (abi)
{
LocalDefId local_def_id = id.localDefId;
rust_assert (local_def_id != UNKNOWN_LOCAL_DEFID);
}
+ FnType (const FnType &) = delete;
+ FnType (FnType &&) = default;
+
void accept_vis (TyVisitor &vis) override;
void accept_vis (TyConstVisitor &vis) const override;
@@ -844,28 +881,16 @@ public:
BaseType *get_self_type () const
{
rust_assert (is_method ());
- return param_at (0).second;
+ return param_at (0).get_type ();
}
- std::vector<std::pair<HIR::Pattern *, BaseType *>> &get_params ()
- {
- return params;
- }
+ std::vector<FnParam> &get_params () { return params; }
- const std::vector<std::pair<HIR::Pattern *, BaseType *>> &get_params () const
- {
- return params;
- }
+ const std::vector<FnParam> &get_params () const { return params; }
- std::pair<HIR::Pattern *, BaseType *> &param_at (size_t idx)
- {
- return params.at (idx);
- }
+ FnParam &param_at (size_t idx) { return params.at (idx); }
- const std::pair<HIR::Pattern *, BaseType *> &param_at (size_t idx) const
- {
- return params.at (idx);
- }
+ const FnParam &param_at (size_t idx) const { return params.at (idx); }
BaseType *clone () const final override;
@@ -882,7 +907,7 @@ public:
WARN_UNUSED_RESULT BaseType *get_param_type_at (size_t index) const override
{
- return param_at (index).second;
+ return param_at (index).get_type ();
}
WARN_UNUSED_RESULT BaseType *get_return_type () const override
@@ -891,7 +916,7 @@ public:
}
private:
- std::vector<std::pair<HIR::Pattern *, BaseType *>> params;
+ std::vector<FnParam> params;
BaseType *type;
uint8_t flags;
std::string identifier;
diff --git a/gcc/rust/typecheck/rust-unify.cc b/gcc/rust/typecheck/rust-unify.cc
index fa2308f..b779e7d 100644
--- a/gcc/rust/typecheck/rust-unify.cc
+++ b/gcc/rust/typecheck/rust-unify.cc
@@ -17,7 +17,6 @@
// <http://www.gnu.org/licenses/>.
#include "rust-unify.h"
-#include "rust-tyty.h"
namespace Rust {
namespace Resolver {
@@ -238,15 +237,6 @@ UnifyRules::go ()
}
}
- // The never type should always get coerced to the type it's being matched
- // against, so in that case, ltype. This avoids doing the same check in all
- // the `expect_*` functions.
- // However, this does not work if we have an annoying ltype - like INFER.
- // TODO: Is ltype == Infer the only special case here? What about projections?
- // references?
- if (rtype->get_kind () == TyTy::NEVER && ltype->get_kind () != TyTy::INFER)
- return ltype->clone ();
-
switch (ltype->get_kind ())
{
case TyTy::INFER:
@@ -929,8 +919,8 @@ UnifyRules::expect_fndef (TyTy::FnType *ltype, TyTy::BaseType *rtype)
for (size_t i = 0; i < ltype->num_params (); i++)
{
- auto a = ltype->param_at (i).second;
- auto b = type.param_at (i).second;
+ auto a = ltype->param_at (i).get_type ();
+ auto b = type.param_at (i).get_type ();
auto unified_param
= UnifyRules::Resolve (TyTy::TyWithLocation (a),
@@ -1069,7 +1059,7 @@ UnifyRules::expect_fnptr (TyTy::FnPtr *ltype, TyTy::BaseType *rtype)
for (size_t i = 0; i < ltype->num_params (); i++)
{
auto this_param = ltype->get_param_type_at (i);
- auto other_param = type.param_at (i).second;
+ auto other_param = type.param_at (i).get_type ();
auto unified_param
= UnifyRules::Resolve (TyTy::TyWithLocation (this_param),
diff --git a/gcc/rust/util/rust-attribute-values.h b/gcc/rust/util/rust-attribute-values.h
index ef01e67..9ef5cc5 100644
--- a/gcc/rust/util/rust-attribute-values.h
+++ b/gcc/rust/util/rust-attribute-values.h
@@ -29,6 +29,7 @@ public:
static constexpr auto &COLD = "cold";
static constexpr auto &CFG = "cfg";
static constexpr auto &CFG_ATTR = "cfg_attr";
+ static constexpr auto &DERIVE_ATTR = "derive";
static constexpr auto &DEPRECATED = "deprecated";
static constexpr auto &ALLOW = "allow";
static constexpr auto &ALLOW_INTERNAL_UNSTABLE = "allow_internal_unstable";
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc
index 958f7c3..03452c7 100644
--- a/gcc/rust/util/rust-attributes.cc
+++ b/gcc/rust/util/rust-attributes.cc
@@ -29,6 +29,15 @@
namespace Rust {
namespace Analysis {
+bool
+Attributes::is_known (const std::string &attribute_path)
+{
+ const auto &lookup
+ = BuiltinAttributeMappings::get ()->lookup_builtin (attribute_path);
+
+ return !lookup.is_error ();
+}
+
using Attrs = Values::Attributes;
// https://doc.rust-lang.org/stable/nightly-rustc/src/rustc_feature/builtin_attrs.rs.html#248
@@ -37,6 +46,7 @@ static const BuiltinAttrDefinition __definitions[]
{Attrs::COLD, CODE_GENERATION},
{Attrs::CFG, EXPANSION},
{Attrs::CFG_ATTR, EXPANSION},
+ {Attrs::DERIVE_ATTR, EXPANSION},
{Attrs::DEPRECATED, STATIC_ANALYSIS},
{Attrs::ALLOW, STATIC_ANALYSIS},
{Attrs::ALLOW_INTERNAL_UNSTABLE, STATIC_ANALYSIS},
diff --git a/gcc/rust/util/rust-attributes.h b/gcc/rust/util/rust-attributes.h
index 1345168..c928c8e 100644
--- a/gcc/rust/util/rust-attributes.h
+++ b/gcc/rust/util/rust-attributes.h
@@ -25,6 +25,12 @@
namespace Rust {
namespace Analysis {
+class Attributes
+{
+public:
+ static bool is_known (const std::string &attribute_path);
+};
+
enum CompilerPass
{
UNKNOWN,
diff --git a/gcc/rust/util/rust-common.h b/gcc/rust/util/rust-common.h
index 2033694..71637ce 100644
--- a/gcc/rust/util/rust-common.h
+++ b/gcc/rust/util/rust-common.h
@@ -21,7 +21,6 @@
#ifndef RUST_COMMON
#define RUST_COMMON
#include "rust-system.h"
-#include <string>
namespace Rust {
diff --git a/gcc/rust/util/rust-hir-map.cc b/gcc/rust/util/rust-hir-map.cc
index 03b3343..b94591e 100644
--- a/gcc/rust/util/rust-hir-map.cc
+++ b/gcc/rust/util/rust-hir-map.cc
@@ -459,7 +459,7 @@ Mappings::insert_hir_impl_block (HIR::ImplBlock *item)
auto id = item->get_mappings ().get_hirid ();
rust_assert (!lookup_hir_impl_block (id));
- HirId impl_type_id = item->get_type ()->get_mappings ().get_hirid ();
+ HirId impl_type_id = item->get_type ().get_mappings ().get_hirid ();
hirImplBlockMappings[id] = item;
hirImplBlockTypeMappings[impl_type_id] = item;
insert_node_to_hir (item->get_mappings ().get_nodeid (), id);
@@ -1241,6 +1241,9 @@ Mappings::lookup_builtin_marker ()
return builtinMarker;
}
+// FIXME: Before merging: Should we remove the `locus` parameter here? since
+// lang items are looked up mostly for code generation, it doesn't make sense to
+// error out on the locus of the node trying to access an inexistant lang item
DefId
Mappings::get_lang_item (LangItem::Kind item_type, location_t locus)
{
@@ -1258,5 +1261,53 @@ Mappings::lookup_trait_item_lang_item (LangItem::Kind item, location_t locus)
return lookup_trait_item_defid (trait_item_id);
}
+void
+Mappings::insert_lang_item (LangItem::Kind item_type, DefId id)
+{
+ auto it = lang_item_mappings.find (item_type);
+ rust_assert (it == lang_item_mappings.end ());
+
+ lang_item_mappings[item_type] = id;
+}
+
+tl::optional<DefId &>
+Mappings::lookup_lang_item (LangItem::Kind item_type)
+{
+ auto it = lang_item_mappings.find (item_type);
+ if (it == lang_item_mappings.end ())
+ return tl::nullopt;
+
+ return it->second;
+}
+
+void
+Mappings::insert_lang_item_node (LangItem::Kind item_type, NodeId node_id)
+{
+ auto it = lang_item_nodes.find (item_type);
+ rust_assert (it == lang_item_nodes.end ());
+
+ lang_item_nodes.insert ({item_type, node_id});
+}
+
+tl::optional<NodeId &>
+Mappings::lookup_lang_item_node (LangItem::Kind item_type)
+{
+ auto it = lang_item_nodes.find (item_type);
+ if (it == lang_item_nodes.end ())
+ return tl::nullopt;
+
+ return it->second;
+}
+
+NodeId
+Mappings::get_lang_item_node (LangItem::Kind item_type)
+{
+ if (auto lookup = lookup_lang_item_node (item_type))
+ return *lookup;
+
+ rust_fatal_error (UNKNOWN_LOCATION, "failed to find lang item %qs",
+ LangItem::ToString (item_type).c_str ());
+}
+
} // namespace Analysis
} // namespace Rust
diff --git a/gcc/rust/util/rust-hir-map.h b/gcc/rust/util/rust-hir-map.h
index bb7318e..21e5328 100644
--- a/gcc/rust/util/rust-hir-map.h
+++ b/gcc/rust/util/rust-hir-map.h
@@ -256,22 +256,12 @@ public:
return it->second;
}
- void insert_lang_item (LangItem::Kind item_type, DefId id)
- {
- auto it = lang_item_mappings.find (item_type);
- rust_assert (it == lang_item_mappings.end ());
-
- lang_item_mappings[item_type] = id;
- }
-
- tl::optional<DefId &> lookup_lang_item (LangItem::Kind item_type)
- {
- auto it = lang_item_mappings.find (item_type);
- if (it == lang_item_mappings.end ())
- return tl::nullopt;
+ void insert_lang_item (LangItem::Kind item_type, DefId id);
+ tl::optional<DefId &> lookup_lang_item (LangItem::Kind item_type);
- return it->second;
- }
+ void insert_lang_item_node (LangItem::Kind item_type, NodeId node_id);
+ tl::optional<NodeId &> lookup_lang_item_node (LangItem::Kind item_type);
+ NodeId get_lang_item_node (LangItem::Kind item_type);
// This will fatal_error when this lang item does not exist
DefId get_lang_item (LangItem::Kind item_type, location_t locus);
@@ -389,7 +379,12 @@ private:
std::map<HirId, HIR::GenericParam *> hirGenericParamMappings;
std::map<HirId, HIR::Trait *> hirTraitItemsToTraitMappings;
std::map<HirId, HIR::Pattern *> hirPatternMappings;
+
+ // We need to have two maps here, as lang-items need to be used for both AST
+ // passes and HIR passes. Thus those two maps are created at different times.
std::map<LangItem::Kind, DefId> lang_item_mappings;
+ std::map<LangItem::Kind, NodeId> lang_item_nodes;
+
std::map<NodeId, Resolver::CanonicalPath> paths;
std::map<NodeId, location_t> locations;
std::map<NodeId, HirId> nodeIdToHirMappings;
diff --git a/gcc/rust/util/rust-lang-item.cc b/gcc/rust/util/rust-lang-item.cc
index 5ddffaa..e038e90 100644
--- a/gcc/rust/util/rust-lang-item.cc
+++ b/gcc/rust/util/rust-lang-item.cc
@@ -62,6 +62,7 @@ const BiMap<std::string, LangItem::Kind> Rust::LangItem::lang_items = {{
{"copy", Kind::COPY},
{"clone", Kind::CLONE},
{"sized", Kind::SIZED},
+ {"sync", Kind::SYNC},
{"slice_alloc", Kind::SLICE_ALLOC},
{"slice_u8_alloc", Kind::SLICE_U8_ALLOC},
{"str_alloc", Kind::STR_ALLOC},
@@ -91,6 +92,15 @@ const BiMap<std::string, LangItem::Kind> Rust::LangItem::lang_items = {{
{"str", Kind::STR},
{"f32_runtime", Kind::F32_RUNTIME},
{"f64_runtime", Kind::F64_RUNTIME},
+
+ {"Some", Kind::OPTION_SOME},
+ {"None", Kind::OPTION_NONE},
+
+ {"into_iter", Kind::INTOITER_INTOITER},
+ {"next", Kind::ITERATOR_NEXT},
+
+ {"eq", Kind::EQ},
+ {"partial_ord", Kind::PARTIAL_ORD},
}};
tl::optional<LangItem::Kind>
@@ -108,6 +118,12 @@ LangItem::ToString (LangItem::Kind type)
return str.value ();
}
+std::string
+LangItem::PrettyString (LangItem::Kind type)
+{
+ return "#[lang = \"" + LangItem::ToString (type) + "\"]";
+}
+
LangItem::Kind
LangItem::OperatorToLangItem (ArithmeticOrLogicalOperator op)
{
@@ -139,6 +155,47 @@ LangItem::OperatorToLangItem (ArithmeticOrLogicalOperator op)
}
LangItem::Kind
+LangItem::ComparisonToLangItem (ComparisonOperator op)
+{
+ switch (op)
+ {
+ case ComparisonOperator::NOT_EQUAL:
+ case ComparisonOperator::EQUAL:
+ return LangItem::Kind::EQ;
+
+ case ComparisonOperator::GREATER_THAN:
+ case ComparisonOperator::LESS_THAN:
+ case ComparisonOperator::GREATER_OR_EQUAL:
+ case ComparisonOperator::LESS_OR_EQUAL:
+ return LangItem::Kind::PARTIAL_ORD;
+ }
+
+ rust_unreachable ();
+}
+
+std::string
+LangItem::ComparisonToSegment (ComparisonOperator op)
+{
+ switch (op)
+ {
+ case ComparisonOperator::NOT_EQUAL:
+ return "ne";
+ case ComparisonOperator::EQUAL:
+ return "eq";
+ case ComparisonOperator::GREATER_THAN:
+ return "gt";
+ case ComparisonOperator::LESS_THAN:
+ return "lt";
+ case ComparisonOperator::GREATER_OR_EQUAL:
+ return "ge";
+ case ComparisonOperator::LESS_OR_EQUAL:
+ return "le";
+ }
+
+ rust_unreachable ();
+}
+
+LangItem::Kind
LangItem::CompoundAssignmentOperatorToLangItem (ArithmeticOrLogicalOperator op)
{
switch (op)
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index 951e4a3..f947f3f 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -23,12 +23,15 @@
namespace Rust {
-// https://github.com/rust-lang/rust/blob/master/library/core/src/ops/arith.rs
class LangItem
{
public:
+ // FIXME: We should clean up that enum to make it more inline with the list of
+ // lang-items in Rust 1.49
+ // https://github.com/rust-lang/rust/blob/1.49.0/compiler/rustc_hir/src/lang_items.rs
enum class Kind
{
+ // https://github.com/rust-lang/rust/blob/master/library/core/src/ops/arith.rs
ADD,
SUBTRACT,
MULTIPLY,
@@ -42,6 +45,8 @@ public:
NEGATION,
NOT,
+ EQ,
+ PARTIAL_ORD,
ADD_ASSIGN,
SUB_ASSIGN,
@@ -82,6 +87,7 @@ public:
COPY,
CLONE,
SIZED,
+ SYNC,
// https://github.com/Rust-GCC/gccrs/issues/1896
// https://github.com/rust-lang/rust/commit/afbecc0f68c4dcfc4878ba5bcb1ac942544a1bdc
@@ -116,16 +122,26 @@ public:
STR,
F32_RUNTIME,
F64_RUNTIME,
+
+ OPTION_SOME,
+ OPTION_NONE,
+
+ INTOITER_INTOITER,
+ ITERATOR_NEXT,
};
static const BiMap<std::string, Kind> lang_items;
static tl::optional<Kind> Parse (const std::string &item);
static std::string ToString (Kind type);
+ static std::string PrettyString (Kind type);
static Kind OperatorToLangItem (ArithmeticOrLogicalOperator op);
static Kind
CompoundAssignmentOperatorToLangItem (ArithmeticOrLogicalOperator op);
static Kind NegationOperatorToLangItem (NegationOperator op);
+ static Kind ComparisonToLangItem (ComparisonOperator op);
+
+ static std::string ComparisonToSegment (ComparisonOperator op);
};
} // namespace Rust
diff --git a/gcc/rust/util/rust-operators.h b/gcc/rust/util/rust-operators.h
index 608e771..02b1820 100644
--- a/gcc/rust/util/rust-operators.h
+++ b/gcc/rust/util/rust-operators.h
@@ -43,10 +43,10 @@ enum class ComparisonOperator
{
EQUAL, // std::cmp::PartialEq::eq
NOT_EQUAL, // std::cmp::PartialEq::ne
- GREATER_THAN, // std::cmp::PartialEq::gt
- LESS_THAN, // std::cmp::PartialEq::lt
- GREATER_OR_EQUAL, // std::cmp::PartialEq::ge
- LESS_OR_EQUAL // std::cmp::PartialEq::le
+ GREATER_THAN, // std::cmp::PartialOrd::gt
+ LESS_THAN, // std::cmp::PartialOrd::lt
+ GREATER_OR_EQUAL, // std::cmp::PartialOrd::ge
+ LESS_OR_EQUAL // std::cmp::PartialOrd::le
};
enum class LazyBooleanOperator
diff --git a/gcc/rust/util/rust-stacked-contexts.h b/gcc/rust/util/rust-stacked-contexts.h
index 39a0c08..fe0bc8a 100644
--- a/gcc/rust/util/rust-stacked-contexts.h
+++ b/gcc/rust/util/rust-stacked-contexts.h
@@ -71,6 +71,13 @@ public:
return last;
}
+ const T &peek ()
+ {
+ rust_assert (!stack.empty ());
+
+ return stack.back ();
+ }
+
/**
* Are we currently inside of a special context?
*/
diff --git a/gcc/rust/util/rust-token-converter.cc b/gcc/rust/util/rust-token-converter.cc
index 220e891..fc34adb 100644
--- a/gcc/rust/util/rust-token-converter.cc
+++ b/gcc/rust/util/rust-token-converter.cc
@@ -18,8 +18,7 @@
#include "rust-token-converter.h"
#include "bi-map.h"
#include "line-map.h"
-
-#include <string>
+#include "rust-system.h"
namespace Rust {
diff --git a/gcc/rust/util/rust-token-converter.h b/gcc/rust/util/rust-token-converter.h
index 0498041..5405d6e 100644
--- a/gcc/rust/util/rust-token-converter.h
+++ b/gcc/rust/util/rust-token-converter.h
@@ -17,7 +17,7 @@
#ifndef RUST_TOKEN_CONVERTER_H
#define RUST_TOKEN_CONVERTER_H
-#include <vector>
+#include "rust-system.h"
#include "rust-token.h"
#include "libproc_macro_internal/proc_macro.h"
diff --git a/gcc/sym-exec/sym-exec-state.cc b/gcc/sym-exec/sym-exec-state.cc
index fb7495a..d5cbb73 100644
--- a/gcc/sym-exec/sym-exec-state.cc
+++ b/gcc/sym-exec/sym-exec-state.cc
@@ -265,7 +265,7 @@ state::check_args_compatibility (tree arg1, tree arg2, tree dest)
|| TREE_CODE (arg2) == INTEGER_CST))
{
if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, "Sym-Exec: Incompatible destination"
+ fprintf (dump_file, "Sym-Exec: Incompatible destination "
"and argument sizes.\n");
return false;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5cf9f3d..131f605 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,511 @@
+2025-03-23 Nathaniel Shead <nathanieloshead@gmail.com>
+
+ PR c++/119154
+ * g++.dg/modules/pr119154_a.C: Move to...
+ * g++.dg/modules/gnu-inline-1_a.C: ...here, and add decl.
+ * g++.dg/modules/pr119154_b.C: Move to...
+ * g++.dg/modules/gnu-inline-1_b.C: here, and add check.
+ * g++.dg/modules/gnu-inline-1_c.C: New test.
+ * g++.dg/modules/gnu-inline-1_d.C: New test.
+ * g++.dg/modules/gnu-inline-2_a.C: New test.
+ * g++.dg/modules/gnu-inline-2_b.C: New test.
+ * g++.dg/modules/extern-tpl-3_a.C: New test.
+ * g++.dg/modules/extern-tpl-3_b.C: New test.
+ * g++.dg/modules/extern-tpl-4_a.H: New test.
+ * g++.dg/modules/extern-tpl-4_b.C: New test.
+ * g++.dg/modules/extern-tpl-4_c.C: New test.
+
+2025-03-23 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ PR d/117621
+ * gdc.dg/pr117621.d: New test.
+
+2025-03-22 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/119421
+ * gcc.target/avr/torture/pr119421-sreg.c: New test.
+
+2025-03-22 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/119379
+ * g++.dg/cpp2a/class-deduction-alias24.C: New test.
+
+2025-03-21 Surya Kumari Jangala <jskumari@linux.ibm.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/116028
+ PR rtl-optimization/118615
+ * gcc.dg/ira-shrinkwrap-prep-1.c: Remove xfail for powerpc.
+ * gcc.dg/pr10474.c: Remove xfail for powerpc and arm.
+ * gcc.dg/pr118615.c: New test.
+
+2025-03-21 Patrick Palka <ppalka@redhat.com>
+
+ PR c++/119378
+ * g++.dg/template/friend85.C: New test.
+
+2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ * c-c++-common/gomp/interop-1.c: Remove dg-prune-output "sorry".
+ * c-c++-common/gomp/interop-2.c: Likewise.
+ * c-c++-common/gomp/interop-3.c: Likewise.
+ * c-c++-common/gomp/interop-4.c: Remove dg-message "not supported".
+ * g++.dg/gomp/interop-5.C: Likewise.
+ * gfortran.dg/gomp/interop-4.f90: Likewise.
+ * c-c++-common/gomp/interop-5.c: New test.
+ * gfortran.dg/gomp/interop-5.f90: New test.
+
+2025-03-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/114992
+ * g++.target/i386/mangling-alias1.C: New test.
+
+2025-03-21 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/85836
+ * gfortran.dg/reduce_1.f90: New test
+ * gfortran.dg/reduce_2.f90: New test
+
+2025-03-21 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/91614
+ * gcc.target/arm/unaligned-memcpy-1.c: Make the test executable.
+ Only scan for the absence of instructions that cannot access
+ misaligned data. Remove constraint of having unaligned accesses.
+ * gcc.target/arm/unaligned-memcpy-2.c: Likewise.
+ * gcc.target/arm/unaligned-memcpy-3.c: Likewise.
+ * gcc.target/arm/unaligned-memcpy-4.c: Likewise.
+
+2025-03-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.target/arm/memcpy-aligned-1.c: Require unaligned accesses.
+
+2025-03-21 Thomas Schwinge <tschwinge@baylibre.com>
+
+ * g++.target/nvptx/alias-g++.dg_init_dtor2-2.C: New.
+
+2025-03-21 Thomas Schwinge <tschwinge@baylibre.com>
+
+ * gcc.target/nvptx/alias-unsupported-1.c: New.
+
+2025-03-21 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/119380
+ * gfortran.dg/proc_ptr_comp_54.f90: New test.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/nr2/exclude: Add failing lang item typepaths tests.
+ * rust/execute/torture/derive_macro4.rs: Mark Clone as lang item.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/nr2/exclude:
+ * rust/compile/derive_clone_enum1.rs: New test.
+ * rust/compile/derive_clone_enum2.rs: New test.
+ * rust/compile/derive_clone_enum3.rs: New test.
+ * rust/execute/torture/derive_clone_enum1.rs: New test.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/derive_macro4.rs: Mark Copy and Clone as lang items.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/derive_macro4.rs: Make PhantomData a lang item.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/derive_macro1.rs: Add #[lang = "clone"] to Clone trait.
+ * rust/compile/derive_macro3.rs: Likewise.
+ * rust/compile/derive_macro6.rs: Likewise.
+ * rust/execute/torture/derive_macro3.rs: Likewise.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-3350.rs: New test.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/macros/builtin/eager1.rs: Switch to scan-assembler directive as the
+ GIMPLE dump does not contain strings on LE.
+ * rust/compile/macros/builtin/recurse2.rs: Likewise.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/issue-1446.rs: Add swap_bytes function.
+ * rust/compile/iterators1.rs: Remove unused {to, from}_le functions.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/execute/torture/builtin_macro_include_bytes.rs: needs mut
+ * rust/compile/mutability_checks1.rs: New test.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 liushuyu <liushuyu011@gmail.com>
+
+ * rust/compile/try-catch-unwind-old.rs: add a test to test the older
+ try intrinsics from plain old Rust to v1.78.0
+ * rust/compile/try-catch-unwind-new.rs: add a test to test the newer
+ catch_unwind instrinsics since Rust v1.78.0
+
+2025-03-21 Nobel <nobel2073@gmail.com>
+
+ * rust/compile/cast_float_as_integer.rs: New test.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/cmp1.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-3046.rs: remove old error message
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/issue-3140.rs: New test.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/auto_traits2.rs: New test.
+ * rust/compile/auto_traits3.rs: New test.
+ * rust/compile/nr2/exclude: Add auto_traits2 test.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/auto_traits1.rs: New test.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Liam Naddell <liamnprg@gmail.com>
+
+ * rust/compile/issue-3304.rs:
+ Add small test for generics+enums combination for NR2.0
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/nr2/exclude: Exclude additional-trait-bounds2 for different error message.
+ * rust/compile/additional-trait-bounds1.rs: New test.
+ * rust/compile/additional-trait-bounds2.rs: New test.
+ * rust/compile/additional-trait-bounds2nr2.rs: New test.
+
+2025-03-21 Arthur Cohen <arthur.cohen@embecosm.com>
+
+ * rust/compile/multiline-string.rs: New test.
+ * rust/execute/torture/multiline-string.rs: New test.
+
+2025-03-21 Nobel <nobel2073@gmail.com>
+
+ * rust/compile/ptr_int_cast.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2847.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/issue-266.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-2394.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1525.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 can't handle this
+ * rust/compile/issue-2423.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-3261.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/issue-2907.rs: New test.
+
+2025-03-21 Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+
+ * rust/compile/nr2/exclude: Remove passing tests from exclude list.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/exhaustiveness1.rs: remove bad check
+ * rust/compile/issue-2567-1.rs: New test.
+ * rust/compile/issue-2567-2.rs: New test.
+ * rust/compile/issue-2567-3.rs: New test.
+ * rust/compile/issue-3231.rs: New test.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/issue-2905-1.rs: New test.
+ * rust/compile/issue-2905-2.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/issue-1773.rs: new test case
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/issue-3242.rs: old test ranamed to match issue.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+ * rust/link/generic_function_0.rs: No longer expect failure.
+ * rust/link/trait_import_0.rs: Likewise.
+ * rust/link/trait_import_1.rs
+ (trait Sized): Add.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 cant handle these
+ * rust/compile/issue-2953-1.rs: New test.
+ * rust/compile/issue-2953-2.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/issue-2323.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/issue-3009.rs: New test.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr can't handle this
+ * rust/compile/issue-3033.rs: New test.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Marc PoulhiĂšs <dkm@kataplop.net>
+
+ * rust/compile/if_let_expr.rs: Adjust.
+ * rust/compile/if_let_expr_simple.rs: New test.
+ * rust/compile/iflet.rs: New test.
+ * rust/execute/torture/iflet.rs: New test.
+ * rust/compile/nr2/exclude: Add iflet.rs and if_let_expr_simple.rs
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/compile.exp: Handle paths using "file join"
+ and "file split".
+ * rust/compile/nr2/exclude: Remove debug-diagnostics-on.rs.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Add trailing newline along with
+ comment.
+
+2025-03-21 Owen Avery <powerboat9.gamer@gmail.com>
+
+ * rust/compile/nr2/exclude: Remove entries.
+
+2025-03-21 Philip Herron <herron.philip@googlemail.com>
+
+ * rust/compile/nr2/exclude: nr2 cant handle this
+ * rust/compile/issue-3032-1.rs: New test.
+ * rust/compile/issue-3032-2.rs: New test.
+
+2025-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/119376
+ * c-c++-common/musttail27.c: New test.
+
+2025-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/119376
+ * g++.dg/opt/musttail1.C: New test.
+
+2025-03-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/119376
+ * c-c++-common/musttail26.c: New test.
+
+2025-03-21 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/119349
+ * gfortran.dg/class_79.f90: New test.
+
+2025-03-20 Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
+
+ Revert:
+ 2025-03-20 Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
+
+ * gcc.target/s390/20020926-1.c: Deal with deprecation warning.
+ * gcc.target/s390/dwarfregtable-1.c: Ditto.
+ * gcc.target/s390/fp2int1.c: Ditto.
+ * gcc.target/s390/pr102222.c: Ditto.
+ * gcc.target/s390/pr106355-3.c: Ditto.
+ * gcc.target/s390/pr61078.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-10.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-12.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-14.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-18.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-2.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-20.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-22.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-24.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-26.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-28.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-30.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-32.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-4.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-6.c: Ditto.
+ * gcc.target/s390/target-attribute/tattr-m31-8.c: Ditto.
+
+2025-03-20 Hu, Lin1 <lin1.hu@intel.com>
+
+ * gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c: Fix testcase.
+ * gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c: Ditto.
+
+2025-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/119370
+ * g++.dg/gomp/pr119370.C: New test.
+
+2025-03-20 liuhongt <hongtao.liu@intel.com>
+
+ * gcc.target/i386/pr117452.c: New test.
+
+2025-03-20 Hu, Lin1 <lin1.hu@intel.com>
+
+ * gcc.target/i386/avx10_2-512-satcvt-1.c: Modify intrinsic name.
+ * gcc.target/i386/avx10_2-512-vcvtbf162ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtbf162iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttbf162ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttbf162iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-satcvt-1.c: Ditto.
+ * gcc.target/i386/avx10_2-vcvttsd2sis-2.c: Ditto.
+ * gcc.target/i386/avx10_2-vcvttsd2usis-2.c: Ditto.
+ * gcc.target/i386/avx10_2-vcvttss2sis-2.c: Ditto.
+ * gcc.target/i386/avx10_2-vcvttss2usis-2.c: Ditto.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/sse-22.c: Ditto.
+
+2025-03-20 Hu, Lin1 <lin1.hu@intel.com>
+
+ * gcc.target/i386/avx10_2-512-satcvt-1.c: Add testcase.
+ * gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c: Ditto
+ * gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c: Ditto
+ * gcc.target/i386/avx10_2-satcvt-1.c: Ditto
+ * gcc.target/i386/avx10_2-vcvttsd2sis-2.c: Ditto
+ * gcc.target/i386/avx10_2-vcvttsd2usis-2.c: Ditto
+ * gcc.target/i386/avx10_2-vcvttss2sis-2.c: Ditto
+ * gcc.target/i386/avx10_2-vcvttss2usis-2.c: Ditto
+ * gcc.target/i386/avx10_2-vcvtps2iubs-2.c: New file.
+
+2025-03-20 Hu, Lin1 <lin1.hu@intel.com>
+
+ * gcc.target/i386/avx10_2-512-satcvt-1.c: Modify intrin name.
+ * gcc.target/i386/avx10_2-512-vcvtbf162ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtbf162iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttbf162ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttbf162iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c: Ditto.
+ * gcc.target/i386/avx10_2-satcvt-1.c: Ditto.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/sse-22.c: Ditto.
+
2025-03-19 Harald Anlauf <anlauf@gmx.de>
PR fortran/116706
diff --git a/gcc/testsuite/c-c++-common/gomp/interop-1.c b/gcc/testsuite/c-c++-common/gomp/interop-1.c
index de3a4ba..d68611b 100644
--- a/gcc/testsuite/c-c++-common/gomp/interop-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/interop-1.c
@@ -2,8 +2,6 @@
/* { dg-additional-options "-std=c23" { target c } } */
/* C++11 and C23 because of 'constexpr'. */
-/* { dg-prune-output "sorry, unimplemented: '#pragma omp interop' not yet supported" } */
-
/* The following definitions are in omp_lib, which cannot be included
in gcc/testsuite/ */
diff --git a/gcc/testsuite/c-c++-common/gomp/interop-2.c b/gcc/testsuite/c-c++-common/gomp/interop-2.c
index 57fd688d..af81cc6 100644
--- a/gcc/testsuite/c-c++-common/gomp/interop-2.c
+++ b/gcc/testsuite/c-c++-common/gomp/interop-2.c
@@ -2,8 +2,6 @@
/* { dg-additional-options "-std=c23" { target c } } */
/* C++11 and C23 because of 'constexpr'. */
-/* { dg-prune-output "sorry, unimplemented: '#pragma omp interop' not yet supported" } */
-
/* The following definitions are in omp_lib, which cannot be included
in gcc/testsuite/ */
diff --git a/gcc/testsuite/c-c++-common/gomp/interop-3.c b/gcc/testsuite/c-c++-common/gomp/interop-3.c
index 42478bf..51d26dd 100644
--- a/gcc/testsuite/c-c++-common/gomp/interop-3.c
+++ b/gcc/testsuite/c-c++-common/gomp/interop-3.c
@@ -1,5 +1,3 @@
-/* { dg-prune-output "sorry, unimplemented: '#pragma omp interop' not yet supported" } */
-
/* The following definitions are in omp_lib, which cannot be included
in gcc/testsuite/ */
diff --git a/gcc/testsuite/c-c++-common/gomp/interop-4.c b/gcc/testsuite/c-c++-common/gomp/interop-4.c
index 1f9c987..bb0bf31 100644
--- a/gcc/testsuite/c-c++-common/gomp/interop-4.c
+++ b/gcc/testsuite/c-c++-common/gomp/interop-4.c
@@ -33,18 +33,18 @@ f()
omp_interop_t obj1, obj2, obj3, obj4, obj5, obj6, obj7;
int x[6];
- #pragma omp interop init ( obj1, obj2) use (obj3) destroy(obj4) init(obj5) destroy(obj6) use(obj7) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop init ( obj1, obj2) use (obj3) destroy(obj4) init(obj5) destroy(obj6) use(obj7)
/* { dg-final { scan-tree-dump-times "#pragma omp interop use\\(obj7\\) destroy\\(obj6\\) init\\(obj5\\) destroy\\(obj4\\) use\\(obj3\\) init\\(obj2\\) init\\(obj1\\)\[\r\n\]" 1 "original" } } */
- #pragma omp interop nowait init (targetsync : obj1, obj2) use (obj3) destroy(obj4) init(target, targetsync : obj5) destroy(obj6) use(obj7) depend(inout: x) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop nowait init (targetsync : obj1, obj2) use (obj3) destroy(obj4) init(target, targetsync : obj5) destroy(obj6) use(obj7) depend(inout: x)
/* { dg-final { scan-tree-dump-times "#pragma omp interop depend\\(inout:x\\) use\\(obj7\\) destroy\\(obj6\\) init\\(target, targetsync: obj5\\) destroy\\(obj4\\) use\\(obj3\\) init\\(targetsync: obj2\\) init\\(targetsync: obj1\\) nowait\[\r\n\]" 1 "original" } } */
- #pragma omp interop init ( obj1, obj2) init (target: obj3) init(targetsync : obj4) init(target,targetsync: obj5) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop init ( obj1, obj2) init (target: obj3) init(targetsync : obj4) init(target,targetsync: obj5)
/* { dg-final { scan-tree-dump-times "#pragma omp interop init\\(target, targetsync: obj5\\) init\\(targetsync: obj4\\) init\\(target: obj3\\) init\\(obj2\\) init\\(obj1\\)\[\r\n\]" 1 "original" } } */
/* -------------------------------------------- */
- #pragma omp interop init (target, prefer_type(omp_ifr_cuda, omp_ifr_cuda+1, "hsa", "myPrivateInterop", omp_ifr_cuda-2) : obj1, obj2) init (target: obj3) init(prefer_type(omp_ifr_hip, "sycl", omp_ifr_opencl), targetsync : obj4, obj7) init(target,prefer_type("level_zero", omp_ifr_level_zero+0),targetsync: obj5) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop init (target, prefer_type(omp_ifr_cuda, omp_ifr_cuda+1, "hsa", "myPrivateInterop", omp_ifr_cuda-2) : obj1, obj2) init (target: obj3) init(prefer_type(omp_ifr_hip, "sycl", omp_ifr_opencl), targetsync : obj4, obj7) init(target,prefer_type("level_zero", omp_ifr_level_zero+0),targetsync: obj5)
/*
{ dg-warning "unknown foreign runtime identifier 'myPrivateInterop' \\\[-Wopenmp\\\]" "" { target *-*-* } .-2 }
{ dg-warning "unknown foreign runtime identifier '-1' \\\[-Wopenmp\\\]" "" { target *-*-* } .-3 }
@@ -55,7 +55,7 @@ f()
/* -------------------------------------------- */
- #pragma omp interop init ( target, prefer_type( {fr("hip"), attr("ompx_gnu_prio:1", "ompx_gnu_debug")}, {attr("ompx_gnu_nicest"), attr("ompx_something")}) : obj1, obj2) init ( prefer_type( {fr("cuda")}, {fr(omp_ifr_cuda_driver), attr("ompx_nix")}, {fr("best")}), targetsync : obj3, obj4) nowait use(obj5) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop init ( target, prefer_type( {fr("hip"), attr("ompx_gnu_prio:1", "ompx_gnu_debug")}, {attr("ompx_gnu_nicest"), attr("ompx_something")}) : obj1, obj2) init ( prefer_type( {fr("cuda")}, {fr(omp_ifr_cuda_driver), attr("ompx_nix")}, {fr("best")}), targetsync : obj3, obj4) nowait use(obj5)
/*
{ dg-warning "unknown foreign runtime identifier 'best' \\\[-Wopenmp\\\]" "" { target *-*-* } .-2 }
@@ -69,7 +69,7 @@ g (int *y)
{
omp_interop_t io1, io2, io3, io4, io5;
- [[omp::directive (interop,init(prefer_type({fr("level_zero")}, {fr(omp_ifr_sycl),attr("ompx_in_order"),attr("ompx_queue:in_order")}), targetsync : io1, io2),use(io3),destroy(io4,io5),depend(inout:y),nowait)]]; /* { dg-message "'#pragma omp interop' not yet supported" } */
+ [[omp::directive (interop,init(prefer_type({fr("level_zero")}, {fr(omp_ifr_sycl),attr("ompx_in_order"),attr("ompx_queue:in_order")}), targetsync : io1, io2),use(io3),destroy(io4,io5),depend(inout:y),nowait)]];
/* { dg-final { scan-tree-dump-times "#pragma omp interop nowait depend\\(inout:y\\) destroy\\(io5\\) destroy\\(io4\\) use\\(io3\\) init\\(prefer_type\\(\{fr\\(\"level_zero\"\\)\}, \{fr\\(\"sycl\"\\),attr\\(\"ompx_in_order\"\\),attr\\(\"ompx_queue:in_order\"\\)\}\\), targetsync: io2\\) init\\(prefer_type\\(\{fr\\(\"level_zero\"\\)\}, \{fr\\(\"sycl\"\\),attr\\(\"ompx_in_order\"\\),attr\\(\"ompx_queue:in_order\"\\)\}\\), targetsync: io1\\)\[\r\n\]" 1 "original" } } */
}
diff --git a/gcc/testsuite/c-c++-common/gomp/interop-5.c b/gcc/testsuite/c-c++-common/gomp/interop-5.c
new file mode 100644
index 0000000..0b9bd09
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/interop-5.c
@@ -0,0 +1,68 @@
+/* { dg-additional-options "-fdump-tree-omplower" } */
+
+/* The following definitions are in omp_lib, which cannot be included
+ in gcc/testsuite/ */
+
+#if __cplusplus >= 201103L
+# define __GOMP_UINTPTR_T_ENUM : __UINTPTR_TYPE__
+#else
+# define __GOMP_UINTPTR_T_ENUM
+#endif
+
+typedef enum omp_interop_t __GOMP_UINTPTR_T_ENUM
+{
+ omp_interop_none = 0,
+ __omp_interop_t_max__ = __UINTPTR_MAX__
+} omp_interop_t;
+
+typedef enum omp_interop_fr_t
+{
+ omp_ifr_cuda = 1,
+ omp_ifr_cuda_driver = 2,
+ omp_ifr_opencl = 3,
+ omp_ifr_sycl = 4,
+ omp_ifr_hip = 5,
+ omp_ifr_level_zero = 6,
+ omp_ifr_hsa = 7,
+ omp_ifr_last = omp_ifr_hsa
+} omp_interop_fr_t;
+
+void
+f()
+{
+ omp_interop_t obj1, obj2, obj3, obj4, obj5, obj6, obj7;
+ int x[6];
+
+ #pragma omp interop init (targetsync: obj1, obj2) use (obj3) destroy(obj4) init(target: obj5) destroy(obj6) use(obj7)
+ /* { dg-final { scan-tree-dump-times "void \\* interopobjs\.\[0-9\]+.3.;\[\r\n\ ]*int tgt_tgtsync\\.\[0-9\]+.3.;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.2.;\[\r\n\ ]*omp_interop_t obj3\\.\[0-9\]+;\[\r\n\ ]*void \\* obj3\\.\[0-9\]+;\[\r\n\ ]*omp_interop_t obj7\\.\[0-9\]+;\[\r\n\ ]*void \\* obj7\\.\[0-9\]+;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.2.;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj1;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.0. = 2;\[\r\n \]*interopobjs\.\[0-9\]+.1. = &obj2;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.1. = 2;\[\r\n \]*interopobjs\.\[0-9\]+.2. = &obj5;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.2. = 1;\[\r\n \]*obj3\.\[0-9\]+ = obj3;\[\r\n \]*obj3\.\[0-9\]+ = \\(void \\*\\) obj3\.\[0-9\]+;\[\r\n \]*interopobjs\.\[0-9\]+.0. = obj3\.\[0-9\]+;\[\r\n \]*obj7\.\[0-9\]+ = obj7;\[\r\n \]*obj7\.\[0-9\]+ = \\(void \\*\\) obj7\.\[0-9\]+;\[\r\n \]*interopobjs\.\[0-9\]+.1. = obj7\.\[0-9\]+;\[\r\n \]*interopobjs\.\[0-9\]+.0. = &obj4;\[\r\n \]*interopobjs\.\[0-9\]+.1. = &obj6;\[\r\n \]*__builtin_GOMP_interop \\(-5, 3, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, 0B, 2, &interopobjs\.\[0-9\]+, 2, &interopobjs\.\[0-9\]+, 0, 0B\\);" 1 "omplower" { target c } } } */
+ /* { dg-final { scan-tree-dump-times "void \\* interopobjs\.\[0-9\]+.3.;\[\r\n\ ]*int tgt_tgtsync\\.\[0-9\]+.3.;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.2.;\[\r\n\ ]*omp_interop_t obj3\\.\[0-9\]+;\[\r\n\ ]*void \\* obj3\\.\[0-9\]+;\[\r\n\ ]*omp_interop_t obj7\\.\[0-9\]+;\[\r\n\ ]*void \\* obj7\\.\[0-9\]+;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.2.;\[\r\n\ ]*omp_interop_t obj6\\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj1;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.0. = 2;\[\r\n \]*interopobjs\.\[0-9\]+.1. = &obj2;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.1. = 2;\[\r\n \]*interopobjs\.\[0-9\]+.2. = &obj5;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.2. = 1;\[\r\n \]*obj3\.\[0-9\]+ = obj3;\[\r\n \]*obj3\.\[0-9\]+ = \\(void \\*\\) obj3\.\[0-9\]+;\[\r\n \]*interopobjs\.\[0-9\]+.0. = obj3\.\[0-9\]+;\[\r\n \]*obj7\.\[0-9\]+ = obj7;\[\r\n \]*obj7\.\[0-9\]+ = \\(void \\*\\) obj7\.\[0-9\]+;\[\r\n \]*interopobjs\.\[0-9\]+.1. = obj7\.\[0-9\]+;\[\r\n \]*interopobjs\.\[0-9\]+.0. = &obj4;\[\r\n \]*obj6\.\[0-9\]+ = obj6;\[\r\n \]*interopobjs\.\[0-9\]+.1. = &obj6\.\[0-9\]+;\[\r\n \]*__builtin_GOMP_interop \\(-5, 3, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, 0B, 2, &interopobjs\.\[0-9\]+, 2, &interopobjs\.\[0-9\]+, 0, 0B\\);" 1 "omplower" { target c++ } } } */
+
+ #pragma omp interop nowait init (targetsync : obj1, obj2) use (obj3) destroy(obj4) init(target, targetsync : obj5) destroy(obj6) use(obj7) depend(inout: x)
+ /* { dg-final { scan-tree-dump-times "void \\* D\\.\[0-9\]+.3.;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.3.;\[\r\n\ ]*int tgt_tgtsync\\.\[0-9\]+.3.;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.2.;\[\r\n\ ]*omp_interop_t obj3\\.\[0-9\]+;\[\r\n\ ]*void \\* obj3\\.\[0-9\]+;\[\r\n\ ]*omp_interop_t obj7\\.\[0-9\]+;\[\r\n\ ]*void \\* obj7\\.\[0-9\]+;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.2.;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj1;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.0. = 2;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = &obj2;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.1. = 2;\[\r\n\ ]*interopobjs\.\[0-9\]+.2. = &obj5;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.2. = 3;\[\r\n\ ]*obj3\.\[0-9\]+ = obj3;\[\r\n\ ]*obj3\.\[0-9\]+ = \\(void \\*\\) obj3\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = obj3\.\[0-9\]+;\[\r\n\ ]*obj7\.\[0-9\]+ = obj7;\[\r\n\ ]*obj7\.\[0-9\]+ = \\(void \\*\\) obj7\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = obj7\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj4;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = &obj6;\[\r\n\ ]*D\.\[0-9\]+.0. = 1B;\[\r\n\ ]*D\.\[0-9\]+.1. = 1B;\[\r\n\ ]*D\.\[0-9\]+.2. = &x;\[\r\n\ ]*__builtin_GOMP_interop \\(-5, 3, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, 0B, 2, &interopobjs\.\[0-9\]+, 2, &interopobjs\.\[0-9\]+, 1, &D\.\[0-9\]+\\);" 1 "omplower" { target c } } } */
+ /* { dg-final { scan-tree-dump-times "void \\* D\\.\[0-9\]+.3.;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.3.;\[\r\n\ ]*int tgt_tgtsync\\.\[0-9\]+.3.;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.2.;\[\r\n\ ]*omp_interop_t obj3\\.\[0-9\]+;\[\r\n\ ]*void \\* obj3\\.\[0-9\]+;\[\r\n\ ]*omp_interop_t obj7\\.\[0-9\]+;\[\r\n\ ]*void \\* obj7\\.\[0-9\]+;\[\r\n\ ]*void \\* interopobjs\\.\[0-9\]+.2.;\[\r\n\ ]*omp_interop_t obj6\\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj1;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.0. = 2;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = &obj2;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.1. = 2;\[\r\n\ ]*interopobjs\.\[0-9\]+.2. = &obj5;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.2. = 3;\[\r\n\ ]*obj3\.\[0-9\]+ = obj3;\[\r\n\ ]*obj3\.\[0-9\]+ = \\(void \\*\\) obj3\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = obj3\.\[0-9\]+;\[\r\n\ ]*obj7\.\[0-9\]+ = obj7;\[\r\n\ ]*obj7\.\[0-9\]+ = \\(void \\*\\) obj7\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = obj7\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj4;\[\r\n\ ]*obj6\.\[0-9\]+ = obj6;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = &obj6\.\[0-9\]+;\[\r\n\ ]*D\.\[0-9\]+.0. = 1B;\[\r\n\ ]*D\.\[0-9\]+.1. = 1B;\[\r\n\ ]*D\.\[0-9\]+.2. = &x;\[\r\n\ ]*__builtin_GOMP_interop \\(-5, 3, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, 0B, 2, &interopobjs\.\[0-9\]+, 2, &interopobjs\.\[0-9\]+, 1, &D\.\[0-9\]+\\);" 1 "omplower" { target c++ } } } */
+
+ #pragma omp interop init (target: obj1, obj2) init (target: obj3) init(targetsync : obj4) init(target,targetsync: obj5)
+ /* { dg-final { scan-tree-dump-times "void \\* interopobjs\\.\[0-9\]+.5.;\[\r\n\ ]*int tgt_tgtsync\\.\[0-9\]+.5.;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj1;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.0. = 1;\[\r\n \]*interopobjs\.\[0-9\]+.1. = &obj2;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.1. = 1;\[\r\n \]*interopobjs\.\[0-9\]+.2. = &obj3;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.2. = 1;\[\r\n \]*interopobjs\.\[0-9\]+.3. = &obj4;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.3. = 2;\[\r\n \]*interopobjs\.\[0-9\]+.4. = &obj5;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.4. = 3;\[\r\n\ ]*__builtin_GOMP_interop \\(-5, 5, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, 0B, 0, 0B, 0, 0B, 0, 0B\\);" 1 "omplower" } } */
+
+ /* -------------------------------------------- */
+
+ #pragma omp interop init (target, prefer_type(omp_ifr_cuda, omp_ifr_cuda+1, "hsa") : obj1, obj2) init (target: obj3) init(prefer_type(omp_ifr_hip, "sycl", omp_ifr_opencl), targetsync : obj4, obj7) init(target,prefer_type("level_zero", omp_ifr_level_zero+0),targetsync: obj5)
+ /* { dg-final { scan-tree-dump-times "void \\* interopobjs\\.\[0-9\]+.6.;\[\r\n\ ]*int tgt_tgtsync\\.\[0-9\]+.6.;\[\r\n\ ]*void \\* pref_type\.\[0-9\]+.6.;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj1;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.0. = 1;\[\r\n \]*pref_type\.\[0-9\]+.0. = .*;\[\r\n \]*interopobjs\.\[0-9\]+.1. = &obj2;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.1. = 1;\[\r\n \]*pref_type\.\[0-9\]+.1. = .*;\[\r\n \]*interopobjs\.\[0-9\]+.2. = &obj3;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.2. = 1;\[\r\n \]*pref_type\.\[0-9\]+.2. = 0B;\[\r\n \]*interopobjs\.\[0-9\]+.3. = &obj4;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.3. = 2;\[\r\n \]*pref_type\.\[0-9\]+.3. = .*;\[\r\n \]*interopobjs\.\[0-9\]+.4. = &obj7;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.4. = 2;\[\r\n \]*pref_type\.\[0-9\]+.4. = .*;\[\r\n \]*interopobjs\.\[0-9\]+.5. = &obj5;\[\r\n \]*tgt_tgtsync\.\[0-9\]+.5. = 3;\[\r\n \]*pref_type\.\[0-9\]+.5. = .*;\[\r\n\ ]*__builtin_GOMP_interop \\(-5, 6, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, &pref_type\.\[0-9\]+, 0, 0B, 0, 0B, 0, 0B\\);" 1 "omplower" } } */
+
+
+ /* -------------------------------------------- */
+
+ #pragma omp interop init ( target, prefer_type( {fr("hip"), attr("ompx_gnu_prio:1", "ompx_gnu_debug")}, {attr("ompx_gnu_nicest"), attr("ompx_something")}) : obj1) destroy(obj3) nowait use(obj5)
+ /* { dg-final { scan-tree-dump-times "void \\* interopobjs\\.\[0-9\]+.1.;\[\r\n\ ]*int tgt_tgtsync\\.\[0-9\]+.1.;\[\r\n\ ]*void \\* pref_type\.\[0-9\]+.1.;\[\r\n\ ]*void \\* interopobjs\.\[0-9\]+.1.;\[\r\n\ ]*omp_interop_t obj5\.\[0-9\]+;\[\r\n\ ]*void \\* obj5\.\[0-9\]+;\[\r\n\ ]*void \\* interopobjs\.\[0-9\]+.1.;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj1;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.0. = 1;\[\r\n\ ]*pref_type\.\[0-9\]+.0. = .*;\[\r\n\ ]*obj5\.\[0-9\]+ = obj5;\[\r\n\ ]*obj5\.\[0-9\]+ = \\(void \\*\\) obj5\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = obj5\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &obj3;\[\r\n\ ]*__builtin_GOMP_interop \\(-5, 1, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, &pref_type\.\[0-9\]+, 1, &interopobjs\.\[0-9\]+, 1, &interopobjs\.\[0-9\]+, 1, 0B\\);" 1 "omplower" } } */
+
+}
+
+void
+g (int *y)
+{
+ omp_interop_t io1, io2, io3, io4, io5;
+
+ [[omp::directive (interop,init(prefer_type({fr("level_zero")}, {fr(omp_ifr_sycl),attr("ompx_in_order"),attr("ompx_queue:in_order")}), targetsync : io1, io2),use(io3),destroy(io4,io5),depend(inout:y),nowait)]];
+ /* { dg-final { scan-tree-dump-times "void \\* D\.\[0-9\]+.3.;\[\r\n\ ]*void \\* interopobjs\.\[0-9\]+.2.;\[\r\n\ ]*int tgt_tgtsync\.\[0-9\]+.2.;\[\r\n\ ]*void \\* pref_type\.\[0-9\]+.2.;\[\r\n\ ]*void \\* interopobjs\.\[0-9\]+.1.;\[\r\n\ ]*void \\* io3\.\[0-9\]+;\[\r\n\ ]*void \\* interopobjs\.\[0-9\]+.2.;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &io1;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.0. = 2;\[\r\n\ ]*pref_type\.\[0-9\]+.0. = .*;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = &io2;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.1. = 2;\[\r\n\ ]*pref_type\.\[0-9\]+.1. = .*;\[\r\n\ ]*io3\.\[0-9\]+ = \\(void \\*\\) io3;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = io3\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &io4;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = &io5;\[\r\n\ ]*D\.\[0-9\]+.0. = 1B;\[\r\n\ ]*D\.\[0-9\]+.1. = 1B;\[\r\n\ ]*D\.\[0-9\]+.2. = &y;\[\r\n\ ]*__builtin_GOMP_interop \\(-5, 2, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, &pref_type\.\[0-9\]+, 1, &interopobjs\.\[0-9\]+, 2, &interopobjs\.\[0-9\]+, 1, &D\.\[0-9\]+\\);" 1 "omplower" { target c } } } */
+ /* { dg-final { scan-tree-dump-times "void \\* D\.\[0-9\]+.3.;\[\r\n\ ]*void \\* interopobjs\.\[0-9\]+.2.;\[\r\n\ ]*int tgt_tgtsync\.\[0-9\]+.2.;\[\r\n\ ]*void \\* pref_type\.\[0-9\]+.2.;\[\r\n\ ]*void \\* interopobjs\.\[0-9\]+.1.;\[\r\n\ ]*void \\* io3\.\[0-9\]+;\[\r\n\ ]*void \\* interopobjs\.\[0-9\]+.2.;\[\r\n\ ]*omp_interop_t io4\.\[0-9\]+;\[\r\n\ ]*omp_interop_t io5\.\[0-9\]+;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &io1;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.0. = 2;\[\r\n\ ]*pref_type\.\[0-9\]+.0. = .*;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = &io2;\[\r\n\ ]*tgt_tgtsync\.\[0-9\]+.1. = 2;\[\r\n\ ]*pref_type\.\[0-9\]+.1. = .*;\[\r\n\ ]*io3\.\[0-9\]+ = \\(void \\*\\) io3;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = io3\.\[0-9\]+;\[\r\n\ ]*io4\.\[0-9\]+ = io4;\[\r\n\ ]*interopobjs\.\[0-9\]+.0. = &io4\.\[0-9\]+;\[\r\n\ ]*io5\.\[0-9\]+ = io5;\[\r\n\ ]*interopobjs\.\[0-9\]+.1. = &io5\.\[0-9\]+;\[\r\n\ ]*D\.\[0-9\]+.0. = 1B;\[\r\n\ ]*D\.\[0-9\]+.1. = 1B;\[\r\n\ ]*D\.\[0-9\]+.2. = &y;\[\r\n\ ]*__builtin_GOMP_interop \\(-5, 2, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, &pref_type\.\[0-9\]+, 1, &interopobjs\.\[0-9\]+, 2, &interopobjs\.\[0-9\]+, 1, &D\.\[0-9\]+\\);" 1 "omplower" { target c++ } } } */
+}
diff --git a/gcc/testsuite/c-c++-common/musttail26.c b/gcc/testsuite/c-c++-common/musttail26.c
new file mode 100644
index 0000000..3d0f8c9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/musttail26.c
@@ -0,0 +1,33 @@
+/* PR ipa/119376 */
+/* { dg-do compile { target musttail } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(3, \[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(4, \[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-not " foo \\\(\[12], \[^\n\r]*\\\); \\\[tail call\\\]" "optimized" } } */
+
+int foo (int, int);
+int v, w[10];
+
+static inline __attribute__((always_inline)) int
+bar (int x, int y)
+{
+ [[gnu::musttail]] return foo (x, y);
+}
+
+static int
+baz (int x, int y)
+{
+ [[gnu::musttail]] return foo (x, x + y + (v | y) * (v & y));
+}
+
+int
+qux (int x, int y)
+{
+ w[0] = bar (1, x + y);
+ w[1] = baz (2, x + y);
+ if (x == 42)
+ [[gnu::musttail]] return bar (3, x + y);
+ if (x == -42)
+ [[gnu::musttail]] return baz (4, x + y);
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/musttail27.c b/gcc/testsuite/c-c++-common/musttail27.c
new file mode 100644
index 0000000..2a92bcb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/musttail27.c
@@ -0,0 +1,31 @@
+/* PR ipa/119376 */
+/* { dg-do compile { target musttail } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(\[^\n\r]*\\\); \\\[tail call\\\]" 4 "optimized" } } */
+
+int foo (int);
+
+int
+bar (int x)
+{
+ [[gnu::musttail]] return foo (x + 1);
+}
+
+int
+baz (int x)
+{
+ return foo (x + 1);
+}
+
+int
+qux (int x)
+{
+ return foo (x + 2);
+}
+
+int
+corge (int x)
+{
+ [[gnu::musttail]] return foo (x + 2);
+}
diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias24.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias24.C
new file mode 100644
index 0000000..cceddac
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias24.C
@@ -0,0 +1,16 @@
+// PR c++/119379
+// { dg-do compile { target c++20 } }
+
+template<class T, class U>
+struct pair {
+ pair(T, U);
+};
+
+template<class T>
+struct S {
+ template<class U> requires true
+ using P = pair<T, U>;
+};
+
+using type = decltype(S<int>::P(1, 2));
+using type = S<int>::P<int>;
diff --git a/gcc/testsuite/g++.dg/gomp/interop-5.C b/gcc/testsuite/g++.dg/gomp/interop-5.C
index 5109dc4..89396cf 100644
--- a/gcc/testsuite/g++.dg/gomp/interop-5.C
+++ b/gcc/testsuite/g++.dg/gomp/interop-5.C
@@ -1,8 +1,6 @@
/* { dg-do compile { target c++11 } } */
/* { dg-additional-options "-fdump-tree-original" } */
-/* { dg-prune-output "sorry, unimplemented: '#pragma omp interop' not yet supported" } */
-
/* The following definitions are in omp_lib, which cannot be included
in gcc/testsuite/ */
@@ -43,13 +41,13 @@ f ()
constexpr T3 ifr_level_zero = (T3) (omp_ifr_sycl + 2);
constexpr T3 ifr_invalid = (T3) 99;
- #pragma omp interop init ( obj1, obj2) use (obj3) destroy(obj4) init(obj5) destroy(obj6) use(obj7) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop init ( obj1, obj2) use (obj3) destroy(obj4) init(obj5) destroy(obj6) use(obj7)
/* { dg-final { scan-tree-dump-times "#pragma omp interop use\\(obj7\\) destroy\\(obj6\\) init\\(obj5\\) destroy\\(obj4\\) use\\(obj3\\) init\\(obj2\\) init\\(obj1\\)\[\r\n\]" 2 "original" } } */
- #pragma omp interop nowait init (targetsync : obj1, obj2) use (obj3) destroy(obj4) init(target, targetsync : obj5) destroy(obj6) use(obj7) depend(inout: x) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop nowait init (targetsync : obj1, obj2) use (obj3) destroy(obj4) init(target, targetsync : obj5) destroy(obj6) use(obj7) depend(inout: x)
/* { dg-final { scan-tree-dump-times "#pragma omp interop depend\\(inout:x\\) use\\(obj7\\) destroy\\(obj6\\) init\\(target, targetsync: obj5\\) destroy\\(obj4\\) use\\(obj3\\) init\\(targetsync: obj2\\) init\\(targetsync: obj1\\) nowait\[\r\n\]" 2 "original" } } */
- #pragma omp interop init ( obj1, obj2) init (target: obj3) init(targetsync : obj4) init(target,targetsync: obj5) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop init ( obj1, obj2) init (target: obj3) init(targetsync : obj4) init(target,targetsync: obj5)
/* { dg-final { scan-tree-dump-times "#pragma omp interop init\\(target, targetsync: obj5\\) init\\(targetsync: obj4\\) init\\(target: obj3\\) init\\(obj2\\) init\\(obj1\\)\[\r\n\]" 2 "original" } } */
/* -------------------------------------------- */
@@ -64,7 +62,7 @@ f ()
{ dg-final { scan-tree-dump-times "#pragma omp interop init\\(prefer_type\\(\{fr\\(\"<unknown>\"\\)\}, \{fr\\(\"<unknown>\"\\)\}, \{fr\\(\"cuda\"\\)\}, \{fr\\(\"cuda_driver\"\\)\}, \{fr\\(\"hsa\"\\)\}, \{fr\\(\"<unknown>\"\\)\}, \{fr\\(\"<unknown>\"\\)\}\\), target: obj2\\) init\\(prefer_type\\(\{fr\\(\"<unknown>\"\\)\}, \{fr\\(\"<unknown>\"\\)\}, \{fr\\(\"cuda\"\\)\}, \{fr\\(\"cuda_driver\"\\)\}, \{fr\\(\"hsa\"\\)\}, \{fr\\(\"<unknown>\"\\)\}, \{fr\\(\"<unknown>\"\\)\}\\), target: obj1\\)\[\r\n\]" 2 "original" } }
*/
- #pragma omp interop init (target, prefer_type(ifr_cuda, ifr_cuda+1, "hsa", "myPrivateInterop", ifr_cuda-2) : obj1, obj2) init (target: obj3) init(prefer_type(ifr_hip, "sycl", ifr_opencl), targetsync : obj4, obj7) init(target,prefer_type("level_zero", ifr_level_zero+0),targetsync: obj5) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop init (target, prefer_type(ifr_cuda, ifr_cuda+1, "hsa", "myPrivateInterop", ifr_cuda-2) : obj1, obj2) init (target: obj3) init(prefer_type(ifr_hip, "sycl", ifr_opencl), targetsync : obj4, obj7) init(target,prefer_type("level_zero", ifr_level_zero+0),targetsync: obj5)
/*
{ dg-warning "unknown foreign runtime identifier 'myPrivateInterop' \\\[-Wopenmp\\\]" "" { target *-*-* } .-2 }
{ dg-warning "unknown foreign runtime identifier '-1' \\\[-Wopenmp\\\]" "" { target *-*-* } .-3 }
@@ -74,7 +72,7 @@ f ()
/* -------------------------------------------- */
- #pragma omp interop init ( target, prefer_type( {fr("hip"), attr("ompx_gnu_prio:1", "ompx_gnu_debug")}, {attr("ompx_gnu_nicest"), attr("ompx_something")}) : obj1, obj2) init ( prefer_type( {fr("cuda")}, {fr(ifr_cuda_driver), attr("ompx_nix")}, {fr("best")}), targetsync : obj3, obj4) nowait use(obj5) /* { dg-message "'#pragma omp interop' not yet supported" } */
+ #pragma omp interop init ( target, prefer_type( {fr("hip"), attr("ompx_gnu_prio:1", "ompx_gnu_debug")}, {attr("ompx_gnu_nicest"), attr("ompx_something")}) : obj1, obj2) init ( prefer_type( {fr("cuda")}, {fr(ifr_cuda_driver), attr("ompx_nix")}, {fr("best")}), targetsync : obj3, obj4) nowait use(obj5)
/*
{ dg-warning "unknown foreign runtime identifier 'best' \\\[-Wopenmp\\\]" "" { target *-*-* } .-2 }
diff --git a/gcc/testsuite/g++.dg/modules/extern-tpl-3_a.C b/gcc/testsuite/g++.dg/modules/extern-tpl-3_a.C
new file mode 100644
index 0000000..def3cd1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/extern-tpl-3_a.C
@@ -0,0 +1,11 @@
+// { dg-additional-options "-fmodules -Wno-global-module" }
+// { dg-module-cmi M }
+
+module;
+template <typename>
+struct S {
+ S() {}
+};
+export module M;
+extern template class S<int>;
+S<int> s;
diff --git a/gcc/testsuite/g++.dg/modules/extern-tpl-3_b.C b/gcc/testsuite/g++.dg/modules/extern-tpl-3_b.C
new file mode 100644
index 0000000..5d96937
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/extern-tpl-3_b.C
@@ -0,0 +1,12 @@
+// { dg-additional-options "-fmodules" }
+
+template <typename>
+struct S {
+ S() {}
+};
+
+void foo() { S<double> x;}
+
+import M;
+
+// Lazy loading of extern S<int> at EOF should not ICE
diff --git a/gcc/testsuite/g++.dg/modules/extern-tpl-4_a.H b/gcc/testsuite/g++.dg/modules/extern-tpl-4_a.H
new file mode 100644
index 0000000..8238c2a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/extern-tpl-4_a.H
@@ -0,0 +1,22 @@
+// { dg-additional-options "-fmodule-header" }
+// { dg-module-cmi {} }
+
+template <typename T> inline void ha() {}
+extern template void ha<int>();
+extern template void ha<bool>();
+template void ha<char>();
+
+template <typename T> void hb() {}
+extern template void hb<int>();
+extern template void hb<bool>();
+template void hb<char>();
+
+template <typename T> inline int hc = 123;
+extern template int hc<int>;
+extern template int hc<bool>;
+template int hc<char>;
+
+template <typename T> int hd = 123;
+extern template int hd<int>;
+extern template int hd<bool>;
+template int hd<char>;
diff --git a/gcc/testsuite/g++.dg/modules/extern-tpl-4_b.C b/gcc/testsuite/g++.dg/modules/extern-tpl-4_b.C
new file mode 100644
index 0000000..9b46f7f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/extern-tpl-4_b.C
@@ -0,0 +1,24 @@
+// { dg-additional-options "-fmodules" }
+// { dg-module-cmi M }
+
+export module M;
+
+export template <typename T> inline void ma() {}
+extern template void ma<int>();
+extern template void ma<bool>();
+template void ma<char>();
+
+export template <typename T> void mb() {}
+extern template void mb<int>();
+extern template void mb<bool>();
+template void mb<char>();
+
+export template <typename T> inline int mc = 123;
+extern template int mc<int>;
+extern template int mc<bool>;
+template int mc<char>;
+
+export template <typename T> int md = 123;
+extern template int md<int>;
+extern template int md<bool>;
+template int md<char>;
diff --git a/gcc/testsuite/g++.dg/modules/extern-tpl-4_c.C b/gcc/testsuite/g++.dg/modules/extern-tpl-4_c.C
new file mode 100644
index 0000000..7185897
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/extern-tpl-4_c.C
@@ -0,0 +1,80 @@
+// { dg-additional-options "-fmodules" }
+
+import "extern-tpl-4_a.H";
+import M;
+
+int main() {
+ ha<int>();
+ ha<char>();
+ ha<double>();
+
+ ma<int>();
+ ma<char>();
+ ma<double>();
+
+ hb<int>();
+ hb<char>();
+ hb<double>();
+
+ mb<int>();
+ mb<char>();
+ mb<double>();
+
+ int x1 = hc<int> + hc<char> + hc<double>;
+ int x2 = hd<int> + hd<char> + hd<double>;
+ int x3 = mc<int> + mc<char> + mc<double>;
+ int x4 = md<int> + md<char> + md<double>;
+ return x1 + x2 + x3 + x4;
+}
+
+
+// 'int': imported explicit instantiation decls should not be emitted here:
+// { dg-final { scan-assembler-not "_Z2haIiEvv:" } }
+// { dg-final { scan-assembler-not "_Z2hbIiEvv:" } }
+// { dg-final { scan-assembler-not "_Z2hcIiE:" } }
+// { dg-final { scan-assembler-not "_Z2hdIiE:" } }
+// { dg-final { scan-assembler-not "_ZW1M2maIiEvv:" } }
+// { dg-final { scan-assembler-not "_ZW1M2mbIiEvv:" } }
+// { dg-final { scan-assembler-not "_ZW1M2mcIiE:" } }
+// { dg-final { scan-assembler-not "_ZW1M2mdIiE:" } }
+
+// 'char': explicit instantiation definitions don't need to be emitted for
+// modules, but need to be emitted for header units (as there's no other TU):
+// { dg-final { scan-assembler "_Z2haIcEvv:" } }
+// { dg-final { scan-assembler "_Z2hbIcEvv:" } }
+// { dg-final { scan-assembler "_Z2hcIcE:" } }
+// { dg-final { scan-assembler "_Z2hdIcE:" } }
+// { dg-final { scan-assembler-not "_ZW1M2maIcEvv:" } }
+// { dg-final { scan-assembler-not "_ZW1M2mbIcEvv:" } }
+// { dg-final { scan-assembler-not "_ZW1M2mcIcE:" } }
+// { dg-final { scan-assembler-not "_ZW1M2mdIcE:" } }
+
+// 'double': these are not explicitly instantiated and should be emitted here:
+// { dg-final { scan-assembler "_Z2haIdEvv:" } }
+// { dg-final { scan-assembler "_Z2hbIdEvv:" } }
+// { dg-final { scan-assembler "_Z2hcIdE:" } }
+// { dg-final { scan-assembler "_Z2hdIdE:" } }
+// { dg-final { scan-assembler "_ZW1M2maIdEvv:" } }
+// { dg-final { scan-assembler "_ZW1M2mbIdEvv:" } }
+// { dg-final { scan-assembler "_ZW1M2mcIdE:" } }
+// { dg-final { scan-assembler "_ZW1M2mdIdE:" } }
+
+template void ha<bool>();
+template void hb<bool>();
+template int hc<bool>;
+template int hd<bool>;
+
+template void ma<bool>();
+template void mb<bool>();
+template int mc<bool>;
+template int md<bool>;
+
+// 'bool': instantiated in this file, and so must be emitted here:
+// { dg-final { scan-assembler "_Z2haIbEvv:" } }
+// { dg-final { scan-assembler "_Z2hbIbEvv:" } }
+// { dg-final { scan-assembler "_Z2hcIbE:" } }
+// { dg-final { scan-assembler "_Z2hdIbE:" } }
+// { dg-final { scan-assembler "_ZW1M2maIbEvv:" } }
+// { dg-final { scan-assembler "_ZW1M2mbIbEvv:" } }
+// { dg-final { scan-assembler "_ZW1M2mcIbE:" } }
+// { dg-final { scan-assembler "_ZW1M2mdIbE:" } }
diff --git a/gcc/testsuite/g++.dg/modules/gnu-inline-1_a.C b/gcc/testsuite/g++.dg/modules/gnu-inline-1_a.C
new file mode 100644
index 0000000..41a1b28
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/gnu-inline-1_a.C
@@ -0,0 +1,7 @@
+// PR c++/119154
+// { dg-additional-options "-fmodules" }
+// { dg-module-cmi foo }
+
+export module foo;
+export extern "C++" inline __attribute__((__gnu_inline__)) void bar() {}
+export extern "C++" inline __attribute__((__gnu_inline__)) void decl();
diff --git a/gcc/testsuite/g++.dg/modules/gnu-inline-1_b.C b/gcc/testsuite/g++.dg/modules/gnu-inline-1_b.C
new file mode 100644
index 0000000..a91486d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/gnu-inline-1_b.C
@@ -0,0 +1,14 @@
+// PR c++/119154
+// { dg-additional-options "-fmodules" }
+
+void bar();
+void decl(); // { dg-warning "used but never defined" }
+import foo;
+
+void test_b() {
+ bar();
+ decl();
+}
+
+// A function only defined with gnu_inline should not be emitted here.
+// { dg-final { scan-assembler-not "_Z3barv:" } }
diff --git a/gcc/testsuite/g++.dg/modules/gnu-inline-1_c.C b/gcc/testsuite/g++.dg/modules/gnu-inline-1_c.C
new file mode 100644
index 0000000..34dde87
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/gnu-inline-1_c.C
@@ -0,0 +1,16 @@
+// PR c++/119154
+// { dg-additional-options "-fmodules" }
+
+void bar() {}
+void decl() {}
+import foo;
+
+void test_c() {
+ bar();
+ decl();
+};
+
+// Make sure importing a gnu_inline definition didn't stop us from emitting
+// the non-gnu_inline definition we had before the module import.
+// { dg-final { scan-assembler "_Z3barv:" } }
+// { dg-final { scan-assembler "_Z4declv:" } }
diff --git a/gcc/testsuite/g++.dg/modules/gnu-inline-1_d.C b/gcc/testsuite/g++.dg/modules/gnu-inline-1_d.C
new file mode 100644
index 0000000..5b5d802
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/gnu-inline-1_d.C
@@ -0,0 +1,16 @@
+// PR c++/119154
+// { dg-additional-options "-fmodules -fno-module-lazy" }
+
+import foo;
+void bar() {}
+void decl() {}
+
+void test_c() {
+ bar();
+ decl();
+};
+
+// Make sure importing a gnu_inline definition didn't stop us from emitting
+// the non-gnu_inline definition we had after the module import.
+// { dg-final { scan-assembler "_Z3barv:" } }
+// { dg-final { scan-assembler "_Z4declv:" } }
diff --git a/gcc/testsuite/g++.dg/modules/gnu-inline-2_a.C b/gcc/testsuite/g++.dg/modules/gnu-inline-2_a.C
new file mode 100644
index 0000000..7f59fb7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/gnu-inline-2_a.C
@@ -0,0 +1,11 @@
+// PR c++/119154
+// { dg-additional-options "-fmodules" }
+// { dg-module-cmi xstd }
+
+export module xstd;
+
+inline __attribute__((__gnu_inline__)) void wmemset() {}
+
+extern "C++" template <class> struct char_traits {
+ void assign() { wmemset(); }
+};
diff --git a/gcc/testsuite/g++.dg/modules/gnu-inline-2_b.C b/gcc/testsuite/g++.dg/modules/gnu-inline-2_b.C
new file mode 100644
index 0000000..e2f12d2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/modules/gnu-inline-2_b.C
@@ -0,0 +1,14 @@
+// PR c++/119154
+// { dg-additional-options "-fmodules" }
+
+template <typename> struct char_traits {
+ void assign();
+};
+
+void foo(char_traits<wchar_t> s) {
+ s.assign();
+}
+
+import xstd;
+
+// Lazy loading at EOF of a gnu_inline declaration should not ICE.
diff --git a/gcc/testsuite/g++.dg/modules/pr119154_a.C b/gcc/testsuite/g++.dg/modules/pr119154_a.C
deleted file mode 100644
index 23bd186..0000000
--- a/gcc/testsuite/g++.dg/modules/pr119154_a.C
+++ /dev/null
@@ -1,6 +0,0 @@
-// PR c++/119154
-// { dg-additional-options "-fmodules" }
-// { dg-module-cmi foo }
-
-export module foo;
-extern "C++" inline __attribute__((__gnu_inline__)) void bar() {}
diff --git a/gcc/testsuite/g++.dg/modules/pr119154_b.C b/gcc/testsuite/g++.dg/modules/pr119154_b.C
deleted file mode 100644
index 1558e71..0000000
--- a/gcc/testsuite/g++.dg/modules/pr119154_b.C
+++ /dev/null
@@ -1,10 +0,0 @@
-// PR c++/119154
-// { dg-module-do link }
-// { dg-additional-options "-fmodules" }
-
-void bar();
-import foo;
-
-int main() {
- bar();
-}
diff --git a/gcc/testsuite/g++.dg/opt/musttail1.C b/gcc/testsuite/g++.dg/opt/musttail1.C
new file mode 100644
index 0000000..5fe8ab6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/musttail1.C
@@ -0,0 +1,35 @@
+// PR ipa/119376
+// { dg-do compile { target musttail } }
+// { dg-options "-O2 -fdump-tree-optimized" }
+// { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(\[^\n\r]*\\\); \\\[tail call\\\] \\\[must tail call\\\]" 2 "optimized" } }
+// { dg-final { scan-tree-dump-times " \[^\n\r]* = foo \\\(\[^\n\r]*\\\); \\\[tail call\\\]" 3 "optimized" } }
+
+int foo (int x);
+typedef int (*F) (int);
+int v;
+
+inline int
+bar (int x)
+{
+ if (__builtin_expect (x == 42, 1))
+ return 1;
+ [[gnu::musttail]] return foo (x + v * (x | v) * (x & v) * (x - v) * (x + v * v));
+}
+
+int
+baz (int x)
+{
+ [[gnu::musttail]] return bar (x);
+}
+
+int
+qux (int x)
+{
+ return bar (x + 1);
+}
+
+F
+corge ()
+{
+ return &bar;
+}
diff --git a/gcc/testsuite/g++.dg/other/i386-2.C b/gcc/testsuite/g++.dg/other/i386-2.C
index 00cdc50..88252ad 100644
--- a/gcc/testsuite/g++.dg/other/i386-2.C
+++ b/gcc/testsuite/g++.dg/other/i386-2.C
@@ -1,5 +1,5 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2-512 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
+/* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h,
diff --git a/gcc/testsuite/g++.dg/other/i386-3.C b/gcc/testsuite/g++.dg/other/i386-3.C
index 8319d8c..a234e4f 100644
--- a/gcc/testsuite/g++.dg/other/i386-3.C
+++ b/gcc/testsuite/g++.dg/other/i386-3.C
@@ -1,5 +1,5 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2-512 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
+/* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
/* { dg-skip-if "requires hosted libstdc++ for cstdlib malloc" { ! hostedlib } } */
/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h,
diff --git a/gcc/testsuite/g++.dg/template/friend85.C b/gcc/testsuite/g++.dg/template/friend85.C
new file mode 100644
index 0000000..5cf8391
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend85.C
@@ -0,0 +1,16 @@
+// PR c++/119378
+
+template<int N>
+struct A {
+ template<class T>
+ struct B;
+};
+
+template<class U>
+struct C {
+ template<int N>
+ template<class T>
+ friend class A<N>::B;
+};
+
+template struct C<int>;
diff --git a/gcc/testsuite/g++.target/i386/mangling-alias1.C b/gcc/testsuite/g++.target/i386/mangling-alias1.C
new file mode 100644
index 0000000..70264e2
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/mangling-alias1.C
@@ -0,0 +1,16 @@
+// PR c++/114992
+// { dg-do compile { target { c++11 && x86_64-*-* } } }
+// { dg-require-ifunc }
+
+template <typename Callable>
+__attribute__((target_clones("avx2", "default")))
+void handler(Callable) {}
+
+inline int func()
+{
+ auto l1 = [](int) {}; // different lambda signature
+ handler([]() {}); // so this one needs a mangling alias
+ return 42;
+}
+
+int g = func();
diff --git a/gcc/testsuite/g++.target/nvptx/alias-g++.dg_init_dtor2-2.C b/gcc/testsuite/g++.target/nvptx/alias-g++.dg_init_dtor2-2.C
new file mode 100644
index 0000000..f00575e
--- /dev/null
+++ b/gcc/testsuite/g++.target/nvptx/alias-g++.dg_init_dtor2-2.C
@@ -0,0 +1,33 @@
+/* Reduced from 'g++.dg/init/dtor2.C'. */
+
+/* { dg-do link } */
+/* { dg-additional-options -mno-alias } */
+/* { dg-additional-options -save-temps } */
+/* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient. */
+
+struct B
+{
+ ~B();
+};
+
+B::~B () {
+}
+
+int main()
+{
+ B b;
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DECL: _ZN1BD2Ev$} 1 } }
+ { dg-final { scan-assembler-times {(?n)^\.visible \.func _ZN1BD2Ev \(\.param\.u64 %in_ar0\);$} 1 } }
+ { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DEF: _ZN1BD2Ev$} 1 } }
+ { dg-final { scan-assembler-times {(?n)^\.visible \.func _ZN1BD2Ev \(\.param\.u64 %in_ar0\)$} 1 } } */
+
+/* { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DECL: _ZN1BD1Ev$} 1 } }
+ { dg-final { scan-assembler-times {(?n)^\.visible \.func _ZN1BD1Ev \(\.param\.u64 %in_ar0\);$} 1 } }
+ { dg-final { scan-assembler-times {(?n)^// BEGIN GLOBAL FUNCTION DEF: _ZN1BD1Ev$} 1 } }
+ { dg-final { scan-assembler-times {(?n)^\.visible \.func _ZN1BD1Ev \(\.param\.u64 %in_ar0\)$} 1 } } */
+
+/* { dg-final { scan-assembler-times {(?n)\tcall _ZN1BD1Ev, \(} 1 } }
+ { dg-final { scan-assembler-times {(?n)\tcall _ZN1BD2Ev, \(} 0 } } */
diff --git a/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
index a95637a..8c15097 100644
--- a/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
+++ b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
@@ -26,4 +26,4 @@ bar (long a)
/* { dg-final { scan-rtl-dump "Will split live ranges of parameters" "ira" } } */
/* { dg-final { scan-rtl-dump "Split live-range of register" "ira" { xfail { ! aarch64*-*-* } } } } */
-/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" { xfail powerpc*-*-* } } } */
+/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" } } */
diff --git a/gcc/testsuite/gcc.dg/pr10474.c b/gcc/testsuite/gcc.dg/pr10474.c
index a4af536..9da33bd 100644
--- a/gcc/testsuite/gcc.dg/pr10474.c
+++ b/gcc/testsuite/gcc.dg/pr10474.c
@@ -12,5 +12,4 @@ void f(int *i)
}
}
-/* XFAIL due to PR70681. */
-/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" { xfail arm*-*-* powerpc*-*-* } } } */
+/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" } } */
diff --git a/gcc/testsuite/gcc.dg/pr118615.c b/gcc/testsuite/gcc.dg/pr118615.c
new file mode 100644
index 0000000..42f0b26
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr118615.c
@@ -0,0 +1,24 @@
+/* PR rtl-optimization/118615 */
+/* { dg-do compile { target scheduling } } */
+/* { dg-options "-O2 -fcompare-debug -fschedule-insns" } */
+
+void foo (void);
+void bar (int);
+void baz (int *);
+int j;
+
+void
+qux (int k, int *m)
+{
+ int n;
+ if (k)
+ {
+ foo ();
+ if (m)
+ {
+ bar (j);
+ baz (m);
+ }
+ }
+ baz (&n);
+}
diff --git a/gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c b/gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c
index 852b391..42e2a6b 100644
--- a/gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c
+++ b/gcc/testsuite/gcc.target/arm/memcpy-aligned-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target arm_unaligned } */
/* { dg-options "-O2 -save-temps" } */
void *memcpy (void *dest, const void *src, unsigned int n);
diff --git a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-1.c b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-1.c
index c4f5640..0d883e3 100644
--- a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-1.c
+++ b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-1.c
@@ -1,19 +1,31 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_unaligned } */
-/* { dg-options "-O2" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -save-temps" } */
#include <string.h>
-void unknown_alignment (char *dest, char *src)
+char src[17] __attribute__ ((aligned(8))) = "abcdefghijklmnopq";
+char result[17] __attribute__ ((aligned(8))) = {0};
+
+void __attribute__ ((noinline,noclone))
+unknown_alignment (char *dest, char *src)
{
memcpy (dest, src, 15);
}
-/* We should see three unaligned word loads and store pairs, one unaligned
- ldrh/strh pair, and an ldrb/strb pair. Sanity check that. */
+int main ()
+{
+ int i;
+ unknown_alignment (result+1, src+2);
+ for (i = 0; i < 15; i++)
+ if (result[i+1] != src[i+2])
+ __builtin_abort ();
+ if (result[16] != 0)
+ __builtin_abort ();
+ return 0;
+}
+
+/* Check that we don't use any instructions that assume an aligned source. */
+/* { dg-final { scan-assembler-not {(ldm(ia)?\tr[0-9]|ldrd\t.*\[r[0-9]|vldr)} } } */
-/* { dg-final { scan-assembler-times "@ unaligned" 8 } } */
-/* { dg-final { scan-assembler-times "ldrh" 1 } } */
-/* { dg-final { scan-assembler-times "strh" 1 } } */
-/* { dg-final { scan-assembler-times "ldrb" 1 } } */
-/* { dg-final { scan-assembler-times "strb" 1 } } */
+/* Check that we don't use any instructions that assume an aligned dest. */
+/* { dg-final { scan-assembler-not {(stm(ia)?\tr[0-9]|strd\t.*\[r[0-9]|vstr)} } } */
diff --git a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c
index 1ad730d..0da0bcd 100644
--- a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c
+++ b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c
@@ -1,24 +1,27 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_unaligned } */
-/* { dg-options "-O2" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -save-temps" } */
#include <string.h>
-char dest[16] = { 0 };
+char dest[16] __attribute__((aligned(8))) = { 0 } ;
+char input[17] __attribute__ ((aligned(8))) = "abcdefghijklmnop";
-void aligned_dest (char *src)
+void __attribute__ ((noinline,noclone)) aligned_dest (char *src)
{
memcpy (dest, src, 15);
}
-/* Expect a multi-word store for the main part of the copy, but subword
- loads/stores for the remainder. */
+int main ()
+{
+ int i;
+ aligned_dest (input+1);
+ for (i = 0; i < 15; i++)
+ if (dest[i] != input[i+1])
+ __builtin_abort ();
+ if (dest[15] != 0)
+ __builtin_abort ();
+ return 0;
+}
-/* { dg-final { scan-assembler-times "ldmia" 0 } } */
-/* { dg-final { scan-assembler-times "ldrd" 0 } } */
-/* { dg-final { scan-assembler-times "stmia" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
-/* { dg-final { scan-assembler-times "strd" 1 { target { arm_prefer_ldrd_strd } } } } */
-/* { dg-final { scan-assembler-times "ldrh" 1 } } */
-/* { dg-final { scan-assembler-times "strh" 1 } } */
-/* { dg-final { scan-assembler-times "ldrb" 1 } } */
-/* { dg-final { scan-assembler-times "strb" 1 } } */
+/* Check that we don't use any instructions that assume an aligned source. */
+/* { dg-final { scan-assembler-not {(ldm(ia)?\tr[0-9]|ldrd\t.*\[r[0-9]|vldr)} } } */
diff --git a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c
index d0b09bd..2cfe8b9 100644
--- a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c
+++ b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c
@@ -1,24 +1,27 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_unaligned } */
-/* { dg-options "-O2" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -save-temps" } */
#include <string.h>
-char src[16] = {0};
+char src[17] __attribute__ ((aligned(8))) = "abcdefghijklmnop";
+char result[17] __attribute__ ((aligned(8))) = {0};
-void aligned_src (char *dest)
+void __attribute__ ((noinline,noclone)) aligned_src (char *dest)
{
memcpy (dest, src, 15);
}
-/* Expect a multi-word load for the main part of the copy, but subword
- loads/stores for the remainder. */
+int main ()
+{
+ int i;
+ aligned_src (result+1);
+ for (i = 0; i < 15; i++)
+ if (result[i+1] != src[i])
+ __builtin_abort ();
+ if (result[16] != 0)
+ __builtin_abort ();
+ return 0;
+}
-/* { dg-final { scan-assembler-times "ldmia" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
-/* { dg-final { scan-assembler-times "ldrd" 1 { target { arm_prefer_ldrd_strd } } } } */
-/* { dg-final { scan-assembler-times "strd" 0 } } */
-/* { dg-final { scan-assembler-times "stm" 0 } } */
-/* { dg-final { scan-assembler-times "ldrh" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
-/* { dg-final { scan-assembler-times "strh" 1 } } */
-/* { dg-final { scan-assembler-times "ldrb" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
-/* { dg-final { scan-assembler-times "strb" 1 } } */
+/* Check that we don't use any instructions that assume an aligned dest. */
+/* { dg-final { scan-assembler-not {(stm(ia)?\tr[0-9]|strd\t.*\[r[0-9]|vstr)} } } */
diff --git a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c
index d236513..3f074e3 100644
--- a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c
+++ b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c
@@ -1,22 +1,26 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target arm_unaligned } */
-/* { dg-options "-O2" } */
+/* { dg-do run } */
+/* { dg-options "-O2 -save-temps" } */
#include <string.h>
-char src[16] = { 0 };
-char dest[16] = { 0 };
+char src[16] __attribute__ ((aligned(8))) = "abcdefghijklmnop";
+char dest[16] __attribute__ ((aligned(8))) = { 0 };
-void aligned_both (void)
+void __attribute__ ((noinline,noclone))
+aligned_both (void)
{
- memcpy (dest, src, 15);
+ memcpy (dest, src, 16);
}
-/* We know both src and dest to be aligned: expect multiword loads/stores. */
+int main ()
+{
+ int i;
+ aligned_both ();
+ for (i = 0; i < 16; i++)
+ if (dest[i] != src[i])
+ __builtin_abort ();
+ return 0;
+}
-/* { dg-final { scan-assembler-times "ldm" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
-/* { dg-final { scan-assembler-times "stmia" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
-/* { dg-final { scan-assembler "ldrd" { target { arm_prefer_ldrd_strd } } } } */
-/* { dg-final { scan-assembler-times "ldm" 0 { target { arm_prefer_ldrd_strd } } } } */
-/* { dg-final { scan-assembler "strd" { target { arm_prefer_ldrd_strd } } } } */
-/* { dg-final { scan-assembler-times "stm" 0 { target { arm_prefer_ldrd_strd } } } } */
+/* There should be no 'unaligned' comments. */
+/* { dg-final { scan-assembler-not "unaligned" } } */
diff --git a/gcc/testsuite/gcc.target/avr/torture/pr119421-sreg.c b/gcc/testsuite/gcc.target/avr/torture/pr119421-sreg.c
new file mode 100644
index 0000000..3752d4f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/pr119421-sreg.c
@@ -0,0 +1,301 @@
+/* { dg-do run } */
+/* { dg-additional-options "-std=gnu99 -Wno-pedantic" } */
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+
+#define BITNO_I 7
+#define BITNO_T 6
+#define BITNO_H 5
+#define BITNO_S 4
+#define BITNO_V 3
+#define BITNO_N 2
+#define BITNO_Z 1
+#define BITNO_C 0
+
+#define I (1u << BITNO_I)
+#define T (1u << BITNO_T)
+#define H (1u << BITNO_H)
+#define S (1u << BITNO_S)
+#define V (1u << BITNO_V)
+#define N (1u << BITNO_N)
+#define Z (1u << BITNO_Z)
+#define C (1u << BITNO_C)
+
+#define bit(a, x) ((bool) ((a) & (1u << (x))))
+
+typedef union
+{
+ uint8_t val;
+ struct
+ {
+ bool c:1;
+ bool z:1;
+ bool n:1;
+ bool v:1;
+ bool s:1;
+ bool h:1;
+ bool t:1;
+ bool i:1;
+ };
+} sreg_t;
+
+
+typedef struct
+{
+ sreg_t sreg;
+ uint8_t mask;
+ uint16_t result;
+} flags_t;
+
+flags_t flags_sub (uint8_t d, uint8_t r)
+{
+ uint8_t res = d - r;
+ bool R7 = bit (res, 7);
+
+ bool Rd7 = bit (d, 7);
+ bool Rd3 = bit (d, 3);
+
+ bool R3 = bit (res, 3);
+ bool Rr7 = bit (r, 7);
+ bool Rr3 = bit (r, 3);
+
+ sreg_t s = { 0 };
+
+ s.v = (Rd7 & !Rr7 & !R7) | (!Rd7 & Rr7 & R7);
+ s.n = R7;
+ s.z = res == 0;
+ s.c = (!Rd7 & Rr7) | (Rr7 & R7) | (R7 & !Rd7);
+ s.h = (!Rd3 & Rr3) | (Rr3 & R3) | (R3 & !Rd3);
+ s.s = s.n ^ s.v;
+
+ return (flags_t) { s, H | S | V | N | Z | C, res };
+}
+
+flags_t flags_sbc (uint8_t d, uint8_t r, sreg_t sreg)
+{
+ uint8_t res = d - r - sreg.c;
+ bool R7 = bit (res, 7);
+
+ bool Rd7 = bit (d, 7);
+ bool Rd3 = bit (d, 3);
+
+ bool R3 = bit (res, 3);
+ bool Rr7 = bit (r, 7);
+ bool Rr3 = bit (r, 3);
+
+ sreg_t s = { 0 };
+
+ s.v = (Rd7 & !Rr7 & !R7) | (!Rd7 & Rr7 & R7);
+ s.n = R7;
+ s.z = (res == 0) & sreg.z;
+ s.c = (!Rd7 & Rr7) | (Rr7 & R7) | (R7 & !Rd7);
+ s.h = (!Rd3 & Rr3) | (Rr3 & R3) | (R3 & !Rd3);
+ s.s = s.n ^ s.v;
+
+ return (flags_t) { s, H | S | V | N | Z | C, res };
+}
+
+flags_t flags_neg (uint8_t d)
+{
+ uint8_t res = -d;
+ bool R7 = bit (res, 7);
+ bool R6 = bit (res, 6);
+ bool R5 = bit (res, 5);
+ bool R4 = bit (res, 4);
+ bool R3 = bit (res, 3);
+ bool R2 = bit (res, 2);
+ bool R1 = bit (res, 1);
+ bool R0 = bit (res, 0);
+
+ bool Rd3 = bit (d, 3);
+
+ sreg_t s = { 0 };
+
+ s.v = R7 & !R6 & !R5 & !R4 & !R3 & !R2 & !R1 & !R0;
+ s.n = R7;
+ s.z = res == 0;
+ s.c = R7 | R6 | R5 | R4 | R3 | R2 | R1 | R0;
+ s.h = R3 | Rd3;
+ s.s = s.n ^ s.v;
+
+ return (flags_t) { s, H | S | V | N | Z | C, res };
+}
+
+flags_t flags_ror (uint8_t d, sreg_t sreg)
+{
+ uint8_t res = (d + 0x100 * sreg.c) >> 1;
+
+ sreg_t s = { 0 };
+
+ s.c = bit (d, 0);
+ s.z = res == 0;
+ s.n = bit (res, 7);
+ s.v = s.n ^ s.c;
+ s.s = s.n ^ s.v;
+
+ return (flags_t) { s, S | V | N | Z | C, res };
+}
+
+flags_t flags_add (uint8_t d, uint8_t r)
+{
+ uint8_t res = d + r;
+ bool R7 = bit (res, 7);
+
+ bool Rd7 = bit (d, 7);
+ bool Rd3 = bit (d, 3);
+
+ bool R3 = bit (res, 3);
+ bool Rr7 = bit (r, 7);
+ bool Rr3 = bit (r, 3);
+
+ sreg_t s = { 0 };
+
+ s.v = (Rd7 & Rr7 & !R7) | (!Rd7 & !Rr7 & R7);
+ s.n = R7;
+ s.z = res == 0;
+ s.c = (Rd7 & Rr7) | (Rr7 & !R7) | (!R7 & Rd7);
+ s.h = (Rd3 & Rr3) | (Rr3 & !R3) | (!R3 & Rd3);
+ s.s = s.n ^ s.v;
+
+ return (flags_t) { s, H | S | V | N | Z | C, res };
+}
+
+static inline
+sreg_t sreg_sub (uint8_t d, uint8_t r, uint8_t sreg, uint8_t result)
+{
+ __asm ("out __SREG__,%[sreg]" "\n\t"
+ "sub %[d],%[r]" "\n\t"
+ "in %[sreg],__SREG__"
+ : [sreg] "+r" (sreg), [d] "+r" (d)
+ : [r] "r" (r));
+ if (d != result)
+ exit (__LINE__);
+ return (sreg_t) sreg;
+}
+
+static inline
+sreg_t sreg_sbc (uint8_t d, uint8_t r, uint8_t sreg, uint8_t result)
+{
+ __asm ("out __SREG__,%[sreg]" "\n\t"
+ "sbc %[d],%[r]" "\n\t"
+ "in %[sreg],__SREG__"
+ : [sreg] "+r" (sreg), [d] "+r" (d)
+ : [r] "r" (r));
+ if (d != result)
+ exit (__LINE__);
+ return (sreg_t) sreg;
+}
+
+static inline
+sreg_t sreg_neg (uint8_t d, uint8_t sreg, uint8_t result)
+{
+ __asm ("out __SREG__,%[sreg]" "\n\t"
+ "neg %[d]" "\n\t"
+ "in %[sreg],__SREG__"
+ : [sreg] "+r" (sreg), [d] "+r" (d));
+ if (d != result)
+ exit (__LINE__);
+ return (sreg_t) sreg;
+}
+
+static inline
+sreg_t sreg_ror (uint8_t d, uint8_t sreg, uint8_t result)
+{
+ __asm ("out __SREG__,%[sreg]" "\n\t"
+ "ror %[d]" "\n\t"
+ "in %[sreg],__SREG__"
+ : [sreg] "+r" (sreg), [d] "+r" (d));
+ if (d != result)
+ exit (__LINE__);
+ return (sreg_t) sreg;
+}
+
+static inline
+sreg_t sreg_add (uint8_t d, uint8_t r, uint8_t sreg, uint8_t result)
+{
+ __asm ("out __SREG__,%[sreg]" "\n\t"
+ "add %[d],%[r]" "\n\t"
+ "in %[sreg],__SREG__"
+ : [sreg] "+r" (sreg), [d] "+r" (d)
+ : [r] "r" (r));
+ if (d != result)
+ exit (__LINE__);
+ return (sreg_t) sreg;
+}
+
+void test_sub (uint8_t d, uint8_t r, sreg_t sreg)
+{
+ sreg_t s0 = sreg_sub (d, r, sreg.val, d - r);
+ flags_t f = flags_sub (d, r);
+ if ((f.sreg.val & f.mask) != (s0.val & f.mask))
+ exit (__LINE__);
+}
+
+void test_sbc (uint8_t d, uint8_t r, sreg_t sreg)
+{
+ sreg_t s0 = sreg_sbc (d, r, sreg.val, d - r - sreg.c);
+ flags_t f = flags_sbc (d, r, sreg);
+ if ((f.sreg.val & f.mask) != (s0.val & f.mask))
+ exit (__LINE__);
+}
+
+void test_neg (uint8_t d, sreg_t sreg)
+{
+ sreg_t s0 = sreg_neg (d, sreg.val, -d);
+ flags_t f = flags_neg (d);
+ if ((f.sreg.val & f.mask) != (s0.val & f.mask))
+ exit (__LINE__);
+}
+
+void test_add (uint8_t d, uint8_t r, sreg_t sreg)
+{
+ sreg_t s0 = sreg_add (d, r, sreg.val, d + r);
+ flags_t f = flags_add (d, r);
+ if ((f.sreg.val & f.mask) != (s0.val & f.mask))
+ exit (__LINE__);
+}
+
+void test_ror (uint8_t d, sreg_t sreg)
+{
+ sreg_t s0 = sreg_ror (d, sreg.val, (d + 0x100 * sreg.c) >> 1);
+ flags_t f = flags_ror (d, sreg);
+ if ((f.sreg.val & f.mask) != (s0.val & f.mask))
+ exit (__LINE__);
+}
+
+void test_sreg (void)
+{
+ uint8_t d = 0;
+
+ do
+ {
+ uint8_t r = 0;
+ test_neg (d, (sreg_t) { 0x00 });
+ test_neg (d, (sreg_t) { 0xff });
+
+ test_ror (d, (sreg_t) { 0 });
+ test_ror (d, (sreg_t) { C });
+
+ do
+ {
+ test_add (d, r, (sreg_t) { 0x00 });
+ test_add (d, r, (sreg_t) { 0xff });
+
+ test_sub (d, r, (sreg_t) { 0x00 });
+ test_sub (d, r, (sreg_t) { 0xff });
+
+ test_sbc (d, r, (sreg_t) { 0 });
+ test_sbc (d, r, (sreg_t) { C });
+ test_sbc (d, r, (sreg_t) { Z });
+ test_sbc (d, r, (sreg_t) { C | Z });
+ } while (++r);
+ } while (++d);
+}
+
+int main (void)
+{
+ test_sreg();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx-1.c b/gcc/testsuite/gcc.target/i386/avx-1.c
index dda40af0..444a25e 100644
--- a/gcc/testsuite/gcc.target/i386/avx-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mavx2 -maes -mpclmul -mgfni -mprefetchi -mavx10.2-512 -mmovrs" } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mavx2 -maes -mpclmul -mgfni -mprefetchi -mavx10.2 -mmovrs" } */
/* { dg-add-options bind_pic_locally } */
#include <mm_malloc.h>
@@ -842,166 +842,6 @@
/* sm3intrin.h */
#define __builtin_ia32_vsm3rnds2(A, B, C, D) __builtin_ia32_vsm3rnds2 (A, B, C, 1)
-/* avx10_2roundingintrin.h */
-#define __builtin_ia32_addpd256_mask_round(A, B, C, D, E) __builtin_ia32_addpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_addph256_mask_round(A, B, C, D, E) __builtin_ia32_addph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_addps256_mask_round(A, B, C, D, E) __builtin_ia32_addps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_cmppd256_mask_round(A, B, C, D, E) __builtin_ia32_cmppd256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_cmpph256_mask_round(A, B, C, D, E) __builtin_ia32_cmpph256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_cmpps256_mask_round(A, B, C, D, E) __builtin_ia32_cmpps256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_vcvtdq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtdq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtdq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtdq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtpd2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtpd2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2dq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2qq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2udq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2pd256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2ps256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2psx256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2psx256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2qq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2udq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2uqq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2uw256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2uw256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2w256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2w256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2pd256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2phx256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2phx256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2qq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2udq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtqq2pd256_mask_round(A, B, C, D) __builtin_ia32_cvtqq2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtqq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtqq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtqq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtqq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2dq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2qq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2udq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2qq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2uqq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2udq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2uw256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2uw256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2w256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2w256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2dq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2qq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2udq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtudq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtudq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtudq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtudq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtuqq2pd256_mask_round(A, B, C, D) __builtin_ia32_cvtuqq2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtuqq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtuqq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtuqq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtuqq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtuw2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtuw2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtw2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtw2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_divpd256_mask_round(A, B, C, D, E) __builtin_ia32_divpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_divph256_mask_round(A, B, C, D, E) __builtin_ia32_divph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_divps256_mask_round(A, B, C, D, E) __builtin_ia32_divps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfcmaddcph256_round(A, B, C, D) __builtin_ia32_vfcmaddcph256_round(A, B, C, 8)
-#define __builtin_ia32_vfcmaddcph256_mask_round(A, C, D, B, E) __builtin_ia32_vfcmaddcph256_mask_round(A, C, D, B, 8)
-#define __builtin_ia32_vfcmaddcph256_mask3_round(A, C, D, B, E) __builtin_ia32_vfcmaddcph256_mask3_round(A, C, D, B, 8)
-#define __builtin_ia32_vfcmaddcph256_maskz_round(B, C, D, A, E) __builtin_ia32_vfcmaddcph256_maskz_round(B, C, D, A, 8)
-#define __builtin_ia32_vfcmulcph256_round(A, B, C) __builtin_ia32_vfcmulcph256_round(A, B, 8)
-#define __builtin_ia32_vfcmulcph256_mask_round(A, B, C, D, E) __builtin_ia32_vfcmulcph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_fixupimmpd256_mask_round(A, B, C, I, E, F) __builtin_ia32_fixupimmpd256_mask_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmpd256_maskz_round(A, B, C, I, E, F) __builtin_ia32_fixupimmpd256_maskz_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmps256_mask_round(A, B, C, I, E, F) __builtin_ia32_fixupimmps256_mask_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmps256_maskz_round(A, B, C, I, E, F) __builtin_ia32_fixupimmps256_maskz_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_vfmaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddcph256_round(A, B, C, D) __builtin_ia32_vfmaddcph256_round(A, B, C, 8)
-#define __builtin_ia32_vfmaddcph256_mask_round(A, C, D, B, E) __builtin_ia32_vfmaddcph256_mask_round(A, C, D, B, 8)
-#define __builtin_ia32_vfmaddcph256_mask3_round(A, C, D, B, E) __builtin_ia32_vfmaddcph256_mask3_round(A, C, D, B, 8)
-#define __builtin_ia32_vfmaddcph256_maskz_round(B, C, D, A, E) __builtin_ia32_vfmaddcph256_maskz_round(B, C, D, A, 8)
-#define __builtin_ia32_vfmaddsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmulcph256_round(A, B, C) __builtin_ia32_vfmulcph256_round(A, B, 8)
-#define __builtin_ia32_vfmulcph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmulcph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_getexppd256_mask_round(A, B, C, D) __builtin_ia32_getexppd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getexpph256_mask_round(A, B, C, D) __builtin_ia32_getexpph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getexpps256_mask_round(A, B, C, D) __builtin_ia32_getexpps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getmantpd256_mask_round(A, F, C, D, E) __builtin_ia32_getmantpd256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_getmantph256_mask_round(A, F, C, D, E) __builtin_ia32_getmantph256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_getmantps256_mask_round(A, F, C, D, E) __builtin_ia32_getmantps256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_maxpd256_mask_round(A, B, C, D, E) __builtin_ia32_maxpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_maxph256_mask_round(A, B, C, D, E) __builtin_ia32_maxph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_maxps256_mask_round(A, B, C, D, E) __builtin_ia32_maxps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minpd256_mask_round(A, B, C, D, E) __builtin_ia32_minpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minph256_mask_round(A, B, C, D, E) __builtin_ia32_minph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minps256_mask_round(A, B, C, D, E) __builtin_ia32_minps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulpd256_mask_round(A, B, C, D, E) __builtin_ia32_mulpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulph256_mask_round(A, B, C, D, E) __builtin_ia32_mulph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulps256_mask_round(A, B, C, D, E) __builtin_ia32_mulps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_rangeps256_mask_round(A, B, I, D, E, F) __builtin_ia32_rangeps256_mask_round(A, B, 1, D, E, 8)
-#define __builtin_ia32_rangepd256_mask_round(A, B, I, D, E, F) __builtin_ia32_rangepd256_mask_round(A, B, 1, D, E, 8)
-#define __builtin_ia32_reducepd256_mask_round(A, B, C, D, E) __builtin_ia32_reducepd256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_reduceph256_mask_round(A, B, C, D, E) __builtin_ia32_reduceph256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_reduceps256_mask_round(A, B, C, D, E) __builtin_ia32_reduceps256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_rndscalepd256_mask_round(A, B, C, D, E) __builtin_ia32_rndscalepd256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_rndscaleph256_mask_round(A, B, C, D, E) __builtin_ia32_rndscaleph256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_rndscaleps256_mask_round(A, B, C, D, E) __builtin_ia32_rndscaleps256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_scalefpd256_mask_round(A, B, C, D, E) __builtin_ia32_scalefpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_scalefph256_mask_round(A, B, C, D, E) __builtin_ia32_scalefph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_scalefps256_mask_round(A, B, C, D, E) __builtin_ia32_scalefps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_sqrtpd256_mask_round(A, B, C, D) __builtin_ia32_sqrtpd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_sqrtph256_mask_round(A, B, C, D) __builtin_ia32_sqrtph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_sqrtps256_mask_round(A, B, C, D) __builtin_ia32_sqrtps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_subpd256_mask_round(A, B, C, D, E) __builtin_ia32_subpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_subph256_mask_round(A, B, C, D, E) __builtin_ia32_subph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_subps256_mask_round(A, B, C, D, E) __builtin_ia32_subps256_mask_round(A, B, C, D, 8)
-
/* avx10_2-512mediaintrin.h */
#define __builtin_ia32_mpsadbw512(A, B, C) __builtin_ia32_mpsadbw512 (A, B, 1)
#define __builtin_ia32_mpsadbw512_mask(A, B, C, D, E) __builtin_ia32_mpsadbw512_mask (A, B, 1, D, E)
@@ -1010,9 +850,6 @@
#define __builtin_ia32_mpsadbw128_mask(A, B, C, D, E) __builtin_ia32_mpsadbw128_mask (A, B, 1, D, E)
#define __builtin_ia32_mpsadbw256_mask(A, B, C, D, E) __builtin_ia32_mpsadbw256_mask (A, B, 1, D, E)
-/* avx10_2convertintrin.h */
-#define __builtin_ia32_vcvt2ps2phx256_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx256_mask_round(A, B, C, D, 8)
-
/* avx10_2-512convertintrin.h */
#define __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, 8)
@@ -1054,22 +891,6 @@
#define __builtin_ia32_cvttps2uqqs512_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqqs512_mask_round(A, B, C, 8)
/* avx10_2satcvtintrin.h */
-#define __builtin_ia32_cvtph2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvtph2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtph2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvtph2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvtps2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvtps2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttph2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvttph2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttph2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvttph2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2dqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2dqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2qqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2qqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2udqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2udqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2uqqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2uqqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2dqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2dqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2qqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2qqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2udqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2udqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2uqqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqqs256_mask_round(A, B, C, 8)
#define __builtin_ia32_cvttsd2sis32_round(A, B) __builtin_ia32_cvttsd2sis32_round(A, 8)
#define __builtin_ia32_cvttsd2usis32_round(A, B) __builtin_ia32_cvttsd2usis32_round(A, 8)
#define __builtin_ia32_cvttss2sis32_round(A, B) __builtin_ia32_cvttss2sis32_round(A, 8)
@@ -1094,11 +915,11 @@
#define __builtin_ia32_minmaxbf16128_mask(A, B, C, D, E) __builtin_ia32_minmaxbf16128_mask (A, B, 4, D, E)
#define __builtin_ia32_minmaxbf16256_mask(A, B, C, D, E) __builtin_ia32_minmaxbf16256_mask (A, B, 4, D, E)
#define __builtin_ia32_minmaxpd128_mask(A, B, C, D, E) __builtin_ia32_minmaxpd128_mask (A, B, 4, D, E)
-#define __builtin_ia32_minmaxpd256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxpd256_mask_round (A, B, 4, D, E, 4)
+#define __builtin_ia32_minmaxpd256_mask(A, B, C, D, E) __builtin_ia32_minmaxpd256_mask (A, B, 4, D, E)
#define __builtin_ia32_minmaxph128_mask(A, B, C, D, E) __builtin_ia32_minmaxph128_mask (A, B, 4, D, E)
-#define __builtin_ia32_minmaxph256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxph256_mask_round (A, B, 4, D, E, 4)
+#define __builtin_ia32_minmaxph256_mask(A, B, C, D, E) __builtin_ia32_minmaxph256_mask (A, B, 4, D, E)
#define __builtin_ia32_minmaxps128_mask(A, B, C, D, E) __builtin_ia32_minmaxps128_mask (A, B, 4, D, E)
-#define __builtin_ia32_minmaxps256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxps256_mask_round (A, B, 4, D, E, 4)
+#define __builtin_ia32_minmaxps256_mask(A, B, C, D, E) __builtin_ia32_minmaxps256_mask (A, B, 4, D, E)
#include <wmmintrin.h>
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx10-check.h b/gcc/testsuite/gcc.target/i386/avx10-check.h
index e847dc3..7d4326d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10-check.h
+++ b/gcc/testsuite/gcc.target/i386/avx10-check.h
@@ -38,12 +38,9 @@ int
main ()
{
/* Run AVX10 test only if host has ISA support. */
- if (__builtin_cpu_supports ("avx10.1-256")
+ if (__builtin_cpu_supports ("avx10.1")
#ifdef AVX10_2
- && __builtin_cpu_supports ("avx10.2-256")
-#endif
-#ifdef AVX10_2_512
- && __builtin_cpu_supports ("avx10.2-512")
+ && __builtin_cpu_supports ("avx10.2")
#endif
&& avx10_os_support ())
{
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-1.c b/gcc/testsuite/gcc.target/i386/avx10_1-1.c
index 33ce99e..bd3249e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -march=x86-64 -mavx10.1-256" } */
+/* { dg-options "-O2 -march=x86-64 -mavx10.1" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-10.c b/gcc/testsuite/gcc.target/i386/avx10_1-10.c
index 0db5240..dba2a4e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-10.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-10.c
@@ -1,6 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64 -mavx10.1-512 -mavx512f -mno-evex512" } */
+/* { dg-options "-march=x86-64 -mavx10.1 -mavx512f -mno-evex512" } */
/* { dg-warning "'-mno-evex512' or '-mno-avx512XXX' cannot disable AVX10 instructions when AVX10.1-512 is available" "" { target *-*-* } 0 } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
#include "avx10_1-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-11.c b/gcc/testsuite/gcc.target/i386/avx10_1-11.c
index c0ad4fc..608817a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-11.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-11.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64 -mavx10.1-512 -mno-avx512f" } */
+/* { dg-options "-march=x86-64 -mavx10.1 -mno-avx512f" } */
/* { dg-warning "'-mno-evex512' or '-mno-avx512XXX' cannot disable AVX10 instructions when AVX10.1-512 is available" "" { target *-*-* } 0 } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
#include "avx10_1-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-12.c b/gcc/testsuite/gcc.target/i386/avx10_1-12.c
index ae1c77b..1650f26 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-12.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-12.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-march=x86-64 -mno-avx10.1-512 -mavx512f" } */
/* { dg-warning "'-mno-avx10.1-256, -mno-avx10.1-512' cannot disable AVX512 instructions when '-mavx512XXX'" "" { target *-*-* } 0 } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
#include "avx10_1-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-13.c b/gcc/testsuite/gcc.target/i386/avx10_1-13.c
index e94ac8e..a864e96 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-13.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-13.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-march=x86-64 -mavx10.1-256" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-15.c b/gcc/testsuite/gcc.target/i386/avx10_1-15.c
index d1731f0..b227cf3 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-15.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-15.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64 -mavx10.1-512" } */
+/* { dg-options "-march=x86-64 -mavx10.1" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-16.c b/gcc/testsuite/gcc.target/i386/avx10_1-16.c
index f5f3ff8..b3fdb3f 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-16.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-16.c
@@ -1,10 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-march=x86-64 -mavx512f -mno-evex512" } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
-__attribute__ ((target ("avx10.1-512"))) __m512d
+__attribute__ ((target ("avx10.1"))) __m512d
foo ()
{ /* { dg-warning "'-mno-evex512' or '-mno-avx512XXX' cannot disable AVX10 instructions when AVX10.1-512 is available" } */
__m512d a, b;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-18.c b/gcc/testsuite/gcc.target/i386/avx10_1-18.c
index c50fd2b..c1edce8 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-18.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-18.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64 -mavx10.1-512" } */
+/* { dg-options "-march=x86-64 -mavx10.1" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-19.c b/gcc/testsuite/gcc.target/i386/avx10_1-19.c
index 7445ecf..25b5887 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-19.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-19.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-march=x86-64 -mno-avx10.1-512" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-2.c b/gcc/testsuite/gcc.target/i386/avx10_1-2.c
index 0b3991d..19962bc 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64 -mavx10.1-512" } */
+/* { dg-options "-march=x86-64 -mavx10.1" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-20.c b/gcc/testsuite/gcc.target/i386/avx10_1-20.c
index d63c6b4..a223065 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-20.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-20.c
@@ -4,7 +4,7 @@
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
-__attribute__ ((target ("avx10.1-512"))) __m512d
+__attribute__ ((target ("avx10.1"))) __m512d
foo ()
{ /* { dg-warning "'-mno-evex512' or '-mno-avx512XXX' cannot disable AVX10 instructions when AVX10.1-512 is available" } */
__m512d a, b;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-21.c b/gcc/testsuite/gcc.target/i386/avx10_1-21.c
index 0a1fcc9..2ae437e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-21.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-21.c
@@ -1,6 +1,8 @@
/* { dg-do compile } */
/* { dg-options "-march=x86-64 -mavx10.1-256 -mevex512 -Wno-psabi" } */
/* { dg-warning "Using '-mevex512' without any AVX512 features enabled together with AVX10.1 only will not enable any AVX512 or AVX10.1-512 features, using 256 as max vector size" "" { target *-*-* } 0 } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler-not "%zmm" } } */
#include "avx10_1-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-22.c b/gcc/testsuite/gcc.target/i386/avx10_1-22.c
index cb649dc..df7bffb 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-22.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-22.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-march=x86-64 -mavx10.1-256 -Wno-psabi" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler-not "%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-23.c b/gcc/testsuite/gcc.target/i386/avx10_1-23.c
index f31c636..1f84584 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-23.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-23.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-march=x86-64 -mevex512 -Wno-psabi" } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler-not "%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-24.c b/gcc/testsuite/gcc.target/i386/avx10_1-24.c
deleted file mode 100644
index 1bba0fb..0000000
--- a/gcc/testsuite/gcc.target/i386/avx10_1-24.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -mavx10.1-256" } */
-/* { dg-final { scan-assembler-not "%zmm" } } */
-
-typedef float __m512 __attribute__ ((__vector_size__ (64), __may_alias__));
-
-void __attribute__((target("avx10.1-256"))) callee256(__m512 *a, __m512 *b) { *a = *b; }
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-25.c b/gcc/testsuite/gcc.target/i386/avx10_1-25.c
deleted file mode 100644
index fb378b9..0000000
--- a/gcc/testsuite/gcc.target/i386/avx10_1-25.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v2 -mavx" } */
-/* { dg-require-ifunc "" } */
-
-#include <immintrin.h>
-__attribute__((target_clones ("default","avx10.1-256")))
-__m256d foo(__m256d a, __m256d b)
-{
- return a + b;
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-26.c b/gcc/testsuite/gcc.target/i386/avx10_1-26.c
index e54e2f5..d887404 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-26.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-26.c
@@ -3,7 +3,7 @@
/* { dg-require-ifunc "" } */
#include <immintrin.h>
-__attribute__((target_clones ("default","avx10.1-512")))
+__attribute__((target_clones ("default","avx10.1")))
__m512d foo(__m512d a, __m512d b)
{
return a + b;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-3.c b/gcc/testsuite/gcc.target/i386/avx10_1-3.c
index a176f27..992364a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -mavx10.1-256" } */
+/* { dg-options "-O2 -march=x86-64 -mavx10.1" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-4.c b/gcc/testsuite/gcc.target/i386/avx10_1-4.c
index 68cbf19..b3d2603 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-4.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -mavx10.1-512" } */
+/* { dg-options "-O2 -march=x86-64 -mavx10.1" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-5.c b/gcc/testsuite/gcc.target/i386/avx10_1-5.c
deleted file mode 100644
index 3079cf1..0000000
--- a/gcc/testsuite/gcc.target/i386/avx10_1-5.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O0 -march=x86-64 -mavx10.1-256 -Wno-psabi" } */
-/* { dg-final { scan-assembler-not ".%zmm" } } */
-
-#include "avx10_1-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-6.c b/gcc/testsuite/gcc.target/i386/avx10_1-6.c
deleted file mode 100644
index 60dbd05..0000000
--- a/gcc/testsuite/gcc.target/i386/avx10_1-6.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -mavx10.1-256" } */
-
-#include <immintrin.h>
-
-long long
-foo (long long c)
-{
- register long long a __asm ("k7") = c;
- long long b = foo (a);
- asm volatile ("" : "+k" (b));
- return b;
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-7.c b/gcc/testsuite/gcc.target/i386/avx10_1-7.c
index afce290..fb74ffb 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-7.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-7.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64 -mavx10.1-512 -mavx512f" } */
+/* { dg-options "-march=x86-64 -mavx10.1 -mavx512f" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
#include "avx10_1-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-8.c b/gcc/testsuite/gcc.target/i386/avx10_1-8.c
index ec930f7..dbb7d64 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-8.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-8.c
@@ -1,4 +1,6 @@
/* { dg-do compile { target { ! ia32 } } } */
/* { dg-options "-march=x86-64 -mavx10.1-256 -mavx512f -mno-evex512" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
#include "avx10_1-1.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_1-9.c b/gcc/testsuite/gcc.target/i386/avx10_1-9.c
index 8e83827..b951738 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_1-9.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_1-9.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-march=x86-64 -mavx10.1-256 -mavx512f" } */
/* { dg-warning "Vector size conflicts between AVX10.1 and AVX512, using 512 as max vector size" "" { target *-*-* } 0 } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler "%zmm" } } */
#include "avx10_1-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-1.c
index 60121d2..f28be2a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-512 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
@@ -71,7 +71,7 @@ volatile __m512bh res, x1, x2;
volatile __mmask32 m32;
void extern
-avx10_2_512_test (void)
+avx10_2_test (void)
{
res = _mm512_add_pbh (x1, x2);
res = _mm512_mask_add_pbh (res, m32, x1, x2);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-cmp-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-cmp-1.c
index a5e1d43..ff72698 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-cmp-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-cmp-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-512 -O2 -mprefer-vector-width=512" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2 -mprefer-vector-width=512" } */
/* { dg-final { scan-assembler-times "vcmpbf16" 5 } } */
typedef __bf16 v32bf __attribute__ ((__vector_size__ (64)));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-fma-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-fma-1.c
index 77198d2..cc9497c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-fma-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-fma-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-512 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vfmadd132bf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vfmsub132bf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vfnmadd132bf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-operations-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-operations-1.c
index e224a36..9ca2b95 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-operations-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-operations-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-512 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vmulbf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vdivbf16\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-smaxmin-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-smaxmin-1.c
index 0282de5..ee2ac85 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-smaxmin-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-bf16-vector-smaxmin-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-512 -mprefer-vector-width=512 -Ofast" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -mprefer-vector-width=512 -Ofast" } */
/* { dg-final { scan-assembler-times "vmaxbf16" 1 } } */
/* { dg-final { scan-assembler-times "vminbf16" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-convert-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-convert-1.c
index c1e44ef..e932362 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-convert-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-convert-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-512 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
@@ -64,7 +64,7 @@ __m512bh *c;
__m512h *d;
void extern
-avx10_2_512_test (void)
+avx10_2_test (void)
{
y = _mm512_cvtx2ps_ph (a1, b1);
y = _mm512_mask_cvtx2ps_ph (y, m32, a1, b1);
@@ -76,7 +76,7 @@ avx10_2_512_test (void)
}
void extern
-avx10_2_512_vcvtbiasph2bf8_test (void)
+avx10_2_vcvtbiasph2bf8_test (void)
{
x256i = _mm512_cvtbiasph_bf8 (x512i, x512h);
x256i = _mm512_mask_cvtbiasph_bf8 (x256i, m32, x512i, x512h);
@@ -84,7 +84,7 @@ avx10_2_512_vcvtbiasph2bf8_test (void)
}
void extern
-avx10_2_512_vcvtbiasph2bf8s_test (void)
+avx10_2_vcvtbiasph2bf8s_test (void)
{
x256i = _mm512_cvtbiassph_bf8 (x512i, x512h);
x256i = _mm512_mask_cvtbiassph_bf8 (x256i, m32, x512i, x512h);
@@ -92,7 +92,7 @@ avx10_2_512_vcvtbiasph2bf8s_test (void)
}
void extern
-avx10_2_512_vcvtbiasph2hf8_test (void)
+avx10_2_vcvtbiasph2hf8_test (void)
{
x256i = _mm512_cvtbiasph_hf8 (x512i, x512h);
x256i = _mm512_mask_cvtbiasph_hf8 (x256i, m32, x512i, x512h);
@@ -100,7 +100,7 @@ avx10_2_512_vcvtbiasph2hf8_test (void)
}
void extern
-avx10_2_512_vcvtbiasph2hf8s_test (void)
+avx10_2_vcvtbiasph2hf8s_test (void)
{
x256i = _mm512_cvtbiassph_hf8 (x512i, x512h);
x256i = _mm512_mask_cvtbiassph_hf8 (x256i, m32, x512i, x512h);
@@ -108,7 +108,7 @@ avx10_2_512_vcvtbiasph2hf8s_test (void)
}
void extern
-avx10_2_512_vcvt2ph2bf8_test (void)
+avx10_2_vcvt2ph2bf8_test (void)
{
x512i = _mm512_cvt2ph_bf8 (x512h, x512h);
x512i = _mm512_mask_cvt2ph_bf8 (x512i, m64, x512h, x512h);
@@ -116,7 +116,7 @@ avx10_2_512_vcvt2ph2bf8_test (void)
}
void extern
-avx10_2_512_vcvt2ph2bf8s_test (void)
+avx10_2_vcvt2ph2bf8s_test (void)
{
x512i = _mm512_cvts2ph_bf8 (x512h, x512h);
x512i = _mm512_mask_cvts2ph_bf8 (x512i, m64, x512h, x512h);
@@ -124,7 +124,7 @@ avx10_2_512_vcvt2ph2bf8s_test (void)
}
void extern
-avx10_2_512_vcvt2ph2hf8_test (void)
+avx10_2_vcvt2ph2hf8_test (void)
{
x512i = _mm512_cvt2ph_hf8 (x512h, x512h);
x512i = _mm512_mask_cvt2ph_hf8 (x512i, m64, x512h, x512h);
@@ -132,7 +132,7 @@ avx10_2_512_vcvt2ph2hf8_test (void)
}
void extern
-avx10_2_512_vcvt2ph2hf8s_test (void)
+avx10_2_vcvt2ph2hf8s_test (void)
{
x512i = _mm512_cvts2ph_hf8 (x512h, x512h);
x512i = _mm512_mask_cvts2ph_hf8 (x512i, m64, x512h, x512h);
@@ -140,7 +140,7 @@ avx10_2_512_vcvt2ph2hf8s_test (void)
}
void extern
-avx10_2_512_vcvthf82ph_test (void)
+avx10_2_vcvthf82ph_test (void)
{
x512h = _mm512_cvthf8_ph (x256i);
x512h = _mm512_mask_cvthf8_ph (x512h, m32, x256i);
@@ -148,7 +148,7 @@ avx10_2_512_vcvthf82ph_test (void)
}
void extern
-avx10_2_512_vcvtph2bf8_test (void)
+avx10_2_vcvtph2bf8_test (void)
{
x256i = _mm512_cvtph_bf8 (x512h);
x256i = _mm512_mask_cvtph_bf8 (x256i, m32, x512h);
@@ -156,7 +156,7 @@ avx10_2_512_vcvtph2bf8_test (void)
}
void extern
-avx10_2_512_vcvtph2bf8s_test (void)
+avx10_2_vcvtph2bf8s_test (void)
{
x256i = _mm512_cvtsph_bf8 (x512h);
x256i = _mm512_mask_cvtsph_bf8 (x256i, m32, x512h);
@@ -164,7 +164,7 @@ avx10_2_512_vcvtph2bf8s_test (void)
}
void extern
-avx10_2_512_vcvtph2hf8_test (void)
+avx10_2_vcvtph2hf8_test (void)
{
x256i = _mm512_cvtph_hf8 (x512h);
x256i = _mm512_mask_cvtph_hf8 (x256i, m32, x512h);
@@ -172,7 +172,7 @@ avx10_2_512_vcvtph2hf8_test (void)
}
void extern
-avx10_2_512_vcvtph2hf8s_test (void)
+avx10_2_vcvtph2hf8s_test (void)
{
x256i = _mm512_cvtsph_hf8 (x512h);
x256i = _mm512_mask_cvtsph_hf8 (x256i, m32, x512h);
@@ -180,7 +180,7 @@ avx10_2_512_vcvtph2hf8s_test (void)
}
void extern
-avx10_2_512_cvtbf8_fp16_test (void)
+avx10_2_cvtbf8_fp16_test (void)
{
y = _mm512_cvtbf8_ph (z1);
y = _mm512_mask_cvtbf8_ph (z, m32, z1);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-media-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-media-1.c
index d24c06d..a0675f6 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-media-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-media-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-512 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\\n\\r]*%zmm\[0-9\]+\[^\\n\\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
@@ -52,7 +52,7 @@ volatile __m512i x,y,z,z1;
volatile __mmask16 m16;
volatile __mmask32 m32;
-void avx10_2_512_test (void)
+void avx10_2_test (void)
{
x = _mm512_dpbssd_epi32 (x, y, z);
x = _mm512_mask_dpbssd_epi32 (x, m16, y, z);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-minmax-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-minmax-1.c
index adb57eb..fb9a92a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-minmax-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-minmax-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
/* { dg-final { scan-assembler-times "vminmaxbf16\[ \\t\]+\[^\{\n\]*\[^\}\]%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r\]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxbf16\[ \\t\]+\[^\{\n\]*\[^\}\]%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxbf16\[ \\t\]+\[^\{\n\]*\[^\}\]%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\[^\n\r\]*%zmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
@@ -25,7 +25,7 @@ volatile __mmask16 m16;
volatile __mmask8 m8;
void extern
-avx10_2_512_test (void)
+avx10_2_test (void)
{
x1 = _mm512_minmax_pbh (x1, x1, 100);
x1 = _mm512_mask_minmax_pbh (x1, m32, x1, x1, 100);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-movrs-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-movrs-1.c
index 682b812..2aaa1a9 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-movrs-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-movrs-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-512 -mmovrs -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -mmovrs -O2" } */
/* { dg-final { scan-assembler-times "vmovrsb\[ \\t\]\+\\(%(?:r|e).x\\), %zmm\[0-9\]+" 3 } } */
/* { dg-final { scan-assembler-times "vmovrsb\[ \\t\]\+\\(%(?:r|e).x\\), %zmm\[0-9\]+{%k\[1-7\]}" 2 } } */
/* { dg-final { scan-assembler-times "vmovrsb\[ \\t\]\+\\(%(?:r|e).x\\), %zmm\[0-9\]+{%k\[1-7\]}{z}" 1 } } */
@@ -23,7 +23,7 @@ volatile __mmask8 m3;
volatile __mmask32 m4;
void extern
-avx512movrs_test (void)
+avx10_movrs_test (void)
{
x = _mm512_loadrs_epi8(px);
x = _mm512_mask_loadrs_epi8(x, m1, px);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-satcvt-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-satcvt-1.c
index dd24216..74a515b 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-satcvt-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-satcvt-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\[^\{\n\]*%zmm\[0-9\]+\[^\n\r]*%zmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vaddbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vaddbf16-2.c
index fe13c64..4aca46d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vaddbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vaddbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcmpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcmpbf16-2.c
index a6f8f54..885cec7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcmpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcmpbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8-2.c
index 8662d26..5bd2b7f 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8s-2.c
index 4933a8b..aa8545c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2bf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8-2.c
index 633d15a..b9fdbd4 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8s-2.c
index e53e924..afed1d1 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ph2hf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ps2phx-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ps2phx-2.c
index e3cc050..f9f799a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ps2phx-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvt2ps2phx-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162ibs-2.c
index 7f7e20c..4976892 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162iubs-2.c
index 3b4c2ec..03bd36a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbf162iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8-2.c
index c5edce61..4d90dcf8 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8s-2.c
index c454cb5..88ced07 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2bf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8-2.c
index 84f19ae..14a2251 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8s-2.c
index 2630c69..1a8b4d6 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtbiasph2hf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvthf82ph-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvthf82ph-2.c
index 48083ae..9301ee3 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvthf82ph-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvthf82ph-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8-2.c
index 189c2d6..f42f856 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8s-2.c
index 090c4c1..f4853ce 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2bf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8-2.c
index 8cdb513..e328e9d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8s-2.c
index ded773e..43610bf 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2hf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c
index 523b3f0..2bddbb1 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -68,7 +68,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c
index a8f6e57..df73fcd 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtph2iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -68,7 +68,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c
index 369cb64..2ab24b9 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -69,7 +69,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c
index f79264e..2b02ee3 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvtps2iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -67,7 +67,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162ibs-2.c
index eea2e70..38154c8 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162iubs-2.c
index 9f52302..9ca0912 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttbf162iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
index 7293772..f56e568 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2dqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -67,7 +67,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c
index 23eb111..4400c7c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2qqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -66,7 +66,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c
index 7058423..f687d0e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2udqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -67,7 +67,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN_HALF, i_ud) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c
index 9c826f4..7b44cdd 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttpd2uqqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -66,7 +66,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_uq) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c
index 7f94020a..13eb9f0 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -68,7 +68,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_w) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c
index 8a05dfd..d057c83 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttph2iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -55,7 +55,7 @@ TEST (void)
CALC (s.a, res_ref);
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
res1.x = INTRINSIC (_ipcvtts_roundph_epu8) (s.x, 8);
res2.x = INTRINSIC (_mask_ipcvtts_roundph_epu8) (res2.x, mask, s.x, 8);
res3.x = INTRINSIC (_maskz_ipcvtts_roundph_epu8) (mask, s.x, 8);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c
index 9d3bc2c..0e9ee27 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2dqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -66,7 +66,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c
index 9654385..c2dc7fe 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -69,7 +69,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c
index 976677f..5f5ee8a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -67,7 +67,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c
index 0d5797e..473fffa 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2qqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -67,7 +67,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c
index f578cd0..5d7ee3c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2udqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -66,7 +66,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_ud) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c
index 93e71ac..99ab0ce 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vcvttps2uqqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
@@ -67,7 +67,7 @@ TEST (void)
if (UNION_CHECK (AVX512F_LEN, i_uq) (res3, res_ref))
abort ();
-#if AVX512F_LEN != 128
+#if AVX512F_LEN == 512
for (i = 0; i < SIZE; i++)
res2.a[i] = DEFAULT_VALUE;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vdivbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vdivbf16-2.c
index 54bc275..ff68470 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vdivbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vdivbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c
index 38b984c..8f815ce 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vdpphps-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXbf16-2.c
index 2e5c424..6a50ede 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmaddXXXbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXbf16-2.c
index 983ca2e..5869c5c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfmsubXXXbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXbf16-2.c
index 0dd1996..2173cd3 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmaddXXXbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXbf16-2.c
index 95ed19c..dc323fa 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfnmsubXXXbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclassbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclassbf16-2.c
index 55b3a83..1e8609d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclassbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vfpclassbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexpbf16-2.c
index 577e20a..a920db5 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetexpbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantbf16-2.c
index 0c58873..82e3663 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vgetmantbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxbf16-2.c
index 2485e80..75236c6 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmaxbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminbf16-2.c
index 7591edf..3ca03cf 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxbf16-2.c
index 4356d93..b1a7bed 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c
index c0839c1..7bb531f 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxpd-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c
index 8759fd1..7647f8e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxph-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c
index 42864a4..1eaa0b2 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vminmaxps-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c
index 61219d2..a0a90f7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmpsadbw-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmulbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmulbf16-2.c
index 6e03d71..fe65d95 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vmulbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vmulbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c
index 04d142f..493cd2b 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssd-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c
index 75e7a8b..479b893 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbssds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c
index 6278b44..d0c090d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsud-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c
index a7e0fc9..8d89c33 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbsuds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c
index 3757303..37a4a54 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuud-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c
index 56ba154..8b18d6f 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpbuuds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c
index 1f72021..824f814 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsud-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c
index e4977aa..7e51349 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwsuds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c
index 121b846..4727d91 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusd-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c
index d89e4a2..9f965df 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwusds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c
index dc4fcb2..bf0a564 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuud-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c
index bd42480..c075e0e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vpdpwuuds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrcpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrcpbf16-2.c
index 9bb620eb..28c7ada 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrcpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrcpbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vreducebf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vreducebf16-2.c
index 1bfca41..d506389 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vreducebf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vreducebf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalebf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalebf16-2.c
index 6f671d8..1b29fc6 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalebf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrndscalebf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtbf16-2.c
index 3858c1c..444b332 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vrsqrtbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefbf16-2.c
index f3f588d..b1c5f4b 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vscalefbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtbf16-2.c
index 09d87ec..12f87b3 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vsqrtbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-512-vsubbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-512-vsubbf16-2.c
index 7e8df5f..16a5ace 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-512-vsubbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-512-vsubbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#ifndef AVX10_2
#define AVX10_2
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-1.c
index 607730f..9b33b91 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-cmp-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-cmp-1.c
index 837491c..79bddb5 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-cmp-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-cmp-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vcmpbf16" 10 } } */
typedef __bf16 v16bf __attribute__ ((__vector_size__ (32)));
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-fma-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-fma-1.c
index f39c254..05f86f7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-fma-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-fma-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vfmadd132bf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vfmsub132bf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vfnmadd132bf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-operations-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-operations-1.c
index 5945b0d..530167b 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-operations-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-operations-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vmulbf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vdivbf16\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-smaxmin-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-smaxmin-1.c
index 6acab8f..703ea64 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-smaxmin-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-bf16-vector-smaxmin-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -Ofast" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -Ofast" } */
/* { dg-final { scan-assembler-times "vmaxbf16" 2 } } */
/* { dg-final { scan-assembler-times "vminbf16" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c
index 1837674..2c793cf 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-builtin-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -march=x86-64-v3 -mavx10.2-256 -mno-avxvnniint8" } */
+/* { dg-options "-O0 -march=x86-64-v3 -mavx10.2 -mno-avxvnniint8" } */
typedef int v8si __attribute__ ((vector_size (32)));
v8si
foo (v8si a, v8si b, v8si c)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c
index 33f7bf3..6eeb20e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-builtin-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -march=x86-64-v3 -mavx10.2-256 -mno-avxvnniint16" } */
+/* { dg-options "-O0 -march=x86-64-v3 -mavx10.2 -mno-avxvnniint16" } */
typedef int v8si __attribute__ ((vector_size (32)));
v8si
foo (v8si a, v8si b, v8si c)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-comibf-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-comibf-1.c
index a676756..3862f1e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-comibf-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-comibf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2 -fno-trapping-math" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2 -fno-trapping-math" } */
/* { dg-final { scan-assembler-times "vcomisbf16\[ \\t\]+\[^{}\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 6 } } */
/* { dg-final { scan-assembler-times {j[a-z]+\s} 6 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-comibf-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-comibf-2.c
index 07d5957..a70904c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-comibf-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-comibf-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2 -fno-trapping-math" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2 -fno-trapping-math" } */
+/* { dg-require-effective-target avx10_2 } */
#include <stdlib.h>
#include <stdint.h>
@@ -92,7 +92,7 @@ test_ge (__bf16 a, __bf16 b)
int
main (void)
{
- if (!__builtin_cpu_supports ("avx10.2-256"))
+ if (!__builtin_cpu_supports ("avx10.2"))
return 0;
float test_values[] = {
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-comibf-3.c b/gcc/testsuite/gcc.target/i386/avx10_2-comibf-3.c
index 26c2a80..28b2ad3 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-comibf-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-comibf-3.c
@@ -5,7 +5,7 @@
/* { dg-final { scan-assembler-times "set\[aeglnb\]+" 6 } } */
#define AVX10_ATTR \
-__attribute__((noinline, __target__("avx10.2-256"), optimize("no-trapping-math")))
+__attribute__((noinline, __target__("avx10.2"), optimize("no-trapping-math")))
AVX10_ATTR
int foo1_avx10 (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-comibf-4.c b/gcc/testsuite/gcc.target/i386/avx10_2-comibf-4.c
index c646e16..18848dd 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-comibf-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-comibf-4.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target { avx10_2_256 } } } */
+/* { dg-do run { target { avx10_2 } } } */
/* { dg-options "-march=x86-64-v3 -O2" } */
#include "avx10_2-comibf-3.c"
@@ -24,7 +24,7 @@ int foo3 (__bf16 a, __bf16 b, __bf16 c, __bf16 d)
int main (void)
{
- if (!__builtin_cpu_supports ("avx10.2-256"))
+ if (!__builtin_cpu_supports ("avx10.2"))
return 0;
__bf16 a = 0.5bf16, b = -0.25bf16, c = 1.75bf16, d = -0.125bf16;
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-compare-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-compare-1.c
index e841570..17dca5c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-compare-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-compare-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
/* { dg-final { scan-assembler-times "vcomxsd\[ \\t\]+\{sae\}\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcomxss\[ \\t\]+\{sae\}\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vucomxsd\[ \\t\]+\{sae\}\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-compare-1b.c b/gcc/testsuite/gcc.target/i386/avx10_2-compare-1b.c
index 23fa4da..cc7f820 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-compare-1b.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-compare-1b.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256 -mfpmath=sse" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2 -mfpmath=sse" } */
/* { dg-final { scan-assembler-times "comi" 6 } } */
/* { dg-final { scan-assembler-times "comx" 12 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-convert-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-convert-1.c
index 729496f..62791d0 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-convert-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-convert-1.c
@@ -1,14 +1,11 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvt2ps2phx\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtbiasph2bf8\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+,\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
@@ -124,9 +121,6 @@ avx10_2_test (void)
y2 = _mm256_mask_cvtx2ps_ph (y2, m16, a2, b2);
y2 = _mm256_maskz_cvtx2ps_ph (m16, a2, b2);
- y2 = _mm256_cvtx_round2ps_ph (a2, b2, 8);
- y2 = _mm256_mask_cvtx_round2ps_ph (y2, m16, a2, b2, 8);
- y2 = _mm256_maskz_cvtx_round2ps_ph (m16, a2, b2, 8);
}
void extern
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-media-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-media-1.c
index a34075b..bdf6a6d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-media-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-media-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vpdpbssd\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\\n\\r]*%ymm\[0-9\]+\[^\\n\\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-minmax-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-minmax-1.c
index f16d560..77aacfa 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-minmax-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-minmax-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
/* { dg-final { scan-assembler-times "vminmaxbf16\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxbf16\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxbf16\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
@@ -12,45 +12,27 @@
/* { dg-final { scan-assembler-times "vminmaxph\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxph\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxph\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxph\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxph\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxph\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxps\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\{\n\]*\[^\}\]%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxpd\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxsh\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxsh\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxsh\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxsh\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxsh\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxsh\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxss\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxss\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxss\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxss\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxss\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxss\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxsd\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxsd\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vminmaxsd\[ \\t\]+\[^\{\n\]*\[^\}\]%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxsd\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxsd\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminmaxsd\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
@@ -80,27 +62,18 @@ avx10_2_test (void)
y2 = _mm256_minmax_ph (y2, y2, 100);
y2 = _mm256_mask_minmax_ph (y2, m16, y2, y2, 100);
y2 = _mm256_maskz_minmax_ph (m16, y2, y2, 100);
- y2 = _mm256_minmax_round_ph (y2, y2, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- y2 = _mm256_mask_minmax_round_ph (y2, m16, y2, y2, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- y2 = _mm256_maskz_minmax_round_ph (m16, y2, y2, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
x3 = _mm_minmax_ps (x3, x3, 100);
x3 = _mm_mask_minmax_ps (x3, m8, x3, x3, 100);
x3 = _mm_maskz_minmax_ps (m8, x3, x3, 100);
y3 = _mm256_minmax_ps (y3, y3, 100);
y3 = _mm256_mask_minmax_ps (y3, m8, y3, y3, 100);
y3 = _mm256_maskz_minmax_ps (m8, y3, y3, 100);
- y3 = _mm256_minmax_round_ps (y3, y3, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- y3 = _mm256_mask_minmax_round_ps (y3, m8, y3, y3, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- y3 = _mm256_maskz_minmax_round_ps (m8, y3, y3, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
x4 = _mm_minmax_pd (x4, x4, 100);
x4 = _mm_mask_minmax_pd (x4, m8, x4, x4, 100);
x4 = _mm_maskz_minmax_pd (m8, x4, x4, 100);
y4 = _mm256_minmax_pd (y4, y4, 100);
y4 = _mm256_mask_minmax_pd (y4, m8, y4, y4, 100);
y4 = _mm256_maskz_minmax_pd (m8, y4, y4, 100);
- y4 = _mm256_minmax_round_pd (y4, y4, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- y4 = _mm256_mask_minmax_round_pd (y4, m8, y4, y4, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- y4 = _mm256_maskz_minmax_round_pd (m8, y4, y4, 100, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
x2 = _mm_minmax_sh (x2, x2, 1);
x2 = _mm_mask_minmax_sh (x2, m8, x2, x2, 1);
x2 = _mm_maskz_minmax_sh (m8, x2, x2, 1);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-movrs-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-movrs-1.c
index 7d1446d..e3f0bfd 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-movrs-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-movrs-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -mmovrs -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -mmovrs -O2" } */
/* { dg-final { scan-assembler-times "vmovrsb\[ \\t\]\+\\(%(?:r|e).x\\), %ymm\[0-9\]+" 3 } } */
/* { dg-final { scan-assembler-times "vmovrsb\[ \\t\]\+\\(%(?:r|e).x\\), %ymm\[0-9\]+{%k\[1-7\]}" 2 } } */
/* { dg-final { scan-assembler-times "vmovrsb\[ \\t\]\+\\(%(?:r|e).x\\), %ymm\[0-9\]+{%k\[1-7\]}{z}" 1 } } */
@@ -37,7 +37,7 @@ volatile __mmask16 m3;
void extern
-avx512movrs_test (void)
+avx10_movrs_test (void)
{
x1 = _mm256_loadrs_epi8(px1);
x1 = _mm256_mask_loadrs_epi8(x1, m1, px1);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fast-math-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fast-math-1.c
index 6eb74bf..28856b1 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fast-math-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fast-math-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vmulbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
/* { dg-final { scan-assembler-times "vrcpbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fma-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fma-1.c
index 3db34be..0fa63de 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fma-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-fma-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vfmadd132bf16\[^\n\r\]*xmm\[0-9\]" 3 { target ia32 } } } */
/* { dg-final { scan-assembler-times "vfmsub132bf16\[^\n\r\]*xmm\[0-9\]" 3 { target ia32 } } } */
/* { dg-final { scan-assembler-times "vfnmadd132bf16\[^\n\r\]*xmm\[0-9\]" 3 { target ia32 } } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-operations-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-operations-1.c
index a7a017c..22ba8a2 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-operations-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-operations-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vmulbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
/* { dg-final { scan-assembler-times "vaddbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
/* { dg-final { scan-assembler-times "vdivbf16\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-smaxmin-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-smaxmin-1.c
index f27e93a..59a0fc5 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-smaxmin-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-partial-bf16-vector-smaxmin-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -Ofast" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -Ofast" } */
/* { dg-final { scan-assembler-times "vmaxbf16" 2 } } */
/* { dg-final { scan-assembler-times "vminbf16" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-rounding-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-rounding-1.c
deleted file mode 100644
index 59951a3..0000000
--- a/gcc/testsuite/gcc.target/i386/avx10_2-rounding-1.c
+++ /dev/null
@@ -1,252 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vaddph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vaddph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vaddph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcmppd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcmppd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcmpph\[ \\t\]+\\\$3\[^\n\r]*\{sae\}\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%k\[0-9\]\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcmpph\[ \\t\]+\[^\{\n\]*\\\$4\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%k\[0-9\]\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcmpps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcmpps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n^k\]*%k\[0-7\]\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtdq2phy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtdq2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtdq2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2phy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2qq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtpd2uqq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2dq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2dq\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2dq\[ \\t\]+\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2pd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2pd\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2pd\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2psx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2psx\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2psx\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2qq\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2qq\[ \\t\]+\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2udq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2udq\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2udq\[ \\t\]+\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2uqq\[ \\t\]+\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2uqq\[ \\t\]+\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2uw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2uw\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2uw\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2w\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2w\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2w\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]+\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2phxy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2phx\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2phx\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2qq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2uqq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2uqq\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2uqq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-
-#include <immintrin.h>
-
-volatile __m128 hx;
-volatile __m128i hxi;
-volatile __m128h hxh;
-volatile __m256 x;
-volatile __m256d xd;
-volatile __m256h xh;
-volatile __m256i xi;
-volatile __mmask8 m8;
-volatile __mmask16 m16;
-volatile __mmask32 m32;
-
-void extern
-avx10_2_test_1 (void)
-{
- xd = _mm256_add_round_pd (xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_add_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_add_round_pd (m8, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_add_round_ph (xh, xh, 8);
- xh = _mm256_mask_add_round_ph (xh, m32, xh, xh, 8);
- xh = _mm256_maskz_add_round_ph (m32, xh, xh, 11);
-
- x = _mm256_add_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_add_round_ps (x, m16, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_add_round_ps (m16, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_2 (void)
-{
- m8 = _mm256_cmp_round_pd_mask (xd, xd, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
- m8 = _mm256_mask_cmp_round_pd_mask (m8, xd, xd, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
-
- m16 = _mm256_cmp_round_ph_mask (xh, xh, 3, 8);
- m16 = _mm256_mask_cmp_round_ph_mask (m16, xh, xh, 4, 4);
-
- m8 = _mm256_cmp_round_ps_mask (x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
- m8 = _mm256_mask_cmp_round_ps_mask (m8, x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_3 (void)
-{
- hxh = _mm256_cvt_roundepi32_ph (xi, 4);
- hxh = _mm256_mask_cvt_roundepi32_ph (hxh, m8, xi, 8);
- hxh = _mm256_maskz_cvt_roundepi32_ph (m8, xi, 11);
-
- x = _mm256_cvt_roundepi32_ps (xi, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_cvt_roundepi32_ps (x, m8, xi, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_cvt_roundepi32_ps (m8, xi, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_4 (void)
-{
- hxh = _mm256_cvt_roundpd_ph (xd, 4);
- hxh = _mm256_mask_cvt_roundpd_ph (hxh, m8, xd, 8);
- hxh = _mm256_maskz_cvt_roundpd_ph (m8, xd, 11);
-
- hx = _mm256_cvt_roundpd_ps (xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- hx = _mm256_mask_cvt_roundpd_ps (hx, 4, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- hx = _mm256_maskz_cvt_roundpd_ps (6, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_5 (void)
-{
- hxi = _mm256_cvt_roundpd_epi32 (xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- hxi = _mm256_mask_cvt_roundpd_epi32 (hxi, m8, xd, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- hxi = _mm256_maskz_cvt_roundpd_epi32 (m8, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvt_roundpd_epi64 (xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvt_roundpd_epi64 (xi, m8, xd, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvt_roundpd_epi64 (m8, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- hxi = _mm256_cvt_roundpd_epu32 (xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- hxi = _mm256_mask_cvt_roundpd_epu32 (hxi, m8, xd, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- hxi = _mm256_maskz_cvt_roundpd_epu32 (m8, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvt_roundpd_epu64 (xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvt_roundpd_epu64 (xi, m8, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvt_roundpd_epu64 (m8, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_6 (void)
-{
- xi = _mm256_cvt_roundph_epi32 (hxh, 4);
- xi = _mm256_mask_cvt_roundph_epi32 (xi, m8, hxh, 8);
- xi = _mm256_maskz_cvt_roundph_epi32 (m8, hxh, 11);
-
- xi = _mm256_cvt_roundph_epi64 (hxh, 4);
- xi = _mm256_mask_cvt_roundph_epi64 (xi, m8, hxh, 8);
- xi = _mm256_maskz_cvt_roundph_epi64 (m8, hxh, 11);
-
- xi = _mm256_cvt_roundph_epu32 (hxh, 4);
- xi = _mm256_mask_cvt_roundph_epu32 (xi, m8, hxh, 8);
- xi = _mm256_maskz_cvt_roundph_epu32 (m8, hxh, 11);
-
- xi = _mm256_cvt_roundph_epu64 (hxh, 4);
- xi = _mm256_mask_cvt_roundph_epu64 (xi, m8, hxh, 8);
- xi = _mm256_maskz_cvt_roundph_epu64 (m8, hxh, 11);
-}
-
-void extern
-avx10_2_test_7 (void)
-{
- xd = _mm256_cvt_roundph_pd (hxh, 4);
- xd = _mm256_mask_cvt_roundph_pd (xd, m8, hxh, 8);
- xd = _mm256_maskz_cvt_roundph_pd (m8, hxh, 8);
-
- x = _mm256_cvt_roundph_ps (hxh, _MM_FROUND_NO_EXC);
- x = _mm256_mask_cvt_roundph_ps (x, 4, hxh, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_cvt_roundph_ps (6, hxh, _MM_FROUND_NO_EXC);
-
- x = _mm256_cvtx_roundph_ps (hxh, 4);
- x = _mm256_mask_cvtx_roundph_ps (x, m8, hxh, 8);
- x = _mm256_maskz_cvtx_roundph_ps (m8, hxh, 8);
-}
-
-void extern
-avx10_2_test_8 (void)
-{
- xi = _mm256_cvt_roundph_epu16 (xh, 4);
- xi = _mm256_mask_cvt_roundph_epu16 (xi, m16, xh, 8);
- xi = _mm256_maskz_cvt_roundph_epu16 (m16, xh, 11);
-
- xi = _mm256_cvt_roundph_epi16 (xh, 4);
- xi = _mm256_mask_cvt_roundph_epi16 (xi, m16, xh, 8);
- xi = _mm256_maskz_cvt_roundph_epi16 (m16, xh, 11);
-}
-
-void extern
-avx10_2_test_9 (void)
-{
- xd = _mm256_cvt_roundps_pd (hx, _MM_FROUND_NO_EXC);
- xd = _mm256_mask_cvt_roundps_pd (xd, m8, hx, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_cvt_roundps_pd (m8, hx, _MM_FROUND_NO_EXC);
-
- hxh = _mm256_cvtx_roundps_ph (x, 4);
- hxh = _mm256_mask_cvtx_roundps_ph (hxh, m8, x, 8);
- hxh = _mm256_maskz_cvtx_roundps_ph (m8, x, 11);
-}
-
-void extern
-avx10_2_test_10 (void)
-{
- xi = _mm256_cvt_roundps_epi32 (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvt_roundps_epi32 (xi, m8, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvt_roundps_epi32 (m8, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvt_roundps_epi64 (hx, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvt_roundps_epi64 (xi, m8, hx, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvt_roundps_epi64 (m8, hx, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvt_roundps_epu32 (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvt_roundps_epu32 (xi, m8, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvt_roundps_epu32 (m8, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvt_roundps_epu64 (hx, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvt_roundps_epu64 (xi, m8, hx, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvt_roundps_epu64 (m8, hx, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-rounding-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-rounding-2.c
deleted file mode 100644
index cc2d780..0000000
--- a/gcc/testsuite/gcc.target/i386/avx10_2-rounding-2.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-final { scan-assembler-times "vcvtqq2pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtqq2pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtqq2pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtqq2phy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtqq2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtqq2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtqq2ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtqq2ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtqq2ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2qq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2uqq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2dq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2dq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2dq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2qq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2udq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2udq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2udq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2uqq\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2uqq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2uqq\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2uw\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2uw\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2uw\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2w\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2w\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2w\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2qq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2uqq\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtudq2phy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtudq2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtudq2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2phy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuqq2ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%ymm\[0-9\]+\[^\{\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-
-#include <immintrin.h>
-
-volatile __m128 hx;
-volatile __m128i hxi;
-volatile __m128h hxh;
-volatile __m256 x;
-volatile __m256d xd;
-volatile __m256h xh;
-volatile __m256i xi;
-volatile __mmask8 m8;
-volatile __mmask16 m16;
-volatile __mmask32 m32;
-
-void extern
-avx10_2_test_1 (void)
-{
- xd = _mm256_cvt_roundepi64_pd (xi, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_cvt_roundepi64_pd (xd, m8, xi, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_cvt_roundepi64_pd (m8, xi, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- hxh = _mm256_cvt_roundepi64_ph (xi, 4);
- hxh = _mm256_mask_cvt_roundepi64_ph (hxh, m8, xi, 8);
- hxh = _mm256_maskz_cvt_roundepi64_ph (m8, xi, 11);
-
- hx = _mm256_cvt_roundepi64_ps (xi, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- hx = _mm256_mask_cvt_roundepi64_ps (hx, m8, xi, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- hx = _mm256_maskz_cvt_roundepi64_ps (m8, xi, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_2 (void)
-{
- hxi = _mm256_cvtt_roundpd_epi32 (xd, _MM_FROUND_NO_EXC);
- hxi = _mm256_mask_cvtt_roundpd_epi32 (hxi, m8, xd, _MM_FROUND_NO_EXC);
- hxi = _mm256_maskz_cvtt_roundpd_epi32 (m8, xd, _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvtt_roundpd_epi64 (xd, _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvtt_roundpd_epi64 (xi, m8, xd, _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvtt_roundpd_epi64 (m8, xd, _MM_FROUND_NO_EXC);
-
- hxi = _mm256_cvtt_roundpd_epu32 (xd, _MM_FROUND_NO_EXC);
- hxi = _mm256_mask_cvtt_roundpd_epu32 (hxi, m8, xd, _MM_FROUND_NO_EXC);
- hxi = _mm256_maskz_cvtt_roundpd_epu32 (m8, xd, _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvtt_roundpd_epu64 (xd, _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvtt_roundpd_epu64 (xi, m8, xd, _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvtt_roundpd_epu64 (m8, xd, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_3 (void)
-{
- xi = _mm256_cvtt_roundph_epi32 (hxh, 4);
- xi = _mm256_mask_cvtt_roundph_epi32 (xi, m8, hxh, 8);
- xi = _mm256_maskz_cvtt_roundph_epi32 (m8, hxh, 8);
-
- xi = _mm256_cvtt_roundph_epi64 (hxh, 4);
- xi = _mm256_mask_cvtt_roundph_epi64 (xi, m8, hxh, 8);
- xi = _mm256_maskz_cvtt_roundph_epi64 (m8, hxh, 8);
-
- xi = _mm256_cvtt_roundph_epu32 (hxh, 4);
- xi = _mm256_mask_cvtt_roundph_epu32 (xi, m8, hxh, 8);
- xi = _mm256_maskz_cvtt_roundph_epu32 (m8, hxh, 8);
-
- xi = _mm256_cvtt_roundph_epu64 (hxh, 4);
- xi = _mm256_mask_cvtt_roundph_epu64 (xi, m8, hxh, 8);
- xi = _mm256_maskz_cvtt_roundph_epu64 (m8, hxh, 8);
-
- xi = _mm256_cvtt_roundph_epu16 (xh, 4);
- xi = _mm256_mask_cvtt_roundph_epu16 (xi, m16, xh, 8);
- xi = _mm256_maskz_cvtt_roundph_epu16 (m16, xh, 8);
-
- xi = _mm256_cvtt_roundph_epi16 (xh, 4);
- xi = _mm256_mask_cvtt_roundph_epi16 (xi, m16, xh, 8);
- xi = _mm256_maskz_cvtt_roundph_epi16 (m16, xh, 8);
-}
-
-void extern
-avx10_2_test_4 (void)
-{
- xi = _mm256_cvtt_roundps_epi32 (x, _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvtt_roundps_epi32 (xi, m8, x, _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvtt_roundps_epi32 (m8, x, _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvtt_roundps_epi64 (hx, _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvtt_roundps_epi64 (xi, m8, hx, _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvtt_roundps_epi64 (m8, hx, _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvtt_roundps_epu32 (x, _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvtt_roundps_epu32 (xi, m8, x, _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvtt_roundps_epu32 (m8, x, _MM_FROUND_NO_EXC);
-
- xi = _mm256_cvtt_roundps_epu64 (hx, _MM_FROUND_NO_EXC);
- xi = _mm256_mask_cvtt_roundps_epu64 (xi, m8, hx, _MM_FROUND_NO_EXC);
- xi = _mm256_maskz_cvtt_roundps_epu64 (m8, hx, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_5 (void)
-{
- hxh = _mm256_cvt_roundepu32_ph (xi, 4);
- hxh = _mm256_mask_cvt_roundepu32_ph (hxh, m8, xi, 8);
- hxh = _mm256_maskz_cvt_roundepu32_ph (m8, xi, 11);
-
- x = _mm256_cvt_roundepu32_ps (xi, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_cvt_roundepu32_ps (x, m8, xi, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_cvt_roundepu32_ps (m8, xi, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_6 (void)
-{
- xd = _mm256_cvt_roundepu64_pd (xi, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_cvt_roundepu64_pd (xd, m8, xi, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_cvt_roundepu64_pd (m8, xi, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- hxh = _mm256_cvt_roundepu64_ph (xi, 4);
- hxh = _mm256_mask_cvt_roundepu64_ph (hxh, m8, xi, 8);
- hxh = _mm256_maskz_cvt_roundepu64_ph (m8, xi, 11);
-
- hx = _mm256_cvt_roundepu64_ps (xi, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- hx = _mm256_mask_cvt_roundepu64_ps (hx, m8, xi, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- hx = _mm256_maskz_cvt_roundepu64_ps (m8, xi, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-rounding-3.c b/gcc/testsuite/gcc.target/i386/avx10_2-rounding-3.c
deleted file mode 100644
index 57839f4..0000000
--- a/gcc/testsuite/gcc.target/i386/avx10_2-rounding-3.c
+++ /dev/null
@@ -1,601 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-final { scan-assembler-times "vcvtuw2ph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuw2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtuw2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtw2ph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmaddcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmaddcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vfcmaddcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vfcmulcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...ph\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...ph\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd231ph\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...ph\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vfmaddcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...ph\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...ph\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub231ph\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...ph\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...ph\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...ph\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub231ph\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...ph\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...ph\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...ph\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd231ph\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...ph\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vfmulcph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...ph\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...ph\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231ph\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...ph\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...ph\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...ph\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231ph\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vfnmsub...ph\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexpph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexpph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexpph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmaxph\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmaxph\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vmaxph\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminph\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminph\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 2 } } */
-/* { dg-final { scan-assembler-times "vminph\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrangepd\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrangeps\[ \\t\]+\[^\$\n\]*\\$\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreducepd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreducepd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreducepd\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreduceph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreduceph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreduceph\[ \\t\]+\[^\{\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vreduceps\[ \\t\]+\[^\{\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscalepd\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscalepd\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscalepd\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscaleph\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscaleph\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscaleph\[ \\t\]+\[^\n\]*\{sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%ymm\[0-9\]+\[^\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtph\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubph\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-
-#include <immintrin.h>
-
-volatile __m128 hx;
-volatile __m128i hxi;
-volatile __m128h hxh;
-volatile __m256 x;
-volatile __m256d xd;
-volatile __m256h xh;
-volatile __m256i xi;
-volatile __mmask8 m8;
-volatile __mmask16 m16;
-volatile __mmask32 m32;
-
-void extern
-avx10_2_test_1 (void)
-{
- xh = _mm256_cvt_roundepu16_ph (xi, 4);
- xh = _mm256_mask_cvt_roundepu16_ph (xh, m16, xi, 8);
- xh = _mm256_maskz_cvt_roundepu16_ph (m16, xi, 11);
-
- xh = _mm256_cvt_roundepi16_ph (xi, 4);
- xh = _mm256_mask_cvt_roundepi16_ph (xh, m16, xi, 8);
- xh = _mm256_maskz_cvt_roundepi16_ph (m16, xi, 11);
-}
-
-void extern
-avx10_2_test_2 (void)
-{
- xd = _mm256_div_round_pd (xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_div_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_div_round_pd (m8, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_div_round_ph (xh, xh, 8);
- xh = _mm256_mask_div_round_ph (xh, m16, xh, xh, 8);
- xh = _mm256_maskz_div_round_ph (m16, xh, xh, 11);
-
- x = _mm256_div_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_div_round_ps (x, m16, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_div_round_ps (m16, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_3 (void)
-{
- xh = _mm256_fcmadd_round_pch (xh, xh, xh, 8);
- xh = _mm256_mask_fcmadd_round_pch (xh, m8, xh, xh, 8);
- xh = _mm256_mask3_fcmadd_round_pch (xh, xh, xh, m8, 8);
- xh = _mm256_maskz_fcmadd_round_pch (m8, xh, xh, xh, 11);
-}
-
-void extern
-avx10_2_test_4 (void)
-{
- xh = _mm256_fcmul_round_pch (xh, xh, 8);
- xh = _mm256_mask_fcmul_round_pch (xh, m8, xh, xh, 8);
- xh = _mm256_maskz_fcmul_round_pch (m8, xh, xh, 11);
-}
-
-void extern
-avx10_2_test_5 (void)
-{
- xh = _mm256_cmul_round_pch (xh, xh, 8);
- xh = _mm256_mask_cmul_round_pch (xh, m8, xh, xh, 8);
- xh = _mm256_maskz_cmul_round_pch (m8, xh, xh, 11);
-}
-
-void extern
-avx10_2_test_6 (void)
-{
- xd = _mm256_fixupimm_round_pd (xd, xd, xi, 3, _MM_FROUND_NO_EXC);
- xd = _mm256_mask_fixupimm_round_pd (xd, m8, xd, xi, 3, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_fixupimm_round_pd (m8, xd, xd, xi, 3, _MM_FROUND_NO_EXC);
-
- x = _mm256_fixupimm_round_ps (x, x, xi, 3, _MM_FROUND_NO_EXC);
- x = _mm256_mask_fixupimm_round_ps (x, m8, x, xi, 3, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_fixupimm_round_ps (m8, x, x, xi, 3, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_7 (void)
-{
- xd = _mm256_fmadd_round_pd (xd, xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_fmadd_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_mask3_fmadd_round_pd (xd, xd, xd, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_fmadd_round_pd (m8, xd, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_fmadd_round_ph (xh, xh, xh, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xh = _mm256_mask_fmadd_round_ph (xh, m16, xh, xh, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_mask3_fmadd_round_ph (xh, xh, xh, m16, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_fmadd_round_ph (m16, xh, xh, xh, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- x = _mm256_fmadd_round_ps (x, x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_fmadd_round_ps (x, m8, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- x = _mm256_mask3_fmadd_round_ps (x, x, x, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_fmadd_round_ps (m8, x, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_8 (void)
-{
- xh = _mm256_fmadd_round_pch (xh, xh, xh, 8);
- xh = _mm256_mask_fmadd_round_pch (xh, m8, xh, xh, 8);
- xh = _mm256_mask3_fmadd_round_pch (xh, xh, xh, m8, 8);
- xh = _mm256_maskz_fmadd_round_pch (m8, xh, xh, xh, 11);
-}
-
-void extern
-avx10_2_test_9 (void)
-{
- xd = _mm256_fmaddsub_round_pd (xd, xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_fmaddsub_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_mask3_fmaddsub_round_pd (xd, xd, xd, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_fmaddsub_round_pd (m8, xd, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_fmaddsub_round_ph (xh, xh, xh, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xh = _mm256_mask_fmaddsub_round_ph (xh, m8, xh, xh, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_mask3_fmaddsub_round_ph (xh, xh, xh, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_fmaddsub_round_ph (m8, xh, xh, xh, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- x = _mm256_fmaddsub_round_ps (x, x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_fmaddsub_round_ps (x, m8, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- x = _mm256_mask3_fmaddsub_round_ps (x, x, x, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_fmaddsub_round_ps (m8, x, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_10 (void)
-{
- xd = _mm256_fmsub_round_pd (xd, xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_fmsub_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_mask3_fmsub_round_pd (xd, xd, xd, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_fmsub_round_pd (m8, xd, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_fmsub_round_ph (xh, xh, xh, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xh = _mm256_mask_fmsub_round_ph (xh, m8, xh, xh, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_mask3_fmsub_round_ph (xh, xh, xh, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_fmsub_round_ph (m8, xh, xh, xh, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- x = _mm256_fmsub_round_ps (x, x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_fmsub_round_ps (x, m8, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- x = _mm256_mask3_fmsub_round_ps (x, x, x, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_fmsub_round_ps (m8, x, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_11 (void)
-{
- xd = _mm256_fmsubadd_round_pd (xd, xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_fmsubadd_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_mask3_fmsubadd_round_pd (xd, xd, xd, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_fmsubadd_round_pd (m8, xd, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_fmsubadd_round_ph (xh, xh, xh, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xh = _mm256_mask_fmsubadd_round_ph (xh, m8, xh, xh, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_mask3_fmsubadd_round_ph (xh, xh, xh, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_fmsubadd_round_ph (m8, xh, xh, xh, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- x = _mm256_fmsubadd_round_ps (x, x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_fmsubadd_round_ps (x, m8, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- x = _mm256_mask3_fmsubadd_round_ps (x, x, x, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_fmsubadd_round_ps (m8, x, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_12 (void)
-{
- xh = _mm256_fmul_round_pch (xh, xh, 8);
- xh = _mm256_mask_fmul_round_pch (xh, m8, xh, xh, 8);
- xh = _mm256_maskz_fmul_round_pch (m8, xh, xh, 11);
-}
-
-void extern
-avx10_2_test_13 (void)
-{
- xh = _mm256_mul_round_pch (xh, xh, 8);
- xh = _mm256_mask_mul_round_pch (xh, m8, xh, xh, 8);
- xh = _mm256_maskz_mul_round_pch (m8, xh, xh, 11);
-}
-
-void extern
-avx10_2_test_14 (void)
-{
- xd = _mm256_fnmadd_round_pd (xd, xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_fnmadd_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_mask3_fnmadd_round_pd (xd, xd, xd, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_fnmadd_round_pd (m8, xd, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_fnmadd_round_ph (xh, xh, xh, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xh = _mm256_mask_fnmadd_round_ph (xh, m8, xh, xh, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_mask3_fnmadd_round_ph (xh, xh, xh, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_fnmadd_round_ph (m8, xh, xh, xh, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- x = _mm256_fnmadd_round_ps (x, x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_fnmadd_round_ps (x, m8, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- x = _mm256_mask3_fnmadd_round_ps (x, x, x, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_fnmadd_round_ps (m8, x, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_15 (void)
-{
- xd = _mm256_fnmsub_round_pd (xd, xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_fnmsub_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_mask3_fnmsub_round_pd (xd, xd, xd, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_fnmsub_round_pd (m8, xd, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_fnmsub_round_ph (xh, xh, xh, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xh = _mm256_mask_fnmsub_round_ph (xh, m8, xh, xh, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_mask3_fnmsub_round_ph (xh, xh, xh, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_fnmsub_round_ph (m8, xh, xh, xh, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- x = _mm256_fnmsub_round_ps (x, x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_fnmsub_round_ps (x, m8, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- x = _mm256_mask3_fnmsub_round_ps (x, x, x, m8, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_fnmsub_round_ps (m8, x, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_16 (void)
-{
- xd = _mm256_getexp_round_pd (xd, _MM_FROUND_NO_EXC);
- xd = _mm256_mask_getexp_round_pd (xd, m8, xd, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_getexp_round_pd (m8, xd, _MM_FROUND_NO_EXC);
-
- xh = _mm256_getexp_round_ph (xh, _MM_FROUND_NO_EXC);
- xh = _mm256_mask_getexp_round_ph (xh, m16, xh, _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_getexp_round_ph (m16, xh, _MM_FROUND_NO_EXC);
-
- x = _mm256_getexp_round_ps (x, _MM_FROUND_NO_EXC);
- x = _mm256_mask_getexp_round_ps (x, m8, x, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_getexp_round_ps (m8, x, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_17 (void)
-{
- xd = _mm256_getmant_round_pd (xd, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src,
- _MM_FROUND_NO_EXC);
- xd = _mm256_mask_getmant_round_pd (xd, m8, xd, _MM_MANT_NORM_p75_1p5,
- _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_getmant_round_pd (m8, xd, _MM_MANT_NORM_p75_1p5,
- _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
-
- xh = _mm256_getmant_round_ph (xh, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src,
- _MM_FROUND_NO_EXC);
- xh = _mm256_mask_getmant_round_ph (xh, m16, xh, _MM_MANT_NORM_p75_1p5,
- _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_getmant_round_ph (m16, xh, _MM_MANT_NORM_p75_1p5,
- _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
-
- x = _mm256_getmant_round_ps (x, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src,
- _MM_FROUND_NO_EXC);
- x = _mm256_mask_getmant_round_ps (x, m8, x, _MM_MANT_NORM_p75_1p5,
- _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_getmant_round_ps (m8, x, _MM_MANT_NORM_p75_1p5,
- _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_18 (void)
-{
- xd = _mm256_max_round_pd (xd, xd, _MM_FROUND_NO_EXC);
- xd = _mm256_mask_max_round_pd (xd, m8, xd, xd, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_max_round_pd (m8, xd, xd, _MM_FROUND_NO_EXC);
-
- xh = _mm256_max_round_ph (xh, xh, _MM_FROUND_NO_EXC);
- xh = _mm256_mask_max_round_ph (xh, m16, xh, xh, _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_max_round_ph (m16, xh, xh, _MM_FROUND_NO_EXC);
-
- x = _mm256_max_round_ps (x, x, _MM_FROUND_NO_EXC);
- x = _mm256_mask_max_round_ps (x, m8, x, x, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_max_round_ps (m8, x, x, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_19 (void)
-{
- xd = _mm256_min_round_pd (xd, xd, _MM_FROUND_NO_EXC);
- xd = _mm256_mask_min_round_pd (xd, m8, xd, xd, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_min_round_pd (m8, xd, xd, _MM_FROUND_NO_EXC);
-
- xh = _mm256_min_round_ph (xh, xh, _MM_FROUND_NO_EXC);
- xh = _mm256_mask_min_round_ph (xh, m16, xh, xh, _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_min_round_ph (m16, xh, xh, _MM_FROUND_NO_EXC);
-
- x = _mm256_min_round_ps (x, x, _MM_FROUND_NO_EXC);
- x = _mm256_mask_min_round_ps (x, m8, x, x, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_min_round_ps (m8, x, x, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_20 (void)
-{
- xd = _mm256_mul_round_pd (xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_mul_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_mul_round_pd (m8, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_mul_round_ph (xh, xh, 8);
- xh = _mm256_mask_mul_round_ph (xh, m16, xh, xh, 8);
- xh = _mm256_maskz_mul_round_ph (m16, xh, xh, 11);
-
- x = _mm256_mul_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_mul_round_ps (x, m8, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_mul_round_ps (m8, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_21 (void)
-{
- xd = _mm256_range_round_pd (xd, xd, 15, _MM_FROUND_NO_EXC);
- xd = _mm256_mask_range_round_pd (xd, m8, xd, xd, 15, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_range_round_pd (m8, xd, xd, 15, _MM_FROUND_NO_EXC);
-
- x = _mm256_range_round_ps (x, x, 15, _MM_FROUND_NO_EXC);
- x = _mm256_mask_range_round_ps (x, m16, x, x, 15, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_range_round_ps (m16, x, x, 15, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_22 (void)
-{
- xd = _mm256_reduce_round_pd (xd, 123, _MM_FROUND_NO_EXC);
- xd = _mm256_mask_reduce_round_pd (xd, m8, xd, 123, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_reduce_round_pd (m8, xd, 123, _MM_FROUND_NO_EXC);
-
- xh = _mm256_reduce_round_ph (xh, 123, _MM_FROUND_NO_EXC);
- xh = _mm256_mask_reduce_round_ph (xh, m16, xh, 123, _MM_FROUND_NO_EXC);
- xh = _mm256_maskz_reduce_round_ph (m16, xh, 123, _MM_FROUND_NO_EXC);
-
- x = _mm256_reduce_round_ps (x, 123, _MM_FROUND_NO_EXC);
- x = _mm256_mask_reduce_round_ps (x, m8, x, 123, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_reduce_round_ps (m8, x, 123, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_23 (void)
-{
- xd = _mm256_roundscale_round_pd (xd, 0x42, _MM_FROUND_NO_EXC);
- xd = _mm256_mask_roundscale_round_pd (xd, 2, xd, 0x42, _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_roundscale_round_pd (2, xd, 0x42, _MM_FROUND_NO_EXC);
-
- xh = _mm256_roundscale_round_ph (xh, 123, 8);
- xh = _mm256_mask_roundscale_round_ph (xh, m16, xh, 123, 8);
- xh = _mm256_maskz_roundscale_round_ph (m16, xh, 123, 8);
-
- x = _mm256_roundscale_round_ps (x, 0x42, _MM_FROUND_NO_EXC);
- x = _mm256_mask_roundscale_round_ps (x, 2, x, 0x42, _MM_FROUND_NO_EXC);
- x = _mm256_maskz_roundscale_round_ps (2, x, 0x42, _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_24 (void)
-{
- xd = _mm256_scalef_round_pd (xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_scalef_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_scalef_round_pd (m8, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_scalef_round_ph (xh, xh, 8);
- xh = _mm256_mask_scalef_round_ph (xh, m16, xh, xh, 8);
- xh = _mm256_maskz_scalef_round_ph (m16, xh, xh, 11);
-
- x = _mm256_scalef_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_scalef_round_ps (x, m8, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_scalef_round_ps (m8, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_25 (void)
-{
- xd = _mm256_sqrt_round_pd (xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_sqrt_round_pd (xd, m8, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_sqrt_round_pd (m8, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_sqrt_round_ph (xh, 4);
- xh = _mm256_mask_sqrt_round_ph (xh, m16, xh, 8);
- xh = _mm256_maskz_sqrt_round_ph (m16, xh, 11);
-
- x = _mm256_sqrt_round_ps (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_sqrt_round_ps (x, m8, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_sqrt_round_ps (m8, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
-
-void extern
-avx10_2_test_26 (void)
-{
- xd = _mm256_sub_round_pd (xd, xd, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- xd = _mm256_mask_sub_round_pd (xd, m8, xd, xd, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
- xd = _mm256_maskz_sub_round_pd (m8, xd, xd, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-
- xh = _mm256_sub_round_ph (xh, xh, 8);
- xh = _mm256_mask_sub_round_ph (xh, m16, xh, xh, 8);
- xh = _mm256_maskz_sub_round_ph (m16, xh, xh, 11);
-
- x = _mm256_sub_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
- x = _mm256_mask_sub_round_ps (x, m8, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
- x = _mm256_maskz_sub_round_ps (m8, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
-}
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c
index dd8b874..4ae1fc1 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-satcvt-1.c
@@ -1,45 +1,29 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2ibs\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtph2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtph2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtph2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2iubs\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtph2iubs\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttph2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttph2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttph2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2ibs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2ibs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttph2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttph2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttph2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2iubs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttph2iubs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtps2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtps2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2ibs\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2ibs\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtps2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtps2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2iubs\[ \\t\]+\{rn-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvtps2iubs\[ \\t\]+\{rz-sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttps2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2ibs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2ibs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttps2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2iubs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2iubs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2iubs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtbf162ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtbf162ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\[^\{\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvtbf162ibs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}\[^\n\r]*(?:\n|\[ \\t\]+#)" 1 } } */
@@ -91,51 +75,27 @@
/* { dg-final { scan-assembler-times "vcvttpd2dqsy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2dqsy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2dqsy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2dqsy\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2dqsy\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2dqsy\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2qqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2qqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2qqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2qqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2qqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2qqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2udqsy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2udqsy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2udqsy\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2udqsy\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2udqsy\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2udqsy\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2uqqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2uqqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2uqqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2uqqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2uqqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttpd2uqqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2dqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2dqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2dqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2dqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2dqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2dqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2qqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2qqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2qqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2qqs\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2qqs\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2qqs\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2udqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2udqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2udqs\[ \\t\]+\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2udqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2udqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2udqs\[ \\t\]+\{sae\}\[^\{\n\]*%ymm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
-/* { dg-final { scan-assembler-times "vcvttps2uqqs\[ \\t\]+\{sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%ymm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2dqsx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2dqsx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}(?:\n|\[ \\t\]+#)" 1 } } */
/* { dg-final { scan-assembler-times "vcvttpd2dqsx\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+\[^\n\r]*%xmm\[0-9\]+\{%k\[0-9\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
@@ -202,58 +162,34 @@ avx10_2_test (void)
xi = _mm256_ipcvts_ph_epi8 (xh);
xi = _mm256_mask_ipcvts_ph_epi8 (xi, m16, xh);
xi = _mm256_maskz_ipcvts_ph_epi8 (m16, xh);
- xi = _mm256_ipcvts_roundph_epi8 (xh, 4);
- xi = _mm256_mask_ipcvts_roundph_epi8 (xi, m16, xh, 8);
- xi = _mm256_maskz_ipcvts_roundph_epi8 (m16, xh, 11);
xi = _mm256_ipcvts_ph_epu8 (xh);
xi = _mm256_mask_ipcvts_ph_epu8 (xi, m16, xh);
xi = _mm256_maskz_ipcvts_ph_epu8 (m16, xh);
- xi = _mm256_ipcvts_roundph_epu8 (xh, 4);
- xi = _mm256_mask_ipcvts_roundph_epu8 (xi, m16, xh, 8);
- xi = _mm256_maskz_ipcvts_roundph_epu8 (m16, xh, 11);
xi = _mm256_ipcvtts_ph_epi8 (xh);
xi = _mm256_mask_ipcvtts_ph_epi8 (xi, m16, xh);
xi = _mm256_maskz_ipcvtts_ph_epi8 (m16, xh);
- xi = _mm256_ipcvtts_roundph_epi8 (xh, 4);
- xi = _mm256_mask_ipcvtts_roundph_epi8 (xi, m16, xh, 8);
- xi = _mm256_maskz_ipcvtts_roundph_epi8 (m16, xh, 8);
xi = _mm256_ipcvtts_ph_epu8 (xh);
xi = _mm256_mask_ipcvtts_ph_epu8 (xi, m16, xh);
xi = _mm256_maskz_ipcvtts_ph_epu8 (m16, xh);
- xi = _mm256_ipcvtts_roundph_epu8 (xh, 4);
- xi = _mm256_mask_ipcvtts_roundph_epu8 (xi, m16, xh, 8);
- xi = _mm256_maskz_ipcvtts_roundph_epu8 (m16, xh, 8);
xi = _mm256_ipcvts_ps_epi8 (x);
xi = _mm256_mask_ipcvts_ps_epi8 (xi, m8, x);
xi = _mm256_maskz_ipcvts_ps_epi8 (m8, x);
- xi = _mm256_ipcvts_roundps_epi8 (x, 4);
- xi = _mm256_mask_ipcvts_roundps_epi8 (xi, m8, x, 8);
- xi = _mm256_maskz_ipcvts_roundps_epi8 (m8, x, 11);
xi = _mm256_ipcvts_ps_epu8 (x);
xi = _mm256_mask_ipcvts_ps_epu8 (xi, m8, x);
xi = _mm256_maskz_ipcvts_ps_epu8 (m8, x);
- xi = _mm256_ipcvts_roundps_epu8 (x, 4);
- xi = _mm256_mask_ipcvts_roundps_epu8 (xi, m8, x, 8);
- xi = _mm256_maskz_ipcvts_roundps_epu8 (m8, x, 11);
xi = _mm256_ipcvtts_ps_epi8 (x);
xi = _mm256_mask_ipcvtts_ps_epi8 (xi, m8, x);
xi = _mm256_maskz_ipcvtts_ps_epi8 (m8, x);
- xi = _mm256_ipcvtts_roundps_epi8 (x, 4);
- xi = _mm256_mask_ipcvtts_roundps_epi8 (xi, m8, x, 8);
- xi = _mm256_maskz_ipcvtts_roundps_epi8 (m8, x, 8);
xi = _mm256_ipcvtts_ps_epu8 (x);
xi = _mm256_mask_ipcvtts_ps_epu8 (xi, m8, x);
xi = _mm256_maskz_ipcvtts_ps_epu8 (m8, x);
- xi = _mm256_ipcvtts_roundps_epu8 (x, 4);
- xi = _mm256_mask_ipcvtts_roundps_epu8 (xi, m8, x, 8);
- xi = _mm256_maskz_ipcvtts_roundps_epu8 (m8, x, 8);
xi = _mm256_ipcvts_bf16_epi8 (xbh);
xi = _mm256_mask_ipcvts_bf16_epi8 (xi, m16, xbh);
@@ -322,58 +258,34 @@ avx10_2_test (void)
hxi = _mm256_cvtts_pd_epi32 (xd);
hxi = _mm256_mask_cvtts_pd_epi32 (hxi, m8, xd);
hxi = _mm256_maskz_cvtts_pd_epi32 (m8, xd);
- hxi = _mm256_cvtts_roundpd_epi32 (xd, 8);
- hxi = _mm256_mask_cvtts_roundpd_epi32 (hxi, m8, xd, 8);
- hxi = _mm256_maskz_cvtts_roundpd_epi32 (m8, xd, 8);
xi = _mm256_cvtts_pd_epi64 (xd);
xi = _mm256_mask_cvtts_pd_epi64 (xi, m8, xd);
xi = _mm256_maskz_cvtts_pd_epi64 (m8, xd);
- xi = _mm256_cvtts_roundpd_epi64 (xd, 8);
- xi = _mm256_mask_cvtts_roundpd_epi64 (xi, m8, xd, 8);
- xi = _mm256_maskz_cvtts_roundpd_epi64 (m8, xd, 8);
hxi = _mm256_cvtts_pd_epu32 (xd);
hxi = _mm256_mask_cvtts_pd_epu32 (hxi, m8, xd);
hxi = _mm256_maskz_cvtts_pd_epu32 (m8, xd);
- hxi = _mm256_cvtts_roundpd_epu32 (xd, 8);
- hxi = _mm256_mask_cvtts_roundpd_epu32 (hxi, m8, xd, 8);
- hxi = _mm256_maskz_cvtts_roundpd_epu32 (m8, xd, 8);
xi = _mm256_cvtts_pd_epu64 (xd);
xi = _mm256_mask_cvtts_pd_epu64 (xi, m8, xd);
xi = _mm256_maskz_cvtts_pd_epu64 (m8, xd);
- xi = _mm256_cvtts_roundpd_epu64 (xd, 8);
- xi = _mm256_mask_cvtts_roundpd_epu64 (xi, m8, xd, 8);
- xi = _mm256_maskz_cvtts_roundpd_epu64 (m8, xd, 8);
xi = _mm256_cvtts_ps_epi32 (x);
xi = _mm256_mask_cvtts_ps_epi32 (xi, m16, x);
xi = _mm256_maskz_cvtts_ps_epi32 (m16, x);
- xi = _mm256_cvtts_roundps_epi32 (x, 8);
- xi = _mm256_mask_cvtts_roundps_epi32 (xi, m16, x, 8);
- xi = _mm256_maskz_cvtts_roundps_epi32 (m16, x, 8);
xi = _mm256_cvtts_ps_epi64 (hx);
xi = _mm256_mask_cvtts_ps_epi64 (xi, m8, hx);
xi = _mm256_maskz_cvtts_ps_epi64 (m8, hx);
- xi = _mm256_cvtts_roundps_epi64 (hx, 8);
- xi = _mm256_mask_cvtts_roundps_epi64 (xi, m8, hx, 8);
- xi = _mm256_maskz_cvtts_roundps_epi64 (m8, hx, 8);
xi = _mm256_cvtts_ps_epu32 (x);
xi = _mm256_mask_cvtts_ps_epu32 (xi, m16, x);
xi = _mm256_maskz_cvtts_ps_epu32 (m16, x);
- xi = _mm256_cvtts_roundps_epu32 (x, 8);
- xi = _mm256_mask_cvtts_roundps_epu32 (xi, m16, x, 8);
- xi = _mm256_maskz_cvtts_roundps_epu32 (m16, x, 8);
xi = _mm256_cvtts_ps_epu64 (hx);
xi = _mm256_mask_cvtts_ps_epu64 (xi, m8, hx);
xi = _mm256_maskz_cvtts_ps_epu64 (m8, hx);
- xi = _mm256_cvtts_roundps_epu64 (hx, 8);
- xi = _mm256_mask_cvtts_roundps_epu64 (xi, m8, hx, 8);
- xi = _mm256_maskz_cvtts_roundps_epu64 (m8, hx, 8);
hxi = _mm_cvtts_pd_epi32 (hxd);
hxi = _mm_mask_cvtts_pd_epi32 (hxi, m8, hxd);
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vaddbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vaddbf16-2.c
index c2564b6..d880454 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vaddbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vaddbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcmpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcmpbf16-2.c
index 7ac7eda..cb6506a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcmpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcmpbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-1.c
index ac981b1..3f08ff5 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-march=x86-64-v3 -mavx10.2-256 -O2" } */
+/* { dg-options "-march=x86-64-v3 -mavx10.2 -O2" } */
/* { dg-final { scan-assembler-times "vcomisbf16\[ \\t\]+\[^{}\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 6 } } */
/* { dg-final { scan-assembler-times "jp" 2 } } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-2.c
index 1dd15a9..7266e3a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcomisbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8-2.c
index eee2539..9dd940c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8s-2.c
index ee5b35a..2a9caca 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2bf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8-2.c
index 683196b..80dc248 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8s-2.c
index 3d2c6eec..30f6a60 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ph2hf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ps2phx-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ps2phx-2.c
index 82aaa6c..125713c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ps2phx-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvt2ps2phx-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162ibs-2.c
index a328598..824ec68 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162iubs-2.c
index 7b48ee1..b8f9925 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbf162iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8-2.c
index 7769571..e3f2a81 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8s-2.c
index 9ca0104..2b9f81d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2bf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8-2.c
index 15c6dc4..27e5f210 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8s-2.c
index 0854a71..b93a1f978 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtbiasph2hf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvthf82ph-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvthf82ph-2.c
index 57203d5..d647fde 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvthf82ph-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvthf82ph-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8-2.c
index df0d10d..826b5ff 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8s-2.c
index eeee592..c5b9576 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2bf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8-2.c
index 12a4ebf..00f2928 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8s-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8s-2.c
index cea6899..a2fa0c8 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8s-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2hf8s-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2ibs-2.c
index c0261f4..2265f81 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2iubs-2.c
index ef53dd3..c4b2b575 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtph2iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2ibs-2.c
index 9f6a8ad..fdf825b 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2iubs-2.c
index d58019e..a27d5c7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvtps2iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162ibs-2.c
index 066bc06..0585048 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162iubs-2.c
index 38021ca..3082ca0 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttbf162iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2dqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2dqs-2.c
index e4f71c2..d23024d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2dqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2dqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2qqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2qqs-2.c
index 466ce37..d7aa1e5 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2qqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2qqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2udqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2udqs-2.c
index 761c7c5..88caedf 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2udqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2udqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2uqqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2uqqs-2.c
index 42fb9e7..3304eeb 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2uqqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttpd2uqqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2ibs-2.c
index 52f3e13..dfa110c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2iubs-2.c
index b37bc72..500e323 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttph2iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2dqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2dqs-2.c
index 51db01a..d2ef60b 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2dqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2dqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2ibs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2ibs-2.c
index 745c934..7002945 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2ibs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2ibs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2iubs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2iubs-2.c
index 95b6238..4c05d3c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2iubs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2iubs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2qqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2qqs-2.c
index 5a39579..a7882ad 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2qqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2qqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2udqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2udqs-2.c
index 3bb3d4c..66b654e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2udqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2udqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2uqqs-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2uqqs-2.c
index 85658bf..3f32060 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2uqqs-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttps2uqqs-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c
index 72c7fe4..8069497 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2sis-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c
index bce0043..e2b18d6 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttsd2usis-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c
index 0c64922..82db8ef 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2sis-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c
index af63bb7..c3d16ff 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vcvttss2usis-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vdivbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vdivbf16-2.c
index ad18ce8..69d5019 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vdivbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vdivbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vdpphps-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vdpphps-2.c
index c15d838..e2f422d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vdpphps-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vdpphps-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vfmaddXXXbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vfmaddXXXbf16-2.c
index c3aafae..85041d4 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vfmaddXXXbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vfmaddXXXbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vfmsubXXXbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vfmsubXXXbf16-2.c
index 7a26f17..761d5d1 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vfmsubXXXbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vfmsubXXXbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vfnmaddXXXbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vfnmaddXXXbf16-2.c
index 862a998..9b260aa 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vfnmaddXXXbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vfnmaddXXXbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vfnmsubXXXbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vfnmsubXXXbf16-2.c
index 00da303..86539f7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vfnmsubXXXbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vfnmsubXXXbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vfpclassbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vfpclassbf16-2.c
index 8fb655b6..40baeca 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vfpclassbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vfpclassbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vgetexpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vgetexpbf16-2.c
index 1447c12..e6a707c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vgetexpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vgetexpbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vgetmantbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vgetmantbf16-2.c
index 285b286..9cdec14 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vgetmantbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vgetmantbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vmaxbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vmaxbf16-2.c
index 4591d9b..950870f 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vmaxbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vmaxbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vminbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vminbf16-2.c
index 84912d0..9786127 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vminbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vminbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxbf16-2.c
index 4458ddb..0c181d9 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxpd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxpd-2.c
index 9caea72..106083d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxpd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxpd-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxph-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxph-2.c
index edbbb53..d465e7a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxph-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxph-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxps-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxps-2.c
index 1d8b4db..88aaf5b 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxps-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxps-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsd-2.c
index 7add239..b8db288 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsd-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsh-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsh-2.c
index 5037337..8ce838d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsh-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxsh-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxss-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxss-2.c
index f87cc8b..65f59ca 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxss-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vminmaxss-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-fsignaling-nans -mfpmath=sse -O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vmovd-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-vmovd-1.c
index d6bcbe5..21bd1a1 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vmovd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vmovd-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
/* { dg-final { scan-assembler-times "vmovd\t\[0-9\]+\\(%e\[bs\]p\\), %xmm0" 1 { target ia32 } } } */
/* { dg-final { scan-assembler-times "vmovss\t\[0-9\]+\\(%e\[bs\]p\\), %xmm0" 1 { target ia32 } } } */
/* { dg-final { scan-assembler-times "vmovd\t%xmm0, %xmm0" 3 { target ia32 } } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vmovd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vmovd-2.c
index ace18d6..0929950 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vmovd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vmovd-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vmovw-1.c b/gcc/testsuite/gcc.target/i386/avx10_2-vmovw-1.c
index 06712c5..49fa51d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vmovw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vmovw-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
/* { dg-final { scan-assembler-times "vmovw\t\[0-9\]+\\(%e\[bs\]p\\), %xmm0" 4 { target ia32 } } } */
/* { dg-final { scan-assembler-times "vmovw\t%xmm0, %xmm0" 4 { target ia32 } } } */
/* { dg-final { scan-assembler-times "vmovw\t%edi, %xmm0" 1 { target { ! ia32 } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vmovw-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vmovw-2.c
index 54016a5..c474638 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vmovw-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vmovw-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_SCALAR
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vmpsadbw-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vmpsadbw-2.c
index 7f01c73..fdf68e6 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vmpsadbw-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vmpsadbw-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vmulbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vmulbf16-2.c
index 8bda6d6..568c0a9 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vmulbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vmulbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssd-2.c
index 5565049..256d10e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssd-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssds-2.c
index 8302f17..88ab613 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbssds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsud-2.c
index e41c5e4..cdbd57c 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsud-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsuds-2.c
index f27983a..5e9937a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbsuds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuud-2.c
index d9fde4a..73e3f71 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuud-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuuds-2.c
index fe5a133..09c1c81 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpbuuds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsud-2.c
index 1684967..f68d3ed 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsud-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsuds-2.c
index 1e28e5f..3b3f5df 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwsuds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusd-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusd-2.c
index bf1bddf..209e62d 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusd-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusds-2.c
index 66eca16..6e9692b 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwusds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuud-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuud-2.c
index 73f87fe..8feb5d7 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuud-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuud-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuuds-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuuds-2.c
index 905038c..930839e 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuuds-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vpdpwuuds-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vrcpbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vrcpbf16-2.c
index 7d804c4..367b2cf 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vrcpbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vrcpbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vreducebf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vreducebf16-2.c
index 9d4209f..318e430 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vreducebf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vreducebf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vrndscalebf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vrndscalebf16-2.c
index a6ad6b0..5720438 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vrndscalebf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vrndscalebf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vrsqrtbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vrsqrtbf16-2.c
index 1f33d12..6083c86 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vrsqrtbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vrsqrtbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vscalefbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vscalefbf16-2.c
index bed0871..81b24f3 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vscalefbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vscalefbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vsqrtbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vsqrtbf16-2.c
index fffa45c..5188e05 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vsqrtbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vsqrtbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/avx10_2-vsubbf16-2.c b/gcc/testsuite/gcc.target/i386/avx10_2-vsubbf16-2.c
index 42f7d4f..16f444a 100644
--- a/gcc/testsuite/gcc.target/i386/avx10_2-vsubbf16-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx10_2-vsubbf16-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-256" } */
-/* { dg-require-effective-target avx10_2_256 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX512VL
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-56.inc b/gcc/testsuite/gcc.target/i386/funcspec-56.inc
index 34c821a..e462ead 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-56.inc
+++ b/gcc/testsuite/gcc.target/i386/funcspec-56.inc
@@ -87,8 +87,7 @@ extern void test_sm3 (void) __attribute__((__target__("sm3")));
extern void test_sha512 (void) __attribute__((__target__("sha512")));
extern void test_sm4 (void) __attribute__((__target__("sm4")));
extern void test_user_msr (void) __attribute__((__target__("usermsr")));
-extern void test_avx10_2_256 (void) __attribute__((__target__("avx10.2-256")));
-extern void test_avx10_2_512 (void) __attribute__((__target__("avx10.2-512")));
+extern void test_avx10_2 (void) __attribute__((__target__("avx10.2")));
extern void test_amx_avx512 (void) __attribute__((__target__("amx-avx512")));
extern void test_amx_tf32 (void) __attribute__((__target__("amx-tf32")));
extern void test_amx_transpose (void) __attribute__((__target__("amx-transpose")));
diff --git a/gcc/testsuite/gcc.target/i386/noevex512-1.c b/gcc/testsuite/gcc.target/i386/noevex512-1.c
index 7fd45f1..89eb528 100644
--- a/gcc/testsuite/gcc.target/i386/noevex512-1.c
+++ b/gcc/testsuite/gcc.target/i386/noevex512-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O0 -march=x86-64 -mavx512f -mno-evex512 -Wno-psabi" } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
/* { dg-final { scan-assembler-not ".%zmm" } } */
typedef double __m512d __attribute__ ((__vector_size__ (64), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/noevex512-2.c b/gcc/testsuite/gcc.target/i386/noevex512-2.c
index b7915d8..34740ff 100644
--- a/gcc/testsuite/gcc.target/i386/noevex512-2.c
+++ b/gcc/testsuite/gcc.target/i386/noevex512-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -march=x86-64 -mavx512bw -mno-evex512" } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/part-vect-vec_cmpbf.c b/gcc/testsuite/gcc.target/i386/part-vect-vec_cmpbf.c
index d4138f2..c904dc0 100644
--- a/gcc/testsuite/gcc.target/i386/part-vect-vec_cmpbf.c
+++ b/gcc/testsuite/gcc.target/i386/part-vect-vec_cmpbf.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mavx10.2-256" } */
+/* { dg-options "-O2 -mavx10.2" } */
/* { dg-final { scan-assembler-times "vcmpbf16" 10 } } */
typedef __bf16 __attribute__((__vector_size__ (4))) v2bf;
diff --git a/gcc/testsuite/gcc.target/i386/pr111068.c b/gcc/testsuite/gcc.target/i386/pr111068.c
index 4ff2ea0..70c1e9a 100644
--- a/gcc/testsuite/gcc.target/i386/pr111068.c
+++ b/gcc/testsuite/gcc.target/i386/pr111068.c
@@ -1,6 +1,7 @@
/* PR target/111068 */
/* { dg-do compile } */
-/* { dg-options "-ffloat-store -mavx10.1-512" } */
+/* { dg-options "-ffloat-store -mavx10.1" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
typedef _Float16 __attribute__((__vector_size__ (8))) V;
V u, v, w;
diff --git a/gcc/testsuite/gcc.target/i386/pr111907.c b/gcc/testsuite/gcc.target/i386/pr111907.c
index 5275e94..cadc9e4 100644
--- a/gcc/testsuite/gcc.target/i386/pr111907.c
+++ b/gcc/testsuite/gcc.target/i386/pr111907.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -mno-evex512" } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
_Float128
foo (_Float128 d, _Float128 e)
diff --git a/gcc/testsuite/gcc.target/i386/pr117240_avx512f.c b/gcc/testsuite/gcc.target/i386/pr117240_avx512f.c
index c2d616a..d34ebb7 100644
--- a/gcc/testsuite/gcc.target/i386/pr117240_avx512f.c
+++ b/gcc/testsuite/gcc.target/i386/pr117240_avx512f.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mvaes -mevex512 -mno-xsave -Wno-psabi" } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
typedef __attribute__((__vector_size__(64))) char V;
diff --git a/gcc/testsuite/gcc.target/i386/pr117304-1.c b/gcc/testsuite/gcc.target/i386/pr117304-1.c
index ec75f27..58fb53c 100644
--- a/gcc/testsuite/gcc.target/i386/pr117304-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr117304-1.c
@@ -1,6 +1,7 @@
/* PR target/117304 */
/* { dg-do compile } */
/* { dg-options "-O2 -mavx512f -mno-evex512" } */
+/* { dg-warning "'-mevex512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
typedef __attribute__((__vector_size__(32))) int __v8si;
typedef __attribute__((__vector_size__(32))) unsigned int __v8su;
diff --git a/gcc/testsuite/gcc.target/i386/pr117495.c b/gcc/testsuite/gcc.target/i386/pr117495.c
index 5f17bb9..90f3561 100644
--- a/gcc/testsuite/gcc.target/i386/pr117495.c
+++ b/gcc/testsuite/gcc.target/i386/pr117495.c
@@ -3,7 +3,7 @@
/* { dg-options "-march=x86-64-v3 -fno-trapping-math" } */
/* { dg-final { scan-assembler-times "vcomisbf16" 2 } } */
-__attribute__((target("avx10.2-256")))
+__attribute__((target("avx10.2")))
int foo (int b, int x)
{
return (__bf16) b < x;
@@ -14,7 +14,7 @@ int foo2 (int b, int x)
return (__bf16) b < x;
}
-__attribute__((target("avx10.2-256")))
+__attribute__((target("avx10.2")))
int foo3 (__bf16 b, __bf16 x)
{
return (__bf16) b < x;
diff --git a/gcc/testsuite/gcc.target/i386/pr117946.c b/gcc/testsuite/gcc.target/i386/pr117946.c
index e7b660b..c4bf825 100644
--- a/gcc/testsuite/gcc.target/i386/pr117946.c
+++ b/gcc/testsuite/gcc.target/i386/pr117946.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O -favoid-store-forwarding -mavx10.1-256 -mprefer-avx128 --param=store-forwarding-max-distance=128 -Wno-psabi" } */
+/* { dg-options "-O -favoid-store-forwarding -mavx10.1 -mprefer-avx128 --param=store-forwarding-max-distance=128 -Wno-psabi" } */
+/* { dg-warning "'-mavx10.1' is aliased to 512 bit since GCC14.3 and GCC15.1 while '-mavx10.1-256' and '-mavx10.1-512' will be deprecated in GCC 16 due to all machines 512 bit vector size supported" "" { target *-*-* } 0 } */
typedef __attribute__((__vector_size__ (64))) _Decimal32 V;
void
diff --git a/gcc/testsuite/gcc.target/i386/pr118815.c b/gcc/testsuite/gcc.target/i386/pr118815.c
index 84308fc..7de20d4 100644
--- a/gcc/testsuite/gcc.target/i386/pr118815.c
+++ b/gcc/testsuite/gcc.target/i386/pr118815.c
@@ -2,7 +2,7 @@
/* { dg-options "-O2 -march=x86-64-v3" } */
#pragma GCC push_options
-#pragma GCC target("avx10.2-256")
+#pragma GCC target("avx10.2")
void foo();
diff --git a/gcc/testsuite/gcc.target/i386/sm4-avx10_2-1.c b/gcc/testsuite/gcc.target/i386/sm4-avx10_2-1.c
index 4f5733c..4746f6f 100644
--- a/gcc/testsuite/gcc.target/i386/sm4-avx10_2-1.c
+++ b/gcc/testsuite/gcc.target/i386/sm4-avx10_2-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -march=x86-64-v3 -msm4 -mavx10.2-256" } */
+/* { dg-options "-O2 -march=x86-64-v3 -msm4 -mavx10.2" } */
#include <immintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/sm4-avx10_2-512-1.c b/gcc/testsuite/gcc.target/i386/sm4-avx10_2-512-1.c
index 546472a..e7f7934 100644
--- a/gcc/testsuite/gcc.target/i386/sm4-avx10_2-512-1.c
+++ b/gcc/testsuite/gcc.target/i386/sm4-avx10_2-512-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -msm4 -mavx10.2-512" } */
+/* { dg-options "-O2 -march=x86-64-v3 -msm4 -mavx10.2" } */
/* { dg-final { scan-assembler "vsm4key4\[ \\t\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]" } } */
/* { dg-final { scan-assembler "vsm4rnds4\[ \\t\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/sm4-check.h b/gcc/testsuite/gcc.target/i386/sm4-check.h
index 7fc431d..76c16db 100644
--- a/gcc/testsuite/gcc.target/i386/sm4-check.h
+++ b/gcc/testsuite/gcc.target/i386/sm4-check.h
@@ -194,10 +194,7 @@ main ()
/* Check CPU support for SM4. */
if (__builtin_cpu_supports ("sm4")
#ifdef AVX10_2
- && __builtin_cpu_supports ("avx10.2-256")
-#endif
-#ifdef AVX10_2_512
- && __builtin_cpu_supports ("avx10.2-512")
+ && __builtin_cpu_supports ("avx10.2")
#endif
)
{
diff --git a/gcc/testsuite/gcc.target/i386/sm4key4-avx10_2-512-2.c b/gcc/testsuite/gcc.target/i386/sm4key4-avx10_2-512-2.c
index 85b7e3e..1c8b2c3 100644
--- a/gcc/testsuite/gcc.target/i386/sm4key4-avx10_2-512-2.c
+++ b/gcc/testsuite/gcc.target/i386/sm4key4-avx10_2-512-2.c
@@ -1,7 +1,7 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -msm4 -mavx10.2-512" } */
+/* { dg-options "-O2 -march=x86-64-v3 -msm4 -mavx10.2" } */
/* { dg-require-effective-target sm4 } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_2_512
diff --git a/gcc/testsuite/gcc.target/i386/sm4rnds4-avx10_2-512-2.c b/gcc/testsuite/gcc.target/i386/sm4rnds4-avx10_2-512-2.c
index 1eaf08b..5418a53 100644
--- a/gcc/testsuite/gcc.target/i386/sm4rnds4-avx10_2-512-2.c
+++ b/gcc/testsuite/gcc.target/i386/sm4rnds4-avx10_2-512-2.c
@@ -1,7 +1,7 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -msm4 -mavx10.2-512" } */
+/* { dg-options "-O2 -march=x86-64-v3 -msm4 -mavx10.2" } */
/* { dg-require-effective-target sm4 } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-require-effective-target avx10_2 } */
#define AVX10_2
#define AVX10_2_512
diff --git a/gcc/testsuite/gcc.target/i386/sse-12.c b/gcc/testsuite/gcc.target/i386/sse-12.c
index c9907fc..cabccb0 100644
--- a/gcc/testsuite/gcc.target/i386/sse-12.c
+++ b/gcc/testsuite/gcc.target/i386/sse-12.c
@@ -3,7 +3,7 @@
popcntintrin.h gfniintrin.h and mm_malloc.h are usable
with -O -std=c89 -pedantic-errors. */
/* { dg-do compile } */
-/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mamx-fp16 -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2-512 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
+/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mamx-fp16 -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
#include <x86intrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c
index 2418773..3132eca 100644
--- a/gcc/testsuite/gcc.target/i386/sse-13.c
+++ b/gcc/testsuite/gcc.target/i386/sse-13.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mavx512vp2intersect -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2-512 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mavx512vp2intersect -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mcmpccxadd -mamx-fp16 -mprefetchi -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
/* { dg-add-options bind_pic_locally } */
#include <mm_malloc.h>
@@ -849,167 +849,6 @@
/* sm3intrin.h */
#define __builtin_ia32_vsm3rnds2(A, B, C, D) __builtin_ia32_vsm3rnds2 (A, B, C, 1)
-/* avx10_2roundingintrin.h */
-#define __builtin_ia32_addpd256_mask_round(A, B, C, D, E) __builtin_ia32_addpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_addph256_mask_round(A, B, C, D, E) __builtin_ia32_addph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_addps256_mask_round(A, B, C, D, E) __builtin_ia32_addps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_cmppd256_mask_round(A, B, C, D, E) __builtin_ia32_cmppd256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_cmpph256_mask_round(A, B, C, D, E) __builtin_ia32_cmpph256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_cmpps256_mask_round(A, B, C, D, E) __builtin_ia32_cmpps256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_vcvtdq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtdq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtdq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtdq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtpd2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtpd2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2dq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2qq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2udq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2pd256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2ps256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2psx256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2psx256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2qq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2udq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2uqq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2uw256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2uw256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2w256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2w256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2pd256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2phx256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2phx256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2qq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2udq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtqq2pd256_mask_round(A, B, C, D) __builtin_ia32_cvtqq2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtqq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtqq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtqq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtqq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2dq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2qq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2udq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2qq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2uqq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2udq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2uw256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2uw256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2w256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2w256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2dq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2qq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2udq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtudq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtudq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtudq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtudq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtuqq2pd256_mask_round(A, B, C, D) __builtin_ia32_cvtuqq2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtuqq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtuqq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtuqq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtuqq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtuw2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtuw2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtw2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtw2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_divpd256_mask_round(A, B, C, D, E) __builtin_ia32_divpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_divph256_mask_round(A, B, C, D, E) __builtin_ia32_divph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_divps256_mask_round(A, B, C, D, E) __builtin_ia32_divps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfcmaddcph256_round(A, B, C, D) __builtin_ia32_vfcmaddcph256_round(A, B, C, 8)
-#define __builtin_ia32_vfcmaddcph256_mask_round(A, C, D, B, E) __builtin_ia32_vfcmaddcph256_mask_round(A, C, D, B, 8)
-#define __builtin_ia32_vfcmaddcph256_mask3_round(A, C, D, B, E) __builtin_ia32_vfcmaddcph256_mask3_round(A, C, D, B, 8)
-#define __builtin_ia32_vfcmaddcph256_maskz_round(B, C, D, A, E) __builtin_ia32_vfcmaddcph256_maskz_round(B, C, D, A, 8)
-#define __builtin_ia32_vfcmulcph256_round(A, B, C) __builtin_ia32_vfcmulcph256_round(A, B, 8)
-#define __builtin_ia32_vfcmulcph256_mask_round(A, B, C, D, E) __builtin_ia32_vfcmulcph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_fixupimmpd256_mask_round(A, B, C, D, E, F) __builtin_ia32_fixupimmpd256_mask_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmpd256_maskz_round(A, B, C, D, E, F) __builtin_ia32_fixupimmpd256_maskz_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmps256_mask_round(A, B, C, D, E, F) __builtin_ia32_fixupimmps256_mask_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmps256_maskz_round(A, B, C, D, E, F) __builtin_ia32_fixupimmps256_maskz_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_vfmaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddcph256_round(A, B, C, D) __builtin_ia32_vfmaddcph256_round(A, B, C, 8)
-#define __builtin_ia32_vfmaddcph256_mask_round(A, C, D, B, E) __builtin_ia32_vfmaddcph256_mask_round(A, C, D, B, 8)
-#define __builtin_ia32_vfmaddcph256_mask3_round(A, C, D, B, E) __builtin_ia32_vfmaddcph256_mask3_round(A, C, D, B, 8)
-#define __builtin_ia32_vfmaddcph256_maskz_round(B, C, D, A, E) __builtin_ia32_vfmaddcph256_maskz_round(B, C, D, A, 8)
-#define __builtin_ia32_vfmaddsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmulcph256_round(A, B, C) __builtin_ia32_vfmulcph256_round(A, B, 8)
-#define __builtin_ia32_vfmulcph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmulcph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_getexppd256_mask_round(A, B, C, D) __builtin_ia32_getexppd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getexpph256_mask_round(A, B, C, D) __builtin_ia32_getexpph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getexpps256_mask_round(A, B, C, D) __builtin_ia32_getexpps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getmantpd256_mask_round(A, F, C, D, E) __builtin_ia32_getmantpd256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_getmantph256_mask_round(A, F, C, D, E) __builtin_ia32_getmantph256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_getmantps256_mask_round(A, F, C, D, E) __builtin_ia32_getmantps256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_maxpd256_mask_round(A, B, C, D, E) __builtin_ia32_maxpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_maxph256_mask_round(A, B, C, D, E) __builtin_ia32_maxph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_maxps256_mask_round(A, B, C, D, E) __builtin_ia32_maxps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minpd256_mask_round(A, B, C, D, E) __builtin_ia32_minpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minph256_mask_round(A, B, C, D, E) __builtin_ia32_minph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minps256_mask_round(A, B, C, D, E) __builtin_ia32_minps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulpd256_mask_round(A, B, C, D, E) __builtin_ia32_mulpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulph256_mask_round(A, B, C, D, E) __builtin_ia32_mulph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulps256_mask_round(A, B, C, D, E) __builtin_ia32_mulps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_rangeps256_mask_round(A, B, C, D, E, F) __builtin_ia32_rangeps256_mask_round(A, B, 1, D, E, 8)
-#define __builtin_ia32_rangepd256_mask_round(A, B, C, D, E, F) __builtin_ia32_rangepd256_mask_round(A, B, 1, D, E, 8)
-#define __builtin_ia32_reducepd256_mask_round(A, B, C, D, E) __builtin_ia32_reducepd256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_reduceph256_mask_round(A, B, C, D, E) __builtin_ia32_reduceph256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_reduceps256_mask_round(A, B, C, D, E) __builtin_ia32_reduceps256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_rndscalepd256_mask_round(A, B, C, D, E) __builtin_ia32_rndscalepd256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_rndscaleph256_mask_round(A, B, C, D, E) __builtin_ia32_rndscaleph256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_rndscaleps256_mask_round(A, B, C, D, E) __builtin_ia32_rndscaleps256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_scalefpd256_mask_round(A, B, C, D, E) __builtin_ia32_scalefpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_scalefph256_mask_round(A, B, C, D, E) __builtin_ia32_scalefph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_scalefps256_mask_round(A, B, C, D, E) __builtin_ia32_scalefps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_sqrtps256_mask_round(A, B, C, D) __builtin_ia32_sqrtps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_sqrtpd256_mask_round(A, B, C, D) __builtin_ia32_sqrtpd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_sqrtph256_mask_round(A, B, C, D) __builtin_ia32_sqrtph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_sqrtps256_mask_round(A, B, C, D) __builtin_ia32_sqrtps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_subpd256_mask_round(A, B, C, D, E) __builtin_ia32_subpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_subph256_mask_round(A, B, C, D, E) __builtin_ia32_subph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_subps256_mask_round(A, B, C, D, E) __builtin_ia32_subps256_mask_round(A, B, C, D, 8)
-
/* avx10_2-512mediaintrin.h */
#define __builtin_ia32_mpsadbw512(A, B, C) __builtin_ia32_mpsadbw512 (A, B, 1)
#define __builtin_ia32_mpsadbw512_mask(A, B, C, D, E) __builtin_ia32_mpsadbw512_mask (A, B, 1, D, E)
@@ -1018,9 +857,6 @@
#define __builtin_ia32_mpsadbw128_mask(A, B, C, D, E) __builtin_ia32_mpsadbw128_mask (A, B, 1, D, E)
#define __builtin_ia32_mpsadbw256_mask(A, B, C, D, E) __builtin_ia32_mpsadbw256_mask (A, B, 1, D, E)
-/* avx10_2convertintrin.h */
-#define __builtin_ia32_vcvt2ps2phx256_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx256_mask_round(A, B, C, D, 8)
-
/* avx10_2-512convertintrin.h */
#define __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, 8)
@@ -1062,22 +898,6 @@
#define __builtin_ia32_cvttps2uqqs512_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqqs512_mask_round(A, B, C, 8)
/* avx10_2satcvtintrin.h */
-#define __builtin_ia32_cvtph2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvtph2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtph2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvtph2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvtps2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvtps2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttph2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvttph2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttph2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvttph2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2dqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2dqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2qqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2qqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2udqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2udqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2uqqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2uqqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2dqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2dqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2qqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2qqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2udqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2udqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2uqqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqqs256_mask_round(A, B, C, 8)
#define __builtin_ia32_cvttsd2sis32_round(A, B) __builtin_ia32_cvttsd2sis32_round(A, 8)
#define __builtin_ia32_cvttsd2usis32_round(A, B) __builtin_ia32_cvttsd2usis32_round(A, 8)
#define __builtin_ia32_cvttss2sis32_round(A, B) __builtin_ia32_cvttss2sis32_round(A, 8)
@@ -1102,10 +922,10 @@
#define __builtin_ia32_minmaxbf16128_mask(A, B, C, D, E) __builtin_ia32_minmaxbf16128_mask (A, B, 4, D, E)
#define __builtin_ia32_minmaxbf16256_mask(A, B, C, D, E) __builtin_ia32_minmaxbf16256_mask (A, B, 4, D, E)
#define __builtin_ia32_minmaxpd128_mask(A, B, C, D, E) __builtin_ia32_minmaxpd128_mask (A, B, 4, D, E)
-#define __builtin_ia32_minmaxpd256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxpd256_mask_round (A, B, 4, D, E, 4)
+#define __builtin_ia32_minmaxpd256_mask(A, B, C, D, E) __builtin_ia32_minmaxpd256_mask (A, B, 4, D, E)
#define __builtin_ia32_minmaxph128_mask(A, B, C, D, E) __builtin_ia32_minmaxph128_mask (A, B, 4, D, E)
-#define __builtin_ia32_minmaxph256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxph256_mask_round (A, B, 4, D, E, 4)
+#define __builtin_ia32_minmaxph256_mask(A, B, C, D, E) __builtin_ia32_minmaxph256_mask (A, B, 4, D, E)
#define __builtin_ia32_minmaxps128_mask(A, B, C, D, E) __builtin_ia32_minmaxps128_mask (A, B, 4, D, E)
-#define __builtin_ia32_minmaxps256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxps256_mask_round (A, B, 4, D, E, 4)
+#define __builtin_ia32_minmaxps256_mask(A, B, C, D, E) __builtin_ia32_minmaxps256_mask (A, B, 4, D, E)
#include <x86intrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c
index 1afe408..8ae41c1 100644
--- a/gcc/testsuite/gcc.target/i386/sse-14.c
+++ b/gcc/testsuite/gcc.target/i386/sse-14.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mamx-fp16 -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2-512 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
+/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -msha -mxsavec -mxsaves -mclflushopt -mclwb -mmwaitx -mclzero -mpku -msgx -mrdpid -mgfni -mpconfig -mwbnoinvd -menqcmd -mavx512vp2intersect -mserialize -mtsxldtrk -mamx-tile -mamx-int8 -mamx-bf16 -mkl -mwidekl -mavxvnni -mavxifma -mavxvnniint8 -mavxneconvert -mamx-fp16 -mraoint -mamx-complex -mavxvnniint16 -msm3 -msha512 -msm4 -mavx10.2 -mamx-avx512 -mamx-tf32 -mamx-transpose -mamx-fp8 -mmovrs -mamx-movrs" } */
/* { dg-add-options bind_pic_locally } */
#include <mm_malloc.h>
@@ -1020,358 +1020,6 @@ test_2 (_mm512_gf2p8affine_epi64_epi8, __m512i, __m512i, __m512i, 1)
/* sm3intrin.h */
test_3 (_mm_sm3rnds2_epi32, __m128i, __m128i, __m128i, __m128i, 1)
-/* avx10_2roundingintrin.h */
-test_1 (_mm256_cvt_roundepi32_ph, __m128h, __m256i, 8)
-test_1 (_mm256_cvt_roundepi32_ps, __m256, __m256i, 9)
-test_1 (_mm256_cvt_roundpd_ph, __m128h, __m256d, 8)
-test_1 (_mm256_cvt_roundpd_ps, __m128, __m256d, 9)
-test_1 (_mm256_cvt_roundpd_epi32, __m128i, __m256d, 9)
-test_1 (_mm256_cvt_roundpd_epi64, __m256i, __m256d, 9)
-test_1 (_mm256_cvt_roundpd_epu32, __m128i, __m256d, 9)
-test_1 (_mm256_cvt_roundpd_epu64, __m256i, __m256d, 9)
-test_1 (_mm256_cvt_roundph_epi32, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundph_pd, __m256d, __m128h, 8)
-test_1 (_mm256_cvt_roundph_ps, __m256, __m128i, 8)
-test_1 (_mm256_cvtx_roundph_ps, __m256, __m128h, 8)
-test_1 (_mm256_cvt_roundph_epi64, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundph_epu64, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundph_epu16, __m256i, __m256h, 8)
-test_1 (_mm256_cvt_roundph_epi16, __m256i, __m256h, 8)
-test_1 (_mm256_cvt_roundps_pd, __m256d, __m128, 8)
-test_1 (_mm256_cvtx_roundps_ph, __m128h, __m256, 8)
-test_1 (_mm256_cvt_roundps_epi32, __m256i, __m256, 9)
-test_1 (_mm256_cvt_roundps_epu32, __m256i, __m256, 9)
-test_1 (_mm256_cvt_roundps_epi64, __m256i, __m128, 8)
-test_1 (_mm256_cvt_roundps_epu64, __m256i, __m128, 8)
-test_1 (_mm256_cvt_roundepi64_pd, __m256d, __m256i, 8)
-test_1 (_mm256_cvt_roundepi64_ph, __m128h, __m256i, 8)
-test_1 (_mm256_cvt_roundepi64_ps, __m128, __m256i, 8)
-test_1 (_mm256_cvtt_roundpd_epi32, __m128i, __m256d, 8)
-test_1 (_mm256_cvtt_roundpd_epi64, __m256i, __m256d, 8)
-test_1 (_mm256_cvtt_roundpd_epu32, __m128i, __m256d, 8)
-test_1 (_mm256_cvtt_roundpd_epu64, __m256i, __m256d, 8)
-test_1 (_mm256_cvtt_roundph_epi32, __m256i, __m128d, 8)
-test_1 (_mm256_cvtt_roundph_epi64, __m256i, __m128h, 8)
-test_1 (_mm256_cvtt_roundph_epu32, __m256i, __m128d, 8)
-test_1 (_mm256_cvtt_roundph_epu64, __m256i, __m128h, 8)
-test_1 (_mm256_cvtt_roundph_epu16, __m256i, __m256h, 8)
-test_1 (_mm256_cvtt_roundph_epi16, __m256i, __m256h, 8)
-test_1 (_mm256_cvtt_roundps_epi32, __m256i, __m256, 8)
-test_1 (_mm256_cvtt_roundps_epi64, __m256i, __m128h, 8)
-test_1 (_mm256_cvtt_roundps_epu64, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundepu32_ph, __m128h, __m256i, 8)
-test_1 (_mm256_cvt_roundepu32_ps, __m256, __m256i, 9)
-test_1 (_mm256_cvt_roundepu64_pd, __m256d, __m256i, 9)
-test_1 (_mm256_cvt_roundepu64_ph, __m128h, __m256i, 9)
-test_1 (_mm256_cvt_roundepu64_ps, __m128, __m256i, 9)
-test_1 (_mm256_cvt_roundepu16_ph, __m256h, __m256i, 8)
-test_1 (_mm256_cvt_roundepi16_ph, __m256h, __m256i, 8)
-test_1 (_mm256_getexp_round_pd, __m256d, __m256d, 8)
-test_1 (_mm256_getexp_round_ph, __m256h, __m256h, 8)
-test_1 (_mm256_getexp_round_ps, __m256, __m256, 8)
-test_1 (_mm256_sqrt_round_pd, __m256d, __m256d, 9)
-test_1 (_mm256_sqrt_round_ph, __m256h, __m256h, 9)
-test_1 (_mm256_sqrt_round_ps, __m256, __m256, 9)
-test_1x (_mm256_reduce_round_ph, __m256h, __m256h, 123, 8)
-test_1x (_mm256_reduce_round_ps, __m256, __m256, 123, 8)
-test_1x (_mm256_reduce_round_pd, __m256d, __m256d, 123, 8)
-test_1x (_mm256_roundscale_round_ph, __m256h, __m256h, 123, 8)
-test_1x (_mm256_roundscale_round_ps, __m256, __m256, 123, 8)
-test_1x (_mm256_roundscale_round_pd, __m256d, __m256d, 123, 8)
-test_1y (_mm256_getmant_round_ph, __m256h, __m256h, 1, 1, 8)
-test_1y (_mm256_getmant_round_ps, __m256, __m256, 1, 1, 8)
-test_1y (_mm256_getmant_round_pd, __m256d, __m256d, 1, 1, 8)
-test_2 (_mm256_add_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_add_round_ph, __m256h, __m256h, __m256h, 8)
-test_2 (_mm256_add_round_ps, __m256, __m256, __m256, 9)
-test_2 (_mm256_maskz_cvt_roundepi32_ph, __m128h, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepi32_ps, __m256, __mmask8, __m256i, 9)
-test_2 (_mm256_maskz_cvt_roundpd_ph, __m128h, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvt_roundpd_ps, __m128, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundpd_epi32, __m128i, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundpd_epi64, __m256i, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundpd_epu32, __m128i, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundpd_epu64, __m256i, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundph_epi32, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_pd, __m256d, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_ps, __m256, __mmask8, __m128i, 8)
-test_2 (_mm256_maskz_cvtx_roundph_ps, __m256, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epi64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epu32, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epu64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epu16, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epi16, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_cvt_roundps_pd, __m256d, __mmask8, __m128, 8)
-test_2 (_mm256_maskz_cvtx_roundps_ph, __m128h, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_cvt_roundps_epi32, __m256i, __mmask8, __m256, 9)
-test_2 (_mm256_maskz_cvt_roundps_epu32, __m256i, __mmask8, __m256, 9)
-test_2 (_mm256_maskz_cvt_roundps_epi64, __m256i, __mmask8, __m128, 8)
-test_2 (_mm256_maskz_cvt_roundps_epu64, __m256i, __mmask8, __m128, 8)
-test_2 (_mm256_maskz_cvt_roundepi64_pd, __m256d, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepi64_ph, __m128h, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepi64_ps, __m128, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvtt_roundpd_epi32, __m128i, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvtt_roundpd_epi64, __m256i, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvtt_roundpd_epu32, __m128i, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvtt_roundpd_epu64, __m256i, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epi32, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epi64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epu32, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epu64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epu16, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epi16, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_cvtt_roundps_epi32, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_cvtt_roundps_epi64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundps_epu32, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_cvtt_roundps_epu64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundepu32_ph, __m128h, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepu32_ps, __m256, __mmask8, __m256i, 9)
-test_2 (_mm256_maskz_cvt_roundepu64_pd, __m256d, __mmask8, __m256i, 9)
-test_2 (_mm256_maskz_cvt_roundepu64_ph, __m128h, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepu64_ps, __m128, __mmask8, __m256i, 9)
-test_2 (_mm256_maskz_cvt_roundepu16_ph, __m256h, __mmask16, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepi16_ph, __m256h, __mmask16, __m256i, 8)
-test_2 (_mm256_div_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_div_round_ph, __m256h, __m256h, __m256h, 9)
-test_2 (_mm256_div_round_ps, __m256, __m256, __m256, 9)
-test_2 (_mm256_fcmul_round_pch, __m256h, __m256h, __m256h, 8)
-test_2 (_mm256_maskz_getexp_round_pd, __m256d, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_getexp_round_ph, __m256h, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_getexp_round_ps, __m256, __mmask8, __m256, 8)
-test_2 (_mm256_max_round_pd, __m256d, __m256d, __m256d, 8)
-test_2 (_mm256_max_round_ph, __m256h, __m256h, __m256h, 8)
-test_2 (_mm256_max_round_ps, __m256, __m256, __m256, 8)
-test_2 (_mm256_min_round_pd, __m256d, __m256d, __m256d, 8)
-test_2 (_mm256_min_round_ph, __m256h, __m256h, __m256h, 8)
-test_2 (_mm256_min_round_ps, __m256, __m256, __m256, 8)
-test_2 (_mm256_mul_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_mul_round_ph, __m256h, __m256h, __m256h, 9)
-test_2 (_mm256_mul_round_ps, __m256, __m256, __m256, 9)
-test_2 (_mm256_scalef_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_scalef_round_ph, __m256h, __m256h, __m256h, 9)
-test_2 (_mm256_scalef_round_ps, __m256, __m256, __m256, 9)
-test_2 (_mm256_maskz_sqrt_round_pd, __m256d, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_sqrt_round_ph, __m256h, __mmask16, __m256h, 9)
-test_2 (_mm256_maskz_sqrt_round_ps, __m256, __mmask8, __m256, 9)
-test_2 (_mm256_sub_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_sub_round_ph, __m256h, __m256h, __m256h, 9)
-test_2 (_mm256_sub_round_ps, __m256, __m256, __m256, 9)
-test_2x (_mm256_cmp_round_pd_mask, __mmask8, __m256d, __m256d, 1, 8)
-test_2x (_mm256_cmp_round_ph_mask, __mmask16, __m256h, __m256h, 1, 8)
-test_2x (_mm256_cmp_round_ps_mask, __mmask8, __m256, __m256, 1, 8)
-test_2x (_mm256_range_round_pd, __m256d, __m256d, __m256d, 15, 8)
-test_2x (_mm256_range_round_ps, __m256, __m256, __m256, 15, 8)
-test_2x (_mm256_maskz_reduce_round_pd, __m256d, __mmask8, __m256d, 123, 8)
-test_2x (_mm256_maskz_reduce_round_ph, __m256h, __mmask8, __m256h, 123, 8)
-test_2x (_mm256_maskz_reduce_round_ps, __m256, __mmask16, __m256, 123, 8)
-test_2x (_mm256_maskz_roundscale_round_pd, __m256d, __mmask8, __m256d, 123, 8)
-test_2x (_mm256_maskz_roundscale_round_ph, __m256h, __mmask8, __m256h, 123, 8)
-test_2x (_mm256_maskz_roundscale_round_ps, __m256, __mmask16, __m256, 123, 8)
-test_2y (_mm256_maskz_getmant_round_pd, __m256d, __mmask8, __m256d, 1, 1, 8)
-test_2y (_mm256_maskz_getmant_round_ph, __m256h, __mmask16, __m256h, 1, 1, 8)
-test_2y (_mm256_maskz_getmant_round_ps, __m256, __mmask8, __m256, 1, 1, 8)
-test_3 (_mm256_maskz_add_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_add_round_ph, __m256h, __mmask16, __m256h, __m256h, 8)
-test_3 (_mm256_maskz_add_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3 (_mm256_mask_cvt_roundepi32_ph, __m128h, __m128h, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepi32_ps, __m256, __m256, __mmask8, __m256i, 9)
-test_3 (_mm256_mask_cvt_roundpd_ph, __m128h, __m128h, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvt_roundpd_ps, __m128, __m128, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundpd_epi32, __m128i, __m128i, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundpd_epu32, __m128i, __m128i, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundpd_epi64, __m256i, __m256i, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundpd_epu64, __m256i, __m256i, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundph_epi32, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_pd, __m256d, __m256d, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_ps, __m256, __m256, __mmask8, __m128i, 8)
-test_3 (_mm256_mask_cvtx_roundph_ps, __m256, __m256, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_epi64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_epu32, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_epu64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_epu16, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_cvt_roundph_epi16, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_cvt_roundps_pd, __m256d, __m256d, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvtx_roundps_ph, __m128h, __m128h, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvt_roundps_epi32, __m256i, __m256i, __mmask8, __m256, 9)
-test_3 (_mm256_mask_cvt_roundps_epu32, __m256i, __m256i, __mmask8, __m256, 9)
-test_3 (_mm256_mask_cvt_roundps_epi64, __m256i, __m256i, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvt_roundps_epu64, __m256i, __m256i, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvt_roundepi64_pd, __m256d, __m256d, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepi64_ph, __m128h, __m128h, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepi64_ps, __m128, __m128, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvtt_roundpd_epi32, __m128i, __m128i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtt_roundpd_epi64, __m256i, __m256i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtt_roundpd_epu32, __m128i, __m128i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtt_roundpd_epu64, __m256i, __m256i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtt_roundph_epi32, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epi64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epu32, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epu64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epu16, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epi16, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_cvtt_roundps_epi32, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvtt_roundps_epi64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundps_epu32, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvtt_roundps_epu64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundepu32_ph, __m128h, __m128h, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepu32_ps, __m256, __m256, __mmask8, __m256i, 9)
-test_3 (_mm256_mask_cvt_roundepu64_pd, __m256d, __m256d, __mmask8, __m256i, 9)
-test_3 (_mm256_mask_cvt_roundepu64_ph, __m128h, __m128h, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepu64_ps, __m128, __m128, __mmask8, __m256i, 9)
-test_3 (_mm256_mask_cvt_roundepu16_ph, __m256h, __m256h, __mmask16, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepi16_ph, __m256h, __m256h, __mmask16, __m256i, 8)
-test_3 (_mm256_maskz_div_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_div_round_ph, __m256h, __mmask8, __m256h, __m256h, 9)
-test_3 (_mm256_maskz_div_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3 (_mm256_fcmadd_round_pch, __m256h, __m256h, __m256h, __m256h, 8)
-test_3 (_mm256_maskz_fcmul_round_pch, __m256h, __mmask8, __m256h, __m256h, 8)
-test_3 (_mm256_fmadd_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fmadd_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fmadd_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_fmadd_round_pch, __m256h, __m256h, __m256h, __m256h, 8)
-test_3 (_mm256_fmaddsub_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fmaddsub_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fmaddsub_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_fmsub_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fmsub_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fmsub_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_fmsubadd_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fmsubadd_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fmsubadd_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_maskz_fmul_round_pch, __m256h, __mmask8, __m256h, __m256h, 8)
-test_3 (_mm256_fnmadd_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fnmadd_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fnmadd_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_fnmsub_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fnmsub_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fnmsub_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_mask_getexp_round_pd, __m256d, __m256d, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_getexp_round_ph, __m256h, __m256h, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_getexp_round_ps, __m256, __m256, __mmask8, __m256, 8)
-test_3 (_mm256_maskz_max_round_pd, __m256d, __mmask8, __m256d, __m256d, 8)
-test_3 (_mm256_maskz_max_round_ph, __m256h, __mmask16, __m256h, __m256h, 8)
-test_3 (_mm256_maskz_max_round_ps, __m256, __mmask8, __m256, __m256, 8)
-test_3 (_mm256_maskz_min_round_pd, __m256d, __mmask8, __m256d, __m256d, 8)
-test_3 (_mm256_maskz_min_round_ph, __m256h, __mmask16, __m256h, __m256h, 8)
-test_3 (_mm256_maskz_min_round_ps, __m256, __mmask8, __m256, __m256, 8)
-test_3 (_mm256_maskz_mul_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_mul_round_ph, __m256h, __mmask16, __m256h, __m256h, 9)
-test_3 (_mm256_maskz_mul_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3 (_mm256_maskz_scalef_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_scalef_round_ph, __m256h, __mmask16, __m256h, __m256h, 9)
-test_3 (_mm256_maskz_scalef_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3 (_mm256_mask_sqrt_round_pd, __m256d, __m256d, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_sqrt_round_ph, __m256h, __m256h, __mmask16, __m256h, 9)
-test_3 (_mm256_mask_sqrt_round_ps, __m256, __m256, __mmask8, __m256, 9)
-test_3 (_mm256_maskz_sub_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_sub_round_ph, __m256h, __mmask16, __m256h, __m256h, 9)
-test_3 (_mm256_maskz_sub_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3x (_mm256_mask_cmp_round_pd_mask, __mmask8, __mmask8, __m256d, __m256d, 1, 8)
-test_3x (_mm256_mask_cmp_round_ph_mask, __mmask16, __mmask16, __m256h, __m256h, 1, 8)
-test_3x (_mm256_mask_cmp_round_ps_mask, __mmask8, __mmask8, __m256, __m256, 1, 8)
-test_3x (_mm256_fixupimm_round_pd, __m256d, __m256d, __m256d, __m256i, 3, 8)
-test_3x (_mm256_fixupimm_round_ps, __m256, __m256, __m256, __m256i, 3, 8)
-test_3x (_mm256_maskz_range_round_pd, __m256d, __mmask8, __m256d, __m256d, 15, 8)
-test_3x (_mm256_maskz_range_round_ps, __m256, __mmask8, __m256, __m256, 15, 8)
-test_3x (_mm256_mask_reduce_round_ph, __m256h, __m256h, __mmask8, __m256h, 123, 8)
-test_3x (_mm256_mask_reduce_round_ps, __m256, __m256, __mmask16, __m256, 123, 8)
-test_3x (_mm256_mask_reduce_round_pd, __m256d, __m256d, __mmask8, __m256d, 123, 8)
-test_3x (_mm256_mask_roundscale_round_ph, __m256h, __m256h, __mmask8, __m256h, 123, 8)
-test_3x (_mm256_mask_roundscale_round_ps, __m256, __m256, __mmask16, __m256, 123, 8)
-test_3x (_mm256_mask_roundscale_round_pd, __m256d, __m256d, __mmask8, __m256d, 123, 8)
-test_3y (_mm256_mask_getmant_round_pd, __m256d, __m256d, __mmask8, __m256d, 1, 1, 8)
-test_3y (_mm256_mask_getmant_round_ph, __m256h, __m256h, __mmask16, __m256h, 1, 1, 8)
-test_3y (_mm256_mask_getmant_round_ps, __m256, __m256, __mmask8, __m256, 1, 1, 8)
-test_4 (_mm256_mask_add_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_add_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 8)
-test_4 (_mm256_mask_add_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask_div_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_div_round_ph, __m256h, __m256h, __mmask8, __m256h, __m256h, 9)
-test_4 (_mm256_mask_div_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask_fcmadd_round_pch, __m256h, __m256h, __mmask8, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fcmadd_round_pch, __m256h, __m256h, __m256h, __m256h, __mmask8, 9)
-test_4 (_mm256_maskz_fcmadd_round_pch, __m256h, __mmask8, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fcmul_round_pch, __m256h, __m256h, __mmask8, __m256h, __m256h, 8)
-test_4 (_mm256_mask_fmadd_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fmadd_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fmadd_round_pd, __m256d, __mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fmadd_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fmadd_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fmadd_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fmadd_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fmadd_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fmadd_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fmadd_round_pch, __m256h, __m256h, __mmask8, __m256h, __m256h, 8)
-test_4 (_mm256_mask3_fmadd_round_pch, __m256h, __m256h, __m256h, __m256h, __mmask8, 8)
-test_4 (_mm256_maskz_fmadd_round_pch, __m256h, __mmask8, __m256h, __m256h, __m256h, 8)
-test_4 (_mm256_mask_fmaddsub_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fmaddsub_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fmaddsub_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fmaddsub_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fmaddsub_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fmaddsub_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fmaddsub_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fmaddsub_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fmaddsub_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fmsub_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fmsub_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fmsub_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fmsub_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fmsub_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fmsub_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fmsub_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fmsub_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fmsub_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fmsubadd_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fmsubadd_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fmsubadd_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fmsubadd_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fmsubadd_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fmsubadd_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fmsubadd_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fmsubadd_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fmsubadd_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fmul_round_pch, __m256h, __m256h, __mmask8, __m256h, __m256h, 8)
-test_4 (_mm256_mask_fnmadd_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fnmadd_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fnmadd_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fnmadd_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fnmadd_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fnmadd_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fnmadd_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fnmadd_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fnmadd_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fnmsub_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fnmsub_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fnmsub_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fnmsub_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fnmsub_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fnmsub_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fnmsub_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fnmsub_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fnmsub_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_max_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 8)
-test_4 (_mm256_mask_max_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 8)
-test_4 (_mm256_mask_max_round_ps, __m256, __m256, __mmask8, __m256, __m256, 8)
-test_4 (_mm256_mask_min_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 8)
-test_4 (_mm256_mask_min_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 8)
-test_4 (_mm256_mask_min_round_ps, __m256, __m256, __mmask8, __m256, __m256, 8)
-test_4 (_mm256_mask_mul_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_mul_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask_mul_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask_scalef_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_scalef_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask_scalef_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask_sub_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_sub_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask_sub_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4x (_mm256_maskz_fixupimm_round_pd, __m256d, __mmask8, __m256d, __m256d, __m256i, 3, 8)
-test_4x (_mm256_maskz_fixupimm_round_ps, __m256, __mmask8, __m256, __m256, __m256i, 3, 8)
-test_4x (_mm256_mask_fixupimm_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256i, 3, 8)
-test_4x (_mm256_mask_fixupimm_round_ps, __m256, __m256, __mmask8, __m256, __m256i, 3, 8)
-test_4x (_mm256_mask_range_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 15, 8)
-test_4x (_mm256_mask_range_round_ps, __m256, __m256, __mmask8, __m256, __m256, 15, 8)
-
/* avx10_2-512mediaintrin.h */
test_2 (_mm512_mpsadbw_epu8, __m512i, __m512i, __m512i, 1)
test_3 (_mm512_maskz_mpsadbw_epu8, __m512i, __mmask32, __m512i, __m512i, 1)
@@ -1383,9 +1031,6 @@ test_3 (_mm256_maskz_mpsadbw_epu8, __m256i, __mmask16, __m256i, __m256i, 1)
test_4 (_mm_mask_mpsadbw_epu8, __m128i, __m128i, __mmask8, __m128i, __m128i, 1)
test_4 (_mm256_mask_mpsadbw_epu8, __m256i, __m256i, __mmask16, __m256i, __m256i, 1)
-/* avx10_2convertintrin */
-test_2 (_mm256_cvtx_round2ps_ph, __m256h, __m256, __m256, 4)
-
/* avx10_2-512convertintrin.h */
test_2 (_mm512_cvtx_round2ps_ph, __m512h, __m512, __m512, 4)
@@ -1483,54 +1128,6 @@ test_2 (_mm512_maskz_cvtts_roundps_epu64, __m512i, __mmask8, __m256, 8)
test_3 (_mm512_mask_cvtts_roundps_epu64, __m512i, __m512i, __mmask8, __m256, 8)
/* avx10_2satcvtintrin.h */
-test_1 (_mm256_ipcvts_roundph_epi8, __m256i, __m256h, 8)
-test_1 (_mm256_ipcvts_roundph_epu8, __m256i, __m256h, 8)
-test_1 (_mm256_ipcvts_roundps_epi8, __m256i, __m256, 8)
-test_1 (_mm256_ipcvts_roundps_epu8, __m256i, __m256, 8)
-test_1 (_mm256_ipcvtts_roundph_epi8, __m256i, __m256h, 8)
-test_1 (_mm256_ipcvtts_roundph_epu8, __m256i, __m256h, 8)
-test_1 (_mm256_ipcvtts_roundps_epi8, __m256i, __m256, 8)
-test_1 (_mm256_ipcvtts_roundps_epu8, __m256i, __m256, 8)
-test_2 (_mm256_maskz_ipcvts_roundph_epi8, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_ipcvts_roundph_epu8, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_ipcvts_roundps_epi8, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_ipcvts_roundps_epu8, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_ipcvtts_roundph_epi8, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_ipcvtts_roundph_epu8, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_ipcvtts_roundps_epi8, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_ipcvtts_roundps_epu8, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_ipcvts_roundph_epi8, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_ipcvts_roundph_epu8, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_ipcvts_roundps_epi8, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_ipcvts_roundps_epu8, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_ipcvtts_roundph_epi8, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_ipcvtts_roundph_epu8, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_ipcvtts_roundps_epi8, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_ipcvtts_roundps_epu8, __m256i, __m256i, __mmask8, __m256, 8)
-test_1 (_mm256_cvtts_roundpd_epi32, __m128i, __m256d, 8)
-test_2 (_mm256_maskz_cvtts_roundpd_epi32, __m128i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtts_roundpd_epi32, __m128i, __m128i, __mmask8, __m256d, 8)
-test_1 (_mm256_cvtts_roundpd_epi64, __m256i, __m256d, 8)
-test_2 (_mm256_maskz_cvtts_roundpd_epi64, __m256i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtts_roundpd_epi64, __m256i, __m256i, __mmask8, __m256d, 8)
-test_1 (_mm256_cvtts_roundpd_epu32, __m128i, __m256d, 8)
-test_2 (_mm256_maskz_cvtts_roundpd_epu32, __m128i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtts_roundpd_epu32, __m128i, __m128i, __mmask8, __m256d, 8)
-test_1 (_mm256_cvtts_roundpd_epu64, __m256i, __m256d, 8)
-test_2 (_mm256_maskz_cvtts_roundpd_epu64, __m256i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtts_roundpd_epu64, __m256i, __m256i, __mmask8, __m256d, 8)
-test_1 (_mm256_cvtts_roundps_epi32, __m256i, __m256, 8)
-test_2 (_mm256_maskz_cvtts_roundps_epi32, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvtts_roundps_epi32, __m256i, __m256i, __mmask8, __m256, 8)
-test_1 (_mm256_cvtts_roundps_epi64, __m256i, __m128, 8)
-test_2 (_mm256_maskz_cvtts_roundps_epi64, __m256i, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvtts_roundps_epi64, __m256i, __m256i, __mmask8, __m128, 8)
-test_1 (_mm256_cvtts_roundps_epu32, __m256i, __m256, 8)
-test_2 (_mm256_maskz_cvtts_roundps_epu32, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvtts_roundps_epu32, __m256i, __m256i, __mmask8, __m256, 8)
-test_1 (_mm256_cvtts_roundps_epu64, __m256i, __m128, 8)
-test_2 (_mm256_maskz_cvtts_roundps_epu64, __m256i, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvtts_roundps_epu64, __m256i, __m256i, __mmask8, __m128, 8)
test_1 (_mm_cvtts_roundsd_epi32, int, __m128d, 8)
test_1 (_mm_cvtts_roundsd_epu32, unsigned int, __m128d, 8)
test_1 (_mm_cvtts_roundss_epi32, int, __m128, 8)
@@ -1569,15 +1166,6 @@ test_4 (_mm512_mask_minmax_ph, __m512h, __m512h, __mmask32, __m512h, __m512h, 10
test_2 (_mm256_minmax_pbh, __m256bh, __m256bh, __m256bh, 100)
test_3 (_mm256_maskz_minmax_pbh, __m256bh, __mmask16, __m256bh, __m256bh, 100)
test_4 (_mm256_mask_minmax_pbh, __m256bh, __m256bh, __mmask16, __m256bh, __m256bh, 100)
-test_2x (_mm256_minmax_round_pd, __m256d, __m256d, __m256d, 100, 4)
-test_3x (_mm256_maskz_minmax_round_pd, __m256d, __mmask8, __m256d, __m256d, 100, 4)
-test_4x (_mm256_mask_minmax_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 100, 4)
-test_2x (_mm256_minmax_round_ps, __m256, __m256, __m256, 100, 4)
-test_3x (_mm256_maskz_minmax_round_ps, __m256, __mmask8, __m256, __m256, 100, 4)
-test_4x (_mm256_mask_minmax_round_ps, __m256, __m256, __mmask8, __m256, __m256, 100, 4)
-test_2x (_mm256_minmax_round_ph, __m256h, __m256h, __m256h, 100, 4)
-test_3x (_mm256_maskz_minmax_round_ph, __m256h, __mmask16, __m256h, __m256h, 100, 4)
-test_4x (_mm256_mask_minmax_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 100, 4)
test_2 (_mm256_minmax_pd, __m256d, __m256d, __m256d, 100)
test_3 (_mm256_maskz_minmax_pd, __m256d, __mmask8, __m256d, __m256d, 100)
test_4 (_mm256_mask_minmax_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 100)
diff --git a/gcc/testsuite/gcc.target/i386/sse-22.c b/gcc/testsuite/gcc.target/i386/sse-22.c
index 2da3d05..16b059e 100644
--- a/gcc/testsuite/gcc.target/i386/sse-22.c
+++ b/gcc/testsuite/gcc.target/i386/sse-22.c
@@ -103,7 +103,7 @@
#ifndef DIFFERENT_PRAGMAS
-#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,rtm,rdseed,prfchw,adx,fxsr,xsaveopt,sha,gfni,avx512vp2intersect,serialize,tsxldtrk,amx-tile,amx-int8,amx-bf16,kl,widekl,avxvnni,avxifma,avxvnniint8,avxneconvert,amx-fp16,raoint,amx-complex,avxvnniint16,sm3,sha512,sm4,avx10.2-512,amx-avx512,amx-tf32,amx-transpose,amx-fp8,movrs,amx-movrs")
+#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,rtm,rdseed,prfchw,adx,fxsr,xsaveopt,sha,gfni,avx512vp2intersect,serialize,tsxldtrk,amx-tile,amx-int8,amx-bf16,kl,widekl,avxvnni,avxifma,avxvnniint8,avxneconvert,amx-fp16,raoint,amx-complex,avxvnniint16,sm3,sha512,sm4,avx10.2,amx-avx512,amx-tf32,amx-transpose,amx-fp8,movrs,amx-movrs")
#endif
/* Following intrinsics require immediate arguments. They
@@ -220,7 +220,7 @@ test_4 (_mm_cmpestrz, int, __m128i, int, __m128i, int, 1)
/* immintrin.h (AVX/AVX2/RDRND/FSGSBASE/F16C/RTM/AVX512F/SHA) */
#ifdef DIFFERENT_PRAGMAS
-#pragma GCC target ("avx,avx2,rdrnd,fsgsbase,f16c,rtm,sha,gfni,avx512vp2intersect,serialize,tsxldtrk,amx-tile,amx-int8,amx-bf16,kl,widekl,avxvnni,avxifma,avxvnniint8,avxneconvert,amx-fp16,raoint,amx-complex,avxvnniint16,sm3,sha512,sm4,avx10.2-512,amx-avx512,amx-tf32,amx-transpose,amx-fp8,movrs,amx-movrs")
+#pragma GCC target ("avx,avx2,rdrnd,fsgsbase,f16c,rtm,sha,gfni,avx512vp2intersect,serialize,tsxldtrk,amx-tile,amx-int8,amx-bf16,kl,widekl,avxvnni,avxifma,avxvnniint8,avxneconvert,amx-fp16,raoint,amx-complex,avxvnniint16,sm3,sha512,sm4,avx10.2,amx-avx512,amx-tf32,amx-transpose,amx-fp8,movrs,amx-movrs")
#endif
#include <immintrin.h>
test_1 (_cvtss_sh, unsigned short, float, 1)
@@ -1061,356 +1061,6 @@ test_1 ( __bextri_u64, unsigned long long, unsigned long long, 1)
/* sm3intrin.h */
test_3 (_mm_sm3rnds2_epi32, __m128i, __m128i, __m128i, __m128i, 1)
-/* avx10_2roundingintrin.h */
-test_1 (_mm256_cvt_roundepi32_ph, __m128h, __m256i, 8)
-test_1 (_mm256_cvt_roundepi32_ps, __m256, __m256i, 9)
-test_1 (_mm256_cvt_roundpd_ph, __m128h, __m256d, 8)
-test_1 (_mm256_cvt_roundpd_ps, __m128, __m256d, 9)
-test_1 (_mm256_cvt_roundpd_epi32, __m128i, __m256d, 9)
-test_1 (_mm256_cvt_roundpd_epi64, __m256i, __m256d, 9)
-test_1 (_mm256_cvt_roundpd_epu32, __m128i, __m256d, 9)
-test_1 (_mm256_cvt_roundpd_epu64, __m256i, __m256d, 9)
-test_1 (_mm256_cvt_roundph_epi32, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundph_pd, __m256d, __m128h, 8)
-test_1 (_mm256_cvt_roundph_ps, __m256, __m128i, 8)
-test_1 (_mm256_cvtx_roundph_ps, __m256, __m128h, 8)
-test_1 (_mm256_cvt_roundph_epi64, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundph_epu32, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundph_epu64, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundph_epu16, __m256i, __m256h, 8)
-test_1 (_mm256_cvt_roundph_epi16, __m256i, __m256h, 8)
-test_1 (_mm256_cvt_roundps_pd, __m256d, __m128, 8)
-test_1 (_mm256_cvtx_roundps_ph, __m128h, __m256, 8)
-test_1 (_mm256_cvt_roundps_epi32, __m256i, __m256, 9)
-test_1 (_mm256_cvt_roundps_epu32, __m256i, __m256, 9)
-test_1 (_mm256_cvt_roundps_epi64, __m256i, __m128, 8)
-test_1 (_mm256_cvt_roundps_epu64, __m256i, __m128, 8)
-test_1 (_mm256_cvt_roundepi64_pd, __m256d, __m256i, 8)
-test_1 (_mm256_cvt_roundepi64_ph, __m128h, __m256i, 8)
-test_1 (_mm256_cvt_roundepi64_ps, __m128, __m256i, 8)
-test_1 (_mm256_cvtt_roundpd_epi32, __m128i, __m256d, 8)
-test_1 (_mm256_cvtt_roundpd_epi64, __m256i, __m256d, 8)
-test_1 (_mm256_cvtt_roundpd_epu32, __m128i, __m256d, 8)
-test_1 (_mm256_cvtt_roundpd_epu64, __m256i, __m256d, 8)
-test_1 (_mm256_cvtt_roundph_epi32, __m256i, __m128d, 8)
-test_1 (_mm256_cvtt_roundph_epi64, __m256i, __m128h, 8)
-test_1 (_mm256_cvtt_roundph_epu32, __m256i, __m128d, 8)
-test_1 (_mm256_cvtt_roundph_epu64, __m256i, __m128h, 8)
-test_1 (_mm256_cvtt_roundph_epu16, __m256i, __m256h, 8)
-test_1 (_mm256_cvtt_roundph_epi16, __m256i, __m256h, 8)
-test_1 (_mm256_cvtt_roundps_epi32, __m256i, __m256, 8)
-test_1 (_mm256_cvtt_roundps_epi64, __m256i, __m128h, 8)
-test_1 (_mm256_cvtt_roundps_epu32, __m256i, __m256, 8)
-test_1 (_mm256_cvtt_roundps_epu64, __m256i, __m128h, 8)
-test_1 (_mm256_cvt_roundepu32_ph, __m128h, __m256i, 8)
-test_1 (_mm256_cvt_roundepu32_ps, __m256, __m256i, 9)
-test_1 (_mm256_cvt_roundepu64_pd, __m256d, __m256i, 9)
-test_1 (_mm256_cvt_roundepu64_ph, __m128h, __m256i, 9)
-test_1 (_mm256_cvt_roundepu64_ps, __m128, __m256i, 9)
-test_1 (_mm256_cvt_roundepu16_ph, __m256h, __m256i, 8)
-test_1 (_mm256_cvt_roundepi16_ph, __m256h, __m256i, 8)
-test_1 (_mm256_getexp_round_pd, __m256d, __m256d, 8)
-test_1 (_mm256_getexp_round_ph, __m256h, __m256h, 8)
-test_1 (_mm256_getexp_round_ps, __m256, __m256, 8)
-test_1 (_mm256_sqrt_round_pd, __m256d, __m256d, 9)
-test_1 (_mm256_sqrt_round_ph, __m256h, __m256h, 9)
-test_1 (_mm256_sqrt_round_ps, __m256, __m256, 9)
-test_1x (_mm256_reduce_round_ph, __m256h, __m256h, 123, 8)
-test_1x (_mm256_reduce_round_ps, __m256, __m256, 123, 8)
-test_1x (_mm256_reduce_round_pd, __m256d, __m256d, 123, 8)
-test_1x (_mm256_roundscale_round_ph, __m256h, __m256h, 123, 8)
-test_1x (_mm256_roundscale_round_ps, __m256, __m256, 123, 8)
-test_1x (_mm256_roundscale_round_pd, __m256d, __m256d, 123, 8)
-test_1y (_mm256_getmant_round_ph, __m256h, __m256h, 1, 1, 8)
-test_1y (_mm256_getmant_round_ps, __m256, __m256, 1, 1, 8)
-test_1y (_mm256_getmant_round_pd, __m256d, __m256d, 1, 1, 8)
-test_2 (_mm256_add_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_add_round_ph, __m256h, __m256h, __m256h, 8)
-test_2 (_mm256_add_round_ps, __m256, __m256, __m256, 9)
-test_2 (_mm256_maskz_cvt_roundepi32_ph, __m128h, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepi32_ps, __m256, __mmask8, __m256i, 9)
-test_2 (_mm256_maskz_cvt_roundpd_ph, __m128h, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvt_roundpd_ps, __m128, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundpd_epi32, __m128i, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundpd_epi64, __m256i, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundpd_epu32, __m128i, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundpd_epu64, __m256i, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_cvt_roundph_epi32, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_pd, __m256d, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_ps, __m256, __mmask8, __m128i, 8)
-test_2 (_mm256_maskz_cvtx_roundph_ps, __m256, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epi64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epu32, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epu64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epu16, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_cvt_roundph_epi16, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_cvt_roundps_pd, __m256d, __mmask8, __m128, 8)
-test_2 (_mm256_maskz_cvtx_roundps_ph, __m128h, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_cvt_roundps_epi32, __m256i, __mmask8, __m256, 9)
-test_2 (_mm256_maskz_cvt_roundps_epu32, __m256i, __mmask8, __m256, 9)
-test_2 (_mm256_maskz_cvt_roundps_epi64, __m256i, __mmask8, __m128, 8)
-test_2 (_mm256_maskz_cvt_roundps_epu64, __m256i, __mmask8, __m128, 8)
-test_2 (_mm256_maskz_cvt_roundepi64_pd, __m256d, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepi64_ph, __m128h, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepi64_ps, __m128, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvtt_roundpd_epi32, __m128i, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvtt_roundpd_epi64, __m256i, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvtt_roundpd_epu32, __m128i, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvtt_roundpd_epu64, __m256i, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epi32, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epi64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epu32, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epu64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epu16, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_cvtt_roundph_epi16, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_cvtt_roundps_epi32, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_cvtt_roundps_epi64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvtt_roundps_epu32, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_cvtt_roundps_epu64, __m256i, __mmask8, __m128h, 8)
-test_2 (_mm256_maskz_cvt_roundepu32_ph, __m128h, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepu32_ps, __m256, __mmask8, __m256i, 9)
-test_2 (_mm256_maskz_cvt_roundepu64_pd, __m256d, __mmask8, __m256i, 9)
-test_2 (_mm256_maskz_cvt_roundepu64_ph, __m128h, __mmask8, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepu64_ps, __m128, __mmask8, __m256i, 9)
-test_2 (_mm256_maskz_cvt_roundepu16_ph, __m256h, __mmask16, __m256i, 8)
-test_2 (_mm256_maskz_cvt_roundepi16_ph, __m256h, __mmask16, __m256i, 8)
-test_2 (_mm256_div_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_div_round_ph, __m256h, __m256h, __m256h, 9)
-test_2 (_mm256_div_round_ps, __m256, __m256, __m256, 9)
-test_2 (_mm256_fcmul_round_pch, __m256h, __m256h, __m256h, 8)
-test_2 (_mm256_maskz_getexp_round_pd, __m256d, __mmask8, __m256d, 8)
-test_2 (_mm256_maskz_getexp_round_ph, __m256h, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_getexp_round_ps, __m256, __mmask8, __m256, 8)
-test_2 (_mm256_max_round_pd, __m256d, __m256d, __m256d, 8)
-test_2 (_mm256_max_round_ph, __m256h, __m256h, __m256h, 8)
-test_2 (_mm256_max_round_ps, __m256, __m256, __m256, 8)
-test_2 (_mm256_min_round_pd, __m256d, __m256d, __m256d, 8)
-test_2 (_mm256_min_round_ph, __m256h, __m256h, __m256h, 8)
-test_2 (_mm256_min_round_ps, __m256, __m256, __m256, 8)
-test_2 (_mm256_mul_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_mul_round_ph, __m256h, __m256h, __m256h, 9)
-test_2 (_mm256_mul_round_ps, __m256, __m256, __m256, 9)
-test_2 (_mm256_scalef_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_scalef_round_ph, __m256h, __m256h, __m256h, 9)
-test_2 (_mm256_scalef_round_ps, __m256, __m256, __m256, 9)
-test_2 (_mm256_maskz_sqrt_round_pd, __m256d, __mmask8, __m256d, 9)
-test_2 (_mm256_maskz_sqrt_round_ph, __m256h, __mmask16, __m256h, 9)
-test_2 (_mm256_maskz_sqrt_round_ps, __m256, __mmask8, __m256, 9)
-test_2 (_mm256_sub_round_pd, __m256d, __m256d, __m256d, 9)
-test_2 (_mm256_sub_round_ph, __m256h, __m256h, __m256h, 9)
-test_2 (_mm256_sub_round_ps, __m256, __m256, __m256, 9)
-test_2x (_mm256_cmp_round_pd_mask, __mmask8, __m256d, __m256d, 1, 8)
-test_2x (_mm256_cmp_round_ph_mask, __mmask16, __m256h, __m256h, 1, 8)
-test_2x (_mm256_cmp_round_ps_mask, __mmask8, __m256, __m256, 1, 8)
-test_2x (_mm256_range_round_pd, __m256d, __m256d, __m256d, 15, 8)
-test_2x (_mm256_range_round_ps, __m256, __m256, __m256, 15, 8)
-test_2x (_mm256_maskz_reduce_round_pd, __m256d, __mmask8, __m256d, 123, 8)
-test_2x (_mm256_maskz_reduce_round_ph, __m256h, __mmask8, __m256h, 123, 8)
-test_2x (_mm256_maskz_reduce_round_ps, __m256, __mmask16, __m256, 123, 8)
-test_2x (_mm256_maskz_roundscale_round_pd, __m256d, __mmask8, __m256d, 123, 8)
-test_2x (_mm256_maskz_roundscale_round_ph, __m256h, __mmask8, __m256h, 123, 8)
-test_2x (_mm256_maskz_roundscale_round_ps, __m256, __mmask16, __m256, 123, 8)
-test_2y (_mm256_maskz_getmant_round_pd, __m256d, __mmask8, __m256d, 1, 1, 8)
-test_2y (_mm256_maskz_getmant_round_ph, __m256h, __mmask16, __m256h, 1, 1, 8)
-test_2y (_mm256_maskz_getmant_round_ps, __m256, __mmask8, __m256, 1, 1, 8)
-test_3 (_mm256_maskz_add_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_add_round_ph, __m256h, __mmask16, __m256h, __m256h, 8)
-test_3 (_mm256_maskz_add_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3 (_mm256_mask_cvt_roundepi32_ph, __m128h, __m128h, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepi32_ps, __m256, __m256, __mmask8, __m256i, 9)
-test_3 (_mm256_mask_cvt_roundpd_ph, __m128h, __m128h, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvt_roundpd_ps, __m128, __m128, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundpd_epi32, __m128i, __m128i, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundpd_epu32, __m128i, __m128i, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundpd_epi64, __m256i, __m256i, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundpd_epu64, __m256i, __m256i, __mmask8, __m256d, 9)
-test_3 (_mm256_mask_cvt_roundph_epi32, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_pd, __m256d, __m256d, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_ps, __m256, __m256, __mmask8, __m128i, 8)
-test_3 (_mm256_mask_cvtx_roundph_ps, __m256, __m256, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_epi64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_epu32, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_epu64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundph_epu16, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_cvt_roundph_epi16, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_cvt_roundps_pd, __m256d, __m256d, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvtx_roundps_ph, __m128h, __m128h, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvt_roundps_epi32, __m256i, __m256i, __mmask8, __m256, 9)
-test_3 (_mm256_mask_cvt_roundps_epu32, __m256i, __m256i, __mmask8, __m256, 9)
-test_3 (_mm256_mask_cvt_roundps_epi64, __m256i, __m256i, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvt_roundps_epu64, __m256i, __m256i, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvt_roundepi64_pd, __m256d, __m256d, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepi64_ph, __m128h, __m128h, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepi64_ps, __m128, __m128, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvtt_roundpd_epi32, __m128i, __m128i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtt_roundpd_epi64, __m256i, __m256i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtt_roundpd_epu32, __m128i, __m128i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtt_roundpd_epu64, __m256i, __m256i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtt_roundph_epi32, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epi64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epu32, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epu64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epu16, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_cvtt_roundph_epi16, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_cvtt_roundps_epi32, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvtt_roundps_epi64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvtt_roundps_epu32, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvtt_roundps_epu64, __m256i, __m256i, __mmask8, __m128h, 8)
-test_3 (_mm256_mask_cvt_roundepu32_ph, __m128h, __m128h, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepu32_ps, __m256, __m256, __mmask8, __m256i, 9)
-test_3 (_mm256_mask_cvt_roundepu64_pd, __m256d, __m256d, __mmask8, __m256i, 9)
-test_3 (_mm256_mask_cvt_roundepu64_ph, __m128h, __m128h, __mmask8, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepu64_ps, __m128, __m128, __mmask8, __m256i, 9)
-test_3 (_mm256_mask_cvt_roundepu16_ph, __m256h, __m256h, __mmask16, __m256i, 8)
-test_3 (_mm256_mask_cvt_roundepi16_ph, __m256h, __m256h, __mmask16, __m256i, 8)
-test_3 (_mm256_maskz_div_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_div_round_ph, __m256h, __mmask8, __m256h, __m256h, 9)
-test_3 (_mm256_maskz_div_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3 (_mm256_fcmadd_round_pch, __m256h, __m256h, __m256h, __m256h, 8)
-test_3 (_mm256_maskz_fcmul_round_pch, __m256h, __mmask8, __m256h, __m256h, 8)
-test_3 (_mm256_fmadd_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fmadd_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fmadd_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_fmadd_round_pch, __m256h, __m256h, __m256h, __m256h, 8)
-test_3 (_mm256_fmaddsub_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fmaddsub_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fmsub_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fmsub_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fmsub_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_fmsubadd_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fmsubadd_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fmsubadd_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_maskz_fmul_round_pch, __m256h, __mmask8, __m256h, __m256h, 8)
-test_3 (_mm256_fnmadd_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fnmadd_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fnmadd_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_fnmsub_round_pd, __m256d, __m256d, __m256d, __m256d, 9)
-test_3 (_mm256_fnmsub_round_ph, __m256h, __m256h, __m256h, __m256h, 9)
-test_3 (_mm256_fnmsub_round_ps, __m256, __m256, __m256, __m256, 9)
-test_3 (_mm256_mask_getexp_round_pd, __m256d, __m256d, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_getexp_round_ph, __m256h, __m256h, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_getexp_round_ps, __m256, __m256, __mmask8, __m256, 8)
-test_3 (_mm256_maskz_max_round_pd, __m256d, __mmask8, __m256d, __m256d, 8)
-test_3 (_mm256_maskz_max_round_ph, __m256h, __mmask16, __m256h, __m256h, 8)
-test_3 (_mm256_maskz_max_round_ps, __m256, __mmask8, __m256, __m256, 8)
-test_3 (_mm256_maskz_min_round_pd, __m256d, __mmask8, __m256d, __m256d, 8)
-test_3 (_mm256_maskz_min_round_ph, __m256h, __mmask16, __m256h, __m256h, 8)
-test_3 (_mm256_maskz_min_round_ps, __m256, __mmask8, __m256, __m256, 8)
-test_3 (_mm256_maskz_mul_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_mul_round_ph, __m256h, __mmask16, __m256h, __m256h, 9)
-test_3 (_mm256_maskz_mul_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3 (_mm256_maskz_scalef_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_scalef_round_ph, __m256h, __mmask16, __m256h, __m256h, 9)
-test_3 (_mm256_maskz_scalef_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3 (_mm256_maskz_sub_round_pd, __m256d, __mmask8, __m256d, __m256d, 9)
-test_3 (_mm256_maskz_sub_round_ph, __m256h, __mmask16, __m256h, __m256h, 9)
-test_3 (_mm256_maskz_sub_round_ps, __m256, __mmask8, __m256, __m256, 9)
-test_3x (_mm256_mask_cmp_round_pd_mask, __mmask8, __mmask8, __m256d, __m256d, 1, 8)
-test_3x (_mm256_mask_cmp_round_ph_mask, __mmask16, __mmask16, __m256h, __m256h, 1, 8)
-test_3x (_mm256_mask_cmp_round_ps_mask, __mmask8, __mmask8, __m256, __m256, 1, 8)
-test_3x (_mm256_fixupimm_round_pd, __m256d, __m256d, __m256d, __m256i, 3, 8)
-test_3x (_mm256_fixupimm_round_ps, __m256, __m256, __m256, __m256i, 3, 8)
-test_3x (_mm256_maskz_range_round_pd, __m256d, __mmask8, __m256d, __m256d, 15, 8)
-test_3x (_mm256_maskz_range_round_ps, __m256, __mmask16, __m256, __m256, 15, 8)
-test_3x (_mm256_mask_reduce_round_ph, __m256h, __m256h, __mmask8, __m256h, 123, 8)
-test_3x (_mm256_mask_reduce_round_ps, __m256, __m256, __mmask16, __m256, 123, 8)
-test_3x (_mm256_mask_reduce_round_pd, __m256d, __m256d, __mmask8, __m256d, 123, 8)
-test_3x (_mm256_mask_roundscale_round_ph, __m256h, __m256h, __mmask8, __m256h, 123, 8)
-test_3x (_mm256_mask_roundscale_round_ps, __m256, __m256, __mmask16, __m256, 123, 8)
-test_3x (_mm256_mask_roundscale_round_pd, __m256d, __m256d, __mmask8, __m256d, 123, 8)
-test_3y (_mm256_mask_getmant_round_pd, __m256d, __m256d, __mmask8, __m256d, 1, 1, 8)
-test_3y (_mm256_mask_getmant_round_ph, __m256h, __m256h, __mmask16, __m256h, 1, 1, 8)
-test_3y (_mm256_mask_getmant_round_ps, __m256, __m256, __mmask8, __m256, 1, 1, 8)
-test_4 (_mm256_mask_add_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_add_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 8)
-test_4 (_mm256_mask_add_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask_div_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_div_round_ph, __m256h, __m256h, __mmask8, __m256h, __m256h, 9)
-test_4 (_mm256_mask_div_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask_fcmadd_round_pch, __m256h, __m256h, __mmask8, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fcmadd_round_pch, __m256h, __m256h, __m256h, __m256h, __mmask8, 9)
-test_4 (_mm256_maskz_fcmadd_round_pch, __m256h, __mmask8, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fcmul_round_pch, __m256h, __m256h, __mmask8, __m256h, __m256h, 8)
-test_4 (_mm256_mask_fmadd_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fmadd_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fmadd_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fmadd_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fmadd_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fmadd_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fmadd_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fmadd_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fmadd_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fmadd_round_pch, __m256h, __m256h, __mmask8, __m256h, __m256h, 8)
-test_4 (_mm256_mask3_fmadd_round_pch, __m256h, __m256h, __m256h, __m256h, __mmask8, 8)
-test_4 (_mm256_maskz_fmadd_round_pch, __m256h, __mmask8, __m256h, __m256h, __m256h, 8)
-test_4 (_mm256_mask_fmaddsub_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fmaddsub_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fmaddsub_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fmaddsub_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fmaddsub_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fmaddsub_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fmaddsub_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fmaddsub_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fmaddsub_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fmsub_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fmsub_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fmsub_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fmsub_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fmsub_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fmsub_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fmsub_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fmsub_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fmsub_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fmsubadd_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fmsubadd_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fmsubadd_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fmsubadd_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fmsubadd_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fmsubadd_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fmsubadd_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fmsubadd_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fmsubadd_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fmul_round_pch, __m256h, __m256h, __mmask8, __m256h, __m256h, 8)
-test_4 (_mm256_mask_fnmadd_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fnmadd_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fnmadd_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fnmadd_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fnmadd_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fnmadd_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fnmadd_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fnmadd_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fnmadd_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_fnmsub_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask3_fnmsub_round_pd, __m256d, __m256d, __m256d, __m256d, __mmask8, 9)
-test_4 (_mm256_maskz_fnmsub_round_pd, __m256d,__mmask8, __m256d, __m256d, __m256d, 9)
-test_4 (_mm256_mask_fnmsub_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask3_fnmsub_round_ph, __m256h, __m256h, __m256h, __m256h, __mmask16, 9)
-test_4 (_mm256_maskz_fnmsub_round_ph, __m256h,__mmask16, __m256h, __m256h, __m256h, 9)
-test_4 (_mm256_mask_fnmsub_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask3_fnmsub_round_ps, __m256, __m256, __m256, __m256, __mmask8, 9)
-test_4 (_mm256_maskz_fnmsub_round_ps, __m256,__mmask8, __m256, __m256, __m256, 9)
-test_4 (_mm256_mask_max_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 8)
-test_4 (_mm256_mask_max_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 8)
-test_4 (_mm256_mask_max_round_ps, __m256, __m256, __mmask8, __m256, __m256, 8)
-test_4 (_mm256_mask_min_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 8)
-test_4 (_mm256_mask_min_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 8)
-test_4 (_mm256_mask_min_round_ps, __m256, __m256, __mmask8, __m256, __m256, 8)
-test_4 (_mm256_mask_mul_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_mul_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask_mul_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask_scalef_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_scalef_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask_scalef_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4 (_mm256_mask_sub_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 9)
-test_4 (_mm256_mask_sub_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 9)
-test_4 (_mm256_mask_sub_round_ps, __m256, __m256, __mmask8, __m256, __m256, 9)
-test_4x (_mm256_maskz_fixupimm_round_pd, __m256d, __mmask8, __m256d, __m256d, __m256i, 3, 8)
-test_4x (_mm256_maskz_fixupimm_round_ps, __m256, __mmask8, __m256, __m256, __m256i, 3, 8)
-test_4x (_mm256_mask_fixupimm_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256i, 3, 8)
-test_4x (_mm256_mask_fixupimm_round_ps, __m256, __m256, __mmask8, __m256, __m256i, 3, 8)
-test_4x (_mm256_mask_range_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 15, 8)
-test_4x (_mm256_mask_range_round_ps, __m256, __m256, __mmask8, __m256, __m256, 15, 8)
-
/* avx10_2-512mediaintrin.h */
test_2 (_mm512_mpsadbw_epu8, __m512i, __m512i, __m512i, 1)
test_3 (_mm512_maskz_mpsadbw_epu8, __m512i, __mmask32, __m512i, __m512i, 1)
@@ -1422,9 +1072,6 @@ test_3 (_mm256_maskz_mpsadbw_epu8, __m256i, __mmask16, __m256i, __m256i, 1)
test_4 (_mm_mask_mpsadbw_epu8, __m128i, __m128i, __mmask8, __m128i, __m128i, 1)
test_4 (_mm256_mask_mpsadbw_epu8, __m256i, __m256i, __mmask16, __m256i, __m256i, 1)
-/* avx10_2convertintrin */
-test_2 (_mm256_cvtx_round2ps_ph, __m256h, __m256, __m256, 4)
-
/* avx10_2-512convertintrin.h */
test_2 (_mm512_cvtx_round2ps_ph, __m512h, __m512, __m512, 4)
@@ -1522,54 +1169,6 @@ test_2 (_mm512_maskz_cvtts_roundps_epu64, __m512i, __mmask8, __m256, 8)
test_3 (_mm512_mask_cvtts_roundps_epu64, __m512i, __m512i, __mmask8, __m256, 8)
/* avx10_2satcvtintrin.h */
-test_1 (_mm256_ipcvts_roundph_epi8, __m256i, __m256h, 8)
-test_1 (_mm256_ipcvts_roundph_epu8, __m256i, __m256h, 8)
-test_1 (_mm256_ipcvts_roundps_epi8, __m256i, __m256, 8)
-test_1 (_mm256_ipcvts_roundps_epu8, __m256i, __m256, 8)
-test_1 (_mm256_ipcvtts_roundph_epi8, __m256i, __m256h, 8)
-test_1 (_mm256_ipcvtts_roundph_epu8, __m256i, __m256h, 8)
-test_1 (_mm256_ipcvtts_roundps_epi8, __m256i, __m256, 8)
-test_1 (_mm256_ipcvtts_roundps_epu8, __m256i, __m256, 8)
-test_2 (_mm256_maskz_ipcvts_roundph_epi8, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_ipcvts_roundph_epu8, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_ipcvts_roundps_epi8, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_ipcvts_roundps_epu8, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_ipcvtts_roundph_epi8, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_ipcvtts_roundph_epu8, __m256i, __mmask16, __m256h, 8)
-test_2 (_mm256_maskz_ipcvtts_roundps_epi8, __m256i, __mmask8, __m256, 8)
-test_2 (_mm256_maskz_ipcvtts_roundps_epu8, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_ipcvts_roundph_epi8, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_ipcvts_roundph_epu8, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_ipcvts_roundps_epi8, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_ipcvts_roundps_epu8, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_ipcvtts_roundph_epi8, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_ipcvtts_roundph_epu8, __m256i, __m256i, __mmask16, __m256h, 8)
-test_3 (_mm256_mask_ipcvtts_roundps_epi8, __m256i, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_ipcvtts_roundps_epu8, __m256i, __m256i, __mmask8, __m256, 8)
-test_1 (_mm256_cvtts_roundpd_epi32, __m128i, __m256d, 8)
-test_2 (_mm256_maskz_cvtts_roundpd_epi32, __m128i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtts_roundpd_epi32, __m128i, __m128i, __mmask8, __m256d, 8)
-test_1 (_mm256_cvtts_roundpd_epi64, __m256i, __m256d, 8)
-test_2 (_mm256_maskz_cvtts_roundpd_epi64, __m256i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtts_roundpd_epi64, __m256i, __m256i, __mmask8, __m256d, 8)
-test_1 (_mm256_cvtts_roundpd_epu32, __m128i, __m256d, 8)
-test_2 (_mm256_maskz_cvtts_roundpd_epu32, __m128i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtts_roundpd_epu32, __m128i, __m128i, __mmask8, __m256d, 8)
-test_1 (_mm256_cvtts_roundpd_epu64, __m256i, __m256d, 8)
-test_2 (_mm256_maskz_cvtts_roundpd_epu64, __m256i, __mmask8, __m256d, 8)
-test_3 (_mm256_mask_cvtts_roundpd_epu64, __m256i, __m256i, __mmask8, __m256d, 8)
-test_1 (_mm256_cvtts_roundps_epi32, __m256i, __m256, 8)
-test_2 (_mm256_maskz_cvtts_roundps_epi32, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvtts_roundps_epi32, __m256i, __m256i, __mmask8, __m256, 8)
-test_1 (_mm256_cvtts_roundps_epi64, __m256i, __m128, 8)
-test_2 (_mm256_maskz_cvtts_roundps_epi64, __m256i, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvtts_roundps_epi64, __m256i, __m256i, __mmask8, __m128, 8)
-test_1 (_mm256_cvtts_roundps_epu32, __m256i, __m256, 8)
-test_2 (_mm256_maskz_cvtts_roundps_epu32, __m256i, __mmask8, __m256, 8)
-test_3 (_mm256_mask_cvtts_roundps_epu32, __m256i, __m256i, __mmask8, __m256, 8)
-test_1 (_mm256_cvtts_roundps_epu64, __m256i, __m128, 8)
-test_2 (_mm256_maskz_cvtts_roundps_epu64, __m256i, __mmask8, __m128, 8)
-test_3 (_mm256_mask_cvtts_roundps_epu64, __m256i, __m256i, __mmask8, __m128, 8)
test_1 (_mm_cvtts_roundsd_epi32, int, __m128d, 8)
test_1 (_mm_cvtts_roundsd_epu32, unsigned int, __m128d, 8)
test_1 (_mm_cvtts_roundss_epi32, int, __m128, 8)
@@ -1608,15 +1207,6 @@ test_4 (_mm512_mask_minmax_ph, __m512h, __m512h, __mmask32, __m512h, __m512h, 10
test_2 (_mm256_minmax_pbh, __m256bh, __m256bh, __m256bh, 100)
test_3 (_mm256_maskz_minmax_pbh, __m256bh, __mmask16, __m256bh, __m256bh, 100)
test_4 (_mm256_mask_minmax_pbh, __m256bh, __m256bh, __mmask16, __m256bh, __m256bh, 100)
-test_2x (_mm256_minmax_round_pd, __m256d, __m256d, __m256d, 100, 4)
-test_3x (_mm256_maskz_minmax_round_pd, __m256d, __mmask8, __m256d, __m256d, 100, 4)
-test_4x (_mm256_mask_minmax_round_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 100, 4)
-test_2x (_mm256_minmax_round_ps, __m256, __m256, __m256, 100, 4)
-test_3x (_mm256_maskz_minmax_round_ps, __m256, __mmask8, __m256, __m256, 100, 4)
-test_4x (_mm256_mask_minmax_round_ps, __m256, __m256, __mmask8, __m256, __m256, 100, 4)
-test_2x (_mm256_minmax_round_ph, __m256h, __m256h, __m256h, 100, 4)
-test_3x (_mm256_maskz_minmax_round_ph, __m256h, __mmask16, __m256h, __m256h, 100, 4)
-test_4x (_mm256_mask_minmax_round_ph, __m256h, __m256h, __mmask16, __m256h, __m256h, 100, 4)
test_2 (_mm256_minmax_pd, __m256d, __m256d, __m256d, 100)
test_3 (_mm256_maskz_minmax_pd, __m256d, __mmask8, __m256d, __m256d, 100)
test_4 (_mm256_mask_minmax_pd, __m256d, __m256d, __mmask8, __m256d, __m256d, 100)
diff --git a/gcc/testsuite/gcc.target/i386/sse-23.c b/gcc/testsuite/gcc.target/i386/sse-23.c
index 26a2d01..2cfcf28 100644
--- a/gcc/testsuite/gcc.target/i386/sse-23.c
+++ b/gcc/testsuite/gcc.target/i386/sse-23.c
@@ -824,166 +824,6 @@
/* sm3intrin.h */
#define __builtin_ia32_vsm3rnds2(A, B, C, D) __builtin_ia32_vsm3rnds2 (A, B, C, 1)
-/* avx10_2roundingintrin.h */
-#define __builtin_ia32_addpd256_mask_round(A, B, C, D, E) __builtin_ia32_addpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_addph256_mask_round(A, B, C, D, E) __builtin_ia32_addph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_addps256_mask_round(A, B, C, D, E) __builtin_ia32_addps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_cmppd256_mask_round(A, B, C, D, E) __builtin_ia32_cmppd256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_cmpph256_mask_round(A, B, C, D, E) __builtin_ia32_cmpph256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_cmpps256_mask_round(A, B, C, D, E) __builtin_ia32_cmpps256_mask_round(A, B, 1, D, 8)
-#define __builtin_ia32_vcvtdq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtdq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtdq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtdq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtpd2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtpd2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2dq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2qq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2udq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtpd2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvtpd2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2pd256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2ps256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2psx256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2psx256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2qq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2udq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2uqq256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2uw256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2uw256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtph2w256_mask_round(A, B, C, D) __builtin_ia32_vcvtph2w256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2pd256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2phx256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2phx256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtps2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvtps2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2qq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2udq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvtps2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtqq2pd256_mask_round(A, B, C, D) __builtin_ia32_cvtqq2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtqq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtqq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtqq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtqq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2dq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2qq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2udq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2dq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2qq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2uqq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2udq256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2uw256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2uw256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvttph2w256_mask_round(A, B, C, D) __builtin_ia32_vcvttph2w256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2dq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2dq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2qq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2qq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2udq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2udq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2uqq256_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqq256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtudq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtudq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtudq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtudq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtuqq2pd256_mask_round(A, B, C, D) __builtin_ia32_cvtuqq2pd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtuqq2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtuqq2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtuqq2ps256_mask_round(A, B, C, D) __builtin_ia32_cvtuqq2ps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtuw2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtuw2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_vcvtw2ph256_mask_round(A, B, C, D) __builtin_ia32_vcvtw2ph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_divpd256_mask_round(A, B, C, D, E) __builtin_ia32_divpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_divph256_mask_round(A, B, C, D, E) __builtin_ia32_divph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_divps256_mask_round(A, B, C, D, E) __builtin_ia32_divps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfcmaddcph256_round(A, B, C, D) __builtin_ia32_vfcmaddcph256_round(A, B, C, 8)
-#define __builtin_ia32_vfcmaddcph256_mask_round(A, C, D, B, E) __builtin_ia32_vfcmaddcph256_mask_round(A, C, D, B, 8)
-#define __builtin_ia32_vfcmaddcph256_mask3_round(A, C, D, B, E) __builtin_ia32_vfcmaddcph256_mask3_round(A, C, D, B, 8)
-#define __builtin_ia32_vfcmaddcph256_maskz_round(B, C, D, A, E) __builtin_ia32_vfcmaddcph256_maskz_round(B, C, D, A, 8)
-#define __builtin_ia32_vfcmulcph256_round(A, B, C) __builtin_ia32_vfcmulcph256_round(A, B, 8)
-#define __builtin_ia32_vfcmulcph256_mask_round(A, B, C, D, E) __builtin_ia32_vfcmulcph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_fixupimmpd256_mask_round(A, B, C, D, E, F) __builtin_ia32_fixupimmpd256_mask_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmpd256_maskz_round(A, B, C, D, E, F) __builtin_ia32_fixupimmpd256_maskz_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmps256_mask_round(A, B, C, D, E, F) __builtin_ia32_fixupimmps256_mask_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_fixupimmps256_maskz_round(A, B, C, D, E, F) __builtin_ia32_fixupimmps256_maskz_round(A, B, C, 1, E, 8)
-#define __builtin_ia32_vfmaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddcph256_round(A, B, C, D) __builtin_ia32_vfmaddcph256_round(A, B, C, 8)
-#define __builtin_ia32_vfmaddcph256_mask_round(A, C, D, B, E) __builtin_ia32_vfmaddcph256_mask_round(A, C, D, B, 8)
-#define __builtin_ia32_vfmaddcph256_mask3_round(A, C, D, B, E) __builtin_ia32_vfmaddcph256_mask3_round(A, C, D, B, 8)
-#define __builtin_ia32_vfmaddcph256_maskz_round(B, C, D, A, E) __builtin_ia32_vfmaddcph256_maskz_round(B, C, D, A, 8)
-#define __builtin_ia32_vfmaddsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmaddsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmaddsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmsubaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfmsubaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfmulcph256_round(A, B, C) __builtin_ia32_vfmulcph256_round(A, B, 8)
-#define __builtin_ia32_vfmulcph256_mask_round(A, B, C, D, E) __builtin_ia32_vfmulcph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmaddps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmaddps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubpd256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubpd256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubph256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubph256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_mask_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_mask3_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_mask3_round(A, B, C, D, 8)
-#define __builtin_ia32_vfnmsubps256_maskz_round(A, B, C, D, E) __builtin_ia32_vfnmsubps256_maskz_round(A, B, C, D, 8)
-#define __builtin_ia32_getexppd256_mask_round(A, B, C, D) __builtin_ia32_getexppd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getexpph256_mask_round(A, B, C, D) __builtin_ia32_getexpph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getexpps256_mask_round(A, B, C, D) __builtin_ia32_getexpps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_getmantpd256_mask_round(A, F, C, D, E) __builtin_ia32_getmantpd256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_getmantph256_mask_round(A, F, C, D, E) __builtin_ia32_getmantph256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_getmantps256_mask_round(A, F, C, D, E) __builtin_ia32_getmantps256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_maxpd256_mask_round(A, B, C, D, E) __builtin_ia32_maxpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_maxph256_mask_round(A, B, C, D, E) __builtin_ia32_maxph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_maxps256_mask_round(A, B, C, D, E) __builtin_ia32_maxps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minpd256_mask_round(A, B, C, D, E) __builtin_ia32_minpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minph256_mask_round(A, B, C, D, E) __builtin_ia32_minph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_minps256_mask_round(A, B, C, D, E) __builtin_ia32_minps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulpd256_mask_round(A, B, C, D, E) __builtin_ia32_mulpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulph256_mask_round(A, B, C, D, E) __builtin_ia32_mulph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_mulps256_mask_round(A, B, C, D, E) __builtin_ia32_mulps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_rangeps256_mask_round(A, B, C, D, E, F) __builtin_ia32_rangeps256_mask_round(A, B, 1, D, E, 8)
-#define __builtin_ia32_rangepd256_mask_round(A, B, C, D, E, F) __builtin_ia32_rangepd256_mask_round(A, B, 1, D, E, 8)
-#define __builtin_ia32_reducepd256_mask_round(A, B, C, D, E) __builtin_ia32_reducepd256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_reduceph256_mask_round(A, B, C, D, E) __builtin_ia32_reduceph256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_reduceps256_mask_round(A, B, C, D, E) __builtin_ia32_reduceps256_mask_round(A, 8, C, D, 8)
-#define __builtin_ia32_rndscalepd256_mask_round(A, B, C, D, E) __builtin_ia32_rndscalepd256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_rndscaleph256_mask_round(A, B, C, D, E) __builtin_ia32_rndscaleph256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_rndscaleps256_mask_round(A, B, C, D, E) __builtin_ia32_rndscaleps256_mask_round(A, 1, C, D, 8)
-#define __builtin_ia32_scalefpd256_mask_round(A, B, C, D, E) __builtin_ia32_scalefpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_scalefph256_mask_round(A, B, C, D, E) __builtin_ia32_scalefph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_scalefps256_mask_round(A, B, C, D, E) __builtin_ia32_scalefps256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_sqrtpd256_mask_round(A, B, C, D) __builtin_ia32_sqrtpd256_mask_round(A, B, C, 8)
-#define __builtin_ia32_sqrtph256_mask_round(A, B, C, D) __builtin_ia32_sqrtph256_mask_round(A, B, C, 8)
-#define __builtin_ia32_sqrtps256_mask_round(A, B, C, D) __builtin_ia32_sqrtps256_mask_round(A, B, C, 8)
-#define __builtin_ia32_subpd256_mask_round(A, B, C, D, E) __builtin_ia32_subpd256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_subph256_mask_round(A, B, C, D, E) __builtin_ia32_subph256_mask_round(A, B, C, D, 8)
-#define __builtin_ia32_subps256_mask_round(A, B, C, D, E) __builtin_ia32_subps256_mask_round(A, B, C, D, 8)
-
/* avx10_2-512mediaintrin.h */
#define __builtin_ia32_mpsadbw512(A, B, C) __builtin_ia32_mpsadbw512 (A, B, 1)
#define __builtin_ia32_mpsadbw512_mask(A, B, C, D, E) __builtin_ia32_mpsadbw512_mask (A, B, 1, D, E)
@@ -992,9 +832,6 @@
#define __builtin_ia32_mpsadbw128_mask(A, B, C, D, E) __builtin_ia32_mpsadbw128_mask (A, B, 1, D, E)
#define __builtin_ia32_mpsadbw256_mask(A, B, C, D, E) __builtin_ia32_mpsadbw256_mask (A, B, 1, D, E)
-/* avx10_2convertintrin.h */
-#define __builtin_ia32_vcvt2ps2phx256_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx256_mask_round(A, B, C, D, 8)
-
/* avx10_2-512convertintrin.h */
#define __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, E) __builtin_ia32_vcvt2ps2phx512_mask_round(A, B, C, D, 8)
@@ -1036,22 +873,6 @@
#define __builtin_ia32_cvttps2uqqs512_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqqs512_mask_round(A, B, C, 8)
/* avx10_2satcvtintrin.h */
-#define __builtin_ia32_cvtph2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvtph2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtph2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvtph2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvtps2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvtps2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvtps2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttph2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvttph2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttph2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvttph2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2ibs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2ibs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2iubs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2iubs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2dqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2dqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2qqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2qqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2udqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2udqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttpd2uqqs256_mask_round(A, B, C, D) __builtin_ia32_cvttpd2uqqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2dqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2dqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2qqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2qqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2udqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2udqs256_mask_round(A, B, C, 8)
-#define __builtin_ia32_cvttps2uqqs256_mask_round(A, B, C, D) __builtin_ia32_cvttps2uqqs256_mask_round(A, B, C, 8)
#define __builtin_ia32_cvttsd2sis32_round(A, B) __builtin_ia32_cvttsd2sis32_round(A, 8)
#define __builtin_ia32_cvttsd2usis32_round(A, B) __builtin_ia32_cvttsd2usis32_round(A, 8)
#define __builtin_ia32_cvttss2sis32_round(A, B) __builtin_ia32_cvttss2sis32_round(A, 8)
@@ -1076,12 +897,12 @@
#define __builtin_ia32_minmaxbf16128_mask(A, B, C, D, E) __builtin_ia32_minmaxbf16128_mask (A, B, 100, D, E)
#define __builtin_ia32_minmaxbf16256_mask(A, B, C, D, E) __builtin_ia32_minmaxbf16256_mask (A, B, 100, D, E)
#define __builtin_ia32_minmaxpd128_mask(A, B, C, D, E) __builtin_ia32_minmaxpd128_mask (A, B, 100, D, E)
-#define __builtin_ia32_minmaxpd256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxpd256_mask_round (A, B, 100, D, E, 4)
+#define __builtin_ia32_minmaxpd256_mask(A, B, C, D, E) __builtin_ia32_minmaxpd256_mask (A, B, 100, D, E)
#define __builtin_ia32_minmaxph128_mask(A, B, C, D, E) __builtin_ia32_minmaxph128_mask (A, B, 100, D, E)
-#define __builtin_ia32_minmaxph256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxph256_mask_round (A, B, 100, D, E, 4)
+#define __builtin_ia32_minmaxph256_mask(A, B, C, D, E) __builtin_ia32_minmaxph256_mask (A, B, 100, D, E)
#define __builtin_ia32_minmaxps128_mask(A, B, C, D, E) __builtin_ia32_minmaxps128_mask (A, B, 100, D, E)
-#define __builtin_ia32_minmaxps256_mask_round(A, B, C, D, E, F) __builtin_ia32_minmaxps256_mask_round (A, B, 100, D, E, 4)
+#define __builtin_ia32_minmaxps256_mask(A, B, C, D, E) __builtin_ia32_minmaxps256_mask (A, B, 100, D, E)
-#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,fma,rtm,rdseed,prfchw,adx,fxsr,xsaveopt,sha,xsavec,xsaves,clflushopt,clwb,mwaitx,clzero,pku,sgx,rdpid,gfni,vpclmulqdq,pconfig,wbnoinvd,enqcmd,avx512vp2intersect,serialize,tsxldtrk,amx-tile,amx-int8,amx-bf16,kl,widekl,avxvnni,avxifma,avxvnniint8,avxneconvert,cmpccxadd,amx-fp16,prefetchi,raoint,amx-complex,avxvnniint16,sm3,sha512,sm4,avx10.2-512,amx-avx512,amx-tf32,amx-transpose,amx-fp8,movrs,amx-movrs")
+#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,fma,rtm,rdseed,prfchw,adx,fxsr,xsaveopt,sha,xsavec,xsaves,clflushopt,clwb,mwaitx,clzero,pku,sgx,rdpid,gfni,vpclmulqdq,pconfig,wbnoinvd,enqcmd,avx512vp2intersect,serialize,tsxldtrk,amx-tile,amx-int8,amx-bf16,kl,widekl,avxvnni,avxifma,avxvnniint8,avxneconvert,cmpccxadd,amx-fp16,prefetchi,raoint,amx-complex,avxvnniint16,sm3,sha512,sm4,avx10.2,amx-avx512,amx-tf32,amx-transpose,amx-fp8,movrs,amx-movrs")
#include <x86intrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-3.c b/gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-3.c
index 18c5397..85dd80e 100644
--- a/gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-3.c
+++ b/gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-mavx10.2-256 -O2" } */
+/* { dg-options "-mavx10.2 -O2" } */
/* { dg-final { scan-assembler "vpdpwusd\t" } } */
/* { dg-final { scan-assembler "vpdpwuud\t" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-4.c b/gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-4.c
index 1bd1400d..06a85a8 100644
--- a/gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-4.c
+++ b/gcc/testsuite/gcc.target/i386/vnniint16-auto-vectorize-4.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define N 512
diff --git a/gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-3.c b/gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-3.c
index 5a03ff8..bbb49e8 100644
--- a/gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-3.c
+++ b/gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-mavx10.2-256 -O2" } */
+/* { dg-options "-mavx10.2 -O2" } */
/* { dg-final { scan-assembler "vpdpbssd\t" } } */
/* { dg-final { scan-assembler "vpdpbuud\t" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-4.c b/gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-4.c
index dafab34..76cca22 100644
--- a/gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-4.c
+++ b/gcc/testsuite/gcc.target/i386/vnniint8-auto-vectorize-4.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2-512" } */
-/* { dg-require-effective-target avx10_2_512 } */
+/* { dg-options "-O2 -march=x86-64-v3 -mavx10.2" } */
+/* { dg-require-effective-target avx10_2 } */
#define N 512
diff --git a/gcc/testsuite/gcc.target/nvptx/alias-unsupported-1.c b/gcc/testsuite/gcc.target/nvptx/alias-unsupported-1.c
new file mode 100644
index 0000000..47b30bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/alias-unsupported-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-additional-options -mno-alias } */
+
+void __f ()
+{
+}
+
+void f () __attribute__ ((alias ("__f")));
+/* { dg-error {alias definitions not supported} {} { target *-*-* } .-1 } */
diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_30.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_30.c
index b69926e..b5e2c19 100644
--- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_30.c
+++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_30.c
@@ -1,14 +1,14 @@
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_30 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#error wrong value for __PTX_ISA_VERSION_MAJOR__
#endif
-#if __PTX_ISA_VERSION_MINOR__ != 0
+#if __PTX_ISA_VERSION_MINOR__ != 3
#error wrong value for __PTX_ISA_VERSION_MINOR__
#endif
diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_32.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_32.c
index dcf9e05..9a066bb 100644
--- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_32.c
+++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_32.c
@@ -1,14 +1,14 @@
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_32 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#error wrong value for __PTX_ISA_VERSION_MAJOR__
#endif
-#if __PTX_ISA_VERSION_MINOR__ != 0
+#if __PTX_ISA_VERSION_MINOR__ != 3
#error wrong value for __PTX_ISA_VERSION_MINOR__
#endif
diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_35.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_35.c
index ce46690..15f5fae 100644
--- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_35.c
+++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_35.c
@@ -1,14 +1,14 @@
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_35 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_35$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#error wrong value for __PTX_ISA_VERSION_MAJOR__
#endif
-#if __PTX_ISA_VERSION_MINOR__ != 0
+#if __PTX_ISA_VERSION_MINOR__ != 3
#error wrong value for __PTX_ISA_VERSION_MINOR__
#endif
diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_37.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_37.c
index 5b7f31c3..2a29377 100644
--- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_37.c
+++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_37.c
@@ -1,14 +1,14 @@
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_37 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_37$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#error wrong value for __PTX_ISA_VERSION_MAJOR__
#endif
-#if __PTX_ISA_VERSION_MINOR__ != 0
+#if __PTX_ISA_VERSION_MINOR__ != 3
#error wrong value for __PTX_ISA_VERSION_MINOR__
#endif
diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_50.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_50.c
index 934dd53..5bb73bc 100644
--- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_50.c
+++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_50.c
@@ -1,14 +1,14 @@
/* { dg-do assemble } */
/* { dg-options {-march-map=sm_50 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_37$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#error wrong value for __PTX_ISA_VERSION_MAJOR__
#endif
-#if __PTX_ISA_VERSION_MINOR__ != 0
+#if __PTX_ISA_VERSION_MINOR__ != 3
#error wrong value for __PTX_ISA_VERSION_MINOR__
#endif
diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_30.c b/gcc/testsuite/gcc.target/nvptx/march=sm_30.c
index a362935..23e09be 100644
--- a/gcc/testsuite/gcc.target/nvptx/march=sm_30.c
+++ b/gcc/testsuite/gcc.target/nvptx/march=sm_30.c
@@ -1,14 +1,14 @@
/* { dg-do assemble } */
/* { dg-options {-march=sm_30 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#error wrong value for __PTX_ISA_VERSION_MAJOR__
#endif
-#if __PTX_ISA_VERSION_MINOR__ != 0
+#if __PTX_ISA_VERSION_MINOR__ != 3
#error wrong value for __PTX_ISA_VERSION_MINOR__
#endif
diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_35.c b/gcc/testsuite/gcc.target/nvptx/march=sm_35.c
index c9e9226..9f9f1df 100644
--- a/gcc/testsuite/gcc.target/nvptx/march=sm_35.c
+++ b/gcc/testsuite/gcc.target/nvptx/march=sm_35.c
@@ -1,14 +1,14 @@
/* { dg-do assemble } */
/* { dg-options {-march=sm_35 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_35$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#error wrong value for __PTX_ISA_VERSION_MAJOR__
#endif
-#if __PTX_ISA_VERSION_MINOR__ != 0
+#if __PTX_ISA_VERSION_MINOR__ != 3
#error wrong value for __PTX_ISA_VERSION_MINOR__
#endif
diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_37.c b/gcc/testsuite/gcc.target/nvptx/march=sm_37.c
index d1094d0..5644861 100644
--- a/gcc/testsuite/gcc.target/nvptx/march=sm_37.c
+++ b/gcc/testsuite/gcc.target/nvptx/march=sm_37.c
@@ -1,14 +1,14 @@
/* { dg-do assemble } */
/* { dg-options {-march=sm_37 -mptx=_} } */
/* { dg-additional-options -save-temps } */
-/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.0$} 1 } } */
+/* { dg-final { scan-assembler-times {(?n)^ \.version 6\.3$} 1 } } */
/* { dg-final { scan-assembler-times {(?n)^ \.target sm_37$} 1 } } */
#if __PTX_ISA_VERSION_MAJOR__ != 6
#error wrong value for __PTX_ISA_VERSION_MAJOR__
#endif
-#if __PTX_ISA_VERSION_MINOR__ != 0
+#if __PTX_ISA_VERSION_MINOR__ != 3
#error wrong value for __PTX_ISA_VERSION_MINOR__
#endif
diff --git a/gcc/testsuite/gcc.target/s390/20020926-1.c b/gcc/testsuite/gcc.target/s390/20020926-1.c
index 868a0ad..aaa1342 100644
--- a/gcc/testsuite/gcc.target/s390/20020926-1.c
+++ b/gcc/testsuite/gcc.target/s390/20020926-1.c
@@ -3,7 +3,6 @@
/* { dg-do compile { target { s390-*-* } } } */
/* { dg-options "-O2 -mesa" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
int test (int *addr)
{
diff --git a/gcc/testsuite/gcc.target/s390/dwarfregtable-1.c b/gcc/testsuite/gcc.target/s390/dwarfregtable-1.c
index 6c7d231..b125498 100644
--- a/gcc/testsuite/gcc.target/s390/dwarfregtable-1.c
+++ b/gcc/testsuite/gcc.target/s390/dwarfregtable-1.c
@@ -2,7 +2,6 @@
/* { dg-do compile { target { ! lp64 } } } */
/* { dg-options "-mesa" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
#define DWARF_FRAME_REGISTERS 34
diff --git a/gcc/testsuite/gcc.target/s390/fp2int1.c b/gcc/testsuite/gcc.target/s390/fp2int1.c
index 4b359b7..4a90a8b 100644
--- a/gcc/testsuite/gcc.target/s390/fp2int1.c
+++ b/gcc/testsuite/gcc.target/s390/fp2int1.c
@@ -7,7 +7,6 @@
/* { dg-do run { target s390-*-* } } */
/* { dg-options "-O3 -mesa" } */
/* { dg-require-effective-target fenv_exceptions } */
-/* { dg-excess-errors "-mesa is deprecated" } */
#define _GNU_SOURCE
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/s390/pr102222.c b/gcc/testsuite/gcc.target/s390/pr102222.c
index 8ab1472..47d075e 100644
--- a/gcc/testsuite/gcc.target/s390/pr102222.c
+++ b/gcc/testsuite/gcc.target/s390/pr102222.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -m31 -mesa" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
struct squashfs_reg_inode_header_1 read_inode_inode;
diff --git a/gcc/testsuite/gcc.target/s390/pr106355-3.c b/gcc/testsuite/gcc.target/s390/pr106355-3.c
index f4f7f36..39daea44 100644
--- a/gcc/testsuite/gcc.target/s390/pr106355-3.c
+++ b/gcc/testsuite/gcc.target/s390/pr106355-3.c
@@ -1,7 +1,6 @@
/* { dg-do compile { target { s390-*-* } } } */
/* { dg-options "-foptimize-sibling-calls -mesa" } */
/* { dg-final { scan-assembler {brasl\t%r\d+,bar} } } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/* This tests function s390_call_saved_register_used where
REG_P (parm_rtx) and nregs == 2 holds. */
diff --git a/gcc/testsuite/gcc.target/s390/pr61078.c b/gcc/testsuite/gcc.target/s390/pr61078.c
index 827c3fe..40f6ad7 100644
--- a/gcc/testsuite/gcc.target/s390/pr61078.c
+++ b/gcc/testsuite/gcc.target/s390/pr61078.c
@@ -3,7 +3,6 @@
/* { dg-do run { target { ! lp64 } } } */
/* { dg-options "-O2 -mesa" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-10.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-10.c
index 421a08e..f1beb1d 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-10.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-10.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-12.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-12.c
index 61fb7e9..8868f91 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-12.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-12.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-14.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-14.c
index 6b3780e..f928bef 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-14.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-14.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-18.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-18.c
index 2459bae..878f002 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-18.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-18.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-2.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-2.c
index e32040c..c663b9e 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-2.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-2.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-20.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-20.c
index 75a1e88..e9eacaa 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-20.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-20.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-22.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-22.c
index 573e931..1595475 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-22.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-22.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z13 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -mhard-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-24.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-24.c
index 49f908b..87e4da5 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-24.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-24.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mno-backchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-26.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-26.c
index 4d8e023..e4b49dc 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-26.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-26.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-28.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-28.c
index 4d23cad..ae784a6 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-28.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-28.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-30.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-30.c
index cbe4c91..f82d9ee 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-30.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-30.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-32.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-32.c
index ea6f482..6bdc55a 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-32.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-32.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-4.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-4.c
index 08358bb..5780f96 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-4.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-4.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-6.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-6.c
index 2692c86..a946ff8 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-6.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-6.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-8.c b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-8.c
index a601511..fee9644 100644
--- a/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-8.c
+++ b/gcc/testsuite/gcc.target/s390/target-attribute/tattr-m31-8.c
@@ -3,7 +3,6 @@
/* { dg-do assemble { target { ! lp64 } } } */
/* { dg-require-effective-target target_attribute } */
/* { dg-options "-save-temps -mdebug -m31 -march=z10 -mtune=z13 -mstack-size=2048 -mstack-guard=16 -mbranch-cost=1 -mwarn-framesize=512 -mno-hard-dfp -mbackchain -msoft-float -mno-vx -mno-htm -mno-packed-stack -msmall-exec -mno-zvector -mmvcle -mesa -mno-warn-dynamicstack" } */
-/* { dg-excess-errors "-mesa is deprecated" } */
/**
**
diff --git a/gcc/testsuite/gdc.dg/pr117621.d b/gcc/testsuite/gdc.dg/pr117621.d
new file mode 100644
index 0000000..f0b96cb
--- /dev/null
+++ b/gcc/testsuite/gdc.dg/pr117621.d
@@ -0,0 +1,11 @@
+// { dg-do "compile" }
+// { dg-options "-g" }
+void pr117621()
+{
+ auto fun()(inout int)
+ {
+ struct S {}
+ return inout(S)();
+ }
+ auto s = fun(0);
+}
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail347.d b/gcc/testsuite/gdc.test/fail_compilation/fail347.d
index e495ba2..c56acf5 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/fail347.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail347.d
@@ -5,10 +5,10 @@ TEST_OUTPUT:
fail_compilation/fail347.d(26): Error: undefined identifier `bbr`, did you mean variable `bar`?
fail_compilation/fail347.d(27): Error: no property `ofo` for type `S`, did you mean `fail347.S.foo`?
fail_compilation/fail347.d(29): Error: no property `fool` for `sp` of type `fail347.S*`
-fail_compilation/fail347.d(29): did you mean variable `foo`?
+fail_compilation/fail347.d(20): did you mean variable `foo`?
fail_compilation/fail347.d(30): Error: undefined identifier `strlenx`, did you mean function `strlen`?
fail_compilation/fail347.d(31): Error: no property `strlenx` for `"hello"` of type `string`
-fail_compilation/fail347.d(31): did you mean function `strlen`?
+fail_compilation/imports/fail347a.d(3): did you mean function `strlen`?
---
*/
diff --git a/gcc/testsuite/gdc.test/fail_compilation/ufcs.d b/gcc/testsuite/gdc.test/fail_compilation/ufcs.d
index 3a92a69..87efbcf 100644
--- a/gcc/testsuite/gdc.test/fail_compilation/ufcs.d
+++ b/gcc/testsuite/gdc.test/fail_compilation/ufcs.d
@@ -1,23 +1,28 @@
/*
TEST_OUTPUT:
---
-fail_compilation/ufcs.d(26): Error: no property `regularF` for `s` of type `S`
-fail_compilation/ufcs.d(26): the following error occured while looking for a UFCS match
-fail_compilation/ufcs.d(26): Error: function `regularF` is not callable using argument types `(S)`
-fail_compilation/ufcs.d(26): expected 0 argument(s), not 1
-fail_compilation/ufcs.d(31): `ufcs.regularF()` declared here
-fail_compilation/ufcs.d(27): Error: no property `templateF` for `s` of type `S`
-fail_compilation/ufcs.d(27): the following error occured while looking for a UFCS match
-fail_compilation/ufcs.d(27): Error: template `templateF` is not callable using argument types `!()(S)`
-fail_compilation/ufcs.d(32): Candidate is: `templateF()()`
-fail_compilation/ufcs.d(28): Error: no property `templateO` for `s` of type `S`
-fail_compilation/ufcs.d(28): the following error occured while looking for a UFCS match
-fail_compilation/ufcs.d(28): Error: none of the overloads of template `ufcs.templateO` are callable using argument types `!()(S)`
-fail_compilation/ufcs.d(34): Candidates are: `templateO()(int x)`
-fail_compilation/ufcs.d(35): `templateO()(float y)`
+fail_compilation/ufcs.d(31): Error: no property `regularF` for `s` of type `S`
+fail_compilation/ufcs.d(31): the following error occured while looking for a UFCS match
+fail_compilation/ufcs.d(31): Error: function `regularF` is not callable using argument types `(S)`
+fail_compilation/ufcs.d(31): expected 0 argument(s), not 1
+fail_compilation/ufcs.d(39): `ufcs.regularF()` declared here
+fail_compilation/ufcs.d(32): Error: no property `templateF` for `s` of type `S`
+fail_compilation/ufcs.d(32): the following error occured while looking for a UFCS match
+fail_compilation/ufcs.d(32): Error: template `templateF` is not callable using argument types `!()(S)`
+fail_compilation/ufcs.d(40): Candidate is: `templateF()()`
+fail_compilation/ufcs.d(33): Error: no property `templateO` for `s` of type `S`
+fail_compilation/ufcs.d(33): the following error occured while looking for a UFCS match
+fail_compilation/ufcs.d(33): Error: none of the overloads of template `ufcs.templateO` are callable using argument types `!()(S)`
+fail_compilation/ufcs.d(42): Candidates are: `templateO()(int x)`
+fail_compilation/ufcs.d(43): `templateO()(float y)`
+fail_compilation/ufcs.d(36): Error: no property `local` for `s` of type `ufcs.S`
+fail_compilation/ufcs.d(35): cannot call function `local` with UFCS because it is not declared at module scope
+fail_compilation/ufcs.d(26): struct `S` defined here
---
*/
+
+
struct S { }
void f()
@@ -26,6 +31,9 @@ void f()
s.regularF();
s.templateF();
s.templateO();
+
+ void local(S) {}
+ s.local();
}
void regularF();
diff --git a/gcc/testsuite/gdc.test/runnable/test21020.d b/gcc/testsuite/gdc.test/runnable/test21020.d
new file mode 100644
index 0000000..484db30
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test21020.d
@@ -0,0 +1,11 @@
+// https://github.com/dlang/dmd/issues/21020
+
+shared struct Queue {
+ int[int] map;
+}
+
+void main() {
+ auto queue = Queue();
+ (cast(int[int]) queue.map)[1] = 2;
+ assert(queue.map[1] == 2);
+}
diff --git a/gcc/testsuite/gfortran.dg/class_79.f90 b/gcc/testsuite/gfortran.dg/class_79.f90
new file mode 100644
index 0000000..a2226e4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_79.f90
@@ -0,0 +1,25 @@
+!{ dg-do run }
+
+! Check double free on array constructor in argument list is fixed.
+! Contributed by Damian Rouson <damian@archaeologic.codes>
+program pr119349
+ implicit none
+
+ type string_t
+ character(len=:), allocatable :: string_
+ end type
+
+ print *, true([string()])
+
+contains
+
+ type(string_t) function string()
+ string%string_ = ""
+ end function
+
+ logical elemental function true(rhs)
+ class(string_t), intent(in) :: rhs
+ true = .true.
+ end function
+
+end program
diff --git a/gcc/testsuite/gfortran.dg/gomp/interop-4.f90 b/gcc/testsuite/gfortran.dg/gomp/interop-4.f90
index 8783f4c..43c28d6 100644
--- a/gcc/testsuite/gfortran.dg/gomp/interop-4.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/interop-4.f90
@@ -26,18 +26,18 @@ implicit none
integer(omp_interop_kind) :: obj1, obj2, obj3, obj4, obj5, obj6, obj7
integer :: x(6)
-!$omp interop init ( obj1, obj2) use (obj3) destroy(obj4) init(obj5) destroy(obj6) use(obj7) ! { dg-message "'#pragma omp interop' not yet supported" }
+!$omp interop init ( obj1, obj2) use (obj3) destroy(obj4) init(obj5) destroy(obj6) use(obj7)
! { dg-final { scan-tree-dump-times "#pragma omp interop init\\(obj1\\) init\\(obj2\\) init\\(obj5\\) use\\(obj3\\) use\\(obj7\\) destroy\\(obj4\\) destroy\\(obj6\\)\[\r\n\]" 1 "original" } }
-!$omp interop nowait init (targetsync : obj1, obj2) use (obj3) destroy(obj4) init(target, targetsync : obj5) destroy(obj6) use(obj7) depend(inout: x) ! { dg-message "'#pragma omp interop' not yet supported" }
+!$omp interop nowait init (targetsync : obj1, obj2) use (obj3) destroy(obj4) init(target, targetsync : obj5) destroy(obj6) use(obj7) depend(inout: x)
! { dg-final { scan-tree-dump-times "#pragma omp interop depend\\(inout:x\\) init\\(targetsync: obj1\\) init\\(targetsync: obj2\\) init\\(target, targetsync: obj5\\) use\\(obj3\\) use\\(obj7\\) destroy\\(obj4\\) destroy\\(obj6\\) nowait\[\r\n\]" 1 "original" } }
-!$omp interop init ( obj1, obj2) init (target: obj3) init(targetsync : obj4) init(target,targetsync: obj5) ! { dg-message "'#pragma omp interop' not yet supported" }
+!$omp interop init ( obj1, obj2) init (target: obj3) init(targetsync : obj4) init(target,targetsync: obj5)
! { dg-final { scan-tree-dump-times "#pragma omp interop init\\(obj1\\) init\\(obj2\\) init\\(target: obj3\\) init\\(targetsync: obj4\\) init\\(target, targetsync: obj5\\)\[\r\n\]" 1 "original" } }
! --------------------------------------------
-!$omp interop init (target, prefer_type(omp_ifr_cuda, omp_ifr_cuda+1, "hsa", "myPrivateInterop", omp_ifr_cuda-2) : obj1, obj2) init (target: obj3) init(prefer_type(omp_ifr_hip, "sycl", omp_ifr_opencl), targetsync : obj4, obj7) init(target,prefer_type("level_zero", omp_ifr_level_zero+0),targetsync: obj5) ! { dg-message "'#pragma omp interop' not yet supported" }
+!$omp interop init (target, prefer_type(omp_ifr_cuda, omp_ifr_cuda+1, "hsa", "myPrivateInterop", omp_ifr_cuda-2) : obj1, obj2) init (target: obj3) init(prefer_type(omp_ifr_hip, "sycl", omp_ifr_opencl), targetsync : obj4, obj7) init(target,prefer_type("level_zero", omp_ifr_level_zero+0),targetsync: obj5)
!
! { dg-warning "Unknown foreign runtime identifier 'myPrivateInterop' at \\(1\\) \\\[-Wopenmp\\\]" "" { target *-*-* } .-2 }
! { dg-warning "Unknown foreign runtime identifier '-1' at \\(1\\) \\\[-Wopenmp\\\]" "" { target *-*-* } .-3 }
@@ -47,7 +47,7 @@ integer :: x(6)
! --------------------------------------------
-!$omp interop init ( target, prefer_type( {fr(1_"hip"), attr("ompx_gnu_prio:1", 1_"ompx_gnu_debug")}, {attr("ompx_gnu_nicest"), attr("ompx_something")}) : obj1, obj2) init ( prefer_type( {fr("cuda")}, {fr(omp_ifr_cuda_driver), attr("ompx_nix")}, {fr("best")}), targetsync : obj3, obj4) nowait use(obj5) ! { dg-message "'#pragma omp interop' not yet supported" }
+!$omp interop init ( target, prefer_type( {fr(1_"hip"), attr("ompx_gnu_prio:1", 1_"ompx_gnu_debug")}, {attr("ompx_gnu_nicest"), attr("ompx_something")}) : obj1, obj2) init ( prefer_type( {fr("cuda")}, {fr(omp_ifr_cuda_driver), attr("ompx_nix")}, {fr("best")}), targetsync : obj3, obj4) nowait use(obj5)
!
! ! { dg-warning "Unknown foreign runtime identifier 'best' at \\(1\\) \\\[-Wopenmp\\\]" "" { target *-*-* } .-2 }
!
diff --git a/gcc/testsuite/gfortran.dg/gomp/interop-5.f90 b/gcc/testsuite/gfortran.dg/gomp/interop-5.f90
new file mode 100644
index 0000000..a6a2d71
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/interop-5.f90
@@ -0,0 +1,21 @@
+! { dg-additional-options "-fdump-tree-omplower" }
+
+subroutine sub1 (a1, a2, a3, a4)
+ use omp_lib, only: omp_interop_kind
+ integer(omp_interop_kind) :: a1 ! by ref
+ integer(omp_interop_kind), optional :: a2 ! as pointer
+ integer(omp_interop_kind), allocatable :: a3 ! ref to pointer
+ integer(omp_interop_kind), value :: a4
+ integer(omp_interop_kind) :: b
+
+ !$omp interop init(target : a1, a2, a3, a4, b)
+ ! { dg-final { scan-tree-dump-times "void \\* interopobjs\.\[0-9\]+\\\[5\\\];\[\r\n ]*integer\\(kind=4\\) tgt_tgtsync\.\[0-9\]+\\\[5\\\];\[\r\n ]*integer\\(kind=8\\) \\* & a3\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) \\* D\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) \\* a2\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) & a1\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[0\\\] = &b;\[\r\n ]*tgt_tgtsync\.\[0-9\]+\\\[0\\\] = 1;\[\r\n ]*interopobjs\.\[0-9\]+\\\[1\\\] = &a4;\[\r\n ]*tgt_tgtsync\.\[0-9\]+\\\[1\\\] = 1;\[\r\n ]*a3\.\[0-9\]+ = a3;\[\r\n ]*D\.\[0-9\]+ = \\*a3\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[2\\\] = D\.\[0-9\]+;\[\r\n ]*tgt_tgtsync\.\[0-9\]+\\\[2\\\] = 1;\[\r\n ]*a2\.\[0-9\]+ = a2;\[\r\n ]*interopobjs\.\[0-9\]+\\\[3\\\] = a2\.\[0-9\]+;\[\r\n ]*tgt_tgtsync\.\[0-9\]+\\\[3\\\] = 1;\[\r\n ]*a1\.\[0-9\]+ = a1;\[\r\n ]*interopobjs\.\[0-9\]+\\\[4\\\] = a1\.\[0-9\]+;\[\r\n ]*tgt_tgtsync\.\[0-9\]+\\\[4\\\] = 1;\[\r\n ]*__builtin_GOMP_interop \\(-5, 5, &interopobjs\.\[0-9\]+, &tgt_tgtsync\.\[0-9\]+, 0B, 0, 0B, 0, 0B, 0, 0B\\);" 1 "omplower" } }
+
+ !$omp interop use(a1, a2, a3, a4, b)
+ ! { dg-final { scan-tree-dump-times "void \\* interopobjs\.\[0-9\]+\\\[5\\\];\[\r\n ]*integer\\(kind=8\\) b\.\[0-9\]+;\[\r\n ]*void \\* b\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) a4\.\[0-9\]+;\[\r\n ]*void \\* a4\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) \\* & a3\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) \\* D\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) D\.\[0-9\]+;\[\r\n ]*void \\* D\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) \\* a2\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) D\.\[0-9\]+;\[\r\n ]*void \\* D\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) & a1\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) D\.\[0-9\]+;\[\r\n ]*void \\* D\.\[0-9\]+;\[\r\n ]*b\.\[0-9\]+ = b;\[\r\n ]*b\.\[0-9\]+ = \\(void \\*\\) b\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[0\\\] = b\.\[0-9\]+;\[\r\n ]*a4\.\[0-9\]+ = a4;\[\r\n ]*a4\.\[0-9\]+ = \\(void \\*\\) a4\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[1\\\] = a4\.\[0-9\]+;\[\r\n ]*a3\.\[0-9\]+ = a3;\[\r\n ]*D\.\[0-9\]+ = \\*a3\.\[0-9\]+;\[\r\n ]*D\.\[0-9\]+ = \\*D\.\[0-9\]+;\[\r\n ]*D\.\[0-9\]+ = \\(void \\*\\) D\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[2\\\] = D\.\[0-9\]+;\[\r\n ]*a2\.\[0-9\]+ = a2;\[\r\n ]*D\.\[0-9\]+ = \\*a2\.\[0-9\]+;\[\r\n ]*D\.\[0-9\]+ = \\(void \\*\\) D\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[3\\\] = D\.\[0-9\]+;\[\r\n ]*a1\.\[0-9\]+ = a1;\[\r\n ]*D\.\[0-9\]+ = \\*a1\.\[0-9\]+;\[\r\n ]*D\.\[0-9\]+ = \\(void \\*\\) D\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[4\\\] = D\.\[0-9\]+;\[\r\n ]*__builtin_GOMP_interop \\(-5, 0, 0B, 0B, 0B, 5, &interopobjs\.\[0-9\]+, 0, 0B, 0, 0B\\);" 1 "omplower" } }
+
+ !$omp interop destroy(a1, a2, a3, a4, b)
+ ! { dg-final { scan-tree-dump-times "void \\* interopobjs\.\[0-9\]+\\\[5\\\];\[\r\n ]*integer\\(kind=8\\) \\* & a3\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) \\* D\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) \\* a2\.\[0-9\]+;\[\r\n ]*integer\\(kind=8\\) & a1\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[0\\\] = &b;\[\r\n ]*interopobjs\.\[0-9\]+\\\[1\\\] = &a4;\[\r\n ]*a3\.\[0-9\]+ = a3;\[\r\n ]*D\.\[0-9\]+ = \\*a3\.\[0-9\]+;\[\r\n ]*interopobjs\.\[0-9\]+\\\[2\\\] = D\.\[0-9\]+;\[\r\n ]*a2\.\[0-9\]+ = a2;\[\r\n ]*interopobjs\.\[0-9\]+\\\[3\\\] = a2\.\[0-9\]+;\[\r\n ]*a1\.\[0-9\]+ = a1;\[\r\n ]*interopobjs\.\[0-9\]+\\\[4\\\] = a1\.\[0-9\]+;\[\r\n ]*__builtin_GOMP_interop \\(-5, 0, 0B, 0B, 0B, 0, 0B, 5, &interopobjs\.\[0-9\]+, 0, 0B\\);" 1 "omplower" } }
+end subroutine
+
+
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_54.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_54.f90
new file mode 100644
index 0000000..f5b7fa8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_54.f90
@@ -0,0 +1,30 @@
+!{ dg-do run }
+
+! Do not free procedure pointer components.
+! Contributed by Damian Rouson <damian@archaeologic.codes>
+
+ implicit none
+
+ type foo_t
+ integer, allocatable :: i_
+ procedure(f), pointer, nopass :: f_
+ procedure(c), pointer, nopass :: c_
+ end type
+
+ class(foo_t), allocatable :: ff
+
+ associate(foo => foo_t(1,f))
+ end associate
+
+contains
+
+ function f()
+ logical, allocatable :: f
+ f = .true.
+ end function
+
+ function c()
+ class(foo_t), allocatable :: c
+ allocate(c)
+ end function
+end
diff --git a/gcc/testsuite/gfortran.dg/reduce_1.f90 b/gcc/testsuite/gfortran.dg/reduce_1.f90
new file mode 100644
index 0000000..585cad7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reduce_1.f90
@@ -0,0 +1,202 @@
+! { dg-do run }
+!
+! Test results from the F2018 intrinsic REDUCE
+!
+! Contributed by Paul Thomas <pault@gcc.gnu.org>
+!
+
+module operations
+ type :: s
+ integer, allocatable :: i
+ integer :: j
+ end type s
+
+contains
+
+ pure function add(i,j) result(sum_ij)
+ integer, intent(in) :: i, j
+ integer :: sum_ij
+ sum_ij = i + j
+ end function add
+!
+ pure function mult(i,j) result(prod_ij)
+ integer, intent(in) :: i, j
+ integer :: prod_ij
+ prod_ij = i * j
+ end function mult
+
+ pure function mult_by_val(i,j) result(prod_ij)
+ integer, intent(in), value :: i, j
+ integer :: prod_ij
+ prod_ij = i * j
+ end function mult_by_val
+
+ pure function non_com(i,j) result(nc_ij)
+ integer, intent(in) :: i, j
+ integer :: nc_ij
+ if (i > j) then
+ nc_ij = i - j
+ else
+ nc_ij = i + j
+ endif
+ end function non_com
+
+ pure function c_op (i, j) result (ij)
+ character(8), intent(in) :: i, j
+ character(8) :: ij
+ integer :: n
+ ij = i
+ do n = 1, 8
+ if (i(n:n) .ne. j(n:n)) ij(n:n) = '!'
+ end do
+ end function c_op
+
+ pure function t_op (i, j) result (ij)
+ type(s), intent(in) :: i, j
+ type(s) :: ij
+ ij%i = non_com (i%i, j%i)
+ ij%j = non_com (j%j, i%j)
+ end function t_op
+
+ pure function t_add (i, j) result (ij)
+ type(s), intent(in) :: i, j
+ type(s) :: ij
+ ij%i = i%i + j%i
+ ij%j = j%j + i%j
+ end function t_add
+end module operations
+
+program test_reduce
+ use operations
+ implicit none
+ integer :: i
+ integer, parameter :: n = 3
+ integer, parameter :: vec(n) = [2, 5, 10]
+ integer, parameter :: mat(n,2) = reshape([vec,2*vec],shape=[size(vec),2])
+ integer :: res0
+ integer, dimension(:), allocatable :: res1
+ integer, dimension(:,:), allocatable :: res2
+ logical, parameter :: t = .true., f = .false.
+ LOGICAL, PARAMETER :: keep(n) = [t,f,t]
+ logical, parameter :: keepM(n,2) = reshape([keep,keep],shape=[n,2])
+ logical, parameter :: all_false(n,2) = reshape ([(f, i = 1,2*n)],[n,2])
+ character(*), parameter :: carray (4) = ['abctefgh', 'atcdefgh', &
+ 'abcdefth', 'abcdtfgh']
+ character(:), allocatable :: cres0, cres1(:)
+ type(s), allocatable :: tres1(:)
+ type(s), allocatable :: tres2(:,:)
+ type(s) :: tres2_na(2, 4)
+ type(s), allocatable :: tarray(:,:,:)
+ type(s), allocatable :: tvec(:)
+ type(s), allocatable :: tres0
+ integer, allocatable :: ires(:)
+
+! Simple cases with and without DIM
+ res0 = reduce (vec, add, dim=1)
+ if (res0 /= 17) stop 1
+ res0 = reduce (vec, mult, 1)
+ if (res0 /= 100) stop 2
+ res1 = reduce (mat, add, 1)
+ if (any (res1 /= [17, 34])) stop 3
+ res1 = reduce (mat, mult, 1)
+ if (any (res1 /= [100, 800])) stop 4
+ res1 = reduce (mat, add, 2)
+ if (any (res1 /= [6, 15, 30])) stop 5
+ res1 = reduce (mat, mult, 2)
+ if (any (res1 /= [8, 50, 200])) stop 6
+ res0 = reduce (mat, add)
+ if (res0 /= 51) stop 7
+ res0 = reduce (mat, mult)
+ if (res0 /= 80000) stop 8
+! Repeat previous test with arguments passed by value to operation
+ res0 = reduce (mat, mult_by_val)
+ if (res0 /= 80000) stop 9
+
+! Using MASK and IDENTITY
+ res0 = reduce (vec,add, mask=keep, identity = 1)
+ if (res0 /= 12) stop 10
+ res0 = reduce (vec,mult, mask=keep, identity = 1)
+ if (res0 /= 20) stop 11
+ res0 = reduce (mat, add, mask=keepM, identity = 1)
+ if (res0 /= 36) stop 12
+ res0 = reduce (mat, mult, mask=keepM, identity = 1)
+ if (res0 /= 1600) stop 13
+ res0 = reduce (mat, mult, mask=all_false, identity = -1)
+ if (res0 /= -1) stop 14
+
+! 3-D ARRAYs with and without DIM and MASK
+ res0 = reduce (reshape ([(i, i=1,8)], [2,2,2]),mult)
+ if (res0 /= 40320) stop 15
+ res2 = reduce (reshape ([(i, i=1,8)], [2,2,2]),mult,dim=2)
+ if (any (res2 /= reshape ([3,8,35,48], [2,2]))) stop 16
+ res2 = reduce (reshape ([(i, i=1,8)], [2,2,2]),mult,dim=2, &
+ mask=reshape ([t,f,t,f,t,f,t,f],[2,2,2]), identity=-1)
+ if (any (res2 /= reshape ([3,-1,35,-1], [2,2]))) stop 17
+ res2 = reduce (reshape([(i, i=1,16)], [2,4,2]), add, dim = 3, &
+ mask=reshape([f,t,t,f,t,t,t,t,t,t,t,t,t,t,t,t],[2,4,2]), &
+ identity=-1)
+ if (any (res2 /= reshape ([9,12,14,12,18,20,22,24], [2,4]))) stop 18
+ res1 = reduce (reshape([(i, i=1,16)], [4,4]),add, dim = 2, &
+ mask=reshape([f,t,t,f,t,t,t,t,t,t,t,t,t,t,t,t],[4,4]), &
+ identity=-1)
+ if (any (res1 /= [27,32,36,36])) stop 19
+
+! Verify that the library function treats non-comutative OPERATION in the
+! correct order. If this were incorrect,the result would be [9,8,8,12,8,8,8,8].
+ res2 = reduce (reshape([(i, i=1,16)], [2,4,2]), non_com, dim = 3, &
+ mask=reshape([f,t,t,f,t,t,t,t,t,t,t,t,t,t,t,t],[2,4,2]), &
+ identity=-1)
+ if (any (res2 /= reshape([9,12,14,12,18,20,22,24],shape(res2)))) stop 20
+
+! Character ARRAY and OPERATION
+ cres0 = reduce (carray, c_op); if (cres0 /= 'a!c!!f!h') stop 21
+ cres1 = reduce (reshape (carray, [2,2]), c_op, dim = 1)
+ if (any (cres1 /= ['a!c!efgh','abcd!f!h'])) stop 22
+
+! Derived type ARRAY and OPERATION - was checked for memory leaks of the
+! allocatable component.
+! tarray = reshape([(s(i, i), i = 1, 16)], [2,4,2]) leaks memory!
+ allocate (tvec(16))
+ do i = 1, 16
+ tvec(i)%i = i
+ tvec(i)%j = i
+ enddo
+ tarray = reshape(tvec, [2,4,2])
+
+ tres2 = reduce (tarray, t_op, dim = 3, &
+ mask=reshape([t,t,t,f,t,t,t,t,t,f,t,t,t,t,t,t],[2,4,2]), &
+ identity = s(NULL(),1))
+ ires = [10,2,14,12,18,20,22,24]
+ tres1 = reshape (tres2, [size (tres2, 1)* size (tres2, 2)])
+ do i = 1, size (tres2, 1)* size (tres2, 2)
+ if (tres1(i)%i /= ires(i)) stop 23
+ end do
+ if (any (tres2%j /= reshape([8,2,8,12,8,8,8,8],shape(tres2)))) stop 24
+
+! Check that the non-allocatable result with an allocatable component does not
+! leak memory from the allocatable component
+ tres2_na = reduce (tarray, t_op, dim = 3, &
+ mask=reshape([t,t,t,f,t,t,t,t,t,f,t,t,t,t,t,t],[2,4,2]), &
+ identity = s(NULL(),1))
+ tres1 = reshape (tres2_na, [size (tres2_na, 1)* size (tres2, 2)])
+ do i = 1, size (tres2_na, 1)* size (tres2_na, 2)
+ if (tres1(i)%i /= ires(i)) stop 25
+ end do
+ if (any (tres2_na%j /= reshape([8,2,8,12,8,8,8,8],shape(tres2_na)))) stop 26
+
+
+ tres0 = reduce (tarray, t_add)
+ if (tres0%i /= 136) stop 27
+ if (tres0%j /= 136) stop 28
+
+! Test array being a component of an array of derived types
+ i = reduce (tarray%j, add, &
+ mask=reshape([t,t,t,f,t,t,t,t,t,f,t,t,t,t,f,t],[2,4,2]), &
+ identity = 0)
+ if (i /= 107) stop 29
+
+
+! Deallocate the allocatable components and then the allocatable variables
+ tres2_na = reshape ([(s(NULL (), 0), i = 1, size (tres2_na))], shape (tres2_na))
+ deallocate (res1, res2, cres0, cres1, tarray, ires, tres0, tres1, tres2, tvec)
+end
diff --git a/gcc/testsuite/gfortran.dg/reduce_2.f90 b/gcc/testsuite/gfortran.dg/reduce_2.f90
new file mode 100644
index 0000000..52d7c68
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reduce_2.f90
@@ -0,0 +1,145 @@
+! { dg-do compile }
+!
+! Test argument compliance for the F2018 intrinsic REDUCE
+!
+! Contributed by Paul Thomas <pault@gcc.gnu.org>
+!
+ class (*), allocatable :: cstar (:)
+ integer, allocatable :: i(:,:,:)
+ integer :: n(2,2)
+ Logical :: l1(4), l2(2,3), l3(2,2)
+
+! The ARRAY argument at (1) of REDUCE shall not be polymorphic
+ print *, reduce (cstar, add) ! { dg-error "shall not be polymorphic" }
+
+! OPERATION argument at %L must be a PURE function
+ print *, reduce (i, iadd) ! { dg-error "must be a PURE function" }
+ print *, reduce (i, foo) ! { dg-error "must be a PURE function" }
+
+! The function passed as OPERATION at (1) shall have scalar nonallocatable
+! nonpointer arguments and return a nonallocatable nonpointer scalar
+ print *, reduce (i, vadd) ! { dg-error "return a nonallocatable nonpointer scalar" }
+
+! The function passed as OPERATION at (1) shall have two arguments
+ print *, reduce (i, add_1a) ! { dg-error "shall have two arguments" }
+ print *, reduce (i, add_3a) ! { dg-error "shall have two arguments" }
+
+!The ARRAY argument at (1) has type INTEGER(4) but the function passed as OPERATION at
+! (2) returns REAL(4)
+ print *, reduce (i, add_r) ! { dg-error "returns REAL" }
+
+! The function passed as OPERATION at (1) shall have scalar nonallocatable nonpointer
+! arguments and return a nonallocatable nonpointer scalar
+ print *, reduce (i, add_a) ! { dg-error "return a nonallocatable nonpointer scalar" }
+
+! The function passed as OPERATION at (1) shall have scalar nonallocatable nonpointer arguments and
+! return a nonallocatable nonpointer scalar
+ print *, reduce (i, add_array) ! { dg-error "scalar nonallocatable nonpointer arguments" }
+
+! The function passed as OPERATION at (1) shall not have the OPTIONAL attribute for either of the arguments
+ print *, reduce (i, add_optional) ! { dg-error "shall not have the OPTIONAL attribute" }
+
+! The function passed as OPERATION at (1) shall have the VALUE attribute either for none or both arguments
+ print *, reduce (i, add_one_value) ! { dg-error "VALUE attribute either for none or both arguments" }
+
+! The character length of the ARRAY argument at (1) and of the arguments of the OPERATION at (2)
+! shall be the same
+ print *, reduce ([character(4) :: 'abcd','efgh'], char_one) ! { dg-error "The character length of the ARRAY" }
+
+! The character length of the ARRAY argument at (1) and of the function result of the OPERATION
+! at (2) shall be the same
+ print *, reduce ([character(4) :: 'abcd','efgh'], char_two) ! { dg-error "function result of the OPERATION" }
+
+! The character length of the ARRAY argument at (1) and of the arguments of the OPERATION at
+! (2) shall be the same
+ print *, reduce ([character(4) :: 'abcd','efgh'], char_three) ! { dg-error "arguments of the OPERATION" }
+
+! The DIM argument at (1), if present, must be an integer scalar
+ print *, reduce (i, add, dim = 2.0) ! { dg-error "must be an integer scalar" }
+
+! The DIM argument at (1), if present, must be an integer scalar
+ print *, reduce (i, add, dim = [2]) ! { dg-error "must be an integer scalar" }
+
+! The MASK argument at (1), if present, must be a logical array with the same rank as ARRAY
+ print *, reduce (n, add, mask = l1) ! { dg-error "same rank as ARRAY" }
+ print *, reduce (n, add, mask = n) ! { dg-error "must be a logical array" }
+
+! Different shape for arguments 'ARRAY' and 'MASK' for intrinsic REDUCE at (1) on
+! dimension 2 (2 and 3)
+ print *, reduce (n, add, mask = l2) ! { dg-error "Different shape" }
+
+! The IDENTITY argument at (1), if present, must be a scalar with the same type as ARRAY
+ print *, reduce (n, add, mask = l3, identity = 1.0) ! { dg-error "same type as ARRAY" }
+ print *, reduce (n, add, mask = l3, identity = [1]) ! { dg-error "must be a scalar" }
+
+! MASK present at (1) without IDENTITY
+ print *, reduce (n, add, mask = l3) ! { dg-warning "without IDENTITY" }
+
+contains
+ pure function add(i,j) result(sum_ij)
+ integer, intent(in) :: i, j
+ integer :: sum_ij
+ sum_ij = i + j
+ end function add
+ function iadd(i,j) result(sum_ij)
+ integer, intent(in) :: i, j
+ integer :: sum_ij
+ sum_ij = i + j
+ end function iadd
+ pure function vadd(i,j) result(sum_ij)
+ integer, intent(in) :: i, j
+ integer :: sum_ij(6)
+ sum_ij = i + j
+ end function vadd
+ pure function add_1a(i) result(sum_ij)
+ integer, intent(in) :: i
+ integer :: sum_ij
+ sum_ij = 0
+ end function add_1a
+ pure function add_3a(i) result(sum_ij)
+ integer, intent(in) :: i
+ integer :: sum_ij
+ sum_ij = 0
+ end function add_3a
+ pure function add_r(i, j) result(sum_ij)
+ integer, intent(in) :: i, j
+ real :: sum_ij
+ sum_ij = 0.0
+ end function add_r
+ pure function add_a(i, j) result(sum_ij)
+ integer, intent(in) :: i, j
+ integer, allocatable :: sum_ij
+ sum_ij = 0
+ end function add_a
+ pure function add_array(i, j) result(sum_ij)
+ integer, intent(in), dimension(:) :: i, j
+ integer :: sum_ij
+ sum_ij = 0
+ end function add_array
+ pure function add_optional(i, j) result(sum_ij)
+ integer, intent(in), optional :: i, j
+ integer :: sum_ij
+ sum_ij = 0
+ end function add_optional
+ pure function add_one_value(i, j) result(sum_ij)
+ integer, intent(in), value :: i
+ integer, intent(in) :: j
+ integer :: sum_ij
+ sum_ij = 0
+ end function add_one_value
+ pure function char_one(i, j) result(sum_ij)
+ character(8), intent(in) :: i, j
+ character(8) :: sum_ij
+ end function char_one
+ pure function char_two(i, j) result(sum_ij)
+ character(4), intent(in) :: i, j
+ character(8) :: sum_ij
+ end function char_two
+ pure function char_three(i, j) result(sum_ij)
+ character(8), intent(in) :: i
+ character(4), intent(in) :: j
+ character(4) :: sum_ij
+ end function char_three
+ subroutine foo
+ end subroutine foo
+end
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 2a3bdd2..e875e35 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -11018,9 +11018,9 @@ proc check_effective_target_apxf { } {
} "-mapxf" ]
}
-# Return 1 if avx10.2-256 instructions can be compiled.
-proc check_effective_target_avx10_2_256 { } {
- return [check_no_compiler_messages avx10.2-256 object {
+# Return 1 if avx10.2 instructions can be compiled.
+proc check_effective_target_avx10_2 { } {
+ return [check_no_compiler_messages avx10.2 object {
void
foo ()
{
@@ -11029,16 +11029,6 @@ proc check_effective_target_avx10_2_256 { } {
__asm__ volatile ("vaddbf16\t%ymm4, %ymm5, %ymm6");
__asm__ volatile ("vcvtph2ibs\t%ymm5, %ymm6");
__asm__ volatile ("vminmaxpd\t$123, %ymm4, %ymm5, %ymm6");
- }
- } "" ]
-}
-
-# Return 1 if avx10.2-512 instructions can be compiled.
-proc check_effective_target_avx10_2_512 { } {
- return [check_no_compiler_messages avx10.2-512 object {
- void
- foo ()
- {
__asm__ volatile ("vdpphps\t%zmm4, %zmm5, %zmm6");
__asm__ volatile ("vcvthf82ph\t%ymm5, %zmm6");
__asm__ volatile ("vaddbf16\t%zmm4, %zmm5, %zmm6");
diff --git a/gcc/testsuite/rust/compile/additional-trait-bounds1.rs b/gcc/testsuite/rust/compile/additional-trait-bounds1.rs
new file mode 100644
index 0000000..449a72f
--- /dev/null
+++ b/gcc/testsuite/rust/compile/additional-trait-bounds1.rs
@@ -0,0 +1,10 @@
+#![feature(optin_builtin_traits)]
+
+pub unsafe auto trait Send {}
+#[lang = "sync"]
+pub unsafe auto trait Sync {}
+
+trait A {}
+
+impl dyn A + Send {}
+impl dyn A + Send + Sync {}
diff --git a/gcc/testsuite/rust/compile/additional-trait-bounds2.rs b/gcc/testsuite/rust/compile/additional-trait-bounds2.rs
new file mode 100644
index 0000000..843228a
--- /dev/null
+++ b/gcc/testsuite/rust/compile/additional-trait-bounds2.rs
@@ -0,0 +1,9 @@
+#![feature(optin_builtin_traits)]
+
+pub unsafe auto trait Send {}
+#[lang = "sync"]
+pub unsafe auto trait Sync {}
+
+trait A {}
+
+impl dyn A + Send + Sync + NonExist {} // { dg-error "failed to resolve TypePath: NonExist in this scope" }
diff --git a/gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs b/gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs
new file mode 100644
index 0000000..6764f6e
--- /dev/null
+++ b/gcc/testsuite/rust/compile/additional-trait-bounds2nr2.rs
@@ -0,0 +1,11 @@
+// { dg-additional-options "-frust-name-resolution-2.0" }
+
+#![feature(optin_builtin_traits)]
+
+pub unsafe auto trait Send {}
+#[lang = "sync"]
+pub unsafe auto trait Sync {}
+
+trait A {}
+
+impl dyn A + Send + Sync + NonExist {} // { dg-error "could not resolve type path .NonExist." }
diff --git a/gcc/testsuite/rust/compile/auto_traits1.rs b/gcc/testsuite/rust/compile/auto_traits1.rs
new file mode 100644
index 0000000..192052d
--- /dev/null
+++ b/gcc/testsuite/rust/compile/auto_traits1.rs
@@ -0,0 +1,27 @@
+// { dg-additional-options "-frust-compile-until=typecheck" }
+
+#![feature(optin_builtin_traits)]
+
+pub unsafe auto trait Send {}
+#[lang = "sync"]
+pub unsafe auto trait Sync {}
+
+trait A {
+ fn a_method(&self) {}
+}
+
+fn foo(a: &(dyn A + Send + Sync)) {
+ a.a_method();
+}
+
+struct S;
+
+impl A for S {
+ fn a_method(&self) {}
+}
+
+fn main() {
+ let s = S;
+
+ foo(&s);
+}
diff --git a/gcc/testsuite/rust/compile/auto_traits2.rs b/gcc/testsuite/rust/compile/auto_traits2.rs
new file mode 100644
index 0000000..7d0dcc1
--- /dev/null
+++ b/gcc/testsuite/rust/compile/auto_traits2.rs
@@ -0,0 +1,26 @@
+#![feature(optin_builtin_traits)]
+
+pub unsafe auto trait Send {}
+#[lang = "sync"]
+pub unsafe auto trait Sync {}
+
+trait A {
+ fn a_method(&self) {}
+}
+
+fn foo(a: &(dyn A + Send + Sync)) {
+ a.a_method();
+}
+
+struct S;
+
+impl A for S {
+ fn a_method(&self) {}
+}
+
+fn main() {
+ let s = S;
+
+ foo(&s); // { dg-error "bounds not satisfied" }
+ // { dg-error "mismatched type" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/rust/compile/auto_traits3.rs b/gcc/testsuite/rust/compile/auto_traits3.rs
new file mode 100644
index 0000000..81c39ec
--- /dev/null
+++ b/gcc/testsuite/rust/compile/auto_traits3.rs
@@ -0,0 +1,34 @@
+#![feature(optin_builtin_traits)]
+
+pub unsafe auto trait Send {}
+#[lang = "sync"]
+pub unsafe auto trait Sync {}
+
+trait A {
+ fn a_method(&self) {}
+}
+
+fn foo(a: &(dyn A + Send + Sync)) {
+ a.a_method();
+}
+
+struct S;
+
+impl A for S {
+ fn a_method(&self) {} // { dg-warning "unused" }
+}
+
+// These should not be necessary because they are both auto traits
+// They need to be removed once we figure out the proper implementation for each of them
+// However, it'd be silly to implement other traits in order to ensure the test is okay,
+// as these extra trait bounds are only allowed to use auto traits
+// FIXME: #3327
+// FIXME: #3326
+unsafe impl Send for S {}
+unsafe impl Sync for S {}
+
+fn main() {
+ let s = S;
+
+ foo(&s);
+}
diff --git a/gcc/testsuite/rust/compile/cast_float_as_integer.rs b/gcc/testsuite/rust/compile/cast_float_as_integer.rs
new file mode 100644
index 0000000..e6b86db
--- /dev/null
+++ b/gcc/testsuite/rust/compile/cast_float_as_integer.rs
@@ -0,0 +1,10 @@
+// { dg-options "-w" }
+fn main(){
+ let foo:f64 = 13.37;
+ let _ = foo as i64;
+ let _ = foo as u64;
+ let _ = foo as isize;
+ let _ = foo as usize;
+ let _ = foo as i8;
+ let _ = foo as u8;
+}
diff --git a/gcc/testsuite/rust/compile/cmp1.rs b/gcc/testsuite/rust/compile/cmp1.rs
new file mode 100644
index 0000000..4da5b1c
--- /dev/null
+++ b/gcc/testsuite/rust/compile/cmp1.rs
@@ -0,0 +1,78 @@
+// { dg-options "-w" }
+// taken from https://github.com/rust-lang/rust/blob/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/cmp.rs#L98
+
+#[lang = "sized"]
+pub trait Sized {}
+
+#[lang = "eq"]
+#[stable(feature = "rust1", since = "1.0.0")]
+#[doc(alias = "==")]
+#[doc(alias = "!=")]
+pub trait PartialEq<Rhs: ?Sized = Self> {
+ /// This method tests for `self` and `other` values to be equal, and is used
+ /// by `==`.
+ #[must_use]
+ #[stable(feature = "rust1", since = "1.0.0")]
+ fn eq(&self, other: &Rhs) -> bool;
+
+ /// This method tests for `!=`.
+ #[inline]
+ #[must_use]
+ #[stable(feature = "rust1", since = "1.0.0")]
+ fn ne(&self, other: &Rhs) -> bool {
+ !self.eq(other)
+ }
+}
+
+enum BookFormat {
+ Paperback,
+ Hardback,
+ Ebook,
+}
+
+impl PartialEq<BookFormat> for BookFormat {
+ fn eq(&self, other: &BookFormat) -> bool {
+ self == other
+ }
+}
+
+pub struct Book {
+ isbn: i32,
+ format: BookFormat,
+}
+
+// Implement <Book> == <BookFormat> comparisons
+impl PartialEq<BookFormat> for Book {
+ fn eq(&self, other: &BookFormat) -> bool {
+ self.format == *other
+ }
+}
+
+// Implement <BookFormat> == <Book> comparisons
+impl PartialEq<Book> for BookFormat {
+ fn eq(&self, other: &Book) -> bool {
+ *self == other.format
+ }
+}
+
+// Implement <Book> == <Book> comparisons
+impl PartialEq<Book> for Book {
+ fn eq(&self, other: &Book) -> bool {
+ self.isbn == other.isbn
+ }
+}
+
+pub fn main() {
+ let b1 = Book {
+ isbn: 1,
+ format: BookFormat::Paperback,
+ };
+ let b2 = Book {
+ isbn: 2,
+ format: BookFormat::Paperback,
+ };
+
+ let _c1: bool = b1 == BookFormat::Paperback;
+ let _c2: bool = BookFormat::Paperback == b2;
+ let _c3: bool = b1 != b2;
+}
diff --git a/gcc/testsuite/rust/compile/derive_clone_enum1.rs b/gcc/testsuite/rust/compile/derive_clone_enum1.rs
new file mode 100644
index 0000000..947dc5c6
--- /dev/null
+++ b/gcc/testsuite/rust/compile/derive_clone_enum1.rs
@@ -0,0 +1,16 @@
+#[lang = "clone"]
+trait Clone {
+ pub fn clone(&self) -> Self;
+}
+
+impl Clone for i32 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+
+#[derive(Clone)]
+enum AllIdentifiers {
+ A,
+ B
+}
diff --git a/gcc/testsuite/rust/compile/derive_clone_enum2.rs b/gcc/testsuite/rust/compile/derive_clone_enum2.rs
new file mode 100644
index 0000000..c7a4ad5
--- /dev/null
+++ b/gcc/testsuite/rust/compile/derive_clone_enum2.rs
@@ -0,0 +1,16 @@
+#[lang = "clone"]
+trait Clone {
+ pub fn clone(&self) -> Self;
+}
+
+impl Clone for i32 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+
+#[derive(Clone)]
+enum TupleEnum {
+ A(i32),
+ B(i32, i32, i32)
+}
diff --git a/gcc/testsuite/rust/compile/derive_clone_enum3.rs b/gcc/testsuite/rust/compile/derive_clone_enum3.rs
new file mode 100644
index 0000000..92fd6ee
--- /dev/null
+++ b/gcc/testsuite/rust/compile/derive_clone_enum3.rs
@@ -0,0 +1,16 @@
+#[lang = "clone"]
+trait Clone {
+ pub fn clone(&self) -> Self;
+}
+
+impl Clone for i32 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+
+#[derive(Clone)]
+enum StructEnum {
+ A { i0: i32 },
+ B { i0: i32, i1: i32, i2: i32 }
+}
diff --git a/gcc/testsuite/rust/compile/derive_macro1.rs b/gcc/testsuite/rust/compile/derive_macro1.rs
index 779aad78e..bc10d60 100644
--- a/gcc/testsuite/rust/compile/derive_macro1.rs
+++ b/gcc/testsuite/rust/compile/derive_macro1.rs
@@ -1,6 +1,7 @@
#[lang = "sized"]
pub trait Sized {}
+#[lang = "clone"]
pub trait Clone {
fn clone(&self) -> Self;
}
diff --git a/gcc/testsuite/rust/compile/derive_macro3.rs b/gcc/testsuite/rust/compile/derive_macro3.rs
index 1c7d473..ad40cae 100644
--- a/gcc/testsuite/rust/compile/derive_macro3.rs
+++ b/gcc/testsuite/rust/compile/derive_macro3.rs
@@ -1,6 +1,7 @@
#[lang = "sized"]
pub trait Sized {}
+#[lang = "clone"]
pub trait Clone {
fn clone(&self) -> Self;
}
diff --git a/gcc/testsuite/rust/compile/derive_macro4.rs b/gcc/testsuite/rust/compile/derive_macro4.rs
index 7802e8f..8bf1bca 100644
--- a/gcc/testsuite/rust/compile/derive_macro4.rs
+++ b/gcc/testsuite/rust/compile/derive_macro4.rs
@@ -1,17 +1,17 @@
#[lang = "sized"]
pub trait Sized {}
+#[lang = "copy"]
pub trait Copy {}
+
+#[lang = "clone"]
pub trait Clone {
fn clone(&self) -> Self;
}
+#[lang = "phantom_data"]
struct PhantomData<T>;
-pub struct AssertParamIsCopy<T: Copy> {
- _field: PhantomData<T>,
-}
-
#[derive(Clone)] // { dg-error "bounds not satisfied for U .Copy. is not satisfied" }
union U {
i: i32,
diff --git a/gcc/testsuite/rust/compile/derive_macro6.rs b/gcc/testsuite/rust/compile/derive_macro6.rs
index b7bf7a7..35327c0 100644
--- a/gcc/testsuite/rust/compile/derive_macro6.rs
+++ b/gcc/testsuite/rust/compile/derive_macro6.rs
@@ -2,6 +2,9 @@
pub trait Sized {}
pub trait Copy {}
+
+
+#[lang = "clone"]
pub trait Clone {
fn clone(&self) -> Self;
}
@@ -9,10 +12,6 @@ pub trait Clone {
#[lang = "phantom_data"]
pub struct PhantomData<T>;
-pub struct AssertParamIsCopy<T: Copy> {
- pub _field: PhantomData<T>,
-}
-
impl Copy for i32 {}
impl Copy for i64 {}
impl Copy for U {}
diff --git a/gcc/testsuite/rust/compile/exhaustiveness1.rs b/gcc/testsuite/rust/compile/exhaustiveness1.rs
index fe95ea3..356636b 100644
--- a/gcc/testsuite/rust/compile/exhaustiveness1.rs
+++ b/gcc/testsuite/rust/compile/exhaustiveness1.rs
@@ -15,9 +15,7 @@ fn s2(s: S) {
}
fn s3(s: S) {
- match s {
- // { dg-error "non-exhaustive patterns: '_' not covered" "" { target *-*-* } .-1 }
- }
+ match s {}
}
enum E {
diff --git a/gcc/testsuite/rust/compile/if_let_expr.rs b/gcc/testsuite/rust/compile/if_let_expr.rs
index 7bab19a..b0879e5 100644
--- a/gcc/testsuite/rust/compile/if_let_expr.rs
+++ b/gcc/testsuite/rust/compile/if_let_expr.rs
@@ -7,8 +7,9 @@ pub enum Option<T> {
}
fn main() {
- let x = Option::Some(3); // { dg-warning "unused name" }
- let a = if let Option::Some(1) = x {
+ let x = Option::Some(3);
+
+ let a = if let Option::Some(1) = x {// { dg-warning "unused name" }
1
} else if x == Option::Some(2) {
2
diff --git a/gcc/testsuite/rust/compile/if_let_expr_simple.rs b/gcc/testsuite/rust/compile/if_let_expr_simple.rs
new file mode 100644
index 0000000..d7fb0af
--- /dev/null
+++ b/gcc/testsuite/rust/compile/if_let_expr_simple.rs
@@ -0,0 +1,12 @@
+enum MyOption {
+ Some(i32),
+ None,
+}
+
+pub fn toto(i : MyOption) -> i32 {
+ if let MyOption::Some(v) = i {
+ v
+ } else {
+ 23i32
+ }
+}
diff --git a/gcc/testsuite/rust/compile/iflet.rs b/gcc/testsuite/rust/compile/iflet.rs
new file mode 100644
index 0000000..6d46339
--- /dev/null
+++ b/gcc/testsuite/rust/compile/iflet.rs
@@ -0,0 +1,32 @@
+pub fn simple_iflet() -> i32 {
+ let mut res = 0;
+
+ enum E {
+ X(i32),
+ }
+ let v = E::X(4);
+
+ if let E::X(n) = v {
+ res = 1;
+ }
+
+ res
+}
+
+pub fn simple_iflet_else() -> i32 {
+ let mut res = 0;
+
+ enum E {
+ X(i32),
+ Y,
+ }
+ let v = E::X(4);
+
+ if let E::Y = v {
+ res = 1;
+ } else {
+ res = 2;
+ }
+
+ res
+}
diff --git a/gcc/testsuite/rust/compile/issue-1446.rs b/gcc/testsuite/rust/compile/issue-1446.rs
index 8bfa42b..969ad38 100644
--- a/gcc/testsuite/rust/compile/issue-1446.rs
+++ b/gcc/testsuite/rust/compile/issue-1446.rs
@@ -1,3 +1,11 @@
+// fake function
+pub fn swap_bytes(this: u32) -> u32 {
+ (((this) & 0xff000000) >> 24)
+ | (((this) & 0x00ff0000) >> 8)
+ | (((this) & 0x0000ff00) << 8)
+ | (((this) & 0x000000ff) << 24)
+}
+
pub fn to_le(this: u32) -> u32 {
#[cfg(target_endian = "little")]
{
@@ -5,6 +13,6 @@ pub fn to_le(this: u32) -> u32 {
}
#[cfg(not(target_endian = "little"))]
{
- this.swap_bytes()
+ swap_bytes(this)
}
}
diff --git a/gcc/testsuite/rust/compile/issue-1525.rs b/gcc/testsuite/rust/compile/issue-1525.rs
new file mode 100644
index 0000000..b2247cd
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-1525.rs
@@ -0,0 +1,4 @@
+fn main() {
+ const slice: &[i32] = &[1, 2, 3];
+ let _slice2: &[i32] = slice;
+}
diff --git a/gcc/testsuite/rust/compile/issue-1773.rs b/gcc/testsuite/rust/compile/issue-1773.rs
index 468497a..41c82f0 100644
--- a/gcc/testsuite/rust/compile/issue-1773.rs
+++ b/gcc/testsuite/rust/compile/issue-1773.rs
@@ -1,8 +1,4 @@
-#[lang = "sized"]
-// { dg-skip-if "" { *-*-* } }
-pub trait Sized {}
-
-trait Foo<T> {
+trait Foo {
type A;
fn test(a: Self::A) -> Self::A {
@@ -10,9 +6,14 @@ trait Foo<T> {
}
}
-struct Bar<T>(T);
-impl<T> Foo<T> for Bar<i32> {
- type A = T;
+struct Bar(i32);
+impl Foo for Bar {
+ type A = i32;
+}
+
+struct Baz(f32);
+impl Foo for Baz {
+ type A = f32;
}
fn main() {
@@ -21,4 +22,10 @@ fn main() {
let b;
b = Bar::test(a.0);
+
+ let c;
+ c = Baz(123f32);
+
+ let d;
+ d = Baz::test(c.0);
}
diff --git a/gcc/testsuite/rust/compile/issue-2323.rs b/gcc/testsuite/rust/compile/issue-2323.rs
new file mode 100644
index 0000000..02a3f90
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2323.rs
@@ -0,0 +1,9 @@
+#[lang = "sized"]
+trait Sized {}
+
+pub struct S<T>(T);
+
+pub fn foo<T>(x: T) {
+ let y = S(x);
+ y.0;
+}
diff --git a/gcc/testsuite/rust/compile/issue-2394.rs b/gcc/testsuite/rust/compile/issue-2394.rs
new file mode 100644
index 0000000..92f7afc
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2394.rs
@@ -0,0 +1,14 @@
+const A: i32 = (1 / 0);
+// { dg-error "division by zero" "" { target *-*-* } .-1 }
+
+fn main() {
+ let a = 1 / 0;
+ // { dg-error "division by zero" "" { target *-*-* } .-1 }
+
+ let b = 3;
+ let c = b / 0;
+ // { dg-error "division by zero" "" { target *-*-* } .-1 }
+
+ let a = 1 << 500;
+ // { dg-error "left shift count >= width of type" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/rust/compile/issue-2423.rs b/gcc/testsuite/rust/compile/issue-2423.rs
new file mode 100644
index 0000000..ae7897c
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2423.rs
@@ -0,0 +1,14 @@
+impl NonExistant {
+ // { dg-error "failed to resolve" "" { target *-*-* } .-1 }
+ fn test() {}
+}
+
+impl NotFound for NonExistant {
+ // { dg-error "failed to resolve" "" { target *-*-* } .-1 }
+ fn test() {}
+}
+
+trait A {}
+
+impl A for NotFound {}
+// { dg-error "failed to resolve" "" { target *-*-* } .-1 }
diff --git a/gcc/testsuite/rust/compile/issue-2567-1.rs b/gcc/testsuite/rust/compile/issue-2567-1.rs
new file mode 100644
index 0000000..f5af249
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2567-1.rs
@@ -0,0 +1,8 @@
+// { dg-options "-w" }
+enum Empty {}
+
+fn foo(x: Empty) {
+ let x: Empty = match x {
+ // empty
+ };
+}
diff --git a/gcc/testsuite/rust/compile/issue-2567-2.rs b/gcc/testsuite/rust/compile/issue-2567-2.rs
new file mode 100644
index 0000000..719511d
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2567-2.rs
@@ -0,0 +1,8 @@
+// { dg-options "-w" }
+enum Empty {}
+
+fn foo(x: Empty) {
+ let x: i32 = match x {
+ // empty
+ };
+}
diff --git a/gcc/testsuite/rust/compile/issue-2567-3.rs b/gcc/testsuite/rust/compile/issue-2567-3.rs
new file mode 100644
index 0000000..09efaf0
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2567-3.rs
@@ -0,0 +1,8 @@
+// { dg-options "-w" }
+enum Empty {}
+
+fn foo(x: Empty) {
+ match x {
+ // empty
+ }
+}
diff --git a/gcc/testsuite/rust/compile/issue-266.rs b/gcc/testsuite/rust/compile/issue-266.rs
new file mode 100644
index 0000000..11196cb
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-266.rs
@@ -0,0 +1,3 @@
+fn main() {
+ 'label: while break 'label {}
+}
diff --git a/gcc/testsuite/rust/compile/issue-2847.rs b/gcc/testsuite/rust/compile/issue-2847.rs
new file mode 100644
index 0000000..2bc5566
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2847.rs
@@ -0,0 +1,8 @@
+pub fn myfun1((x, _): (i32, i32)) -> i32 {
+ x
+}
+
+pub fn myfun2() -> i32 {
+ let (x, _) = (1, 2);
+ x
+}
diff --git a/gcc/testsuite/rust/compile/issue-2905-1.rs b/gcc/testsuite/rust/compile/issue-2905-1.rs
new file mode 100644
index 0000000..9b0c19d
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2905-1.rs
@@ -0,0 +1,27 @@
+#![feature(lang_items)]
+
+#[lang = "sized"]
+trait Sized {}
+
+pub struct A<T>(T);
+
+pub trait B {
+ type C;
+}
+
+// ------
+// swap these two items
+
+impl B for i32 {
+ type C = Weird<i32>;
+}
+
+pub struct Weird<T>(A<(T,)>);
+
+// ------
+
+trait Foo {}
+
+impl Foo for Weird<i32> {}
+
+fn main() {}
diff --git a/gcc/testsuite/rust/compile/issue-2905-2.rs b/gcc/testsuite/rust/compile/issue-2905-2.rs
new file mode 100644
index 0000000..83c54ed
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2905-2.rs
@@ -0,0 +1,136 @@
+// { dg-options "-w" }
+#![feature(intrinsics)]
+#![feature(lang_items)]
+
+#[lang = "sized"]
+trait Sized {}
+
+extern "rust-intrinsic" {
+ fn transmute<T, U>(_: T) -> U;
+ fn offset<T>(src: *const T, offset: isize) -> *const T;
+}
+
+pub mod core {
+ pub mod marker {
+ #[lang = "phantom_data"]
+ pub struct PhantomData<T>;
+ }
+
+ pub mod slice {
+ use core::marker::PhantomData;
+ use core::option::Option;
+
+ impl<T> core::iter::IntoIterator for &[T] {
+ type Item = &T;
+ type IntoIter = Weird<T>;
+
+ fn into_iter(self) -> Weird<T> {
+ self.iter()
+ }
+ }
+
+ pub struct Weird<T> {
+ ptr: *const T, // should be NonNull<T> but here it does not matter
+ end: *const T,
+ _marker: PhantomData<&T>,
+ }
+
+ impl<T> Weird<T> {
+ pub(super) fn new(slice: &[T]) -> Self {
+ let ptr = slice.as_ptr();
+ // SAFETY: Similar to `IterMut::new`.
+ unsafe {
+ // should be: ptr.add(slice.len())
+ let end = transmute::<*const T, usize>(ptr) + slice.len(); // TODO(Arthur): Missing `* size_of::<T>()`?
+ let end = transmute::<usize, *const T>(end);
+
+ Self {
+ ptr,
+ end,
+ _marker: PhantomData,
+ }
+ }
+ }
+
+ fn is_empty(&self) -> bool {
+ self.ptr == self.end
+ }
+
+ fn next_unchecked(&mut self) -> *const T {
+ let old = self.ptr;
+
+ self.ptr = unsafe { offset(self.ptr, 1) };
+
+ old
+ }
+ }
+
+ trait Foo {}
+
+ impl<T> Foo for Weird<T> {}
+
+ // impl<T> core::iter::Iterator for Iter<T> {
+ // type Item = &T;
+
+ // fn next(&mut self) -> Option<&T> {
+ // if self.is_empty() {
+ // Option::None
+ // } else {
+ // Option::Some(&*self.next_unchecked())
+ // }
+ // }
+ // }
+
+ union Repr<T> {
+ pub(crate) rust: *const [T],
+ rust_mut: *mut [T],
+ pub(crate) raw: FatPtr<T>,
+ }
+
+ struct FatPtr<T> {
+ data: *const T,
+ pub(crate) len: usize,
+ }
+
+ impl<T> [T] {
+ pub fn iter(&self) -> Weird<T> {
+ Weird::new(self)
+ }
+
+ pub fn as_ptr(&self) -> *const T {
+ self as *const [T] as *const T
+ }
+
+ pub fn len(&self) -> usize {
+ unsafe { Repr { rust: self }.raw.len }
+ }
+ }
+ }
+
+ pub mod iter {
+ use option::Option;
+
+ pub trait IntoIterator {
+ type Item;
+
+ type IntoIter: Iterator<Item = Self::Item>;
+
+ fn into_iter(self) -> Self::IntoIter;
+ }
+
+ pub trait Iterator {
+ type Item;
+
+ fn next(&mut self) -> Option<Self::Item>;
+ }
+ }
+
+ pub mod option {
+ pub enum Option<T> {
+ Some(T),
+ None,
+ }
+ }
+}
+
+fn main() {}
diff --git a/gcc/testsuite/rust/compile/issue-2907.rs b/gcc/testsuite/rust/compile/issue-2907.rs
new file mode 100644
index 0000000..1af843f
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2907.rs
@@ -0,0 +1,33 @@
+#![feature(lang_items)]
+
+#[lang = "sized"]
+pub trait Sized {}
+
+pub trait Bar {}
+
+pub trait Foo {
+ type Ty;
+
+ fn foo(self) -> Self::Ty;
+}
+
+impl<B: Bar> Foo for B {
+ type Ty = u32;
+
+ fn foo(self) -> Self::Ty {
+ // { dg-warning "unused name" "" { target *-*-* } .-1 }
+ 14
+ }
+}
+
+struct Qux;
+
+impl Bar for Qux {}
+
+fn main() {
+ let a = Qux;
+ a.foo();
+
+ let b = Qux;
+ Foo::foo(b);
+}
diff --git a/gcc/testsuite/rust/compile/issue-2953-1.rs b/gcc/testsuite/rust/compile/issue-2953-1.rs
new file mode 100644
index 0000000..d07059e
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2953-1.rs
@@ -0,0 +1,27 @@
+#[lang = "sized"]
+pub trait Sized {
+ // Empty.
+}
+
+#[lang = "fn_once"]
+pub trait FnOnce<Args> {
+ /// The returned type after the call operator is used.
+ #[lang = "fn_once_output"]
+ type Output;
+
+ /// Performs the call operation.
+ extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+}
+
+pub enum Ordering {
+ /// An ordering where a compared value is less than another.
+ Less = -1,
+ /// An ordering where a compared value is equal to another.
+ Equal = 0,
+ /// An ordering where a compared value is greater than another.
+ Greater = 1,
+}
+
+pub fn f<F: FnOnce(i32) -> Ordering>(g: F) -> Ordering {
+ g(1)
+}
diff --git a/gcc/testsuite/rust/compile/issue-2953-2.rs b/gcc/testsuite/rust/compile/issue-2953-2.rs
new file mode 100644
index 0000000..5927624
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-2953-2.rs
@@ -0,0 +1,37 @@
+#[lang = "sized"]
+pub trait Sized {
+ // Empty.
+}
+
+#[lang = "fn_once"]
+pub trait FnOnce<Args> {
+ /// The returned type after the call operator is used.
+ #[lang = "fn_once_output"]
+ type Output;
+
+ /// Performs the call operation.
+ extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+}
+
+pub enum Ordering {
+ /// An ordering where a compared value is less than another.
+ Less = -1,
+ /// An ordering where a compared value is equal to another.
+ Equal = 0,
+ /// An ordering where a compared value is greater than another.
+ Greater = 1,
+}
+
+pub fn max_by<T, F: FnOnce(&T, &T) -> Ordering>(v1: T, v2: T, compare: F) -> T {
+ match compare(&v1, &v2) {
+ Ordering::Less | Ordering::Equal => v2,
+ Ordering::Greater => v1,
+ }
+}
+
+pub fn min_by<T, F: FnOnce(&T, &T) -> Ordering>(v1: T, v2: T, compare: F) -> T {
+ match compare(&v1, &v2) {
+ Ordering::Less | Ordering::Equal => v1,
+ Ordering::Greater => v2,
+ }
+}
diff --git a/gcc/testsuite/rust/compile/issue-3009.rs b/gcc/testsuite/rust/compile/issue-3009.rs
new file mode 100644
index 0000000..2eb4ef3
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3009.rs
@@ -0,0 +1,24 @@
+#[lang = "sized"]
+trait Sized {}
+
+struct Foo {
+ // { dg-warning "struct is never constructed" "" { target *-*-* } .-1 }
+ t: u64,
+}
+
+impl Foo {
+ fn of<T>() -> Foo {
+ // { dg-warning "associated function is never used" "" { target *-*-* } .-1 }
+ Foo { t: 14 }
+ }
+}
+
+trait Bar {
+ fn bar() -> Foo;
+}
+
+impl<T> Bar for T {
+ fn bar() -> Foo {
+ Foo::of::<T>()
+ }
+}
diff --git a/gcc/testsuite/rust/compile/issue-3032-1.rs b/gcc/testsuite/rust/compile/issue-3032-1.rs
new file mode 100644
index 0000000..e9eb027
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3032-1.rs
@@ -0,0 +1,58 @@
+#![feature(negative_impls)]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[lang = "deref"]
+pub trait Deref {
+ /// The resulting type after dereferencing.
+ #[stable(feature = "rust1", since = "1.0.0")]
+ // #[rustc_diagnostic_item = "deref_target"]
+ type Target: ?Sized;
+
+ /// Dereferences the value.
+ #[must_use]
+ #[stable(feature = "rust1", since = "1.0.0")]
+ // #[rustc_diagnostic_item = "deref_method"]
+ fn deref(&self) -> &Self::Target;
+}
+
+impl<T: ?Sized> Deref for &T {
+ type Target = T;
+
+ fn deref(&self) -> &T {
+ *self
+ }
+}
+
+// this is added because of #3030
+extern "C" {
+ fn never() -> !;
+}
+
+impl<T: ?Sized> !DerefMut for &T {
+ fn deref_mut(&mut self) -> &mut T {
+ unsafe { never() }
+ }
+}
+
+impl<T: ?Sized> Deref for &mut T {
+ type Target = T;
+
+ fn deref(&self) -> &T {
+ *self
+ }
+}
+
+#[lang = "deref_mut"]
+pub trait DerefMut: Deref {
+ /// Mutably dereferences the value.
+ #[stable(feature = "rust1", since = "1.0.0")]
+ fn deref_mut(&mut self) -> &mut Self::Target;
+}
+
+impl<T: ?Sized> DerefMut for &mut T {
+ fn deref_mut(&mut self) -> &mut T {
+ *self
+ }
+}
diff --git a/gcc/testsuite/rust/compile/issue-3032-2.rs b/gcc/testsuite/rust/compile/issue-3032-2.rs
new file mode 100644
index 0000000..9e09d41
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3032-2.rs
@@ -0,0 +1,49 @@
+#![feature(negative_impls)]
+
+#[lang = "sized"]
+trait Sized {}
+
+#[lang = "deref"]
+pub trait Deref {
+ /// The resulting type after dereferencing.
+ #[stable(feature = "rust1", since = "1.0.0")]
+ // #[rustc_diagnostic_item = "deref_target"]
+ type Target: ?Sized;
+
+ /// Dereferences the value.
+ #[must_use]
+ #[stable(feature = "rust1", since = "1.0.0")]
+ // #[rustc_diagnostic_item = "deref_method"]
+ fn deref(&self) -> &Self::Target;
+}
+
+impl<T: ?Sized> Deref for &T {
+ type Target = T;
+
+ fn deref(&self) -> &T {
+ *self
+ }
+}
+
+impl<T: ?Sized> !DerefMut for &T {}
+
+impl<T: ?Sized> Deref for &mut T {
+ type Target = T;
+
+ fn deref(&self) -> &T {
+ *self
+ }
+}
+
+#[lang = "deref_mut"]
+pub trait DerefMut: Deref {
+ /// Mutably dereferences the value.
+ #[stable(feature = "rust1", since = "1.0.0")]
+ fn deref_mut(&mut self) -> &mut Self::Target;
+}
+
+impl<T: ?Sized> DerefMut for &mut T {
+ fn deref_mut(&mut self) -> &mut T {
+ *self
+ }
+}
diff --git a/gcc/testsuite/rust/compile/issue-3033.rs b/gcc/testsuite/rust/compile/issue-3033.rs
new file mode 100644
index 0000000..9085b76
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3033.rs
@@ -0,0 +1,144 @@
+#![feature(negative_impls)]
+
+#[lang = "copy"]
+trait Copy {}
+
+mod copy_impls {
+ use super::Copy;
+
+ macro_rules! impl_copy {
+ ($($t:ty)*) => {
+ $(
+ impl Copy for $t {}
+ )*
+ }
+ }
+
+ impl_copy! {
+ usize u8 u16 u32 u64 // u128
+ isize i8 i16 i32 i64 // i128
+ f32 f64
+ bool char
+ }
+}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+#[repr(transparent)]
+#[repr(no_niche)] // rust-lang/rust#68303.
+pub struct UnsafeCell<T: ?Sized> {
+ value: T,
+ // { dg-warning "field is never read" "" { target *-*-* } .-1 }
+}
+
+impl<T: ?Sized> UnsafeCell<T> {
+ /// Gets a mutable pointer to the wrapped value.
+ ///
+ /// This can be cast to a pointer of any kind.
+ /// Ensure that the access is unique (no active references, mutable or not)
+ /// when casting to `&mut T`, and ensure that there are no mutations
+ /// or mutable aliases going on when casting to `&T`
+ ///
+ /// # Examples
+ ///
+ ///
+ /// use std::cell::UnsafeCell;
+ ///
+ /// let uc = UnsafeCell::new(5);
+ ///
+ /// let five = uc.get();
+ ///
+ #[inline]
+ #[stable(feature = "rust1", since = "1.0.0")]
+ // #[rustc_const_stable(feature = "const_unsafecell_get", since = "1.32.0")]
+ pub const fn get(&self) -> *mut T {
+ // We can just cast the pointer from `UnsafeCell<T>` to `T` because of
+ // #[repr(transparent)]. This exploits libstd's special status, there is
+ // no guarantee for user code that this will work in future versions of the compiler!
+ self as *const UnsafeCell<T> as *const T as *mut T
+ }
+}
+
+#[stable(feature = "rust1", since = "1.0.0")]
+#[repr(transparent)]
+pub struct Cell<T: ?Sized> {
+ value: UnsafeCell<T>,
+ // { dg-warning "field is never read" "" { target *-*-* } .-1 }
+}
+
+impl<T: Copy> Cell<T> {
+ /// Returns a copy of the contained value.
+ ///
+ /// # Examples
+ ///
+ ///
+ /// use std::cell::Cell;
+ ///
+ /// let c = Cell::new(5);
+ ///
+ /// let five = c.get();
+ ///
+ #[inline]
+ #[stable(feature = "rust1", since = "1.0.0")]
+ pub fn get(&self) -> T {
+ // SAFETY: This can cause data races if called from a separate thread,
+ // but `Cell` is `!Sync` so this won't happen.
+ unsafe { *self.value.get() }
+ }
+}
+
+#[lang = "sized"]
+trait Sized {}
+
+#[lang = "deref"]
+pub trait Deref {
+ /// The resulting type after dereferencing.
+ #[stable(feature = "rust1", since = "1.0.0")]
+ // #[rustc_diagnostic_item = "deref_target"]
+ type Target: ?Sized;
+
+ /// Dereferences the value.
+ #[must_use]
+ #[stable(feature = "rust1", since = "1.0.0")]
+ // #[rustc_diagnostic_item = "deref_method"]
+ fn deref(&self) -> &Self::Target;
+}
+
+impl<T: ?Sized> Deref for &T {
+ type Target = T;
+
+ fn deref(&self) -> &T {
+ *self
+ }
+}
+
+// this is added because of #3030
+extern "C" {
+ fn never() -> !;
+}
+
+impl<T: ?Sized> !DerefMut for &T {
+ fn deref_mut(&mut self) -> &mut T {
+ unsafe { never() }
+ }
+}
+
+impl<T: ?Sized> Deref for &mut T {
+ type Target = T;
+
+ fn deref(&self) -> &T {
+ *self
+ }
+}
+
+#[lang = "deref_mut"]
+pub trait DerefMut: Deref {
+ /// Mutably dereferences the value.
+ #[stable(feature = "rust1", since = "1.0.0")]
+ fn deref_mut(&mut self) -> &mut Self::Target;
+}
+
+#[inline]
+pub fn new<'b>(borrow: &'b Cell<i32>) {
+ let b = borrow.get();
+ // { dg-warning "unused name" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/rust/compile/issue-3046.rs b/gcc/testsuite/rust/compile/issue-3046.rs
index c982cc9..f0c72a3 100644
--- a/gcc/testsuite/rust/compile/issue-3046.rs
+++ b/gcc/testsuite/rust/compile/issue-3046.rs
@@ -12,12 +12,10 @@ fn test(v: LOption) -> Res {
return Res::BAD;
}
-
fn main() {
// Should be:
// test(LOption::Some(2));
- //
+ //
test(LOption(2));
// { dg-error "expected function, tuple struct or tuple variant, found enum" "" { target *-*-* } .-1 }
- // { dg-error "failed to resolve type for argument expr in CallExpr" "" { target *-*-* } .-2 }
}
diff --git a/gcc/testsuite/rust/compile/issue-3140.rs b/gcc/testsuite/rust/compile/issue-3140.rs
new file mode 100644
index 0000000..dcf86db
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3140.rs
@@ -0,0 +1,27 @@
+enum State {
+ Succeeded,
+ Failed,
+}
+
+fn print_on_failure(state: &State) {
+ let mut num = 0;
+ match *state {
+ // error: expected unit struct, unit variant or constant, found tuple
+ // variant `State::Failed`
+ State::Failed => {
+ num = 1;
+ }
+ State::Succeeded => {
+ num = 2;
+ }
+ _ => (),
+ }
+}
+
+fn main() {
+ let b = State::Failed(1);
+ // { dg-error "expected function, tuple struct or tuple variant, found struct .State." "" { target *-*-* } .-1 }
+
+ print_on_failure(&b);
+ // { dg-error "cannot find value .b. in this scope" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/rust/compile/issue-3231.rs b/gcc/testsuite/rust/compile/issue-3231.rs
new file mode 100644
index 0000000..59726cb
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3231.rs
@@ -0,0 +1,8 @@
+// { dg-options "-w" }
+pub enum X {}
+
+pub fn foo(x: X) {
+ let _a: i32 = match x {};
+}
+
+pub fn main() {}
diff --git a/gcc/testsuite/rust/compile/issue-3242.rs b/gcc/testsuite/rust/compile/issue-3242.rs
new file mode 100644
index 0000000..468497a
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3242.rs
@@ -0,0 +1,24 @@
+#[lang = "sized"]
+// { dg-skip-if "" { *-*-* } }
+pub trait Sized {}
+
+trait Foo<T> {
+ type A;
+
+ fn test(a: Self::A) -> Self::A {
+ a
+ }
+}
+
+struct Bar<T>(T);
+impl<T> Foo<T> for Bar<i32> {
+ type A = T;
+}
+
+fn main() {
+ let a;
+ a = Bar(123);
+
+ let b;
+ b = Bar::test(a.0);
+}
diff --git a/gcc/testsuite/rust/compile/issue-3261.rs b/gcc/testsuite/rust/compile/issue-3261.rs
new file mode 100644
index 0000000..37e974d
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3261.rs
@@ -0,0 +1,18 @@
+// { dg-options "-w" }
+fn main() {
+ let a: i8 = 50;
+ let b = a as f32;
+ let c = a as f64;
+
+ let a: i16 = 1337;
+ let b = a as f32;
+ let c = a as f64;
+
+ let a: i32 = 1337;
+ let b = a as f32;
+ let c = a as f64;
+
+ let a: i64 = 1337;
+ let b = a as f32;
+ let c = a as f64;
+}
diff --git a/gcc/testsuite/rust/compile/issue-3304.rs b/gcc/testsuite/rust/compile/issue-3304.rs
new file mode 100644
index 0000000..6ab614f
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3304.rs
@@ -0,0 +1,10 @@
+// { dg-additional-options "-frust-name-resolution-2.0" }
+#[lang = "sized"]
+trait Sized {}
+
+pub enum ROption<T> {
+ RSome(T),
+ RNone,
+}
+
+fn main() {}
diff --git a/gcc/testsuite/rust/compile/issue-3350.rs b/gcc/testsuite/rust/compile/issue-3350.rs
new file mode 100644
index 0000000..8880659
--- /dev/null
+++ b/gcc/testsuite/rust/compile/issue-3350.rs
@@ -0,0 +1,10 @@
+static FOO: i32 = 0;
+
+pub fn bar() -> i32 {
+ FOO
+}
+
+pub fn baz() -> i32 {
+ static QUX: i32 = 0;
+ QUX
+}
diff --git a/gcc/testsuite/rust/compile/iterators1.rs b/gcc/testsuite/rust/compile/iterators1.rs
index 35fea5a..1141758 100644
--- a/gcc/testsuite/rust/compile/iterators1.rs
+++ b/gcc/testsuite/rust/compile/iterators1.rs
@@ -232,24 +232,6 @@ macro_rules! impl_uint {
}
}
- pub fn to_le(self) -> Self {
- #[cfg(target_endian = "little")]
- {
- self
- }
- }
-
- pub const fn from_le_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
- Self::from_le(Self::from_ne_bytes(bytes))
- }
-
- pub const fn from_le(x: Self) -> Self {
- #[cfg(target_endian = "little")]
- {
- x
- }
- }
-
pub const fn from_ne_bytes(bytes: [u8; mem::size_of::<Self>()]) -> Self {
unsafe { mem::transmute(bytes) }
}
diff --git a/gcc/testsuite/rust/compile/macros/builtin/eager1.rs b/gcc/testsuite/rust/compile/macros/builtin/eager1.rs
index 65a80fd..7c6f6f9 100644
--- a/gcc/testsuite/rust/compile/macros/builtin/eager1.rs
+++ b/gcc/testsuite/rust/compile/macros/builtin/eager1.rs
@@ -15,7 +15,7 @@ macro_rules! b {
}
fn main() {
- // { dg-final { scan-tree-dump-times {"test1canary"} 1 gimple } }
+ // { dg-final { scan-assembler {"test1canary"} } }
let _ = concat!(a!(), 1, b!());
// should not error
concat!(a!(), true, b!(),);
diff --git a/gcc/testsuite/rust/compile/macros/builtin/recurse2.rs b/gcc/testsuite/rust/compile/macros/builtin/recurse2.rs
index 2e73ab5..73e6ab4 100644
--- a/gcc/testsuite/rust/compile/macros/builtin/recurse2.rs
+++ b/gcc/testsuite/rust/compile/macros/builtin/recurse2.rs
@@ -15,7 +15,29 @@ macro_rules! a {
};
}
+extern "C" {
+ fn printf(fmt: *const i8, ...);
+}
+
+fn print_ptr(s: &str) {
+ unsafe {
+ printf("%p\n\0" as *const str as *const i8, s as *const str);
+ }
+}
+
+fn print_str(s: &str) {
+ unsafe {
+ printf(
+ "%s\n\0" as *const str as *const i8,
+ s as *const str as *const i8,
+ );
+ }
+}
+
+// { dg-final { scan-assembler {"abheyho"} } }
+static S: &str = concat!("a", 'b', a!(), a!(b c d e f a!()), '\0');
+
fn main() {
- // { dg-final { scan-tree-dump-times {"abheyho"} 1 gimple } }
- let _ = concat!("a", 'b', a!(), a!(b c d e f a!()), '\0');
+ print_ptr(S);
+ print_str(S);
}
diff --git a/gcc/testsuite/rust/compile/multiline-string.rs b/gcc/testsuite/rust/compile/multiline-string.rs
new file mode 100644
index 0000000..fcd6fa8
--- /dev/null
+++ b/gcc/testsuite/rust/compile/multiline-string.rs
@@ -0,0 +1,14 @@
+fn main() {
+ let _a = "gcc
+
+ rs";
+
+ let _b = "rust
+
+ c
+ gcc
+
+
+
+ rs";
+}
diff --git a/gcc/testsuite/rust/compile/mutability_checks1.rs b/gcc/testsuite/rust/compile/mutability_checks1.rs
new file mode 100644
index 0000000..4affae0
--- /dev/null
+++ b/gcc/testsuite/rust/compile/mutability_checks1.rs
@@ -0,0 +1,15 @@
+pub fn test() {
+ let a;
+ a = 1;
+ a = 2 + 1;
+ // { dg-error "assignment of read-only variable" "" { target *-*-* } .-1 }
+
+ struct Foo(i32);
+ let a = Foo(1);
+ a.0 = 2;
+ // { dg-error "assignment of read-only variable" "" { target *-*-* } .-1 }
+
+ let a = [1, 2, 3, 4];
+ a[0] = 1 + 2;
+ // { dg-error "assignment of read-only variable" "" { target *-*-* } .-1 }
+}
diff --git a/gcc/testsuite/rust/compile/nr2/compile.exp b/gcc/testsuite/rust/compile/nr2/compile.exp
index 0afe36c..f2724f6 100644
--- a/gcc/testsuite/rust/compile/nr2/compile.exp
+++ b/gcc/testsuite/rust/compile/nr2/compile.exp
@@ -44,23 +44,23 @@ namespace eval rust-nr2-ns {
# Run tests in directories
# Manually specifying these, in case some other test file
# does something weird
- set test_dirs {. compile macros/builtin macros/mbe macros/proc}
+ set test_dirs {{} {macros builtin} {macros mbe} {macros proc}}
set tests_expect_ok ""
set tests_expect_err ""
foreach test_dir $test_dirs {
- foreach test [lsort [glob -nocomplain -tails -directory $srcdir/$subdir/../$test_dir *.rs]] {
- if {$test_dir == "."} {
- set test_lbl $test
- } else {
- set test_lbl "$test_dir/$test"
- }
+ set directory [list {*}[file split $srcdir] {*}[file split $subdir]]
+ set directory [lreplace $directory end end]
+ set directory [list {*}$directory {*}$test_dir]
+ foreach test [lsort [glob -nocomplain -tails -directory [file join {*}$directory] *.rs]] {
+ # use '/' as the path seperator for entries in the exclude file
+ set test_lbl [join [list {*}$test_dir $test] "/"]
set idx [lsearch -exact -sorted $exclude $test_lbl]
if {$idx == -1} {
- lappend tests_expect_ok $srcdir/$subdir/../$test_dir/$test
+ lappend tests_expect_ok [file join {*}$directory $test]
} else {
- lappend tests_expect_err $srcdir/$subdir/../$test_dir/$test
+ lappend tests_expect_err [file join {*}$directory $test]
set exclude [lreplace $exclude $idx $idx]
}
}
diff --git a/gcc/testsuite/rust/compile/nr2/exclude b/gcc/testsuite/rust/compile/nr2/exclude
index ecef6d2..60322f3 100644
--- a/gcc/testsuite/rust/compile/nr2/exclude
+++ b/gcc/testsuite/rust/compile/nr2/exclude
@@ -1,23 +1,6 @@
-# relies on exact source file path match
-# TODO: patch this file or nr2/compile.exp to handle this
-debug-diagnostics-on.rs
-
-# main list
-attr-mismatch-crate-name.rs
-attr_deprecated.rs
-attr_deprecated_2.rs
-auto_trait_super_trait.rs
-auto_trait_valid.rs
-auto_trait_invalid.rs
-bad=file-name.rs
bounds1.rs
break-rust2.rs
break-rust3.rs
-macros/builtin/eager1.rs
-macros/builtin/eager2.rs
-macros/builtin/recurse2.rs
-macros/builtin/include3.rs
-macros/builtin/include4.rs
canonical_paths1.rs
cfg1.rs
cfg3.rs
@@ -25,7 +8,6 @@ cfg4.rs
cfg5.rs
closure_no_type_anno.rs
complex-path1.rs
-complex_qualified_path_in_expr.rs
const-issue1440.rs
const_generics_3.rs
const_generics_4.rs
@@ -33,97 +15,50 @@ const_generics_5.rs
const_generics_7.rs
derive_empty.rs
derive_macro1.rs
-derive_macro3.rs
-derive_macro4.rs
-derive_macro6.rs
expected_type_args2.rs
-expected_type_args3.rs
feature_rust_attri0.rs
-feature_rust_attri1.rs
-for_lifetimes.rs
format_args_basic_expansion.rs
generic-default1.rs
generics1.rs
generics10.rs
generics11.rs
-generics2.rs
generics3.rs
generics4.rs
generics5.rs
generics6.rs
-generics7.rs
-generics8.rs
generics9.rs
if_let_expr.rs
-infer-crate-name.rs
-issue-1019.rs
-issue-1031.rs
-issue-1034.rs
-issue-1128.rs
-issue-1129-2.rs
issue-1130.rs
-issue-1165.rs
issue-1173.rs
-issue-1235.rs
-issue-1237.rs
issue-1272.rs
-issue-1289.rs
issue-1447.rs
issue-1483.rs
-issue-1589.rs
issue-1725-1.rs
issue-1725-2.rs
issue-1786.rs
-issue-1813.rs
issue-1893.rs
issue-1901.rs
-issue-1930.rs
issue-1981.rs
-issue-2019-1.rs
-issue-2019-2.rs
-issue-2019-3.rs
issue-2036.rs
-issue-2037.rs
issue-2043.rs
-issue-2070.rs
-issue-2105.rs
-issue-2106.rs
-issue-2135.rs
-issue-2136-1.rs
issue-2136-2.rs
-issue-2139.rs
issue-2142.rs
-issue-2165.rs
-issue-2166.rs
-issue-2190-1.rs
-issue-2190-2.rs
-issue-2195.rs
issue-2238.rs
-issue-2304.rs
issue-2330.rs
-issue-2375.rs
-issue-2478.rs
issue-2479.rs
-issue-2514.rs
issue-2723-1.rs
issue-2723-2.rs
-issue-2772-1.rs
issue-2772-2.rs
issue-2775.rs
-issue-2747.rs
issue-2782.rs
issue-2812.rs
issue-850.rs
issue-852.rs
issue-855.rs
-issue-925.rs
iterators1.rs
lookup_err1.rs
-macros/mbe/macro-issue1233.rs
-macros/mbe/macro-issue1400.rs
macros/mbe/macro13.rs
macros/mbe/macro15.rs
-macros/mbe/macro20.rs
macros/mbe/macro23.rs
macros/mbe/macro40.rs
macros/mbe/macro43.rs
@@ -142,16 +77,13 @@ match4.rs
match5.rs
match9.rs
method2.rs
-multi_reference_type.rs
multiple_bindings1.rs
multiple_bindings2.rs
name_resolution2.rs
name_resolution4.rs
-nested_generic.rs
nested_macro_use1.rs
nested_macro_use2.rs
nested_macro_use3.rs
-non_member_const.rs
not_find_value_in_scope.rs
parse_associated_type_as_generic_arg.rs
parse_associated_type_as_generic_arg2.rs
@@ -160,11 +92,8 @@ parse_complex_generic_application.rs
parse_complex_generic_application2.rs
path_as_generic_arg.rs
pattern-struct.rs
-privacy1.rs
-privacy3.rs
privacy4.rs
privacy5.rs
-privacy6.rs
privacy8.rs
macros/proc/attribute_non_function.rs
macros/proc/derive_non_function.rs
@@ -175,63 +104,51 @@ pub_restricted_3.rs
redef_error2.rs
redef_error4.rs
redef_error5.rs
-redef_error6.rs
-rustc_attr1.rs
self-path1.rs
self-path2.rs
sizeof-stray-infer-var-bug.rs
-specify-crate-name.rs
-stmt_with_block_dot.rs
struct-expr-parse.rs
-trait-cycle.rs
-traits1.rs
-traits10.rs
-traits11.rs
-traits12.rs
-traits2.rs
traits3.rs
-traits4.rs
-traits5.rs
traits6.rs
traits7.rs
-traits8.rs
-traits9.rs
type-bindings1.rs
unconstrained_type_param.rs
undeclared_label.rs
-unsafe1.rs
-unsafe11.rs
-unsafe2.rs
-unsafe3.rs
-unsafe6.rs
-unsafe7.rs
use_1.rs
use_2.rs
v0-mangle1.rs
v0-mangle2.rs
while_break_expr.rs
-negative_impls.rs
-auto_trait.rs
exhaustiveness1.rs
exhaustiveness2.rs
exhaustiveness3.rs
-trait13.rs
-trait14.rs
issue-2324-1.rs
issue-2324-2.rs
-issue-2725.rs
-issue-2987.rs
-issue-3045-1.rs
-issue-3045-2.rs
issue-3046.rs
-unknown-associated-item.rs
-issue-3030.rs
-issue-3035.rs
-issue-3082.rs
-issue-3139-1.rs
issue-3139-2.rs
+issue-3032-1.rs
+issue-3032-2.rs
+# https://github.com/Rust-GCC/gccrs/issues/3189
+if_let_expr_simple.rs
+iflet.rs
+issue-3033.rs
+issue-3009.rs
+issue-2953-2.rs
+issue-1773.rs
+issue-2905-2.rs
+issue-2907.rs
+issue-2423.rs
+issue-266.rs
+additional-trait-bounds2.rs
+auto_traits3.rs
+issue-3140.rs
+cmp1.rs
+derive_clone_enum1.rs
+derive_clone_enum2.rs
+derive_clone_enum3.rs
+derive_macro4.rs
+derive_macro6.rs
+issue-2987.rs
+issue-3139-1.rs
issue-3139-3.rs
-issue-3036.rs
-issue-2951.rs
-issue-2203.rs
-issue-2499.rs \ No newline at end of file
+# please don't delete the trailing newline
diff --git a/gcc/testsuite/rust/compile/ptr_int_cast.rs b/gcc/testsuite/rust/compile/ptr_int_cast.rs
new file mode 100644
index 0000000..3a2a5d5
--- /dev/null
+++ b/gcc/testsuite/rust/compile/ptr_int_cast.rs
@@ -0,0 +1,18 @@
+fn main(){
+ let foo = 1337;
+ let bar_ptr = &foo as *const i32;
+
+ let bar_ptr_usize = bar_ptr as usize;
+ let bar_ptr_isize = bar_ptr as isize;
+ let bar_ptr_u64 = bar_ptr as u64;
+ let bar_ptr_i64 = bar_ptr as i64;
+ let bar_ptr_i8 = bar_ptr as i8;
+ let bar_ptr_u8 = bar_ptr as u8;
+
+ let _ = bar_ptr_usize as *const i32;
+ let _ = bar_ptr_isize as *const i32;
+ let _ = bar_ptr_u64 as *const i32;
+ let _ = bar_ptr_i64 as *const i32;
+ let _ = bar_ptr_i8 as *const i32;
+ let _ = bar_ptr_u8 as *const i32;
+}
diff --git a/gcc/testsuite/rust/compile/try-catch-unwind-new.rs b/gcc/testsuite/rust/compile/try-catch-unwind-new.rs
new file mode 100644
index 0000000..b176f7a
--- /dev/null
+++ b/gcc/testsuite/rust/compile/try-catch-unwind-new.rs
@@ -0,0 +1,20 @@
+// { dg-options "-O2 -w -fdump-tree-optimized" }
+#![feature(intrinsics)]
+
+extern "rust-intrinsic" {
+ // { dg-final { scan-tree-dump-times "__builtin_eh_pointer" 1 "optimized" } }
+ fn catch_unwind(try_fn: fn(_: *mut u8), data: *mut u8, catch_fn: fn(_: *mut u8, _: *mut u8));
+}
+
+extern "C" {
+ fn try_fn(data: *mut u8);
+ fn catch_fn(data: *mut u8, ex: *mut u8);
+}
+
+pub fn not_main(d: &mut u8) {
+ unsafe {
+ // { dg-final { scan-tree-dump-times "try_fn" 1 "optimized" } }
+ catch_unwind(try_fn, d, catch_fn);
+ // { dg-final { scan-tree-dump-times "catch_fn" 1 "optimized" } }
+ }
+}
diff --git a/gcc/testsuite/rust/compile/try-catch-unwind-old.rs b/gcc/testsuite/rust/compile/try-catch-unwind-old.rs
new file mode 100644
index 0000000..e97d52c
--- /dev/null
+++ b/gcc/testsuite/rust/compile/try-catch-unwind-old.rs
@@ -0,0 +1,21 @@
+// { dg-options "-O2 -w -fdump-tree-optimized" }
+#![feature(intrinsics)]
+
+extern "rust-intrinsic" {
+ // { dg-final { scan-tree-dump-times "__builtin_eh_pointer" 1 "optimized" } }
+ fn r#try(try_fn: fn(_: *mut u8), data: *mut u8, catch_fn: fn(_: *mut u8, _: *mut u8)) -> i32;
+}
+
+extern "C" {
+ fn try_fn(data: *mut u8);
+ fn catch_fn(data: *mut u8, ex: *mut u8);
+}
+
+pub fn not_main(d: &mut u8) -> i32 {
+ unsafe {
+ // { dg-final { scan-tree-dump-times "try_fn" 1 "optimized" } }
+ let _: i32 = r#try(try_fn, d, catch_fn);
+ // { dg-final { scan-tree-dump-times "catch_fn" 1 "optimized" } }
+ }
+ 42
+}
diff --git a/gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs b/gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs
index 6aec417..c8a2dae 100644
--- a/gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs
+++ b/gcc/testsuite/rust/execute/torture/builtin_macro_include_bytes.rs
@@ -25,7 +25,7 @@ fn print_int(value: i32) {
fn check_bytes(bytes: &[u8; 16]) {
let the_bytes = b"hello, include!\n";
- let x = true;
+ let mut x = true;
let mut i = 0;
// X is true iff bytes == the_bytes
diff --git a/gcc/testsuite/rust/execute/torture/derive_clone_enum1.rs b/gcc/testsuite/rust/execute/torture/derive_clone_enum1.rs
new file mode 100644
index 0000000..542ecd8
--- /dev/null
+++ b/gcc/testsuite/rust/execute/torture/derive_clone_enum1.rs
@@ -0,0 +1,51 @@
+#[lang = "clone"]
+trait Clone {
+ pub fn clone(&self) -> Self;
+}
+
+impl Clone for i32 {
+ fn clone(&self) -> Self {
+ *self
+ }
+}
+
+#[derive(Clone)]
+enum MixAndMatch {
+ A,
+ B(i32),
+ C { inner: i32 }
+}
+
+fn main() -> i32 {
+ let a = MixAndMatch::A;
+ let a_copy = a.clone();
+
+ // we want res to stay at zero - when we don't match on the right thing, increase it
+
+ let mut res = match a_copy {
+ MixAndMatch::A => 0,
+ _ => 1,
+ };
+
+ let a = MixAndMatch::B(15);
+ let a_copy = a.clone();
+
+ match a_copy {
+ MixAndMatch::B(15) => {},
+ _ => res += 1,
+ };
+
+ let a = MixAndMatch::C { inner: 15 };
+ let a_copy = a.clone();
+
+ match a_copy {
+ MixAndMatch::C { inner } => {
+ if inner != 15 {
+ res += 1;
+ }
+ },
+ _ => res += 1,
+ };
+
+ res
+}
diff --git a/gcc/testsuite/rust/execute/torture/derive_macro3.rs b/gcc/testsuite/rust/execute/torture/derive_macro3.rs
index 7b3a089..4138a5b 100644
--- a/gcc/testsuite/rust/execute/torture/derive_macro3.rs
+++ b/gcc/testsuite/rust/execute/torture/derive_macro3.rs
@@ -1,6 +1,7 @@
#[lang = "sized"]
pub trait Sized {}
+#[lang = "clone"]
pub trait Clone {
fn clone(&self) -> Self;
}
diff --git a/gcc/testsuite/rust/execute/torture/derive_macro4.rs b/gcc/testsuite/rust/execute/torture/derive_macro4.rs
index c355ac7..38c4808 100644
--- a/gcc/testsuite/rust/execute/torture/derive_macro4.rs
+++ b/gcc/testsuite/rust/execute/torture/derive_macro4.rs
@@ -1,6 +1,7 @@
#[lang = "sized"]
pub trait Sized {}
+#[lang = "clone"]
pub trait Clone {
fn clone(&self) -> Self;
}
diff --git a/gcc/testsuite/rust/execute/torture/iflet.rs b/gcc/testsuite/rust/execute/torture/iflet.rs
new file mode 100644
index 0000000..da4e93a
--- /dev/null
+++ b/gcc/testsuite/rust/execute/torture/iflet.rs
@@ -0,0 +1,84 @@
+enum Res {
+ OK,
+ BAD,
+}
+
+enum LOption {
+ Some(i32),
+ None,
+}
+
+// Expect a Some(_)
+//
+// Check we can match a Some.
+fn test_can_destructure_Some(v: LOption) -> Res {
+ if let LOption::Some(v) = v {
+ return Res::OK;
+ }
+ return Res::BAD;
+}
+
+// Expect Some(100).
+//
+// Check we can destructure and the inner value is correct.
+fn test_inner_value_is_100(v: LOption) -> Res {
+ if let LOption::Some(v) = v {
+ return match v {
+ 100 => Res::OK,
+ _ => Res::BAD,
+ }
+ }
+ return Res::BAD;
+}
+
+// Expect a None as actual parameter.
+//
+// Only when we FAIL to match a Some do we take the else and return OK.
+fn test_if_else(v: LOption) -> Res {
+ if let LOption::Some(v) = v {
+ return Res::BAD;
+ } else {
+ return Res::OK;
+ }
+}
+
+fn main() -> i32 {
+
+ // Passing a None, so the function should return BAD
+ match test_can_destructure_Some(LOption::None) {
+ Res::OK => return 1,
+ Res::BAD => (),
+ }
+
+ // Same, but with a Some, should return OK
+ match test_can_destructure_Some(LOption::Some(1)) {
+ Res::OK => (),
+ Res::BAD => return 1,
+ }
+
+ // Check the destructuring is correct by looking for Some(100)
+ match test_inner_value_is_100(LOption::Some(100)) {
+ Res::OK => (),
+ Res::BAD => return 1,
+ }
+
+ // ... passing Some(1) should return BAD
+ match test_inner_value_is_100(LOption::Some(1)) {
+ Res::OK => return 1,
+ Res::BAD => (),
+ }
+
+ // ... and so does passing None
+ match test_inner_value_is_100(LOption::None) {
+ Res::OK => return 1,
+ Res::BAD => (),
+ }
+
+ // Check if let... else ...
+ match test_if_else(LOption::None) {
+ Res::OK => (),
+ Res::BAD => return 1,
+ }
+
+ 0
+}
diff --git a/gcc/testsuite/rust/execute/torture/multiline-string.rs b/gcc/testsuite/rust/execute/torture/multiline-string.rs
new file mode 100644
index 0000000..4d22f99
--- /dev/null
+++ b/gcc/testsuite/rust/execute/torture/multiline-string.rs
@@ -0,0 +1,15 @@
+// { dg-output "gcc\n\nrs\n" }
+
+extern "C" {
+ fn printf(fmt: *const i8, ...);
+}
+
+fn main() -> i32 {
+ let a = "gcc
+
+rs\0";
+
+ unsafe { printf("%s\n\0" as *const str as *const i8, a as *const str as *const i8); }
+
+ 0
+}
diff --git a/gcc/testsuite/rust/link/generic_function_0.rs b/gcc/testsuite/rust/link/generic_function_0.rs
index 179c822..58b8eb1 100644
--- a/gcc/testsuite/rust/link/generic_function_0.rs
+++ b/gcc/testsuite/rust/link/generic_function_0.rs
@@ -1,6 +1,3 @@
-// { dg-xfail-if "https://github.com/Rust-GCC/gccrs/issues/2349" { *-*-* } }
-// { dg-excess-errors "" { xfail *-*-* } }
-
extern crate generic_function_1;
use generic_function_1::generic_function;
diff --git a/gcc/testsuite/rust/link/trait_import_0.rs b/gcc/testsuite/rust/link/trait_import_0.rs
index 1b8c90a..ac8c581 100644
--- a/gcc/testsuite/rust/link/trait_import_0.rs
+++ b/gcc/testsuite/rust/link/trait_import_0.rs
@@ -1,6 +1,3 @@
-// { dg-xfail-if "https://github.com/Rust-GCC/gccrs/issues/2349" { *-*-* } }
-// { dg-excess-errors "" { xfail *-*-* } }
-
extern crate trait_import_1;
use trait_import_1::Add;
diff --git a/gcc/testsuite/rust/link/trait_import_1.rs b/gcc/testsuite/rust/link/trait_import_1.rs
index fc7f516..e54b0e1 100644
--- a/gcc/testsuite/rust/link/trait_import_1.rs
+++ b/gcc/testsuite/rust/link/trait_import_1.rs
@@ -1,3 +1,6 @@
+#[lang = "sized"]
+pub trait Sized {}
+
#[lang = "add"]
pub trait Add<Rhs = Self> {
type Output;
diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc
index 5b35390..05843b8 100644
--- a/gcc/tree-inline.cc
+++ b/gcc/tree-inline.cc
@@ -1892,6 +1892,15 @@ remap_gimple_stmt (gimple *stmt, copy_body_data *id)
gimple_call_set_tail (call_stmt, false);
if (gimple_call_from_thunk_p (call_stmt))
gimple_call_set_from_thunk (call_stmt, false);
+ /* Silently clear musttail flag when inlining a function
+ with must tail call from a non-musttail call. The inlining
+ removes one frame so acts like musttail's intent, and we
+ can be inlining a function with musttail calls in the middle
+ of caller where musttail will always error. */
+ if (gimple_call_must_tail_p (call_stmt)
+ && id->call_stmt
+ && !gimple_call_must_tail_p (id->call_stmt))
+ gimple_call_set_must_tail (call_stmt, false);
if (gimple_call_internal_p (call_stmt))
switch (gimple_call_internal_fn (call_stmt))
{
diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc
index 40c38fa..481ab8b 100644
--- a/gcc/tree-ssa-sccvn.cc
+++ b/gcc/tree-ssa-sccvn.cc
@@ -5172,7 +5172,11 @@ dominated_by_p_w_unex (basic_block bb1, basic_block bb2, bool allow_back)
/* Iterate to the single successor of bb2 with only a single executable
incoming edge. */
else if (EDGE_COUNT (bb2->succs) == 1
- && EDGE_COUNT (single_succ (bb2)->preds) > 1)
+ && EDGE_COUNT (single_succ (bb2)->preds) > 1
+ /* Limit the number of edges we check, we should bring in
+ context from the iteration and compute the single
+ executable incoming edge when visiting a block. */
+ && EDGE_COUNT (single_succ (bb2)->preds) < 8)
{
edge prede = NULL;
FOR_EACH_EDGE (e, ei, single_succ (bb2)->preds)
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 17e3b1d..813b2b7 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -12576,7 +12576,7 @@ vectorizable_load (vec_info *vinfo,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
- "vect_model_load_cost:"
+ "vect_model_load_cost: "
"strided group_size = %d .\n",
group_size);
}
diff --git a/gcc/varasm.cc b/gcc/varasm.cc
index eddfb6a..10c1d2e 100644
--- a/gcc/varasm.cc
+++ b/gcc/varasm.cc
@@ -6525,7 +6525,12 @@ do_assemble_alias (tree decl, tree target)
IDENTIFIER_POINTER (target));
# endif
/* If symbol aliases aren't actually supported... */
- if (!TARGET_SUPPORTS_ALIASES)
+ if (!TARGET_SUPPORTS_ALIASES
+# ifdef ACCEL_COMPILER
+ /* ..., and unless special-cased... */
+ && !lookup_attribute ("symbol alias handled", DECL_ATTRIBUTES (decl))
+# endif
+ )
/* ..., 'ASM_OUTPUT_DEF{,_FROM_DECLS}' better have raised an error. */
gcc_checking_assert (seen_error ());
#elif defined (ASM_OUTPUT_WEAK_ALIAS) || defined (ASM_WEAKEN_DECL)
diff --git a/include/ChangeLog b/include/ChangeLog
index 8d58040..8e35469 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,9 @@
+2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ * gomp-constants.h (GOMP_DEVICE_DEFAULT_OMP_61, GOMP_INTEROP_TARGET,
+ GOMP_INTEROP_TARGETSYNC, GOMP_INTEROP_FLAG_NOWAIT): Define.
+
2025-03-18 Jose E. Marchesi <jose.marchesi@oracle.com>
* libiberty.h (ldirname): New function declaration.
diff --git a/include/gomp-constants.h b/include/gomp-constants.h
index ccf61ca..7d6b85f 100644
--- a/include/gomp-constants.h
+++ b/include/gomp-constants.h
@@ -280,10 +280,14 @@ enum gomp_map_kind
omp_invalid_device) to -3 (so that for dev_num >= -2U we can
subtract 1). -4 is then what we use for omp_invalid_device,
which unlike the other non-conforming device numbers results
- in fatal error regardless of OMP_TARGET_OFFLOAD. */
+ in fatal error regardless of OMP_TARGET_OFFLOAD.
+ Furthermore, OpenMP 6.1 exposes the default device to the user; hence,
+ GOMP_DEVICE_DEFAULT_OMP_61 can be used for it,
+ with and without remapped device numbers. */
#define GOMP_DEVICE_ICV -1
#define GOMP_DEVICE_HOST_FALLBACK -2
#define GOMP_DEVICE_INVALID -4
+#define GOMP_DEVICE_DEFAULT_OMP_61 -5
/* GOMP_task/GOMP_taskloop* flags argument. */
#define GOMP_TASK_FLAG_UNTIED (1 << 0)
@@ -406,6 +410,13 @@ enum gomp_map_kind
#define GOMP_INTEROP_IFR_SEPARATOR ((char)(-__INT8_MAX__-1))
#define GOMP_INTEROP_IFR_UNKNOWN ((char)(-__INT8_MAX__))
+/* GOMP_interop target_targetsync argument. */
+#define GOMP_INTEROP_TARGET (1 << 0)
+#define GOMP_INTEROP_TARGETSYNC (1 << 1)
+
+/* GOMP_interop flags argument. */
+#define GOMP_INTEROP_FLAG_NOWAIT (1 << 0)
+
/* HSA specific data structures. */
/* Identifiers of device-specific target arguments. */
diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog
index 54968db..aedfd2c 100644
--- a/libcpp/po/ChangeLog
+++ b/libcpp/po/ChangeLog
@@ -1,3 +1,7 @@
+2025-03-20 Joseph Myers <josmyers@redhat.com>
+
+ * de.po: Update.
+
2025-03-18 Joseph Myers <josmyers@redhat.com>
* fr.po, sv.po: Update.
diff --git a/libcpp/po/de.po b/libcpp/po/de.po
index 9914e57..72a33de 100644
--- a/libcpp/po/de.po
+++ b/libcpp/po/de.po
@@ -9,10 +9,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: cpplib 15-b20250216\n"
+"Project-Id-Version: cpplib 15.1-b20250316\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2025-03-14 22:05+0000\n"
-"PO-Revision-Date: 2025-03-10 22:32+0100\n"
+"PO-Revision-Date: 2025-03-20 07:49+0100\n"
"Last-Translator: Roland Illig <roland.illig@gmx.de>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
"Language: de\n"
@@ -211,10 +211,8 @@ msgstr "%<\\x{%> ohne dazugehöriges %<}%> nach %.*s"
msgid "hex escape sequence out of range"
msgstr "Hex-Escape-Sequenz außerhalb des Wertebereiches"
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119202
#: charset.cc:2247
-#, fuzzy, gcc-internal-format
-#| msgid "%<\\o%> not followed by %<}%>"
+#, gcc-internal-format
msgid "%<\\o%> not followed by %<{%>"
msgstr "%<\\o%> ohne folgendes %<{%>"
@@ -467,16 +465,14 @@ msgid "%<#embed%> not supported in traditional C"
msgstr "%<#embed%> wird in traditionellem C nicht unterstĂŒtzt"
#: directives.cc:1370
-#, fuzzy, gcc-internal-format
-#| msgid "%<#%s%> before C++23 is a GCC extension"
+#, gcc-internal-format
msgid "%<#%s%> before C++26 is a GCC extension"
-msgstr "%<#%s%> vor C++23 ist eine GCC-Erweiterung"
+msgstr "%<#%s%> vor C++26 ist eine GCC-Erweiterung"
#: directives.cc:1379
-#, fuzzy, gcc-internal-format
-#| msgid "%<#%s%> is a GCC extension"
+#, gcc-internal-format
msgid "%<#%s%> is a C23 feature"
-msgstr "%<#%s%> ist eine GCC-Erweiterung"
+msgstr "%<#%s%> ist ein C23-Feature"
#: directives.cc:1436
#, gcc-internal-format
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index fff693d..7151f31 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@
+2025-03-22 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/t-avr (LIB1ASMFUNCS, LIB2FUNCS_EXCLUDE):
+ Properly handle avrtiny.
+
2025-03-14 Thomas Schwinge <thomas@codesourcery.com>
Revert:
diff --git a/libgcc/config/avr/libf7/ChangeLog b/libgcc/config/avr/libf7/ChangeLog
index d9e3fbe..1b8a29a 100644
--- a/libgcc/config/avr/libf7/ChangeLog
+++ b/libgcc/config/avr/libf7/ChangeLog
@@ -1,3 +1,8 @@
+2025-03-22 Georg-Johann Lay <avr@gjlay.de>
+
+ * t-libf7 (libgcc-objects): Only add objects when building
+ for non-AVRrc.
+
2024-11-16 Georg-Johann Lay <avr@gjlay.de>
* libf7.h (bool, true, false): Don't define in C23 or higher.
diff --git a/libgcc/config/avr/libf7/t-libf7 b/libgcc/config/avr/libf7/t-libf7
index f17e67e8..9ec70d8 100644
--- a/libgcc/config/avr/libf7/t-libf7
+++ b/libgcc/config/avr/libf7/t-libf7
@@ -127,7 +127,9 @@ iter-labels := $(f7_parts)
-include $(patsubst %,$(libf7)/libf7-c-object.mk,$(iter-items))
+ifeq (,$(findstring avrtiny,$(MULTIDIR)))
libgcc-objects += $(patsubst %,f7_c_%$(objext),$(F7_C_PARTS))
+endif
# Build the libf7 ASM objects and add them to libgcc.a.
@@ -138,7 +140,9 @@ iter-labels := $(f7_parts)
-include $(patsubst %,$(libf7)/libf7-asm-object.mk,$(iter-items))
+ifeq (,$(findstring avrtiny,$(MULTIDIR)))
libgcc-objects += $(patsubst %,f7_asm_%$(objext),$(F7_ASM_PARTS))
+endif
.PHONY: clean-f7
diff --git a/libgcc/config/avr/t-avr b/libgcc/config/avr/t-avr
index f98d48f..b10542c 100644
--- a/libgcc/config/avr/t-avr
+++ b/libgcc/config/avr/t-avr
@@ -33,8 +33,7 @@ LIB1ASMFUNCS = \
_popcountsi2 \
_popcountqi2 \
_bswapsi2 \
- _fmul _fmuls _fmulsu \
- _strlen_memx
+ _fmul _fmuls _fmulsu
# The below functions either use registers that are not present
# in tiny core, or use a different register convention (don't save
@@ -45,16 +44,15 @@ LIB1ASMFUNCS = \
# _load, __fload and _xload variations - expect lpm and elpm support
# _movmemx and _movmemf - expect elpm/lpm
-ifneq ($(MULTIFLAGS),-mmcu=avrtiny)
-LIB1ASMFUNCS += \
- _mulsqipsi3 \
+FUNCS_notiny = \
+ _mulsqipsi3 \
_mulhisi3 \
_umulhisi3 \
_usmulhisi3 \
_muluhisi3 \
_mulshisi3 \
- _muldi3 _muldi3_6 \
- _mulsidi3 _umulsidi3 \
+ _muldi3 _muldi3_6 \
+ _mulsidi3 _umulsidi3 \
_divdi3 _udivdi3 \
_udivmod64 \
_negdi2 \
@@ -64,6 +62,7 @@ LIB1ASMFUNCS += \
_xload_1 _xload_2 _xload_3 _xload_4 \
_fload_1 _fload_2 _fload_3 _fload_4 \
_movmemx _movmemf \
+ _strlen_memx \
_clzdi2 \
_paritydi2 \
_popcountdi2 \
@@ -72,11 +71,9 @@ LIB1ASMFUNCS += \
_adddi3 _adddi3_s8 _subdi3 \
_cmpdi2 _cmpdi2_s8 \
_powif
-endif
# Fixed point routines in avr/lib1funcs-fixed.S
-ifneq ($(MULTIFLAGS),-mmcu=avrtiny)
-LIB1ASMFUNCS += \
+FUNCS_notiny += \
_fractqqsf _fractuqqsf \
_fracthqsf _fractuhqsf _fracthasf _fractuhasf \
_fractsasf _fractusasf _fractsqsf _fractusqsf \
@@ -107,6 +104,9 @@ LIB1ASMFUNCS += \
_rounddq3 _roundudq3 \
_roundda3 _rounduda3 \
_roundta3 _rounduta3
+
+ifeq (,$(findstring avrtiny,$(MULTIDIR)))
+LIB1ASMFUNCS += $(FUNCS_notiny)
endif
LIB2FUNCS_EXCLUDE = \
@@ -115,6 +115,9 @@ LIB2FUNCS_EXCLUDE = \
_clrsbdi2 \
_powisf2
+ifneq (,$(findstring avrtiny,$(MULTIDIR)))
+LIB2FUNCS_EXCLUDE += $(FUNCS_notiny)
+endif
ifeq ($(long_double_type_size),32)
# We do not have the DFtype.
diff --git a/libgcobol/ChangeLog b/libgcobol/ChangeLog
index 5e3cc11..f327061 100644
--- a/libgcobol/ChangeLog
+++ b/libgcobol/ChangeLog
@@ -1,3 +1,17 @@
+2025-03-23 Bob Dubner <rdubner@symas.com>
+
+ * Makefile.am: Incorporate AM_CXXFLAGS = $(CXXFLAGS_FOR_TARGET).
+ * Makefile.in: Regenerated.
+
+2025-03-20 Iain Sandoe <iain@sandoe.co.uk>
+
+ * Makefile.am: Use LIBICONV.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+ * configure.ac: Check for iconv support.
+
2025-03-17 Bob Dubner <rdubner@symas.com>
* charmaps.cc: Remove unused headers
diff --git a/libgcobol/Makefile.am b/libgcobol/Makefile.am
index eddf209..cafb733 100644
--- a/libgcobol/Makefile.am
+++ b/libgcobol/Makefile.am
@@ -48,10 +48,12 @@ libgcobol_la_LINK = $(LIBTOOL) --mode=link --tag=CXX $(CXX) \
-Wc,-shared-libgcc \
-version-info $(LIBGCOBOL_VERSION) \
-lstdc++ \
- $(LTLDFLAGS)
+ $(LTLDFLAGS) $(LTLIBICONV)
WARN_CFLAGS = -W -Wall -Wwrite-strings
+AM_CXXFLAGS = $(CXXFLAGS_FOR_TARGET)
+
# not defined: DEFS, MAX_ERRORS, LTLDFLAGS
ALL_CXXFLAGS = -I. -I$(srcdir) $(AM_CPPFLAGS) $(DEFS) \
$(XCFLAGS) $(AM_CXXFLAGS) $(WARN_CFLAGS) $(MAX_ERRORS) \
diff --git a/libgcobol/Makefile.in b/libgcobol/Makefile.in
index a6096d2..c4a562a 100644
--- a/libgcobol/Makefile.in
+++ b/libgcobol/Makefile.in
@@ -113,7 +113,11 @@ target_triplet = @target@
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/iconv.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/lib-ld.m4 \
+ $(top_srcdir)/../config/lib-link.m4 \
+ $(top_srcdir)/../config/lib-prefix.m4 \
$(top_srcdir)/../config/multi.m4 \
$(top_srcdir)/../config/override.m4 \
$(top_srcdir)/../config/toolexeclibdir.m4 \
@@ -300,11 +304,13 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBGCOBOL_VERSION = @LIBGCOBOL_VERSION@
+LIBICONV = @LIBICONV@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
@@ -422,9 +428,10 @@ libgcobol_la_LINK = $(LIBTOOL) --mode=link --tag=CXX $(CXX) \
-Wc,-shared-libgcc \
-version-info $(LIBGCOBOL_VERSION) \
-lstdc++ \
- $(LTLDFLAGS)
+ $(LTLDFLAGS) $(LTLIBICONV)
WARN_CFLAGS = -W -Wall -Wwrite-strings
+AM_CXXFLAGS = $(CXXFLAGS_FOR_TARGET)
# not defined: DEFS, MAX_ERRORS, LTLDFLAGS
ALL_CXXFLAGS = -I. -I$(srcdir) $(AM_CPPFLAGS) $(DEFS) \
diff --git a/libgcobol/aclocal.m4 b/libgcobol/aclocal.m4
index 1d5125e..25c8b71 100644
--- a/libgcobol/aclocal.m4
+++ b/libgcobol/aclocal.m4
@@ -1188,7 +1188,11 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../config/depstand.m4])
+m4_include([../config/iconv.m4])
m4_include([../config/lead-dot.m4])
+m4_include([../config/lib-ld.m4])
+m4_include([../config/lib-link.m4])
+m4_include([../config/lib-prefix.m4])
m4_include([../config/multi.m4])
m4_include([../config/override.m4])
m4_include([../config/toolexeclibdir.m4])
diff --git a/libgcobol/config.h.in b/libgcobol/config.h.in
index 39b2044..a7e5675 100644
--- a/libgcobol/config.h.in
+++ b/libgcobol/config.h.in
@@ -6,6 +6,9 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
+/* Define if you have the iconv() function and it works. */
+#undef HAVE_ICONV
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -36,6 +39,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
diff --git a/libgcobol/configure b/libgcobol/configure
index 73433eb..1db4e79 100755
--- a/libgcobol/configure
+++ b/libgcobol/configure
@@ -634,6 +634,8 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+LTLIBICONV
+LIBICONV
extra_darwin_ldflags_libgcobol
VERSION_SUFFIX
LIBGCOBOL_VERSION
@@ -804,6 +806,9 @@ enable_fast_install
with_gnu_ld
enable_libtool_lock
enable_darwin_at_rpath
+enable_rpath
+with_libiconv_prefix
+with_libiconv_type
'
ac_precious_vars='build_alias
host_alias
@@ -1456,6 +1461,7 @@ Optional Features:
--enable-darwin-at-rpath
install libraries with @rpath/library-name, requires
rpaths to be added to executables
+ --disable-rpath do not hardcode runtime library paths
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1471,6 +1477,10 @@ Optional Packages:
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
Some influential environment variables:
CC C compiler command
@@ -12891,7 +12901,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12894 "configure"
+#line 12904 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12997,7 +13007,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 13000 "configure"
+#line 13010 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -17183,6 +17193,906 @@ case $host in
esac
+# For iconv support.
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if ${acl_cv_path_LD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | $EGREP '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if ${acl_cv_prog_gnu_ld+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | $EGREP '(GNU|with BFD)' 1>&5; then
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if ${acl_cv_rpath+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+ enableval=$enable_rpath; :
+else
+ enable_rpath=yes
+fi
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then :
+ withval=$with_libiconv_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+
+fi
+
+
+# Check whether --with-libiconv-type was given.
+if test "${with_libiconv_type+set}" = set; then :
+ withval=$with_libiconv_type; with_libiconv_type=$withval
+else
+ with_libiconv_type=auto
+fi
+
+ lib_type=`eval echo \$with_libiconv_type`
+
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ elif test x$lib_type != xshared; then
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ elif test x$lib_type != xshared; then
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
+ fi
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if ${am_cv_func_iconv+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if ${am_cv_func_iconv_works+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ am_cv_func_iconv_works=no
+ for ac_iconv_const in '' 'const'; do
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+
+int
+main ()
+{
+int result = 0;
+ /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
+ successful returns. This is even documented in
+ <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 1;
+ iconv_close (cd_utf8_to_88591);
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\263";
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 2;
+ iconv_close (cd_ascii_to_88591);
+ }
+ }
+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\304";
+ static char buf[2] = { (char)0xDE, (char)0xAD };
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = 1;
+ char *outptr = buf;
+ size_t outbytesleft = 1;
+ size_t res = iconv (cd_88591_to_utf8,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+ result |= 4;
+ iconv_close (cd_88591_to_utf8);
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ result |= 8;
+ iconv_close (cd_88591_to_utf8);
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ {
+ /* Try standardized names. */
+ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+ /* Try IRIX, OSF/1 names. */
+ iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+ /* Try AIX names. */
+ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+ /* Try HP-UX names. */
+ iconv_t cd4 = iconv_open ("utf8", "eucJP");
+ if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+ && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+ result |= 16;
+ if (cd1 != (iconv_t)(-1))
+ iconv_close (cd1);
+ if (cd2 != (iconv_t)(-1))
+ iconv_close (cd2);
+ if (cd3 != (iconv_t)(-1))
+ iconv_close (cd3);
+ if (cd4 != (iconv_t)(-1))
+ iconv_close (cd4);
+ }
+ return result;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ am_cv_func_iconv_works=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ test "$am_cv_func_iconv_works" = no || break
+ done
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5
+$as_echo_n "checking whether iconv is compatible with its POSIX signature... " >&6; }
+if ${gl_cv_iconv_nonconst+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_iconv_nonconst=yes
+else
+ gl_cv_iconv_nonconst=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5
+$as_echo "$gl_cv_iconv_nonconst" >&6; }
+ else
+ gl_cv_iconv_nonconst=yes
+ fi
+ if test $gl_cv_iconv_nonconst = yes; then
+ iconv_arg1=""
+ else
+ iconv_arg1="const"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $iconv_arg1
+_ACEOF
+
+
+
+ if test "$am_func_iconv" = yes; then
+ if test -n "$LIBICONV"; then
+ am_cv_func_iconv_summary='yes, in libiconv'
+ else
+ am_cv_func_iconv_summary='yes, in libc'
+ fi
+ else
+ if test "$am_cv_func_iconv" = yes; then
+ am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
+ else
+ am_cv_func_iconv_summary='no, consider installing GNU libiconv'
+ fi
+ fi
+
+
ac_config_files="$ac_config_files Makefile"
diff --git a/libgcobol/configure.ac b/libgcobol/configure.ac
index 2e4a88e..e27621d 100644
--- a/libgcobol/configure.ac
+++ b/libgcobol/configure.ac
@@ -266,6 +266,9 @@ case $host in
esac
AC_SUBST(extra_darwin_ldflags_libgcobol)
+# For iconv support.
+AM_ICONV
+
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_FILES([Makefile])
####AC_CONFIG_FILES(libgcobol.spec)
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 626c8fe..03eab2e 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,17 @@
+2025-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * intrinsics/reduce.c (reduce_scalar_c): Correct type of parameter DIM.
+
+2025-03-21 Paul Thomas <pault@gcc.gnu.org>
+
+ PR libfortran/85836
+ * Makefile.am : Add reduce.c
+ * Makefile.in : Regenerated
+ * gfortran.map : Add _gfortran_reduce, _gfortran_reduce_scalar,
+ _gfortran_reduce_c and _gfortran_reduce_scalar_c to the list.
+ * intrinsics/reduce.c (reduce, reduce_scalar, reduce_c,
+ reduce_scalar_c): New functions and prototypes
+
2025-02-27 Thomas Schwinge <tschwinge@baylibre.com>
PR target/107635
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
index 52bd6ea..21b35c7 100644
--- a/libgfortran/Makefile.am
+++ b/libgfortran/Makefile.am
@@ -149,6 +149,7 @@ intrinsics/spread_generic.c \
intrinsics/string_intrinsics.c \
intrinsics/rand.c \
intrinsics/random.c \
+intrinsics/reduce.c \
intrinsics/reshape_generic.c \
intrinsics/reshape_packed.c \
intrinsics/selected_int_kind.f90 \
diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in
index 9b9ed2f..6a63d88 100644
--- a/libgfortran/Makefile.in
+++ b/libgfortran/Makefile.in
@@ -612,7 +612,7 @@ am__objects_59 = intrinsics/associated.lo intrinsics/abort.lo \
intrinsics/move_alloc.lo intrinsics/pack_generic.lo \
intrinsics/selected_char_kind.lo intrinsics/size.lo \
intrinsics/spread_generic.lo intrinsics/string_intrinsics.lo \
- intrinsics/rand.lo intrinsics/random.lo \
+ intrinsics/rand.lo intrinsics/random.lo intrinsics/reduce.lo \
intrinsics/reshape_generic.lo intrinsics/reshape_packed.lo \
intrinsics/selected_int_kind.lo \
intrinsics/selected_real_kind.lo intrinsics/trigd.lo \
@@ -1028,7 +1028,7 @@ gfor_helper_src = intrinsics/associated.c intrinsics/abort.c \
intrinsics/move_alloc.c intrinsics/pack_generic.c \
intrinsics/selected_char_kind.c intrinsics/size.c \
intrinsics/spread_generic.c intrinsics/string_intrinsics.c \
- intrinsics/rand.c intrinsics/random.c \
+ intrinsics/rand.c intrinsics/random.c intrinsics/reduce.c \
intrinsics/reshape_generic.c intrinsics/reshape_packed.c \
intrinsics/selected_int_kind.f90 \
intrinsics/selected_real_kind.f90 intrinsics/trigd.c \
@@ -3476,6 +3476,8 @@ intrinsics/rand.lo: intrinsics/$(am__dirstamp) \
intrinsics/$(DEPDIR)/$(am__dirstamp)
intrinsics/random.lo: intrinsics/$(am__dirstamp) \
intrinsics/$(DEPDIR)/$(am__dirstamp)
+intrinsics/reduce.lo: intrinsics/$(am__dirstamp) \
+ intrinsics/$(DEPDIR)/$(am__dirstamp)
intrinsics/reshape_generic.lo: intrinsics/$(am__dirstamp) \
intrinsics/$(DEPDIR)/$(am__dirstamp)
intrinsics/reshape_packed.lo: intrinsics/$(am__dirstamp) \
@@ -4591,6 +4593,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/perror.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/rand.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/random.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/reduce.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/rename.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/reshape_generic.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@intrinsics/$(DEPDIR)/reshape_packed.Plo@am__quote@
diff --git a/libgfortran/gfortran.map b/libgfortran/gfortran.map
index 159a862..7725e12 100644
--- a/libgfortran/gfortran.map
+++ b/libgfortran/gfortran.map
@@ -2023,4 +2023,8 @@ GFORTRAN_15 {
_gfortran_pow_m16_m4;
_gfortran_pow_m16_m8;
_gfortran_pow_m16_m16;
+ _gfortran_reduce;
+ _gfortran_reduce_scalar;
+ _gfortran_reduce_c;
+ _gfortran_reduce_scalar_c;
} GFORTRAN_14;
diff --git a/libgfortran/intrinsics/reduce.c b/libgfortran/intrinsics/reduce.c
new file mode 100644
index 0000000..c8950e4
--- /dev/null
+++ b/libgfortran/intrinsics/reduce.c
@@ -0,0 +1,286 @@
+/* Generic implementation of the reduce intrinsic
+ Copyright (C) 2002-2025 Free Software Foundation, Inc.
+ Contributed by Paul Thomas <pault@gcc.gnu.org>
+
+This file is part of the GNU Fortran runtime library (libgfortran).
+
+Libgfortran is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public
+License as published by the Free Software Foundation; either
+version 3 of the License, or (at your option) any later version.
+
+Ligbfortran is distributed in the hope that it will be useful,
+but WITHOUT ANY WarrayANTY; without even the implied warrayanty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#include "libgfortran.h"
+#include <string.h>
+#include <stdio.h>
+
+typedef GFC_FULL_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, char) parray;
+
+extern void reduce (parray *, parray *,
+ void (*operation) (void *, void *, void *),
+ GFC_INTEGER_4 *, gfc_array_l4 *, void *, void *);
+export_proto (reduce);
+
+void
+reduce (parray *ret,
+ parray *array,
+ void (*operation) (void *, void *, void *),
+ GFC_INTEGER_4 *dim,
+ gfc_array_l4 *mask,
+ void *identity,
+ void *ordered __attribute__ ((unused)))
+{
+ GFC_LOGICAL_4 maskR = 0;
+ void *array_ptr;
+ void *buffer_ptr;
+ void *zero;
+ void *buffer;
+ void *res;
+ index_type ext0, ext1, ext2;
+ index_type str0, str1, str2;
+ index_type idx0, idx1, idx2;
+ index_type dimen, dimen_m1, ldx;
+ bool started;
+ bool masked = false;
+ bool dim_present = dim != NULL;
+ bool mask_present = mask != NULL;
+ bool identity_present = identity != NULL;
+ bool scalar_result;
+ int i;
+ int array_rank = (int)GFC_DESCRIPTOR_RANK (array);
+ size_t elem_len = GFC_DESCRIPTOR_SIZE (array);
+
+/* The standard mandates that OPERATION is a pure scalar function such that in
+ the reduction below:
+
+ *buffer_ptr = OPERATION (*buffer_ptr, array(idx1, idx2, idx3))
+
+ To make this type agnostic, the front end builds a wrapper, that puts the
+ assignment within a subroutine and transforms it into a pointer operation:
+
+ operation (buffer_ptr, &array(idx1, idx2, idx3), buffer_ptr)
+
+ The wrapper also detects the presence or not of the second argument. If it
+ is not present, the wrapper effects *third_arg = *first_arg.
+
+ The only information needed about the type of array is its element size. In
+ both modes, the wrapper takes care of allocatable components correctly,
+ which is why the second mode is used to fill the result elements. */
+
+ if (dim_present)
+ {
+ if ((*dim < 1) || (*dim > (GFC_INTEGER_4)array_rank))
+ runtime_error ("DIM in REDUCE intrinsic is less than 0 or greater than "
+ "the rank of ARRAY");
+ dimen = (index_type) *dim;
+ }
+ else
+ dimen = 1;
+ dimen_m1 = dimen -1;
+
+ /* Set up the shape and strides for the reduction. This is made relatively
+ painless by the use of pointer arithmetic throughout (except for MASK,
+ whose type is known. */
+ ext0 = ext1 = ext2 = 1;
+ str0 = str1 = str2 = 1;
+
+ scalar_result = (!dim_present && array_rank > 1) || array_rank == 1;
+
+ for (i = 0; i < array_rank; i++)
+ {
+ /* Obtain the shape of the reshaped ARRAY. */
+ index_type ext = GFC_DESCRIPTOR_EXTENT (array,i);
+ index_type str = GFC_DESCRIPTOR_STRIDE (array,i);
+
+ if (masked && (ext != GFC_DESCRIPTOR_EXTENT (mask, i)))
+ runtime_error ("shape mismatch between ARRAY and MASK in REDUCE "
+ "intrinsic");
+
+ if (scalar_result)
+ {
+ ext1 *= ext;
+ continue;
+ }
+ else if (i < dimen_m1)
+ ext0 *= ext;
+ else if (i == dimen_m1)
+ ext1 = ext;
+ else
+ ext2 *= ext;
+
+ /* The dimensions of the return array. */
+ if (i < (int)(dimen - 1))
+ GFC_DIMENSION_SET (ret->dim[i], 0, ext - 1, str);
+ else if (i < array_rank - 1)
+ GFC_DIMENSION_SET (ret->dim[i], 0, ext - 1, str);
+ }
+
+ if (!scalar_result)
+ {
+ str1 = GFC_DESCRIPTOR_STRIDE (array, dimen_m1);
+ if (dimen < array_rank)
+ str2 = GFC_DESCRIPTOR_STRIDE (array, dimen);
+ else
+ str2 = 1;
+ }
+
+ /* Allocate the result data, the result buffer and zero. */
+ if (ret->base_addr == NULL)
+ ret->base_addr = calloc ((size_t)(ext0 * ext2), elem_len);
+ buffer = calloc (1, elem_len);
+ zero = calloc (1, elem_len);
+
+ /* Now loop over the first and third dimensions of the reshaped ARRAY. */
+ for (idx0 = 0; idx0 < ext0; idx0++)
+ {
+ for (idx2 = 0; idx2 < ext2; idx2++)
+ {
+ ldx = idx0 * str0 + idx2 * str2;
+ if (mask_present)
+ maskR = mask->base_addr[ldx];
+
+ started = (mask_present && maskR) || !mask_present;
+
+ buffer_ptr = array->base_addr
+ + (size_t)((idx0 * str0 + idx2 * str2) * elem_len);
+
+ /* Start the iteration over the second dimension of ARRAY. */
+ for (idx1 = 1; idx1 < ext1; idx1++)
+ {
+ /* If masked, cycle until after first element that is not masked
+ out. Then set 'started' and cycle so that this becomes the
+ first element in the reduction. */
+ ldx = idx0 * str0 + idx1 * str1 + idx2 * str2;
+ if (mask_present)
+ maskR = mask->base_addr[ldx];
+
+ array_ptr = array->base_addr
+ + (size_t)((idx0 * str0 + idx1 * str1
+ + idx2 * str2) * elem_len);
+ if (!started)
+ {
+ if (mask_present && maskR)
+ started = true;
+ buffer_ptr = array_ptr;
+ continue;
+ }
+
+ /* Call the operation, if not masked out, with the previous
+ element or the buffer and current element as arguments. The
+ result is stored in the buffer and the buffer_ptr set to
+ point to buffer, instead of the previous array element. */
+ if ((mask_present && maskR) || !mask_present)
+ {
+ operation (buffer_ptr, array_ptr, buffer);
+ buffer_ptr = buffer;
+ }
+ }
+
+ /* Now the result of the iteration is transferred to the returned
+ result. If this result element is empty emit an error or, if
+ available, set to identity. Note that str1 is paired with idx2
+ here because the result skips a dimension. */
+ res = ret->base_addr + (size_t)((idx0 * str0 + idx2 * str1) * elem_len);
+ if (started)
+ {
+ operation (buffer_ptr, NULL, res);
+ operation (zero, NULL, buffer);
+ }
+ else
+ {
+ if (!identity_present)
+ runtime_error ("Empty column and no IDENTITY in REDUCE "
+ "intrinsic");
+ else
+ operation (identity, NULL, res);
+ }
+ }
+ }
+ free (zero);
+ free (buffer);
+}
+
+
+extern void reduce_scalar (void *, parray *,
+ void (*operation) (void *, void *, void *),
+ GFC_INTEGER_4 *, gfc_array_l4 *, void *, void *);
+export_proto (reduce_scalar);
+
+void
+reduce_scalar (void *res,
+ parray *array,
+ void (*operation) (void *, void *, void *),
+ GFC_INTEGER_4 *dim,
+ gfc_array_l4 *mask,
+ void *identity,
+ void *ordered)
+{
+ parray ret;
+ ret.base_addr = NULL;
+ ret.dtype.rank = 0;
+ reduce (&ret, array, operation, dim, mask, identity, ordered);
+ memcpy (res, ret.base_addr, GFC_DESCRIPTOR_SIZE (array));
+ if (ret.base_addr) free (ret.base_addr);
+}
+
+extern void reduce_c (parray *, index_type, parray *,
+ void (*operation) (void *, void *, void *),
+ GFC_INTEGER_4 *, gfc_array_l4 *, void *, void *,
+ index_type, index_type);
+export_proto (reduce_c);
+
+void
+reduce_c (parray *ret,
+ index_type ret_strlen __attribute__ ((unused)),
+ parray *array,
+ void (*operation) (void *, void *, void *),
+ GFC_INTEGER_4 *dim,
+ gfc_array_l4 *mask,
+ void *identity,
+ void *ordered,
+ index_type array_strlen __attribute__ ((unused)),
+ index_type identity_strlen __attribute__ ((unused)))
+{
+ reduce (ret, array, operation, dim, mask, identity, ordered);
+}
+
+
+extern void reduce_scalar_c (void *, index_type, parray *,
+ void (*operation) (void *, void *, void *),
+ GFC_INTEGER_4 *, gfc_array_l4 *, void *, void *,
+ index_type, index_type);
+export_proto (reduce_scalar_c);
+
+
+void
+reduce_scalar_c (void *res,
+ index_type res_strlen __attribute__ ((unused)),
+ parray *array,
+ void (*operation) (void *, void *, void *),
+ GFC_INTEGER_4 *dim,
+ gfc_array_l4 *mask,
+ void *identity,
+ void *ordered,
+ index_type array_strlen __attribute__ ((unused)),
+ index_type identity_strlen __attribute__ ((unused)))
+{
+ parray ret;
+ ret.base_addr = NULL;
+ ret.dtype.rank = 0;
+ reduce (&ret, array, operation, dim, mask, identity, ordered);
+ memcpy (res, ret.base_addr, GFC_DESCRIPTOR_SIZE (array));
+ if (ret.base_addr) free (ret.base_addr);
+}
diff --git a/libgm2/ChangeLog b/libgm2/ChangeLog
index ebee2c0..76506afd 100644
--- a/libgm2/ChangeLog
+++ b/libgm2/ChangeLog
@@ -1,3 +1,10 @@
+2025-03-20 Gaius Mulley <gaiusmod2@gmail.com>
+
+ * libm2iso/ErrnoCategory.cc (IsErrnoHard): Defend against
+ lack of ENOTBLK.
+ (UnAvailable): Ditto.
+ (GetOpenResults): Ditto.
+
2024-11-20 Gaius Mulley <gaiusmod2@gmail.com>
PR modula2/117703
diff --git a/libgm2/libm2iso/ErrnoCategory.cc b/libgm2/libm2iso/ErrnoCategory.cc
index 053c75b..d1dcb15 100644
--- a/libgm2/libm2iso/ErrnoCategory.cc
+++ b/libgm2/libm2iso/ErrnoCategory.cc
@@ -50,7 +50,10 @@ EXPORT(IsErrnoHard) (int e)
{
#if defined(HAVE_ERRNO_H) || defined(HAVE_SYS_ERRNO_H)
return ((e == EPERM) || (e == ENOENT) || (e == EIO) || (e == ENXIO)
- || (e == EACCES) || (e == ENOTBLK) || (e == ENODEV) || (e == EINVAL)
+ || (e == EACCES) || (e == ENODEV) || (e == EINVAL)
+#ifdef ENOTBLK
+ || (e == ENOTBLK)
+#endif
|| (e == ENFILE) || (e == EROFS) || (e == EMLINK));
#else
return false;
@@ -79,7 +82,10 @@ EXPORT(UnAvailable) (int e)
{
#if defined(HAVE_ERRNO_H) || defined(HAVE_SYS_ERRNO_H)
return ((e == ENOENT) || (e == ESRCH) || (e == ENXIO) || (e == ECHILD)
- || (e == ENOTBLK) || (e == ENODEV) || (e == ENOTDIR));
+#ifdef ENOTBLK
+ || (e == ENOTBLK)
+#endif
+ || (e == ENODEV) || (e == ENOTDIR));
#else
return false;
#endif
@@ -108,9 +114,11 @@ EXPORT(GetOpenResults) (int e)
case EACCES:
return wrongPermissions;
break;
+#ifdef ENOTBLK
case ENOTBLK:
return wrongFileType;
break;
+#endif
case EEXIST:
return fileExists;
break;
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 6507ba0..90d0686 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,64 @@
+2025-03-21 Tobias Burnus <tburnus@baylibre.com>
+
+ * testsuite/libgomp.fortran/get-mapped-ptr-1.f90: Use -6
+ not -5 as non-conforming device number.
+
+2025-03-21 Tobias Burnus <tburnus@baylibre.com>
+
+ * plugin/plugin-gcn.c (_LIBGOMP_PLUGIN_INCLUDE): Define.
+ (struct hsa_runtime_fn_info): Add two queue functions.
+ (hipError_t, hipCtx_t, hipStream_s, hipStream_t): New types.
+ (struct hip_runtime_fn_info): New.
+ (hip_runtime_lib, hip_fns): New global vars.
+ (init_environment_variables): Handle hip_runtime_lib.
+ (init_hsa_runtime_functions): Load the two queue functions.
+ (init_hip_runtime_functions, GOMP_OFFLOAD_interop,
+ GOMP_OFFLOAD_get_interop_int, GOMP_OFFLOAD_get_interop_ptr,
+ GOMP_OFFLOAD_get_interop_str,
+ GOMP_OFFLOAD_get_interop_type_desc): New.
+ * plugin/plugin-nvptx.c (_LIBGOMP_PLUGIN_INCLUDE): Define.
+ (GOMP_OFFLOAD_interop, GOMP_OFFLOAD_get_interop_int,
+ GOMP_OFFLOAD_get_interop_ptr, GOMP_OFFLOAD_get_interop_str,
+ GOMP_OFFLOAD_get_interop_type_desc): New.
+ * testsuite/libgomp.c/interop-fr-1.c: New test.
+ * testsuite/libgomp.c-c++-common/get-mapped-ptr-1.c: Use -6
+ not -5 as non-conforming device number.
+
+2025-03-21 Paul-Antoine Arras <parras@baylibre.com>
+ Tobias Burnus <tburnus@baylibre.com>
+
+ * icv-device.c (omp_set_default_device): Check
+ GOMP_DEVICE_DEFAULT_OMP_61.
+ * libgomp-plugin.h (struct interop_obj_t): New.
+ (enum gomp_interop_flag): New.
+ (GOMP_OFFLOAD_interop): Declare.
+ (GOMP_OFFLOAD_get_interop_int): Declare.
+ (GOMP_OFFLOAD_get_interop_ptr): Declare.
+ (GOMP_OFFLOAD_get_interop_str): Declare.
+ (GOMP_OFFLOAD_get_interop_type_desc): Declare.
+ * libgomp.h (_LIBGOMP_OMP_LOCK_DEFINED): Define.
+ (struct gomp_device_descr): Add interop_func, get_interop_int_func,
+ get_interop_ptr_func, get_interop_str_func, get_interop_type_desc_func.
+ * libgomp.map: Add GOMP_interop.
+ * libgomp_g.h (GOMP_interop): Declare.
+ * target.c (resolve_device): Handle GOMP_DEVICE_DEFAULT_OMP_61.
+ (omp_get_interop_int): Replace stub with actual implementation.
+ (omp_get_interop_ptr): Likewise.
+ (omp_get_interop_str): Likewise.
+ (omp_get_interop_type_desc): Likewise.
+ (struct interop_data_t): Define.
+ (gomp_interop_internal): New function.
+ (GOMP_interop): Likewise.
+ (gomp_load_plugin_for_device): Load symbols for get_interop_int,
+ get_interop_ptr, get_interop_str and get_interop_type_desc.
+ * testsuite/libgomp.c-c++-common/interop-1.c: New test.
+
+2025-03-21 Tobias Burnus <tburnus@baylibre.com>
+
+ * testsuite/lib/libgomp.exp (libgomp_init): Add
+ -fdiagnostics-plain-output to additional_flags; remove
+ -fno-diagnostics-show-caret and -fdiagnostics-color=never.
+
2025-03-17 Tobias Burnus <tburnus@baylibre.com>
PR fortran/115271
diff --git a/libgomp/icv-device.c b/libgomp/icv-device.c
index ba06f50..40bf7cd 100644
--- a/libgomp/icv-device.c
+++ b/libgomp/icv-device.c
@@ -32,8 +32,11 @@
void
omp_set_default_device (int device_num)
{
- struct gomp_task_icv *icv = gomp_icv (true);
- icv->default_device_var = device_num;
+ if (device_num != GOMP_DEVICE_DEFAULT_OMP_61)
+ {
+ struct gomp_task_icv *icv = gomp_icv (true);
+ icv->default_device_var = device_num;
+ }
}
ialias (omp_set_default_device)
diff --git a/libgomp/libgomp-plugin.h b/libgomp/libgomp-plugin.h
index 62bf43d..924fc1f 100644
--- a/libgomp/libgomp-plugin.h
+++ b/libgomp/libgomp-plugin.h
@@ -33,6 +33,14 @@
#include <stddef.h>
#include <stdint.h>
+#ifdef _LIBGOMP_PLUGIN_INCLUDE
+ /* Include 'omp.h' for the interop definitions. */
+ #define _LIBGOMP_OMP_LOCK_DEFINED 1
+ typedef struct omp_lock_t omp_lock_t;
+ typedef struct omp_nest_lock_t omp_nest_lock_t;
+ #include "omp.h.in"
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -101,6 +109,25 @@ struct addr_pair
uintptr_t end;
};
+
+#ifdef _LIBGOMP_OMP_LOCK_DEFINED
+/* Only define when omp.h.in was included, as in plugin/ and in libgomp.h. */
+struct interop_obj_t
+{
+ void *stream;
+ void *device_data;
+ omp_interop_fr_t fr;
+ int device_num;
+};
+
+enum gomp_interop_flag
+{
+ gomp_interop_flag_init,
+ gomp_interop_flag_use,
+ gomp_interop_flag_destroy
+};
+#endif
+
/* This following symbol is used to name the target side variable struct that
holds the designated ICVs of the target device. The symbol needs to be
available to libgomp code and the offload plugin (which in the latter case
@@ -181,6 +208,23 @@ extern int GOMP_OFFLOAD_openacc_cuda_set_stream (struct goacc_asyncqueue *,
extern union goacc_property_value
GOMP_OFFLOAD_openacc_get_property (int, enum goacc_property);
+#ifdef _LIBGOMP_OMP_LOCK_DEFINED
+/* Only define when omp.h.in was included, as in plugin/ and in libgomp.h. */
+extern void GOMP_OFFLOAD_interop (struct interop_obj_t *, int,
+ enum gomp_interop_flag, bool, const char *);
+extern intptr_t GOMP_OFFLOAD_get_interop_int (struct interop_obj_t *,
+ omp_interop_property_t,
+ omp_interop_rc_t *);
+extern void *GOMP_OFFLOAD_get_interop_ptr (struct interop_obj_t *,
+ omp_interop_property_t,
+ omp_interop_rc_t *);
+extern const char *GOMP_OFFLOAD_get_interop_str (struct interop_obj_t *obj,
+ omp_interop_property_t,
+ omp_interop_rc_t *);
+extern const char *GOMP_OFFLOAD_get_interop_type_desc (struct interop_obj_t *,
+ omp_interop_property_t);
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h
index 44ad980..d97768f 100644
--- a/libgomp/libgomp.h
+++ b/libgomp/libgomp.h
@@ -43,7 +43,14 @@
#include "config.h"
#include <stdint.h>
+
+/* Include omp.h by parts. */
+#include "omp-lock.h"
+#define _LIBGOMP_OMP_LOCK_DEFINED 1
+#include "omp.h.in"
+
#include "libgomp-plugin.h"
+
#include "gomp-constants.h"
#ifdef HAVE_PTHREAD_H
@@ -1419,6 +1426,11 @@ struct gomp_device_descr
__typeof (GOMP_OFFLOAD_can_run) *can_run_func;
__typeof (GOMP_OFFLOAD_run) *run_func;
__typeof (GOMP_OFFLOAD_async_run) *async_run_func;
+ __typeof (GOMP_OFFLOAD_interop) *interop_func;
+ __typeof (GOMP_OFFLOAD_get_interop_int) *get_interop_int_func;
+ __typeof (GOMP_OFFLOAD_get_interop_ptr) *get_interop_ptr_func;
+ __typeof (GOMP_OFFLOAD_get_interop_str) *get_interop_str_func;
+ __typeof (GOMP_OFFLOAD_get_interop_type_desc) *get_interop_type_desc_func;
/* Splay tree containing information about mapped memory regions. */
struct splay_tree_s mem_map;
@@ -1501,11 +1513,6 @@ gomp_work_share_init_done (void)
/* Now that we're back to default visibility, include the globals. */
#include "libgomp_g.h"
-/* Include omp.h by parts. */
-#include "omp-lock.h"
-#define _LIBGOMP_OMP_LOCK_DEFINED 1
-#include "omp.h.in"
-
#if !defined (HAVE_ATTRIBUTE_VISIBILITY) \
|| !defined (HAVE_ATTRIBUTE_ALIAS) \
|| !defined (HAVE_AS_SYMVER_DIRECTIVE) \
diff --git a/libgomp/libgomp.map b/libgomp/libgomp.map
index 4530b3a..eae2f53 100644
--- a/libgomp/libgomp.map
+++ b/libgomp/libgomp.map
@@ -430,6 +430,7 @@ GOMP_5.1.2 {
GOMP_5.1.3 {
global:
+ GOMP_interop;
omp_get_num_interop_properties;
omp_get_interop_int;
omp_get_interop_ptr;
diff --git a/libgomp/libgomp_g.h b/libgomp/libgomp_g.h
index eed800b..8993ec6 100644
--- a/libgomp/libgomp_g.h
+++ b/libgomp/libgomp_g.h
@@ -358,6 +358,10 @@ extern void GOMP_target_enter_exit_data (int, size_t, void **, size_t *,
extern void GOMP_teams (unsigned int, unsigned int);
extern bool GOMP_teams4 (unsigned int, unsigned int, unsigned int, bool);
extern void *GOMP_target_map_indirect_ptr (void *);
+struct interop_obj_t;
+extern void GOMP_interop (int, int, struct interop_obj_t ***, const int *,
+ const char **, int, struct interop_obj_t **, int,
+ struct interop_obj_t ***, unsigned, void **);
/* teams.c */
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c
index 5c65778..4b42a59 100644
--- a/libgomp/plugin/plugin-gcn.c
+++ b/libgomp/plugin/plugin-gcn.c
@@ -41,7 +41,9 @@
#include <hsa_ext_amd.h>
#include <dlfcn.h>
#include <signal.h>
+#define _LIBGOMP_PLUGIN_INCLUDE 1
#include "libgomp-plugin.h"
+#undef _LIBGOMP_PLUGIN_INCLUDE
#include "config/gcn/libgomp-gcn.h" /* For struct output. */
#include "gomp-constants.h"
#include <elf.h>
@@ -190,6 +192,8 @@ struct hsa_runtime_fn_info
uint64_t (*hsa_queue_add_write_index_release_fn) (const hsa_queue_t *queue,
uint64_t value);
uint64_t (*hsa_queue_load_read_index_acquire_fn) (const hsa_queue_t *queue);
+ uint64_t (*hsa_queue_load_read_index_relaxed_fn) (const hsa_queue_t *queue);
+ uint64_t (*hsa_queue_load_write_index_relaxed_fn) (const hsa_queue_t *queue);
void (*hsa_signal_store_relaxed_fn) (hsa_signal_t signal,
hsa_signal_value_t value);
void (*hsa_signal_store_release_fn) (hsa_signal_t signal,
@@ -216,6 +220,25 @@ struct hsa_runtime_fn_info
const hsa_signal_t *dep_signals, hsa_signal_t completion_signal);
};
+/* As an HIP runtime is dlopened, following structure defines function
+ pointers utilized by the interop feature of this plugin.
+ Add suffient type declarations to get this work. */
+
+typedef int hipError_t; /* Actually an enum; 0 == success. */
+typedef void* hipCtx_t;
+struct hipStream_s;
+typedef struct hipStream_s* hipStream_t;
+
+struct hip_runtime_fn_info
+{
+ hipError_t (*hipStreamCreate_fn) (hipStream_t *);
+ hipError_t (*hipStreamDestroy_fn) (hipStream_t);
+ hipError_t (*hipStreamSynchronize_fn) (hipStream_t);
+ hipError_t (*hipCtxGetCurrent_fn) (hipCtx_t *ctx);
+ hipError_t (*hipSetDevice_fn) (int deviceId);
+ hipError_t (*hipGetDevice_fn) (int *deviceId);
+};
+
/* Structure describing the run-time and grid properties of an HSA kernel
lauch. This needs to match the format passed to GOMP_OFFLOAD_run. */
@@ -553,9 +576,11 @@ struct hsa_context_info
static struct hsa_context_info hsa_context;
/* HSA runtime functions that are initialized in init_hsa_context. */
-
static struct hsa_runtime_fn_info hsa_fns;
+/* HIP runtime functions that are initialized in init_hip_runtime_functions. */
+static struct hip_runtime_fn_info hip_fns;
+
/* Heap space, allocated target-side, provided for use of newlib malloc.
Each module should have it's own heap allocated.
Beware that heap usage increases with OpenMP teams. See also arenas. */
@@ -578,10 +603,11 @@ static bool debug;
static bool suppress_host_fallback;
-/* Flag to locate HSA runtime shared library that is dlopened
+/* Flag to locate HSA and HIP runtime shared libraries that are dlopened
by this plug-in. */
static const char *hsa_runtime_lib;
+static const char *hip_runtime_lib;
/* Flag to decide if the runtime should support also CPU devices (can be
a simulator). */
@@ -1068,6 +1094,10 @@ init_environment_variables (void)
if (hsa_runtime_lib == NULL)
hsa_runtime_lib = "libhsa-runtime64.so.1";
+ hip_runtime_lib = secure_getenv ("HIP_RUNTIME_LIB");
+ if (hip_runtime_lib == NULL)
+ hip_runtime_lib = "libamdhip64.so";
+
support_cpu_devices = secure_getenv ("GCN_SUPPORT_CPU_DEVICES");
const char *x = secure_getenv ("GCN_NUM_TEAMS");
@@ -1418,6 +1448,8 @@ init_hsa_runtime_functions (void)
DLSYM_FN (hsa_executable_iterate_symbols)
DLSYM_FN (hsa_queue_add_write_index_release)
DLSYM_FN (hsa_queue_load_read_index_acquire)
+ DLSYM_FN (hsa_queue_load_read_index_relaxed)
+ DLSYM_FN (hsa_queue_load_write_index_relaxed)
DLSYM_FN (hsa_signal_wait_acquire)
DLSYM_FN (hsa_signal_store_relaxed)
DLSYM_FN (hsa_signal_store_release)
@@ -4365,6 +4397,434 @@ unlock:
return retval;
}
+
+static bool
+init_hip_runtime_functions (void)
+{
+ bool inited = false;
+ if (inited)
+ return hip_fns.hipStreamCreate_fn != NULL;
+ inited = true;
+
+ void *handle = dlopen (hip_runtime_lib, RTLD_LAZY);
+ if (handle == NULL)
+ return false;
+
+#define DLSYM_OPT_FN(function) \
+ hip_fns.function##_fn = dlsym (handle, #function)
+
+ DLSYM_OPT_FN (hipStreamCreate);
+ DLSYM_OPT_FN (hipStreamDestroy);
+ DLSYM_OPT_FN (hipStreamSynchronize);
+ DLSYM_OPT_FN (hipCtxGetCurrent);
+ DLSYM_OPT_FN (hipGetDevice);
+ DLSYM_OPT_FN (hipSetDevice);
+#undef DLSYM_OPT_FN
+
+ if (!hip_fns.hipStreamCreate_fn
+ || !hip_fns.hipStreamDestroy_fn
+ || !hip_fns.hipStreamSynchronize_fn
+ || !hip_fns.hipCtxGetCurrent_fn
+ || !hip_fns.hipGetDevice_fn
+ || !hip_fns.hipSetDevice_fn)
+ {
+ hip_fns.hipStreamCreate_fn = NULL;
+ return false;
+ }
+
+ return true;
+}
+
+
+void
+GOMP_OFFLOAD_interop (struct interop_obj_t *obj, int ord,
+ enum gomp_interop_flag action, bool targetsync,
+ const char *prefer_type)
+{
+ if ((action == gomp_interop_flag_destroy || action == gomp_interop_flag_use)
+ && !obj->stream)
+ return;
+ if ((action == gomp_interop_flag_destroy || action == gomp_interop_flag_use)
+ && obj->fr == omp_ifr_hsa)
+ {
+ /* Wait until the queue is is empty. */
+ bool is_empty;
+ uint64_t read_index, write_index;
+ hsa_queue_t *queue = (hsa_queue_t *) obj->stream;
+ do
+ {
+ read_index = hsa_fns.hsa_queue_load_read_index_relaxed_fn (queue);
+ write_index = hsa_fns.hsa_queue_load_write_index_relaxed_fn (queue);
+ is_empty = (read_index == write_index);
+ }
+ while (!is_empty);
+
+ if (action == gomp_interop_flag_destroy)
+ {
+ hsa_status_t status = hsa_fns.hsa_queue_destroy_fn (queue);
+ if (status != HSA_STATUS_SUCCESS)
+ hsa_fatal ("Error destroying interop hsa_queue_t", status);
+ }
+ return;
+ }
+ if (action == gomp_interop_flag_destroy)
+ {
+ hipError_t err = hip_fns.hipStreamDestroy_fn ((hipStream_t) obj->stream);
+ if (err != 0)
+ GOMP_PLUGIN_fatal ("Error destroying interop hipStream_t: %d", err);
+ return;
+ }
+ if (action == gomp_interop_flag_use)
+ {
+ hipError_t err
+ = hip_fns.hipStreamSynchronize_fn ((hipStream_t) obj->stream);
+ if (err != 0)
+ GOMP_PLUGIN_fatal ("Error synchronizing interop hipStream_t: %d", err);
+ return;
+ }
+
+ bool fr_set = false;
+
+ /* Check for the preferred type; cf. parser in C/C++/Fortran or
+ dump_omp_init_prefer_type for the format.
+ Accept the first '{...}' block that specifies a 'fr' that we support.
+ Currently, no 'attr(...)' are supported. */
+ if (prefer_type)
+ while (prefer_type[0] == (char) GOMP_INTEROP_IFR_SEPARATOR)
+ {
+ /* '{' item block starts. */
+ prefer_type++;
+ /* 'fr(...)' block */
+ while (prefer_type[0] != (char) GOMP_INTEROP_IFR_SEPARATOR)
+ {
+ omp_interop_fr_t fr = (omp_interop_fr_t) prefer_type[0];
+ if (fr == omp_ifr_hip)
+ {
+ obj->fr = omp_ifr_hip;
+ fr_set = true;
+ }
+ if (fr == omp_ifr_hsa)
+ {
+ obj->fr = omp_ifr_hsa;
+ fr_set = true;
+ }
+ prefer_type++;
+ }
+ prefer_type++;
+ /* 'attr(...)' block */
+ while (prefer_type[0] != '\0')
+ {
+ /* const char *attr = prefer_type; */
+ prefer_type += strlen (prefer_type) + 1;
+ }
+ prefer_type++;
+ /* end of '}'. */
+ if (fr_set)
+ break;
+ }
+
+ /* Prefer HIP, use HSA as fallback. The warning is only printed if GCN_DEBUG
+ is set and does not distinguishes between on prefer_type or hip prefer_type
+ nor whether a later/lower preference also specifies 'hsa'.
+ The assumption is that the user code handles HSA gracefully, but likely
+ just by falling back to the host version. On the other hand, have_hip is
+ likely true if HSA is available. */
+ if (!fr_set || obj->fr == omp_ifr_hip)
+ {
+ bool have_hip = init_hip_runtime_functions ();
+ if (have_hip)
+ obj->fr = omp_ifr_hip;
+ else
+ {
+ GCN_WARNING ("interop object requested, using HSA instead of HIP "
+ "as %s could not be loaded", hip_runtime_lib);
+ obj->fr = omp_ifr_hsa;
+ }
+ }
+
+ _Static_assert (sizeof (uint64_t) == sizeof (hsa_agent_t),
+ "sizeof (uint64_t) == sizeof (hsa_agent_t)");
+ struct agent_info *agent = get_agent_info (ord);
+ obj->device_data = agent;
+
+ if (targetsync && obj->fr == omp_ifr_hsa)
+ {
+ hsa_status_t status;
+ /* Queue size must be (for GPUs) a power of 2 >= 40, i.e. at least 64 and
+ maximally HSA_AGENT_INFO_QUEUE_MAX_SIZE. Arbitrary choice: */
+ uint32_t queue_size = ASYNC_QUEUE_SIZE;
+ status = hsa_fns.hsa_queue_create_fn (agent->id, queue_size,
+ HSA_QUEUE_TYPE_MULTI,
+ NULL, NULL, UINT32_MAX, UINT32_MAX,
+ (hsa_queue_t **) &obj->stream);
+ if (status != HSA_STATUS_SUCCESS)
+ hsa_fatal ("Error creating interop hsa_queue_t", status);
+ }
+ else if (targetsync)
+ {
+ hipError_t err;
+ int dev_curr;
+ err = hip_fns.hipGetDevice_fn (&dev_curr);
+ if (!err && ord != dev_curr)
+ err = hip_fns.hipSetDevice_fn (ord);
+ if (!err)
+ err = hip_fns.hipStreamCreate_fn ((hipStream_t *) &obj->stream);
+ if (!err && ord != dev_curr)
+ err = hip_fns.hipSetDevice_fn (dev_curr);
+ if (err != 0)
+ GOMP_PLUGIN_fatal ("Error creating interop hipStream_t: %d", err);
+ }
+}
+
+intptr_t
+GOMP_OFFLOAD_get_interop_int (struct interop_obj_t *obj,
+ omp_interop_property_t property_id,
+ omp_interop_rc_t *ret_code)
+{
+ if (obj->fr != omp_ifr_hip && obj->fr != omp_ifr_hsa)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value; /* Hmm. */
+ return 0;
+ }
+ switch (property_id)
+ {
+ case omp_ipr_fr_id:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return obj->fr;
+ case omp_ipr_fr_name:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return 0;
+ case omp_ipr_vendor:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return 1; /* amd */
+ case omp_ipr_vendor_name:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return 0;
+ case omp_ipr_device_num:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return obj->device_num;
+ case omp_ipr_platform:
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return 0;
+ case omp_ipr_device:
+ if (obj->fr == omp_ifr_hsa)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return 0;
+ }
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return ((struct agent_info *) obj->device_data)->device_id;
+ case omp_ipr_device_context:
+ if (ret_code && obj->fr == omp_ifr_hsa)
+ *ret_code = omp_irc_no_value;
+ else if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return 0;
+ case omp_ipr_targetsync:
+ if (ret_code && !obj->stream)
+ *ret_code = omp_irc_no_value;
+ else if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return 0;
+ default:
+ break;
+ }
+ __builtin_unreachable ();
+ return 0;
+}
+
+void *
+GOMP_OFFLOAD_get_interop_ptr (struct interop_obj_t *obj,
+ omp_interop_property_t property_id,
+ omp_interop_rc_t *ret_code)
+{
+ if (obj->fr != omp_ifr_hip && obj->fr != omp_ifr_hsa)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value; /* Hmm. */
+ return 0;
+ }
+ switch (property_id)
+ {
+ case omp_ipr_fr_id:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_fr_name:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return NULL;
+ case omp_ipr_vendor:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return NULL;
+ case omp_ipr_vendor_name:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return NULL;
+ case omp_ipr_device_num:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_platform:
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return NULL;
+ case omp_ipr_device:
+ if (obj->fr == omp_ifr_hsa)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ /* hsa_agent_t is an struct containing a single uint64_t. */
+ return &((struct agent_info *) obj->device_data)->id;
+ }
+ else
+ {
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ }
+ case omp_ipr_device_context:
+ if (obj->fr == omp_ifr_hsa)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return NULL;
+ }
+ else
+ {
+ hipCtx_t ctx;
+ int dev_curr;
+ int dev = ((struct agent_info *) obj->device_data)->device_id;
+ hipError_t err;
+ err = hip_fns.hipGetDevice_fn (&dev_curr);
+ if (!err && dev != dev_curr)
+ err = hip_fns.hipSetDevice_fn (dev);
+ if (!err)
+ err = hip_fns.hipCtxGetCurrent_fn (&ctx);
+ if (!err && dev != dev_curr)
+ err = hip_fns.hipSetDevice_fn (dev_curr);
+ if (err)
+ GOMP_PLUGIN_fatal ("Error obtaining hipCtx_t for device %d: %d",
+ obj->device_num, err);
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return ctx;
+ }
+ case omp_ipr_targetsync:
+ if (!obj->stream)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return NULL;
+ }
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return obj->stream;
+ default:
+ break;
+ }
+ __builtin_unreachable ();
+ return NULL;
+}
+
+const char *
+GOMP_OFFLOAD_get_interop_str (struct interop_obj_t *obj,
+ omp_interop_property_t property_id,
+ omp_interop_rc_t *ret_code)
+{
+ if (obj->fr != omp_ifr_hip && obj->fr != omp_ifr_hsa)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value; /* Hmm. */
+ return 0;
+ }
+ switch (property_id)
+ {
+ case omp_ipr_fr_id:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_fr_name:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ if (obj->fr == omp_ifr_hip)
+ return "hip";
+ if (obj->fr == omp_ifr_hsa)
+ return "hsa";
+ case omp_ipr_vendor:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_vendor_name:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return "amd";
+ case omp_ipr_device_num:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_platform:
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return NULL;
+ case omp_ipr_device:
+ if (ret_code && obj->fr == omp_ifr_hsa)
+ *ret_code = omp_irc_type_ptr;
+ else if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_device_context:
+ if (ret_code && obj->fr == omp_ifr_hsa)
+ *ret_code = omp_irc_no_value;
+ else if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return NULL;
+ case omp_ipr_targetsync:
+ if (ret_code && !obj->stream)
+ *ret_code = omp_irc_no_value;
+ else if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return NULL;
+ default:
+ break;
+ }
+ __builtin_unreachable ();
+ return 0;
+}
+
+const char *
+GOMP_OFFLOAD_get_interop_type_desc (struct interop_obj_t *obj,
+ omp_interop_property_t property_id)
+{
+ _Static_assert (omp_ipr_targetsync == omp_ipr_first,
+ "omp_ipr_targetsync == omp_ipr_first");
+ _Static_assert (omp_ipr_platform - omp_ipr_first + 1 == 4,
+ "omp_ipr_platform - omp_ipr_first + 1 == 4");
+ static const char *desc_hip[] = {"N/A", /* platform */
+ "hipDevice_t", /* device */
+ "hipCtx_t", /* device_context */
+ "hipStream_t"}; /* targetsync */
+ static const char *desc_hsa[] = {"N/A", /* platform */
+ "hsa_agent_t *", /* device */
+ "N/A", /* device_context */
+ "hsa_queue_t *"}; /* targetsync */
+ if (obj->fr == omp_ifr_hip)
+ return desc_hip[omp_ipr_platform - property_id];
+ else
+ return desc_hsa[omp_ipr_platform - property_id];
+ return NULL;
+}
+
/* }}} */
/* {{{ OpenMP Plugin API */
diff --git a/libgomp/plugin/plugin-nvptx.c b/libgomp/plugin/plugin-nvptx.c
index c47461e..822c6a4 100644
--- a/libgomp/plugin/plugin-nvptx.c
+++ b/libgomp/plugin/plugin-nvptx.c
@@ -35,7 +35,9 @@
#include "openacc.h"
#include "config.h"
#include "symcat.h"
+#define _LIBGOMP_PLUGIN_INCLUDE 1
#include "libgomp-plugin.h"
+#undef _LIBGOMP_PLUGIN_INCLUDE
#include "oacc-plugin.h"
#include "gomp-constants.h"
#include "oacc-int.h"
@@ -2425,6 +2427,306 @@ nvptx_stacks_acquire (struct ptx_device *ptx_dev, size_t size, int num)
return (void *) ptx_dev->omp_stacks.ptr;
}
+void
+GOMP_OFFLOAD_interop (struct interop_obj_t *obj, int ord,
+ enum gomp_interop_flag action, bool targetsync,
+ const char *prefer_type)
+{
+ obj->fr = omp_ifr_cuda;
+
+ if (action == gomp_interop_flag_destroy)
+ {
+ if (obj->stream)
+ CUDA_CALL_ASSERT (cuStreamDestroy, obj->stream);
+ return;
+ }
+ if (action == gomp_interop_flag_use)
+ {
+ if (obj->stream)
+ CUDA_CALL_ASSERT (cuStreamSynchronize, obj->stream);
+ return;
+ }
+
+ /* Check for the preferred type; cf. parser in C/C++/Fortran or
+ dump_omp_init_prefer_type for the format.
+ Accept the first '{...}' block that specifies a 'fr' that we support.
+ Currently, no 'attr(...)' are supported. */
+ if (prefer_type)
+ while (prefer_type[0] == (char) GOMP_INTEROP_IFR_SEPARATOR)
+ {
+ bool found = false;
+ /* '{' item block starts. */
+ prefer_type++;
+ /* 'fr(...)' block */
+ while (prefer_type[0] != (char) GOMP_INTEROP_IFR_SEPARATOR)
+ {
+ omp_interop_fr_t fr = (omp_interop_fr_t) prefer_type[0];
+ if (fr == omp_ifr_cuda
+ || fr == omp_ifr_cuda_driver
+ || fr == omp_ifr_hip)
+ {
+ obj->fr = fr;
+ found = true;
+ }
+ prefer_type++;
+ }
+ prefer_type++;
+ /* 'attr(...)' block */
+ while (prefer_type[0] != '\0')
+ {
+ /* const char *attr = prefer_type; */
+ prefer_type += strlen (prefer_type) + 1;
+ }
+ prefer_type++;
+ /* end of '}'. */
+ if (found)
+ break;
+ }
+
+ obj->device_data = ptx_devices[ord];
+
+ if (targetsync)
+ {
+ CUstream stream = NULL;
+ CUDA_CALL_ASSERT (cuStreamCreate, &stream, CU_STREAM_DEFAULT);
+ obj->stream = stream;
+ }
+}
+
+
+intptr_t
+GOMP_OFFLOAD_get_interop_int (struct interop_obj_t *obj,
+ omp_interop_property_t property_id,
+ omp_interop_rc_t *ret_code)
+{
+ if (obj->fr != omp_ifr_cuda
+ && obj->fr != omp_ifr_cuda_driver
+ && obj->fr != omp_ifr_hip)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value; /* Hmm. */
+ return 0;
+ }
+ switch (property_id)
+ {
+ case omp_ipr_fr_id:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return obj->fr;
+ case omp_ipr_fr_name:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return 0;
+ case omp_ipr_vendor:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return 11; /* nvidia */
+ case omp_ipr_vendor_name:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return 0;
+ case omp_ipr_device_num:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return obj->device_num;
+ case omp_ipr_platform:
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return 0;
+ case omp_ipr_device:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return ((struct ptx_device *) obj->device_data)->dev;
+ case omp_ipr_device_context:
+ if (ret_code && obj->fr == omp_ifr_cuda)
+ *ret_code = omp_irc_no_value;
+ else if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return 0;
+ case omp_ipr_targetsync:
+ if (!obj->stream)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return 0;
+ }
+ /* ptr fits into (u)intptr_t */
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return (uintptr_t) obj->stream;
+ default:
+ break;
+ }
+ __builtin_unreachable ();
+ return 0;
+}
+
+void *
+GOMP_OFFLOAD_get_interop_ptr (struct interop_obj_t *obj,
+ omp_interop_property_t property_id,
+ omp_interop_rc_t *ret_code)
+{
+ if (obj->fr != omp_ifr_cuda
+ && obj->fr != omp_ifr_cuda_driver
+ && obj->fr != omp_ifr_hip)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value; /* Hmm. */
+ return 0;
+ }
+ switch (property_id)
+ {
+ case omp_ipr_fr_id:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_fr_name:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return NULL;
+ case omp_ipr_vendor:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_vendor_name:
+ if (ret_code)
+ *ret_code = omp_irc_type_str;
+ return NULL;
+ case omp_ipr_device_num:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_platform:
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return NULL;
+ case omp_ipr_device:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_device_context:
+ if (obj->fr == omp_ifr_cuda)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return NULL;
+ }
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return ((struct ptx_device *) obj->device_data)->ctx;
+ case omp_ipr_targetsync:
+ if (!obj->stream)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return NULL;
+ }
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return obj->stream;
+ default:
+ break;
+ }
+ __builtin_unreachable ();
+ return NULL;
+}
+
+const char *
+GOMP_OFFLOAD_get_interop_str (struct interop_obj_t *obj,
+ omp_interop_property_t property_id,
+ omp_interop_rc_t *ret_code)
+{
+ if (obj->fr != omp_ifr_cuda
+ && obj->fr != omp_ifr_cuda_driver
+ && obj->fr != omp_ifr_hip)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_no_value; /* Hmm. */
+ return 0;
+ }
+ switch (property_id)
+ {
+ case omp_ipr_fr_id:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_fr_name:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ if (obj->fr == omp_ifr_cuda)
+ return "cuda";
+ if (obj->fr == omp_ifr_cuda_driver)
+ return "cuda_driver";
+ if (obj->fr == omp_ifr_hip)
+ return "hip";
+ break;
+ case omp_ipr_vendor:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_vendor_name:
+ if (ret_code)
+ *ret_code = omp_irc_success;
+ return "nvidia";
+ case omp_ipr_device_num:
+ if (ret_code)
+ *ret_code = omp_irc_type_int;
+ return NULL;
+ case omp_ipr_platform:
+ if (ret_code)
+ *ret_code = omp_irc_no_value;
+ return NULL;
+ case omp_ipr_device:
+ if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return NULL;
+ case omp_ipr_device_context:
+ if (ret_code && obj->fr == omp_ifr_cuda)
+ *ret_code = omp_irc_no_value;
+ else if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return NULL;
+ case omp_ipr_targetsync:
+ if (ret_code && !obj->stream)
+ *ret_code = omp_irc_no_value;
+ else if (ret_code)
+ *ret_code = omp_irc_type_ptr;
+ return NULL;
+ default:
+ break;
+ }
+ __builtin_unreachable ();
+ return NULL;
+}
+
+const char *
+GOMP_OFFLOAD_get_interop_type_desc (struct interop_obj_t *obj,
+ omp_interop_property_t property_id)
+{
+ _Static_assert (omp_ipr_targetsync == omp_ipr_first,
+ "omp_ipr_targetsync == omp_ipr_first");
+ _Static_assert (omp_ipr_platform - omp_ipr_first + 1 == 4,
+ "omp_ipr_platform - omp_ipr_first + 1 == 4");
+ static const char *desc_cuda[] = {"N/A", /* platform */
+ "int", /* device */
+ "N/A", /* device_context */
+ "cudaStream_t"}; /* targetsync */
+ static const char *desc_cuda_driver[] = {"N/A", /* platform */
+ "CUdevice", /* device */
+ "CUcontext", /* device_context */
+ "CUstream"}; /* targetsync */
+ static const char *desc_hip[] = {"N/A", /* platform */
+ "hipDevice_t", /* device */
+ "hipCtx_t", /* device_context */
+ "hipStream_t"}; /* targetsync */
+ if (obj->fr == omp_ifr_cuda)
+ return desc_cuda[omp_ipr_platform - property_id];
+ if (obj->fr == omp_ifr_cuda_driver)
+ return desc_cuda_driver[omp_ipr_platform - property_id];
+ else
+ return desc_hip[omp_ipr_platform - property_id];
+ return NULL;
+}
void
GOMP_OFFLOAD_run (int ord, void *tgt_fn, void *tgt_vars, void **args)
diff --git a/libgomp/target.c b/libgomp/target.c
index dbc4535..36ed797 100644
--- a/libgomp/target.c
+++ b/libgomp/target.c
@@ -146,7 +146,8 @@ resolve_device (int device_id, bool remapped)
called, which must be done before using default_device_var. */
int num_devices = gomp_get_num_devices ();
- if (remapped && device_id == GOMP_DEVICE_ICV)
+ if ((remapped && device_id == GOMP_DEVICE_ICV)
+ || device_id == GOMP_DEVICE_DEFAULT_OMP_61)
{
struct gomp_task_icv *icv = gomp_icv (false);
device_id = icv->default_device_var;
@@ -5136,45 +5137,78 @@ omp_get_num_interop_properties (const omp_interop_t interop
}
omp_intptr_t
-omp_get_interop_int (const omp_interop_t interop __attribute__ ((unused)),
+omp_get_interop_int (const omp_interop_t interop,
omp_interop_property_t property_id,
omp_interop_rc_t *ret_code)
{
- if (ret_code == NULL)
- return 0;
+ struct interop_obj_t *obj = (struct interop_obj_t *) interop;
+ struct gomp_device_descr *devicep;
+
if (property_id < omp_ipr_first || property_id >= 0)
- *ret_code = omp_irc_out_of_range;
- else
- *ret_code = omp_irc_empty; /* Assume omp_interop_none. */
- return 0;
+ {
+ if (ret_code)
+ *ret_code = omp_irc_out_of_range;
+ return 0;
+ }
+ if (obj == NULL
+ || (devicep = resolve_device (obj->device_num, false)) == NULL
+ || devicep->get_interop_int_func == NULL)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_empty; /* Assume omp_interop_none. */
+ return 0;
+ }
+ return devicep->get_interop_int_func (obj, property_id, ret_code);
}
void *
-omp_get_interop_ptr (const omp_interop_t interop __attribute__ ((unused)),
+omp_get_interop_ptr (const omp_interop_t interop,
omp_interop_property_t property_id,
omp_interop_rc_t *ret_code)
{
- if (ret_code == NULL)
- return NULL;
+ struct interop_obj_t *obj = (struct interop_obj_t *) interop;
+ struct gomp_device_descr *devicep;
+
if (property_id < omp_ipr_first || property_id >= 0)
- *ret_code = omp_irc_out_of_range;
- else
- *ret_code = omp_irc_empty; /* Assume omp_interop_none. */
- return NULL;
+ {
+ if (ret_code)
+ *ret_code = omp_irc_out_of_range;
+ return 0;
+ }
+ if (obj == NULL
+ || (devicep = resolve_device (obj->device_num, false)) == NULL
+ || devicep->get_interop_int_func == NULL)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_empty; /* Assume omp_interop_none. */
+ return 0;
+ }
+ return devicep->get_interop_ptr_func (obj, property_id, ret_code);
}
const char *
-omp_get_interop_str (const omp_interop_t interop __attribute__ ((unused)),
+omp_get_interop_str (const omp_interop_t interop,
omp_interop_property_t property_id,
omp_interop_rc_t *ret_code)
{
- if (ret_code == NULL)
- return NULL;
+ struct interop_obj_t *obj = (struct interop_obj_t *) interop;
+ struct gomp_device_descr *devicep;
+
if (property_id < omp_ipr_first || property_id >= 0)
- *ret_code = omp_irc_out_of_range;
- else
- *ret_code = omp_irc_empty; /* Assume omp_interop_none. */
- return NULL;
+ {
+ if (ret_code)
+ *ret_code = omp_irc_out_of_range;
+ return 0;
+ }
+ if (obj == NULL
+ || (devicep = resolve_device (obj->device_num, false)) == NULL
+ || devicep->get_interop_int_func == NULL)
+ {
+ if (ret_code)
+ *ret_code = omp_irc_empty; /* Assume omp_interop_none. */
+ return 0;
+ }
+ return devicep->get_interop_str_func (obj, property_id, ret_code);
}
const char *
@@ -5194,18 +5228,24 @@ omp_get_interop_type_desc (const omp_interop_t interop,
omp_interop_property_t property_id)
{
static const char *desc[omp_ipr_fr_id - omp_ipr_device_num + 1]
- = {"omp_interop_t", /* fr_id */
- "const char*", /* fr_name */
+ = {"omp_interop_t", /* fr_id */
+ "const char *", /* fr_name */
"int", /* vendor */
"const char *", /* vendor_name */
"int"}; /* device_num */
+
+ struct interop_obj_t *obj = (struct interop_obj_t *) interop;
+ struct gomp_device_descr *devicep;
+
if (property_id > omp_ipr_fr_id || property_id < omp_ipr_first)
return NULL;
- if (interop == omp_interop_none)
+ if (obj == NULL
+ || (devicep = resolve_device (obj->device_num, false)) == NULL
+ || devicep->get_interop_int_func == NULL)
return NULL;
if (property_id >= omp_ipr_device_num)
return desc[omp_ipr_fr_id - property_id];
- return NULL; /* FIXME: Call plugin. */
+ return devicep->get_interop_type_desc_func (obj, property_id);
}
const char *
@@ -5236,6 +5276,119 @@ ialias (omp_get_interop_name)
ialias (omp_get_interop_type_desc)
ialias (omp_get_interop_rc_desc)
+struct interop_data_t
+{
+ int device_num, n_init, n_use, n_destroy;
+ struct interop_obj_t ***init;
+ struct interop_obj_t **use;
+ struct interop_obj_t ***destroy;
+ const int *target_targetsync;
+ const char **prefer_type;
+};
+
+static void
+gomp_interop_internal (void *data)
+{
+ struct interop_data_t *args = (struct interop_data_t *) data;
+ struct gomp_device_descr *devicep;
+
+ /* Destroy objects to free resources. */
+ for (int i = 0; i < args->n_destroy; i++)
+ {
+ struct interop_obj_t **obj = args->destroy[i];
+ if (*obj == NULL /* omp_interop_none */)
+ continue;
+ devicep = resolve_device ((*obj)->device_num, false);
+ if (devicep != NULL && devicep->interop_func)
+ devicep->interop_func (*obj, devicep->target_id,
+ gomp_interop_flag_destroy, false, NULL);
+ free (*obj);
+ *obj = NULL;
+ }
+
+ /* Init streams next to give 'use' more time for completion. */
+ if (args->n_init)
+ {
+ devicep = resolve_device (args->device_num, false);
+ for (int i = 0; i < args->n_init; i++)
+ {
+ struct interop_obj_t **obj = args->init[i];
+ bool targetsync
+ = (args->target_targetsync[i] & GOMP_INTEROP_TARGETSYNC);
+ const char *prefer_type
+ = (args->prefer_type ? args->prefer_type[i] : NULL);
+ if (devicep == NULL || !devicep->interop_func)
+ {
+ *obj = NULL;
+ continue;
+ }
+ *obj =
+ (struct interop_obj_t *) calloc (1, sizeof (struct interop_obj_t));
+ devicep->interop_func (*obj, devicep->target_id,
+ gomp_interop_flag_init, targetsync,
+ prefer_type);
+ }
+ }
+
+ for (int i = 0; i < args->n_use; i++)
+ {
+ struct interop_obj_t *obj = args->use[i];
+ if (obj == NULL)
+ continue;
+ devicep = resolve_device (obj->device_num, false);
+ if (devicep != NULL && devicep->interop_func)
+ devicep->interop_func (obj, devicep->target_id,
+ gomp_interop_flag_use, false, NULL);
+ }
+}
+
+/* Process the OpenMP interop directive. 'init' and 'destroy' take an array
+ of 'omp_interop_t *', 'use' an array of 'omp_interop_t', where
+ 'omp_interop_t' is internally 'struct interop_obj_t *';
+ 'flags' is used for the 'nowait' clause. */
+
+void
+GOMP_interop (int device_num, int n_init, struct interop_obj_t ***init,
+ const int *target_targetsync, const char **prefer_type, int n_use,
+ struct interop_obj_t **use, int n_destroy,
+ struct interop_obj_t ***destroy, unsigned int flags,
+ void **depend)
+{
+ struct interop_data_t args;
+ args.device_num = device_num;
+ args.n_init = n_init;
+ args.n_use = n_use;
+ args.n_destroy = n_destroy;
+ args.init = init;
+ args.target_targetsync = target_targetsync;
+ args.prefer_type = prefer_type;
+ args.use = use;
+ args.destroy = destroy;
+
+ /* No need to create a task for 'init' as that should be fast. */
+ bool use_task = false;
+ if (flags & GOMP_INTEROP_FLAG_NOWAIT)
+ {
+ for (int i = 0; i < n_use && !use_task; i++)
+ if (args.use[i])
+ use_task |= args.use[i]->stream != NULL;
+ for (int i = 0; i < n_destroy && !use_task; i++)
+ if (*args.destroy[i])
+ use_task |= (*args.destroy[i])->stream != NULL;
+ }
+
+ if (use_task)
+ GOMP_task (gomp_interop_internal, &args, NULL, sizeof (args),
+ __alignof__ (args), true, depend ? GOMP_TASK_FLAG_DEPEND : 0,
+ depend, 0, NULL);
+ else
+ {
+ gomp_interop_internal (&args);
+ if (depend)
+ GOMP_taskwait_depend (depend);
+ }
+}
+
static const char *
gomp_get_uid_for_device (struct gomp_device_descr *devicep, int device_num)
{
@@ -5344,6 +5497,14 @@ gomp_load_plugin_for_device (struct gomp_device_descr *device,
DLSYM (host2dev);
DLSYM_OPT (memcpy2d, memcpy2d);
DLSYM_OPT (memcpy3d, memcpy3d);
+ if (DLSYM_OPT (interop, interop))
+ {
+ DLSYM (get_interop_int);
+ DLSYM (get_interop_ptr);
+ DLSYM (get_interop_str);
+ DLSYM (get_interop_type_desc);
+ }
+
device->capabilities = device->get_caps_func ();
if (device->capabilities & GOMP_OFFLOAD_CAP_OPENMP_400)
{
diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp
index fd21371..bc38e3c 100644
--- a/libgomp/testsuite/lib/libgomp.exp
+++ b/libgomp/testsuite/lib/libgomp.exp
@@ -233,11 +233,8 @@ proc libgomp_init { args } {
# error-message parsing machinery.
lappend ALWAYS_CFLAGS "additional_flags=-fmessage-length=0"
- # Disable caret
- lappend ALWAYS_CFLAGS "additional_flags=-fno-diagnostics-show-caret"
-
- # Disable color diagnostics
- lappend ALWAYS_CFLAGS "additional_flags=-fdiagnostics-color=never"
+ # Disable caret, color, URL diagnostics
+ lappend ALWAYS_CFLAGS "additional_flags=-fdiagnostics-plain-output"
# Help GCC to find offload compilers' 'mkoffload'.
global offload_additional_options
diff --git a/libgomp/testsuite/libgomp.c++/pr101544-1-O0.C b/libgomp/testsuite/libgomp.c++/pr101544-1-O0.C
new file mode 100644
index 0000000..19a8cad
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/pr101544-1-O0.C
@@ -0,0 +1,4 @@
+// { dg-additional-options -foffload-options=-lstdc++ }
+// { dg-additional-options -O0 }
+
+#include "pr101544-1.C"
diff --git a/libgomp/testsuite/libgomp.c++/pr101544-1.C b/libgomp/testsuite/libgomp.c++/pr101544-1.C
new file mode 100644
index 0000000..8ea70a2
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/pr101544-1.C
@@ -0,0 +1,83 @@
+// { dg-additional-options -foffload-options=-lstdc++ }
+// See also '../libgomp.oacc-c++/pr101544-1.C'.
+#ifndef ALWAYS_INLINE
+# define ALWAYS_INLINE
+#endif
+
+//===--- declare_target_base_class.cpp --------------------------------------===//
+//
+// OpenMP API Version 4.5 Nov 2015
+//
+// This test was suggested by members of NERSC. This test defines a declare
+// target region which includes only a base class and a 'concrete' device
+// pointer.
+//
+// Test suggestion comes from Chris Daily and Rahulkumar Gayatri from NERSC
+////===----------------------------------------------------------------------===//
+
+#include <new>
+#include <vector>
+#include <iostream>
+
+#pragma omp declare target
+//#pragma acc routine //TODO error: '#pragma acc routine' not immediately followed by function declaration or definition
+class S {
+public:
+ //#pragma acc routine //TODO error: '#pragma acc routine' must be at file scope
+ ALWAYS_INLINE
+ S() : _devPtr(nullptr) {}
+ //#pragma acc routine //TODO error: '#pragma acc routine' must be at file scope
+ ALWAYS_INLINE
+ double sag(double x, double y) {
+ return x + y;
+ }
+ S* cloneToDevice() {
+ S* ptr;
+#pragma omp target map(ptr)
+#pragma acc serial copy(ptr)
+ {
+ ptr = new S();
+ }
+ _devPtr = ptr;
+ return ptr;
+ }
+private:
+ S* _devPtr;
+};
+//#pragma acc routine (S) //TODO error: 'class S' does not refer to a function
+//#pragma acc routine (S::S) //TODO error: '#pragma acc routine' names a set of overloads
+//#pragma acc routine (S::sag) //TODO error: '#pragma acc routine' names a set of overloads
+#pragma omp end declare target
+
+int main() {
+ int errors = 0;
+
+ S s;
+ S* devPtr = s.cloneToDevice();
+
+ std::vector<double> in(10, 0.0);
+ for(int i = 0; i < 10; i++) {
+ in[i] = i;
+ }
+
+ std::vector<double> out(10, 0.0);
+
+ double* inptr = in.data();
+ double* outptr = out.data();
+
+#pragma omp target teams distribute parallel for map(inptr[:10], outptr[:10]) is_device_ptr(devPtr)
+#pragma acc parallel loop copy(inptr[:10], outptr[:10]) deviceptr(devPtr)
+ for(int i = 0; i < 10; i++) {
+ outptr[i] = devPtr->sag(inptr[i], inptr[i]);
+ }
+
+ for(int i = 0; i < 10; i++) {
+ if (out[i] != i * 2)
+ {
+ ++errors;
+ std::cerr << "ERROR: " << "i = " << i << ": " << out[i] << " != " << (i * 2) << "\n";
+ }
+ }
+
+ return errors ? 1 : 0;
+}
diff --git a/libgomp/testsuite/libgomp.c++/pr96835-1-O0.C b/libgomp/testsuite/libgomp.c++/pr96835-1-O0.C
new file mode 100644
index 0000000..85e4290
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/pr96835-1-O0.C
@@ -0,0 +1,3 @@
+// { dg-additional-options -O0 }
+
+#include "pr96835-1.C"
diff --git a/libgomp/testsuite/libgomp.c++/pr96835-1.C b/libgomp/testsuite/libgomp.c++/pr96835-1.C
new file mode 100644
index 0000000..c9f6475
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/pr96835-1.C
@@ -0,0 +1,45 @@
+// See also '../libgomp.oacc-c++/pr96835-1.C'.
+#ifndef ALWAYS_INLINE
+# define ALWAYS_INLINE
+#endif
+
+#pragma omp declare target
+
+template<int sz>
+struct vector {
+ int values_[sz];
+ vector();
+ ALWAYS_INLINE
+ vector(int const& init_val);
+ ALWAYS_INLINE
+ int dot(vector o) {
+ int res = 0;
+ for (int i = 0; i < sz; ++ i)
+ res += values_[i] * o.values_[i];
+ return res;
+ }
+};
+
+template<int sz>
+vector<sz>::vector(int const& init_val) {
+ for (int i = 0; i < sz; ++ i) values_[i] = init_val;
+}
+template<int sz>
+vector<sz>::vector() : vector(0) {
+}
+
+#pragma omp end declare target
+
+int main() {
+ int res = 0;
+ #pragma omp target map(from:res)
+ #pragma acc serial copyout(res)
+ {
+ vector<4> v1(1);
+ vector<4> v2(2);
+ res = v1.dot(v2);
+ }
+ if (res != 8)
+ __builtin_abort();
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c-c++-common/get-mapped-ptr-1.c b/libgomp/testsuite/libgomp.c-c++-common/get-mapped-ptr-1.c
index 4708ae8..90d1a72 100644
--- a/libgomp/testsuite/libgomp.c-c++-common/get-mapped-ptr-1.c
+++ b/libgomp/testsuite/libgomp.c-c++-common/get-mapped-ptr-1.c
@@ -21,7 +21,7 @@ main ()
if (omp_target_associate_ptr (q, p, sizeof (int), 0, d) != 0)
return 0;
- if (omp_get_mapped_ptr (q, -5) != NULL)
+ if (omp_get_mapped_ptr (q, -6) != NULL)
abort ();
if (omp_get_mapped_ptr (q, omp_get_num_devices () + 1) != NULL)
diff --git a/libgomp/testsuite/libgomp.c-c++-common/interop-1.c b/libgomp/testsuite/libgomp.c-c++-common/interop-1.c
new file mode 100644
index 0000000..149f387
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c-c++-common/interop-1.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+
+#include <omp.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ int dev = omp_get_num_devices ();
+ int x[6];
+ omp_interop_t obj1 = omp_interop_none;
+#pragma omp interop init(targetsync : obj1) depend(in : x) device(dev)
+ if (obj1 != omp_interop_none)
+ abort ();
+
+#pragma omp interop use(obj1)
+#pragma omp interop destroy(obj1) depend(out : x)
+ if (obj1 != omp_interop_none)
+ abort ();
+
+ omp_set_default_device (dev);
+ omp_interop_t obj2;
+
+#pragma omp interop init( \
+ target, targetsync, \
+ prefer_type({fr("hip"), attr("ompx_gnu_prio:1", "ompx_gnu_debug")}, \
+ {attr("ompx_gnu_nicest"), attr("ompx_something")}) : obj1, \
+ obj2) nowait
+ if (obj1 != omp_interop_none || obj2 != omp_interop_none)
+ abort ();
+#pragma omp interop use(obj1, obj2) nowait
+
+ omp_interop_t obj3 = __omp_interop_t_max__;
+
+#pragma omp interop init(target : obj3) use(obj2) destroy(obj1) nowait
+ if (obj1 != omp_interop_none || obj3 != omp_interop_none)
+ abort ();
+#pragma omp interop destroy(obj3, obj2) nowait
+ if (obj2 != omp_interop_none || obj3 != omp_interop_none)
+ abort ();
+
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/interop-fr-1.c b/libgomp/testsuite/libgomp.c/interop-fr-1.c
new file mode 100644
index 0000000..9310c95
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/interop-fr-1.c
@@ -0,0 +1,577 @@
+/* { dg-do run } */
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <omp.h>
+#include "../libgomp.c-c++-common/on_device_arch.h"
+
+#define DEFAULT_DEVICE -99
+
+/* The following assumes that when a nvptx device is available,
+ cuda/cuda_driver/hip are supported.
+ And that likewise when a gcn device is available that the
+ plugin also can not only the HSA but also the HIP library
+ such that hsa/hip are supported.
+ For the host, omp_interop_none is expected.
+
+ Otherwise, it only does some basic tests without checking
+ that the returned result really makes sense. */
+
+void check_host (int);
+void check_nvptx (int);
+void check_gcn (int);
+
+void check_type (omp_interop_t obj)
+{
+ const char *type;
+
+ type = omp_get_interop_type_desc (obj, omp_ipr_fr_id);
+ if (obj != omp_interop_none)
+ assert (strcmp (type, "omp_interop_t") == 0);
+ else
+ assert (type == NULL);
+
+ type = omp_get_interop_type_desc (obj, omp_ipr_fr_name);
+ if (obj != omp_interop_none)
+ assert (strcmp (type, "const char *") == 0);
+ else
+ assert (type == NULL);
+
+ type = omp_get_interop_type_desc (obj, omp_ipr_vendor);
+ if (obj != omp_interop_none)
+ assert (strcmp (type, "int") == 0);
+ else
+ assert (type == NULL);
+
+ type = omp_get_interop_type_desc (obj, omp_ipr_vendor_name);
+ if (obj != omp_interop_none)
+ assert (strcmp (type, "const char *") == 0);
+ else
+ assert (type == NULL);
+
+ type = omp_get_interop_type_desc (obj, omp_ipr_device_num);
+ if (obj != omp_interop_none)
+ assert (strcmp (type, "int") == 0);
+ else
+ assert (type == NULL);
+
+ if (obj != omp_interop_none)
+ return;
+ assert (omp_get_interop_type_desc (obj, omp_ipr_platform) == NULL);
+ assert (omp_get_interop_type_desc (obj, omp_ipr_device) == NULL);
+ assert (omp_get_interop_type_desc (obj, omp_ipr_device_context) == NULL);
+ assert (omp_get_interop_type_desc (obj, omp_ipr_targetsync) == NULL);
+}
+
+void
+do_check (int dev)
+{
+ int num_dev = omp_get_num_devices ();
+ const char *dev_type;
+ if (dev != DEFAULT_DEVICE)
+ omp_set_default_device (dev);
+ int is_nvptx = on_device_arch_nvptx ();
+ int is_gcn = on_device_arch_gcn ();
+ int is_host;
+
+ if (dev != DEFAULT_DEVICE)
+ is_host = dev == -1 || dev == num_dev;
+ else
+ {
+ int def_dev = omp_get_default_device ();
+ is_host = def_dev == -1 || def_dev == num_dev;
+ }
+
+ assert (is_nvptx + is_gcn + is_host == 1);
+
+ if (num_dev > 0 && dev != DEFAULT_DEVICE)
+ {
+ if (is_host)
+ omp_set_default_device (0);
+ else
+ omp_set_default_device (-1);
+ }
+
+ if (is_host)
+ dev_type = "host";
+ else if (is_nvptx)
+ dev_type = "nvptx";
+ else if (is_gcn)
+ dev_type = "gcn";
+
+ printf ("Running on the %s device (%d)\n", dev_type, dev);
+ if (is_host)
+ check_host (dev);
+ else if (is_nvptx)
+ check_nvptx (dev);
+ else if (is_gcn)
+ check_gcn (dev);
+}
+
+
+void
+check_host (int dev)
+{
+ omp_interop_t obj = (omp_interop_t) -1L;
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target : obj)
+ } else {
+ #pragma omp interop init(target : obj) device(dev)
+ }
+ assert (obj == omp_interop_none);
+ check_type (obj);
+
+ obj = (omp_interop_t) -1L;
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target, prefer_type({attr("ompx_foo")}, {attr("ompx_bar"), fr("cuda"), attr("ompx_foobar")},{fr("cuda_driver")}, {fr("hip")}, {fr("hsa")}) : obj)
+ } else {
+ #pragma omp interop init(target, prefer_type({attr("ompx_foo")}, {attr("ompx_bar"), fr("cuda"), attr("ompx_foobar")},{fr("cuda_driver")}, {fr("hip")}, {fr("hsa")}) : obj) device(dev)
+ }
+ assert (obj == omp_interop_none);
+ check_type (obj);
+
+ obj = (omp_interop_t) -1L;
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync : obj)
+ } else {
+ #pragma omp interop init(targetsync : obj) device(dev)
+ }
+ assert (obj == omp_interop_none);
+ check_type (obj);
+
+ obj = (omp_interop_t) -1L;
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync, prefer_type("cuda","cuda_driver", "hip", "hsa") : obj)
+ } else {
+ #pragma omp interop init(targetsync, prefer_type("cuda","cuda_driver", "hip", "hsa") : obj) device(dev)
+ }
+ assert (obj == omp_interop_none);
+ check_type (obj);
+}
+
+
+void
+check_nvptx (int dev)
+{
+ for (int variant = 0; variant <= 7; variant++)
+ {
+ omp_interop_t obj = (omp_interop_t) -1L;
+ switch (variant)
+ {
+ /* Expect 'cuda'. */
+ case 0:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target : obj)
+ } else {
+ #pragma omp interop init(target : obj) device(dev)
+ }
+ break;
+ }
+ case 1:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync : obj)
+ } else {
+ #pragma omp interop init(targetsync : obj) device(dev)
+ }
+ break;
+ }
+ case 2:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target, prefer_type({attr("ompx_foo")}, {fr("hsa")}, {attr("ompx_bar"), fr("cuda"), attr("ompx_foobar")},{fr("cuda_driver")}, {fr("hip")}) : obj)
+ } else {
+ #pragma omp interop init(target, prefer_type({attr("ompx_foo")}, {fr("hsa")}, {attr("ompx_bar"), fr("cuda"), attr("ompx_foobar")},{fr("cuda_driver")}, {fr("hip")}) : obj) device(dev)
+ }
+ break;
+ }
+ case 3:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync, prefer_type("hsa", "cuda", "cuda_driver", "hip") : obj)
+ } else {
+ #pragma omp interop init(targetsync, prefer_type("hsa", "cuda", "cuda_driver", "hip") : obj) device(dev)
+ }
+ break;
+ }
+
+ /* Expect 'cuda_driver'. */
+ case 4:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target, prefer_type("hsa", "cuda_driver", "hip", "cuda") : obj)
+ } else {
+ #pragma omp interop init(target, prefer_type("hsa", "cuda_driver", "hip", "cuda") : obj) device(dev)
+ }
+ break;
+ }
+ case 5:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync, prefer_type("hsa", "cuda_driver", "hip", "cuda") : obj)
+ } else {
+ #pragma omp interop init(targetsync, prefer_type("hsa", "cuda_driver", "hip", "cuda") : obj) device(dev)
+ }
+ break;
+ }
+
+ /* Expect 'hip'. */
+ case 6:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target, prefer_type("hsa", "hip", "cuda", "cuda_driver") : obj)
+ } else {
+ #pragma omp interop init(target, prefer_type("hsa", "hip", "cuda", "cuda_driver") : obj) device(dev)
+ }
+ break;
+ }
+ case 7:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync, prefer_type("hsa", "hip", "cuda", "cuda_driver") : obj)
+ } else {
+ #pragma omp interop init(targetsync, prefer_type("hsa", "hip", "cuda", "cuda_driver") : obj) device(dev)
+ }
+ break;
+ }
+ default:
+ abort ();
+ }
+ assert (obj != omp_interop_none && obj != (omp_interop_t) -1L);
+
+ omp_interop_rc_t ret_code = omp_irc_no_value;
+ omp_interop_fr_t fr = (omp_interop_fr_t) omp_get_interop_int (obj, omp_ipr_fr_id, &ret_code);
+
+ assert (ret_code == omp_irc_success);
+ if (variant >= 0 && variant <= 3)
+ assert (fr == omp_ifr_cuda);
+ else if (variant <= 5)
+ assert (fr == omp_ifr_cuda_driver);
+ else if (variant <= 7)
+ assert (fr == omp_ifr_hip);
+ else
+ assert (0);
+
+ ret_code = omp_irc_no_value;
+ const char *fr_name = omp_get_interop_str (obj, omp_ipr_fr_name, &ret_code);
+
+ assert (ret_code == omp_irc_success);
+ if (fr == omp_ifr_cuda)
+ assert (strcmp (fr_name, "cuda") == 0);
+ else if (fr == omp_ifr_cuda_driver)
+ assert (strcmp (fr_name, "cuda_driver") == 0);
+ else if (fr == omp_ifr_hip)
+ assert (strcmp (fr_name, "hip") == 0);
+ else
+ assert (0);
+
+ ret_code = omp_irc_no_value;
+ int vendor = (int) omp_get_interop_int (obj, omp_ipr_vendor, &ret_code);
+ assert (ret_code == omp_irc_success);
+ assert (vendor == 11); /* Nvidia */
+
+ ret_code = omp_irc_no_value;
+ const char *vendor_name = omp_get_interop_str (obj, omp_ipr_vendor_name, &ret_code);
+ assert (ret_code == omp_irc_success);
+ assert (strcmp (vendor_name, "nvidia") == 0);
+
+ ret_code = omp_irc_no_value;
+ int dev_num = (int) omp_get_interop_int (obj, omp_ipr_device_num, &ret_code);
+ assert (ret_code == omp_irc_success);
+ if (dev == DEFAULT_DEVICE)
+ assert (dev_num == omp_get_default_device ());
+ else
+ assert (dev_num == dev);
+
+ /* Platform: N/A. */
+ ret_code = omp_irc_success;
+ (void) omp_get_interop_int (obj, omp_ipr_platform, &ret_code);
+ assert (ret_code == omp_irc_no_value);
+ ret_code = omp_irc_success;
+ (void) omp_get_interop_ptr (obj, omp_ipr_platform, &ret_code);
+ assert (ret_code == omp_irc_no_value);
+ ret_code = omp_irc_success;
+ (void) omp_get_interop_str (obj, omp_ipr_platform, &ret_code);
+ assert (ret_code == omp_irc_no_value);
+
+ /* Device: int / CUdevice / hipDevice_t -- all internally an 'int'. */
+ ret_code = omp_irc_no_value;
+ int fr_device = (int) omp_get_interop_int (obj, omp_ipr_device, &ret_code);
+
+ /* CUDA also starts from 0 and goes to < n with cudaGetDeviceCount(&cn). */
+ assert (ret_code == omp_irc_success);
+ assert (fr_device >= 0 && fr_device < omp_get_num_devices ());
+
+ /* Device context: N/A / CUcontext / hipCtx_t -- a pointer. */
+ ret_code = omp_irc_out_of_range;
+ void *ctx = omp_get_interop_ptr (obj, omp_ipr_device_context, &ret_code);
+
+ if (fr == omp_ifr_cuda)
+ {
+ assert (ret_code == omp_irc_no_value);
+ assert (ctx == NULL);
+ }
+ else
+ {
+ assert (ret_code == omp_irc_success);
+ assert (ctx != NULL);
+ }
+
+ /* Stream/targetsync: cudaStream_t / CUstream / hipStream_t -- a pointer. */
+ ret_code = omp_irc_out_of_range;
+ void *stream = omp_get_interop_ptr (obj, omp_ipr_targetsync, &ret_code);
+
+ if (variant % 2 == 0) /* no targetsync */
+ {
+ assert (ret_code == omp_irc_no_value);
+ assert (stream == NULL);
+ }
+ else
+ {
+ assert (ret_code == omp_irc_success);
+ assert (stream != NULL);
+ }
+
+ check_type (obj);
+ if (fr == omp_ifr_cuda)
+ {
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_platform), "N/A") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device), "int") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device_context), "N/A") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_targetsync), "cudaStream_t") == 0);
+ }
+ else if (fr == omp_ifr_cuda_driver)
+ {
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_platform), "N/A") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device), "CUdevice") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device_context), "CUcontext") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_targetsync), "CUstream") == 0);
+ }
+ else
+ {
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_platform), "N/A") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device), "hipDevice_t") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device_context), "hipCtx_t") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_targetsync), "hipStream_t") == 0);
+ }
+
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop use(obj)
+ #pragma omp interop destroy(obj)
+ } else {
+ #pragma omp interop use(obj) device(dev)
+ #pragma omp interop destroy(obj) device(dev)
+ }
+ }
+}
+
+
+void
+check_gcn (int dev)
+{
+ for (int variant = 0; variant <= 5; variant++)
+ {
+ omp_interop_t obj = (omp_interop_t) -1L;
+ switch (variant)
+ {
+ /* Expect 'hip'. */
+ case 0:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target : obj)
+ } else {
+ #pragma omp interop init(target : obj) device(dev)
+ }
+ break;
+ }
+ case 1:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync : obj)
+ } else {
+ #pragma omp interop init(targetsync : obj) device(dev)
+ }
+ break;
+ }
+ case 2:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target, prefer_type({attr("ompx_foo")}, {fr("cuda")}, {fr("cuda_driver")}, {attr("ompx_bar"), fr("hip"), attr("ompx_foobar")},{fr("hsa")}) : obj)
+ } else {
+ #pragma omp interop init(target, prefer_type({attr("ompx_foo")}, {fr("cuda")}, {fr("cuda_driver")}, {attr("ompx_bar"), fr("hip"), attr("ompx_foobar")},{fr("hsa")}) : obj) device(dev)
+ }
+ break;
+ }
+ case 3:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync, prefer_type("cuda", "cuda_driver", "hip", "hsa") : obj)
+ } else {
+ #pragma omp interop init(targetsync, prefer_type("cuda", "cuda_driver", "hip", "hsa") : obj) device(dev)
+ }
+ break;
+ }
+
+ /* Expect 'hsa'. */
+ case 4:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(target, prefer_type("cuda", "cuda_driver", "hsa", "hip") : obj)
+ } else {
+ #pragma omp interop init(target, prefer_type("cuda", "cuda_driver", "hsa", "hip") : obj) device(dev)
+ }
+ break;
+ }
+ case 5:
+ {
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop init(targetsync, prefer_type("cuda", "cuda_driver", "hsa", "hip") : obj)
+ } else {
+ #pragma omp interop init(targetsync, prefer_type("cuda", "cuda_driver", "hsa", "hip") : obj) device(dev)
+ }
+ break;
+ }
+ default:
+ abort ();
+ }
+ assert (obj != omp_interop_none && obj != (omp_interop_t) -1L);
+
+ omp_interop_rc_t ret_code = omp_irc_no_value;
+ omp_interop_fr_t fr = (omp_interop_fr_t) omp_get_interop_int (obj, omp_ipr_fr_id, &ret_code);
+
+ assert (ret_code == omp_irc_success);
+ if (variant >= 0 && variant <= 3)
+ assert (fr == omp_ifr_hip);
+ else if (variant <= 5)
+ assert (fr == omp_ifr_hsa);
+ else
+ assert (0);
+
+ ret_code = omp_irc_no_value;
+ const char *fr_name = omp_get_interop_str (obj, omp_ipr_fr_name, &ret_code);
+
+ assert (ret_code == omp_irc_success);
+ if (fr == omp_ifr_hip)
+ assert (strcmp (fr_name, "hip") == 0);
+ else if (fr == omp_ifr_hsa)
+ assert (strcmp (fr_name, "hsa") == 0);
+ else
+ assert (0);
+
+ ret_code = omp_irc_no_value;
+ int vendor = (int) omp_get_interop_int (obj, omp_ipr_vendor, &ret_code);
+ assert (ret_code == omp_irc_success);
+ assert (vendor == 1); /* Amd */
+
+ ret_code = omp_irc_no_value;
+ const char *vendor_name = omp_get_interop_str (obj, omp_ipr_vendor_name, &ret_code);
+ assert (ret_code == omp_irc_success);
+ assert (strcmp (vendor_name, "amd") == 0);
+
+ ret_code = omp_irc_no_value;
+ int dev_num = (int) omp_get_interop_int (obj, omp_ipr_device_num, &ret_code);
+ assert (ret_code == omp_irc_success);
+ if (dev == DEFAULT_DEVICE)
+ assert (dev_num == omp_get_default_device ());
+ else
+ assert (dev_num == dev);
+
+ /* Platform: N/A. */
+ ret_code = omp_irc_success;
+ (void) omp_get_interop_int (obj, omp_ipr_platform, &ret_code);
+ assert (ret_code == omp_irc_no_value);
+ ret_code = omp_irc_success;
+ (void) omp_get_interop_ptr (obj, omp_ipr_platform, &ret_code);
+ assert (ret_code == omp_irc_no_value);
+ ret_code = omp_irc_success;
+ (void) omp_get_interop_str (obj, omp_ipr_platform, &ret_code);
+ assert (ret_code == omp_irc_no_value);
+
+ /* Device: hipDevice_t / hsa_agent_t* -- hip is internally an 'int'. */
+ ret_code = omp_irc_no_value;
+ if (fr == omp_ifr_hip)
+ {
+ /* HIP also starts from 0 and goes to < n as with cudaGetDeviceCount(&cn). */
+ int fr_device = (int) omp_get_interop_int (obj, omp_ipr_device, &ret_code);
+ assert (ret_code == omp_irc_success);
+ assert (fr_device >= 0 && fr_device < omp_get_num_devices ());
+ }
+ else
+ {
+ void *agent = omp_get_interop_ptr (obj, omp_ipr_device, &ret_code);
+ assert (ret_code == omp_irc_success);
+ assert (agent != NULL);
+ }
+
+ /* Device context: hipCtx_t / N/A -- a pointer. */
+ ret_code = omp_irc_out_of_range;
+ void *ctx = omp_get_interop_ptr (obj, omp_ipr_device_context, &ret_code);
+ if (fr == omp_ifr_hip)
+ {
+ assert (ret_code == omp_irc_success);
+ assert (ctx != NULL);
+ }
+ else
+ {
+ assert (ret_code == omp_irc_no_value);
+ assert (ctx == NULL);
+ }
+
+ /* Stream/targetsync: cudaStream_t / CUstream / hipStream_t -- a pointer. */
+ ret_code = omp_irc_out_of_range;
+ void *stream = omp_get_interop_ptr (obj, omp_ipr_targetsync, &ret_code);
+
+ if (variant % 2 == 0) /* no targetsync */
+ {
+ assert (ret_code == omp_irc_no_value);
+ assert (stream == NULL);
+ }
+ else
+ {
+ assert (ret_code == omp_irc_success);
+ assert (stream != NULL);
+ }
+
+ check_type (obj);
+ if (fr == omp_ifr_hip)
+ {
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_platform), "N/A") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device), "hipDevice_t") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device_context), "hipCtx_t") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_targetsync), "hipStream_t") == 0);
+ }
+ else
+ {
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_platform), "N/A") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device), "hsa_agent_t *") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_device_context), "N/A") == 0);
+ assert (strcmp (omp_get_interop_type_desc (obj, omp_ipr_targetsync), "hsa_queue_t *") == 0);
+ }
+
+ if (dev == DEFAULT_DEVICE) {
+ #pragma omp interop use(obj)
+ #pragma omp interop destroy(obj)
+ } else {
+ #pragma omp interop use(obj) device(dev)
+ #pragma omp interop destroy(obj) device(dev)
+ }
+ }
+}
+
+
+int
+main ()
+{
+ do_check (DEFAULT_DEVICE);
+ int ndev = omp_get_num_devices ();
+ for (int dev = -1; dev < ndev; dev++)
+ do_check (dev);
+ for (int dev = -1; dev < ndev; dev++)
+ {
+ omp_set_default_device (dev);
+ do_check (DEFAULT_DEVICE);
+ }
+}
diff --git a/libgomp/testsuite/libgomp.fortran/get-mapped-ptr-1.f90 b/libgomp/testsuite/libgomp.fortran/get-mapped-ptr-1.f90
index 9b6334f..be60acc 100644
--- a/libgomp/testsuite/libgomp.fortran/get-mapped-ptr-1.f90
+++ b/libgomp/testsuite/libgomp.fortran/get-mapped-ptr-1.f90
@@ -19,7 +19,7 @@ program main
if (omp_target_associate_ptr (c_loc (q), p, c_sizeof (q), &
0_c_size_t, d) == 0) then
- if(c_associated (omp_get_mapped_ptr (c_loc (q), -5))) &
+ if(c_associated (omp_get_mapped_ptr (c_loc (q), -6))) &
stop 1
if(c_associated (omp_get_mapped_ptr (c_loc (q), &
diff --git a/libgomp/testsuite/libgomp.oacc-c++/pr101544-1.C b/libgomp/testsuite/libgomp.oacc-c++/pr101544-1.C
new file mode 100644
index 0000000..004cd49
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c++/pr101544-1.C
@@ -0,0 +1,7 @@
+// { dg-additional-options -foffload-options=-lstdc++ }
+// { dg-additional-options -fno-inline } for stable results regarding OpenACC 'routine'.
+// But actually, as none of the '#pragma acc routine' syntax is accepted, force inlining:
+#define ALWAYS_INLINE __attribute__((always_inline))
+
+#include "../libgomp.c++/pr101544-1.C"
+//TODO { dg-prune-output {using 'vector_length \(32\)', ignoring 1} }
diff --git a/libgomp/testsuite/libgomp.oacc-c++/pr96835-1.C b/libgomp/testsuite/libgomp.oacc-c++/pr96835-1.C
new file mode 100644
index 0000000..0a6ee22
--- /dev/null
+++ b/libgomp/testsuite/libgomp.oacc-c++/pr96835-1.C
@@ -0,0 +1,6 @@
+// { dg-additional-options -fno-inline } for stable results regarding OpenACC 'routine'.
+// But actually, as none of the '#pragma acc routine' syntax is accepted (see '../libgomp.c++/pr101544-1.C'), force inlining:
+#define ALWAYS_INLINE inline __attribute__((always_inline))
+
+#include "../libgomp.c++/pr96835-1.C"
+//TODO { dg-prune-output {using 'vector_length \(32\)', ignoring 1} }
diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog
index d2308d9..09fc057 100644
--- a/libphobos/ChangeLog
+++ b/libphobos/ChangeLog
@@ -1,3 +1,19 @@
+2025-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * libdruntime/MERGE: Merge upstream druntime 94950cae58.
+
+2025-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Rename rt/invariant.d
+ to rt/invariant_.d.
+ * libdruntime/Makefile.in: Regenerate.
+ * libdruntime/rt/invariant.d: Move to...
+ * libdruntime/rt/invariant_.d: ...here.
+
+2025-03-22 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * src/MERGE: Merge upstream phobos d4c9efef1.
+
2025-03-18 Iain Buclaw <ibuclaw@gdcproject.org>
* src/MERGE: Merge upstream phobos 79cbde1ab.
diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
index 18c9d11..9982d0d 100644
--- a/libphobos/libdruntime/MERGE
+++ b/libphobos/libdruntime/MERGE
@@ -1,4 +1,4 @@
-d2ee11364c25ca8865eb0acb9596a6147532ef41
+94950cae582d89f5ba2720786522f669f620f9d1
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
diff --git a/libphobos/libdruntime/Makefile.am b/libphobos/libdruntime/Makefile.am
index 595e3f9..252c6a3 100644
--- a/libphobos/libdruntime/Makefile.am
+++ b/libphobos/libdruntime/Makefile.am
@@ -222,7 +222,7 @@ DRUNTIME_DSOURCES = core/atomic.d core/attribute.d core/bitop.d \
gcc/unwind/generic.d gcc/unwind/package.d gcc/unwind/pe.d object.d \
rt/aApply.d rt/aApplyR.d rt/aaA.d rt/adi.d rt/arraycat.d rt/cast_.d \
rt/config.d rt/critical_.d rt/deh.d rt/dmain2.d rt/ehalloc.d \
- rt/invariant.d rt/lifetime.d rt/memory.d rt/minfo.d rt/monitor_.d \
+ rt/invariant_.d rt/lifetime.d rt/memory.d rt/minfo.d rt/monitor_.d \
rt/profilegc.d rt/sections.d rt/tlsgc.d rt/util/typeinfo.d \
rt/util/utility.d
diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in
index 4832fd1..52b0c37 100644
--- a/libphobos/libdruntime/Makefile.in
+++ b/libphobos/libdruntime/Makefile.in
@@ -248,7 +248,7 @@ am__objects_1 = core/atomic.lo core/attribute.lo core/bitop.lo \
gcc/unwind/generic.lo gcc/unwind/package.lo gcc/unwind/pe.lo \
object.lo rt/aApply.lo rt/aApplyR.lo rt/aaA.lo rt/adi.lo \
rt/arraycat.lo rt/cast_.lo rt/config.lo rt/critical_.lo \
- rt/deh.lo rt/dmain2.lo rt/ehalloc.lo rt/invariant.lo \
+ rt/deh.lo rt/dmain2.lo rt/ehalloc.lo rt/invariant_.lo \
rt/lifetime.lo rt/memory.lo rt/minfo.lo rt/monitor_.lo \
rt/profilegc.lo rt/sections.lo rt/tlsgc.lo rt/util/typeinfo.lo \
rt/util/utility.lo
@@ -903,7 +903,7 @@ DRUNTIME_DSOURCES = core/atomic.d core/attribute.d core/bitop.d \
gcc/unwind/generic.d gcc/unwind/package.d gcc/unwind/pe.d object.d \
rt/aApply.d rt/aApplyR.d rt/aaA.d rt/adi.d rt/arraycat.d rt/cast_.d \
rt/config.d rt/critical_.d rt/deh.d rt/dmain2.d rt/ehalloc.d \
- rt/invariant.d rt/lifetime.d rt/memory.d rt/minfo.d rt/monitor_.d \
+ rt/invariant_.d rt/lifetime.d rt/memory.d rt/minfo.d rt/monitor_.d \
rt/profilegc.d rt/sections.d rt/tlsgc.d rt/util/typeinfo.d \
rt/util/utility.d
@@ -1413,7 +1413,7 @@ rt/critical_.lo: rt/$(am__dirstamp)
rt/deh.lo: rt/$(am__dirstamp)
rt/dmain2.lo: rt/$(am__dirstamp)
rt/ehalloc.lo: rt/$(am__dirstamp)
-rt/invariant.lo: rt/$(am__dirstamp)
+rt/invariant_.lo: rt/$(am__dirstamp)
rt/lifetime.lo: rt/$(am__dirstamp)
rt/memory.lo: rt/$(am__dirstamp)
rt/minfo.lo: rt/$(am__dirstamp)
diff --git a/libphobos/libdruntime/core/stdcpp/xutility.d b/libphobos/libdruntime/core/stdcpp/xutility.d
index 5e2e711..f93df68 100644
--- a/libphobos/libdruntime/core/stdcpp/xutility.d
+++ b/libphobos/libdruntime/core/stdcpp/xutility.d
@@ -35,6 +35,7 @@ enum CppStdRevision : uint
cpp14 = 201402,
cpp17 = 201703,
cpp20 = 202002,
+ cpp23 = 202302,
}
/**
diff --git a/libphobos/libdruntime/rt/invariant.d b/libphobos/libdruntime/rt/invariant_.d
index e536196..2a64dc8 100644
--- a/libphobos/libdruntime/rt/invariant.d
+++ b/libphobos/libdruntime/rt/invariant_.d
@@ -4,15 +4,10 @@
* Copyright: Copyright Digital Mars 2007 - 2010.
* License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0).
* Authors: Walter Bright
- * Source: $(DRUNTIMESRC rt/_invariant.d)
- */
-
-/* Copyright Digital Mars 2007 - 2010.
- * Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
+ * Source: $(DRUNTIMESRC rt/_invariant_.d)
*/
+module rt.invariant_;
/**
*
diff --git a/libphobos/src/MERGE b/libphobos/src/MERGE
index a4888fc..7eb4c35 100644
--- a/libphobos/src/MERGE
+++ b/libphobos/src/MERGE
@@ -1,4 +1,4 @@
-79cbde1ab69bae9372f310d663edfc43166095e3
+d4c9efef156385204d382cd941dc58bb750d7141
The first line of this file holds the git revision number of the last
merge done from the dlang/phobos repository.
diff --git a/libphobos/src/std/numeric.d b/libphobos/src/std/numeric.d
index 9966b1c..918984f 100644
--- a/libphobos/src/std/numeric.d
+++ b/libphobos/src/std/numeric.d
@@ -37,7 +37,7 @@ public enum CustomFloatFlags
* Store values in normalized form by default. The actual precision of the
* significand is extended by 1 bit by assuming an implicit leading bit of 1
* instead of 0. i.e. `1.nnnn` instead of `0.nnnn`.
- * True for all $(LINK2 https://en.wikipedia.org/wiki/IEEE_floating_point, IEE754) types
+ * True for all $(LINK2 https://en.wikipedia.org/wiki/IEEE_floating_point, IEEE754) types
*/
storeNormalized = 2,
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index add47e4..dccfffc 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,70 @@
+2025-03-21 Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/117214
+ * configure.ac: Use AC_STRUCT_TIMEZONE.
+ * config.h.in: Regenerate.
+ * configure: Regenerate.
+ * include/bits/chrono_io.h (__formatter_chrono::_M_c): Set
+ tm_isdst and tm_zone.
+ * testsuite/std/time/format/pr117214.cc: Check %c formatting of
+ zoned_time and local time.
+
+2025-03-21 XU Kailiang <xu2k3l4@outlook.com>
+ Jonathan Wakely <jwakely@redhat.com>
+
+ PR libstdc++/117214
+ * include/bits/chrono_io.h (__formatter_chrono::_M_c): Use
+ _M_locale_fmt to format %c time point.
+ * testsuite/std/time/format/pr117214.cc: New test.
+
+2025-03-21 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/chrono_io.h (__formatter_chrono::_M_locale_fmt):
+ Imbue locale into ostringstream.
+ * testsuite/std/time/format/localized.cc: Check that correct
+ locale is used for call to time_put::put.
+
+2025-03-21 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/bits/stl_vector.h (vector(from_range_t, Alloc)): Use
+ delegating constructor instead of RAII guards. Use append_range
+ for unsized input range case.
+
+2025-03-21 Jonathan Wakely <jwakely@redhat.com>
+
+ * src/c++23/std.compat.cc.in: Only export <stdbit.h> and
+ <stdckdint.h> contents for C++26 and later.
+
+2025-03-21 Jonathan Wakely <jwakely@redhat.com>
+
+ * src/c++23/std.cc.in (tuple_element, tuple_element_t)
+ (tuple_size, tuple_size_v, get): Export.
+ (ranges::cache_latest_view, views::cache_latest): Export.
+ (ranges::to_input_view, views::to_input): Export.
+ (from_range_t, from_range): Export.
+
+2025-03-20 Tomasz KamiƄski <tkaminsk@redhat.com>
+
+ * include/debug/unordered_map (unordered_map): Add from_range
+ constructors and deduction guides.
+ (unordered_multimap): Likewise.
+ * include/debug/unordered_set (unordered_set): Add from_range
+ constructors and deduction guides.
+ (unordered_multiset): Likewise.
+
+2025-03-20 Jonathan Wakely <jwakely@redhat.com>
+
+ * include/debug/map.h (map): Add from_range constructors and
+ deduction guides.
+ * include/debug/multimap.h (multimap): Likewise.
+ * include/debug/multiset.h (multiset): Likewise.
+ * include/debug/set.h (set): Likewise.
+
+2025-03-20 Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/18_support/numeric_limits/traps.cc (main): Fix comment
+ typo.
+
2025-03-19 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/test.xml: Fix default for -std option.
diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in
index 91e9200..be151f4 100644
--- a/libstdc++-v3/config.h.in
+++ b/libstdc++-v3/config.h.in
@@ -74,6 +74,10 @@
don't. */
#undef HAVE_DECL_STRNLEN
+/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
+ */
+#undef HAVE_DECL_TZNAME
+
/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
@@ -408,6 +412,9 @@
/* Define to 1 if `d_type' is a member of `struct dirent'. */
#undef HAVE_STRUCT_DIRENT_D_TYPE
+/* Define to 1 if `tm_zone' is a member of `struct tm'. */
+#undef HAVE_STRUCT_TM_TM_ZONE
+
/* Define if strxfrm_l is available in <string.h>. */
#undef HAVE_STRXFRM_L
@@ -499,9 +506,17 @@
/* Define to 1 if the target supports thread-local storage. */
#undef HAVE_TLS
+/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
+ `HAVE_STRUCT_TM_TM_ZONE' instead. */
+#undef HAVE_TM_ZONE
+
/* Define if truncate is available in <unistd.h>. */
#undef HAVE_TRUNCATE
+/* Define to 1 if you don't have `tm_zone' but do have the external array
+ `tzname'. */
+#undef HAVE_TZNAME
+
/* Define to 1 if you have the <uchar.h> header file. */
#undef HAVE_UCHAR_H
@@ -590,6 +605,9 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
/* Version number of package */
#undef VERSION
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 7875828..67d2b8c 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -2731,6 +2731,63 @@ $as_echo "$ac_res" >&6; }
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_decl
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_member
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -12280,7 +12337,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12283 "configure"
+#line 12340 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12386,7 +12443,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12389 "configure"
+#line 12446 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -16182,7 +16239,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
# Fake what AC_TRY_COMPILE does.
cat > conftest.$ac_ext << EOF
-#line 16185 "configure"
+#line 16242 "configure"
int main()
{
typedef bool atomic_type;
@@ -16217,7 +16274,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16220 "configure"
+#line 16277 "configure"
int main()
{
typedef short atomic_type;
@@ -16252,7 +16309,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16255 "configure"
+#line 16312 "configure"
int main()
{
// NB: _Atomic_word not necessarily int.
@@ -16288,7 +16345,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
rm -f conftest*
cat > conftest.$ac_ext << EOF
-#line 16291 "configure"
+#line 16348 "configure"
int main()
{
typedef long long atomic_type;
@@ -16444,7 +16501,7 @@ $as_echo "mutex" >&6; }
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 16447 "configure"
+#line 16504 "configure"
int main()
{
_Decimal32 d1;
@@ -16486,7 +16543,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# unnecessary for this test.
cat > conftest.$ac_ext << EOF
-#line 16489 "configure"
+#line 16546 "configure"
template<typename T1, typename T2>
struct same
{ typedef T2 type; };
@@ -54640,6 +54697,112 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if ${ac_cv_struct_tm+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_struct_tm=time.h
+else
+ ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+"
+if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
+
+else
+ ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
+"
+if test "x$ac_cv_have_decl_tzname" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TZNAME $ac_have_decl
+_ACEOF
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
+$as_echo_n "checking for tzname... " >&6; }
+if ${ac_cv_var_tzname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x$gcc_no_link = xyes; then
+ as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+#if !HAVE_DECL_TZNAME
+extern char *tzname[];
+#endif
+
+int
+main ()
+{
+return tzname[0][0];
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_var_tzname=yes
+else
+ ac_cv_var_tzname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
+$as_echo "$ac_cv_var_tzname" >&6; }
+ if test $ac_cv_var_tzname = yes; then
+
+$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
+
+ fi
+fi
+
+
# Define documentation rules conditionally.
# See if makeinfo has been installed and is modern enough
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
index a3b257f..fe0cdde 100644
--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -584,6 +584,8 @@ GLIBCXX_CHECK_FILEBUF_NATIVE_HANDLES
# For std::text_encoding
GLIBCXX_CHECK_TEXT_ENCODING
+AC_STRUCT_TIMEZONE
+
# Define documentation rules conditionally.
# See if makeinfo has been installed and is modern enough
diff --git a/libstdc++-v3/include/bits/chrono_io.h b/libstdc++-v3/include/bits/chrono_io.h
index c16b555..0896916 100644
--- a/libstdc++-v3/include/bits/chrono_io.h
+++ b/libstdc++-v3/include/bits/chrono_io.h
@@ -887,27 +887,60 @@ namespace __format
template<typename _Tp, typename _FormatContext>
typename _FormatContext::iterator
- _M_c(const _Tp& __tt, typename _FormatContext::iterator __out,
+ _M_c(const _Tp& __t, typename _FormatContext::iterator __out,
_FormatContext& __ctx, bool __mod = false) const
{
// %c Locale's date and time representation.
// %Ec Locale's alternate date and time representation.
- basic_string<_CharT> __fmt;
- auto __t = _S_floor_seconds(__tt);
- locale __loc = _M_locale(__ctx);
- const auto& __tp = use_facet<__timepunct<_CharT>>(__loc);
- const _CharT* __formats[2];
- __tp._M_date_time_formats(__formats);
- if (*__formats[__mod]) [[likely]]
+ using namespace chrono;
+ using ::std::chrono::__detail::__utc_leap_second;
+ using ::std::chrono::__detail::__local_time_fmt;
+
+ struct tm __tm{};
+
+ // Some locales use %Z in their %c format but we don't want strftime
+ // to use the system's local time zone (from /etc/localtime or $TZ)
+ // as the output for %Z. Setting tm_isdst to -1 says there is no
+ // time zone info available for the time in __tm.
+ __tm.tm_isdst = -1;
+
+#ifdef _GLIBCXX_HAVE_STRUCT_TM_TM_ZONE
+ // POSIX.1-2024 adds tm.tm_zone which will be used for %Z.
+ if constexpr (__is_time_point_v<_Tp>)
{
- __fmt = _GLIBCXX_WIDEN("{:L}");
- __fmt.insert(3u, __formats[__mod]);
+ // One of sys_time, utc_time, or local_time.
+ if constexpr (!is_same_v<typename _Tp::clock, local_t>)
+ __tm.tm_zone = "UTC";
+ }
+ else if constexpr (__is_specialization_of<_Tp, __local_time_fmt>)
+ {
+ // local-time-format-t is used to provide time zone info for
+ // one of zoned_time, tai_time, gps_time, or local_time.
+ if (__t._M_abbrev)
+ __tm.tm_zone = __t._M_abbrev->c_str();
}
else
- __fmt = _GLIBCXX_WIDEN("{:L%a %b %e %T %Y}");
- return std::vformat_to(std::move(__out), __loc, __fmt,
- std::make_format_args<_FormatContext>(__t));
+ __tm.tm_zone = "UTC";
+#endif
+
+ auto __d = _S_days(__t); // Either sys_days or local_days.
+ using _TDays = decltype(__d);
+ const year_month_day __ymd(__d);
+ const auto __y = __ymd.year();
+ const auto __hms = _S_hms(__t);
+
+ __tm.tm_year = (int)__y - 1900;
+ __tm.tm_yday = (__d - _TDays(__y/January/1)).count();
+ __tm.tm_mon = (unsigned)__ymd.month() - 1;
+ __tm.tm_mday = (unsigned)__ymd.day();
+ __tm.tm_wday = weekday(__d).c_encoding();
+ __tm.tm_hour = __hms.hours().count();
+ __tm.tm_min = __hms.minutes().count();
+ __tm.tm_sec = __hms.seconds().count();
+
+ return _M_locale_fmt(std::move(__out), _M_locale(__ctx), __tm, 'c',
+ __mod ? 'E' : '\0');
}
template<typename _Tp, typename _FormatContext>
@@ -1697,6 +1730,7 @@ namespace __format
char __fmt, char __mod) const
{
basic_ostringstream<_CharT> __os;
+ __os.imbue(__loc);
const auto& __tp = use_facet<time_put<_CharT>>(__loc);
__tp.put(__os, __os, _S_space, &__tm, __fmt, __mod);
if (__os)
diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h
index 9c75f64..09fd536 100644
--- a/libstdc++-v3/include/bits/stl_vector.h
+++ b/libstdc++-v3/include/bits/stl_vector.h
@@ -758,7 +758,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
template<__detail::__container_compatible_range<_Tp> _Rg>
constexpr
vector(from_range_t, _Rg&& __rg, const _Alloc& __a = _Alloc())
- : _Base(__a)
+ : vector(__a)
{
if constexpr (ranges::forward_range<_Rg> || ranges::sized_range<_Rg>)
{
@@ -766,28 +766,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
pointer __start =
this->_M_allocate(_S_check_init_len(__n,
_M_get_Tp_allocator()));
- _Guard_alloc __guard(__start, __n, *this);
this->_M_impl._M_finish = this->_M_impl._M_start = __start;
this->_M_impl._M_end_of_storage = __start + __n;
_Base::_M_append_range(__rg);
- (void) __guard._M_release();
}
else
- {
- // If an exception is thrown ~_Base() will deallocate storage,
- // but will not destroy elements. This RAII type destroys them.
- struct _Clear
- {
- constexpr ~_Clear() { if (_M_this) _M_this->clear(); }
- vector* _M_this;
- } __guard{this};
-
- auto __first = ranges::begin(__rg);
- const auto __last = ranges::end(__rg);
- for (; __first != __last; ++__first)
- emplace_back(*__first);
- __guard._M_this = nullptr;
- }
+ append_range(std::move(__rg));
}
#endif
diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/std.cc.in
index c0b7e1d..12253b9 100644
--- a/libstdc++-v3/src/c++23/std.cc.in
+++ b/libstdc++-v3/src/c++23/std.cc.in
@@ -924,6 +924,13 @@ export namespace std
using std::sqrt;
using std::tan;
using std::tanh;
+#if __cpp_lib_tuple_like >= 202311L
+ using std::tuple_element;
+ using std::tuple_element_t;
+ using std::tuple_size;
+ using std::tuple_size_v;
+ using std::get;
+#endif
}
export namespace std::inline literals::inline complex_literals
{
@@ -2383,14 +2390,24 @@ export namespace std
using ranges::enumerate_view;
namespace views { using views::enumerate; }
#endif
-#if __cpp_lib_ranges_to_container // C++ >= 23
- using ranges::to;
-#endif // __cpp_lib_ranges_to_container
#if __cpp_lib_ranges_concat // C++ >= C++26
using ranges::concat_view;
namespace views { using views::concat; }
#endif
+#if __cpp_lib_ranges_cache_latest // C++ >= C++26
+ using ranges::cache_latest_view;
+ namespace views { using views::cache_latest; }
+#endif
+#if __glibcxx_ranges_to_input // C++ >= 26
+ using ranges::to_input_view;
+ namespace views { using views::to_input; }
+#endif
}
+#if __glibcxx_ranges_to_container // C++ >= 23
+ namespace ranges { using ranges::to; }
+ using std::from_range_t;
+ using std::from_range;
+#endif
}
// <ratio>
diff --git a/libstdc++-v3/src/c++23/std.compat.cc.in b/libstdc++-v3/src/c++23/std.compat.cc.in
index ba7ed03..3445021 100644
--- a/libstdc++-v3/src/c++23/std.compat.cc.in
+++ b/libstdc++-v3/src/c++23/std.compat.cc.in
@@ -21,11 +21,15 @@
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-export module std.compat;
-export import std;
+module;
#include <stdbit.h>
+#include <stdckdint.h>
+
+export module std.compat;
+export import std;
+#ifdef __STDC_VERSION_STDBIT_H__
// <stdbit.h>
export
{
@@ -52,7 +56,9 @@ _GLIBCXX_STDBIT_FUNC(stdc_bit_floor);
_GLIBCXX_STDBIT_FUNC(stdc_bit_ceil);
#undef _GLIBCXX_STDBIT_FUNC
}
+#endif
+#ifdef __STDC_VERSION_STDCKDINT_H__
// <stdckdint.h>
export
{
@@ -60,6 +66,7 @@ export
using __gnu_cxx::ckd_sub;
using __gnu_cxx::ckd_mul;
}
+#endif
#define STD_COMPAT 1
diff --git a/libstdc++-v3/testsuite/std/time/format/localized.cc b/libstdc++-v3/testsuite/std/time/format/localized.cc
index 393d0d2..7fde97f 100644
--- a/libstdc++-v3/testsuite/std/time/format/localized.cc
+++ b/libstdc++-v3/testsuite/std/time/format/localized.cc
@@ -13,6 +13,7 @@
#include <chrono>
#include <format>
+#include <locale>
#include <stdio.h>
#include <testsuite_hooks.h>
@@ -81,10 +82,42 @@ test_en()
}
}
+void
+test_locale_imbued()
+{
+ // Custom time_put facet which returns %b string for %Om.
+ // The %b string will come from io.getloc() which should be
+ // the formatting locale using by std::format.
+ struct TimePut : std::time_put<char>
+ {
+ iter_type
+ do_put(iter_type out, std::ios_base& io, char_type fill, const tm* t,
+ char format, char modifier) const override
+ {
+ if (format == 'm' && modifier == 'O')
+ format = 'b';
+ return std::time_put<char>::do_put(out, io, fill, t, format, 0);
+ }
+ };
+
+ auto m = std::chrono::March;
+
+ std::locale fr(ISO_8859(1,fr_FR));
+ std::locale fr2(fr, new TimePut);
+ auto s1 = std::format(fr2, "{:L%Om}", m); // should be %b in fr_FR locale
+ VERIFY( s1 == std::format(fr, "{:L}", m) );
+
+ std::locale es(ISO_8859(1,es_ES));
+ std::locale es2(es, new TimePut);
+ auto s2 = std::format(es2, "{:L%Om}", m); // should be %b in es_ES locale
+ VERIFY( s2 == std::format(es, "{:L}", m) );
+}
+
int main()
{
test_ru();
test_es();
test_fr();
test_en();
+ test_locale_imbued();
}
diff --git a/libstdc++-v3/testsuite/std/time/format/pr117214.cc b/libstdc++-v3/testsuite/std/time/format/pr117214.cc
new file mode 100644
index 0000000..87c703d
--- /dev/null
+++ b/libstdc++-v3/testsuite/std/time/format/pr117214.cc
@@ -0,0 +1,99 @@
+// { dg-do run { target c++20 } }
+// { dg-require-namedlocale "aa_DJ.UTF-8" }
+// { dg-require-namedlocale "ar_SA.UTF-8" }
+// { dg-require-namedlocale "ca_AD.UTF-8" }
+// { dg-require-namedlocale "az_IR.UTF-8" }
+// { dg-require-namedlocale "my_MM.UTF-8" }
+
+#include <chrono>
+#include <locale>
+#include <testsuite_hooks.h>
+
+void
+test_c()
+{
+ const char *test_locales[] = {
+ "aa_DJ.UTF-8",
+ "ar_SA.UTF-8",
+ "ca_AD.UTF-8",
+ "az_IR.UTF-8",
+ "my_MM.UTF-8",
+ };
+ std::chrono::sys_seconds t{std::chrono::seconds{1}};
+
+ for (auto locale_name : test_locales)
+ {
+ auto s = std::format(std::locale(locale_name), "{:L%c}", t);
+ VERIFY( !s.empty() );
+ }
+}
+
+#include <stdlib.h>
+#include <time.h>
+
+extern "C++" int tzset(int);
+
+template<typename T = void>
+void maybe_set_tz()
+{
+#ifdef _GLIBCXX_HAVE_SETENV
+ // True if a function 'T tzset()' has been declared.
+ if constexpr (requires (T (*p)()) { p = &tzset; })
+ {
+ setenv("TZ", "GMT0", 1);
+ tzset(); // Set C library's global time zone to GMT0
+ }
+#endif
+}
+
+void
+test_c_zoned()
+{
+#if _GLIBCXX_USE_CXX11_ABI
+ maybe_set_tz();
+
+ using namespace std::chrono;
+ auto time = sys_days(2025y/March/19) + 15h;
+ zoned_time z("America/New_York", time);
+ auto s = std::format(std::locale("aa_DJ.UTF-8"), "{:L%c}", z);
+ VERIFY( s.find("11:00") != s.npos );
+
+ // We should not print an incorrect time zone.
+ VERIFY( s.find("GMT") == s.npos );
+ VERIFY( s.find("UTC") == s.npos );
+
+#ifdef _GLIBCXX_HAVE_STRUCT_TM_TM_ZONE
+ // When tm.tm_zone is supported, we do print the correct time zone.
+ VERIFY( s.find(z.get_info().abbrev) != s.npos );
+#endif
+#endif
+}
+
+void
+test_c_local()
+{
+ maybe_set_tz();
+
+ std::locale("aa_DJ.UTF-8");
+ using namespace std::chrono;
+ auto time = local_days(2025y/March/19) + 11h;
+ auto s = std::format(std::locale("aa_DJ.UTF-8"), "{:L%c}", time);
+ // __builtin_printf("%s\n", s.c_str()); return;
+ VERIFY( s.find("11:00") != s.npos );
+
+ // We should not print any time zone.
+ VERIFY( s.find("GMT") == s.npos );
+ VERIFY( s.find("UTC") == s.npos );
+
+#if _GLIBCXX_USE_CXX11_ABI
+ zoned_time z(system_clock::now());
+ VERIFY( s.find(z.get_info().abbrev) == s.npos );
+#endif
+}
+
+int main()
+{
+ test_c();
+ test_c_zoned();
+ test_c_local();
+}