Commit Graph

198 Commits

Author SHA1 Message Date
GCC Administrator f16f65f836 Daily bump. 2021-06-12 00:16:27 +00:00
Iain Buclaw 68f46862d3 d: foreach over a tuple doesn't work on 16-bit targets (PR100999)
Improves semantic passes in the front-end around the `foreach' and
`static foreach' statements to be more resilient to compiling in a
minimal D runtime environment.  Checking of the index type has been
improved as well so now there won't be needless compiler errors when
using 8 or 16-bit integers as index types when the size fits the
expected loop range.

gcc/d/ChangeLog:

	PR d/100999
	* dmd/MERGE: Merge upstream dmd 7a3808254.

libphobos/ChangeLog:

	PR d/100999
	* src/MERGE: Merge upstream phobos 55bb17543.
2021-06-11 19:42:13 +02:00
GCC Administrator 87a7d10c2e Daily bump. 2021-05-15 00:16:27 +00:00
Bernd Edlinger cb787efa45 Cleanup temp files in libphobos unittest at src/std/process.d
2021-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* src/std/process.d (unittest): Remove tmpname on exit.
	* src/MERGE: Merge upstream phobos 63f4caa90.
2021-05-14 14:21:36 +02:00
GCC Administrator f9af11c7f1 Daily bump. 2021-05-14 00:16:30 +00: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
GCC Administrator aa891c56f2 Daily bump. 2021-05-11 00:16:36 +00:00
Iain Buclaw 1f58114db8 libphobos: Fix visibility of std.process.searchPathFor
This symbol is used by std.file.thisExePath on OpenBSD.

Reviewed-on: https://github.com/dlang/phobos/pull/8041

libphobos/ChangeLog:

	* src/MERGE: Merge upstream phobos 32cfe9b61.
2021-05-10 12:14:48 +02:00
GCC Administrator c1ef0c9234 Daily bump. 2021-04-22 00:16:32 +00:00
Iain Buclaw ea7b1cf534 libphobos: Fix build fails for powerpc-linux
As register names are required for darwin, but not accepted by gas
unless you use `-mregnames', they have been conditionally removed on
non-darwin targets.

To avoid duplicating large blocks of almost identical code, the inline
assembly is now statically generated.

libphobos/ChangeLog:

	* libdruntime/core/thread/osthread.d (callWithStackShell): Statically
	generate PPC and PPC64 asm implementations, and conditionally remove
	PPC register names on non-Darwin targets.
2021-04-21 02:27:49 +02:00
GCC Administrator be8aad8d73 Daily bump. 2021-04-21 00:16:23 +00:00
Iain Buclaw 30b11d8d1b libphobos: Fix SIGBUS in read_encoded_value_with_base on sparc-sun-solaris (PR98584)
Instead of unsafe pointer dereferencing, use memcpy() to read encoded
values from memory.  The function `read_encoded_value' has been updated
to accept a ref parameter, this simplifies handling of the pointer to
memory needing to be read.

libphobos/ChangeLog:

	PR d/98584
	* libdruntime/gcc/deh.d (scanLSDA): Update calls to read_uleb128 and
	read_encoded_value.
	(actionTableLookup): Update calls to read_sleb128 and
	read_encoded_value_with_base.
	* libdruntime/gcc/unwind/pe.d (read_uleb128): Update signature.
	(read_sleb128): Update signature.
	(read_unaligned): New function.
	(read_encoded_value_with_base): Update signature.  Call read_unaligned
	instead of unsafe pointer dereferencing.
	(read_encoded_value): Update signature.
2021-04-20 02:28:12 +02:00
GCC Administrator 6e81e015d9 Daily bump. 2021-04-20 00:16:27 +00: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 6eae7549b8 libphobos: Add Thread/Fiber support code for Darwin (PR98058)
libphobos/ChangeLog:

	PR d/98058
	* configure: Regenerate.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
	core/sys/darwin/config.d
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/config/powerpc/switchcontext.S: Implement
	fiber_switchContext for __MACH__.
	* libdruntime/config/x86/switchcontext.S: Likewise.
	* libdruntime/core/sys/darwin/config.d: New file.
	* libdruntime/core/thread/fiber.d (Fiber.getThis): Mark noinline.
	(UnsafeFiberMigration): Define for OSX/X86 and OSX/X86_64.
	* libdruntime/core/thread/osthread.d (callWithStackShell): Add inline
	assembler implementation for X86, X86_64, PPC, and PPC64.
	* libdruntime/core/thread/threadbase.d (ThreadBase.getThis): Mark
	noinline.
	* libdruntime/gcc/deh.d (FuncTable): Remove definition.
	* m4/druntime/os.m4 (DRUNTIME_OS_MINFO_BRACKETING): Check for right
	bracket symbol on darwin* targets.
	* testsuite/libphobos.thread/fiber_guard_page.d: Update test to
	support ucontext-based Fibers.
2021-04-19 19:27:27 +02:00
Iain Buclaw b66e72b43e libphobos: Add D runtime support code for MinGW (PR99794)
libphobos/ChangeLog:

	PR d/99794
	* libdruntime/Makefile.am (DRUNTIME_SOURCES_CONFIGURED): Add
	config/mingw/msvc.c on DRUNTIME_OS_MINGW.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/config/mingw/msvc.c: New file.
	* libdruntime/config/mingw/switchcontext.S (fiber_switchContext): Fix
	function definition.
	* libdruntime/gcc/deh.d (__gdc_personality_seh0): Fix call to
	_GCC_specific_handler.
	* libdruntime/gcc/gthread.d (__gthread_once_t): Fix definition.
	* libdruntime/gcc/unwind/generic.d (_GCC_specific_handler): Fix
	declaration.
	* libdruntime/rt/dmain2.d (rt_loadLibrary): Remove function.
	(rt_loadLibraryW): Remove function.
	(initLibrary): Remove function.
	(rt_unloadLibrary): Remove function.
2021-04-19 19:27:13 +02:00
Iain Buclaw d86e60855f libphobos: Add section support code for OpenBSD (PR99691)
libphobos/ChangeLog:

	PR d/99691
	* configure: Regenerate.
	* libdruntime/config/common/threadasm.S: Add __OpenBSD__.
	* libdruntime/gcc/backtrace.d: Import core.sys.openbsd.dlfcn on
	OpenBSD platforms.
	* libdruntime/gcc/sections/elf.d (SharedElf): Define on OpenBSD.
	(linkMapForHandle): Implement for OpenBSD.
	(exeLinkMap): Remove.
	(getDependencies): Adjust dlpi_addr on OpenBSD.
	(handleForName): Implement for OpenBSD.
	(IterateManually): Define on OpenBSD.
	* libdruntime/gcc/sections/package.d (SectionsElf): Define on OpenBSD.
	* m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_ATOMIC): Test for
	enable_libatomic.
	(DRUNTIME_LIBRARIES_BACKTRACE): Test for enable_libbacktrace.
2021-04-19 19:26:43 +02:00
GCC Administrator 1d54b13841 Daily bump. 2021-04-11 00:16:24 +00:00
Iain Buclaw d118ec221d libphobos: Build runtime library with -ffunction-sections -fdata-sections
Tests for `-ffunction-sections -fdata-sections' and sets SECTION_FLAGS
accordingly.  If there is no warning when using it, take advantage of
the smaller executables that can be had with `--gc-sections'.

libphobos/ChangeLog:

	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Call DRUNTIME_SECTION_FLAGS.
	* libdruntime/Makefile.am: Add SECTION_FLAGS to AM_DFLAGS.
	* libdruntime/Makefile.in: Regenerate.
	* m4/druntime.m4 (DRUNTIME_SECTION_FLAGS): New macro.
	* src/Makefile.am: Add SECTION_FLAGS to AM_DFLAGS.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2021-04-10 15:02:07 +02:00
Iain Buclaw 32703b80f6 libphobos: Add section support code for MACHO and PE/COFF
This replaces the original and untested support for Windows and OSX, and
is the 90% of the work needed to support libphobos on those targets.

The core.thread interface has been updated to accomodate for the same
function might be implemented by any of the platform-dependent modules.

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Removed
	gcc/sections/android.d, elf_shared.d, osx.d, win32.d, and win64.d.
	Added gcc/sections/common.d, elf.d macho.d, and pecoff.d.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/core/thread/osthread.d: Update externDFunc FQDN names to
	use platform independant section function names.
	* libdruntime/gcc/sections/elf_shared.d: Renamed to...
	* libdruntime/gcc/sections/elf.d: ...this.  Mangle functions for
	core.thread interface as if they come from the gcc.sections module.
	* libdruntime/gcc/sections/package.d: Update public imports, declare
	functions for core.thread interface.
	* libdruntime/gcc/sections/android.d: Removed.
	* libdruntime/gcc/sections/osx.d: Removed.
	* libdruntime/gcc/sections/win32.d: Removed.
	* libdruntime/gcc/sections/win64.d: Removed.
	* libdruntime/gcc/sections/common.d: New file.
	* libdruntime/gcc/sections/macho.d: New file.
	* libdruntime/gcc/sections/pecoff.d: New file.
2021-04-10 15:02:07 +02:00
Iain Buclaw 385ee099ee libphobos: Explicitly use -static-libphobos in druntime and phobos tests
Linking to libphobos statically is the default in the driver, however
this may change in future.  Be explicit that the static libphobos is
what's being tested.

libphobos/ChangeLog:

	* testsuite/libphobos.druntime/druntime.exp: Compile all tests with
	-static-libphobos.
	* testsuite/libphobos.phobos/phobos.exp: Likewise.
2021-04-10 15:02:06 +02:00
Iain Buclaw 2b77874831 libphobos: Remove is-effective-target static from druntime and phobos tests
This test isn't compiling with `-static', it's there to verify that the
libphobos is functional when linked in statically.

libphobos/ChangeLog:

	* testsuite/libphobos.druntime/druntime.exp: Remove
	is-effective-target static.
	* testsuite/libphobos.phobos/phobos.exp: Likewise.
2021-04-10 15:02:06 +02:00
Iain Buclaw 38258326dc libphobos: Re-add -fno-moduleinfo flag to dg-runtest [PR99812]
libphobos/ChangeLog:

	PR d/99812
	* testsuite/libphobos.druntime_shared/druntime_shared.exp: Re-add
	-fno-moduleinfo flag to dg-runtest.
	* testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise.
2021-04-10 15:02:06 +02:00
GCC Administrator 019a922063 Daily bump. 2021-04-09 00:16:56 +00:00
Iain Buclaw 8e84a14291 d: Update language attribute support, and implement gcc.attributes
D attribute support has been updated to have a baseline parity with the
LLVM D compiler's own `ldc.attributes'.

The handler that extracts GCC attributes from a list of UDAs has been
improved to take care of some mistakes that could have been warnings.
UDAs attached to field variables are also now processed for any GCC
attributes attached to them.

The following new attributes have been added to the D front-end:

 - @attribute("alloc_size")
 - @attribute("used")
 - @attribute("optimize")
 - @attribute("restrict")
 - @attribute("cold")
 - @attribute("noplt")
 - @attribute("target_clones")
 - @attribute("no_icf")
 - @attribute("noipa")
 - @attribute("symver")

With convenience aliases in a new `gcc.attributes' module to match
the same naming convention as `ldc.attributes':

 - @allocSize()
 - @assumeUsed
 - @fastmath
 - @naked
 - @restrict
 - @cold
 - @noplt
 - @optStrategy()
 - @polly
 - @section()
 - @target()
 - @weak

The old gcc.attribute module has been deprecated, along with the removal
of the following attribute handlers:

 - @attribute("alias"): Has been superseded by `pragma(mangle)'.
 - @attribute("forceinline"): Renamed to always_inline.

gcc/d/ChangeLog:

	* d-attribs.cc: Include fold-const.h and opts.h.
	(attr_noreturn_exclusions): Add alloc_size.
	(attr_const_pure_exclusions): Likewise.
	(attr_inline_exclusions): Add target_clones.
	(attr_noinline_exclusions): Rename forceinline to always_inline.
	(attr_target_exclusions): New array.
	(attr_target_clones_exclusions): New array.
	(attr_alloc_exclusions): New array.
	(attr_cold_hot_exclusions): New array.
	(d_langhook_common_attribute_table): Add new D attribute handlers.
	(build_attributes): Update to look for gcc.attributes.  Issue warning
	if not given a struct literal.  Handle void initialized arguments.
	(handle_always_inline_attribute): Remove function.
	(d_handle_noinline_attribute): Don't extract TYPE_LANG_FRONTEND.
	(d_handle_forceinline_attribute): Rename to...
	(d_handle_always_inline_attribute): ...this.  Remove special handling.
	(d_handle_flatten_attribute): Don't extract TYPE_LANG_FRONTEND.
	(d_handle_target_attribute): Likewise.  Warn about empty arguments.
	(d_handle_target_clones_attribute): New function.
	(optimize_args): New static variable.
	(parse_optimize_options): New function.
	(d_handle_optimize_attribute): New function.
	(d_handle_noclone_attribute): Don't extract TYPE_LANG_FRONTEND.
	(d_handle_alias_attribute): Remove function.
	(d_handle_noicf_attribute): New function.
	(d_handle_noipa_attribute): New function.
	(d_handle_section_attribute): Call the handle_generic_attribute target
	hook after performing target independent processing.
	(d_handle_symver_attribute): New function.
	(d_handle_noplt_attribute): New function.
	(positional_argument): New function.
	(d_handle_alloc_size_attribute): New function.
	(d_handle_cold_attribute): New function.
	(d_handle_restrict_attribute): New function.
	(d_handle_used_attribute): New function.
	* decl.cc (gcc_attribute_p): Update to look for gcc.attributes.
	(get_symbol_decl): Update decl source location of old prototypes to
	the new declaration being merged.
	* types.cc (layout_aggregate_members): Apply user defined attributes
	on fields.

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add
	  gcc/attributes.d.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/gcc/attribute.d: Deprecate module, publicly import
	gcc.attributes.
	* libdruntime/gcc/deh.d: Update imports.
	* libdruntime/gcc/attributes.d: New file.

gcc/testsuite/ChangeLog:

	* gdc.dg/gdc108.d: Update test.
	* gdc.dg/gdc142.d: Likewise.
	* gdc.dg/pr90136a.d: Likewise.
	* gdc.dg/pr90136b.d: Likewise.
	* gdc.dg/pr90136c.d: Likewise.
	* gdc.dg/pr95173.d: Likewise.
	* gdc.dg/attr_allocsize1.d: New test.
	* gdc.dg/attr_allocsize2.d: New test.
	* gdc.dg/attr_alwaysinline1.d: New test.
	* gdc.dg/attr_cold1.d: New test.
	* gdc.dg/attr_exclusions1.d: New test.
	* gdc.dg/attr_exclusions2.d: New test.
	* gdc.dg/attr_flatten1.d: New test.
	* gdc.dg/attr_module.d: New test.
	* gdc.dg/attr_noclone1.d: New test.
	* gdc.dg/attr_noicf1.d: New test.
	* gdc.dg/attr_noinline1.d: New test.
	* gdc.dg/attr_noipa1.d: New test.
	* gdc.dg/attr_noplt1.d: New test.
	* gdc.dg/attr_optimize1.d: New test.
	* gdc.dg/attr_optimize2.d: New test.
	* gdc.dg/attr_optimize3.d: New test.
	* gdc.dg/attr_optimize4.d: New test.
	* gdc.dg/attr_restrict1.d: New test.
	* gdc.dg/attr_section1.d: New test.
	* gdc.dg/attr_symver1.d: New test.
	* gdc.dg/attr_target1.d: New test.
	* gdc.dg/attr_targetclones1.d: New test.
	* gdc.dg/attr_used1.d: New test.
	* gdc.dg/attr_used2.d: New test.
	* gdc.dg/attr_weak1.d: New test.
	* gdc.dg/imports/attributes.d: New test.
2021-04-08 15:30:47 +02:00
GCC Administrator 8cac6af6f8 Daily bump. 2021-04-07 00:16:39 +00:00
Iain Buclaw dddf3bb0c3 d: Merge upstream dmd 5cc71ff83, druntime 1134b710
D front-end changes:

 - Fix ICEs that occurred when using opaque enums.

 - Update `pragma(printf)' checking code to work on 16-bit targets.

Phobos change:

 - Don't compile in argTypes code on AArch64

Reviewed-on: https://github.com/dlang/dmd/pull/12378
	     https://github.com/dlang/druntime/pull/3431

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 5cc71ff83.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 1134b710.
2021-04-06 19:43:30 +02:00
GCC Administrator c0756c4eb3 Daily bump. 2021-04-04 00:16:26 +00: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
GCC Administrator 651684b462 Daily bump. 2021-03-27 00:16:27 +00:00
Iain Buclaw fdfcb5353c libphobos: Build all modules with -fversion=Shared when configured with --enable-shared
The libgdruntime_convenience library was built with `-fversion=Shared',
but the libphobos part wasn't when creating the static library.

As there are no issues compiling in Shared code into the static library,
to avoid mismatches the flag is now always present when --enable-shared
is turned on.  Libtool's compiler PIC D flag is now the combination of
compiler PIC and D Shared flags, and AM_DFLAGS passes `-prefer-pic' to
libtool unless --enable-shared is turned off.

libphobos/ChangeLog:

	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* configure.ac: Substitute enable_shared, enable_static, and
	phobos_lt_pic_flag.
	* libdruntime/Makefile.am (AM_DFLAGS): Replace
	  phobos_compiler_pic_flag with phobos_lt_pic_flags, and
	  phobos_compiler_shared_flag.
	* libdruntime/Makefile.in: Regenerate.
	* src/Makefile.am (AM_DFLAGS): Replace phobos_compiler_pic_flag
	  with phobos_lt_pic_flag, and phobos_compiler_shared_flag.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/libphobos.druntime_shared/druntime_shared.exp: Remove
	-fversion=Shared and -fno-moduleinfo from default extra test flags.
	* testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise.
	* testsuite/testsuite_flags.in: Add phobos_compiler_shared_flag to
	--gdcflags.
2021-03-26 16:14:32 +01:00
GCC Administrator a19dd5e644 Daily bump. 2021-02-05 00:16:23 +00: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
GCC Administrator 9faaa80776 Daily bump. 2021-02-04 00:16:32 +00: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
GCC Administrator 5dfbad4f7c Daily bump. 2021-01-31 00:16:20 +00: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
GCC Administrator e62bb7f083 Daily bump. 2021-01-27 00:16:33 +00:00
Iain Buclaw 5a36cae275 d: Merge upstream dmd 609c3ce2d, phobos 3dd5df686
D front-end changes:

 - Contracts for pre- and postconditions are now implicitly "this"
   const, so that state can no longer be altered in these functions.

 - Inside a constructor scope, assigning to aggregate declaration
   members is done by considering the first assignment as initialization
   and subsequent assignments as modifications of the constructed
   object.  For const/immutable fields the initialization is accepted in
   the constructor but subsequent modifications are not.  However this
   rule did not apply when inside a constructor scope there is a call to
   a different constructor.  This been changed so it is now an error
   when there's a double initialization of immutable fields inside a
   constructor.

Phobos changes:

 - Don't run unit-tests for unsupported clocks in std.datetime.  The
   phobos and phobos_shared tests now add -fversion=Linux_Pre_2639 if
   required.

 - Deprecate public extern(C) bindings for getline and getdelim in
   std.stdio.  The correct module for bindings is core.sys.posix.stdio.

Reviewed-on: https://github.com/dlang/dmd/pull/12153
	     https://github.com/dlang/phobos/pull/7768

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 609c3ce2d.
	* d-compiler.cc (Compiler::loadModule): Rename to ...
	(Compiler::onParseModule): ... this.
	(Compiler::onImport): New function.
	* d-lang.cc (d_parse_file): Remove call to Compiler::loadModule.

libphobos/ChangeLog:

	* src/MERGE: Merge upstream phobos 3dd5df686.
	* testsuite/libphobos.phobos/phobos.exp: Add compiler flag
	-fversion=Linux_Pre_2639 if target is linux_pre_2639.
	* testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise.
2021-01-26 09:54:57 +01:00
GCC Administrator 6b1633378b Daily bump. 2021-01-24 00:16:16 +00:00
Iain Buclaw 81f928ec8e libphobos: Fix executables segfault on mipsel architecture
The dynamic section on MIPS is read-only, but this was not properly
handled in the runtime library.  The segfault only occurred for programs
that linked to the shared libphobos library.

libphobos/ChangeLog:

	PR d/98806
	* libdruntime/gcc/sections/elf_shared.d (MIPS_Any): Declare version
	for MIPS32 and MIPS64.
	(getDependencies): Adjust dlpi_addr on MIPS_Any.
2021-01-24 00:20:25 +01:00
GCC Administrator 651b8a50a6 Daily bump. 2021-01-06 00:16:55 +00:00
Samuel Thibault f56de3557f Update GNU/Hurd configure support
ChangeLog:

	* libtool.m4: Match gnu* along other GNU systems.
	* libgo/config/libtool.m4: Match gnu* along other GNU systems.
	* libgo/configure: Re-generate.

libffi/
	* configure: Re-generate.

libgomp/
	* configure: Re-generate.

gcc/

	* configure: Re-generate.

libatomic/

	* configure: Re-generate.

libbacktrace/

	* configure: Re-generate.

libcc1/

	* configure: Re-generate.

libgfortran/

	* configure: Re-generate.

libgomp/

	* configure: Re-generate.

libhsail-rt/

	* configure: Re-generate.

libitm/

	* configure: Re-generate.

libobjc/

	* configure: Re-generate.

liboffloadmic/

	* configure: Re-generate.
	* plugin/configure: Re-generate.

libphobos/

	* configure: Re-generate.

libquadmath/

	* configure: Re-generate.

libsanitizer/

	* configure: Re-generate.

libssp/

	* configure: Re-generate.

libstdc++-v3/

	* configure: Re-generate.

libvtv/

	* configure: Re-generate.

lto-plugin/

	* configure: Re-generate.

zlib/

	* configure: Re-generate.
2021-01-05 16:04:14 -07:00
Jakub Jelinek 99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
Jakub Jelinek c48514bea6 Update Copyright in ChangeLog files
Do this separately from all other Copyright updates, as ChangeLog files
can be modified only separately.
2021-01-04 09:35:45 +01:00
GCC Administrator 6e1edf48eb Daily bump. 2020-12-06 00:16:44 +00:00
Iain Sandoe 1352bc88a0 Darwin : Update libtool and dependencies for Darwin20 [PR97865]
The change in major version (and the increment from Darwin19 to 20)
caused libtool tests to fail which resulted in incorrect build settings
for shared libraries.

We take this opportunity to sort out the shared undefined symbols state
rather than propagating the current unsound behaviour into a new rev.

This change means that we default to the case that missing symbols are
considered an error, and if one wants to allow this intentionally, the
confiuration for that case should be set appropriately.

Three existing cases need undefined dynamic lookup:
 libitm, where there is already a configuration mechanism to add the
         flags.
 libcc1, where we add simple configuration to add the flags for Darwin.
 libsanitizer, where we can add to the existing extra flags.

libcc1/ChangeLog:

	PR target/97865
	* Makefile.am: Add dynamic_lookup to LD flags for Darwin.
	* configure.ac: Test for Darwin host and set a flag.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

libitm/ChangeLog:

	PR target/97865
	* configure.tgt: Add dynamic_lookup to XLDFLAGS for Darwin.
	* configure: Regenerate.

libsanitizer/ChangeLog:

	PR target/97865
	* configure.tgt: Add dynamic_lookup to EXTRA_CXXFLAGS for
	Darwin.
	* configure: Regenerate.

ChangeLog:

	PR target/97865
	* libtool.m4: Update handling of Darwin platform link flags
	for Darwin20.

gcc/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libatomic/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libbacktrace/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libffi/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libgfortran/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libgomp/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libhsail-rt/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libobjc/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libphobos/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libquadmath/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libssp/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libstdc++-v3/ChangeLog:

	PR target/97865
	* configure: Regenerate.

libvtv/ChangeLog:

	PR target/97865
	* configure: Regenerate.

zlib/ChangeLog:

	PR target/97865
	* configure: Regenerate.
2020-12-05 08:43:20 +00:00
GCC Administrator 94358e4770 Daily bump. 2020-12-01 00:16:38 +00:00
Iain Buclaw e855b30c28 d: Add freebsd support for D compiler and runtime
gcc/ChangeLog:

	PR d/87818
	* config.gcc (*-*-freebsd*): Add freebsd-d.o and t-freebsd.
	* config/freebsd-d.c: New file.
	* config/t-freebsd: New file.

libphobos/ChangeLog:

	PR d/87818
	* configure.tgt: Add x86_64-*-freebsd* and i?86-*-freebsd* as
	supported targets.
2020-11-30 11:45:15 +01:00
GCC Administrator e87559d202 Daily bump. 2020-11-28 00:16:38 +00:00