diff options
author | Martin Liska <mliska@suse.cz> | 2022-01-03 20:33:23 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-01-03 20:33:23 +0100 |
commit | 013d1573ab19ea3e168441c71b539ba3df6310af (patch) | |
tree | d1dcf90d438edddbee7818b52db0baad87559bcc | |
parent | cb2d70e85a7e72082ce75c2a380e13b1404de605 (diff) | |
parent | 122a75488c98b898df1a6f2ed4e48836a5d72d7a (diff) | |
download | gcc-013d1573ab19ea3e168441c71b539ba3df6310af.zip gcc-013d1573ab19ea3e168441c71b539ba3df6310af.tar.gz gcc-013d1573ab19ea3e168441c71b539ba3df6310af.tar.bz2 |
Merge branch 'master' into devel/sphinx
248 files changed, 3282 insertions, 758 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 77c5755..39b08af 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -6276,6 +6276,93 @@ expand_ifn_atomic_bit_test_and (gcall *call) emit_move_insn (target, result); } +/* Expand IFN_ATOMIC_*_FETCH_CMP_0 internal function. */ + +void +expand_ifn_atomic_op_fetch_cmp_0 (gcall *call) +{ + tree cmp = gimple_call_arg (call, 0); + tree ptr = gimple_call_arg (call, 1); + tree arg = gimple_call_arg (call, 2); + tree lhs = gimple_call_lhs (call); + enum memmodel model = MEMMODEL_SYNC_SEQ_CST; + machine_mode mode = TYPE_MODE (TREE_TYPE (cmp)); + optab optab; + rtx_code code; + class expand_operand ops[5]; + + gcc_assert (flag_inline_atomics); + + if (gimple_call_num_args (call) == 4) + model = get_memmodel (gimple_call_arg (call, 3)); + + rtx mem = get_builtin_sync_mem (ptr, mode); + rtx op = expand_expr_force_mode (arg, mode); + + switch (gimple_call_internal_fn (call)) + { + case IFN_ATOMIC_ADD_FETCH_CMP_0: + code = PLUS; + optab = atomic_add_fetch_cmp_0_optab; + break; + case IFN_ATOMIC_SUB_FETCH_CMP_0: + code = MINUS; + optab = atomic_sub_fetch_cmp_0_optab; + break; + case IFN_ATOMIC_AND_FETCH_CMP_0: + code = AND; + optab = atomic_and_fetch_cmp_0_optab; + break; + case IFN_ATOMIC_OR_FETCH_CMP_0: + code = IOR; + optab = atomic_or_fetch_cmp_0_optab; + break; + case IFN_ATOMIC_XOR_FETCH_CMP_0: + code = XOR; + optab = atomic_xor_fetch_cmp_0_optab; + break; + default: + gcc_unreachable (); + } + + enum rtx_code comp = UNKNOWN; + switch (tree_to_uhwi (cmp)) + { + case ATOMIC_OP_FETCH_CMP_0_EQ: comp = EQ; break; + case ATOMIC_OP_FETCH_CMP_0_NE: comp = NE; break; + case ATOMIC_OP_FETCH_CMP_0_GT: comp = GT; break; + case ATOMIC_OP_FETCH_CMP_0_GE: comp = GE; break; + case ATOMIC_OP_FETCH_CMP_0_LT: comp = LT; break; + case ATOMIC_OP_FETCH_CMP_0_LE: comp = LE; break; + default: gcc_unreachable (); + } + + rtx target; + if (lhs == NULL_TREE) + target = gen_reg_rtx (TYPE_MODE (boolean_type_node)); + else + target = expand_expr (lhs, NULL_RTX, VOIDmode, EXPAND_WRITE); + enum insn_code icode = direct_optab_handler (optab, mode); + gcc_assert (icode != CODE_FOR_nothing); + create_output_operand (&ops[0], target, TYPE_MODE (boolean_type_node)); + create_fixed_operand (&ops[1], mem); + create_convert_operand_to (&ops[2], op, mode, true); + create_integer_operand (&ops[3], model); + create_integer_operand (&ops[4], comp); + if (maybe_expand_insn (icode, 5, ops)) + return; + + rtx result = expand_atomic_fetch_op (gen_reg_rtx (mode), mem, op, + code, model, true); + if (lhs) + { + result = emit_store_flag_force (target, comp, result, const0_rtx, mode, + 0, 1); + if (result != target) + emit_move_insn (target, result); + } +} + /* Expand an atomic clear operation. void _atomic_clear (BOOL *obj, enum memmodel) EXP is the call expression. */ diff --git a/gcc/builtins.h b/gcc/builtins.h index 2d82741..ea10b4b 100644 --- a/gcc/builtins.h +++ b/gcc/builtins.h @@ -123,6 +123,7 @@ extern void std_expand_builtin_va_start (tree, rtx); extern void expand_builtin_trap (void); extern void expand_ifn_atomic_bit_test_and (gcall *); extern void expand_ifn_atomic_compare_exchange (gcall *); +extern void expand_ifn_atomic_op_fetch_cmp_0 (gcall *); extern rtx expand_builtin (tree, rtx, rtx, machine_mode, int); extern enum built_in_function builtin_mathfn_code (const_tree); extern tree fold_builtin_expect (location_t, tree, tree, tree, tree); diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index bd42036..dbb892e 100644 --- a/gcc/c-family/c-attribs.c +++ b/gcc/c-family/c-attribs.c @@ -159,6 +159,7 @@ static tree handle_omp_declare_variant_attribute (tree *, tree, tree, int, static tree handle_simd_attribute (tree *, tree, tree, int, bool *); static tree handle_omp_declare_target_attribute (tree *, tree, tree, int, bool *); +static tree handle_non_overlapping_attribute (tree *, tree, tree, int, bool *); static tree handle_designated_init_attribute (tree *, tree, tree, int, bool *); static tree handle_patchable_function_entry_attribute (tree *, tree, tree, int, bool *); @@ -512,6 +513,8 @@ const struct attribute_spec c_common_attribute_table[] = handle_omp_declare_target_attribute, NULL }, { "omp declare target block", 0, 0, true, false, false, false, handle_omp_declare_target_attribute, NULL }, + { "non overlapping", 0, 0, true, false, false, false, + handle_non_overlapping_attribute, NULL }, { "alloc_align", 1, 1, false, true, true, false, handle_alloc_align_attribute, attr_alloc_exclusions }, @@ -3765,6 +3768,15 @@ handle_omp_declare_target_attribute (tree *, tree, tree, int, bool *) return NULL_TREE; } +/* Handle an "non overlapping" attribute; arguments as in + struct attribute_spec.handler. */ + +static tree +handle_non_overlapping_attribute (tree *, tree, tree, int, bool *) +{ + return NULL_TREE; +} + /* Handle a "returns_twice" attribute; arguments as in struct attribute_spec.handler. */ diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md index f87fa5e..36417c5 100644 --- a/gcc/config/i386/sync.md +++ b/gcc/config/i386/sync.md @@ -938,3 +938,107 @@ (const_int 0))] "" "lock{%;} %K2btr{<imodesuffix>}\t{%1, %0|%0, %1}") + +(define_expand "atomic_<plusminus_mnemonic>_fetch_cmp_0<mode>" + [(match_operand:QI 0 "register_operand") + (plusminus:SWI (match_operand:SWI 1 "memory_operand") + (match_operand:SWI 2 "nonmemory_operand")) + (match_operand:SI 3 "const_int_operand") ;; model + (match_operand:SI 4 "const_int_operand")] + "" +{ + if (INTVAL (operands[4]) == GT || INTVAL (operands[4]) == LE) + FAIL; + emit_insn (gen_atomic_<plusminus_mnemonic>_fetch_cmp_0<mode>_1 (operands[1], + operands[2], + operands[3])); + ix86_expand_setcc (operands[0], (enum rtx_code) INTVAL (operands[4]), + gen_rtx_REG (CCGOCmode, FLAGS_REG), const0_rtx); + DONE; +}) + +(define_insn "atomic_add_fetch_cmp_0<mode>_1" + [(set (reg:CCGOC FLAGS_REG) + (compare:CCGOC + (plus:SWI + (unspec_volatile:SWI + [(match_operand:SWI 0 "memory_operand" "+m") + (match_operand:SI 2 "const_int_operand")] ;; model + UNSPECV_XCHG) + (match_operand:SWI 1 "nonmemory_operand" "<r><i>")) + (const_int 0))) + (set (match_dup 0) + (plus:SWI (match_dup 0) (match_dup 1)))] + "" +{ + if (incdec_operand (operands[1], <MODE>mode)) + { + if (operands[1] == const1_rtx) + return "lock{%;} %K2inc{<imodesuffix>}\t%0"; + else + return "lock{%;} %K2dec{<imodesuffix>}\t%0"; + } + + if (x86_maybe_negate_const_int (&operands[1], <MODE>mode)) + return "lock{%;} %K2sub{<imodesuffix>}\t{%1, %0|%0, %1}"; + + return "lock{%;} %K2add{<imodesuffix>}\t{%1, %0|%0, %1}"; +}) + +(define_insn "atomic_sub_fetch_cmp_0<mode>_1" + [(set (reg:CCGOC FLAGS_REG) + (compare:CCGOC + (minus:SWI + (unspec_volatile:SWI + [(match_operand:SWI 0 "memory_operand" "+m") + (match_operand:SI 2 "const_int_operand")] ;; model + UNSPECV_XCHG) + (match_operand:SWI 1 "nonmemory_operand" "<r><i>")) + (const_int 0))) + (set (match_dup 0) + (minus:SWI (match_dup 0) (match_dup 1)))] + "" +{ + if (incdec_operand (operands[1], <MODE>mode)) + { + if (operands[1] != const1_rtx) + return "lock{%;} %K2inc{<imodesuffix>}\t%0"; + else + return "lock{%;} %K2dec{<imodesuffix>}\t%0"; + } + + if (x86_maybe_negate_const_int (&operands[1], <MODE>mode)) + return "lock{%;} %K2add{<imodesuffix>}\t{%1, %0|%0, %1}"; + + return "lock{%;} %K2sub{<imodesuffix>}\t{%1, %0|%0, %1}"; +}) + +(define_expand "atomic_<logic>_fetch_cmp_0<mode>" + [(match_operand:QI 0 "register_operand") + (any_logic:SWI (match_operand:SWI 1 "memory_operand") + (match_operand:SWI 2 "nonmemory_operand")) + (match_operand:SI 3 "const_int_operand") ;; model + (match_operand:SI 4 "const_int_operand")] + "" +{ + emit_insn (gen_atomic_<logic>_fetch_cmp_0<mode>_1 (operands[1], operands[2], + operands[3])); + ix86_expand_setcc (operands[0], (enum rtx_code) INTVAL (operands[4]), + gen_rtx_REG (CCNOmode, FLAGS_REG), const0_rtx); + DONE; +}) + +(define_insn "atomic_<logic>_fetch_cmp_0<mode>_1" + [(set (reg:CCNO FLAGS_REG) + (compare:CCNO + (any_logic:SWI + (unspec_volatile:SWI + [(match_operand:SWI 0 "memory_operand" "+m") + (match_operand:SI 2 "const_int_operand")] ;; model + UNSPECV_XCHG) + (match_operand:SWI 1 "nonmemory_operand" "<r><i>")) + (const_int 0))) + (set (match_dup 0) + (any_logic:SWI (match_dup 0) (match_dup 1)))] + "" + "lock{%;} %K2<logic>{<imodesuffix>}\t{%1, %0|%0, %1}") diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index bd5cb21..4475f79 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -4607,7 +4607,8 @@ make_char_string_pack (tree value) { tree charvec; tree argpack = make_node (NONTYPE_ARGUMENT_PACK); - const char *str = TREE_STRING_POINTER (value); + const unsigned char *str + = (const unsigned char *) TREE_STRING_POINTER (value); int i, len = TREE_STRING_LENGTH (value) - 1; tree argvec = make_tree_vec (1); diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 30ae18a..a4dedc3 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -475,6 +475,15 @@ get_tinfo_decl_direct (tree type, tree name, int pseudo_ix) DECL_IGNORED_P (d) = 1; TREE_READONLY (d) = 1; TREE_STATIC (d) = 1; + /* Tell equal_address_to that different tinfo decls never + overlap. */ + if (vec_safe_is_empty (unemitted_tinfo_decls)) + DECL_ATTRIBUTES (d) + = build_tree_list (get_identifier ("non overlapping"), + NULL_TREE); + else + DECL_ATTRIBUTES (d) + = DECL_ATTRIBUTES ((*unemitted_tinfo_decls)[0]); /* Mark the variable as undefined -- but remember that we can define it later if we need to do so. */ diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in index 06b8c89..6c90657 100644 --- a/gcc/d/Make-lang.in +++ b/gcc/d/Make-lang.in @@ -93,7 +93,6 @@ D_FRONTEND_OBJS = \ d/common-outbuffer.o \ d/common-string.o \ d/compiler.o \ - d/complex.o \ d/cond.o \ d/constfold.o \ d/cparse.o \ @@ -157,6 +156,7 @@ D_FRONTEND_OBJS = \ d/root-aav.o \ d/root-array.o \ d/root-bitarray.o \ + d/root-complex.o \ d/root-ctfloat.o \ d/root-file.o \ d/root-filename.o \ @@ -170,6 +170,7 @@ D_FRONTEND_OBJS = \ d/root-speller.o \ d/root-string.o \ d/root-stringtable.o \ + d/root-utf.o \ d/safe.o \ d/sapply.o \ d/semantic2.o \ @@ -188,7 +189,6 @@ D_FRONTEND_OBJS = \ d/transitivevisitor.o \ d/typesem.o \ d/typinf.o \ - d/utf.o \ d/utils.o \ d/visitor.o diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index b42576c..5915706 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -ad8412530e607ffebec36f2dbdff1a6f2798faf7 +001bfd97b0e75423970260dac54f453be9b57f4c 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/README.md b/gcc/d/dmd/README.md index 3cb7e12..6b91e22 100644 --- a/gcc/d/dmd/README.md +++ b/gcc/d/dmd/README.md @@ -2,12 +2,12 @@ This is the source code to the DMD compiler for the D Programming Language defined in the documents at -http://dlang.org/ +https://dlang.org/ These sources are free, they are redistributable and modifiable under the terms of the Boost Software License, Version 1.0. The terms of this license are in the file boostlicense.txt, -or see http://www.boost.org/LICENSE_1_0.txt. +or see https://www.boost.org/LICENSE_1_0.txt. If a particular file has a different license in it, that overrides this license for that file. @@ -247,12 +247,9 @@ Note: many other utilities are in [dmd/root](https://github.com/dlang/dmd/tree/m | File | Purpose | |-----------------------------------------------------------------------------------|---------------------------------------------------| -| [env.d](https://github.com/dlang/dmd/blob/master/src/dmd/env.d) | Modify environment variables | | [console.d](https://github.com/dlang/dmd/blob/master/src/dmd/console.d) | Print error messages in color | -| [utf.d](https://github.com/dlang/dmd/blob/master/src/dmd/utf.d) | Encoding/decoding Unicode text | | [file_manager.d](https://github.com/dlang/dmd/blob/master/src/dmd/file_manager.d) | Keep file contents in memory | | [utils.d](https://github.com/dlang/dmd/blob/master/src/dmd/utils.d) | Utility functions related to files and file paths | -| [complex.d](https://github.com/dlang/dmd/blob/master/src/dmd/complex.d) | A complex number type | | File | Purpose | |---------------------------------------------------------------------------------|---------------------------------------------------------------| diff --git a/gcc/d/dmd/VERSION b/gcc/d/dmd/VERSION index 822edd4..0aa03f4 100644 --- a/gcc/d/dmd/VERSION +++ b/gcc/d/dmd/VERSION @@ -1 +1 @@ -v2.098.1-beta.1 +v2.098.1 diff --git a/gcc/d/dmd/access.d b/gcc/d/dmd/access.d index d8a6517..51ef049 100644 --- a/gcc/d/dmd/access.d +++ b/gcc/d/dmd/access.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/attribute.html#visibility_attributes, Visibility Attributes) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/access.d, _access.d) * Documentation: https://dlang.org/phobos/dmd_access.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/access.d diff --git a/gcc/d/dmd/aggregate.d b/gcc/d/dmd/aggregate.d index dc772e8..1add36a 100644 --- a/gcc/d/dmd/aggregate.d +++ b/gcc/d/dmd/aggregate.d @@ -4,9 +4,9 @@ * Specification: $(LINK2 https://dlang.org/spec/struct.html, Structs, Unions), * $(LINK2 https://dlang.org/spec/class.html, Class). * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/aggregate.d, _aggregate.d) * Documentation: https://dlang.org/phobos/dmd_aggregate.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/aggregate.d diff --git a/gcc/d/dmd/aggregate.h b/gcc/d/dmd/aggregate.h index 48e5f4a..796144a 100644 --- a/gcc/d/dmd/aggregate.h +++ b/gcc/d/dmd/aggregate.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/aggregate.h */ diff --git a/gcc/d/dmd/aliasthis.d b/gcc/d/dmd/aliasthis.d index 80db47d..458e821 100644 --- a/gcc/d/dmd/aliasthis.d +++ b/gcc/d/dmd/aliasthis.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/class.html#alias-this, Alias This) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/aliasthis.d, _aliasthis.d) * Documentation: https://dlang.org/phobos/dmd_aliasthis.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/aliasthis.d diff --git a/gcc/d/dmd/aliasthis.h b/gcc/d/dmd/aliasthis.h index de93a8e..3b67903 100644 --- a/gcc/d/dmd/aliasthis.h +++ b/gcc/d/dmd/aliasthis.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2009-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2009-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/aliasthis.h */ diff --git a/gcc/d/dmd/apply.d b/gcc/d/dmd/apply.d index ab427e8..75b4af1 100644 --- a/gcc/d/dmd/apply.d +++ b/gcc/d/dmd/apply.d @@ -1,9 +1,9 @@ /** * A depth-first visitor for expressions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/apply.d, _apply.d) * Documentation: https://dlang.org/phobos/dmd_apply.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/apply.d diff --git a/gcc/d/dmd/arrayop.d b/gcc/d/dmd/arrayop.d index a234501..e82413f 100644 --- a/gcc/d/dmd/arrayop.d +++ b/gcc/d/dmd/arrayop.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/arrays.html#array-operations, Array Operations) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/arrayop.d, _arrayop.d) * Documentation: https://dlang.org/phobos/dmd_arrayop.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/arrayop.d diff --git a/gcc/d/dmd/arraytypes.d b/gcc/d/dmd/arraytypes.d index b1f8d86..ffbaf95 100644 --- a/gcc/d/dmd/arraytypes.d +++ b/gcc/d/dmd/arraytypes.d @@ -1,9 +1,9 @@ /** * Provide aliases for arrays of certain declarations or statements. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/arraytypes.d, _arraytypes.d) * Documentation: https://dlang.org/phobos/dmd_arraytypes.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/arraytypes.d diff --git a/gcc/d/dmd/arraytypes.h b/gcc/d/dmd/arraytypes.h index 602d890..d7dfa0b 100644 --- a/gcc/d/dmd/arraytypes.h +++ b/gcc/d/dmd/arraytypes.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2006-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2006-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/arraytypes.h */ diff --git a/gcc/d/dmd/ast_node.d b/gcc/d/dmd/ast_node.d index 82d62a0..843cc02 100644 --- a/gcc/d/dmd/ast_node.d +++ b/gcc/d/dmd/ast_node.d @@ -1,9 +1,9 @@ /** * Defines the base class for all nodes which are part of the AST. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ast_node.d, _ast_node.d) * Documentation: https://dlang.org/phobos/dmd_ast_node.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ast_node.d diff --git a/gcc/d/dmd/ast_node.h b/gcc/d/dmd/ast_node.h index 5576dd7..0e04e38 100644 --- a/gcc/d/dmd/ast_node.h +++ b/gcc/d/dmd/ast_node.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/ast_node.h */ diff --git a/gcc/d/dmd/astenums.d b/gcc/d/dmd/astenums.d index f638765..3e86cfa 100644 --- a/gcc/d/dmd/astenums.d +++ b/gcc/d/dmd/astenums.d @@ -1,8 +1,8 @@ /** * Defines enums common to dmd and dmd as parse library. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/astenums.d, _astenums.d) * Documentation: https://dlang.org/phobos/dmd_astenums.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/astenums.d diff --git a/gcc/d/dmd/attrib.d b/gcc/d/dmd/attrib.d index e8704aa..5d44760 100644 --- a/gcc/d/dmd/attrib.d +++ b/gcc/d/dmd/attrib.d @@ -14,9 +14,9 @@ * - Protection (`private`, `public`) * - Deprecated declarations (`@deprecated`) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/attrib.d, _attrib.d) * Documentation: https://dlang.org/phobos/dmd_attrib.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/attrib.d diff --git a/gcc/d/dmd/attrib.h b/gcc/d/dmd/attrib.h index e63c80b..812729b 100644 --- a/gcc/d/dmd/attrib.h +++ b/gcc/d/dmd/attrib.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/attrib.h */ diff --git a/gcc/d/dmd/blockexit.d b/gcc/d/dmd/blockexit.d index 5945644..c4a9577 100644 --- a/gcc/d/dmd/blockexit.d +++ b/gcc/d/dmd/blockexit.d @@ -1,9 +1,9 @@ /** * Find out in what ways control flow can exit a statement block. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/blockexit.d, _blockexit.d) * Documentation: https://dlang.org/phobos/dmd_blockexit.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/blockexit.d diff --git a/gcc/d/dmd/builtin.d b/gcc/d/dmd/builtin.d index 2f5b6c7..06db97b 100644 --- a/gcc/d/dmd/builtin.d +++ b/gcc/d/dmd/builtin.d @@ -3,9 +3,9 @@ * * Currently includes functions from `std.math`, `core.math` and `core.bitop`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/builtin.d, _builtin.d) * Documentation: https://dlang.org/phobos/dmd_builtin.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/builtin.d diff --git a/gcc/d/dmd/canthrow.d b/gcc/d/dmd/canthrow.d index b187715..e6eb0ac 100644 --- a/gcc/d/dmd/canthrow.d +++ b/gcc/d/dmd/canthrow.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/function.html#nothrow-functions, Nothrow Functions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/canthrow.d, _canthrow.d) * Documentation: https://dlang.org/phobos/dmd_canthrow.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/canthrow.d diff --git a/gcc/d/dmd/chkformat.d b/gcc/d/dmd/chkformat.d index b168b4f..a3f3bc4 100644 --- a/gcc/d/dmd/chkformat.d +++ b/gcc/d/dmd/chkformat.d @@ -1,9 +1,9 @@ /** * Check the arguments to `printf` and `scanf` against the `format` string. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/chkformat.d, _chkformat.d) * Documentation: https://dlang.org/phobos/dmd_chkformat.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/chkformat.d @@ -57,7 +57,7 @@ import dmd.target; * `true` if errors occurred * References: * C99 7.19.6.1 - * http://www.cplusplus.com/reference/cstdio/printf/ + * https://www.cplusplus.com/reference/cstdio/printf/ */ bool checkPrintfFormat(ref const Loc loc, scope const char[] format, scope Expression[] args, bool isVa_list) { @@ -331,7 +331,7 @@ bool checkPrintfFormat(ref const Loc loc, scope const char[] format, scope Expre * `true` if errors occurred * References: * C99 7.19.6.2 - * http://www.cplusplus.com/reference/cstdio/scanf/ + * https://www.cplusplus.com/reference/cstdio/scanf/ */ bool checkScanfFormat(ref const Loc loc, scope const char[] format, scope Expression[] args, bool isVa_list) { @@ -955,7 +955,7 @@ Format parseGenericFormatSpecifier(scope const char[] format, case 'm': if (useGNUExts) { - // http://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html + // https://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html specifier = Format.GNU_m; break; } diff --git a/gcc/d/dmd/clone.d b/gcc/d/dmd/clone.d index c536d25..1a143cb 100644 --- a/gcc/d/dmd/clone.d +++ b/gcc/d/dmd/clone.d @@ -2,9 +2,9 @@ * Builds struct member functions if needed and not defined by the user. * Includes `opEquals`, `opAssign`, post blit, copy constructor and destructor. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/clone.d, _clone.d) * Documentation: https://dlang.org/phobos/dmd_clone.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/clone.d diff --git a/gcc/d/dmd/common/file.d b/gcc/d/dmd/common/file.d index b8cde37..e4483d5 100644 --- a/gcc/d/dmd/common/file.d +++ b/gcc/d/dmd/common/file.d @@ -4,9 +4,9 @@ * Functions and objects dedicated to file I/O and management. TODO: Move here artifacts * from places such as root/ so both the frontend and the backend have access to them. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/file.d, common/_file.d) * Documentation: https://dlang.org/phobos/dmd_common_file.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/file.d diff --git a/gcc/d/dmd/common/outbuffer.d b/gcc/d/dmd/common/outbuffer.d index c5a8437..e5cc43b 100644 --- a/gcc/d/dmd/common/outbuffer.d +++ b/gcc/d/dmd/common/outbuffer.d @@ -1,9 +1,9 @@ /** * An expandable buffer in which you can write text or binary data. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/outbuffer.d, root/_outbuffer.d) * Documentation: https://dlang.org/phobos/dmd_root_outbuffer.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/outbuffer.d diff --git a/gcc/d/dmd/common/outbuffer.h b/gcc/d/dmd/common/outbuffer.h index ce23436..fed25c0 100644 --- a/gcc/d/dmd/common/outbuffer.h +++ b/gcc/d/dmd/common/outbuffer.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/common/outbuffer.h */ diff --git a/gcc/d/dmd/common/string.d b/gcc/d/dmd/common/string.d index 026374a..d3bc24f 100644 --- a/gcc/d/dmd/common/string.d +++ b/gcc/d/dmd/common/string.d @@ -1,9 +1,9 @@ /** * Common string functions including filename manipulation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/string.d, common/_string.d) * Documentation: https://dlang.org/phobos/dmd_common_string.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/string.d diff --git a/gcc/d/dmd/compiler.d b/gcc/d/dmd/compiler.d index 28f9ba6..dd26d40 100644 --- a/gcc/d/dmd/compiler.d +++ b/gcc/d/dmd/compiler.d @@ -1,9 +1,9 @@ /** * Describes a back-end compiler and implements compiler-specific actions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/compiler.d, _compiler.d) * Documentation: https://dlang.org/phobos/dmd_compiler.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/compiler.d diff --git a/gcc/d/dmd/compiler.h b/gcc/d/dmd/compiler.h index 27e87b6..e8b7704 100644 --- a/gcc/d/dmd/compiler.h +++ b/gcc/d/dmd/compiler.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/compiler.h */ diff --git a/gcc/d/dmd/cond.d b/gcc/d/dmd/cond.d index abf2814..dee0a17 100644 --- a/gcc/d/dmd/cond.d +++ b/gcc/d/dmd/cond.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/version.html, Conditional Compilation) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cond.d, _cond.d) * Documentation: https://dlang.org/phobos/dmd_cond.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cond.d diff --git a/gcc/d/dmd/cond.h b/gcc/d/dmd/cond.h index 4f26116..d69c13e 100644 --- a/gcc/d/dmd/cond.h +++ b/gcc/d/dmd/cond.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/cond.h */ diff --git a/gcc/d/dmd/constfold.d b/gcc/d/dmd/constfold.d index 3cc358e..76e1d7f 100644 --- a/gcc/d/dmd/constfold.d +++ b/gcc/d/dmd/constfold.d @@ -5,9 +5,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/float.html#fp_const_folding, Floating Point Constant Folding) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/constfold.d, _constfold.d) * Documentation: https://dlang.org/phobos/dmd_constfold.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/constfold.d @@ -19,7 +19,6 @@ import core.stdc.string; import core.stdc.stdio; import dmd.arraytypes; import dmd.astenums; -import dmd.complex; import dmd.ctfeexpr; import dmd.declaration; import dmd.dstruct; @@ -27,13 +26,14 @@ import dmd.errors; import dmd.expression; import dmd.globals; import dmd.mtype; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.root.port; import dmd.root.rmem; +import dmd.root.utf; import dmd.sideeffect; import dmd.target; import dmd.tokens; -import dmd.utf; private enum LOG = false; diff --git a/gcc/d/dmd/cparse.d b/gcc/d/dmd/cparse.d index b1532ad..8d3f3b3 100644 --- a/gcc/d/dmd/cparse.d +++ b/gcc/d/dmd/cparse.d @@ -3,9 +3,9 @@ * * Specification: C11 * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d, _cparse.d) * Documentation: https://dlang.org/phobos/dmd_cparse.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cparse.d diff --git a/gcc/d/dmd/cppmangle.d b/gcc/d/dmd/cppmangle.d index 4ad79da..7cb2092 100644 --- a/gcc/d/dmd/cppmangle.d +++ b/gcc/d/dmd/cppmangle.d @@ -4,9 +4,9 @@ * This is the POSIX side of the implementation. * It exports two functions to C++, `toCppMangleItanium` and `cppTypeInfoMangleItanium`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cppmangle.d, _cppmangle.d) * Documentation: https://dlang.org/phobos/dmd_cppmangle.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cppmangle.d diff --git a/gcc/d/dmd/ctfe.h b/gcc/d/dmd/ctfe.h index 242dd55..5979aa7 100644 --- a/gcc/d/dmd/ctfe.h +++ b/gcc/d/dmd/ctfe.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/ctfe.h */ diff --git a/gcc/d/dmd/ctfeexpr.d b/gcc/d/dmd/ctfeexpr.d index baacaa6..43dce4b 100644 --- a/gcc/d/dmd/ctfeexpr.d +++ b/gcc/d/dmd/ctfeexpr.d @@ -1,9 +1,9 @@ /** * CTFE for expressions involving pointers, slices, array concatenation etc. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ctfeexpr.d, _ctfeexpr.d) * Documentation: https://dlang.org/phobos/dmd_ctfeexpr.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ctfeexpr.d @@ -16,7 +16,6 @@ import core.stdc.stdlib; import core.stdc.string; import dmd.arraytypes; import dmd.astenums; -import dmd.complex; import dmd.constfold; import dmd.compiler; import dmd.dclass; @@ -29,6 +28,7 @@ import dmd.expression; import dmd.func; import dmd.globals; import dmd.mtype; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.root.port; import dmd.root.rmem; @@ -1362,6 +1362,15 @@ private int ctfeRawCmp(const ref Loc loc, Expression e1, Expression e2, bool ide mem.xfree(used); return 0; } + else if (e1.op == EXP.assocArrayLiteral && e2.op == EXP.null_) + { + return e1.isAssocArrayLiteralExp.keys.dim != 0; + } + else if (e1.op == EXP.null_ && e2.op == EXP.assocArrayLiteral) + { + return e2.isAssocArrayLiteralExp.keys.dim != 0; + } + error(loc, "CTFE internal error: bad compare of `%s` and `%s`", e1.toChars(), e2.toChars()); assert(0); } @@ -1553,7 +1562,7 @@ Expression ctfeIndex(UnionExp* pue, const ref Loc loc, Type type, Expression e1, { if (indx >= es1.len) { - error(loc, "string index %llu is out of bounds `[0 .. %zu]`", indx, es1.len); + error(loc, "string index %llu is out of bounds `[0 .. %llu]`", indx, cast(ulong)es1.len); return CTFEExp.cantexp; } emplaceExp!IntegerExp(pue, loc, es1.charAt(indx), type); @@ -1564,7 +1573,7 @@ Expression ctfeIndex(UnionExp* pue, const ref Loc loc, Type type, Expression e1, { if (indx >= ale.elements.dim) { - error(loc, "array index %llu is out of bounds `%s[0 .. %zu]`", indx, e1.toChars(), ale.elements.dim); + error(loc, "array index %llu is out of bounds `%s[0 .. %llu]`", indx, e1.toChars(), cast(ulong)ale.elements.dim); return CTFEExp.cantexp; } Expression e = (*ale.elements)[cast(size_t)indx]; diff --git a/gcc/d/dmd/ctorflow.d b/gcc/d/dmd/ctorflow.d index c8b61be..cc251b0 100644 --- a/gcc/d/dmd/ctorflow.d +++ b/gcc/d/dmd/ctorflow.d @@ -1,9 +1,9 @@ /** * Manage flow analysis for constructors. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ctorflow.d, _ctorflow.d) * Documentation: https://dlang.org/phobos/dmd_ctorflow.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ctorflow.d diff --git a/gcc/d/dmd/dcast.d b/gcc/d/dmd/dcast.d index a572a1f..4a80d17 100644 --- a/gcc/d/dmd/dcast.d +++ b/gcc/d/dmd/dcast.d @@ -1,9 +1,9 @@ /** * Semantic analysis for cast-expressions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dcast.d, _dcast.d) * Documentation: https://dlang.org/phobos/dmd_dcast.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dcast.d @@ -40,9 +40,9 @@ import dmd.opover; import dmd.root.ctfloat; import dmd.common.outbuffer; import dmd.root.rmem; +import dmd.root.utf; import dmd.tokens; import dmd.typesem; -import dmd.utf; import dmd.visitor; enum LOG = false; diff --git a/gcc/d/dmd/dclass.d b/gcc/d/dmd/dclass.d index 34a236b..1fb4779 100644 --- a/gcc/d/dmd/dclass.d +++ b/gcc/d/dmd/dclass.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/class.html, Classes) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dclass.d, _dclass.d) * Documentation: https://dlang.org/phobos/dmd_dclass.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dclass.d diff --git a/gcc/d/dmd/declaration.d b/gcc/d/dmd/declaration.d index 18c8ca2..aa143d4 100644 --- a/gcc/d/dmd/declaration.d +++ b/gcc/d/dmd/declaration.d @@ -2,9 +2,9 @@ * Miscellaneous declarations, including typedef, alias, variable declarations including the * implicit this declaration, type tuples, ClassInfo, ModuleInfo and various TypeInfos. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/declaration.d, _declaration.d) * Documentation: https://dlang.org/phobos/dmd_declaration.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/declaration.d diff --git a/gcc/d/dmd/declaration.h b/gcc/d/dmd/declaration.h index 884146e..353d36c 100644 --- a/gcc/d/dmd/declaration.h +++ b/gcc/d/dmd/declaration.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/declaration.h */ diff --git a/gcc/d/dmd/delegatize.d b/gcc/d/dmd/delegatize.d index 07c1bbd..77e09bc 100644 --- a/gcc/d/dmd/delegatize.d +++ b/gcc/d/dmd/delegatize.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/function.html#lazy-params, Lazy Parameters) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/delegatize.d, _delegatize.d) * Documentation: https://dlang.org/phobos/dmd_delegatize.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/delegatize.d diff --git a/gcc/d/dmd/denum.d b/gcc/d/dmd/denum.d index 54467d8..dd6dd41 100644 --- a/gcc/d/dmd/denum.d +++ b/gcc/d/dmd/denum.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/enum.html, Enums) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/denum.d, _denum.d) * Documentation: https://dlang.org/phobos/dmd_denum.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/denum.d diff --git a/gcc/d/dmd/dimport.d b/gcc/d/dmd/dimport.d index 8cd4364..156cce2 100644 --- a/gcc/d/dmd/dimport.d +++ b/gcc/d/dmd/dimport.d @@ -1,9 +1,9 @@ /** * A `Dsymbol` representing a renamed import. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dimport.d, _dimport.d) * Documentation: https://dlang.org/phobos/dmd_dimport.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dimport.d diff --git a/gcc/d/dmd/dinterpret.d b/gcc/d/dmd/dinterpret.d index fc5b9a8..fb8ed9b 100644 --- a/gcc/d/dmd/dinterpret.d +++ b/gcc/d/dmd/dinterpret.d @@ -3,9 +3,9 @@ * * Specification: ($LINK2 https://dlang.org/spec/function.html#interpretation, Compile Time Function Execution (CTFE)) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dinterpret.d, _dinterpret.d) * Documentation: https://dlang.org/phobos/dmd_dinterpret.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dinterpret.d @@ -46,9 +46,9 @@ import dmd.root.array; import dmd.root.ctfloat; import dmd.root.region; import dmd.root.rootobject; +import dmd.root.utf; import dmd.statement; import dmd.tokens; -import dmd.utf; import dmd.visitor; /************************************* diff --git a/gcc/d/dmd/dmacro.d b/gcc/d/dmd/dmacro.d index 357f7bd..0e891fb 100644 --- a/gcc/d/dmd/dmacro.d +++ b/gcc/d/dmd/dmacro.d @@ -1,9 +1,9 @@ /** * Text macro processor for Ddoc. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmacro.d, _dmacro.d) * Documentation: https://dlang.org/phobos/dmd_dmacro.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmacro.d diff --git a/gcc/d/dmd/dmangle.d b/gcc/d/dmd/dmangle.d index 0659680..78d17b2 100644 --- a/gcc/d/dmd/dmangle.d +++ b/gcc/d/dmd/dmangle.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/abi.html#name_mangling, Name Mangling) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmangle.d, _dmangle.d) * Documentation: https://dlang.org/phobos/dmd_dmangle.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmangle.d @@ -143,9 +143,9 @@ import dmd.common.outbuffer; import dmd.root.aav; import dmd.root.string; import dmd.root.stringtable; +import dmd.root.utf; import dmd.target; import dmd.tokens; -import dmd.utf; import dmd.visitor; private immutable char[TMAX] mangleChar = diff --git a/gcc/d/dmd/dmodule.d b/gcc/d/dmd/dmodule.d index 4e00713..46e89d0 100644 --- a/gcc/d/dmd/dmodule.d +++ b/gcc/d/dmd/dmodule.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/module.html, Modules) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmodule.d, _dmodule.d) * Documentation: https://dlang.org/phobos/dmd_dmodule.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmodule.d @@ -837,7 +837,7 @@ extern (C++) final class Module : Package if (buf.length >= 2) { /* Convert all non-UTF-8 formats to UTF-8. - * BOM : http://www.unicode.org/faq/utf_bom.html + * BOM : https://www.unicode.org/faq/utf_bom.html * 00 00 FE FF UTF-32BE, big-endian * FF FE 00 00 UTF-32LE, little-endian * FE FF UTF-16BE, big-endian diff --git a/gcc/d/dmd/doc.d b/gcc/d/dmd/doc.d index f9b765c..d03b5bb 100644 --- a/gcc/d/dmd/doc.d +++ b/gcc/d/dmd/doc.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/ddoc.html, Documentation Generator) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/doc.d, _doc.d) * Documentation: https://dlang.org/phobos/dmd_doc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/doc.d @@ -49,8 +49,8 @@ import dmd.common.outbuffer; import dmd.root.port; import dmd.root.rmem; import dmd.root.string; +import dmd.root.utf; import dmd.tokens; -import dmd.utf; import dmd.utils; import dmd.visitor; diff --git a/gcc/d/dmd/doc.h b/gcc/d/dmd/doc.h index a144417..8dc2d9f 100644 --- a/gcc/d/dmd/doc.h +++ b/gcc/d/dmd/doc.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/doc.h */ diff --git a/gcc/d/dmd/dscope.d b/gcc/d/dmd/dscope.d index 42c0d18..07ebc27 100644 --- a/gcc/d/dmd/dscope.d +++ b/gcc/d/dmd/dscope.d @@ -3,9 +3,9 @@ * * Not to be confused with the `scope` storage class. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dscope.d, _dscope.d) * Documentation: https://dlang.org/phobos/dmd_dscope.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dscope.d diff --git a/gcc/d/dmd/dstruct.d b/gcc/d/dmd/dstruct.d index 1f05642..de5f145 100644 --- a/gcc/d/dmd/dstruct.d +++ b/gcc/d/dmd/dstruct.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/struct.html, Structs, Unions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dstruct.d, _dstruct.d) * Documentation: https://dlang.org/phobos/dmd_dstruct.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dstruct.d diff --git a/gcc/d/dmd/dsymbol.d b/gcc/d/dmd/dsymbol.d index e34a94a..c4b3380 100644 --- a/gcc/d/dmd/dsymbol.d +++ b/gcc/d/dmd/dsymbol.d @@ -1,9 +1,9 @@ /** * The base class for a D symbol, which can be a module, variable, function, enum, etc. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dsymbol.d, _dsymbol.d) * Documentation: https://dlang.org/phobos/dmd_dsymbol.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dsymbol.d diff --git a/gcc/d/dmd/dsymbol.h b/gcc/d/dmd/dsymbol.h index 668b079..a6bd999 100644 --- a/gcc/d/dmd/dsymbol.h +++ b/gcc/d/dmd/dsymbol.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/dsymbol.h */ diff --git a/gcc/d/dmd/dsymbolsem.d b/gcc/d/dmd/dsymbolsem.d index 118b861..387dfe3 100644 --- a/gcc/d/dmd/dsymbolsem.d +++ b/gcc/d/dmd/dsymbolsem.d @@ -2,9 +2,9 @@ * Does the semantic 1 pass on the AST, which looks at symbol declarations but not initializers * or function bodies. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dsymbolsem.d, _dsymbolsem.d) * Documentation: https://dlang.org/phobos/dmd_dsymbolsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dsymbolsem.d @@ -60,13 +60,13 @@ import dmd.root.filename; import dmd.common.outbuffer; import dmd.root.rmem; import dmd.root.rootobject; +import dmd.root.utf; import dmd.semantic2; import dmd.semantic3; import dmd.sideeffect; import dmd.statementsem; import dmd.staticassert; import dmd.tokens; -import dmd.utf; import dmd.utils; import dmd.statement; import dmd.target; diff --git a/gcc/d/dmd/dtemplate.d b/gcc/d/dmd/dtemplate.d index b1760dd..c0d17f7 100644 --- a/gcc/d/dmd/dtemplate.d +++ b/gcc/d/dmd/dtemplate.d @@ -28,9 +28,9 @@ * arguments, and uses it if found. * - Otherwise, the rest of semantic is run on the `TemplateInstance`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dtemplate.d, _dtemplate.d) * Documentation: https://dlang.org/phobos/dmd_dtemplate.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dtemplate.d diff --git a/gcc/d/dmd/dtoh.d b/gcc/d/dmd/dtoh.d index 51f53c8..dbc21b3 100644 --- a/gcc/d/dmd/dtoh.d +++ b/gcc/d/dmd/dtoh.d @@ -2,9 +2,9 @@ * This module contains the implementation of the C++ header generation available through * the command line switch -Hc. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dtohd, _dtoh.d) * Documentation: https://dlang.org/phobos/dmd_dtoh.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dtoh.d diff --git a/gcc/d/dmd/dversion.d b/gcc/d/dmd/dversion.d index 49ee4b3..94753bb 100644 --- a/gcc/d/dmd/dversion.d +++ b/gcc/d/dmd/dversion.d @@ -4,9 +4,9 @@ * Specification: $(LINK2 https://dlang.org/spec/version.html#version-specification, Version Specification), * $(LINK2 https://dlang.org/spec/version.html#debug_specification, Debug Specification). * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dversion.d, _dversion.d) * Documentation: https://dlang.org/phobos/dmd_dversion.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dversion.d diff --git a/gcc/d/dmd/entity.d b/gcc/d/dmd/entity.d index f22dfdb..ef2fdef 100644 --- a/gcc/d/dmd/entity.d +++ b/gcc/d/dmd/entity.d @@ -3,9 +3,9 @@ * * Specification $(LINK2 https://dlang.org/spec/entity.html, Named Character Entities) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/entity.d, _entity.d) * Documentation: https://dlang.org/phobos/dmd_entity.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/entity.d @@ -36,8 +36,8 @@ private: /********************************************* * Convert from named entity to its encoding. * For reference: - * http://www.htmlhelp.com/reference/html40/entities/ - * http://www.w3.org/2003/entities/2007/w3centities-f.ent + * https://www.htmlhelp.com/reference/html40/entities/ + * https://www.w3.org/2003/entities/2007/w3centities-f.ent */ struct NameId { diff --git a/gcc/d/dmd/enum.h b/gcc/d/dmd/enum.h index 76c1235..ab80c8b 100644 --- a/gcc/d/dmd/enum.h +++ b/gcc/d/dmd/enum.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/enum.h */ diff --git a/gcc/d/dmd/errors.d b/gcc/d/dmd/errors.d index 91a5c77..114bd44 100644 --- a/gcc/d/dmd/errors.d +++ b/gcc/d/dmd/errors.d @@ -1,9 +1,9 @@ /** * Functions for raising errors. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/errors.d, _errors.d) * Documentation: https://dlang.org/phobos/dmd_errors.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/errors.d diff --git a/gcc/d/dmd/errors.h b/gcc/d/dmd/errors.h index 6d9587d..000242c 100644 --- a/gcc/d/dmd/errors.h +++ b/gcc/d/dmd/errors.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/errors.h */ diff --git a/gcc/d/dmd/escape.d b/gcc/d/dmd/escape.d index 62f87e5..e60ee9c 100644 --- a/gcc/d/dmd/escape.d +++ b/gcc/d/dmd/escape.d @@ -1,9 +1,9 @@ /** * Most of the logic to implement scoped pointers and scoped references is here. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/escape.d, _escape.d) * Documentation: https://dlang.org/phobos/dmd_escape.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/escape.d diff --git a/gcc/d/dmd/expression.d b/gcc/d/dmd/expression.d index 749a50a..523015e 100644 --- a/gcc/d/dmd/expression.d +++ b/gcc/d/dmd/expression.d @@ -3,9 +3,9 @@ * * Specification: ($LINK2 https://dlang.org/spec/expression.html, Expressions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/expression.d, _expression.d) * Documentation: https://dlang.org/phobos/dmd_expression.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expression.d @@ -26,7 +26,6 @@ import dmd.astenums; import dmd.ast_node; import dmd.gluelayer; import dmd.canthrow; -import dmd.complex; import dmd.constfold; import dmd.ctfeexpr; import dmd.ctorflow; @@ -57,6 +56,7 @@ import dmd.nspace; import dmd.objc; import dmd.opover; import dmd.optimize; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.root.filename; import dmd.common.outbuffer; @@ -64,12 +64,12 @@ import dmd.root.optional; import dmd.root.rmem; import dmd.root.rootobject; import dmd.root.string; +import dmd.root.utf; import dmd.safe; import dmd.sideeffect; import dmd.target; import dmd.tokens; import dmd.typesem; -import dmd.utf; import dmd.visitor; enum LOGSEMANTIC = false; @@ -659,7 +659,7 @@ enum WANTvalue = 0; // default enum WANTexpand = 1; // expand const/immutable variables if possible /*********************************************************** - * http://dlang.org/spec/expression.html#expression + * https://dlang.org/spec/expression.html#expression */ extern (C++) abstract class Expression : ASTNode { @@ -2262,7 +2262,7 @@ extern (C++) final class DsymbolExp : Expression } /*********************************************************** - * http://dlang.org/spec/expression.html#this + * https://dlang.org/spec/expression.html#this */ extern (C++) class ThisExp : Expression { @@ -2318,7 +2318,7 @@ extern (C++) class ThisExp : Expression } /*********************************************************** - * http://dlang.org/spec/expression.html#super + * https://dlang.org/spec/expression.html#super */ extern (C++) final class SuperExp : ThisExp { @@ -2334,7 +2334,7 @@ extern (C++) final class SuperExp : ThisExp } /*********************************************************** - * http://dlang.org/spec/expression.html#null + * https://dlang.org/spec/expression.html#null */ extern (C++) final class NullExp : Expression { @@ -2380,7 +2380,7 @@ extern (C++) final class NullExp : Expression } /*********************************************************** - * http://dlang.org/spec/expression.html#string_literals + * https://dlang.org/spec/expression.html#string_literals */ extern (C++) final class StringExp : Expression { @@ -2904,7 +2904,7 @@ extern (C++) final class TupleExp : Expression /*********************************************************** * [ e1, e2, e3, ... ] * - * http://dlang.org/spec/expression.html#array_literals + * https://dlang.org/spec/expression.html#array_literals */ extern (C++) final class ArrayLiteralExp : Expression { @@ -3069,7 +3069,7 @@ extern (C++) final class ArrayLiteralExp : Expression /*********************************************************** * [ key0 : value0, key1 : value1, ... ] * - * http://dlang.org/spec/expression.html#associative_array_literals + * https://dlang.org/spec/expression.html#associative_array_literals */ extern (C++) final class AssocArrayLiteralExp : Expression { @@ -5423,7 +5423,7 @@ extern (C++) final class VectorArrayExp : UnaExp /*********************************************************** * e1 [lwr .. upr] * - * http://dlang.org/spec/expression.html#slice_expressions + * https://dlang.org/spec/expression.html#slice_expressions */ extern (C++) final class SliceExp : UnaExp { @@ -5506,7 +5506,7 @@ extern (C++) final class ArrayLengthExp : UnaExp /*********************************************************** * e1 [ a0, a1, a2, a3 ,... ] * - * http://dlang.org/spec/expression.html#index_expressions + * https://dlang.org/spec/expression.html#index_expressions */ extern (C++) final class ArrayExp : UnaExp { @@ -6208,7 +6208,7 @@ extern (C++) final class CatDcharAssignExp : CatAssignExp } /*********************************************************** - * http://dlang.org/spec/expression.html#add_expressions + * https://dlang.org/spec/expression.html#add_expressions */ extern (C++) final class AddExp : BinExp { @@ -6239,7 +6239,7 @@ extern (C++) final class MinExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#cat_expressions + * https://dlang.org/spec/expression.html#cat_expressions */ extern (C++) final class CatExp : BinExp { @@ -6262,7 +6262,7 @@ extern (C++) final class CatExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#mul_expressions + * https://dlang.org/spec/expression.html#mul_expressions */ extern (C++) final class MulExp : BinExp { @@ -6278,7 +6278,7 @@ extern (C++) final class MulExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#mul_expressions + * https://dlang.org/spec/expression.html#mul_expressions */ extern (C++) final class DivExp : BinExp { @@ -6294,7 +6294,7 @@ extern (C++) final class DivExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#mul_expressions + * https://dlang.org/spec/expression.html#mul_expressions */ extern (C++) final class ModExp : BinExp { @@ -6310,7 +6310,7 @@ extern (C++) final class ModExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#pow_expressions + * https://dlang.org/spec/expression.html#pow_expressions */ extern (C++) final class PowExp : BinExp { @@ -6416,8 +6416,8 @@ extern (C++) final class XorExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#andand_expressions - * http://dlang.org/spec/expression.html#oror_expressions + * https://dlang.org/spec/expression.html#andand_expressions + * https://dlang.org/spec/expression.html#oror_expressions */ extern (C++) final class LogicalExp : BinExp { @@ -6437,7 +6437,7 @@ extern (C++) final class LogicalExp : BinExp * `op` is one of: * EXP.lessThan, EXP.lessOrEqual, EXP.greaterThan, EXP.greaterOrEqual * - * http://dlang.org/spec/expression.html#relation_expressions + * https://dlang.org/spec/expression.html#relation_expressions */ extern (C++) final class CmpExp : BinExp { @@ -6490,7 +6490,7 @@ extern (C++) final class RemoveExp : BinExp * * EXP.equal and EXP.notEqual * - * http://dlang.org/spec/expression.html#equality_expressions + * https://dlang.org/spec/expression.html#equality_expressions */ extern (C++) final class EqualExp : BinExp { @@ -6511,7 +6511,7 @@ extern (C++) final class EqualExp : BinExp * * EXP.identity and EXP.notIdentity * - * http://dlang.org/spec/expression.html#identity_expressions + * https://dlang.org/spec/expression.html#identity_expressions */ extern (C++) final class IdentityExp : BinExp { @@ -6530,7 +6530,7 @@ extern (C++) final class IdentityExp : BinExp /*********************************************************** * `econd ? e1 : e2` * - * http://dlang.org/spec/expression.html#conditional_expressions + * https://dlang.org/spec/expression.html#conditional_expressions */ extern (C++) final class CondExp : BinExp { diff --git a/gcc/d/dmd/expression.h b/gcc/d/dmd/expression.h index 411822c..f848cce 100644 --- a/gcc/d/dmd/expression.h +++ b/gcc/d/dmd/expression.h @@ -1,22 +1,22 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/expression.h */ #pragma once #include "ast_node.h" -#include "complex_t.h" #include "globals.h" #include "arraytypes.h" #include "visitor.h" #include "tokens.h" +#include "root/complex_t.h" #include "root/dcompat.h" #include "root/optional.h" diff --git a/gcc/d/dmd/expressionsem.d b/gcc/d/dmd/expressionsem.d index 2f1cd47..1008606 100644 --- a/gcc/d/dmd/expressionsem.d +++ b/gcc/d/dmd/expressionsem.d @@ -3,9 +3,9 @@ * * Specification: ($LINK2 https://dlang.org/spec/expression.html, Expressions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/expressionsem.d, _expressionsem.d) * Documentation: https://dlang.org/phobos/dmd_expressionsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expressionsem.d @@ -67,6 +67,7 @@ import dmd.root.filename; import dmd.common.outbuffer; import dmd.root.rootobject; import dmd.root.string; +import dmd.root.utf; import dmd.semantic2; import dmd.semantic3; import dmd.sideeffect; @@ -76,7 +77,6 @@ import dmd.tokens; import dmd.traits; import dmd.typesem; import dmd.typinf; -import dmd.utf; import dmd.utils; import dmd.visitor; @@ -5980,7 +5980,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor /* Be wary of CWE-22: Improper Limitation of a Pathname to a Restricted Directory * ('Path Traversal') attacks. - * http://cwe.mitre.org/data/definitions/22.html + * https://cwe.mitre.org/data/definitions/22.html */ if (FileName.absolute(namez)) @@ -6013,7 +6013,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor const attr = FileName.exists(path); const(char)* err = attr == 2 ? "" : (attr == 1 ? " (not a directory)" : " (path not found)"); - e.errorSupplemental("[%zu]: `%s`%s", idx, path, err); + e.errorSupplemental("[%llu]: `%s`%s", cast(ulong)idx, path, err); } return setError(); } @@ -13108,7 +13108,7 @@ private bool fit(StructDeclaration sd, const ref Loc loc, Scope* sc, Expressions // CTFE sometimes creates null as hidden pointer; we'll allow this. continue; } - .error(loc, "more initializers than fields (%zu) of `%s`", nfields, sd.toChars()); + .error(loc, "more initializers than fields (%llu) of `%s`", cast(ulong)nfields, sd.toChars()); return false; } VarDeclaration v = sd.fields[i]; diff --git a/gcc/d/dmd/file_manager.d b/gcc/d/dmd/file_manager.d index 05aeb7d..0ca756e 100644 --- a/gcc/d/dmd/file_manager.d +++ b/gcc/d/dmd/file_manager.d @@ -1,8 +1,8 @@ /** * Read a file from disk and store it in memory. * - * Copyright: Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/file_manager.d, _file_manager.d) * Documentation: https://dlang.org/phobos/dmd_file_manager.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/file_manager.d diff --git a/gcc/d/dmd/file_manager.h b/gcc/d/dmd/file_manager.h index 7488fab1..6705f24 100644 --- a/gcc/d/dmd/file_manager.h +++ b/gcc/d/dmd/file_manager.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/file_manager.h */ diff --git a/gcc/d/dmd/foreachvar.d b/gcc/d/dmd/foreachvar.d index e9a43f9..b779eae 100644 --- a/gcc/d/dmd/foreachvar.d +++ b/gcc/d/dmd/foreachvar.d @@ -1,9 +1,9 @@ /** * Utility to visit every variable in an expression. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/foreachvar.d, _foreachvar.d) * Documentation: https://dlang.org/phobos/dmd_foreachvar.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/foreachvar.d diff --git a/gcc/d/dmd/func.d b/gcc/d/dmd/func.d index da33587..b5148be 100644 --- a/gcc/d/dmd/func.d +++ b/gcc/d/dmd/func.d @@ -8,9 +8,9 @@ * - `invariant` * - `unittest` * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/func.d, _func.d) * Documentation: https://dlang.org/phobos/dmd_func.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/func.d diff --git a/gcc/d/dmd/globals.d b/gcc/d/dmd/globals.d index 7409dcc..22ccddd 100644 --- a/gcc/d/dmd/globals.d +++ b/gcc/d/dmd/globals.d @@ -1,9 +1,9 @@ /** * Stores command line options and contains other miscellaneous declarations. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/globals.d, _globals.d) * Documentation: https://dlang.org/phobos/dmd_globals.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/globals.d @@ -126,7 +126,7 @@ extern (C++) struct Param bool stackstomp; // add stack stomping code bool useUnitTests; // generate unittest code bool useInline = false; // inline expand functions - FeatureState useDIP25; // implement http://wiki.dlang.org/DIP25 + FeatureState useDIP25; // implement https://wiki.dlang.org/DIP25 FeatureState useDIP1000; // implement https://dlang.org/spec/memory-safe-d.html#scope-return-params bool useDIP1021; // implement https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md bool release; // build release version @@ -162,7 +162,7 @@ extern (C++) struct Param // https://issues.dlang.org/show_bug.cgi?id=14246 bool fieldwise; // do struct equality testing field-wise rather than by memcmp() bool rvalueRefParam; // allow rvalues to be arguments to ref parameters - // http://dconf.org/2019/talks/alexandrescu.html + // https://dconf.org/2019/talks/alexandrescu.html // https://gist.github.com/andralex/e5405a5d773f07f73196c05f8339435a // https://digitalmars.com/d/archives/digitalmars/D/Binding_rvalues_to_ref_parameters_redux_325087.html // Implementation: https://github.com/dlang/dmd/pull/9817 @@ -303,7 +303,7 @@ extern (C++) struct Global { const(char)[] inifilename; /// filename of configuration file as given by `-conf=`, or default value - string copyright = "Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved"; + string copyright = "Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved"; string written = "written by Walter Bright"; Array!(const(char)*)* path; /// Array of char*'s which form the import lookup path @@ -655,7 +655,7 @@ enum PINLINE : ubyte always, /// always inline } -alias StorageClass = uinteger_t; +alias StorageClass = ulong; /// Collection of global state extern (C++) __gshared Global global; diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h index 2275ec5..4e76967 100644 --- a/gcc/d/dmd/globals.h +++ b/gcc/d/dmd/globals.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/globals.h */ @@ -115,7 +115,7 @@ struct Param bool stackstomp; // add stack stomping code bool useUnitTests; // generate unittest code bool useInline; // inline expand functions - FeatureState useDIP25; // implement http://wiki.dlang.org/DIP25 + FeatureState useDIP25; // implement https://wiki.dlang.org/DIP25 FeatureState useDIP1000; // implement https://dlang.org/spec/memory-safe-d.html#scope-return-params bool useDIP1021; // implement https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md bool release; // build release version diff --git a/gcc/d/dmd/gluelayer.d b/gcc/d/dmd/gluelayer.d index 4018126..73a1f00 100644 --- a/gcc/d/dmd/gluelayer.d +++ b/gcc/d/dmd/gluelayer.d @@ -3,9 +3,9 @@ * * This 'glues' either the DMC or GCC back-end to the front-end. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/gluelayer.d, _gluelayer.d) * Documentation: https://dlang.org/phobos/dmd_gluelayer.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/gluelayer.d diff --git a/gcc/d/dmd/hdrgen.d b/gcc/d/dmd/hdrgen.d index a454298..6fc86c3 100644 --- a/gcc/d/dmd/hdrgen.d +++ b/gcc/d/dmd/hdrgen.d @@ -3,9 +3,9 @@ * * Also used to convert AST nodes to D code in general, e.g. for error messages or `printf` debugging. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/hdrgen.d, _hdrgen.d) * Documentation: https://dlang.org/phobos/dmd_hdrgen.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/hdrgen.d @@ -21,7 +21,6 @@ import dmd.aliasthis; import dmd.arraytypes; import dmd.astenums; import dmd.attrib; -import dmd.complex; import dmd.cond; import dmd.ctfeexpr; import dmd.dclass; @@ -43,6 +42,7 @@ import dmd.init; import dmd.mtype; import dmd.nspace; import dmd.parse; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.common.outbuffer; import dmd.root.rootobject; diff --git a/gcc/d/dmd/hdrgen.h b/gcc/d/dmd/hdrgen.h index 531d5d8..0488c51 100644 --- a/gcc/d/dmd/hdrgen.h +++ b/gcc/d/dmd/hdrgen.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Dave Fladebo - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/hdrgen.h */ diff --git a/gcc/d/dmd/iasm.d b/gcc/d/dmd/iasm.d index df8d1c9..29aca3e 100644 --- a/gcc/d/dmd/iasm.d +++ b/gcc/d/dmd/iasm.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/iasm.html, Inline Assembler) * - * Copyright (C) 2018-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright (C) 2018-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/iasm.d, _iasm.d) * Documentation: https://dlang.org/phobos/dmd_iasm.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/iasm.d diff --git a/gcc/d/dmd/iasmgcc.d b/gcc/d/dmd/iasmgcc.d index cd30117..495126d 100644 --- a/gcc/d/dmd/iasmgcc.d +++ b/gcc/d/dmd/iasmgcc.d @@ -1,9 +1,9 @@ /** * Inline assembler for the GCC D compiler. * - * Copyright (C) 2018-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2018-2022 by The D Language Foundation, All Rights Reserved * Authors: Iain Buclaw - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/iasmgcc.d, _iasmgcc.d) * Documentation: https://dlang.org/phobos/dmd_iasmgcc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/iasmgcc.d diff --git a/gcc/d/dmd/id.d b/gcc/d/dmd/id.d index d33b676..cef1b8e 100644 --- a/gcc/d/dmd/id.d +++ b/gcc/d/dmd/id.d @@ -1,9 +1,9 @@ /** * Contains the `Id` struct with a list of predefined symbols the compiler knows about. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/id.d, _id.d) * Documentation: https://dlang.org/phobos/dmd_id.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/id.d diff --git a/gcc/d/dmd/id.h b/gcc/d/dmd/id.h index 8066747..984c203 100644 --- a/gcc/d/dmd/id.h +++ b/gcc/d/dmd/id.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2017-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2017-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/id.h */ diff --git a/gcc/d/dmd/identifier.d b/gcc/d/dmd/identifier.d index 8add74a..b42b4a1 100644 --- a/gcc/d/dmd/identifier.d +++ b/gcc/d/dmd/identifier.d @@ -1,9 +1,9 @@ /** * Defines an identifier, which is the name of a `Dsymbol`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/identifier.d, _identifier.d) * Documentation: https://dlang.org/phobos/dmd_identifier.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/identifier.d @@ -20,8 +20,8 @@ import dmd.common.outbuffer; import dmd.root.rootobject; import dmd.root.string; import dmd.root.stringtable; +import dmd.root.utf; import dmd.tokens; -import dmd.utf; /*********************************************************** diff --git a/gcc/d/dmd/identifier.h b/gcc/d/dmd/identifier.h index 790d5a0..4c748be 100644 --- a/gcc/d/dmd/identifier.h +++ b/gcc/d/dmd/identifier.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/identifier.h */ diff --git a/gcc/d/dmd/impcnvtab.d b/gcc/d/dmd/impcnvtab.d index db09f0c..ab46f5e 100644 --- a/gcc/d/dmd/impcnvtab.d +++ b/gcc/d/dmd/impcnvtab.d @@ -6,9 +6,9 @@ * Specification: $(LINK2 https://dlang.org/spec/type.html#integer-promotions, Integer Promotions), * $(LINK2 https://dlang.org/spec/type.html#usual-arithmetic-conversions, Usual Arithmetic Conversions). * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/impcnvtab.d, _impcnvtab.d) * Documentation: https://dlang.org/phobos/dmd_impcnvtab.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/impcnvtab.d diff --git a/gcc/d/dmd/imphint.d b/gcc/d/dmd/imphint.d index e1919a6..f03113d 100644 --- a/gcc/d/dmd/imphint.d +++ b/gcc/d/dmd/imphint.d @@ -3,9 +3,9 @@ * * For example, prompt to `import std.stdio` when using `writeln`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/imphint.d, _imphint.d) * Documentation: https://dlang.org/phobos/dmd_imphint.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/imphint.d diff --git a/gcc/d/dmd/import.h b/gcc/d/dmd/import.h index 34c5a05..5e7550e 100644 --- a/gcc/d/dmd/import.h +++ b/gcc/d/dmd/import.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/import.h */ diff --git a/gcc/d/dmd/importc.d b/gcc/d/dmd/importc.d index 5ee961f..1b92386 100644 --- a/gcc/d/dmd/importc.d +++ b/gcc/d/dmd/importc.d @@ -3,9 +3,9 @@ * * Specification: C11 * - * Copyright: Copyright (C) 2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 2021-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/importc.d, _importc.d) * Documentation: https://dlang.org/phobos/dmd_importc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/importc.d diff --git a/gcc/d/dmd/init.d b/gcc/d/dmd/init.d index d036ee1..179e0b6 100644 --- a/gcc/d/dmd/init.d +++ b/gcc/d/dmd/init.d @@ -1,9 +1,9 @@ /** * Defines initializers of variables, e.g. the array literal in `int[3] x = [0, 1, 2]`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/init.d, _init.d) * Documentation: https://dlang.org/phobos/dmd_init.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/init.d diff --git a/gcc/d/dmd/init.h b/gcc/d/dmd/init.h index 23204b8..c6c8c62 100644 --- a/gcc/d/dmd/init.h +++ b/gcc/d/dmd/init.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/init.h */ diff --git a/gcc/d/dmd/initsem.d b/gcc/d/dmd/initsem.d index 826b0ad..6b10ace 100644 --- a/gcc/d/dmd/initsem.d +++ b/gcc/d/dmd/initsem.d @@ -1,9 +1,9 @@ /** * Semantic analysis of initializers. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/initsem.d, _initsem.d) * Documentation: https://dlang.org/phobos/dmd_initsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/initsem.d diff --git a/gcc/d/dmd/inline.d b/gcc/d/dmd/inline.d index cfd619a..25982a6 100644 --- a/gcc/d/dmd/inline.d +++ b/gcc/d/dmd/inline.d @@ -4,9 +4,9 @@ * The AST is traversed, and every function call is considered for inlining using `inlinecost.d`. * The function call is then inlined if this cost is below a threshold. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/inline.d, _inline.d) * Documentation: https://dlang.org/phobos/dmd_inline.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/inline.d diff --git a/gcc/d/dmd/intrange.d b/gcc/d/dmd/intrange.d index 9b70f49..d0206b6 100644 --- a/gcc/d/dmd/intrange.d +++ b/gcc/d/dmd/intrange.d @@ -1,9 +1,9 @@ /** * Implement $(LINK2 https://digitalmars.com/articles/b62.html, Value Range Propagation). * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/intrange.d, _intrange.d) * Documentation: https://dlang.org/phobos/dmd_intrange.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/intrange.d @@ -255,7 +255,7 @@ struct SignExtendedNumber uinteger_t v = copySign(value, negative); // compute base-2 log of 'v' to determine the maximum allowed bits to shift. - // Ref: http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog + // Ref: https://graphics.stanford.edu/~seander/bithacks.html#IntegerLog // Why is this a size_t? Looks like a bug. size_t r, s; diff --git a/gcc/d/dmd/json.d b/gcc/d/dmd/json.d index fef5150..ba2dd17 100644 --- a/gcc/d/dmd/json.d +++ b/gcc/d/dmd/json.d @@ -1,9 +1,9 @@ /** * Code for generating .json descriptions of the module when passing the `-X` flag to dmd. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/json.d, _json.d) * Documentation: https://dlang.org/phobos/dmd_json.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/json.d diff --git a/gcc/d/dmd/json.h b/gcc/d/dmd/json.h index 1311fb3..979440c 100644 --- a/gcc/d/dmd/json.h +++ b/gcc/d/dmd/json.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/json.h */ diff --git a/gcc/d/dmd/lambdacomp.d b/gcc/d/dmd/lambdacomp.d index 336f8dd..91df9cc 100644 --- a/gcc/d/dmd/lambdacomp.d +++ b/gcc/d/dmd/lambdacomp.d @@ -5,9 +5,9 @@ * The serialization is a string which contains the type of the parameters and the string * represantation of the lambda expression. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/lamdbacomp.d, _lambdacomp.d) * Documentation: https://dlang.org/phobos/dmd_lambdacomp.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lambdacomp.d diff --git a/gcc/d/dmd/lexer.d b/gcc/d/dmd/lexer.d index bb76a1a..e74b192 100644 --- a/gcc/d/dmd/lexer.d +++ b/gcc/d/dmd/lexer.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/lex.html, Lexical) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/lexer.d, _lexer.d) * Documentation: https://dlang.org/phobos/dmd_lexer.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lexer.d @@ -32,8 +32,8 @@ import dmd.common.outbuffer; import dmd.root.port; import dmd.root.rmem; import dmd.root.string; +import dmd.root.utf; import dmd.tokens; -import dmd.utf; import dmd.utils; nothrow: diff --git a/gcc/d/dmd/mangle.h b/gcc/d/dmd/mangle.h index 670cf4d..512184a 100644 --- a/gcc/d/dmd/mangle.h +++ b/gcc/d/dmd/mangle.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/mangle.h */ diff --git a/gcc/d/dmd/module.h b/gcc/d/dmd/module.h index fe4c73a..f020bfd 100644 --- a/gcc/d/dmd/module.h +++ b/gcc/d/dmd/module.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/module.h */ diff --git a/gcc/d/dmd/mtype.d b/gcc/d/dmd/mtype.d index e338a05..0257faa 100644 --- a/gcc/d/dmd/mtype.d +++ b/gcc/d/dmd/mtype.d @@ -1,9 +1,9 @@ /** * Defines a D type. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/mtype.d, _mtype.d) * Documentation: https://dlang.org/phobos/dmd_mtype.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/mtype.d diff --git a/gcc/d/dmd/mtype.h b/gcc/d/dmd/mtype.h index 430b39b..fde5027 100644 --- a/gcc/d/dmd/mtype.h +++ b/gcc/d/dmd/mtype.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/mtype.h */ diff --git a/gcc/d/dmd/nogc.d b/gcc/d/dmd/nogc.d index 8bdddb8..ed3f832 100644 --- a/gcc/d/dmd/nogc.d +++ b/gcc/d/dmd/nogc.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/function.html#nogc-functions, No-GC Functions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/nogc.d, _nogc.d) * Documentation: https://dlang.org/phobos/dmd_nogc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/nogc.d diff --git a/gcc/d/dmd/nspace.d b/gcc/d/dmd/nspace.d index 215f259..29f920a 100644 --- a/gcc/d/dmd/nspace.d +++ b/gcc/d/dmd/nspace.d @@ -36,9 +36,9 @@ * are valid D identifier. * * See_Also: https://github.com/dlang/dmd/pull/10031 - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/nspace.d, _nspace.d) * Documentation: https://dlang.org/phobos/dmd_nspace.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/nspace.d diff --git a/gcc/d/dmd/nspace.h b/gcc/d/dmd/nspace.h index 43d36e9..7d6f65d 100644 --- a/gcc/d/dmd/nspace.h +++ b/gcc/d/dmd/nspace.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/nspace.h */ diff --git a/gcc/d/dmd/ob.d b/gcc/d/dmd/ob.d index 156428e..c2594fe 100644 --- a/gcc/d/dmd/ob.d +++ b/gcc/d/dmd/ob.d @@ -1,9 +1,9 @@ /** * Flow analysis for Ownership/Borrowing * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ob.d, _ob.d) * Documentation: https://dlang.org/phobos/dmd_escape.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ob.d diff --git a/gcc/d/dmd/objc.d b/gcc/d/dmd/objc.d index 4236381..6d283e1 100644 --- a/gcc/d/dmd/objc.d +++ b/gcc/d/dmd/objc.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/objc_interface.html, Interfacing to Objective-C) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/objc.d, _objc.d) * Documentation: https://dlang.org/phobos/dmd_objc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/objc.d diff --git a/gcc/d/dmd/objc.h b/gcc/d/dmd/objc.h index 483e501..a030154 100644 --- a/gcc/d/dmd/objc.h +++ b/gcc/d/dmd/objc.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2015-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2015-2022 by The D Language Foundation, All Rights Reserved * written by Michel Fortin - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/objc.h */ diff --git a/gcc/d/dmd/opover.d b/gcc/d/dmd/opover.d index bafeaa3..c932d043 100644 --- a/gcc/d/dmd/opover.d +++ b/gcc/d/dmd/opover.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/operatoroverloading.html, Operator Overloading) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/opover.d, _opover.d) * Documentation: https://dlang.org/phobos/dmd_opover.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/opover.d diff --git a/gcc/d/dmd/optimize.d b/gcc/d/dmd/optimize.d index ca9e0b3..5864fa2 100644 --- a/gcc/d/dmd/optimize.d +++ b/gcc/d/dmd/optimize.d @@ -1,9 +1,9 @@ /** * Perform constant folding. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/optimize.d, _optimize.d) * Documentation: https://dlang.org/phobos/dmd_optimize.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/optimize.d diff --git a/gcc/d/dmd/parse.d b/gcc/d/dmd/parse.d index 94056ab..700f3c5 100644 --- a/gcc/d/dmd/parse.d +++ b/gcc/d/dmd/parse.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/grammar.html, D Grammar) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/parse.d, _parse.d) * Documentation: https://dlang.org/phobos/dmd_parse.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/parse.d @@ -6081,7 +6081,19 @@ LagainStc: check(TOK.leftParenthesis); param = parseAssignCondition(); condition = parseExpression(); - check(TOK.rightParenthesis); + if (token.value != TOK.rightParenthesis && condition) + { + error("missing closing `)` after `if (%s`", param ? "declaration".ptr : condition.toChars()); + } + else + check(TOK.rightParenthesis); + if (token.value == TOK.rightParenthesis) + { + if (condition) // if not an error in condition + error("extra `)` after `if (%s)`", param ? "declaration".ptr : condition.toChars()); + nextToken(); + } + { const lookingForElseSave = lookingForElse; lookingForElse = loc; diff --git a/gcc/d/dmd/printast.d b/gcc/d/dmd/printast.d index 33b5e7f3..6133145 100644 --- a/gcc/d/dmd/printast.d +++ b/gcc/d/dmd/printast.d @@ -1,9 +1,9 @@ /** * Provides an AST printer for debugging. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/printast.d, _printast.d) * Documentation: https://dlang.org/phobos/dmd_printast.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/printast.d diff --git a/gcc/d/dmd/root/README.md b/gcc/d/dmd/root/README.md index e062d93..b393c12 100644 --- a/gcc/d/dmd/root/README.md +++ b/gcc/d/dmd/root/README.md @@ -5,7 +5,9 @@ | [aav.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/aav.d) | An associative array implementation | | [array.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/array.d) | A dynamic array implementation | | [bitarray.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/bitarray.d) | A compact array of bits | +| [complex.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/complex.d) | A complex number type | | [ctfloat.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/ctfloat.d) | A floating point type for compile-time calculations | +| [env.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/env.d) | Modify environment variables | | [file.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/file.d) | Read a file from disk and store it in memory | | [filename.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.d) | Encapsulate path and file names | | [hash.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/hash.d) | Calculate a hash for a byte array | @@ -19,4 +21,5 @@ | [speller.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/speller.d) | Try to detect typos in identifiers | | [string.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/string.d) | Various string related functions | | [stringtable.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/stringtable.d) | Specialized associative array with string keys stored in a variable length structure | -| [strtold.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/strtold.d) | D implementation of the standard C function `strtold` (String to long double) | +| [strtold.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/strtold.d) | D implementation of the standard C function `strtold` (String to long double) | +| [utf.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/utf.d) | Encoding/decoding Unicode text | diff --git a/gcc/d/dmd/root/aav.d b/gcc/d/dmd/root/aav.d index 92b58ba..5b8cc82 100644 --- a/gcc/d/dmd/root/aav.d +++ b/gcc/d/dmd/root/aav.d @@ -1,9 +1,9 @@ /** * Associative array implementation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/aav.d, root/_aav.d) * Documentation: https://dlang.org/phobos/dmd_root_aav.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/aav.d diff --git a/gcc/d/dmd/root/array.d b/gcc/d/dmd/root/array.d index ed925c8..cd2d709 100644 --- a/gcc/d/dmd/root/array.d +++ b/gcc/d/dmd/root/array.d @@ -2,9 +2,9 @@ /** * Dynamic array implementation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/array.d, root/_array.d) * Documentation: https://dlang.org/phobos/dmd_root_array.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/array.d diff --git a/gcc/d/dmd/root/array.h b/gcc/d/dmd/root/array.h index f573dca..866b952 100644 --- a/gcc/d/dmd/root/array.h +++ b/gcc/d/dmd/root/array.h @@ -1,8 +1,8 @@ -/* Copyright (C) 2011-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 2011-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/array.h */ diff --git a/gcc/d/dmd/root/bitarray.d b/gcc/d/dmd/root/bitarray.d index f912961..42c09fa 100644 --- a/gcc/d/dmd/root/bitarray.d +++ b/gcc/d/dmd/root/bitarray.d @@ -1,9 +1,9 @@ /** * Implementation of a bit array. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/bitarray.d, root/_bitarray.d) * Documentation: https://dlang.org/phobos/dmd_root_array.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/bitarray.d diff --git a/gcc/d/dmd/root/bitarray.h b/gcc/d/dmd/root/bitarray.h index e773711..c5c5d3a 100644 --- a/gcc/d/dmd/root/bitarray.h +++ b/gcc/d/dmd/root/bitarray.h @@ -1,8 +1,8 @@ -/* Copyright (C) 2011-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 2011-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/bitarray.h */ diff --git a/gcc/d/dmd/complex.d b/gcc/d/dmd/root/complex.d index 84bf5e97..d9a396d 100644 --- a/gcc/d/dmd/complex.d +++ b/gcc/d/dmd/root/complex.d @@ -1,15 +1,15 @@ /** * Implements a complex number type. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) - * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/complex.d, _complex.d) - * Documentation: https://dlang.org/phobos/dmd_complex.html - * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/complex.d + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/complex.d, _complex.d) + * Documentation: https://dlang.org/phobos/dmd_root_complex.html + * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/complex.d */ -module dmd.complex; +module dmd.root.complex; import dmd.root.ctfloat; diff --git a/gcc/d/dmd/complex_t.h b/gcc/d/dmd/root/complex_t.h index 3359171..c384848 100644 --- a/gcc/d/dmd/complex_t.h +++ b/gcc/d/dmd/root/complex_t.h @@ -1,16 +1,16 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt - * https://github.com/dlang/dmd/blob/master/src/dmd/complex_t.h + * https://www.boost.org/LICENSE_1_0.txt + * https://github.com/dlang/dmd/blob/master/src/dmd/root/complex_t.h */ #pragma once -#include "root/ctfloat.h" +#include "ctfloat.h" /* Roll our own complex type for compilers that don't support complex */ diff --git a/gcc/d/dmd/root/ctfloat.d b/gcc/d/dmd/root/ctfloat.d index 9b98742..5ccc7bf 100644 --- a/gcc/d/dmd/root/ctfloat.d +++ b/gcc/d/dmd/root/ctfloat.d @@ -1,9 +1,9 @@ /** * Collects functions for compile-time floating-point calculations. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/ctfloat.d, root/_ctfloat.d) * Documentation: https://dlang.org/phobos/dmd_root_ctfloat.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/ctfloat.d diff --git a/gcc/d/dmd/root/ctfloat.h b/gcc/d/dmd/root/ctfloat.h index 1221b82..6b83dbf 100644 --- a/gcc/d/dmd/root/ctfloat.h +++ b/gcc/d/dmd/root/ctfloat.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/ctfloat.h */ diff --git a/gcc/d/dmd/root/dcompat.h b/gcc/d/dmd/root/dcompat.h index 8b0bcf2..5823e7c 100644 --- a/gcc/d/dmd/root/dcompat.h +++ b/gcc/d/dmd/root/dcompat.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/dcompat.h */ diff --git a/gcc/d/dmd/root/file.d b/gcc/d/dmd/root/file.d index 2722529..6331a62 100644 --- a/gcc/d/dmd/root/file.d +++ b/gcc/d/dmd/root/file.d @@ -1,9 +1,9 @@ /** * Read a file from disk and store it in memory. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/file.d, root/_file.d) * Documentation: https://dlang.org/phobos/dmd_root_file.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/file.d diff --git a/gcc/d/dmd/root/file.h b/gcc/d/dmd/root/file.h index ee0d51e..44ca024 100644 --- a/gcc/d/dmd/root/file.h +++ b/gcc/d/dmd/root/file.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/file.h */ diff --git a/gcc/d/dmd/root/filename.d b/gcc/d/dmd/root/filename.d index d1500c8..292fccf 100644 --- a/gcc/d/dmd/root/filename.d +++ b/gcc/d/dmd/root/filename.d @@ -1,9 +1,9 @@ /** * Encapsulate path and file names. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.d, root/_filename.d) * Documentation: https://dlang.org/phobos/dmd_root_filename.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/filename.d diff --git a/gcc/d/dmd/root/filename.h b/gcc/d/dmd/root/filename.h index 9f773b5..419a4c9 100644 --- a/gcc/d/dmd/root/filename.h +++ b/gcc/d/dmd/root/filename.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.h */ diff --git a/gcc/d/dmd/root/hash.d b/gcc/d/dmd/root/hash.d index f484819..fe97c42 100644 --- a/gcc/d/dmd/root/hash.d +++ b/gcc/d/dmd/root/hash.d @@ -1,9 +1,9 @@ /** * Hash functions for arbitrary binary data. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Martin Nowak, Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Martin Nowak, Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/hash.d, root/_hash.d) * Documentation: https://dlang.org/phobos/dmd_root_hash.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/hash.d diff --git a/gcc/d/dmd/root/object.h b/gcc/d/dmd/root/object.h index fb367bc..609e763 100644 --- a/gcc/d/dmd/root/object.h +++ b/gcc/d/dmd/root/object.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/object.h */ diff --git a/gcc/d/dmd/root/optional.d b/gcc/d/dmd/root/optional.d index a593ddd..bb8150f 100644 --- a/gcc/d/dmd/root/optional.d +++ b/gcc/d/dmd/root/optional.d @@ -1,9 +1,9 @@ /** * Optional implementation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/optional.d, root/_optional.d) * Documentation: https://dlang.org/phobos/dmd_root_optional.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/optional.d diff --git a/gcc/d/dmd/root/optional.h b/gcc/d/dmd/root/optional.h index fa52b58..e4a41a0 100644 --- a/gcc/d/dmd/root/optional.h +++ b/gcc/d/dmd/root/optional.h @@ -3,9 +3,9 @@ /** * Optional implementation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/optional.h, root/_optional.h) * Documentation: https://dlang.org/phobos/dmd_root_optional.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/optional.h diff --git a/gcc/d/dmd/root/port.d b/gcc/d/dmd/root/port.d index 1bafa20..0c8088c 100644 --- a/gcc/d/dmd/root/port.d +++ b/gcc/d/dmd/root/port.d @@ -1,9 +1,9 @@ /** * Portable routines for functions that have different implementations on different platforms. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/port.d, root/_port.d) * Documentation: https://dlang.org/phobos/dmd_root_port.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/port.d diff --git a/gcc/d/dmd/root/port.h b/gcc/d/dmd/root/port.h index 08cf66c..069a365 100644 --- a/gcc/d/dmd/root/port.h +++ b/gcc/d/dmd/root/port.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/port.h */ diff --git a/gcc/d/dmd/root/region.d b/gcc/d/dmd/root/region.d index 50689fe..1e86f32 100644 --- a/gcc/d/dmd/root/region.d +++ b/gcc/d/dmd/root/region.d @@ -1,9 +1,9 @@ /** * Region storage allocator implementation. * - * Copyright: Copyright (C) 2019-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 2019-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/region.d, root/_region.d) * Documentation: https://dlang.org/phobos/dmd_root_region.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/region.d diff --git a/gcc/d/dmd/root/rmem.d b/gcc/d/dmd/root/rmem.d index 198f3d0..ffe5ee1 100644 --- a/gcc/d/dmd/root/rmem.d +++ b/gcc/d/dmd/root/rmem.d @@ -1,9 +1,9 @@ /** * Allocate memory using `malloc` or the GC depending on the configuration. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/rmem.d, root/_rmem.d) * Documentation: https://dlang.org/phobos/dmd_root_rmem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/rmem.d diff --git a/gcc/d/dmd/root/rmem.h b/gcc/d/dmd/root/rmem.h index 04d9e3f..1338d7c 100644 --- a/gcc/d/dmd/root/rmem.h +++ b/gcc/d/dmd/root/rmem.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/rmem.h */ diff --git a/gcc/d/dmd/root/rootobject.d b/gcc/d/dmd/root/rootobject.d index 64104b8..7390d07 100644 --- a/gcc/d/dmd/root/rootobject.d +++ b/gcc/d/dmd/root/rootobject.d @@ -1,9 +1,9 @@ /** * Provide the root object that classes in dmd inherit from. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/rootobject.d, root/_rootobject.d) * Documentation: https://dlang.org/phobos/dmd_root_rootobject.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/rootobject.d diff --git a/gcc/d/dmd/root/speller.d b/gcc/d/dmd/root/speller.d index 543005b..b3e59f5 100644 --- a/gcc/d/dmd/root/speller.d +++ b/gcc/d/dmd/root/speller.d @@ -3,9 +3,9 @@ * * Does not have any dependencies on the rest of DMD. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/speller.d, root/_speller.d) * Documentation: https://dlang.org/phobos/dmd_root_speller.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/speller.d diff --git a/gcc/d/dmd/root/string.d b/gcc/d/dmd/root/string.d index 73fe562..0c7cad0 100644 --- a/gcc/d/dmd/root/string.d +++ b/gcc/d/dmd/root/string.d @@ -1,9 +1,9 @@ /** * Contains various string related functions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/string.d, root/_string.d) * Documentation: https://dlang.org/phobos/dmd_root_string.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/string.d diff --git a/gcc/d/dmd/root/stringtable.d b/gcc/d/dmd/root/stringtable.d index 42b26e2..884a9f1 100644 --- a/gcc/d/dmd/root/stringtable.d +++ b/gcc/d/dmd/root/stringtable.d @@ -1,9 +1,9 @@ /** * A specialized associative array with string keys stored in a variable length structure. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/stringtable.d, root/_stringtable.d) * Documentation: https://dlang.org/phobos/dmd_root_stringtable.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/stringtable.d @@ -284,7 +284,7 @@ private: size_t findSlot(hash_t hash, scope const(char)[] str) const @nogc nothrow pure { // quadratic probing using triangular numbers - // http://stackoverflow.com/questions/2348187/moving-from-linear-probing-to-quadratic-probing-hash-collisons/2349774#2349774 + // https://stackoverflow.com/questions/2348187/moving-from-linear-probing-to-quadratic-probing-hash-collisons/2349774#2349774 for (size_t i = hash & (table.length - 1), j = 1;; ++j) { const(StringValue!T)* sv; diff --git a/gcc/d/dmd/utf.d b/gcc/d/dmd/root/utf.d index 1125c21..15838e9 100644 --- a/gcc/d/dmd/utf.d +++ b/gcc/d/dmd/root/utf.d @@ -1,15 +1,15 @@ /** * Functions related to UTF encoding. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) - * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/utf.d, _utf.d) - * Documentation: https://dlang.org/phobos/dmd_utf.html - * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/utf.d + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/utf.d, _utf.d) + * Documentation: https://dlang.org/phobos/dmd_root_utf.html + * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/utf.d */ -module dmd.utf; +module dmd.root.utf; nothrow pure @nogc: diff --git a/gcc/d/dmd/safe.d b/gcc/d/dmd/safe.d index 7eb3e23..bad071e 100644 --- a/gcc/d/dmd/safe.d +++ b/gcc/d/dmd/safe.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/function.html#function-safety, Function Safety) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/safe.d, _safe.d) * Documentation: https://dlang.org/phobos/dmd_safe.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/safe.d diff --git a/gcc/d/dmd/sapply.d b/gcc/d/dmd/sapply.d index 018b046..7314d5b 100644 --- a/gcc/d/dmd/sapply.d +++ b/gcc/d/dmd/sapply.d @@ -1,9 +1,9 @@ /** * Provides a depth-first statement visitor. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/sparse.d, _sparse.d) * Documentation: https://dlang.org/phobos/dmd_sapply.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/sapply.d diff --git a/gcc/d/dmd/scope.h b/gcc/d/dmd/scope.h index 4d8c0bb..a163e75 100644 --- a/gcc/d/dmd/scope.h +++ b/gcc/d/dmd/scope.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/scope.h */ diff --git a/gcc/d/dmd/semantic2.d b/gcc/d/dmd/semantic2.d index c3fe752..f36cdc9 100644 --- a/gcc/d/dmd/semantic2.d +++ b/gcc/d/dmd/semantic2.d @@ -1,9 +1,9 @@ /** * Performs the semantic2 stage, which deals with initializer expressions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/semantic2.d, _semantic2.d) * Documentation: https://dlang.org/phobos/dmd_semantic2.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/semantic2.d @@ -56,11 +56,11 @@ import dmd.root.filename; import dmd.common.outbuffer; import dmd.root.rmem; import dmd.root.rootobject; +import dmd.root.utf; import dmd.sideeffect; import dmd.statementsem; import dmd.staticassert; import dmd.tokens; -import dmd.utf; import dmd.statement; import dmd.target; import dmd.templateparamsem; diff --git a/gcc/d/dmd/semantic3.d b/gcc/d/dmd/semantic3.d index 49b87d6..7bcb7ec 100644 --- a/gcc/d/dmd/semantic3.d +++ b/gcc/d/dmd/semantic3.d @@ -1,9 +1,9 @@ /** * Performs the semantic3 stage, which deals with function bodies. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/semantic3.d, _semantic3.d) * Documentation: https://dlang.org/phobos/dmd_semantic3.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/semantic3.d @@ -58,11 +58,11 @@ import dmd.root.filename; import dmd.common.outbuffer; import dmd.root.rmem; import dmd.root.rootobject; +import dmd.root.utf; import dmd.sideeffect; import dmd.statementsem; import dmd.staticassert; import dmd.tokens; -import dmd.utf; import dmd.semantic2; import dmd.statement; import dmd.target; diff --git a/gcc/d/dmd/sideeffect.d b/gcc/d/dmd/sideeffect.d index 99833b5..d365049 100644 --- a/gcc/d/dmd/sideeffect.d +++ b/gcc/d/dmd/sideeffect.d @@ -1,9 +1,9 @@ /** * Find side-effects of expressions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/sideeffect.d, _sideeffect.d) * Documentation: https://dlang.org/phobos/dmd_sideeffect.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/sideeffect.d diff --git a/gcc/d/dmd/statement.d b/gcc/d/dmd/statement.d index 91e3fe7..be568f5 100644 --- a/gcc/d/dmd/statement.d +++ b/gcc/d/dmd/statement.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/statement.html, Statements) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statement.d, _statement.d) * Documentation: https://dlang.org/phobos/dmd_statement.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statement.d @@ -72,7 +72,7 @@ TypeIdentifier getException() } /*********************************************************** - * Specification: http://dlang.org/spec/statement.html + * Specification: https://dlang.org/spec/statement.html */ extern (C++) abstract class Statement : ASTNode { diff --git a/gcc/d/dmd/statement.h b/gcc/d/dmd/statement.h index 98b7bd3..dfb65a1 100644 --- a/gcc/d/dmd/statement.h +++ b/gcc/d/dmd/statement.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/statement.h */ diff --git a/gcc/d/dmd/statement_rewrite_walker.d b/gcc/d/dmd/statement_rewrite_walker.d index 2f6605c..b1f659d 100644 --- a/gcc/d/dmd/statement_rewrite_walker.d +++ b/gcc/d/dmd/statement_rewrite_walker.d @@ -1,9 +1,9 @@ /** * Provides a visitor for statements that allows rewriting the currently visited node. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statement_rewrite_walker.d, _statement_rewrite_walker.d) * Documentation: https://dlang.org/phobos/dmd_statement_rewrite_walker.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statement_rewrite_walker.d diff --git a/gcc/d/dmd/statementsem.d b/gcc/d/dmd/statementsem.d index 91855ac..faeba11 100644 --- a/gcc/d/dmd/statementsem.d +++ b/gcc/d/dmd/statementsem.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/statement.html, Statements) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statementsem.d, _statementsem.d) * Documentation: https://dlang.org/phobos/dmd_statementsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statementsem.d diff --git a/gcc/d/dmd/staticassert.d b/gcc/d/dmd/staticassert.d index 984dc42..7daf7cd 100644 --- a/gcc/d/dmd/staticassert.d +++ b/gcc/d/dmd/staticassert.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/version.html#static-assert, Static Assert) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/staticassert.d, _staticassert.d) * Documentation: https://dlang.org/phobos/dmd_staticassert.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/staticassert.d diff --git a/gcc/d/dmd/staticassert.h b/gcc/d/dmd/staticassert.h index 8f88080..5c00b46 100644 --- a/gcc/d/dmd/staticassert.h +++ b/gcc/d/dmd/staticassert.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/staticassert.h */ diff --git a/gcc/d/dmd/staticcond.d b/gcc/d/dmd/staticcond.d index 6d74ad2..6ff166a 100644 --- a/gcc/d/dmd/staticcond.d +++ b/gcc/d/dmd/staticcond.d @@ -1,9 +1,9 @@ /** * Lazily evaluate static conditions for `static if`, `static assert` and template constraints. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/staticcond.d, _staticcond.d) * Documentation: https://dlang.org/phobos/dmd_staticcond.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/staticcond.d diff --git a/gcc/d/dmd/stmtstate.d b/gcc/d/dmd/stmtstate.d index bb13d7c..3e26b8f 100644 --- a/gcc/d/dmd/stmtstate.d +++ b/gcc/d/dmd/stmtstate.d @@ -1,9 +1,9 @@ /** * Used to help transform statement AST into flow graph. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/stmtstate.d, _stmtstate.d) * Documentation: https://dlang.org/phobos/dmd_stmtstate.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/stmtstate.d diff --git a/gcc/d/dmd/target.d b/gcc/d/dmd/target.d index 8e434a3..619304d 100644 --- a/gcc/d/dmd/target.d +++ b/gcc/d/dmd/target.d @@ -15,9 +15,9 @@ * - $(LINK2 https://github.com/ldc-developers/ldc, LDC repository) * - $(LINK2 https://github.com/D-Programming-GDC/gcc, GDC repository) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/target.d, _target.d) * Documentation: https://dlang.org/phobos/dmd_target.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/target.d @@ -74,7 +74,7 @@ extern (C++) struct Target /* These are mutually exclusive; one and only one is set. * Match spelling and casing of corresponding version identifiers */ - Freestanding = 0, + none = 0, linux = 1, Windows = 2, OSX = 4, diff --git a/gcc/d/dmd/target.h b/gcc/d/dmd/target.h index 6348d93..9c879de 100644 --- a/gcc/d/dmd/target.h +++ b/gcc/d/dmd/target.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2013-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2013-2022 by The D Language Foundation, All Rights Reserved * written by Iain Buclaw - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/target.h */ diff --git a/gcc/d/dmd/template.h b/gcc/d/dmd/template.h index 69cc84f..95cd349 100644 --- a/gcc/d/dmd/template.h +++ b/gcc/d/dmd/template.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/template.h */ diff --git a/gcc/d/dmd/templateparamsem.d b/gcc/d/dmd/templateparamsem.d index b462742..e093260 100644 --- a/gcc/d/dmd/templateparamsem.d +++ b/gcc/d/dmd/templateparamsem.d @@ -1,9 +1,9 @@ /** * Semantic analysis of template parameters. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/templateparamsem.d, _templateparamsem.d) * Documentation: https://dlang.org/phobos/dmd_templateparamsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/templateparamsem.d diff --git a/gcc/d/dmd/tokens.d b/gcc/d/dmd/tokens.d index e5b05d3..5830dbb 100644 --- a/gcc/d/dmd/tokens.d +++ b/gcc/d/dmd/tokens.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/lex.html#tokens, Tokens) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/tokens.d, _tokens.d) * Documentation: https://dlang.org/phobos/dmd_tokens.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/tokens.d @@ -21,7 +21,7 @@ import dmd.identifier; import dmd.root.ctfloat; import dmd.common.outbuffer; import dmd.root.rmem; -import dmd.utf; +import dmd.root.utf; enum TOK : ubyte { diff --git a/gcc/d/dmd/tokens.h b/gcc/d/dmd/tokens.h index e095aa6..0a00ae7 100644 --- a/gcc/d/dmd/tokens.h +++ b/gcc/d/dmd/tokens.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/tokens.h */ diff --git a/gcc/d/dmd/traits.d b/gcc/d/dmd/traits.d index 7b9a8c8..ae8ab9b 100644 --- a/gcc/d/dmd/traits.d +++ b/gcc/d/dmd/traits.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/traits.html, Traits) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/traits.d, _traits.d) * Documentation: https://dlang.org/phobos/dmd_traits.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/traits.d diff --git a/gcc/d/dmd/typesem.d b/gcc/d/dmd/typesem.d index b8c4317..34b363d 100644 --- a/gcc/d/dmd/typesem.d +++ b/gcc/d/dmd/typesem.d @@ -1,9 +1,9 @@ /** * Semantic analysis for D types. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/typesem.d, _typesem.d) * Documentation: https://dlang.org/phobos/dmd_typesem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/typesem.d @@ -22,7 +22,6 @@ import dmd.arrayop; import dmd.arraytypes; import dmd.astcodegen; import dmd.astenums; -import dmd.complex; import dmd.dcast; import dmd.dclass; import dmd.declaration; @@ -52,6 +51,7 @@ import dmd.mtype; import dmd.objc; import dmd.opover; import dmd.parse; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.root.rmem; import dmd.common.outbuffer; @@ -161,7 +161,7 @@ private void resolveTupleIndex(const ref Loc loc, Scope* sc, Dsymbol s, out Expr const(uinteger_t) d = eindex.toUInteger(); if (d >= tup.objects.dim) { - .error(loc, "tuple index `%llu` exceeds length %zu", d, tup.objects.dim); + .error(loc, "tuple index `%llu` exceeds length %llu", d, cast(ulong)tup.objects.dim); pt = Type.terror; return; } diff --git a/gcc/d/dmd/typinf.d b/gcc/d/dmd/typinf.d index d05af61..21447ae 100644 --- a/gcc/d/dmd/typinf.d +++ b/gcc/d/dmd/typinf.d @@ -1,9 +1,9 @@ /** * Generate `TypeInfo` objects, which are needed for run-time introspection of types. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/typeinf.d, _typeinf.d) * Documentation: https://dlang.org/phobos/dmd_typinf.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/typinf.d diff --git a/gcc/d/dmd/utils.d b/gcc/d/dmd/utils.d index 6cd5d20..f8e7e48 100644 --- a/gcc/d/dmd/utils.d +++ b/gcc/d/dmd/utils.d @@ -1,9 +1,9 @@ /** * This module defines some utility functions for DMD. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/utils.d, _utils.d) * Documentation: https://dlang.org/phobos/dmd_utils.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/utils.d diff --git a/gcc/d/dmd/version.h b/gcc/d/dmd/version.h index 6c5e2f0..afc4557 100644 --- a/gcc/d/dmd/version.h +++ b/gcc/d/dmd/version.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/version.h */ diff --git a/gcc/d/dmd/visitor.d b/gcc/d/dmd/visitor.d index 8b9c012..e6dfa11 100644 --- a/gcc/d/dmd/visitor.d +++ b/gcc/d/dmd/visitor.d @@ -1,9 +1,9 @@ /** * Provides a visitor class visiting all AST nodes present in the compiler. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/visitor.d, _visitor.d) * Documentation: https://dlang.org/phobos/dmd_visitor.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/visitor.d diff --git a/gcc/d/dmd/visitor.h b/gcc/d/dmd/visitor.h index e61f16d..5bad56b 100644 --- a/gcc/d/dmd/visitor.h +++ b/gcc/d/dmd/visitor.h @@ -1,9 +1,9 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2013-2021 by The D Language Foundation, All Rights Reserved - * http://www.digitalmars.com + * Copyright (C) 2013-2022 by The D Language Foundation, All Rights Reserved + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/visitor.h */ diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index a53a45d..9bf486c 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -981,22 +981,57 @@ The ISO C++14 library also defines the @samp{i} suffix, so C++14 code that includes the @samp{<complex>} header cannot use @samp{i} for the GNU extension. The @samp{j} suffix still has the GNU meaning. +GCC can handle both implicit and explicit casts between the @code{_Complex} +types and other @code{_Complex} types as casting both the real and imaginary +parts to the scalar type. +GCC can handle implicit and explicit casts from a scalar type to a @code{_Complex} +type and where the imaginary part will be considered zero. +The C front-end can handle implicit and explicit casts from a @code{_Complex} type +to a scalar type where the imaginary part will be ignored. In C++ code, this cast +is considered illformed and G++ will error out. + +GCC provides a built-in function @code{__builtin_complex} will can be used to +construct a complex value. + @cindex @code{__real__} keyword @cindex @code{__imag__} keyword -To extract the real part of a complex-valued expression @var{exp}, write -@code{__real__ @var{exp}}. Likewise, use @code{__imag__} to -extract the imaginary part. This is a GNU extension; for values of -floating type, you should use the ISO C99 functions @code{crealf}, -@code{creal}, @code{creall}, @code{cimagf}, @code{cimag} and -@code{cimagl}, declared in @code{<complex.h>} and also provided as + +GCC has a few extensions which can be used to extract the real +and the imaginary part of the complex-valued expression. Note +these expressions are lvalues if the @var{exp} is an lvalue. +These expressions operands have the type of a complex type +which might get prompoted to a complex type from a scalar type. +E.g. @code{__real__ (int)@var{x}} is the same as casting to +@code{_Complex int} before @code{__real__} is done. + +@multitable @columnfractions .4 .6 +@headitem Expression @tab Description +@item @code{__real__ @var{exp}} +@tab Extract the real part of @var{exp}. +@item @code{__imag__ @var{exp}} +@tab Extract the imaginary part of @var{exp}. +@end multitable + +For values of floating point, you should use the ISO C99 +functions, declared in @code{<complex.h>} and also provided as built-in functions by GCC@. +@multitable @columnfractions .4 .2 .2 .2 +@headitem Expression @tab float @tab double @tab long double +@item @code{__real__ @var{exp}} +@tab @code{crealf} @tab @code{creal} @tab @code{creall} +@item @code{__imag__ @var{exp}} +@tab @code{cimagf} @tab @code{cimag} @tab @code{cimagl} +@end multitable + @cindex complex conjugation The operator @samp{~} performs complex conjugation when used on a value with a complex type. This is a GNU extension; for values of floating type, you should use the ISO C99 functions @code{conjf}, @code{conj} and @code{conjl}, declared in @code{<complex.h>} and also -provided as built-in functions by GCC@. +provided as built-in functions by GCC@. Note unlike the @code{__real__} +and @code{__imag__} operators, this operator will not do an implicit cast +to the complex type because the @samp{~} is already a normal operator. GCC can allocate complex automatic variables in a noncontiguous fashion; it's even possible for the real part to be in a register while @@ -1008,6 +1043,18 @@ If the variable's actual name is @code{foo}, the two fictitious variables are named @code{foo$real} and @code{foo$imag}. You can examine and set these two fictitious variables with your debugger. +@deftypefn {Built-in Function} @var{type} __builtin_complex (@var{real}, @var{imag}) + +The built-in function @code{__builtin_complex} is provided for use in +implementing the ISO C11 macros @code{CMPLXF}, @code{CMPLX} and +@code{CMPLXL}. @var{real} and @var{imag} must have the same type, a +real binary floating-point type, and the result has the corresponding +complex type with real and imaginary parts @var{real} and @var{imag}. +Unlike @samp{@var{real} + I * @var{imag}}, this works even when +infinities, NaNs and negative zeros are involved. + +@end deftypefn + @node Floating Types @section Additional Floating Types @cindex additional floating types @@ -13829,18 +13876,6 @@ an error if there is no such function. @end deftypefn -@deftypefn {Built-in Function} @var{type} __builtin_complex (@var{real}, @var{imag}) - -The built-in function @code{__builtin_complex} is provided for use in -implementing the ISO C11 macros @code{CMPLXF}, @code{CMPLX} and -@code{CMPLXL}. @var{real} and @var{imag} must have the same type, a -real binary floating-point type, and the result has the corresponding -complex type with real and imaginary parts @var{real} and @var{imag}. -Unlike @samp{@var{real} + I * @var{imag}}, this works even when -infinities, NaNs and negative zeros are involved. - -@end deftypefn - @deftypefn {Built-in Function} int __builtin_constant_p (@var{exp}) You can use the built-in function @code{__builtin_constant_p} to determine if a value is known to be constant at compile time and hence @@ -15380,8 +15415,8 @@ These built-in functions are available for the ARM family of processors with floating-point unit. @smallexample -unsigned int __builtin_arm_get_fpscr () -void __builtin_arm_set_fpscr (unsigned int) +unsigned int __builtin_arm_get_fpscr (); +void __builtin_arm_set_fpscr (unsigned int); @end smallexample @node ARM ARMv8-M Security Extensions diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index fc7dc28..19e89ae 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -7918,6 +7918,30 @@ If these patterns are not defined, attempts will be made to use counterparts. If none of these are available a compare-and-swap loop will be used. +@cindex @code{atomic_add_fetch_cmp_0@var{mode}} instruction pattern +@cindex @code{atomic_sub_fetch_cmp_0@var{mode}} instruction pattern +@cindex @code{atomic_and_fetch_cmp_0@var{mode}} instruction pattern +@cindex @code{atomic_or_fetch_cmp_0@var{mode}} instruction pattern +@cindex @code{atomic_xor_fetch_cmp_0@var{mode}} instruction pattern +@item @samp{atomic_add_fetch_cmp_0@var{mode}} +@itemx @samp{atomic_sub_fetch_cmp_0@var{mode}} +@itemx @samp{atomic_and_fetch_cmp_0@var{mode}} +@itemx @samp{atomic_or_fetch_cmp_0@var{mode}} +@itemx @samp{atomic_xor_fetch_cmp_0@var{mode}} +These patterns emit code for an atomic operation on memory with memory +model semantics if the fetch result is used only in a comparison against +zero. +Operand 0 is an output operand which contains a boolean result of comparison +of the value after the operation against zero. Operand 1 is the memory on +which the atomic operation is performed. Operand 2 is the second operand +to the binary operator. Operand 3 is the memory model to be used by the +operation. Operand 4 is an integer holding the comparison code, one of +@code{EQ}, @code{NE}, @code{LT}, @code{GT}, @code{LE} or @code{GE}. + +If these patterns are not defined, attempts will be made to use separate +atomic operation and fetch pattern followed by comparison of the result +against zero. + @cindex @code{mem_thread_fence} instruction pattern @item @samp{mem_thread_fence} This pattern emits code required to implement a thread fence with diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index eb92527..96a2cd7 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -5883,8 +5883,16 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool strict, bool permit_element) if (expr->expr_type == EXPR_FUNCTION) { - if (expr->value.function.esym) - return expr->value.function.esym->result->attr.contiguous; + if (expr->value.function.isym) + /* TRANSPOSE is the only intrinsic that may return a + non-contiguous array. It's treated as a special case in + gfc_conv_expr_descriptor too. */ + return (expr->value.function.isym->id != GFC_ISYM_TRANSPOSE); + else if (expr->value.function.esym) + /* Only a pointer to an array without the contiguous attribute + can be non-contiguous as a result value. */ + return (expr->value.function.esym->result->attr.contiguous + || !expr->value.function.esym->result->attr.pointer); else { /* Type-bound procedures. */ diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index df20db9..381915e 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -5536,13 +5536,17 @@ gfc_conv_gfc_desc_to_cfi_desc (gfc_se *parmse, gfc_expr *e, gfc_symbol *fsym) { /* If the actual argument can be noncontiguous, copy-in/out is required, if the dummy has either the CONTIGUOUS attribute or is an assumed- - length assumed-length/assumed-size CHARACTER array. */ + length assumed-length/assumed-size CHARACTER array. This only + applies if the actual argument is a "variable"; if it's some + non-lvalue expression, we are going to evaluate it to a + temporary below anyway. */ se.force_no_tmp = 1; if ((fsym->attr.contiguous || (fsym->ts.type == BT_CHARACTER && !fsym->ts.u.cl->length && (fsym->as->type == AS_ASSUMED_SIZE || fsym->as->type == AS_EXPLICIT))) - && !gfc_is_simply_contiguous (e, false, true)) + && !gfc_is_simply_contiguous (e, false, true) + && gfc_expr_is_variable (e)) { bool optional = fsym->attr.optional; fsym->attr.optional = 0; @@ -6841,6 +6845,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, fsym->attr.pointer); } else + /* This is where we introduce a temporary to store the + result of a non-lvalue array expression. */ gfc_conv_array_parameter (&parmse, e, nodesc_arg, fsym, sym->name, NULL); diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c index afd4fd0..b24102a 100644 --- a/gcc/internal-fn.c +++ b/gcc/internal-fn.c @@ -3238,6 +3238,46 @@ expand_ATOMIC_COMPARE_EXCHANGE (internal_fn, gcall *call) expand_ifn_atomic_compare_exchange (call); } +/* Expand atomic add fetch and cmp with 0. */ + +static void +expand_ATOMIC_ADD_FETCH_CMP_0 (internal_fn, gcall *call) +{ + expand_ifn_atomic_op_fetch_cmp_0 (call); +} + +/* Expand atomic sub fetch and cmp with 0. */ + +static void +expand_ATOMIC_SUB_FETCH_CMP_0 (internal_fn, gcall *call) +{ + expand_ifn_atomic_op_fetch_cmp_0 (call); +} + +/* Expand atomic and fetch and cmp with 0. */ + +static void +expand_ATOMIC_AND_FETCH_CMP_0 (internal_fn, gcall *call) +{ + expand_ifn_atomic_op_fetch_cmp_0 (call); +} + +/* Expand atomic or fetch and cmp with 0. */ + +static void +expand_ATOMIC_OR_FETCH_CMP_0 (internal_fn, gcall *call) +{ + expand_ifn_atomic_op_fetch_cmp_0 (call); +} + +/* Expand atomic xor fetch and cmp with 0. */ + +static void +expand_ATOMIC_XOR_FETCH_CMP_0 (internal_fn, gcall *call) +{ + expand_ifn_atomic_op_fetch_cmp_0 (call); +} + /* Expand LAUNDER to assignment, lhs = arg0. */ static void diff --git a/gcc/internal-fn.def b/gcc/internal-fn.def index 68d9632..8891071 100644 --- a/gcc/internal-fn.def +++ b/gcc/internal-fn.def @@ -403,6 +403,11 @@ DEF_INTERNAL_FN (ATOMIC_BIT_TEST_AND_SET, ECF_LEAF, NULL) DEF_INTERNAL_FN (ATOMIC_BIT_TEST_AND_COMPLEMENT, ECF_LEAF, NULL) DEF_INTERNAL_FN (ATOMIC_BIT_TEST_AND_RESET, ECF_LEAF, NULL) DEF_INTERNAL_FN (ATOMIC_COMPARE_EXCHANGE, ECF_LEAF, NULL) +DEF_INTERNAL_FN (ATOMIC_ADD_FETCH_CMP_0, ECF_LEAF, NULL) +DEF_INTERNAL_FN (ATOMIC_SUB_FETCH_CMP_0, ECF_LEAF, NULL) +DEF_INTERNAL_FN (ATOMIC_AND_FETCH_CMP_0, ECF_LEAF, NULL) +DEF_INTERNAL_FN (ATOMIC_OR_FETCH_CMP_0, ECF_LEAF, NULL) +DEF_INTERNAL_FN (ATOMIC_XOR_FETCH_CMP_0, ECF_LEAF, NULL) /* To implement [[fallthrough]]. */ DEF_INTERNAL_FN (FALLTHROUGH, ECF_LEAF | ECF_NOTHROW, NULL) diff --git a/gcc/internal-fn.h b/gcc/internal-fn.h index 1d28c22..743888b 100644 --- a/gcc/internal-fn.h +++ b/gcc/internal-fn.h @@ -240,4 +240,13 @@ extern void expand_SHUFFLEVECTOR (internal_fn, gcall *); extern bool vectorized_internal_fn_supported_p (internal_fn, tree); +enum { + ATOMIC_OP_FETCH_CMP_0_EQ = 0, + ATOMIC_OP_FETCH_CMP_0_NE = 1, + ATOMIC_OP_FETCH_CMP_0_LT = 2, + ATOMIC_OP_FETCH_CMP_0_LE = 3, + ATOMIC_OP_FETCH_CMP_0_GT = 4, + ATOMIC_OP_FETCH_CMP_0_GE = 5 +}; + #endif diff --git a/gcc/optabs.def b/gcc/optabs.def index f1c4a109..5fcf538 100644 --- a/gcc/optabs.def +++ b/gcc/optabs.def @@ -451,6 +451,11 @@ OPTAB_D (atomic_sub_fetch_optab, "atomic_sub_fetch$I$a") OPTAB_D (atomic_sub_optab, "atomic_sub$I$a") OPTAB_D (atomic_xor_fetch_optab, "atomic_xor_fetch$I$a") OPTAB_D (atomic_xor_optab, "atomic_xor$I$a") +OPTAB_D (atomic_add_fetch_cmp_0_optab, "atomic_add_fetch_cmp_0$I$a") +OPTAB_D (atomic_sub_fetch_cmp_0_optab, "atomic_sub_fetch_cmp_0$I$a") +OPTAB_D (atomic_and_fetch_cmp_0_optab, "atomic_and_fetch_cmp_0$I$a") +OPTAB_D (atomic_or_fetch_cmp_0_optab, "atomic_or_fetch_cmp_0$I$a") +OPTAB_D (atomic_xor_fetch_cmp_0_optab, "atomic_xor_fetch_cmp_0$I$a") OPTAB_D (get_thread_pointer_optab, "get_thread_pointer$I$a") OPTAB_D (set_thread_pointer_optab, "set_thread_pointer$I$a") diff --git a/gcc/symtab.c b/gcc/symtab.c index d037fe6..87cd560 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see #include "stringpool.h" #include "attribs.h" #include "builtins.h" +#include "fold-const.h" static const char *ipa_ref_use_name[] = {"read","write","addr","alias"}; @@ -2276,13 +2277,28 @@ symtab_node::equal_address_to (symtab_node *s2, bool memory_accessed) return 0; } + if (rs1 == rs2) + return -1; + + /* If the FE tells us at least one of the decls will never be aliased nor + overlapping with other vars in some other way, return 0. */ + if (VAR_P (decl) + && (lookup_attribute ("non overlapping", DECL_ATTRIBUTES (decl)) + || lookup_attribute ("non overlapping", DECL_ATTRIBUTES (s2->decl)))) + return 0; + /* TODO: Alias oracle basically assume that addresses of global variables are different unless they are declared as alias of one to another while the code folding comparisons doesn't. We probably should be consistent and use this fact here, too, but for - the moment return false only when we are called from the alias oracle. */ + the moment return false only when we are called from the alias oracle. + Return 0 in C constant initializers and C++ manifestly constant + expressions, the likelyhood that different vars will be aliases is + small and returning -1 lets us reject too many initializers. */ + if (memory_accessed || folding_initializer) + return 0; - return memory_accessed && rs1 != rs2 ? 0 : -1; + return -1; } /* Worker for call_for_symbol_and_aliases. */ diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C new file mode 100644 index 0000000..ad65019 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-compare1.C @@ -0,0 +1,7 @@ +// { dg-do compile { target c++11 } } + +extern int a, b; +static_assert (&a == &a, ""); +static_assert (&a != &b, ""); +constexpr bool c = &a == &a; +constexpr bool d = &a != &b; diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C new file mode 100644 index 0000000..78c6b8e --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid2.C @@ -0,0 +1,14 @@ +// PR c++/103600 +// { dg-do compile { target c++11 } } + +#include <typeinfo> + +struct S { int i; }; +namespace { + struct T { int i; }; +}; +constexpr bool a = &typeid (int) == &typeid (int); +constexpr bool b = &typeid (int) == &typeid (long); +constexpr bool c = &typeid (double) != &typeid (int); +constexpr bool d = &typeid (S) != &typeid (T); +static_assert (a && !b && c && d, ""); diff --git a/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C b/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C new file mode 100644 index 0000000..90173f3 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/constexpr-94716.C @@ -0,0 +1,8 @@ +// PR c++/94716 +// { dg-do compile { target c++14 } } + +template <int> char v = 0; +static_assert (&v<2> == &v<2>, ""); +static_assert (&v<0> != &v<1>, ""); +constexpr bool a = &v<2> == &v<2>; +constexpr bool b = &v<0> != &v<1>; diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C new file mode 100644 index 0000000..a53c03c --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-compare1.C @@ -0,0 +1,8 @@ +// { dg-do compile { target c++17 } } + +inline int a = 0; +inline int b = 0; +static_assert (&a == &a); +static_assert (&a != &b); +constexpr bool c = &a == &a; +constexpr bool d = &a != &b; diff --git a/gcc/testsuite/g++.dg/gomp/pr103851.C b/gcc/testsuite/g++.dg/gomp/pr103851.C new file mode 100644 index 0000000..257e405 --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr103851.C @@ -0,0 +1,15 @@ +// { dg-do compile } +// { dg-options "-fopenmp -ftrivial-auto-var-init=pattern" } + +struct _Deque_base { + long _M_map_size; + int *_M_start; + int *_M_finish; +}; +void morphologicalFilter1D() +{ +#pragma omp parallel + { + struct _Deque_base vals[4]; + } +} diff --git a/gcc/testsuite/gcc.dg/init-compare-1.c b/gcc/testsuite/gcc.dg/init-compare-1.c new file mode 100644 index 0000000..9208b66 --- /dev/null +++ b/gcc/testsuite/gcc.dg/init-compare-1.c @@ -0,0 +1,5 @@ +/* { dg-do compile } */ + +extern int a, b; +int c = &a == &a; +int d = &a != &b; diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-18.c b/gcc/testsuite/gcc.dg/vect/vect-simd-18.c index b25f5a5..cca350f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-simd-18.c +++ b/gcc/testsuite/gcc.dg/vect/vect-simd-18.c @@ -17,7 +17,7 @@ foo (int s, int *p) return r; } -int p[10000 / 78]; +int p[10000 / 78 + 1]; int main () diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-19.c b/gcc/testsuite/gcc.dg/vect/vect-simd-19.c index a71dfa6..67e25c0 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-simd-19.c +++ b/gcc/testsuite/gcc.dg/vect/vect-simd-19.c @@ -17,7 +17,7 @@ foo (int s, int m, int n, int *p) return r; } -int p[10000 / 78]; +int p[10000 / 78 + 1]; int main () diff --git a/gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c b/gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c index f24acbd..17b0c40 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c +++ b/gcc/testsuite/gcc.target/i386/avx2-i32gatherpd256-4.c @@ -25,15 +25,19 @@ avx2_test (void) int i; union128i_d idx; union256d res, src, mask; - double s1[4], res_ref[4] = { 0 }; + double s1[16], res_ref[4] = { 0 }; + double *s1_ptr = s1 + 8; - for (i = 0; i < 4; ++i) + for (i = 0; i < ARRAY_SIZE (s1); i++) { /* Set some stuff */ s1[i] = 2.718281828459045 * (i + 1) * (i + 2); + } + for (i = 0; i < 4; ++i) + { /* Set src as something different from s1 */ - src.a[i] = -s1[i]; + src.a[i] = -s1_ptr[i]; /* Mask out evens */ ((long long *) mask.a)[i] = i % 2 ? 0 : -1; @@ -43,9 +47,9 @@ avx2_test (void) idx.a[i] = (16 - (i + 1) * 8) >> 1; } - res.x = _mm256_mask_i32gather_pd (src.x, s1, idx.x, mask.x, 2); + res.x = _mm256_mask_i32gather_pd (src.x, s1_ptr, idx.x, mask.x, 2); - compute_i32gatherpd256 (src.a, s1, idx.a, mask.a, 2, res_ref); + compute_i32gatherpd256 (src.a, s1_ptr, idx.a, mask.a, 2, res_ref); if (check_union256d (res, res_ref) != 0) abort (); diff --git a/gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c b/gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c index 3eab9be..77ebf1f 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c +++ b/gcc/testsuite/gcc.target/i386/avx2-i32gatherq256-4.c @@ -25,15 +25,19 @@ avx2_test (void) long long i; union128i_d idx; union256i_q res, src, mask; - long long s1[4], res_ref[4] = { 0 }; + long long s1[16], res_ref[4] = { 0 }; + long long *s1_ptr = s1 + 8; - for (i = 0; i < 4; ++i) + for (i = 0; i < ARRAY_SIZE (s1); i++) { /* Set some stuff */ s1[i] = 1983 * (i + 1) * (i + 2); + } + for (i = 0; i < 4; ++i) + { /* Set src as something different from s1 */ - src.a[i] = -s1[i]; + src.a[i] = -s1_ptr[i]; /* Mask out evens */ mask.a[i] = i % 2 ? 0 : -1; @@ -44,10 +48,10 @@ avx2_test (void) } res.x = _mm256_mask_i32gather_epi64 (src.x, - (long long int *) s1, + (long long int *) s1_ptr, idx.x, mask.x, 2); - compute_i32gatherpd256 (src.a, s1, idx.a, mask.a, 2, res_ref); + compute_i32gatherpd256 (src.a, s1_ptr, idx.a, mask.a, 2, res_ref); if (check_union256i_q (res, res_ref) != 0) abort (); diff --git a/gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c b/gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c index 09a5f8a..cf94256 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c +++ b/gcc/testsuite/gcc.target/i386/avx2-i64gatherpd256-4.c @@ -25,15 +25,19 @@ avx2_test (void) int i; union256i_q idx; union256d res, src, mask; - double s1[4], res_ref[4] = { 0 }; + double s1[16], res_ref[4] = { 0 }; + double *s1_ptr = s1 + 8; - for (i = 0; i < 4; ++i) + for (i = 0; i < ARRAY_SIZE (s1); i++) { /* Set some stuff */ s1[i] = 2.718281828459045 * (i + 1) * (i + 2); + } + for (i = 0; i < 4; ++i) + { /* Set src as something different from s1 */ - src.a[i] = -s1[i]; + src.a[i] = -s1_ptr[i]; /* Mask out evens */ ((long long *) mask.a)[i] = i % 2 ? 0 : -1; @@ -43,9 +47,9 @@ avx2_test (void) idx.a[i] = (16 - (i + 1) * 8) >> 1; } - res.x = _mm256_mask_i64gather_pd (src.x, s1, idx.x, mask.x, 2); + res.x = _mm256_mask_i64gather_pd (src.x, s1_ptr, idx.x, mask.x, 2); - compute_i64gatherpd256 (src.a, s1, idx.a, mask.a, 2, res_ref); + compute_i64gatherpd256 (src.a, s1_ptr, idx.a, mask.a, 2, res_ref); if (check_union256d (res, res_ref) != 0) abort (); diff --git a/gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c b/gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c index 355c8c2..396ffb4 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c +++ b/gcc/testsuite/gcc.target/i386/avx2-i64gatherq256-4.c @@ -26,15 +26,19 @@ avx2_test (void) long long i; union256i_q idx; union256i_q res, src, mask; - long long s1[4], res_ref[4] = { 0 }; + long long s1[16], res_ref[4] = { 0 }; + long long *s1_ptr = s1 + 8; - for (i = 0; i < 4; ++i) + for (i = 0; i < ARRAY_SIZE (s1); i++) { /* Set some stuff */ s1[i] = 1983 * (i + 1) * (i + 2); + } + for (i = 0; i < 4; ++i) + { /* Set src as something different from s1 */ - src.a[i] = -s1[i]; + src.a[i] = -s1_ptr[i]; /* Mask out evens */ ((long long *) mask.a)[i] = i % 2 ? 0 : -1; @@ -45,10 +49,10 @@ avx2_test (void) } res.x = _mm256_mask_i64gather_epi64 (src.x, - (long long int *) s1, + (long long int *) s1_ptr, idx.x, mask.x, 2); - compute_i64gatherq256 (src.a, s1, idx.a, mask.a, 2, res_ref); + compute_i64gatherq256 (src.a, s1_ptr, idx.a, mask.a, 2, res_ref); if (check_union256i_q (res, res_ref) != 0) abort (); diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c b/gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c index 05db8a4..9b732af 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c +++ b/gcc/testsuite/gcc.target/i386/avx2-vpabsb256-2.c @@ -28,7 +28,7 @@ avx2_test (void) union256i_b s, d; - for (i = 0; i < 256; ++i) + for (i = 0; i < 256 - 7; ++i) { /* Recompute the results for 256-bits */ compute_pabs256 (&vals[i], ck); diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c b/gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c index 4c88024..caf1a58 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c +++ b/gcc/testsuite/gcc.target/i386/avx2-vpabsd256-2.c @@ -27,7 +27,7 @@ avx2_test (void) union256i_d s, d; - for (i = 0; i < 256; ++i) + for (i = 0; i < 256 - 7; ++i) { /* Recompute the results for 256-bits */ compute_pabs256 (&vals[i], ck); diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c b/gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c index fa4efd2..299323d 100644 --- a/gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c +++ b/gcc/testsuite/gcc.target/i386/avx2-vpabsw256-2.c @@ -28,7 +28,7 @@ avx2_test (void) union256i_w s, d; - for (i = 0; i < 256; ++i) + for (i = 0; i < 256 - 7; ++i) { /* Using only first 2 bytes of int */ /* Recompute the results for 256-bits */ diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c index 4c6054c..de30ddb 100644 --- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c +++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-7.c @@ -16,10 +16,10 @@ __attribute__ ((noinline)) void foo (void) { - mp = (char **) malloc (N); - lp = (char **) malloc (N); - ep = (char **) malloc (N); - fp = (char **) malloc (N); + mp = (char **) malloc (N * sizeof (char **)); + lp = (char **) malloc (N * sizeof (char **)); + ep = (char **) malloc (N * sizeof (char **)); + fp = (char **) malloc (N * sizeof (char **)); } void diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c index 99a0c71..2752e7f 100644 --- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c +++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-7.c @@ -14,8 +14,8 @@ __attribute__ ((noinline)) void foo (void) { - ep = (char **) malloc (N); - fp = (char **) malloc (N); + ep = (char **) malloc (N * sizeof (char **)); + fp = (char **) malloc (N * sizeof (char **)); } void diff --git a/gcc/testsuite/gcc.target/i386/pr64291-1.c b/gcc/testsuite/gcc.target/i386/pr64291-1.c index 1d3a380..85f1e04 100644 --- a/gcc/testsuite/gcc.target/i386/pr64291-1.c +++ b/gcc/testsuite/gcc.target/i386/pr64291-1.c @@ -24,7 +24,7 @@ int main () f (n); h (d); qp = (unsigned long*)__builtin_alloca(4099*8) + 1; - dnp = (unsigned long*)__builtin_alloca (2049*8); + dnp = (unsigned long*)__builtin_alloca (2049*8) + 1; alloc = 1; for (test = 0; test < 1; test++) { diff --git a/gcc/testsuite/gcc.target/i386/pr98737-1.c b/gcc/testsuite/gcc.target/i386/pr98737-1.c new file mode 100644 index 0000000..33c84da --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr98737-1.c @@ -0,0 +1,207 @@ +/* PR target/98737 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -masm=att" } */ +/* { dg-additional-options "-march=i686" { target ia32 } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*subq\t" { target lp64 } } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*subl\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*subw\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*subb\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */ + +long a; +int b; +short c; +char d; + +int +f1 (long x) +{ + return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) == 0; +} + +int +f2 (int x) +{ + return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) == 0; +} + +int +f3 (short x) +{ + return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) == 0; +} + +int +f4 (char x) +{ + return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) == 0; +} + +int +f5 (long x) +{ + return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) != 0; +} + +int +f6 (int x) +{ + return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) != 0; +} + +int +f7 (short x) +{ + return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) != 0; +} + +int +f8 (char x) +{ + return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) != 0; +} + +int +f9 (long x) +{ + return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) < 0; +} + +int +f10 (int x) +{ + return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) < 0; +} + +int +f11 (short x) +{ + return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) < 0; +} + +int +f12 (char x) +{ + return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) < 0; +} + +int +f13 (long x) +{ + return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) >= 0; +} + +int +f14 (int x) +{ + return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) >= 0; +} + +int +f15 (short x) +{ + return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) >= 0; +} + +int +f16 (char x) +{ + return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) >= 0; +} + +int +f17 (long x) +{ + return __sync_sub_and_fetch (&a, x) == 0; +} + +int +f18 (int x) +{ + return __sync_sub_and_fetch (&b, x) == 0; +} + +int +f19 (short x) +{ + return __sync_sub_and_fetch (&c, x) == 0; +} + +int +f20 (char x) +{ + return __sync_sub_and_fetch (&d, x) == 0; +} + +int +f21 (long x) +{ + return __sync_sub_and_fetch (&a, x) != 0; +} + +int +f22 (int x) +{ + return __sync_sub_and_fetch (&b, x) != 0; +} + +int +f23 (short x) +{ + return __sync_sub_and_fetch (&c, x) != 0; +} + +int +f24 (char x) +{ + return __sync_sub_and_fetch (&d, x) != 0; +} + +int +f25 (long x) +{ + return __sync_sub_and_fetch (&a, x) < 0; +} + +int +f26 (int x) +{ + return __sync_sub_and_fetch (&b, x) < 0; +} + +int +f27 (short x) +{ + return __sync_sub_and_fetch (&c, x) < 0; +} + +int +f28 (char x) +{ + return __sync_sub_and_fetch (&d, x) < 0; +} + +int +f29 (long x) +{ + return __sync_sub_and_fetch (&a, x) >= 0; +} + +int +f30 (int x) +{ + return __sync_sub_and_fetch (&b, x) >= 0; +} + +int +f31 (short x) +{ + return __sync_sub_and_fetch (&c, x) >= 0; +} + +int +f32 (char x) +{ + return __sync_sub_and_fetch (&d, x) >= 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr98737-2.c b/gcc/testsuite/gcc.target/i386/pr98737-2.c new file mode 100644 index 0000000..53b674e --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr98737-2.c @@ -0,0 +1,111 @@ +/* PR target/98737 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -masm=att" } */ +/* { dg-additional-options "-march=i686" { target ia32 } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*subq\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*subl\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*subw\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*subb\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*xadd" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */ + +long a; +int b; +short c; +char d; + +int +f1 (long x) +{ + return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) <= 0; +} + +int +f2 (int x) +{ + return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) <= 0; +} + +int +f3 (short x) +{ + return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) <= 0; +} + +int +f4 (char x) +{ + return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) <= 0; +} + +int +f5 (long x) +{ + return __atomic_sub_fetch (&a, x, __ATOMIC_RELEASE) > 0; +} + +int +f6 (int x) +{ + return __atomic_sub_fetch (&b, x, __ATOMIC_RELEASE) > 0; +} + +int +f7 (short x) +{ + return __atomic_sub_fetch (&c, x, __ATOMIC_RELEASE) > 0; +} + +int +f8 (char x) +{ + return __atomic_sub_fetch (&d, x, __ATOMIC_RELEASE) > 0; +} + +int +f9 (long x) +{ + return __sync_sub_and_fetch (&a, x) <= 0; +} + +int +f10 (int x) +{ + return __sync_sub_and_fetch (&b, x) <= 0; +} + +int +f11 (short x) +{ + return __sync_sub_and_fetch (&c, x) <= 0; +} + +int +f12 (char x) +{ + return __sync_sub_and_fetch (&d, x) <= 0; +} + +int +f13 (long x) +{ + return __sync_sub_and_fetch (&a, x) > 0; +} + +int +f14 (int x) +{ + return __sync_sub_and_fetch (&b, x) > 0; +} + +int +f15 (short x) +{ + return __sync_sub_and_fetch (&c, x) > 0; +} + +int +f16 (char x) +{ + return __sync_sub_and_fetch (&d, x) > 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr98737-3.c b/gcc/testsuite/gcc.target/i386/pr98737-3.c new file mode 100644 index 0000000..0e7108a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr98737-3.c @@ -0,0 +1,207 @@ +/* PR target/98737 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -masm=att" } */ +/* { dg-additional-options "-march=i686" { target ia32 } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*addq\t" { target lp64 } } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*addl\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*addw\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*addb\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */ + +long a; +int b; +short c; +char d; + +int +f1 (long x) +{ + return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) == 0; +} + +int +f2 (int x) +{ + return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) == 0; +} + +int +f3 (short x) +{ + return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) == 0; +} + +int +f4 (char x) +{ + return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) == 0; +} + +int +f5 (long x) +{ + return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) != 0; +} + +int +f6 (int x) +{ + return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) != 0; +} + +int +f7 (short x) +{ + return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) != 0; +} + +int +f8 (char x) +{ + return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) != 0; +} + +int +f9 (long x) +{ + return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) < 0; +} + +int +f10 (int x) +{ + return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) < 0; +} + +int +f11 (short x) +{ + return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) < 0; +} + +int +f12 (char x) +{ + return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) < 0; +} + +int +f13 (long x) +{ + return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) >= 0; +} + +int +f14 (int x) +{ + return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) >= 0; +} + +int +f15 (short x) +{ + return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) >= 0; +} + +int +f16 (char x) +{ + return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) >= 0; +} + +int +f17 (long x) +{ + return __sync_add_and_fetch (&a, x) == 0; +} + +int +f18 (int x) +{ + return __sync_add_and_fetch (&b, x) == 0; +} + +int +f19 (short x) +{ + return __sync_add_and_fetch (&c, x) == 0; +} + +int +f20 (char x) +{ + return __sync_add_and_fetch (&d, x) == 0; +} + +int +f21 (long x) +{ + return __sync_add_and_fetch (&a, x) != 0; +} + +int +f22 (int x) +{ + return __sync_add_and_fetch (&b, x) != 0; +} + +int +f23 (short x) +{ + return __sync_add_and_fetch (&c, x) != 0; +} + +int +f24 (char x) +{ + return __sync_add_and_fetch (&d, x) != 0; +} + +int +f25 (long x) +{ + return __sync_add_and_fetch (&a, x) < 0; +} + +int +f26 (int x) +{ + return __sync_add_and_fetch (&b, x) < 0; +} + +int +f27 (short x) +{ + return __sync_add_and_fetch (&c, x) < 0; +} + +int +f28 (char x) +{ + return __sync_add_and_fetch (&d, x) < 0; +} + +int +f29 (long x) +{ + return __sync_add_and_fetch (&a, x) >= 0; +} + +int +f30 (int x) +{ + return __sync_add_and_fetch (&b, x) >= 0; +} + +int +f31 (short x) +{ + return __sync_add_and_fetch (&c, x) >= 0; +} + +int +f32 (char x) +{ + return __sync_add_and_fetch (&d, x) >= 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr98737-4.c b/gcc/testsuite/gcc.target/i386/pr98737-4.c new file mode 100644 index 0000000..8228d52 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr98737-4.c @@ -0,0 +1,111 @@ +/* PR target/98737 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -masm=att" } */ +/* { dg-additional-options "-march=i686" { target ia32 } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\rx]\*addq\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\rx]\*addl\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\rx]\*addw\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\rx]\*addb\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*xadd" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */ + +long a; +int b; +short c; +char d; + +int +f1 (long x) +{ + return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) <= 0; +} + +int +f2 (int x) +{ + return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) <= 0; +} + +int +f3 (short x) +{ + return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) <= 0; +} + +int +f4 (char x) +{ + return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) <= 0; +} + +int +f5 (long x) +{ + return __atomic_add_fetch (&a, x, __ATOMIC_RELEASE) > 0; +} + +int +f6 (int x) +{ + return __atomic_add_fetch (&b, x, __ATOMIC_RELEASE) > 0; +} + +int +f7 (short x) +{ + return __atomic_add_fetch (&c, x, __ATOMIC_RELEASE) > 0; +} + +int +f8 (char x) +{ + return __atomic_add_fetch (&d, x, __ATOMIC_RELEASE) > 0; +} + +int +f9 (long x) +{ + return __sync_add_and_fetch (&a, x) <= 0; +} + +int +f10 (int x) +{ + return __sync_add_and_fetch (&b, x) <= 0; +} + +int +f11 (short x) +{ + return __sync_add_and_fetch (&c, x) <= 0; +} + +int +f12 (char x) +{ + return __sync_add_and_fetch (&d, x) <= 0; +} + +int +f13 (long x) +{ + return __sync_add_and_fetch (&a, x) > 0; +} + +int +f14 (int x) +{ + return __sync_add_and_fetch (&b, x) > 0; +} + +int +f15 (short x) +{ + return __sync_add_and_fetch (&c, x) > 0; +} + +int +f16 (char x) +{ + return __sync_add_and_fetch (&d, x) > 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr98737-5.c b/gcc/testsuite/gcc.target/i386/pr98737-5.c new file mode 100644 index 0000000..6d3e063 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr98737-5.c @@ -0,0 +1,303 @@ +/* PR target/98737 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -masm=att" } */ +/* { dg-additional-options "-march=i686" { target ia32 } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*andq\t" { target lp64 } } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*andl\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*andw\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*andb\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */ + +long a; +int b; +short c; +char d; + +int +f1 (long x) +{ + return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) == 0; +} + +int +f2 (int x) +{ + return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) == 0; +} + +int +f3 (short x) +{ + return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) == 0; +} + +int +f4 (char x) +{ + return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) == 0; +} + +int +f5 (long x) +{ + return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) != 0; +} + +int +f6 (int x) +{ + return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) != 0; +} + +int +f7 (short x) +{ + return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) != 0; +} + +int +f8 (char x) +{ + return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) != 0; +} + +int +f9 (long x) +{ + return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) < 0; +} + +int +f10 (int x) +{ + return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) < 0; +} + +int +f11 (short x) +{ + return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) < 0; +} + +int +f12 (char x) +{ + return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) < 0; +} + +int +f13 (long x) +{ + return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) >= 0; +} + +int +f14 (int x) +{ + return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) >= 0; +} + +int +f15 (short x) +{ + return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) >= 0; +} + +int +f16 (char x) +{ + return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) >= 0; +} + +int +f17 (long x) +{ + return __sync_and_and_fetch (&a, x) == 0; +} + +int +f18 (int x) +{ + return __sync_and_and_fetch (&b, x) == 0; +} + +int +f19 (short x) +{ + return __sync_and_and_fetch (&c, x) == 0; +} + +int +f20 (char x) +{ + return __sync_and_and_fetch (&d, x) == 0; +} + +int +f21 (long x) +{ + return __sync_and_and_fetch (&a, x) != 0; +} + +int +f22 (int x) +{ + return __sync_and_and_fetch (&b, x) != 0; +} + +int +f23 (short x) +{ + return __sync_and_and_fetch (&c, x) != 0; +} + +int +f24 (char x) +{ + return __sync_and_and_fetch (&d, x) != 0; +} + +int +f25 (long x) +{ + return __sync_and_and_fetch (&a, x) < 0; +} + +int +f26 (int x) +{ + return __sync_and_and_fetch (&b, x) < 0; +} + +int +f27 (short x) +{ + return __sync_and_and_fetch (&c, x) < 0; +} + +int +f28 (char x) +{ + return __sync_and_and_fetch (&d, x) < 0; +} + +int +f29 (long x) +{ + return __sync_and_and_fetch (&a, x) >= 0; +} + +int +f30 (int x) +{ + return __sync_and_and_fetch (&b, x) >= 0; +} + +int +f31 (short x) +{ + return __sync_and_and_fetch (&c, x) >= 0; +} + +int +f32 (char x) +{ + return __sync_and_and_fetch (&d, x) >= 0; +} + +int +f33 (long x) +{ + return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) <= 0; +} + +int +f34 (int x) +{ + return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) <= 0; +} + +int +f35 (short x) +{ + return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) <= 0; +} + +int +f36 (char x) +{ + return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) <= 0; +} + +int +f37 (long x) +{ + return __atomic_and_fetch (&a, x, __ATOMIC_RELEASE) > 0; +} + +int +f38 (int x) +{ + return __atomic_and_fetch (&b, x, __ATOMIC_RELEASE) > 0; +} + +int +f39 (short x) +{ + return __atomic_and_fetch (&c, x, __ATOMIC_RELEASE) > 0; +} + +int +f40 (char x) +{ + return __atomic_and_fetch (&d, x, __ATOMIC_RELEASE) > 0; +} + +int +f41 (long x) +{ + return __sync_and_and_fetch (&a, x) <= 0; +} + +int +f42 (int x) +{ + return __sync_and_and_fetch (&b, x) <= 0; +} + +int +f43 (short x) +{ + return __sync_and_and_fetch (&c, x) <= 0; +} + +int +f44 (char x) +{ + return __sync_and_and_fetch (&d, x) <= 0; +} + +int +f45 (long x) +{ + return __sync_and_and_fetch (&a, x) > 0; +} + +int +f46 (int x) +{ + return __sync_and_and_fetch (&b, x) > 0; +} + +int +f47 (short x) +{ + return __sync_and_and_fetch (&c, x) > 0; +} + +int +f48 (char x) +{ + return __sync_and_and_fetch (&d, x) > 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr98737-6.c b/gcc/testsuite/gcc.target/i386/pr98737-6.c new file mode 100644 index 0000000..6cc1c3a --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr98737-6.c @@ -0,0 +1,303 @@ +/* PR target/98737 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -masm=att" } */ +/* { dg-additional-options "-march=i686" { target ia32 } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*orq\t" { target lp64 } } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*orl\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*orw\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*orb\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */ + +long a; +int b; +short c; +char d; + +int +f1 (long x) +{ + return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) == 0; +} + +int +f2 (int x) +{ + return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) == 0; +} + +int +f3 (short x) +{ + return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) == 0; +} + +int +f4 (char x) +{ + return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) == 0; +} + +int +f5 (long x) +{ + return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) != 0; +} + +int +f6 (int x) +{ + return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) != 0; +} + +int +f7 (short x) +{ + return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) != 0; +} + +int +f8 (char x) +{ + return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) != 0; +} + +int +f9 (long x) +{ + return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) < 0; +} + +int +f10 (int x) +{ + return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) < 0; +} + +int +f11 (short x) +{ + return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) < 0; +} + +int +f12 (char x) +{ + return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) < 0; +} + +int +f13 (long x) +{ + return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) >= 0; +} + +int +f14 (int x) +{ + return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) >= 0; +} + +int +f15 (short x) +{ + return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) >= 0; +} + +int +f16 (char x) +{ + return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) >= 0; +} + +int +f17 (long x) +{ + return __sync_or_and_fetch (&a, x) == 0; +} + +int +f18 (int x) +{ + return __sync_or_and_fetch (&b, x) == 0; +} + +int +f19 (short x) +{ + return __sync_or_and_fetch (&c, x) == 0; +} + +int +f20 (char x) +{ + return __sync_or_and_fetch (&d, x) == 0; +} + +int +f21 (long x) +{ + return __sync_or_and_fetch (&a, x) != 0; +} + +int +f22 (int x) +{ + return __sync_or_and_fetch (&b, x) != 0; +} + +int +f23 (short x) +{ + return __sync_or_and_fetch (&c, x) != 0; +} + +int +f24 (char x) +{ + return __sync_or_and_fetch (&d, x) != 0; +} + +int +f25 (long x) +{ + return __sync_or_and_fetch (&a, x) < 0; +} + +int +f26 (int x) +{ + return __sync_or_and_fetch (&b, x) < 0; +} + +int +f27 (short x) +{ + return __sync_or_and_fetch (&c, x) < 0; +} + +int +f28 (char x) +{ + return __sync_or_and_fetch (&d, x) < 0; +} + +int +f29 (long x) +{ + return __sync_or_and_fetch (&a, x) >= 0; +} + +int +f30 (int x) +{ + return __sync_or_and_fetch (&b, x) >= 0; +} + +int +f31 (short x) +{ + return __sync_or_and_fetch (&c, x) >= 0; +} + +int +f32 (char x) +{ + return __sync_or_and_fetch (&d, x) >= 0; +} + +int +f33 (long x) +{ + return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) <= 0; +} + +int +f34 (int x) +{ + return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) <= 0; +} + +int +f35 (short x) +{ + return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) <= 0; +} + +int +f36 (char x) +{ + return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) <= 0; +} + +int +f37 (long x) +{ + return __atomic_or_fetch (&a, x, __ATOMIC_RELEASE) > 0; +} + +int +f38 (int x) +{ + return __atomic_or_fetch (&b, x, __ATOMIC_RELEASE) > 0; +} + +int +f39 (short x) +{ + return __atomic_or_fetch (&c, x, __ATOMIC_RELEASE) > 0; +} + +int +f40 (char x) +{ + return __atomic_or_fetch (&d, x, __ATOMIC_RELEASE) > 0; +} + +int +f41 (long x) +{ + return __sync_or_and_fetch (&a, x) <= 0; +} + +int +f42 (int x) +{ + return __sync_or_and_fetch (&b, x) <= 0; +} + +int +f43 (short x) +{ + return __sync_or_and_fetch (&c, x) <= 0; +} + +int +f44 (char x) +{ + return __sync_or_and_fetch (&d, x) <= 0; +} + +int +f45 (long x) +{ + return __sync_or_and_fetch (&a, x) > 0; +} + +int +f46 (int x) +{ + return __sync_or_and_fetch (&b, x) > 0; +} + +int +f47 (short x) +{ + return __sync_or_and_fetch (&c, x) > 0; +} + +int +f48 (char x) +{ + return __sync_or_and_fetch (&d, x) > 0; +} diff --git a/gcc/testsuite/gcc.target/i386/pr98737-7.c b/gcc/testsuite/gcc.target/i386/pr98737-7.c new file mode 100644 index 0000000..2da23c4 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr98737-7.c @@ -0,0 +1,303 @@ +/* PR target/98737 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -masm=att" } */ +/* { dg-additional-options "-march=i686" { target ia32 } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*xorq\t" { target lp64 } } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*xorl\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*xorw\t" } } */ +/* { dg-final { scan-assembler "lock\[^\n\r]\*xorb\t" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*xadd" } } */ +/* { dg-final { scan-assembler-not "lock\[^\n\r]\*cmpxchg" } } */ + +long a; +int b; +short c; +char d; + +int +f1 (long x) +{ + return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) == 0; +} + +int +f2 (int x) +{ + return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) == 0; +} + +int +f3 (short x) +{ + return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) == 0; +} + +int +f4 (char x) +{ + return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) == 0; +} + +int +f5 (long x) +{ + return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) != 0; +} + +int +f6 (int x) +{ + return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) != 0; +} + +int +f7 (short x) +{ + return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) != 0; +} + +int +f8 (char x) +{ + return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) != 0; +} + +int +f9 (long x) +{ + return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) < 0; +} + +int +f10 (int x) +{ + return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) < 0; +} + +int +f11 (short x) +{ + return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) < 0; +} + +int +f12 (char x) +{ + return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) < 0; +} + +int +f13 (long x) +{ + return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) >= 0; +} + +int +f14 (int x) +{ + return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) >= 0; +} + +int +f15 (short x) +{ + return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) >= 0; +} + +int +f16 (char x) +{ + return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) >= 0; +} + +int +f17 (long x) +{ + return __sync_xor_and_fetch (&a, x) == 0; +} + +int +f18 (int x) +{ + return __sync_xor_and_fetch (&b, x) == 0; +} + +int +f19 (short x) +{ + return __sync_xor_and_fetch (&c, x) == 0; +} + +int +f20 (char x) +{ + return __sync_xor_and_fetch (&d, x) == 0; +} + +int +f21 (long x) +{ + return __sync_xor_and_fetch (&a, x) != 0; +} + +int +f22 (int x) +{ + return __sync_xor_and_fetch (&b, x) != 0; +} + +int +f23 (short x) +{ + return __sync_xor_and_fetch (&c, x) != 0; +} + +int +f24 (char x) +{ + return __sync_xor_and_fetch (&d, x) != 0; +} + +int +f25 (long x) +{ + return __sync_xor_and_fetch (&a, x) < 0; +} + +int +f26 (int x) +{ + return __sync_xor_and_fetch (&b, x) < 0; +} + +int +f27 (short x) +{ + return __sync_xor_and_fetch (&c, x) < 0; +} + +int +f28 (char x) +{ + return __sync_xor_and_fetch (&d, x) < 0; +} + +int +f29 (long x) +{ + return __sync_xor_and_fetch (&a, x) >= 0; +} + +int +f30 (int x) +{ + return __sync_xor_and_fetch (&b, x) >= 0; +} + +int +f31 (short x) +{ + return __sync_xor_and_fetch (&c, x) >= 0; +} + +int +f32 (char x) +{ + return __sync_xor_and_fetch (&d, x) >= 0; +} + +int +f33 (long x) +{ + return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) <= 0; +} + +int +f34 (int x) +{ + return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) <= 0; +} + +int +f35 (short x) +{ + return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) <= 0; +} + +int +f36 (char x) +{ + return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) <= 0; +} + +int +f37 (long x) +{ + return __atomic_xor_fetch (&a, x, __ATOMIC_RELEASE) > 0; +} + +int +f38 (int x) +{ + return __atomic_xor_fetch (&b, x, __ATOMIC_RELEASE) > 0; +} + +int +f39 (short x) +{ + return __atomic_xor_fetch (&c, x, __ATOMIC_RELEASE) > 0; +} + +int +f40 (char x) +{ + return __atomic_xor_fetch (&d, x, __ATOMIC_RELEASE) > 0; +} + +int +f41 (long x) +{ + return __sync_xor_and_fetch (&a, x) <= 0; +} + +int +f42 (int x) +{ + return __sync_xor_and_fetch (&b, x) <= 0; +} + +int +f43 (short x) +{ + return __sync_xor_and_fetch (&c, x) <= 0; +} + +int +f44 (char x) +{ + return __sync_xor_and_fetch (&d, x) <= 0; +} + +int +f45 (long x) +{ + return __sync_xor_and_fetch (&a, x) > 0; +} + +int +f46 (int x) +{ + return __sync_xor_and_fetch (&b, x) > 0; +} + +int +f47 (short x) +{ + return __sync_xor_and_fetch (&c, x) > 0; +} + +int +f48 (char x) +{ + return __sync_xor_and_fetch (&d, x) > 0; +} diff --git a/gcc/testsuite/gdc.test/compilable/99bottles.d b/gcc/testsuite/gdc.test/compilable/99bottles.d index 09360a8..5341a49 100644 --- a/gcc/testsuite/gdc.test/compilable/99bottles.d +++ b/gcc/testsuite/gdc.test/compilable/99bottles.d @@ -1,5 +1,5 @@ // written by Don Clugston: -// http://www.digitalmars.com/d/archives/digitalmars/D/announce/4374.html +// https://www.digitalmars.com/d/archives/digitalmars/D/announce/4374.html // http://www.99-bottles-of-beer.net/language-d-1212.html // Generates the "99 bottles of beer" song at compile time, diff --git a/gcc/testsuite/gdc.test/compilable/art4769.d b/gcc/testsuite/gdc.test/compilable/art4769.d index 34adcda..dfffe77 100644 --- a/gcc/testsuite/gdc.test/compilable/art4769.d +++ b/gcc/testsuite/gdc.test/compilable/art4769.d @@ -1,4 +1,4 @@ -// http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.bugs&article_id=4769 +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4769.html // COMPILED_IMPORTS: imports/art4769a.d imports/art4769b.d // PERMUTE_ARGS: diff --git a/gcc/testsuite/gdc.test/compilable/test69.d b/gcc/testsuite/gdc.test/compilable/test69.d index 66662dc..395a49f 100644 --- a/gcc/testsuite/gdc.test/compilable/test69.d +++ b/gcc/testsuite/gdc.test/compilable/test69.d @@ -1,7 +1,7 @@ // PERMUTE_ARGS: // ICE(expression.c) DMD 0.110 -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2966.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2966.html string str255() { return "\255"; } void fromFail49() diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11.d b/gcc/testsuite/gdc.test/fail_compilation/fail11.d index 8ba05df..9a5a815 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail11.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail11.d @@ -5,7 +5,7 @@ fail_compilation/fail11.d(12): Error: `int*` has no effect --- */ -// http://forum.dlang.org/thread/c738o9$1p7i$1@digitaldaemon.com +// https://forum.dlang.org/thread/c738o9$1p7i$1@digitaldaemon.com void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15.d b/gcc/testsuite/gdc.test/fail_compilation/fail15.d index 0386b9a..cd18485 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail15.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail15.d @@ -6,7 +6,7 @@ fail_compilation/fail15.d(24): Error: cannot use `[]` operator on expression of */ /* Segfault on DMD 0.095 -http://www.digitalmars.com/d/archives/digitalmars/D/bugs/926.html +https://www.digitalmars.com/d/archives/digitalmars/D/bugs/926.html */ module test; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail35.d b/gcc/testsuite/gdc.test/fail_compilation/fail35.d index c35dfe1..4f47a62 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail35.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail35.d @@ -5,7 +5,7 @@ fail_compilation/fail35.d(15): Error: variable `t` cannot be read at compile tim --- */ -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2372.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2372.html // allegedly crashes, but cannot reproduce void main() diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail73.d b/gcc/testsuite/gdc.test/fail_compilation/fail73.d index b9b480d..0242201 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail73.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail73.d @@ -6,7 +6,7 @@ fail_compilation/fail73.d(20): Error: `case` not in `switch` statement */ // segfault DMD 0.120 -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4634.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4634.html void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d b/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d index df169e19..22cf392 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d +++ b/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d @@ -15,14 +15,18 @@ fail_compilation/misc_parser_err_cov1.d(35): Error: `key:value` expected for ass fail_compilation/misc_parser_err_cov1.d(36): Error: basic type expected, not `;` fail_compilation/misc_parser_err_cov1.d(36): Error: `{ members }` expected for anonymous class fail_compilation/misc_parser_err_cov1.d(38): Error: template argument expected following `!` -fail_compilation/misc_parser_err_cov1.d(38): Error: found `if` when expecting `)` -fail_compilation/misc_parser_err_cov1.d(38): Error: found `)` instead of statement +fail_compilation/misc_parser_err_cov1.d(38): Error: missing closing `)` after `if (parseShift!()` +fail_compilation/misc_parser_err_cov1.d(38): Error: found `)` when expecting `(` +fail_compilation/misc_parser_err_cov1.d(39): Error: missing closing `)` after `if (` fail_compilation/misc_parser_err_cov1.d(39): Error: identifier expected following `(type)`. fail_compilation/misc_parser_err_cov1.d(39): Error: expression expected, not `;` fail_compilation/misc_parser_err_cov1.d(40): Error: semicolon expected following auto declaration, not `auto` fail_compilation/misc_parser_err_cov1.d(40): Error: identifier or `new` expected following `.`, not `+` -fail_compilation/misc_parser_err_cov1.d(41): Error: declaration expected, not `(` -fail_compilation/misc_parser_err_cov1.d(42): Error: unrecognized declaration +fail_compilation/misc_parser_err_cov1.d(41): Error: identifier or new keyword expected following `(...)`. +fail_compilation/misc_parser_err_cov1.d(41): Error: found `.` when expecting `;` following statement +fail_compilation/misc_parser_err_cov1.d(41): Error: expression expected, not `;` +fail_compilation/misc_parser_err_cov1.d(42): Error: found `}` when expecting `;` following statement +fail_compilation/misc_parser_err_cov1.d(43): Error: found `End of File` when expecting `}` following compound statement --- */ module misc_parser_err_cov1; diff --git a/gcc/testsuite/gdc.test/fail_compilation/parseStc.d b/gcc/testsuite/gdc.test/fail_compilation/parseStc.d index e0ce2c3..c9c4288 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/parseStc.d +++ b/gcc/testsuite/gdc.test/fail_compilation/parseStc.d @@ -1,9 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/parseStc.d(11): Error: found `;` when expecting `)` -fail_compilation/parseStc.d(11): Error: found `)` when expecting `;` following statement -fail_compilation/parseStc.d(12): Error: redundant attribute `const` +fail_compilation/parseStc.d(12): Error: missing closing `)` after `if (x` +fail_compilation/parseStc.d(12): Error: use `{ }` for an empty statement, not `;` +fail_compilation/parseStc.d(12): Error: found `)` when expecting `;` following statement +fail_compilation/parseStc.d(13): Error: redundant attribute `const` --- */ void test1() @@ -15,9 +16,9 @@ void test1() /* TEST_OUTPUT: --- -fail_compilation/parseStc.d(25): Error: redundant attribute `const` fail_compilation/parseStc.d(26): Error: redundant attribute `const` -fail_compilation/parseStc.d(27): Error: conflicting attribute `immutable` +fail_compilation/parseStc.d(27): Error: redundant attribute `const` +fail_compilation/parseStc.d(28): Error: conflicting attribute `immutable` --- */ void test2() @@ -30,8 +31,8 @@ void test2() /* TEST_OUTPUT: --- -fail_compilation/parseStc.d(37): Error: redundant attribute `const` fail_compilation/parseStc.d(38): Error: redundant attribute `const` +fail_compilation/parseStc.d(39): Error: redundant attribute `const` --- */ struct S3 { const const test3() {} } diff --git a/gcc/testsuite/gdc.test/runnable/mars1.d b/gcc/testsuite/gdc.test/runnable/mars1.d index 30aa950..c981334 100644 --- a/gcc/testsuite/gdc.test/runnable/mars1.d +++ b/gcc/testsuite/gdc.test/runnable/mars1.d @@ -1923,7 +1923,7 @@ void test20050() //////////////////////////////////////////////////////////////////////// -// http://github.com/dlang/dmd/pull/11238 +// https://github.com/dlang/dmd/pull/11238 int testCpStatic1(int y) { @@ -1960,7 +1960,7 @@ void test7() //////////////////////////////////////////////////////////////////////// -// http://github.com/dlang/dmd/pull/11388 +// https://github.com/dlang/dmd/pull/11388 ushort byteswap(ushort x) pure { diff --git a/gcc/testsuite/gdc.test/runnable/template1.d b/gcc/testsuite/gdc.test/runnable/template1.d index dde9213..ed237d8 100644 --- a/gcc/testsuite/gdc.test/runnable/template1.d +++ b/gcc/testsuite/gdc.test/runnable/template1.d @@ -1554,7 +1554,7 @@ void test64() } /******************************************/ -// http://www.digitalmars.com/d/archives/28052.html +// https://www.digitalmars.com/d/archives/28052.html alias int value_type; @@ -1923,7 +1923,7 @@ specialization:: first int /******************************************/ -// http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2117 +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2117.html class Conversion(T,U){ alias char Small; diff --git a/gcc/testsuite/gdc.test/runnable/template2.d b/gcc/testsuite/gdc.test/runnable/template2.d index fe08a6c0..234cb71 100644 --- a/gcc/testsuite/gdc.test/runnable/template2.d +++ b/gcc/testsuite/gdc.test/runnable/template2.d @@ -1,5 +1,5 @@ // original post to the D newsgroup: -// http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D&artnum=10554&header +// https://www.digitalmars.com/d/archives/10510.html#N10554 // Test to manipulate 3D vectors, in D! // by Sean L Palmer (seanpalmer@directvinternet.com) // This code is released without any warranty. Use at your own risk. diff --git a/gcc/testsuite/gdc.test/runnable/template9.d b/gcc/testsuite/gdc.test/runnable/template9.d index 63620dd..cb3de5b 100644 --- a/gcc/testsuite/gdc.test/runnable/template9.d +++ b/gcc/testsuite/gdc.test/runnable/template9.d @@ -4706,7 +4706,7 @@ void test14735() { char[64] buf; - // Supported from 2.063: (http://dlang.org/changelog#implicitarraycast) + // Supported from 2.063: (https://dlang.org/changelog/2.063.html#implicitarraycast) assert(indexOf14735a(buf[0..32], '\0') == 2); assert(indexOf14735b(buf[0..32], '\0') == 2); diff --git a/gcc/testsuite/gdc.test/runnable/test12.d b/gcc/testsuite/gdc.test/runnable/test12.d index dac4ed6..01c7486 100644 --- a/gcc/testsuite/gdc.test/runnable/test12.d +++ b/gcc/testsuite/gdc.test/runnable/test12.d @@ -832,7 +832,7 @@ void test38() /**************************************/ -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2409.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2409.html class C39 { diff --git a/gcc/testsuite/gdc.test/runnable/test15.d b/gcc/testsuite/gdc.test/runnable/test15.d index 222742c..70e3a82 100644 --- a/gcc/testsuite/gdc.test/runnable/test15.d +++ b/gcc/testsuite/gdc.test/runnable/test15.d @@ -515,7 +515,7 @@ void test30() /************************************/ -// http://www.digitalmars.com/d/archives/18204.html +// https://www.digitalmars.com/d/archives/18204.html // DMD0.050 also failed with alias. alias int recls_bool_t; diff --git a/gcc/testsuite/gdc.test/runnable/test20855.d b/gcc/testsuite/gdc.test/runnable/test20855.d index 7e43ec8..30152fe 100644 --- a/gcc/testsuite/gdc.test/runnable/test20855.d +++ b/gcc/testsuite/gdc.test/runnable/test20855.d @@ -1,3 +1,4 @@ +// PERMUTE_ARGS: -O // https://issues.dlang.org/show_bug.cgi?id=20855 string exp() diff --git a/gcc/testsuite/gdc.test/runnable/test22.d b/gcc/testsuite/gdc.test/runnable/test22.d index 1d806d6..38a9cc3 100644 --- a/gcc/testsuite/gdc.test/runnable/test22.d +++ b/gcc/testsuite/gdc.test/runnable/test22.d @@ -16,7 +16,7 @@ extern(C) /*************************************/ -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4766.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4766.html // Only with -O real randx() diff --git a/gcc/testsuite/gdc.test/runnable/testarray.d b/gcc/testsuite/gdc.test/runnable/testarray.d index 4784f47..02bf771 100644 --- a/gcc/testsuite/gdc.test/runnable/testarray.d +++ b/gcc/testsuite/gdc.test/runnable/testarray.d @@ -3,7 +3,7 @@ import core.memory; -// see http://forum.dlang.org/thread/4BB6296E.6050506@digitalmars.com for more info +// see https://forum.dlang.org/thread/4BB6296E.6050506@digitalmars.com for more info // failure case for bug fixed by druntime rev 282 // how it works: diff --git a/gcc/testsuite/gdc.test/runnable/testcontracts.d b/gcc/testsuite/gdc.test/runnable/testcontracts.d index 7869691..ba0dc69 100644 --- a/gcc/testsuite/gdc.test/runnable/testcontracts.d +++ b/gcc/testsuite/gdc.test/runnable/testcontracts.d @@ -239,7 +239,7 @@ void test6() /*******************************************/ /+ -// http://d.puremagic.com/issues/show_bug.cgi?id=3722 +// https://issues.dlang.org/show_bug.cgi?id=3722 class Bug3722A { diff --git a/gcc/testsuite/gdc.test/runnable/testsafe.d b/gcc/testsuite/gdc.test/runnable/testsafe.d index 40496f5..11813a0 100644 --- a/gcc/testsuite/gdc.test/runnable/testsafe.d +++ b/gcc/testsuite/gdc.test/runnable/testsafe.d @@ -1,6 +1,6 @@ // PERMUTE_ARGS: -//http://d.puremagic.com/issues/show_bug.cgi?id=5415 +//https://issues.dlang.org/show_bug.cgi?id=5415 @safe void pointercast() @@ -31,7 +31,7 @@ void pointercast2() @safe void pointerarithmetic() -{//http://d.puremagic.com/issues/show_bug.cgi?id=4132 +{//https://issues.dlang.org/show_bug.cgi?id=4132 void* a; int b; @@ -273,7 +273,7 @@ void use__gshared() @safe void voidinitializers() -{//http://d.puremagic.com/issues/show_bug.cgi?id=4885 +{//https://issues.dlang.org/show_bug.cgi?id=4885 static assert(!__traits(compiles, () @safe { uint* ptr = void; } )); static assert( __traits(compiles, () @safe { uint i = void; } )); static assert( __traits(compiles, () @safe { uint[2] a = void; } )); @@ -290,14 +290,14 @@ void voidinitializers() @safe void pointerindex() -{//http://d.puremagic.com/issues/show_bug.cgi?id=9195 +{//https://issues.dlang.org/show_bug.cgi?id=9195 static assert(!__traits(compiles, () @safe { int* p; auto a = p[30]; })); static assert( __traits(compiles, () @safe{ int* p; auto a = p[0]; })); } @safe void basiccast() -{//http://d.puremagic.com/issues/show_bug.cgi?id=5088 +{//https://issues.dlang.org/show_bug.cgi?id=5088 auto a = cast(int)cast(const int)1; auto b = cast(real)cast(const int)1; auto c = cast(real)cast(const real)2.0; diff --git a/gcc/testsuite/gdc.test/runnable/traits_child.d b/gcc/testsuite/gdc.test/runnable/traits_child.d index 056b8f1..bea8511 100644 --- a/gcc/testsuite/gdc.test/runnable/traits_child.d +++ b/gcc/testsuite/gdc.test/runnable/traits_child.d @@ -64,7 +64,7 @@ alias cm = C.m; alias cmset = C.m.set; -// adapted from http://thecybershadow.net/d/dconf2017/#/21 +// adapted from https://thecybershadow.net/d/dconf2017/#/21 struct S { string a, b, c; } static string printField(alias field)() diff --git a/gcc/testsuite/gdc.test/runnable/xtest46.d b/gcc/testsuite/gdc.test/runnable/xtest46.d index 4fe6b00..a66e00f 100644 --- a/gcc/testsuite/gdc.test/runnable/xtest46.d +++ b/gcc/testsuite/gdc.test/runnable/xtest46.d @@ -5063,7 +5063,7 @@ class Bar6847 : Foo6847 } /***************************************************/ -// http://d.puremagic.com/issues/show_bug.cgi?id=6488 +// https://issues.dlang.org/show_bug.cgi?id=6488 struct TickDuration { @@ -6727,14 +6727,14 @@ void test9477() static bool isEq (T1, T2)(T1 s1, T2 s2) { return s1 == s2; } static bool isNeq(T1, T2)(T1 s1, T2 s2) { return s1 != s2; } - // Must be outside the loop due to http://d.puremagic.com/issues/show_bug.cgi?id=9748 + // Must be outside the loop due to https://issues.dlang.org/show_bug.cgi?id=9748 int order; - // Must be outside the loop due to http://d.puremagic.com/issues/show_bug.cgi?id=9756 + // Must be outside the loop due to https://issues.dlang.org/show_bug.cgi?id=9756 auto checkOrder(bool dyn, uint expected)() { assert(order==expected); order++; - // Use temporary ("v") to work around http://d.puremagic.com/issues/show_bug.cgi?id=9402 + // Use temporary ("v") to work around https://issues.dlang.org/show_bug.cgi?id=9402 auto v = cast(Select9477!(dyn, string, char[1]))"a"; return v; } @@ -6742,7 +6742,7 @@ void test9477() foreach (b1; Tuple9477!(false, true)) foreach (b2; Tuple9477!(false, true)) { - version (D_PIC) {} else version (D_PIE) {} else // Work around http://d.puremagic.com/issues/show_bug.cgi?id=9754 + version (D_PIC) {} else version (D_PIE) {} else // Work around https://issues.dlang.org/show_bug.cgi?id=9754 { assert( isEq (cast(Select9477!(b1, string, char[0]))"" , cast(Select9477!(b2, string, char[0]))"" )); assert(!isNeq(cast(Select9477!(b1, string, char[0]))"" , cast(Select9477!(b2, string, char[0]))"" )); diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-1.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-1.f90 new file mode 100644 index 0000000..52d8835 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-1.f90 @@ -0,0 +1,23 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! This program used to ICE in gimplification on the call to S, because it +! was trying to copy out the array after the call to something that wasn't +! an lvalue. + +program p + integer, pointer :: z(:) + integer, target :: x(3) = [1, 2, 3] + z => x + call s(shape(z)) +contains + subroutine s(x) bind(c) + integer, contiguous :: x(:) + end +end + +! It should not emit any copy loops, just the loop for inlining SHAPE. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } } + +! It should not emit code to check the contiguous property. +! { dg-final { scan-tree-dump-not "contiguous\\.\[0-9\]+" "original" } } diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-2.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-2.f90 new file mode 100644 index 0000000..771d81d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-2.f90 @@ -0,0 +1,20 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! Check that copy loops to ensure contiguity of transpose result are +! still generated after fixing pr103390, and that it does not ICE. + +program p + integer, pointer :: z(:,:) + integer, target :: x(3,3) = reshape ([1, 2, 3, 4, 5, 6, 7, 8, 9], shape(x)) + z => x + call s(transpose(z)) +contains + subroutine s(x) bind(c) + integer, contiguous :: x(:,:) + end +end + +! Expect 2 nested copy loops both before and after the call to S. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 4 "original" } } + diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-3.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-3.f90 new file mode 100644 index 0000000..bd35011 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-3.f90 @@ -0,0 +1,29 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! Check that copy loops to ensure contiguity of the result of a function +! that returns a non-pointer array are generated properly after fixing +! pr103390, and that it does not ICE. In this case no copying is required. + +program p + integer, pointer :: z(:) + integer, target :: x(3) = [1, 2, 3] + z => x + call s(i(z)) +contains + function i(x) + integer :: i(3) + integer, pointer :: x(:) + i = x + end + subroutine s(x) bind(c) + integer, contiguous :: x(:) + end +end + +! Expect one loop to copy the array contents to a temporary in function i. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } } + +! It should not emit code to check the contiguous property. +! { dg-final { scan-tree-dump-not "contiguous\\.\[0-9\]+" "original" } } + diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-4.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-4.f90 new file mode 100644 index 0000000..b8b64ed --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-4.f90 @@ -0,0 +1,25 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! Check that copy loops to ensure contiguity of the result of a function +! that returns a pointer to an array are generated properly after fixing +! pr103390, and that it does not ICE. + +program p + integer, pointer :: z(:) + integer, target :: x(3) = [1, 2, 3] + z => x + call s(i(z)) +contains + function i(x) + integer, pointer :: i(:) + integer, pointer :: x(:) + i => x + end + subroutine s(x) bind(c) + integer, contiguous :: x(:) + end +end + +! Expect a copy loop both before and after the call to S. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 2 "original" } } diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-5.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-5.f90 new file mode 100644 index 0000000..c87b979 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-5.f90 @@ -0,0 +1,26 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! Check that copy loops to ensure contiguity of the result of a function +! that returns a pointer to an array are generated properly after fixing +! pr103390, and that it does not ICE. This variant is for an intent(in) +! dummy argument so no copy-out is needed, only copy-in. + +program p + integer, pointer :: z(:) + integer, target :: x(3) = [1, 2, 3] + z => x + call s(i(z)) +contains + function i(x) + integer, pointer :: i(:) + integer, pointer :: x(:) + i => x + end + subroutine s(x) bind(c) + integer, contiguous, intent(in) :: x(:) + end +end + +! Expect a copy loop before the call to S. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } } diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-6.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-6.f90 new file mode 100644 index 0000000..394525b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-6.f90 @@ -0,0 +1,22 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! Check that copy loops to ensure contiguity of transpose result are +! generated properly after fixing pr103390, and that it does not ICE. +! This variant is for an intent(in) dummy argument so no copy-out +! is needed, only copy-in. + +program p + integer, pointer :: z(:,:) + integer, target :: x(3,3) = reshape ([1, 2, 3, 4, 5, 6, 7, 8, 9], shape(x)) + z => x + call s(transpose(z)) +contains + subroutine s(x) bind(c) + integer, contiguous, intent(in) :: x(:,:) + end +end + +! Expect 2 nested copy loops before the call to S. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 2 "original" } } + diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-7.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-7.f90 new file mode 100644 index 0000000..d86dc79 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-7.f90 @@ -0,0 +1,19 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! Check that copy loops to ensure contiguity of the result of an array +! section expression are generated properly after fixing pr103390, and +! that it does not ICE. + +program p + integer, pointer :: z(:) + integer :: A(5) = [1, 2, 3, 4, 5] + call s(A(::2)) +contains + subroutine s(x) bind(c) + integer, contiguous :: x(:) + end +end + +! Expect copy loops before and after the call to S. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 2 "original" } } diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-8.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-8.f90 new file mode 100644 index 0000000..3a3b3a8 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-8.f90 @@ -0,0 +1,20 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! Check that copy loops to ensure contiguity of the result of an array +! section expression are generated properly after fixing pr103390, +! and that it does not ICE. This case is for an intent(in) +! dummy so no copy-out should occur, only copy-in. + +program p + integer, pointer :: z(:) + integer, parameter :: A(5) = [1, 2, 3, 4, 5] + call s(A(::2)) +contains + subroutine s(x) bind(c) + integer, contiguous, intent(in) :: x(:) + end +end + +! Expect a copy loop before the call to S. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } } diff --git a/gcc/testsuite/gfortran.dg/c-interop/pr103390-9.f90 b/gcc/testsuite/gfortran.dg/c-interop/pr103390-9.f90 new file mode 100644 index 0000000..0d655b5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/c-interop/pr103390-9.f90 @@ -0,0 +1,26 @@ +! { dg-do run } +! { dg-options "-fdump-tree-original" } +! +! Check that copy loops to ensure contiguity of the result of an elemental +! array-valued expression are generated properly after fixing pr103390, +! and that it does not ICE. + +program p + integer, pointer :: z(:) + integer :: a(3) = [1, 2, 3]; + integer :: b(3) = [4, 5, 6]; + call s(a + b); +contains + subroutine s(x) bind(c) + integer, contiguous :: x(:) + end +end + +! We only expect one loop before the call, to fill in the contiguous +! temporary. No copy-out is needed since the temporary is effectively +! an rvalue. +! { dg-final { scan-tree-dump-times "while \\(1\\)" 1 "original" } } + +! It should not emit code to check the contiguous property. +! { dg-final { scan-tree-dump-not "contiguous\\.\[0-9\]+" "original" } } + diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index c436e59..bb37793 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -7947,18 +7947,14 @@ move_sese_region_to_fn (struct function *dest_cfun, basic_block entry_bb, if (eh_map) delete eh_map; - if (gimple_in_ssa_p (cfun)) - { - /* We need to release ssa-names in a defined order, so first find them, - and then iterate in ascending version order. */ - bitmap release_names = BITMAP_ALLOC (NULL); - vars_map.traverse<void *, gather_ssa_name_hash_map_from> (release_names); - bitmap_iterator bi; - unsigned i; - EXECUTE_IF_SET_IN_BITMAP (release_names, 0, i, bi) - release_ssa_name (ssa_name (i)); - BITMAP_FREE (release_names); - } + /* We need to release ssa-names in a defined order, so first find them, + and then iterate in ascending version order. */ + bitmap release_names = BITMAP_ALLOC (NULL); + vars_map.traverse<void *, gather_ssa_name_hash_map_from> (release_names); + bitmap_iterator bi; + EXECUTE_IF_SET_IN_BITMAP (release_names, 0, i, bi) + release_ssa_name (ssa_name (i)); + BITMAP_FREE (release_names); /* Rewire the entry and exit blocks. The successor to the entry block turns into the successor of DEST_FN's ENTRY_BLOCK_PTR in diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c index bd3f2bcf..93fa536 100644 --- a/gcc/tree-ssa-ccp.c +++ b/gcc/tree-ssa-ccp.c @@ -151,6 +151,7 @@ along with GCC; see the file COPYING3. If not see #include "symbol-summary.h" #include "ipa-utils.h" #include "ipa-prop.h" +#include "internal-fn.h" /* Possible lattice values. */ typedef enum @@ -3333,7 +3334,7 @@ extern bool gimple_nop_convert (tree, tree*, tree (*) (tree)); _4 = __atomic_fetch_or_* (ptr_6, mask_2, _3); _5 = _4 & mask_2; to - _4 = ATOMIC_BIT_TEST_AND_SET (ptr_6, cnt_1, 0, _3); + _4 = .ATOMIC_BIT_TEST_AND_SET (ptr_6, cnt_1, 0, _3); _5 = _4; If _5 is only used in _5 != 0 or _5 == 0 comparisons, 1 is passed instead of 0, and the builtin just returns a zero @@ -3345,7 +3346,7 @@ extern bool gimple_nop_convert (tree, tree*, tree (*) (tree)); the second argument to the builtin needs to be one's complement of the mask instead of mask. */ -static void +static bool optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, enum internal_fn fn, bool has_model_arg, bool after) @@ -3365,7 +3366,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, || !single_imm_use (lhs, &use_p, &use_stmt) || !is_gimple_assign (use_stmt) || !gimple_vdef (call)) - return; + return false; switch (fn) { @@ -3379,7 +3380,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, optab = atomic_bit_test_and_reset_optab; break; default: - return; + return false; } tree bit = nullptr; @@ -3389,20 +3390,20 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, if (rhs_code != BIT_AND_EXPR) { if (rhs_code != NOP_EXPR && rhs_code != BIT_NOT_EXPR) - return; + return false; tree use_lhs = gimple_assign_lhs (use_stmt); if (TREE_CODE (use_lhs) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs)) - return; + return false; tree use_rhs = gimple_assign_rhs1 (use_stmt); if (lhs != use_rhs) - return; + return false; if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs))) == CODE_FOR_nothing) - return; + return false; gimple *g; gimple_stmt_iterator gsi; @@ -3413,7 +3414,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, { g = convert_atomic_bit_not (fn, use_stmt, lhs, mask); if (!g) - return; + return false; use_stmt = g; ibit = 0; } @@ -3426,7 +3427,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, if (!operand_equal_p (build_int_cst (TREE_TYPE (lhs), ~HOST_WIDE_INT_1), mask, 0)) - return; + return false; /* Convert _1 = __atomic_fetch_and_* (ptr_6, ~1, _3); @@ -3442,7 +3443,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, { and_mask = build_int_cst (TREE_TYPE (lhs), 1); if (!operand_equal_p (and_mask, mask, 0)) - return; + return false; /* Convert _1 = __atomic_fetch_or_* (ptr_6, 1, _3); @@ -3468,20 +3469,20 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, gimple *use_nop_stmt; if (!single_imm_use (use_lhs, &use_p, &use_nop_stmt) || !is_gimple_assign (use_nop_stmt)) - return; + return false; tree use_nop_lhs = gimple_assign_lhs (use_nop_stmt); rhs_code = gimple_assign_rhs_code (use_nop_stmt); if (rhs_code != BIT_AND_EXPR) { if (TREE_CODE (use_nop_lhs) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_nop_lhs)) - return; + return false; if (rhs_code == BIT_NOT_EXPR) { g = convert_atomic_bit_not (fn, use_nop_stmt, lhs, mask); if (!g) - return; + return false; /* Convert _1 = __atomic_fetch_or_4 (ptr_6, 1, _3); _2 = (int) _1; @@ -3509,15 +3510,15 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, else { if (TREE_CODE (TREE_TYPE (use_nop_lhs)) != BOOLEAN_TYPE) - return; + return false; if (rhs_code != GE_EXPR && rhs_code != LT_EXPR) - return; + return false; tree cmp_rhs1 = gimple_assign_rhs1 (use_nop_stmt); if (use_lhs != cmp_rhs1) - return; + return false; tree cmp_rhs2 = gimple_assign_rhs2 (use_nop_stmt); if (!integer_zerop (cmp_rhs2)) - return; + return false; tree and_mask; @@ -3533,7 +3534,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, and_mask = build_int_cst (TREE_TYPE (use_rhs), highest - 1); if (!operand_equal_p (and_mask, mask, 0)) - return; + return false; /* Convert _1 = __atomic_fetch_and_4 (ptr_6, 0x7fffffff, _3); @@ -3553,7 +3554,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, and_mask = build_int_cst (TREE_TYPE (use_rhs), highest); if (!operand_equal_p (and_mask, mask, 0)) - return; + return false; /* Convert _1 = __atomic_fetch_or_4 (ptr_6, 0x80000000, _3); @@ -3592,7 +3593,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (match_op[2]) || !single_imm_use (match_op[2], &use_p, &g) || !is_gimple_assign (g)) - return; + return false; mask = match_op[0]; if (TREE_CODE (match_op[1]) == INTEGER_CST) { @@ -3650,7 +3651,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, } } else - return; + return false; if (!bit) { @@ -3661,11 +3662,11 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, } else if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs))) == CODE_FOR_nothing) - return; + return false; tree use_lhs = gimple_assign_lhs (use_stmt); if (!use_lhs) - return; + return false; if (!bit) { @@ -3676,7 +3677,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, mask = fold_convert (TREE_TYPE (lhs), mask); int ibit = tree_log2 (mask); if (ibit < 0) - return; + return false; bit = build_int_cst (TREE_TYPE (lhs), ibit); } else if (TREE_CODE (mask) == SSA_NAME) @@ -3687,30 +3688,30 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, { mask = match_op; if (TREE_CODE (mask) != SSA_NAME) - return; + return false; g = SSA_NAME_DEF_STMT (mask); } if (!is_gimple_assign (g)) - return; + return false; if (fn == IFN_ATOMIC_BIT_TEST_AND_RESET) { if (gimple_assign_rhs_code (g) != BIT_NOT_EXPR) - return; + return false; mask = gimple_assign_rhs1 (g); if (TREE_CODE (mask) != SSA_NAME) - return; + return false; g = SSA_NAME_DEF_STMT (mask); } if (!is_gimple_assign (g) || gimple_assign_rhs_code (g) != LSHIFT_EXPR || !integer_onep (gimple_assign_rhs1 (g))) - return; + return false; bit = gimple_assign_rhs2 (g); } else - return; + return false; tree cmp_mask; if (gimple_assign_rhs1 (use_stmt) == lhs) @@ -3723,7 +3724,7 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, cmp_mask = match_op; if (!operand_equal_p (cmp_mask, mask, 0)) - return; + return false; } bool use_bool = true; @@ -3748,6 +3749,8 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, case COND_EXPR: op1 = gimple_assign_rhs1 (g); code = TREE_CODE (op1); + if (TREE_CODE_CLASS (code) != tcc_comparison) + break; op0 = TREE_OPERAND (op1, 0); op1 = TREE_OPERAND (op1, 1); break; @@ -3864,6 +3867,196 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip, release_defs (use_stmt); gsi_remove (gsip, true); release_ssa_name (lhs); + return true; +} + +/* Optimize + _4 = __atomic_add_fetch_* (ptr_6, arg_2, _3); + _5 = _4 == 0; + to + _4 = .ATOMIC_ADD_FETCH_CMP_0 (EQ_EXPR, ptr_6, arg_2, _3); + _5 = _4; + Similarly for __sync_add_and_fetch_* (without the ", _3" part + in there). */ + +static bool +optimize_atomic_op_fetch_cmp_0 (gimple_stmt_iterator *gsip, + enum internal_fn fn, bool has_model_arg) +{ + gimple *call = gsi_stmt (*gsip); + tree lhs = gimple_call_lhs (call); + use_operand_p use_p; + gimple *use_stmt; + + if (!flag_inline_atomics + || optimize_debug + || !gimple_call_builtin_p (call, BUILT_IN_NORMAL) + || !lhs + || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs) + || !single_imm_use (lhs, &use_p, &use_stmt) + || !gimple_vdef (call)) + return false; + + optab optab; + switch (fn) + { + case IFN_ATOMIC_ADD_FETCH_CMP_0: + optab = atomic_add_fetch_cmp_0_optab; + break; + case IFN_ATOMIC_SUB_FETCH_CMP_0: + optab = atomic_sub_fetch_cmp_0_optab; + break; + case IFN_ATOMIC_AND_FETCH_CMP_0: + optab = atomic_and_fetch_cmp_0_optab; + break; + case IFN_ATOMIC_OR_FETCH_CMP_0: + optab = atomic_or_fetch_cmp_0_optab; + break; + case IFN_ATOMIC_XOR_FETCH_CMP_0: + optab = atomic_xor_fetch_cmp_0_optab; + break; + default: + return false; + } + + if (optab_handler (optab, TYPE_MODE (TREE_TYPE (lhs))) + == CODE_FOR_nothing) + return false; + + tree use_lhs = lhs; + if (gimple_assign_cast_p (use_stmt)) + { + use_lhs = gimple_assign_lhs (use_stmt); + if (!tree_nop_conversion_p (TREE_TYPE (use_lhs), TREE_TYPE (lhs)) + || (!INTEGRAL_TYPE_P (TREE_TYPE (use_lhs)) + && !POINTER_TYPE_P (TREE_TYPE (use_lhs))) + || SSA_NAME_OCCURS_IN_ABNORMAL_PHI (use_lhs) + || !single_imm_use (use_lhs, &use_p, &use_stmt)) + return false; + } + enum tree_code code = ERROR_MARK; + tree op0 = NULL_TREE, op1 = NULL_TREE; + if (is_gimple_assign (use_stmt)) + switch (gimple_assign_rhs_code (use_stmt)) + { + case COND_EXPR: + op1 = gimple_assign_rhs1 (use_stmt); + code = TREE_CODE (op1); + if (TREE_CODE_CLASS (code) == tcc_comparison) + { + op0 = TREE_OPERAND (op1, 0); + op1 = TREE_OPERAND (op1, 1); + } + break; + default: + code = gimple_assign_rhs_code (use_stmt); + if (TREE_CODE_CLASS (code) == tcc_comparison) + { + op0 = gimple_assign_rhs1 (use_stmt); + op1 = gimple_assign_rhs2 (use_stmt); + } + break; + } + else if (gimple_code (use_stmt) == GIMPLE_COND) + { + code = gimple_cond_code (use_stmt); + op0 = gimple_cond_lhs (use_stmt); + op1 = gimple_cond_rhs (use_stmt); + } + + switch (code) + { + case LT_EXPR: + case LE_EXPR: + case GT_EXPR: + case GE_EXPR: + if (!INTEGRAL_TYPE_P (TREE_TYPE (use_lhs)) + || TREE_CODE (TREE_TYPE (use_lhs)) == BOOLEAN_TYPE + || TYPE_UNSIGNED (TREE_TYPE (use_lhs))) + return false; + /* FALLTHRU */ + case EQ_EXPR: + case NE_EXPR: + if (op0 == use_lhs && integer_zerop (op1)) + break; + return false; + default: + return false; + } + + int encoded; + switch (code) + { + /* Use special encoding of the operation. We want to also + encode the mode in the first argument and for neither EQ_EXPR + etc. nor EQ etc. we can rely it will fit into QImode. */ + case EQ_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_EQ; break; + case NE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_NE; break; + case LT_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_LT; break; + case LE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_LE; break; + case GT_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_GT; break; + case GE_EXPR: encoded = ATOMIC_OP_FETCH_CMP_0_GE; break; + default: gcc_unreachable (); + } + + tree new_lhs = make_ssa_name (boolean_type_node); + gimple *g; + tree flag = build_int_cst (TREE_TYPE (lhs), encoded); + if (has_model_arg) + g = gimple_build_call_internal (fn, 4, flag, + gimple_call_arg (call, 0), + gimple_call_arg (call, 1), + gimple_call_arg (call, 2)); + else + g = gimple_build_call_internal (fn, 3, flag, + gimple_call_arg (call, 0), + gimple_call_arg (call, 1)); + gimple_call_set_lhs (g, new_lhs); + gimple_set_location (g, gimple_location (call)); + gimple_move_vops (g, call); + bool throws = stmt_can_throw_internal (cfun, call); + gimple_call_set_nothrow (as_a <gcall *> (g), + gimple_call_nothrow_p (as_a <gcall *> (call))); + gimple_stmt_iterator gsi = *gsip; + gsi_insert_after (&gsi, g, GSI_SAME_STMT); + if (throws) + maybe_clean_or_replace_eh_stmt (call, g); + if (is_gimple_assign (use_stmt)) + switch (gimple_assign_rhs_code (use_stmt)) + { + case COND_EXPR: + gimple_assign_set_rhs1 (use_stmt, new_lhs); + break; + default: + gsi = gsi_for_stmt (use_stmt); + if (tree ulhs = gimple_assign_lhs (use_stmt)) + if (useless_type_conversion_p (TREE_TYPE (ulhs), + boolean_type_node)) + { + gimple_assign_set_rhs_with_ops (&gsi, SSA_NAME, new_lhs); + break; + } + gimple_assign_set_rhs_with_ops (&gsi, NOP_EXPR, new_lhs); + break; + } + else if (gimple_code (use_stmt) == GIMPLE_COND) + { + gcond *use_cond = as_a <gcond *> (use_stmt); + gimple_cond_set_code (use_cond, NE_EXPR); + gimple_cond_set_lhs (use_cond, new_lhs); + gimple_cond_set_rhs (use_cond, boolean_false_node); + } + + update_stmt (use_stmt); + if (use_lhs != lhs) + { + gsi = gsi_for_stmt (SSA_NAME_DEF_STMT (use_lhs)); + gsi_remove (&gsi, true); + release_ssa_name (use_lhs); + } + gsi_remove (gsip, true); + release_ssa_name (lhs); + return true; } /* Optimize @@ -4092,6 +4285,44 @@ pass_fold_builtins::execute (function *fun) cfg_changed = true; break; + case BUILT_IN_ATOMIC_ADD_FETCH_1: + case BUILT_IN_ATOMIC_ADD_FETCH_2: + case BUILT_IN_ATOMIC_ADD_FETCH_4: + case BUILT_IN_ATOMIC_ADD_FETCH_8: + case BUILT_IN_ATOMIC_ADD_FETCH_16: + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_ADD_FETCH_CMP_0, + true); + break; + case BUILT_IN_SYNC_ADD_AND_FETCH_1: + case BUILT_IN_SYNC_ADD_AND_FETCH_2: + case BUILT_IN_SYNC_ADD_AND_FETCH_4: + case BUILT_IN_SYNC_ADD_AND_FETCH_8: + case BUILT_IN_SYNC_ADD_AND_FETCH_16: + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_ADD_FETCH_CMP_0, + false); + break; + + case BUILT_IN_ATOMIC_SUB_FETCH_1: + case BUILT_IN_ATOMIC_SUB_FETCH_2: + case BUILT_IN_ATOMIC_SUB_FETCH_4: + case BUILT_IN_ATOMIC_SUB_FETCH_8: + case BUILT_IN_ATOMIC_SUB_FETCH_16: + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_SUB_FETCH_CMP_0, + true); + break; + case BUILT_IN_SYNC_SUB_AND_FETCH_1: + case BUILT_IN_SYNC_SUB_AND_FETCH_2: + case BUILT_IN_SYNC_SUB_AND_FETCH_4: + case BUILT_IN_SYNC_SUB_AND_FETCH_8: + case BUILT_IN_SYNC_SUB_AND_FETCH_16: + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_SUB_FETCH_CMP_0, + false); + break; + case BUILT_IN_ATOMIC_FETCH_OR_1: case BUILT_IN_ATOMIC_FETCH_OR_2: case BUILT_IN_ATOMIC_FETCH_OR_4: @@ -4133,16 +4364,24 @@ pass_fold_builtins::execute (function *fun) case BUILT_IN_ATOMIC_XOR_FETCH_4: case BUILT_IN_ATOMIC_XOR_FETCH_8: case BUILT_IN_ATOMIC_XOR_FETCH_16: - optimize_atomic_bit_test_and - (&i, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, true, true); + if (optimize_atomic_bit_test_and + (&i, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, true, true)) + break; + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_XOR_FETCH_CMP_0, + true); break; case BUILT_IN_SYNC_XOR_AND_FETCH_1: case BUILT_IN_SYNC_XOR_AND_FETCH_2: case BUILT_IN_SYNC_XOR_AND_FETCH_4: case BUILT_IN_SYNC_XOR_AND_FETCH_8: case BUILT_IN_SYNC_XOR_AND_FETCH_16: - optimize_atomic_bit_test_and - (&i, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, false, true); + if (optimize_atomic_bit_test_and + (&i, IFN_ATOMIC_BIT_TEST_AND_COMPLEMENT, false, true)) + break; + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_XOR_FETCH_CMP_0, + false); break; case BUILT_IN_ATOMIC_FETCH_AND_1: @@ -4164,6 +4403,44 @@ pass_fold_builtins::execute (function *fun) false, false); break; + case BUILT_IN_ATOMIC_AND_FETCH_1: + case BUILT_IN_ATOMIC_AND_FETCH_2: + case BUILT_IN_ATOMIC_AND_FETCH_4: + case BUILT_IN_ATOMIC_AND_FETCH_8: + case BUILT_IN_ATOMIC_AND_FETCH_16: + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_AND_FETCH_CMP_0, + true); + break; + case BUILT_IN_SYNC_AND_AND_FETCH_1: + case BUILT_IN_SYNC_AND_AND_FETCH_2: + case BUILT_IN_SYNC_AND_AND_FETCH_4: + case BUILT_IN_SYNC_AND_AND_FETCH_8: + case BUILT_IN_SYNC_AND_AND_FETCH_16: + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_AND_FETCH_CMP_0, + false); + break; + + case BUILT_IN_ATOMIC_OR_FETCH_1: + case BUILT_IN_ATOMIC_OR_FETCH_2: + case BUILT_IN_ATOMIC_OR_FETCH_4: + case BUILT_IN_ATOMIC_OR_FETCH_8: + case BUILT_IN_ATOMIC_OR_FETCH_16: + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_OR_FETCH_CMP_0, + true); + break; + case BUILT_IN_SYNC_OR_AND_FETCH_1: + case BUILT_IN_SYNC_OR_AND_FETCH_2: + case BUILT_IN_SYNC_OR_AND_FETCH_4: + case BUILT_IN_SYNC_OR_AND_FETCH_8: + case BUILT_IN_SYNC_OR_AND_FETCH_16: + optimize_atomic_op_fetch_cmp_0 (&i, + IFN_ATOMIC_OR_FETCH_CMP_0, + false); + break; + case BUILT_IN_MEMCPY: if (gimple_call_builtin_p (stmt, BUILT_IN_NORMAL) && TREE_CODE (gimple_call_arg (stmt, 0)) == ADDR_EXPR diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE index 70f7ff5..3aa798a 100644 --- a/libphobos/libdruntime/MERGE +++ b/libphobos/libdruntime/MERGE @@ -1,4 +1,4 @@ -fd9a45448244fb9dd4326520ad8526c540895eb0 +759e60231a12482a1e1df5f891964e270dae0a1b The first line of this file holds the git revision number of the last merge done from the dlang/druntime repository. diff --git a/libphobos/src/MERGE b/libphobos/src/MERGE index b517749..b60fa17 100644 --- a/libphobos/src/MERGE +++ b/libphobos/src/MERGE @@ -1,4 +1,4 @@ -495e835c2da47606142ff24c85de707e3b955a9a +4687883231eba3bda7691321f2af107fdb3d0a44 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/algorithm/mutation.d b/libphobos/src/std/algorithm/mutation.d index 22b7b98..b0e7707 100644 --- a/libphobos/src/std/algorithm/mutation.d +++ b/libphobos/src/std/algorithm/mutation.d @@ -866,6 +866,9 @@ if (isInputRange!InputRange Initializes all elements of `range` with their `.init` value. Assumes that the elements of the range are uninitialized. +This function is unavailable if `T` is a `struct` and `T.this()` is annotated +with `@disable`. + Params: range = An $(REF_ALTTEXT input range, isInputRange, std,range,primitives) @@ -874,10 +877,11 @@ Params: See_Also: $(LREF fill) - $(LREF uninitializeFill) + $(LREF uninitializedFill) */ void initializeAll(Range)(Range range) -if (isInputRange!Range && hasLvalueElements!Range && hasAssignableElements!Range) +if (isInputRange!Range && hasLvalueElements!Range && hasAssignableElements!Range + && __traits(compiles, { static ElementType!Range _; })) { import core.stdc.string : memset, memcpy; import std.traits : hasElaborateAssign, isDynamicArray; @@ -1037,6 +1041,18 @@ if (is(Range == char[]) || is(Range == wchar[])) assert(xs[1].x == 3); } +// https://issues.dlang.org/show_bug.cgi?id=22105 +@system unittest +{ + struct NoDefaultCtor + { + @disable this(); + } + + NoDefaultCtor[1] array = void; + static assert(!__traits(compiles, array[].initializeAll)); +} + // move /** Moves `source` into `target`, via a destructive copy when necessary. diff --git a/libphobos/src/std/container/array.d b/libphobos/src/std/container/array.d index 63dc864..08f9ead 100644 --- a/libphobos/src/std/container/array.d +++ b/libphobos/src/std/container/array.d @@ -428,8 +428,6 @@ if (!is(immutable T == immutable bool)) @property void length(size_t newLength) { - import std.algorithm.mutation : initializeAll; - if (length >= newLength) { // shorten @@ -440,10 +438,22 @@ if (!is(immutable T == immutable bool)) _payload = _payload.ptr[0 .. newLength]; return; } - immutable startEmplace = length; - reserve(newLength); - initializeAll(_payload.ptr[startEmplace .. newLength]); - _payload = _payload.ptr[0 .. newLength]; + + static if (__traits(compiles, { static T _; })) + { + import std.algorithm.mutation : initializeAll; + + immutable startEmplace = length; + reserve(newLength); + initializeAll(_payload.ptr[startEmplace .. newLength]); + _payload = _payload.ptr[0 .. newLength]; + } + else + { + assert(0, "Cannot add elements to array because `" ~ + fullyQualifiedName!T ~ ".this()` is annotated with " ~ + "`@disable`."); + } } @property size_t capacity() const @@ -901,12 +911,16 @@ if (!is(immutable T == immutable bool)) /** * Sets the number of elements in the array to `newLength`. If `newLength` * is greater than `length`, the new elements are added to the end of the - * array and initialized with `T.init`. + * array and initialized with `T.init`. If `T` is a `struct` whose default + * constructor is annotated with `@disable`, `newLength` must be lower than + * or equal to `length`. * * Complexity: * Guaranteed $(BIGOH abs(length - newLength)) if `capacity >= newLength`. * If `capacity < newLength` the worst case is $(BIGOH newLength). * + * Precondition: `__traits(compiles, { static T _; }) || newLength <= length` + * * Postcondition: `length == newLength` */ @property void length(size_t newLength) @@ -1708,6 +1722,23 @@ if (!is(immutable T == immutable bool)) assert(equal(a[], [1,2,3,4,5,6,7,8])); } +// https://issues.dlang.org/show_bug.cgi?id=22105 +@system unittest +{ + import core.exception : AssertError; + import std.exception : assertThrown, assertNotThrown; + + struct NoDefaultCtor + { + int i; + @disable this(); + this(int j) { i = j; } + } + + auto array = Array!NoDefaultCtor([NoDefaultCtor(1), NoDefaultCtor(2)]); + assertNotThrown!AssertError(array.length = 1); + assertThrown!AssertError(array.length = 5); +} //////////////////////////////////////////////////////////////////////////////// // Array!bool diff --git a/libphobos/src/std/conv.d b/libphobos/src/std/conv.d index d9db9b0..98df7fd 100644 --- a/libphobos/src/std/conv.d +++ b/libphobos/src/std/conv.d @@ -2377,7 +2377,7 @@ Throws: A $(LREF ConvException) If an overflow occurred during conversion or if no character of the input was meaningfully converted. */ -auto parse(Target, Source, Flag!"doCount" doCount = No.doCount)(ref Source s) +auto parse(Target, Source, Flag!"doCount" doCount = No.doCount)(ref scope Source s) if (isSomeChar!(ElementType!Source) && isIntegral!Target && !is(Target == enum)) { @@ -2482,7 +2482,7 @@ if (isSomeChar!(ElementType!Source) && v = -v; static if (isNarrowString!Source) - s = cast(Source) source; + s = s[$-source.length..$]; static if (doCount) { diff --git a/libphobos/src/std/format/internal/read.d b/libphobos/src/std/format/internal/read.d index 102e59f..9130499 100644 --- a/libphobos/src/std/format/internal/read.d +++ b/libphobos/src/std/format/internal/read.d @@ -228,26 +228,8 @@ if (isInputRange!Range && is(StringTypeOf!T) && !isAggregateType!T && !is(T == e } T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char fmt) -if (isInputRange!Range && isArray!T && !is(StringTypeOf!T) && !isAggregateType!T - && !is(T == enum)) -{ - import std.conv : parse, text; - import std.format : enforceFmt; - - const spec = fmt.spec; - if (spec == '(') - { - return unformatRange!T(input, fmt); - } - - enforceFmt(spec == 's', - text("Wrong unformat specifier '%", spec , "' for ", T.stringof)); - - return parse!T(input); -} - -T unformatValueImpl(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char fmt) -if (isInputRange!Range && isAssociativeArray!T && !is(T == enum)) +if (isInputRange!Range && !is(StringTypeOf!T) && !isAggregateType!T + && (isArray!T || isAssociativeArray!T || is(T == enum))) { import std.conv : parse, text; import std.format : enforceFmt; diff --git a/libphobos/src/std/format/read.d b/libphobos/src/std/format/read.d index 0de8818..b3d8d1f 100644 --- a/libphobos/src/std/format/read.d +++ b/libphobos/src/std/format/read.d @@ -719,3 +719,16 @@ T unformatValue(T, Range, Char)(ref Range input, scope const ref FormatSpec!Char int b; assertThrown(formattedRead(str, "%s %d-%s", &a, &b, &c)); } + +// https://issues.dlang.org/show_bug.cgi?id=18051 +@safe pure unittest +{ + import std.format : format; + + enum Op { lt, gt, eq } + + auto s = format!"%s"(Op.lt); + Op op; + assert(formattedRead!"%s"(s, op) == 1); + assert(op == Op.lt); +} diff --git a/libphobos/src/std/sumtype.d b/libphobos/src/std/sumtype.d index 8242f1e..658fd38 100644 --- a/libphobos/src/std/sumtype.d +++ b/libphobos/src/std/sumtype.d @@ -1700,7 +1700,6 @@ template match(handlers...) * Throws: * [MatchException], if the currently-held type has no matching handler. * - * See_Also: `std.variant.tryVisit` * See_Also: $(REF tryVisit, std,variant) */ version (D_Exceptions) diff --git a/libphobos/src/std/uni/package.d b/libphobos/src/std/uni/package.d index a27cbea..192b6fd 100644 --- a/libphobos/src/std/uni/package.d +++ b/libphobos/src/std/uni/package.d @@ -5798,7 +5798,7 @@ if (is(Char1 : dchar) && is(Char2 : dchar)) // Utilities for compression of Unicode code point sets //============================================================================ -@safe void compressTo(uint val, ref ubyte[] arr) pure nothrow +@safe void compressTo(uint val, ref scope ubyte[] arr) pure nothrow { // not optimized as usually done 1 time (and not public interface) if (val < 128) @@ -5817,7 +5817,7 @@ if (is(Char1 : dchar) && is(Char2 : dchar)) } } -@safe uint decompressFrom(const(ubyte)[] arr, ref size_t idx) pure +@safe uint decompressFrom(scope const(ubyte)[] arr, ref size_t idx) pure { import std.exception : enforce; immutable first = arr[idx++]; @@ -8412,7 +8412,7 @@ int hangulSyllableIndex(dchar ch) pure nothrow @nogc @safe } // internal helper: compose hangul syllables leaving dchar.init in holes -void hangulRecompose(dchar[] seq) pure nothrow @nogc @safe +void hangulRecompose(scope dchar[] seq) pure nothrow @nogc @safe { for (size_t idx = 0; idx + 1 < seq.length; ) { @@ -8695,7 +8695,7 @@ inout(C)[] normalize(NormalizationForm norm=NFC, C)(return scope inout(C)[] inpu } // canonically recompose given slice of code points, works in-place and mutates data -private size_t recompose(size_t start, dchar[] input, ubyte[] ccc) pure nothrow @safe +private size_t recompose(size_t start, scope dchar[] input, scope ubyte[] ccc) pure nothrow @safe { assert(input.length == ccc.length); int accumCC = -1;// so that it's out of 0 .. 255 range diff --git a/libphobos/src/std/utf.d b/libphobos/src/std/utf.d index 866ec48..a29025a 100644 --- a/libphobos/src/std/utf.d +++ b/libphobos/src/std/utf.d @@ -1168,7 +1168,7 @@ do /// ditto dchar decode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar, S)( -auto ref S str, ref size_t index) @trusted pure +auto ref scope S str, ref size_t index) @trusted pure if (isSomeString!S) in { @@ -1274,7 +1274,7 @@ do /// ditto dchar decodeFront(UseReplacementDchar useReplacementDchar = No.useReplacementDchar, S)( -ref S str, out size_t numCodeUnits) @trusted pure +ref scope S str, out size_t numCodeUnits) @trusted pure if (isSomeString!S) in { @@ -2541,14 +2541,12 @@ size_t encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( `UTFException` if `c` is not a valid UTF code point. +/ void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( - ref char[] str, dchar c) @safe pure + ref scope char[] str, dchar c) @safe pure { - char[] r = str; - if (c <= 0x7F) { assert(isValidDchar(c)); - r ~= cast(char) c; + str ~= cast(char) c; } else { @@ -2589,9 +2587,8 @@ void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( c = _utfException!useReplacementDchar("Encoding an invalid code point in UTF-8", c); goto L3; } - r ~= buf[0 .. L]; + str ~= buf[0 .. L]; } - str = r; } /// @@ -2666,10 +2663,8 @@ void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( /// ditto void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( - ref wchar[] str, dchar c) @safe pure + ref scope wchar[] str, dchar c) @safe pure { - wchar[] r = str; - if (c <= 0xFFFF) { if (0xD800 <= c && c <= 0xDFFF) @@ -2677,7 +2672,7 @@ void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( assert(isValidDchar(c)); L1: - r ~= cast(wchar) c; + str ~= cast(wchar) c; } else if (c <= 0x10FFFF) { @@ -2686,7 +2681,7 @@ void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( assert(isValidDchar(c)); buf[0] = cast(wchar)((((c - 0x10000) >> 10) & 0x3FF) + 0xD800); buf[1] = cast(wchar)(((c - 0x10000) & 0x3FF) + 0xDC00); - r ~= buf; + str ~= buf; } else { @@ -2694,8 +2689,6 @@ void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( c = _utfException!useReplacementDchar("Encoding an invalid code point in UTF-16", c); goto L1; } - - str = r; } @safe unittest @@ -2727,7 +2720,7 @@ void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( /// ditto void encode(UseReplacementDchar useReplacementDchar = No.useReplacementDchar)( - ref dchar[] str, dchar c) @safe pure + ref scope dchar[] str, dchar c) @safe pure { if ((0xD800 <= c && c <= 0xDFFF) || 0x10FFFF < c) c = _utfException!useReplacementDchar("Encoding an invalid code point in UTF-32", c); diff --git a/libphobos/src/std/xml.d b/libphobos/src/std/xml.d index 37fab6d..fdfdc3f 100644 --- a/libphobos/src/std/xml.d +++ b/libphobos/src/std/xml.d @@ -433,7 +433,7 @@ enum DecodeMode * writefln(decode("a > b")); // writes "a > b" * -------------- */ -string decode(return scope string s, DecodeMode mode=DecodeMode.LOOSE) @safe pure +string decode(string s, DecodeMode mode=DecodeMode.LOOSE) @safe pure { import std.algorithm.searching : startsWith; |