diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-04-21 14:25:26 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-04-21 20:03:08 +0100 |
commit | ae56e2da05e823e63972aff3118a659d7ca7a8b9 (patch) | |
tree | 13932a03f44d3892b2ea8accebe7e55fed6142e0 /gcc/testsuite/gdc.test/compilable | |
parent | 93dd7f36f2066ec52137178ee52052f293e5e743 (diff) |
d: Merge upstream dmd eb7bee331, druntime 27834edb, phobos ac296f80c.
D front-end changes:
- Import dmd v2.100.0-beta.1.
- Print deprecation messages for scope violations unless
`-frevert=dip1000' is used.
- Fixed a missed case of switch case fallthrough not being caught by
the compiler.
D runtime changes:
- Import druntime v2.100.0-beta.1.
Phobos changes:
- Import phobos v2.100.0-beta.1.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd eb7bee331.
* dmd/VERSION: Update version to v2.100.0-beta.1.
* d-lang.cc (d_handle_option): Handle OPT_frevert_dip1000.
* lang.opt (frevert=dip1000): New option.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 27834edb.
* src/MERGE: Merge upstream phobos ac296f80c.
* src/Makefile.am (PHOBOS_DSOURCES): Add std/int128.d.
* src/Makefile.in: Regenerate.
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable')
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/betterCarray.d | 7 | ||||
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/test18216.d | 40 | ||||
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/test22635.d | 13 |
3 files changed, 60 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/betterCarray.d b/gcc/testsuite/gdc.test/compilable/betterCarray.d index 3e9a881c3d6..72dcc6b5ee3 100644 --- a/gcc/testsuite/gdc.test/compilable/betterCarray.d +++ b/gcc/testsuite/gdc.test/compilable/betterCarray.d @@ -26,3 +26,10 @@ void issue19234() A[10] b; b[] = a[]; } + +/**********************************************/ +// https://issues.dlang.org/show_bug.cgi?id=22922 +void issue22922() +{ + int[] x = []; +} diff --git a/gcc/testsuite/gdc.test/compilable/test18216.d b/gcc/testsuite/gdc.test/compilable/test18216.d new file mode 100644 index 00000000000..43f5629a3c7 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test18216.d @@ -0,0 +1,40 @@ +// https://issues.dlang.org/show_bug.cgi?id=18216 + +struct Node +{ + mixin Type!(); + Pointer left; +} + +mixin template Type() +{ + alias Base = typeof(this); + + static struct Proxy + { + struct Node + { + Base m_payload; + } + static immutable default_value = Base.init; // just remove this will work + } + + alias pNode = shared(Proxy.Node)*; + + static struct Pointer + { + Base* _ptr; + auto ptr() + { + return cast(pNode) _ptr; + } + + void opAssign(ref Pointer other) {} // just remove this will work + + alias getThis this; // just remove this will work + ref auto getThis() return + { + return ptr.m_payload; + } + } +} diff --git a/gcc/testsuite/gdc.test/compilable/test22635.d b/gcc/testsuite/gdc.test/compilable/test22635.d new file mode 100644 index 00000000000..c2abc837956 --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/test22635.d @@ -0,0 +1,13 @@ +// https://issues.dlang.org/show_bug.cgi?id=22635 +// opCast prevent calling destructor for const this + +struct Foo +{ + bool opCast(T : bool)() const { assert(0); } + ~this() {} +} + +struct Bar +{ + const Foo foo; +} |