Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream v2.106.1 #4551

Merged
merged 6 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ task:
<< : *PACKAGING_STEPS_TEMPLATE

task:
name: FreeBSD 12.4 x64
name: FreeBSD 13.2 x64
freebsd_instance:
image_family: freebsd-12-4
image_family: freebsd-13-2
cpu: 4
memory: 8G
timeout_in: 60m
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# LDC master

#### Big news
- Frontend, druntime and Phobos are at version [2.106.0](https://dlang.org/changelog/2.106.0.html). (#4522, #4539)
- Frontend, druntime and Phobos are at version [2.106.1](https://dlang.org/changelog/2.106.0.html). (#4522, #4539, #4551)
- Support for [LLVM 17](https://releases.llvm.org/17.0.1/docs/ReleaseNotes.html). The prebuilt packages use v17.0.6. (#4533, #4540)
- New command-line options `-fno-{exceptions,moduleinfo,rtti}` to selectively enable some `-betterC` effects. (#4522)
- New command-line option `-fprofile-sample-use` for using sample-based profile data for optimization. Functionality and usage is identical to Clang's option with same name. (#4531)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ include(GetLinuxDistribution)
set(LDC_VERSION "1.36.0") # May be overridden by git hash tag
set(DMDFE_MAJOR_VERSION 2)
set(DMDFE_MINOR_VERSION 106)
set(DMDFE_PATCH_VERSION 0)
set(DMDFE_PATCH_VERSION 1)

set(DMD_VERSION ${DMDFE_MAJOR_VERSION}.${DMDFE_MINOR_VERSION}.${DMDFE_PATCH_VERSION})

Expand Down
5 changes: 5 additions & 0 deletions dmd/initsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,11 @@ Expressions* resolveStructLiteralNamedArgs(StructDeclaration sd, Type t, Scope*
cast(int) nfields, nfields != 1 ? "s".ptr : "".ptr);
return null;
}
if (fieldi >= nfields)
{
error(argLoc, "trying to initialize past the last field `%s` of `%s`", sd.fields[nfields - 1].toChars(), sd.toChars());
return null;
}

VarDeclaration vd = sd.fields[fieldi];
if (elems[fieldi])
Expand Down
2 changes: 1 addition & 1 deletion packaging/dlang-tools_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.106.0
v2.106.1
2 changes: 1 addition & 1 deletion packaging/dub_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.35.0
v1.35.1
2 changes: 1 addition & 1 deletion runtime/phobos
15 changes: 15 additions & 0 deletions tests/dmd/fail_compilation/named_arguments_struct_literal.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
TEST_OUTPUT:
---
fail_compilation/named_arguments_struct_literal.d(14): Error: trying to initialize past the last field `z` of `S`
---
*/

// https://issues.dlang.org/show_bug.cgi?id=24281

struct S { int y, z = 3; }

S s = S(
z: 2,
3,
);
27 changes: 27 additions & 0 deletions tests/dmd/runnable/testxmm2.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version (D_SIMD)
{

import core.simd;
import core.stdc.stdio;
import core.stdc.string;

alias TypeTuple(T...) = T;
Expand Down Expand Up @@ -283,6 +284,31 @@ void testdbl()

/*****************************************/

version (none)//(D_AVX2)
{
// https://issues.dlang.org/show_bug.cgi?id=24283

import core.simd;
import core.stdc.stdio;

void test24283()
{
int8 A = [7, -2, 9, 54654, 7, -2, 9, 54654];
int8 B = [14, 78, 111, -256, 14, 78, 111, -256];
int8 R = (~A) & B;
int[8] correct = [8, 0, 102, -54784, 8, 0, 102, -54784];
//printf("%d %d %d %d %d %d %d %d\n", R[0], R[1], R[2], R[3], R[4], R[5], R[6], R[7]);
assert(R.array == correct);
}

}
else
{
void test24283() { }
}

/*****************************************/

int main()
{
test21474();
Expand All @@ -300,6 +326,7 @@ int main()
testunscmp();
testflt();
testdbl();
test24283();

return 0;
}
Expand Down
16 changes: 10 additions & 6 deletions tests/sanitizers/lit.local.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
import os
import platform

# Add "ASan" and "LSan" features, assuming the compiler-rt library is available
config.available_features.add('ASan')
sys = platform.system()

# Add "LSan" feature, assuming the compiler-rt library is available
config.available_features.add('LSan')

# FreeBSD TSan needs https://reviews.llvm.org/D85292,
# FreeBSD TSan doesn't seem to work,
# Linux TSan currently only works with static druntime,
# and there's no Windows TSan (yet?).
sys = platform.system()
if (sys != 'FreeBSD') and (sys != 'Windows') and not (sys == 'Linux' and config.shared_rt_libs_only):
config.available_features.add('TSan')

# MSan is supported on Linux, FreeBSD, and OpenBSD: https://clang.llvm.org/docs/MemorySanitizer.html#supported-platforms
if (sys == 'Linux') or (sys == 'FreeBSD') or (sys == 'OpenBSD'):
# FreeBSD ASan and MSan don't cope well with ASLR (might do with FreeBSD 14 according to https://github.com/llvm/llvm-project/pull/73439)
if sys != 'FreeBSD':
config.available_features.add('ASan')

# MSan is supported on Linux, FreeBSD (modulo ASLR issue), and OpenBSD: https://clang.llvm.org/docs/MemorySanitizer.html#supported-platforms
if (sys == 'Linux') or (sys == 'OpenBSD'):
config.available_features.add('MSan')

# Add "Fuzzer" feature, assuming the compiler-rt library is available
Expand Down