Commit graph

52 commits

Author SHA1 Message Date
Iain Buclaw
bbfbaa792b d: Merge upstream dmd, druntime f8bae04558, phobos ba2ade9dec
D front-end changes:

    - Import dmd v2.108.1-beta-1.

D runtime changes:

    - Import druntime v2.108.1-beta-1.

Phobos changes:

    - Import phobos v2.108.1-beta-1.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd f8bae04558.
	* dmd/VERSION: Bump version to v2.108.0-beta.1.
	* d-builtins.cc (build_frontend_type): Update for new front-end
	interface.
	* d-codegen.cc (build_assert_call): Likewise.
	* d-convert.cc (d_array_convert): Likewise.
	* decl.cc (get_vtable_decl): Likewise.
	* expr.cc (ExprVisitor::visit (EqualExp *)): Likewise.
	(ExprVisitor::visit (VarExp *)): Likewise.
	(ExprVisitor::visit (ArrayLiteralExp *)): Likewise.
	(ExprVisitor::visit (AssocArrayLiteralExp)): Likewise.
	* intrinsics.cc (build_shuffle_mask_type): Likewise.
	(maybe_warn_intrinsic_mismatch): Likewise.
	* runtime.cc (get_libcall_type): Likewise.
	* typeinfo.cc (TypeInfoVisitor::layout_string): Likewise.
	(TypeInfoVisitor::visit(TypeInfoTupleDeclaration *)): Likewise.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 02d6d07a69.
	* src/MERGE: Merge upstream phobos a2ade9dec.
2024-03-03 23:42:56 +01:00
Iain Buclaw
51c4eb28c1 d: Merge dmd. druntime e770945277, phobos 6d6e0b9b9
D front-end changes:

    - Import latest fixes from dmd v2.107.0-beta.1.
    - Hex strings can now be cast to integer arrays.
    - Add support for Interpolated Expression Sequences.

D runtime changes:

    - Import latest fixes from druntime v2.107.0-beta.1.
    - New core.interpolation module to provide run-time support for D
      interpolated expression sequence literals.

Phobos changes:

    - Import latest fixes from phobos v2.107.0-beta.1.
    - `std.range.primitives.isBidirectionalRange', and
      `std.range.primitives.isRandomAccessRange' now take an optional
      element type.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd e770945277.
	* Make-lang.in (D_FRONTEND_OBJS): Add d/basicmangle.o, d/enumsem.o,
	d/funcsem.o, d/templatesem.o.
	* d-builtins.cc (build_frontend_type): Update for new front-end
	interface.
	* d-codegen.cc (declaration_type): Likewise.
	(parameter_type): Likewise.
	* d-incpath.cc (add_globalpaths): Likewise.
	(add_filepaths): Likewise.
	(add_import_paths): Likewise.
	* d-lang.cc (d_init_options): Likewise.
	(d_handle_option): Likewise.
	(d_parse_file): Likewise.
	* decl.cc (DeclVisitor::finish_vtable): Likewise.
	(DeclVisitor::visit (FuncDeclaration *)): Likewise.
	(get_symbol_decl): Likewise.
	* expr.cc (ExprVisitor::visit (StringExp *)): Likewise.
	Implement support for 8-byte hexadecimal strings.
	* typeinfo.cc (create_tinfo_types): Update internal TypeInfo
	representation.
	(TypeInfoVisitor::visit (TypeInfoConstDeclaration *)): Update for new
	front-end interface.
	(TypeInfoVisitor::visit (TypeInfoInvariantDeclaration *)): Likewise.
	(TypeInfoVisitor::visit (TypeInfoSharedDeclaration *)): Likewise.
	(TypeInfoVisitor::visit (TypeInfoWildDeclaration *)): Likewise.
	(TypeInfoVisitor::visit (TypeInfoClassDeclaration *)): Move data for
	TypeInfo_Class.nameSig to the end of the object.
	(create_typeinfo): Update for new front-end interface.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime e770945277.
	* libdruntime/Makefile.am (DRUNTIME_SOURCES): Add
	core/interpolation.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 6d6e0b9b9.
2024-02-03 12:03:37 +01:00
Iain Buclaw
5470a9b176 d: Merge dmd, druntime d8e3976a58, phobos 7a6e95688
D front-end changes:

    - Import dmd v2.107.0-beta.1.
    - A string literal as an assert condition is deprecated.
    - Added `@standalone` for module constructors.

D runtime changes:

    - Import druntime v2.107.0-beta.1.

Phobos changes:

    - Import phobos v2.107.0-beta.1.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd d8e3976a58.
	* dmd/VERSION: Bump version to v2.107.0-beta.1.
	* d-lang.cc (d_parse_file): Update for new front-end interface.
	* modules.cc (struct module_info): Add standalonectors.
	(build_module_tree): Implement @standalone.
	(register_module_decl): Likewise.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime d8e3976a58.
	* src/MERGE: Merge upstream phobos 7a6e95688.
2024-02-03 00:16:55 +01:00
Iain Buclaw
e773c6c700 d: Merge upstream dmd, druntime e48bc0987d, phobos 2458e8f82.
D front-end changes:

    - Import dmd v2.106.0-beta.1.

D runtime changes:

    - Import druntime v2.106.0-beta.1.

Phobos changes:

    - Import phobos v2.106.0-beta.1.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd e48bc0987d.
	* expr.cc (ExprVisitor::visit (NewExp *)): Update for new front-end
	interface.
	* runtime.def (NEWARRAYT): Remove.
	(NEWARRAYIT): Remove.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime e48bc0987d.
	* src/MERGE: Merge upstream phobos 2458e8f82.
2023-10-29 16:41:29 +01:00
Iain Buclaw
964fd402c9 d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
D front-end changes:

	- Import latest fixes to mainline.

D runtime changes:

	- Import latest fixes to mainline.

Phobos changes:

	- Import latest fixes to mainline.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 4c18eed967.
	* d-diagnostic.cc (verrorReport): Update for new front-end interface.
	(verrorReportSupplemental): Likewise.
	* d-lang.cc (d_init_options): Likewise.
	(d_handle_option): Likewise.
	(d_post_options): Likewise.
	(d_parse_file): Likewise.
	* decl.cc (get_symbol_decl): Likewise.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 4c18eed967.
	* src/MERGE: Merge upstream phobos d945686a4.
2023-10-16 19:14:10 +02:00
Iain Buclaw
ac908237bd d: Merge upstream dmd, druntime f9efc98fd7, phobos a3f22129d.
D front-end changes:

	- Import dmd v2.105.2.
	- A function with enum storage class is now deprecated.
	- Global variables can now be initialized with Associative
	  Arrays.
	- Improvements for the C++ header generation of static variables
	  used in a default argument context.

D runtime changes:

	- Import druntime v2.105.2.
	- The `core.memory.GC' functions `GC.enable', `GC.disable',
	  `GC.collect', and `GC.minimize' `have been marked `@safe'.

Phobos changes:

	- Import phobos v2.105.2.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd f9efc98fd7.
	* dmd/VERSION: Bump version to v2.105.2.
	* d-builtins.cc (build_frontend_type): Update for new front-end
	interface.
	* d-diagnostic.cc (verrorReport): Don't emit tips when error gagging
	is turned on.
	* d-lang.cc (d_handle_option): Remove obsolete parameter.
	(d_post_options): Likewise.
	(d_read_ddoc_files): New function.
	(d_generate_ddoc_file): New function.
	(d_parse_file): Update for new front-end interface.
	* expr.cc (ExprVisitor::visit (AssocArrayLiteralExp *)): Check for new
	front-end lowering of static associative arrays.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime f9efc98fd7.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add
	core/internal/newaa.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos a3f22129d.
	* testsuite/libphobos.hash/test_hash.d: Update test.
	* testsuite/libphobos.phobos/phobos.exp: Add compiler flags
	-Wno-deprecated.
	* testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise.

gcc/testsuite/ChangeLog:

	* lib/gdc-utils.exp (gdc-convert-args): Handle new compiler options.
2023-10-15 12:12:49 +02:00
Iain Buclaw
8da8c7d337 d: Merge upstream dmd, druntime 4ca4140e58, phobos 454dff14d.
D front-end changes:

	- Import dmd v2.103.0-beta.1.
	- Using `alias this' for classes has been deprecated.
	- The feature `-fpreview=dip25` is now enabled by default.
	- The compile-time traits `isVirtualFunction' and
	  `getVirtualFunctions' have been deprecated.

D runtime changes:

	- Import druntime v2.103.0-beta.1.

Phobos changes:

	- Import phobos v2.103.0-beta.1.
	- Updated unicode grapheme walking updated to conform to Unicode
	  version 15.
	- Improved friendliness of error messages when instantiating
	  `std.algorithm.iteration.joiner' and
	  `std.algorithm.sorting.sort' with wrong inputs.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 4ca4140e58.
	* dmd/VERSION: Bump version to v2.103.0-beta.1.
	* Make-lang.in (D_FRONTEND_OBJS): Add d/errorsink.o.
	* d-ctfloat.cc (CTFloat::sprint): Update signature for new front-end
	interface.
	* d-frontend.cc (getTypeInfoType): Likewise.
	* d-lang.cc (d_handle_option): Remove handling of -fpreview=dip25 and
	-frevert=dip25.
	(d_post_options): Remove enabling of sealed references language
	feature when scoped pointers is enabled.
	* d-tree.h (create_typeinfo): Update signature.
	* decl.cc (DeclVisitor::finish_vtable): Update for new front-end
	interface.
	(DeclVisitor::visit (VarDeclaration *)): Likewise.
	(DeclVisitor::visit (FuncDeclaration *)): Check skipCodegen to see if
	front-end explicitly requested not to generate code.
	* expr.cc (ExprVisitor::visit (NewExp *)): Update for new front-end
	interface.
	* lang.opt (fpreview=dip25): Remove.
	(frevert=dip25): Remove.
	* modules.cc (layout_moduleinfo_fields): Update for new front-end
	interface.
	(layout_moduleinfo): Likewise.
	* runtime.def (NEWCLASS): Remove.
	* toir.cc (IRVisitor::visit (IfStatement *)): Don't generate IR for if
	statement list when condition is `__ctfe'.
	* typeinfo.cc (create_typeinfo): Add generate parameter.
	* types.cc (layout_aggregate_members): Update for new front-end
	interface.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 4ca4140e58.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add core/factory.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 454dff14d.
	* testsuite/libphobos.hash/test_hash.d: Update test.
	* testsuite/libphobos.shared/finalize.d: Update test.
	* libdruntime/core/factory.d: New file.

gcc/testsuite/ChangeLog:

	* gdc.dg/torture/simd23084.d: New test.
	* gdc.dg/torture/simd23085.d: New test.
	* gdc.dg/torture/simd23218.d: New test.
2023-03-16 17:29:57 +01:00
Iain Buclaw
f99303eb4a d: Merge upstream dmd, druntime 09faa4eacd, phobos 13ef27a56.
D front-end changes:

	- Import dmd v2.102.0-beta.1
	- `static assert' now supports multiple message arguments.

D runtime changes:

	- Import druntime v2.102.0-beta.1
	- The default `Throwable.TraceInfo' generation now is `@nogc'.
	- `Object.factory' method has now been deprecated.

Phobos changes:

	- Import phobos v2.102.0-beta.1
	- Added float- and double-precision implementations for log
	  function families in std.math.
	- `std.typecons.Unique' now calls `destroy` on struct types

gcc/d/ChangeLog:

	* Make-lang.in (D_FRONTEND_OBJS): Add d/location.o.
	* d-lang.cc (d_init_options): Update for new front-end interface.
	(d_post_options): Call Loc::set after handling options.
	* dmd/MERGE: Merge upstream dmd 09faa4eacd.
	* dmd/VERSION: Bump version to v2.102.0-beta.1.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 09faa4eacd.
	* src/MERGE: Merge upstream phobos 13ef27a56.
	* testsuite/libphobos.exceptions/refcounted.d: Add test for chained
	reference counted exceptions.
	* testsuite/libphobos.shared/finalize.d: Add dg-warning for deprecated
	factory interfaces.
	* testsuite/libphobos.gc/issue22843.d: New test.

gcc/testsuite/ChangeLog:

	* gdc.dg/simd2a.d: Update.
	* gdc.dg/simd2b.d: Update.
	* gdc.dg/simd2c.d: Update.
	* gdc.dg/simd2d.d: Update.
	* gdc.dg/simd2e.d: Update.
	* gdc.dg/simd2f.d: Update.
	* gdc.dg/simd2g.d: Update.
	* gdc.dg/simd2h.d: Update.
	* gdc.dg/simd2i.d: Update.
	* gdc.dg/simd2j.d: Update.
2023-02-21 15:33:38 +01:00
Iain Buclaw
6d799f0aed d: Merge upstream dmd, druntime c8ae4adb2e, phobos 792c8b7c1.
D front-end changes:

	- Import dmd v2.101.0.
	- Deprecate the ability to call `__traits(getAttributes)' on
	  overload sets.
	- Deprecate non-empty `for' statement increment clause with no
	  effect.
	- Array literals assigned to `scope' array variables can now be
	  allocated on the stack.

D runtime changes:

	- Import druntime v2.101.0.

Phobos changes:

	- Import phobos v2.101.0.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd c8ae4adb2e.
	* typeinfo.cc (check_typeinfo_type): Update for new front-end
	interface.
	(TypeInfoVisitor::visit (TypeInfoStructDeclaration *)): Remove warning
	that toHash() must be declared 'nothrow @safe`.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime c8ae4adb2e.
	* src/MERGE: Merge upstream phobos 792c8b7c1.
2022-12-11 17:17:58 +01:00
Iain Buclaw
7e7ebe3e35 d: Merge upstream dmd, druntime e4f8919591, phobos 3ad507b51.
D front-end changes:

    - Import dmd v2.101.0-beta.1.
    - Add predefined version `D_Optimized' when compiling with `-O'.
    - Shortened method syntax (DIP1043) is now enabled by default.
    - Array literals assigned to `scope' array variables are now
      allocated on the stack.
    - Implement `@system' variables (DIP1035), available behind the
      preview feature flag `-fpreview=systemvariables'.

D runtime changes:

    - Import druntime v2.101.0-beta.1.

Phobos changes:

    - Import phobos v2.101.0-beta.1.
    - Added `std.typecons.SafeRefCounted', that can be used in `@safe'
      code with `-fpreview=dip1000'.

gcc/d/ChangeLog:

	* d-attribs.cc (apply_user_attributes): Update for new front-end
	interface.
	* d-builtins.cc (d_init_versions): Predefine `D_Optimized' with
	compiling with optimizations enabled.
	* d-lang.cc (d_handle_option): Update for new front-end interface.
	Handle new option `-fpreview=systemvariables'.
	* dmd/MERGE: Merge upstream dmd e4f8919591.
	* dmd/VERSION: Bump version to v2.101.0-beta.1.
	* expr.cc (ExprVisitor::visit (AssignExp *)): Treat construction of
	static arrays from a call expression as a simple assignment.
	(ExprVisitor::visit (ArrayLiteralExp *)): Handle array literals with
	`scope' storage.
	* gdc.texi: Update documentation of `-fpreview=' options.
	* lang.opt (fpreview=shortenedmethods): Remove.
	(fpreview=systemvariables):  New option.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime e4f8919591.
	* src/MERGE: Merge upstream phobos 3ad507b51.

gcc/testsuite/ChangeLog:

	* gdc.dg/simd19630.d: Move tests with errors to ...
	* gdc.dg/simd19630b.d: ... here.  New test.
	* gdc.dg/simd19630c.d: New test.
	* gdc.dg/simd_ctfe.d: Removed.
	* gdc.dg/simd18867.d: New test.
	* gdc.dg/simd19788.d: New test.
	* gdc.dg/simd21469.d: New test.
	* gdc.dg/simd21672.d: New test.
	* gdc.dg/simd23077.d: New test.
	* gdc.dg/simd23084.d: New test.
	* gdc.dg/simd23085.d: New test.
	* gdc.dg/torture/simd19632.d: New test.
	* gdc.dg/torture/simd20041.d: New test.
	* gdc.dg/torture/simd21673.d: New test.
	* gdc.dg/torture/simd21676.d: New test.
	* gdc.dg/torture/simd22438.d: New test.
	* gdc.dg/torture/simd23009.d: New test.
	* gdc.dg/torture/simd23077.d: New test.
	* gdc.dg/torture/simd8.d: New test.
	* gdc.dg/torture/simd9.d: New test.
	* gdc.dg/torture/simd_prefetch.d: New test.
2022-10-29 13:02:26 +02:00
Iain Buclaw
c8dfa79c99 d: Merge upstream dmd d579c467c1, phobos 88aa69b14.
D front-end changes:

    - Throwing from contracts of `nothrow' functions has been
      deprecated, as this breaks the guarantees of `nothrow'.
    - Added language support for initializing the interior pointer of
      associative arrays using `new' keyword.

Phobos changes:

    - The std.digest.digest module has been removed.
    - The std.xml module has been removed.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd d579c467c1.
	* decl.cc (layout_struct_initializer): Update for new front-end
	interface.
	* expr.cc (ExprVisitor::visit (AssignExp *)): Remove lowering of array
	assignments.
	(ExprVisitor::visit (NewExp *)): Add new lowering of new'ing
	associative arrays to an _aaNew() library call.
	* runtime.def (ARRAYSETASSIGN): Remove.
	(AANEW): Define.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime d579c467c1.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Remove
	rt/arrayassign.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 88aa69b14.
	* src/Makefile.am (PHOBOS_DSOURCES): Remove std/digest/digest.d,
	std/xml.d.
	* src/Makefile.in: Regenerate.
2022-09-27 10:50:18 +02:00
Iain Buclaw
b7a586beae d: Merge upstream dmd 817610b16d, phobos b578dfad9
D front-end changes:

    - Import latest bug fixes to mainline.

Phobos changes:

    - Import latest bug fixes to mainline.
    - std.logger module has been moved out of experimental.
    - Removed std.experimental.typecons module.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 817610b16d.
	* d-ctfloat.cc (CTFloat::parse): Update for new front-end interface.
	* d-lang.cc (d_parse_file): Likewise.
	* expr.cc (ExprVisitor::visit (AssignExp *)): Remove handling of array
	assignments to non-trivial static and dynamic arrays.
	* runtime.def (ARRAYASSIGN): Remove.
	(ARRAYASSIGN_L): Remove.
	(ARRAYASSIGN_R): Remove.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 817610b16d.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add
	core/internal/array/arrayassign.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos b578dfad9.
	* src/Makefile.am (PHOBOS_DSOURCES): Remove
	std/experimental/typecons.d. Add std/logger package.
	* src/Makefile.in: Regenerate.
2022-08-28 00:16:34 +02:00
Iain Buclaw
b6df113247 d: Merge upstream dmd d7772a2369, phobos 5748ca43f.
In upstream dmd, the compiler front-end and run-time have been merged
together into one repository.  Both dmd and libdruntime now track that.

D front-end changes:

    - Deprecated `scope(failure)' blocks that contain `return' statements.
    - Deprecated using integers for `version' or `debug' conditions.
    - Deprecated returning a discarded void value from a function.
    - `new' can now allocate an associative array.

D runtime changes:

    - Added avx512f detection to core.cpuid module.

Phobos changes:

    - Changed std.experimental.logger.core.sharedLog to return
      shared(Logger).

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd d7772a2369.
	* dmd/VERSION: Bump version to v2.100.1.
	* d-codegen.cc (get_frameinfo): Check whether decision to generate
	closure changed since semantic finished.
	* d-lang.cc (d_handle_option): Remove handling of -fdebug=level and
	-fversion=level.
	* decl.cc (DeclVisitor::visit (VarDeclaration *)): Generate evaluation
	of noreturn variable initializers before throw.
	* expr.cc (ExprVisitor::visit (AssignExp *)): Don't generate
	assignment for noreturn types, only evaluate for side effects.
	* lang.opt (fdebug=): Undocument -fdebug=level.
	(fversion=): Undocument -fversion=level.

libphobos/ChangeLog:

	* configure: Regenerate.
	* configure.ac (libtool_VERSION): Update to 4:0:0.
	* libdruntime/MERGE: Merge upstream druntime d7772a2369.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add
	core/internal/array/duplication.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 5748ca43f.
	* testsuite/libphobos.gc/nocollect.d:
2022-08-03 13:01:53 +02:00
Iain Buclaw
445d8deffb d: Merge upstream dmd 6203135dc, druntime e150cca1, phobos a4a18d21c.
D front-end changes:

    - Input parameters can now be applied on extern(C++) functions to
      bind to `const &' when the `-fpreview=in' flag is in effect.

D runtime changes:

    - Run-time flag `--DRT-oncycle=deprecate' has been removed.

Phobos changes:

    - Removed std.experimental.logger's capability to set the minimal
      LogLevel at compile time.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 6203135dc.
	* typeinfo.cc (TypeInfoVisitor::visit (TypeInfoStructDeclaration *)):
	Update for new front-end interface.
	(SpeculativeTypeVisitor::visit (TypeStruct *)): Likewise.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime e150cca1.
	* src/MERGE: Merge upstream phobos a4a18d21c.
	* testsuite/libphobos.cycles/cycles.exp (cycle_test_list): Update
	expected result of deprecate test.
2022-06-22 17:57:56 +02:00
Iain Buclaw
5eb9927aae d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01.
D front-end changes:

    - Import dmd v2.100.0.
    - Add bit fields to D, enabled via the -fpreview=bitfields switch.
    - Removed the -ftransition=markdown and -frevert=markdown switches.
    - Added new trait `__traits(classInstanceAlignment)' to provide the
      required data alignment for classes.
    - The check for `pragma(crt_constructor)' and `pragma(crt_destructor)'
      linkage has been relaxed to allow all `void()' signatures.
    - ImportC parser now recognizes the `typeof(...)' operator.

D runtime changes:

    - Import druntime v2.100.0.

Phobos changes:

    - Import phobos v2.100.0.
    - To comply with dip1000, `std.socket.Socket` methods now accept only
      `scope' arrays.
    - The `fill', `alignSize', `align2', and `align4' methods of
      `std.outbuffer.OutBuffer' have been extended to allow specifying a custom
      value when pre-filling or padding the buffer.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 60bfa0ee7.
	* dmd/VERSION: Update version to v2.100.0.
	* d-builtins.cc (d_init_versions): Update for new front-end interface.
	* d-codegen.cc (d_decl_context): Use resolvedLinkage to get
	declaration linkage.
	(build_struct_literal): Track offset in bits.
	* d-gimplify.cc (d_gimplify_modify_expr): Check both operands for a
	bit-field reference.
	* d-lang.cc (d_handle_option): Handle -fpreview=bitfields, remove
	-frevert=markdown and -ftransition=vmarkdown.
	(d_post_options): Set flag_rtti and flag_exceptions if -fno-druntime
	was seen on command-line.
	(d_parse_file): Update for new front-end interface.
	(d_type_promotes_to): Use resolvedLinkage to get declaration linkage.
	* decl.cc (make_thunk): Likewise.
	* expr.cc (ExprVisitor::visit (CatAssignExp *)): Remove lowering for
	appending of an element or array to another array.
	* lang.opt (fpreview=bitfields): New option.
	(frevert=markdown): Remove.
	(ftransition=vmarkdown): Remove.
	* types.cc (layout_aggregate_members): Ignore anonymous fields in
	total count.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 94bd5bcb.
	* libdruntime/Makefile.am (ALL_DRUNTIME_INSTALL_DSOURCES): Add
	$(DRUNTIME_DSOURCES_ELF).
	(ALL_DRUNTIME_SOURCES): Likewise.
	(DRUNTIME_DSOURCES_ELF): New variable.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 3a1cd9a01.
	* testsuite/libphobos.init_fini/custom_gc.d: Update test.
2022-05-16 19:07:45 +02:00
Iain Buclaw
8977f4bec6 d: Merge upstream dmd 423f19b41, druntime 100a608c, phobos a1f8c4c07.
D Runtime changes:

    - Fix stdc.stdio bindings to not depend on druntime (PR104729).
    - Implement stdc.math for Solaris (PR104735).

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 423f19b41.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 100a608c.
	* src/MERGE: Merge upstream phobos a1f8c4c07.
2022-03-02 18:21:38 +01:00
Iain Buclaw
1027dc4592 d: Merge upstream dmd cf63dd8e5, druntime caf14b0f, phobos 41aaf8c26.
D front-end changes:

    - Import dmd v2.099.0-rc.1.
    - The `main' can now return type `noreturn' and supports return
      inference.

D Runtime changes:

    - Import druntime v2.099.0-rc.1.
    - C bindings for stat_t on powerpc-linux has been fixed.

Phobos changes:

    - Import phobos v2.099.0-rc.1.

gcc/d/ChangeLog:

	* d-target.cc (Target::_init): Initialize C type size fields.
	* dmd/MERGE: Merge upstream dmd cf63dd8e5.
	* dmd/VERSION: Update version to v2.099.0-rc.1.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime caf14b0f.
	* src/MERGE: Merge upstream phobos 41aaf8c26.

gcc/testsuite/ChangeLog:

	* gdc.dg/torture/simd7413a.d: Update.
	* gdc.dg/ubsan/pr88957.d: Update.
	* gdc.dg/simd18489.d: New test.
	* gdc.dg/torture/simd21727.d: New test.
2022-02-28 17:49:01 +01:00
Iain Buclaw
6384eff56d d: Merge upstream dmd cb49e99f8, druntime 55528bd1, phobos 1a3e80ec2.
D front-end changes:

    - Import dmd v2.099.0-beta.1.
    - It's now an error to use `alias this' for partial assignment.
    - The `delete' keyword has been removed from the language.
    - Using `this' and `super' as types has been removed from the
      language, the parser no longer specially handles this wrong code
      with an informative error.

D Runtime changes:

    - Import druntime v2.099.0-beta.1.

Phobos changes:

    - Import phobos v2.099.0-beta.1.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd cb49e99f8.
	* dmd/VERSION: Update version to v2.099.0-beta.1.
	* decl.cc (layout_class_initializer): Update call to NewExp::create.
	* expr.cc (ExprVisitor::visit (DeleteExp *)): Remove handling of
	deleting arrays and pointers.
	(ExprVisitor::visit (DotVarExp *)): Convert complex types to the
	front-end library type representing them.
	(ExprVisitor::visit (StringExp *)): Use getCodeUnit instead of charAt
	to get the value of each index in a string expression.
	* runtime.def (DELMEMORY): Remove.
	(DELARRAYT): Remove.
	* types.cc (TypeVisitor::visit (TypeEnum *)): Handle anonymous enums.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 55528bd1.
	* src/MERGE: Merge upstream phobos 1a3e80ec2.
	* testsuite/libphobos.hash/test_hash.d: Update.
	* testsuite/libphobos.betterc/test19933.d: New test.
2022-02-20 23:37:32 +01:00
Iain Buclaw
d75691877c d: Merge upstream dmd 52844d4b1, druntime dbd0c874, phobos 896b1d0e1.
D front-end changes:

    - Parsing and compiling C code is now possible using `import'.
    - `throw' statements can now be used as an expression.
    - Improvements to the D template emission strategy when compiling
      with `-funittest'.

D Runtime changes:

    - New core.int128 module for implementing intrinsics to support
      128-bit integer types.
    - C bindings for the kernel and C runtime have been better separated
      to allow compiling for hybrid targets, such as kFreeBSD.

Phobos changes:

    - The std.experimental.checkedint module has been renamed to
      std.checkedint.

gcc/d/ChangeLog:

	* d-builtins.cc (d_build_builtins_module): Set purity of DECL_PURE_P
	functions to PURE::const_.
	* d-gimplify.cc (bit_field_ref): New function.
	(d_gimplify_modify_expr): Handle implicit casting for assignments to
	bit-fields.
	(d_gimplify_unary_expr): New function.
	(d_gimplify_binary_expr): New function.
	(d_gimplify_expr): Handle UNARY_CLASS_P and BINARY_CLASS_P.
	* d-target.cc (Target::_init): Initialize bitFieldStyle.
	(TargetCPP::parameterType): Update signature.
	(Target::supportsLinkerDirective): New function.
	* dmd/MERGE: Merge upstream dmd 52844d4b1.
	* expr.cc (ExprVisitor::visit (ThrowExp *)): New function.
	* types.cc (d_build_bitfield_integer_type): New function.
	(insert_aggregate_bitfield): New function.
	(layout_aggregate_members): Handle inserting bit-fields into an
	aggregate type.

libphobos/ChangeLog:

	* Makefile.in: Regenerate.
	* libdruntime/MERGE: Merge upstream druntime dbd0c874.
	* libdruntime/Makefile.am (DRUNTIME_CSOURCES): Add core/int128.d.
	(DRUNTIME_DISOURCES): Add __builtins.di.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 896b1d0e1.
	* src/Makefile.am (PHOBOS_DSOURCES): Add std/checkedint.d.
	* src/Makefile.in: Regenerate.
	* testsuite/testsuite_flags.in: Add -fall-instantiations to
	--gdcflags.
2022-02-16 11:15:02 +01:00
Iain Buclaw
fd43568cc5 d: Merge upstream dmd 93108bb9e, druntime 6364e010, phobos 575b67a9b.
D front-end changes:

    - Import dmd v2.098.1-beta.1.
    - Default extern(C++) compatibility to C++17.

Druntime changes:

    - Import druntime v2.098.1-beta.1.
    - Fix definition of stat_t on MIPS64 (PR103604)

Phobos changes:

    - Import phobos v2.098.1-beta.1.

gcc/d/ChangeLog:

	* d-lang.cc (d_init_options): Set default -fextern-std= to C++17.
	* dmd/MERGE: Merge upstream dmd 93108bb9e.
	* gdc.texi (Runtime Options): Document the default for -fextern-std=.

libphobos/ChangeLog:

	PR d/103604
	* configure: Regenerate.
	* configure.ac (libtool_VERSION): Update to 3:0:0.
	* libdruntime/MERGE: Merge upstream druntime 6364e010.
	* src/MERGE: Merge upstream phobos 575b67a9b.
	* testsuite/libphobos.traits/all_satisfy.d: New test.
	* testsuite/libphobos.traits/traits.exp: New test.
2021-12-15 19:51:30 +01:00
Iain Buclaw
9c7d5e8846 d: Merge upstream dmd 3982604c5, druntime bc58b1e9, phobos 12329adb6.
D front-end changes:

    - Import dmd mainline development.
    - Split off enum EXP from enum TOK.
    - Integer promotions now follow C integral promotions by default.
    - Implements __traits(initSymbol).
    - Lowering of array construction has been moved to the dmd
      front-end.
    - Fix segfault in dmd.lexer from unaligned read (PR103529).

Druntime changes:

    - Import druntime mainline development.
    - Define SIG_BLOCK for Solaris (PR103528).

Phobos changes:

    - Import phobos mainline development.

gcc/d/ChangeLog:

	PR d/103529
	* dmd/MERGE: Merge upstream dmd 3982604c5.
	* Make-lang.in (D_FRONTEND_OBJS): Add d/root-optional.o.
	* d-attribs.cc (build_attributes): Update for new front-end interface.
	* d-codegen.cc (d_build_call): Likewise.
	* d-compiler.cc (Compiler::paintAsType): Likewise.
	* d-lang.cc (d_handle_option): Remove OPT_fpreview_intpromote, add
	handling of OPT_frevert_intpromote.
	* d-port.cc (Port::valcpy): Assert buffer is aligned.
	* d-target.cc (Target::isVectorOpSupported): Update for new front-end
	interface.
	* decl.cc (layout_class_initializer): Likewise.
	* expr.cc (lvalue_p): Likewise.
	(binop_assignment): Likewise.
	(ExprVisitor::visit): Likewise.
	(ExprVisitor::visit (AssignExp *)): Remove generation of _d_arrayctor
	and _d_arraysetctor library helpers.
	(ExprVisitor::visit (VarExp *)): Support __traits(initSymbol).
	* intrinsics.cc (expand_intrinsic_rotate): Update for new front-end
	interface.
	* lang.opt (fpreview=intpromote): Remove.
	(frevert=intpromote): New.
	* runtime.def (ARRAYCTOR): Remove.
	(ARRAYSETCTOR): Remove.
	* toir.cc (IRVisitor::visit): Update for new front-end interface.
	* types.cc (layout_aggregate_members): Likewise.
	* dmd/root/optional.d: New file.
	* dmd/root/optional.h: New file.

libphobos/ChangeLog:

	PR d/103528
	* libdruntime/MERGE: Merge upstream druntime bc58b1e9.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_LINUX): Remove
	core/sys/linux/syscalls.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 12329adb6.
	* testsuite/libphobos.config/config.exp: Add test22523.
	* libdruntime/core/sys/linux/syscalls.d: Removed.
	* testsuite/libphobos.config/test22523.d: New test.
2021-12-10 05:25:41 +01:00
Iain Buclaw
0fb5703477 d: Merge upstream dmd 568496d5b, druntime 178c44ff, phobos 574bf883b.
D front-end changes:

    - Import dmd v2.098.0
    - New ImportC module for compiling preprocessed C11 code into D.
    - New -ftransition=in switch.
    - Improved handling of new 'noreturn' type.

Druntime changes:

    - Import druntime v2.098.0
    - Fix broken import in core.sys.linux.perf_event module (PR103558).

Phobos changes:

    - Import phobos v2.098.0
    - All sources are now compiled with -fpreview=fieldwise.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 568496d5b.
	* Make-lang.in (D_FRONTEND_OBJS): Add d/common-file.o,
	d/common-outbuffer.o, d/common-string.o, d/file_manager.o,
	d/importc.o.  Remove d/root-outbuffer.o.
	(d/common-%.o): New recipe.
	* d-builtins.cc (build_frontend_type): Update for new front-end
	interface.
	(d_build_d_type_nodes): Set noreturn_type_node.
	* d-codegen.cc (d_build_call): Don't call function if one of the
	arguments is type 'noreturn'.
	(build_vthis_function): Propagate TYPE_QUAL_VOLATILE from original
	function type.
	* d-frontend.cc (eval_builtin): Update signature.
	(getTypeInfoType): Likewise.
	(toObjFile): New function.
	* d-gimplify.cc (d_gimplify_call_expr): Always evaluate arguments from
	left to right.
	* d-lang.cc (d_handle_option): Handle OPT_ftransition_in.
	(d_parse_file): Don't generate D main if it is declared in user code.
	* d-tree.h (CALL_EXPR_ARGS_ORDERED): Remove.
	(enum d_tree_index): Add DTI_BOTTOM_TYPE.
	(noreturn_type_node): New.
	* decl.cc (apply_pragma_crt): Remove.
	(DeclVisitor::visit): Update for new front-end interface.
	(DeclVisitor::visit (PragmaDeclaration *)): Don't handle
	crt_constructor and crt_destructor pragmas.
	(DeclVisitor::visit (VarDeclaration *)): Don't generate declarations
	of type 'noreturn'.
	(DeclVisitor::visit (FuncDeclaration *)): Stop adding parameters when
	'noreturn' type has been encountered.
	(get_symbol_decl): Set DECL_STATIC_CONSTRUCTOR and
	DECL_STATIC_DESTRUCTOR on decl node if requested.
	(aggregate_initializer_decl): Update for new front-end interface.
	* expr.cc (ExprVisitor::visit (CallExp *)): Always use the 'this'
	object as the result of calling any constructor function.
	(ExprVisitor::visit): Update for new front-end interface.
	* gdc.texi (Runtime Options): Document -fmain and -ftransition=in.
	* lang.opt (ftransition=in): New option.
	* modules.cc (get_internal_fn): Update for new front-end interface.
	* types.cc (TypeVisitor::visit): Likewise.
	(TypeVisitor::visit (TypeNoreturn *)): Return noreturn_type_node.
	(TypeVisitor::visit (TypeFunction *)): Stop adding parameters when
	'notreturn' type has been encountered.  Qualify function types that
	return 'noreturn' as TYPE_QUAL_VOLATILE.

libphobos/ChangeLog:

	PR d/103558
	* libdruntime/MERGE: Merge upstream druntime 178c44ff.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_LINUX): Add
	core/sys/linux/syscalls.d.
	(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/pthread_np.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 574bf883b.
	* src/Makefile.am (D_EXTRA_DFLAGS): Add -fpreview=fieldwise.
	* src/Makefile.in: Regenerate.
	* testsuite/libphobos.exceptions/assert_fail.d: Update test.
	* testsuite/libphobos.betterc/test22336.d: New test.
2021-12-09 00:58:58 +01:00
Iain Buclaw
5fee5ec362 d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
The D front-end is now itself written in D, in order to build GDC, you
will need a working GDC compiler (GCC version 9.1 or later).

GCC changes:

    - Add support for bootstrapping the D front-end.

These add the required components in order to have a D front-end written
in D itself.  Because the compiler front-end only depends on the core
runtime modules, only libdruntime is built for the bootstrap stages.

D front-end changes:

    - Import dmd v2.098.0-beta.1.

Druntime changes:

    - Import druntime v2.098.0-beta.1.

Phobos changes:

    - Import phobos v2.098.0-beta.1.

The jump from v2.076.1 to v2.098.0 covers nearly 4 years worth of
development on the D programming language and run-time libraries.

ChangeLog:

	* Makefile.def: Add bootstrap to libbacktrace, libphobos, zlib, and
	libatomic.
	* Makefile.in: Regenerate.
	* Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Fix command for GDC.
	(STAGE1_CONFIGURE_FLAGS): Add --with-libphobos-druntime-only if
	target-libphobos-bootstrap.
	(STAGE2_CONFIGURE_FLAGS): Likewise.
	* configure: Regenerate.
	* configure.ac: Add support for bootstrapping D front-end.

config/ChangeLog:

	* acx.m4 (ACX_PROG_GDC): New m4 function.

gcc/ChangeLog:

	* Makefile.in (GDC): New variable.
	(GDCFLAGS): New variable.
	* configure: Regenerate.
	* configure.ac: Add call to ACX_PROG_GDC.  Substitute GDCFLAGS.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd b8384668f.
	* Make-lang.in (d-warn): Use strict warnings.
	(DMD_WARN_CXXFLAGS): Remove.
	(DMD_COMPILE): Remove.
	(CHECKING_DFLAGS): Define.
	(WARN_DFLAGS): Define.
	(ALL_DFLAGS): Define.
	(DCOMPILE.base): Define.
	(DCOMPILE): Define.
	(DPOSTCOMPILE): Define.
	(DLINKER): Define.
	(DLLINKER): Define.
	(D_FRONTEND_OBJS): Add new dmd front-end objects.
	(D_GENERATED_SRCS): Remove.
	(D_GENERATED_OBJS): Remove.
	(D_ALL_OBJS): Remove D_GENERATED_OBJS.
	(d21$(exeext)): Build using DLLINKER and -static-libphobos.
	(d.tags): Remove dmd/*.c and dmd/root/*.c.
	(d.mostlyclean): Remove D_GENERATED_SRCS, d/idgen$(build_exeext),
	d/impcnvgen$(build_exeext).
	(D_INCLUDES): Include $(srcdir)/d/dmd/res.
	(CFLAGS-d/id.o): Remove.
	(CFLAGS-d/impcnvtab.o): Remove.
	(d/%.o): Build using DCOMPILE and DPOSTCOMPILE.  Update dependencies
	from d/dmd/%.c to d/dmd/%.d.
	(d/idgen$(build_exeext)): Remove.
	(d/impcnvgen$(build_exeext)): Remove.
	(d/id.c): Remove.
	(d/id.h): Remove.
	(d/impcnvtab.c): Remove.
	(d/%.dmdgen.o): Remove.
	(D_SYSTEM_H): Remove.
	(d/idgen.dmdgen.o): Remove.
	(d/impcnvgen.dmdgen.o): Remove.
	* config-lang.in (boot_language): New variable.
	* d-attribs.cc: Include dmd/expression.h.
	* d-builtins.cc: Include d-frontend.h.
	(build_frontend_type): Update for new front-end interface.
	(d_eval_constant_expression): Likewise.
	(d_build_builtins_module): Likewise.
	(maybe_set_builtin_1): Likewise.
	(d_build_d_type_nodes): Likewise.
	* d-codegen.cc (d_decl_context): Likewise.
	(declaration_reference_p): Likewise.
	(declaration_type): Likewise.
	(parameter_reference_p): Likewise.
	(parameter_type): Likewise.
	(get_array_length): Likewise.
	(build_delegate_cst): Likewise.
	(build_typeof_null_value): Likewise.
	(identity_compare_p): Likewise.
	(lower_struct_comparison): Likewise.
	(build_filename_from_loc): Likewise.
	(build_assert_call): Remove LIBCALL_SWITCH_ERROR.
	(build_bounds_index_condition): Call LIBCALL_ARRAYBOUNDS_INDEXP on
	bounds error.
	(build_bounds_slice_condition): Call LIBCALL_ARRAYBOUNDS_SLICEP on
	bounds error.
	(array_bounds_check): Update for new front-end interface.
	(checkaction_trap_p): Handle CHECKACTION_context.
	(get_function_type): Update for new front-end interface.
	(d_build_call): Likewise.
	* d-compiler.cc: Remove include of dmd/scope.h.
	(Compiler::genCmain): Remove.
	(Compiler::paintAsType): Update for new front-end interface.
	(Compiler::onParseModule): Likewise.
	* d-convert.cc (convert_expr): Remove call to LIBCALL_ARRAYCAST.
	(convert_for_rvalue): Update for new front-end interface.
	(convert_for_assignment): Likewise.
	(convert_for_condition): Likewise.
	(d_array_convert): Likewise.
	* d-diagnostic.cc (error): Remove.
	(errorSupplemental): Remove.
	(warning): Remove.
	(warningSupplemental): Remove.
	(deprecation): Remove.
	(deprecationSupplemental): Remove.
	(message): Remove.
	(vtip): New.
	* d-frontend.cc (global): Remove.
	(Global::_init): Remove.
	(Global::startGagging): Remove.
	(Global::endGagging): Remove.
	(Global::increaseErrorCount): Remove.
	(Loc::Loc): Remove.
	(Loc::toChars): Remove.
	(Loc::equals): Remove.
	(isBuiltin): Update for new front-end interface.
	(eval_builtin): Likewise.
	(getTypeInfoType): Likewise.
	(inlineCopy): Remove.
	* d-incpath.cc: Include d-frontend.h.
	(add_globalpaths): Call d_gc_malloc to allocate Strings.
	(add_filepaths): Likewise.
	* d-lang.cc: Include dmd/id.h, dmd/root/file.h, d-frontend.h.  Remove
	include of dmd/mars.h, id.h.
	(entrypoint_module): Remove.
	(entrypoint_root_module): Remove.
	(deps_write_string): Update for new front-end interface.
	(deps_write): Likewise.
	(d_init_options): Call rt_init.  Remove setting global params that are
	default initialized by the front-end.
	(d_handle_option): Handle OPT_fcheckaction_, OPT_fdump_c___spec_,
	OPT_fdump_c___spec_verbose, OPT_fextern_std_, OPT_fpreview,
	OPT_revert, OPT_fsave_mixins_, and OPT_ftransition.
	(d_post_options): Propagate dip1021 and dip1000 preview flags to
	dip25, and flag_diagnostics_show_caret to printErrorContext.
	(d_add_entrypoint_module): Remove.
	(d_parse_file): Update for new front-end interface.
	(d_type_promotes_to): Likewise.
	(d_types_compatible_p): Likewise.
	* d-longdouble.cc (CTFloat::zero): Remove.
	(CTFloat::one): Remove.
	(CTFloat::minusone): Remove.
	(CTFloat::half): Remove.
	* d-system.h (POSIX): Remove.
	(realpath): Remove.
	(isalpha): Remove.
	(isalnum): Remove.
	(isdigit): Remove.
	(islower): Remove.
	(isprint): Remove.
	(isspace): Remove.
	(isupper): Remove.
	(isxdigit): Remove.
	(tolower): Remove.
	(_mkdir): Remove.
	(INT32_MAX): Remove.
	(INT32_MIN): Remove.
	(INT64_MIN): Remove.
	(UINT32_MAX): Remove.
	(UINT64_MAX): Remove.
	* d-target.cc: Include calls.h.
	(target): Remove.
	(define_float_constants): Remove initialization of snan.
	(Target::_init): Update for new front-end interface.
	(Target::isVectorTypeSupported): Likewise.
	(Target::isVectorOpSupported): Remove cases for unordered operators.
	(TargetCPP::typeMangle): Update for new front-end interface.
	(TargetCPP::parameterType): Likewise.
	(Target::systemLinkage): Likewise.
	(Target::isReturnOnStack): Likewise.
	(Target::isCalleeDestroyingArgs): Define.
	(Target::preferPassByRef): Define.
	* d-tree.h (d_add_entrypoint_module): Remove.
	* decl.cc (gcc_attribute_p): Update for new front-end interface.
	(apply_pragma_crt): Define.
	(DeclVisitor::visit(PragmaDeclaration *)): Handle pragmas
	crt_constructor and crt_destructor.
	(DeclVisitor::visit(TemplateDeclaration *)): Update for new front-end
	interface.
	(DeclVisitor::visit): Likewise.
	(DeclVisitor::finish_vtable): Likewise.
	(get_symbol_decl): Error if template has more than one nesting
	context.  Update for new front-end interface.
	(make_thunk): Update for new front-end interface.
	(get_vtable_decl): Likewise.
	* expr.cc (ExprVisitor::visit): Likewise.
	(build_return_dtor): Likewise.
	* imports.cc (ImportVisitor::visit): Likewise.
	* intrinsics.cc: Include dmd/expression.h.  Remove include of
	dmd/mangle.h.
	(maybe_set_intrinsic): Update for new front-end interface.
	* intrinsics.def (INTRINSIC_ROL): Update intrinsic signature.
	(INTRINSIC_ROR): Likewise.
	(INTRINSIC_ROR_TIARG): Likewise.
	(INTRINSIC_TOPREC): Likewise.
	(INTRINSIC_TOPRECL): Likewise.
	(INTRINSIC_TAN): Update intrinsic module and signature.
	(INTRINSIC_ISNAN): Likewise.
	(INTRINSIC_ISFINITE): Likewise.
	(INTRINSIC_COPYSIGN): Define intrinsic.
	(INTRINSIC_COPYSIGNI): Define intrinsic.
	(INTRINSIC_EXP): Update intrinsic module.
	(INTRINSIC_EXPM1): Likewise.
	(INTRINSIC_EXP2): Likewise.
	(INTRINSIC_LOG): Likewise.
	(INTRINSIC_LOG2): Likewise.
	(INTRINSIC_LOG10): Likewise.
	(INTRINSIC_POW): Likewise.
	(INTRINSIC_ROUND): Likewise.
	(INTRINSIC_FLOORF): Likewise.
	(INTRINSIC_FLOOR): Likewise.
	(INTRINSIC_FLOORL): Likewise.
	(INTRINSIC_CEILF): Likewise.
	(INTRINSIC_CEIL): Likewise.
	(INTRINSIC_CEILL): Likewise.
	(INTRINSIC_TRUNC): Likewise.
	(INTRINSIC_FMIN): Likewise.
	(INTRINSIC_FMAX): Likewise.
	(INTRINSIC_FMA): Likewise.
	(INTRINSIC_VA_ARG): Update intrinsic signature.
	(INTRINSIC_VASTART): Likewise.
	* lang.opt (fcheck=): Add alternate aliases for contract switches.
	(fcheckaction=): New option.
	(check_action): New Enum and EnumValue entries.
	(fdump-c++-spec-verbose): New option.
	(fdump-c++-spec=): New option.
	(fextern-std=): New option.
	(extern_stdcpp): New Enum and EnumValue entries
	(fpreview=): New options.
	(frevert=): New options.
	(fsave-mixins): New option.
	(ftransition=): Update options.
	* modules.cc (get_internal_fn): Replace Prot with Visibility.
	(build_internal_fn): Likewise.
	(build_dso_cdtor_fn): Likewise.
	(build_module_tree): Remove check for __entrypoint module.
	* runtime.def (P5): Define.
	(ARRAYBOUNDS_SLICEP): Define.
	(ARRAYBOUNDS_INDEXP): Define.
	(NEWTHROW): Define.
	(ADCMP2): Remove.
	(ARRAYCAST): Remove.
	(SWITCH_STRING): Remove.
	(SWITCH_USTRING): Remove.
	(SWITCH_DSTRING): Remove.
	(SWITCH_ERROR): Remove.
	* toir.cc (IRVisitor::visit): Update for new front-end interface.
	(IRVisitor::check_previous_goto): Remove checks for case and default
	statements.
	(IRVisitor::visit(SwitchStatement *)): Remove handling of string
	switch conditions.
	* typeinfo.cc: Include d-frontend.h.
	(get_typeinfo_kind): Update for new front-end interface.
	(make_frontend_typeinfo): Likewise.
	(TypeInfoVisitor::visit): Likewise.
	(builtin_typeinfo_p): Likewise.
	(get_typeinfo_decl): Likewise.
	(build_typeinfo): Likewise.
	* types.cc (valist_array_p): Likewise.
	(make_array_type): Likewise.
	(merge_aggregate_types): Likewise.
	(TypeVisitor::visit(TypeBasic *)): Likewise.
	(TypeVisitor::visit(TypeFunction *)): Likewise.
	(TypeVisitor::visit(TypeStruct *)): Update comment.
	* verstr.h: Removed.
	* d-frontend.h: New file.

gcc/po/ChangeLog:

	* EXCLUDES: Remove d/dmd sources from list.

gcc/testsuite/ChangeLog:

	* gdc.dg/Wcastresult2.d: Update test.
	* gdc.dg/asm1.d: Likewise.
	* gdc.dg/asm2.d: Likewise.
	* gdc.dg/asm3.d: Likewise.
	* gdc.dg/gdc282.d: Likewise.
	* gdc.dg/imports/gdc170.d: Likewise.
	* gdc.dg/intrinsics.d: Likewise.
	* gdc.dg/pr101672.d: Likewise.
	* gdc.dg/pr90650a.d: Likewise.
	* gdc.dg/pr90650b.d: Likewise.
	* gdc.dg/pr94777a.d: Likewise.
	* gdc.dg/pr95250.d: Likewise.
	* gdc.dg/pr96869.d: Likewise.
	* gdc.dg/pr98277.d: Likewise.
	* gdc.dg/pr98457.d: Likewise.
	* gdc.dg/simd1.d: Likewise.
	* gdc.dg/simd2a.d: Likewise.
	* gdc.dg/simd2b.d: Likewise.
	* gdc.dg/simd2c.d: Likewise.
	* gdc.dg/simd2d.d: Likewise.
	* gdc.dg/simd2e.d: Likewise.
	* gdc.dg/simd2f.d: Likewise.
	* gdc.dg/simd2g.d: Likewise.
	* gdc.dg/simd2h.d: Likewise.
	* gdc.dg/simd2i.d: Likewise.
	* gdc.dg/simd2j.d: Likewise.
	* gdc.dg/simd7951.d: Likewise.
	* gdc.dg/torture/gdc309.d: Likewise.
	* gdc.dg/torture/pr94424.d: Likewise.
	* gdc.dg/torture/pr94777b.d: Likewise.
	* lib/gdc-utils.exp (gdc-convert-args): Handle new compiler options.
	(gdc-convert-test): Handle CXXFLAGS, EXTRA_OBJC_SOURCES, and ARG_SETS
	test directives.
	(gdc-do-test): Only import modules in the test run directory.
	* gdc.dg/pr94777c.d: New test.
	* gdc.dg/pr96156b.d: New test.
	* gdc.dg/pr96157c.d: New test.
	* gdc.dg/simd_ctfe.d: New test.
	* gdc.dg/torture/simd17344.d: New test.
	* gdc.dg/torture/simd20052.d: New test.
	* gdc.dg/torture/simd6.d: New test.
	* gdc.dg/torture/simd7.d: New test.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime e6caaab9.
	* libdruntime/Makefile.am (D_EXTRA_FLAGS): Build libdruntime with
	-fpreview=dip1000, -fpreview=fieldwise, and -fpreview=dtorfields.
	(ALL_DRUNTIME_SOURCES): Add DRUNTIME_DSOURCES_STDCXX.
	(DRUNTIME_DSOURCES): Update list of C binding modules.
	(DRUNTIME_DSOURCES_STDCXX): Likewise.
	(DRUNTIME_DSOURCES_LINUX): Likewise.
	(DRUNTIME_DSOURCES_OPENBSD): Likewise.
	(DRUNTIME_DISOURCES): Remove __entrypoint.di.
	* libdruntime/Makefile.in: Regenerated.
	* libdruntime/__entrypoint.di: Removed.
	* libdruntime/gcc/deh.d (_d_isbaseof): Update signature.
	(_d_createTrace): Likewise.
	(__gdc_begin_catch): Remove reference to the exception.
	(_d_throw): Increment reference count of thrown object before unwind.
	(__gdc_personality): Chain exceptions with  Throwable.chainTogether.
	* libdruntime/gcc/emutls.d: Update imports.
	* libdruntime/gcc/sections/elf.d: Update imports.
	(DSO.moduleGroup): Update signature.
	* libdruntime/gcc/sections/macho.d: Update imports.
	(DSO.moduleGroup): Update signature.
	* libdruntime/gcc/sections/pecoff.d: Update imports.
	(DSO.moduleGroup): Update signature.
	* src/MERGE: Merge upstream phobos 5ab9ad256.
	* src/Makefile.am (D_EXTRA_DFLAGS): Add -fpreview=dip1000 and
	-fpreview=dtorfields flags.
	(PHOBOS_DSOURCES): Update list of std modules.
	* src/Makefile.in: Regenerate.
	* testsuite/lib/libphobos.exp (libphobos-dg-test): Handle assembly
	compile types.
	(dg-test): Override.
	(additional_prunes): Define.
	(libphobos-dg-prune): Filter any additional_prunes set by tests.
	* testsuite/libphobos.aa/test_aa.d: Update test.
	* testsuite/libphobos.druntime/druntime.exp (version_flags): Add
	-fversion=CoreUnittest.
	* testsuite/libphobos.druntime_shared/druntime_shared.exp
	(version_flags): Add -fversion=CoreUnittest -fversion=Shared.
	* testsuite/libphobos.exceptions/unknown_gc.d: Update test.
	* testsuite/libphobos.hash/test_hash.d: Update test.
	* testsuite/libphobos.phobos/phobos.exp (version_flags): Add
	-fversion=StdUnittest
	* testsuite/libphobos.phobos_shared/phobos_shared.exp (version_flags):
	Likewise.
	* testsuite/libphobos.shared/host.c: Update test.
	* testsuite/libphobos.shared/load.d: Update test.
	* testsuite/libphobos.shared/load_13414.d: Update test.
	* testsuite/libphobos.thread/fiber_guard_page.d: Update test.
	* testsuite/libphobos.thread/tlsgc_sections.d: Update test.
	* testsuite/testsuite_flags.in: Add -fpreview=dip1000 to --gdcflags.
	* testsuite/libphobos.shared/link_mod_collision.d: Removed.
	* testsuite/libphobos.shared/load_mod_collision.d: Removed.
	* testsuite/libphobos.betterc/betterc.exp: New test.
	* testsuite/libphobos.config/config.exp: New test.
	* testsuite/libphobos.gc/gc.exp: New test.
	* testsuite/libphobos.imports/imports.exp: New test.
	* testsuite/libphobos.lifetime/lifetime.exp: New test.
	* testsuite/libphobos.unittest/unittest.exp: New test.
2021-11-30 16:53:28 +01:00
Iain Buclaw
b7b413152e libphobos: Fix static asserts on NetBSD, FreeBSD, DragonFlyBSD
The function declarations were updated to use `const scope', but the
static asserts were not.

Reviewed-on: https://github.com/dlang/druntime/pull/3470

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 98c6ff0c.
2021-05-13 19:24:31 +02:00
Iain Buclaw
e19c638996 libphobos: Merge upstream druntime 89f870b7, phobos e6907ff3e
Phobos changes:

 - Synchronize C bindings with the latest port fixes in upstream
   druntime.

 - Add Config.stderrPassThrough to std.process (PR98494).

Reviewed-on: https://github.com/dlang/druntime/pull/3448
	     https://github.com/dlang/phobos/pull/7984

libphobos/ChangeLog:

	PR d/98494
	* libdruntime/MERGE: Merge upstream druntime 89f870b7.
	* src/MERGE: Merge upstream phobos e6907ff3e.
2021-04-19 19:27:41 +02:00
Iain Buclaw
5a0aa603b2 d: Merge upstream dmd 3b808e838, druntime 483bc129, phobos f89dc217a
D front-end changes:

 - Explicit package visibility attribute is now always applied to
   introducing scopes.

 - Added `__traits(totype, string)' to convert mangled type string to an
   existing type.

 - Printf-like and scanf-like functions are now detected by prefixing
   them with `pragma(printf)' for printf-like functions or
   `pragma(scanf)' for scanf-like functions.

 - Added `__c_wchar_t', `__c_complex_float', `__c_complex_double', and
   `__c_complex_real' types for interfacing with C and C++.

 - Template alias parameters can now be instantiated with basic types,
   such as `int` or `void function()`.

 - Mixins can now be used as types in the form `mixin(string) var'.

 - Mixin expressions can take an argument list, same as `pragma(msg)'.

 - Implement DIP1034, add `typeof(*null)' types to represent `noreturn'.

 - `pragma(msg)' can print expressions of type `void'.

 - It is now an error to use private variables selectively imported from
   other modules.  Due to a bug, some imported private members were
   visible from other modules, violating the specification.

 - Added new syntax to declare an alias to a function type using the
   `alias' syntax based on the assignment operator.

 - Function literals can now return a value by reference.

Phobos changes:

 - Synchronize C bindings with the latest port fixes in upstream druntime.

 - Added alias for a `noreturn' type in object.d

 - Make use of the new `pragma(printf)' and `pragma(scanf)' pragmas, fix
   all code that got flagged as being incorrect.

 - Fixed code that relied on bugs in the D import package system.

Reviewed-on: https://github.com/dlang/dmd/pull/12339
	     https://github.com/dlang/druntime/pull/3422
	     https://github.com/dlang/phobos/pull/7932

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 3b808e838.
	* Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o.
	* d-codegen.cc (build_struct_literal): Handle special enums.
	* d-convert.cc (convert_expr): Handle noreturn type.
	(convert_for_condition): Likewise.
	* d-target.cc (Target::_init): Set type for wchar_t.
	(TargetCPP::derivedClassOffset): New method.
	(Target::libraryObjectMonitors): New method.
	* decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of
	type noreturn.
	* toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning
	noreturn types.
	* types.cc (TypeVisitor::visit (TypeNoreturn *)): New method.
	(TypeVisitor::visit (TypeEnum *)): Handle special enums.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 483bc129.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
	core/sys/darwin/fcntl.d.
	(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/unistd.d.
	(DRUNTIME_DSOURCES_WINDOWS): Add core/sys/windows/stdc/malloc.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos f89dc217a.
	* src/Makefile.am (PHOBOS_DSOURCES): Add std/regex/internal/tests2.d.
	* src/Makefile.in: Regenerate.
	* testsuite/libphobos.exceptions/chain.d: Fix format arguments.
	* testsuite/libphobos.exceptions/line_trace.d: Likewise.
2021-04-04 01:26:20 +02:00
Iain Buclaw
c1d56e6a73 d: Merge upstream dmd 46133f761, druntime 0fd4364c
D front-end changes:

 - Backported built-in function handling from upstream.

 - Added new intrinsic `byteswap(ushort)`.

Druntime changes:

 - Update intrinsic modules core.bitop, core.checkedint, core.simd,
   core.vararg, and core.volatile.

 - Backport platform-specific fixes for runtime modules core.cpuid,
   core.internal.traits, and rt.lifetime.

 - Backport openbsd fixes for core.stdc.stdio.

 - Backport solaris fixes for core.sys.posix.locale, and
   core.thread.osthread (PR98910).

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 46133f761.
	* d-builtins.cc (d_build_builtins_module): Set builtins as BUILTINgcc.
	(maybe_set_builtin_1): Likewise.
	* d-frontend.cc (eval_builtin): Adjust condition for early return.
	* intrinsics.cc (maybe_set_intrinsic): Set intrinsics as BUILTINgcc.
	(maybe_expand_intrinsic): Add case for INTRINSIC_BSWAP16.
	* intrinsics.def (INTRINSIC_BT): Update signature.
	(INTRINSIC_BT64): Likewise.
	(INTRINSIC_BSWAP16): New intrinsic.
	(INTRINSIC_VLOAD8): Update module.
	(INTRINSIC_VLOAD16): Likewise.
	(INTRINSIC_VLOAD32): Likewise.
	(INTRINSIC_VLOAD64): Likewise.
	(INTRINSIC_VSTORE8): Likewise.
	(INTRINSIC_VSTORE16): Likewise.
	(INTRINSIC_VSTORE32): Likewise.
	(INTRINSIC_VSTORE64): Likewise.
	(INTRINSIC_ADDS): Update signature.
	(INTRINSIC_ADDSL): Likewise.
	(INTRINSIC_ADDU): Likewise.
	(INTRINSIC_ADDUL): Likewise.
	(INTRINSIC_SUBS): Likewise.
	(INTRINSIC_SUBSL): Likewise.
	(INTRINSIC_SUBU): Likewise.
	(INTRINSIC_SUBUL): Likewise.
	(INTRINSIC_MULS): Likewise.
	(INTRINSIC_MULSL): Likewise.
	(INTRINSIC_MULU): Likewise.
	(INTRINSIC_MULUI): Likewise.
	(INTRINSIC_MULUL): Likewise.
	(INTRINSIC_NEGS): Likewise.
	(INTRINSIC_NEGSL): Likewise.

libphobos/ChangeLog:

	PR d/98910
	* libdruntime/MERGE: Merge upstream druntime 0fd4364c.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add core/volatile.d.
	* libdruntime/Makefile.in: Regenerate.
	* testsuite/libphobos.allocations/tls_gc_integration.d: Update test.

gcc/testsuite/ChangeLog:

	* gdc.dg/intrinsics.d: Update test.
2021-02-04 23:04:48 +01:00
Iain Buclaw
b1a207c6df libphobos: Merge upstream druntime 9d0c8364, phobos 9d575282e.
Druntime changes:

 - Add platform-specific bindings for stdlib.h and sys/syctl.h.

 - Add darwin bindings for mach/dyld.h.

 - Fix solaris bindings for locale.h (PR98910).

 - Remove deprecated bindings from the module headers.

Phobos changes:

 - Backport platform-specific fixes for std.conv, std.datetime,
   std.exception, std.experimental.allocator, std.file, std.math,
   std.parallelism, std.socket, std.stdio, and std.system.

Reviewed-on: https://github.com/dlang/druntime/pull/3363
	     https://github.com/dlang/phobos/pull/7784

libphobos/ChangeLog:

	PR d/98910
	* libdruntime/MERGE: Merge upstream druntime 9d0c8364.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add
	  core/internal/attributes.d
	(DRUNTIME_DSOURCES_BIONIC): Add core/sys/bionic/stdlib.d.
	(DRUNTIME_DSOURCES_DARWIN): Add core/sys/darwin/stdlib.d, and
	core/sys/darwin/sys/sysctl.d.
	(DRUNTIME_DSOURCES_DRAGONFLYBSD): Add
	core/sys/dragonflybsd/stdlib.d, and
	core/sys/dragonflybsd/sys/sysctl.d.
	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/stdlib.d, and
	core/sys/freebsd/sys/sysctl.d.
	(DRUNTIME_DSOURCES_NETBSD): Add core/sys/netbsd/stdlib.d, and
	core/sys/netbsd/sys/sysctl.d.
	(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/stdlib.d, and
	core/sys/openbsd/sys/sysctl.d.
	(DRUNTIME_DSOURCES_SOLARIS): Add core/sys/solaris/stdlib.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 9d575282e.
2021-02-03 22:06:42 +01:00
Iain Buclaw
92dd3e71f9 libphobos: Synchronize libdruntime bindings with upstream druntime
Reviewed-on: https://github.com/dlang/druntime/pull/3348

gcc/d/ChangeLog:

	* typeinfo.cc (TypeInfoVisitor::visit (TypeInfoDeclaration *)): Don't
	layout m_arg1 and m_arg2 fields.

libphobos/ChangeLog:

	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* libdruntime/MERGE: Merge upstream druntime e4aae28e.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Refresh module list.
	(DRUNTIME_DSOURCES_BIONIC): Add core/sys/bionic/err.d.
	(DRUNTIME_DSOURCES_DARWIN): Add core/sys/darwin/err.d,
	core/sys/darwin/ifaddrs.d, core/sys/darwin/mach/nlist.d,
	core/sys/darwin/mach/stab.d, and core/sys/darwin/sys/attr.d.
	(DRUNTIME_DSOURCES_DRAGONFLYBSD): Add core/sys/dragonflybsd/err.d.
	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/err.d.
	(DRUNTIME_DSOURCES_LINUX): Add core/sys/linux/err.d.
	(DRUNTIME_DSOURCES_NETBSD): Add core/sys/netbsd/err.d.
	(DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/err.d.
	(DRUNTIME_DSOURCES_POSIX): Add core/sys/posix/locale.d,
	core/sys/posix/stdc/time.d, core/sys/posix/string.d, and
	core/sys/posix/strings.d.
	(DRUNTIME_DSOURCES_SOLARIS): Add core/sys/solaris/err.d.
	(DRUNTIME_DSOURCES_WINDOWS): Add core/sys/windows/sdkddkver.d,
	and core/sys/windows/stdc/time.d
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/gcc/sections/elf_shared.d (sizeofTLS): New function.
	* testsuite/libphobos.thread/fiber_guard_page.d: Use
	__traits(getMember) to get internal fields.
2021-01-30 16:50:57 +01:00
Iain Buclaw
5dbab7b3f4 libphobos: Fix segfault at run-time when using custom Fibers (PR 98025)
When libphobos is configured with --enable-cet, this adds extra fields
to the Fiber class to support the ucontext_t fallback implementation.
These fields get omitted when compiling user code unless they also used
`-fversion=CET' to build their project, which resulted in data being
overwritten from within swapcontext().

On reviewing the ucontext_t definitions, it was found that the shadow
stack fields were missing, and the struct size didn't match up on X32.
This has been fixed in upstream druntime and merged down here.

Reviewed-on: https://github.com/dlang/druntime/pull/3293

libphobos/ChangeLog:

	PR d/98025
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac (DCFG_ENABLE_CET): Substitute.
	* libdruntime/MERGE: Merge upstream druntime 0fe7974c.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/core/thread.d: Import gcc.config.
	(class Fiber): Add ucontext_t fields when GNU_Enable_CET is true.
	* libdruntime/gcc/config.d.in (GNU_Enable_CET): Define.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2020-11-27 21:27:14 +01:00
Iain Buclaw
f886c4a795 libphobos: Merge upstream druntime d37ef985.
Adds support for FreeBSD/x86 53-bit precision reals, updates bindings
for FreeBSD 12.x, and removes all support code and tests for the
extern(Pascal) calling convention.

Reviewed-on: https://github.com/dlang/druntime/pull/3286
	     https://github.com/dlang/druntime/pull/3287

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime d37ef985.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_FREEBSD): Add
	core/sys/freebsd/config.d
	* libdruntime/Makefile.in: Regenerate.
2020-11-27 21:27:13 +01:00
Iain Buclaw
05b6520ed2 d: Merge upstream dmd 934df6f8c, druntime 7bdd83d7
Corrects a previous change made to the SPARC stdc bindings, and
backports PPC-related fixes.  The library and language testsuite now
passes fully on powerpc64le-linux-gnu.

Fixes: PR d/90719
Fixes: PR d/94825

Reviewed-on: https://github.com/dlang/dmd/pull/11079
	     https://github.com/dlang/druntime/pull/3078
	     https://github.com/dlang/druntime/pull/3083

libphobos/ChangeLog:

	PR d/94825
	* libdruntime/Makefile.am (DRUNTIME_SOURCES_CONFIGURED): Remove
	config/powerpc/switchcontext.S
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/config/powerpc/callwithstack.S: Remove.
	* libdruntime/config/powerpc/switchcontext.S: Fix symbol name of
	fiber_switchContext.
	* libdruntime/core/thread.d: Disable fiber migration tests on PPC.
	* testsuite/libphobos.thread/fiber_guard_page.d: Set guardPageSize
	same as stackSize.
2020-04-30 12:16:11 +02:00
Iain Buclaw
6dffa67b46 libphobos: Backport extern(C) bindings from druntime 2.091
Merge upstream druntime 47688279.

Reviewed-on: https://github.com/dlang/druntime/pull/3073

Fixes: PR d/90718
Fixes: PR d/90719

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_LINUX): Remove
	core/sys/linux/sys/netinet/tcp.d.
	* libdruntime/Makefile.in: Regenerate.
2020-04-27 23:33:18 +02:00
Stefan Liebler
434fe1a409 S/390: Fix layout of struct sigaction_t
The ordering of some fields in  struct sigaction on s390x (64bit)
differs compared to s390 and other architectures.
This patch adjusts this order according to the definition of
<glibc-src>/sysdeps/unix/sysv/linux/s390/bits/sigaction.h

Without this fix e.g. the call
sigaction( suspendSignalNumber, &sigusr1, null ) in thread.d
leads to setting the sa_restorer field to 0xffffffffffffffff.
In case a signal, the signal handler returns to this address
and the process stops with a SIGILL.

This was observable in several execution testcases on s390x:
libphobos.druntime/core/thread.d
libphobos.druntime_shared/core/thread.d
libphobos.thread/tlsgc_sections.d
libphobos.allocations/tls_gc_integration.d
libphobos.phobos/std/parallelism.d
libphobos.phobos_shared/std/parallelism.d
libphobos.shared/host.c
libphobos.shared/linkD.c
libphobos.shared/linkDR.c
libphobos.shared/link_linkdep.d
libphobos.shared/load.d
libphobos.shared/loadDR.c
libphobos.shared/load_linkdep.d
libphobos.shared/load_loaddep.d

libphobos/ChangeLog:

2020-04-07  Stefan Liebler  <stli@linux.ibm.com>

	* libdruntime/core/sys/posix/signal.d:
	Add struct sigaction_t for SystemZ.
2020-04-07 16:15:28 +02:00
Iain Buclaw
6e5084b440 libphobos: Merge upstream druntime 7915b6a3
Includes port fixes for Musl on ARM, AArch64, and SystemZ targets.

Reviewed-on: https://github.com/dlang/druntime/pull/2751
             https://github.com/dlang/druntime/pull/2843
             https://github.com/dlang/druntime/pull/2844
             https://github.com/dlang/druntime/pull/2898
2020-03-14 19:30:54 +01:00
Iain Buclaw
1e78c638a7 libphobos: Merge upstream druntime 5bb8ce19
Synchronizes extern(C) bindings with latest release.

Reviewed-on: https://github.com/dlang/druntime/pull/2741

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_BIONIC): Add
	core/sys/bionic/string.d.
	(DRUNTIME_DSOURCES_DARWIN): Add core/sys/darwin/string.d.
	(DRUNTIME_DSOURCES_DRAGONFLYBSD): Add core/sys/dragonflybsd/string.d,
	core/sys/dragonflybsd/sys/socket.d.
	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/string.d.
	(DRUNTIME_DSOURCES_LINUX): Add core/sys/linux/string.d.
	(DRUNTIME_DSOURCES_NETBSD): Add core/sys/netbsd/string.d,
	core/sys/netbsd/sys/featuretest.d.
	* libdruntime/Makefile.in: Regenerate.

From-SVN: r274773
2019-08-21 07:54:34 +00:00
Iain Buclaw
0234a9176c libphobos: Merge upstream druntime 94686651
Adds extern(C) bindings for version OpenBSD.

Reviewed-on: https://github.com/dlang/druntime/pull/2748

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_OPENBSD): Add
	core/sys/openbsd/sys/cdefs.d, core/sys/openbsd/sys/elf.d,
	core/sys/openbsd/sys/elf32.d, core/sys/openbsd/sys/elf64.d,
	core/sys/openbsd/sys/elf_common.d, core/sys/openbsd/sys/link_elf.d,
	core/sys/openbsd/sys/mman.d, core/sys/openbsd/time.d.
	* libdruntime/Makefile.in: Regenerate.

From-SVN: r274772
2019-08-21 07:54:19 +00:00
Iain Buclaw
ca0ddb398f libphobos: Fix multilib builds for s390x-linux-gnu
Merges upstream druntime aab44549, phobos 3dc363783.

Reviewed-on: https://github.com/dlang/druntime/pull/2590
	     https://github.com/dlang/phobos/pull/6983

libphobos/ChangeLog:

2019-04-28  Iain Buclaw  <ibuclaw@gdcproject.org>

	* libdruntime/gcc/sections/elf_shared.d (IBMZ_Any): Define when
	version S390 or SystemZ.  Use condition instead of SystemZ.
	(getTLSRange): Return null on GNU_EMUTLS targets.

From-SVN: r270639
2019-04-29 05:42:48 +00:00
Iain Buclaw
9e1558d322 libphobos: Fix assert in core.sys.posix.sys.stat for aarch64/ilp32.
Merges upstream druntime 51365217.

Reviewed-on: https://github.com/dlang/druntime/pull/2579

From-SVN: r270541
2019-04-24 11:04:22 +00:00
Iain Buclaw
eb5f748a81 libphobos: Merge upstream druntime 109f0f2e
Backports more extern(C) bindings and platform ports.

Reviewed-on: https://github.com/dlang/druntime/pull/2569

From-SVN: r270490
2019-04-22 13:46:13 +00:00
Iain Buclaw
7262646b3b Backport PRs 90059, 90060, 90062
PR d/90059
	PR d/90060
	PR d/90062
libphobos: Merge upstream druntime 70b9fea6

Backports fixes in the extern(C) bindings for the Solaris/SPARC port.

Initial patch by Rainer Orth.

Reviewed-on: https://github.com/dlang/druntime/pull/2555

From-SVN: r270372
2019-04-15 20:32:50 +00:00
Iain Buclaw
9607e404a5 libphobos: Merge upstream druntime 175bf5fc
Backports extern(C) bindings committed to upstream druntime since the
last sync.

Reviewed-on: https://github.com/dlang/druntime/pull/2552

From-SVN: r270295
2019-04-11 21:11:03 +00:00
Iain Buclaw
0da83a168f libphobos: Backport extern(C) bindings from druntime 2.085.
Merges upstream druntime b9564bef.

Reviewed-on: https://github.com/dlang/druntime/pull/2512

libphobos/ChangeLog:

2019-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
	core/sys/darwin/crt_externs.d.
	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/unistd.d.
	(DRUNTIME_DSOURCES_POSIX): Add core/sys/posix/spawn.d.
	* libdruntime/Makefile.in: Regenerate.

From-SVN: r269948
2019-03-26 15:18:19 +00:00
Iain Buclaw
685ae5b871 libphobos: Merge phobos and druntime with upstream.
Commits merged from druntime.

    Fix struct tls_index definition on x32
    https://github.com/dlang/druntime/pull/2354

    Update SectionGroup signatures to match on all targets
    https://github.com/dlang/druntime/pull/2401

    Fix issue 19128 - argument to alloca may be too large
    https://github.com/dlang/druntime/pull/2409

    Define some common filesystem limits in core.stdc.limits
    https://github.com/dlang/druntime/pull/2460

    Use version Darwin instead of OSX in core.sys.posix.aio
    https://github.com/dlang/druntime/pull/2470

Commits merged from phobos.

    Don't run HardFloat tests on SoftFloat systems
    https://github.com/dlang/phobos/pull/5358

    Remove reliance on stdin, stdout, stderr being aliasable
    https://github.com/dlang/phobos/pull/5718

    Solaris: add import clock_gettime to currStdTime
    https://github.com/dlang/phobos/pull/5807

    Don't print debug messages when building unittests
    https://github.com/dlang/phobos/pull/6827

    Add HPPA support to phobos
    Fixes https://gcc.gnu.org/PR89054
    https://github.com/dlang/phobos/pull/6836

From-SVN: r268293
2019-01-26 13:41:26 +00:00
Iain Buclaw
50deb97073 libphobos: Add platform bindings for hppa-linux-gnu.
Backported from upstream druntime 2.084

Reviewed-on: https://github.com/dlang/druntime/pull/2402

From-SVN: r268055
2019-01-18 00:48:51 +00:00
Iain Buclaw
5996efcd99 libphobos: Add OSX bindings for core.sys.posix.aio
Backported from upstream druntime 2.084

Reviewed-on: https://github.com/dlang/druntime/pull/2342

From-SVN: r268050
2019-01-18 00:05:51 +00:00
Jakub Jelinek
831a2e2f86 Remove svn:executable property from a couple of text files
which shouldn't be executable.

From-SVN: r267873
2019-01-12 01:20:04 +01:00
Iain Buclaw
3b26756ba2 libphobos: Merge common version blocks for core.sys.posix.sys.msg.
This is a continuation of simplifying C bindings so there aren't dozens
of duplicated code for each architecture.  For this particular module,
it now more closely resembles how glibc arranges msq.h, fixing a couple
of targets in the process, notably X32.

Backport from upstream druntime 2.084.

Reviewed-on: https://github.com/dlang/druntime/pull/2362

From-SVN: r267192
2018-12-16 23:18:25 +00:00
Iain Buclaw
899b398116 libphobos: Add druntime bindings for SPARC/Solaris
Backported from upstream druntime master.

Initial patch by Rainer Orth.

Reviewed-on: https://github.com/dlang/druntime/pull/2344

From-SVN: r266935
2018-12-09 23:46:45 +00:00
Iain Buclaw
5a5129a0df libphobos: Add support for RISCV to glibc bindings
Backported from upstream druntime master.

Reviewed-on: https://github.com/dlang/druntime/pull/2355

From-SVN: r266713
2018-12-01 21:48:43 +00:00