Commit graph

27318 commits

Author SHA1 Message Date
Iain Buclaw
65dd51ca0f cirrus: Switch to big-sur image, use catalina for bootstrap only 2021-11-08 13:58:38 +01:00
Boris Carvajal
d893291693 Fix Issue 21093 - [ICE] AssertError@dmd/optimize.d(691): Assertion failure 2021-11-08 09:34:19 +00:00
Boris Carvajal
904fde46c4 Fix Issue 21039 - alias this returns 'null' for ref types when put into array initializer 2021-11-08 09:07:08 +00:00
Boris Carvajal
c9733e805d Fix Issue 20998 - error in static struct initialization causes wrong position for subsequent members, producing extra errors 2021-11-05 10:04:35 +00:00
Boris Carvajal
0a9502c667 Fix Issue 21380 - A case of compiler crash when using auto ref 2021-11-04 11:43:00 +00:00
Brian Callahan
93a9f7bda5 Add openbsd to ignore list
Fix Issue 22476 - OpenBSD: Add OpenBSD to the fail_compilation/fail21227_win.d ignore list
2021-11-04 10:58:12 +00:00
Brian Callahan
2fe76b0cca Add openbsd to ignore list
Fix Issue 22477 - OpenBSD: Add to fail_compilation/fail3753.d ignore list
2021-11-04 09:30:29 +00:00
Brian Callahan
47657b8589 Fix Issue 22474 - OpenBSD: Add support to test/runnable/dhry.d 2021-11-04 08:49:24 +00:00
Brian Callahan
f6057042ab Add openbsd32 and openbsd64 to the ignore list
Fix Issue 22475 - OpenBSD: Disable test/compilable/cdcmp.d on OpenBSD
2021-11-04 08:00:38 +00:00
Brian Callahan
85f1d0e935 Fix Issue 22478 - OpenBSD: Add to fail_compilation/invalid_lib.d 2021-11-04 07:58:36 +00:00
MoonlightSentinel
b1429054c1 Fix 22472 - Correct error message for invalid void return
The old error message (`return expression expected`) ignored the
possibility that `void` and `noreturn` expressions are moved into `e0`.
This caused misleading error messages when errors are detected after
the move, claiming that the expression found in the source code is
missing.

Small improvement to #13135 because this is more likely to happen for
`noreturn` functions.
2021-11-03 23:45:44 +00:00
Brian Callahan
54fa6ee348 OpenBSD has had fmodl since 5.0 (2011)
FreeBSD has had fmodl since 8.0 (2008)
DragonFly BSD has had fmodl since 4.1 (2013)
The special casing to use fmod instead of fmodl can be removed.
Fix Issue 22461 - OpenBSD: Use fmodl
2021-11-01 07:41:50 +00:00
Brian Callahan
5a52c1a20e Fix Issue 22463 - OpenBSD: Allow DMD to work on 32-bit OpenBSD 2021-11-01 07:05:51 +00:00
Brian Callahan
3bfb90e2a8 Fix Issue 22462 - OpenBSD: bash lives in /usr/local 2021-11-01 01:53:35 +00:00
Boris Carvajal
8a6fcaaf74 Fix Issue 21930 - ICE (illegal instruction) with bad code 2021-10-28 07:32:21 +00:00
Boris Carvajal
2d495c7c20 Fix Issue 20133 - [REG2.084.0] Bogus slice assignment in recursive CTFE call 2021-10-27 09:53:42 +00:00
Tim Schendekehl
9b6455a280
Use correct phobos when running C++ tests in GitHub action (#13222)
The GitHub workflow is setting LD_LIBRARY_PATH to the host dmd library
folder with libphobos2.so. The tests are built using a new phobos. They
select the library path using -L-rpath, which sets DT_RUNPATH on the
binary, but LD_LIBRARY_PATH has priority over DT_RUNPATH.
For tests/dshell/dll_cxx.d this caused a link failure, because a new
symbol from phobos was not found in the older phobos.
Reseting LD_LIBRARY_PATH while running the tests makes sure, that the
new phobos is used.
2021-10-24 17:03:29 +03:00
Walter Bright
99a01e63f7 ImportC: add support for __builtin_va_start and __builtin_va_end 2021-10-23 19:28:24 +00:00
MoonlightSentinel
7f9ce4504a Issue 22300 - Allow shared <-> unshared reinterpreting casts during CTFE
CTFE evaluation is single threaded only, hence it's safe to discard the
`shared` qualifier in a reinterpreting cast.

This change allows `-checkaction=context` to use a reinterpreting cast
for compile and runtime - which removes the problematic workaround
that caused the regression.
2021-10-20 12:48:01 +09:00
Iain Buclaw
ba950023e1
fix Issue 22411 - importC: Error: cannot implicitly convert expression of type 'const(char*)' to 'char*' (#13186)
The autotester failure is a spurious one: https://issues.dlang.org/show_bug.cgi?id=22350
2021-10-19 21:06:15 +03:00
Iain Buclaw
501d47b9ae
fix Issue 22403 - importC: Error: cannot pass argument '0' of type 'int' to parameter 'const(char)*' (#13185)
* fix Issue 22403 - importC: Error: cannot pass argument '0' of type 'int' to parameter 'const(char)*'

* fix Issue 22404 - importC: Error: cannot pass argument 'ENUMMEM' of type 'int' to parameter '__tag2'
2021-10-19 02:58:20 -07:00
Boris Carvajal
7d41786598
Fix Issue 22420 - [REG2.098] Apparent CTFE regression wrt. alias this (#13198) 2021-10-19 11:48:48 +03:00
Boris Carvajal
088801f46c
Fix resolveAliasThis() error gagging (#13201) 2021-10-19 11:47:31 +03:00
Iain Buclaw
e213c70f38 fix Issue 22402 - importC: Error: can't subtract '__tag2[1]' from pointer 2021-10-19 01:52:56 +00:00
Iain Buclaw
1c0659eae3 fix Issue 22405 - importC: Error: cannot modify 'const' expression '(*s).field' 2021-10-18 22:10:14 +00:00
Iain Buclaw
c38ffbaacd fix Issue 22413 - importC: Error: array index 0 is out of bounds 2021-10-18 18:35:42 +00:00
Iain Buclaw
a326b78805 fix Issue 22409 - importC: [ICE] Error: struct no size because of forward reference 2021-10-18 12:21:20 +00:00
Iain Buclaw
58e4db9880 fix Issue 22399 - importC: Error: static variable cannot be read at compile time 2021-10-18 09:50:59 +02:00
Iain Buclaw
9642b547c3 fix Issue 22400 - importC: Error: unknown, when compiling source with typedef'd initializer 2021-10-18 09:50:59 +02:00
Iain Buclaw
163b5f9204 fix Issue 22407 - importC: Error: cannot implicitly convert expression of type 'extern (C) int(int a)' to 'const(extern (C) int function(int))' 2021-10-18 09:50:59 +02:00
Boris Carvajal
b43df169fb Fix Issue 22410 - [REG2.094] function with tuple parameter with default argument fails if there's a qualifier 2021-10-18 00:44:57 +00:00
Iain Buclaw
f60ea8d142 fix Issue 22406 - importC: Error: 'switch' statement without a 'default'; use 'final switch' or add 'default: assert(0);' or add 'default: break;' 2021-10-18 00:19:10 +00:00
Boris Carvajal
b99421c6e0 Fix Issue 21438 - Compiler segfault on static array in a struct at CTFE 2021-10-17 22:05:47 +00:00
Boris Carvajal
3dfa83b4a0 Fix Issue 22151 - Compiler crash when attempting to assign to function 2021-10-17 10:04:21 +00:00
MoonlightSentinel
4a60861c30 Fix 21950: Rewrite function calls depending on noreturn arguments
Replaces the function call with the evaluation of the arguments up to
the first `noreturn` parameter. The remaining arguments / the function
call will never be executed anyways and the backend cannot handle
noreturn parameters.
2021-10-17 01:52:22 +00:00
Walter Bright
cb5d8b8500 fix Issue 22376 - importC: Error: cannot use non-constant CTFE pointer in an initializer 2021-10-16 11:58:57 +00:00
Boris Carvajal
712632c647 Fix Issue 21794 - ICE: Type painted NullExp hits assertion in dinterpret.d 2021-10-16 09:45:51 +00:00
Walter Bright
1ccaf72c03
refactor structalign_t (#13171) 2021-10-16 12:04:05 +03:00
Florian
ae8b0e0088
Fix 22389 - Check that noreturn functions don't return normally (#13173)
Such functions are malformed and hence could cause undefined behavior
at the call site.
2021-10-16 12:02:26 +03:00
MoonlightSentinel
59288c7a3c Fix 22388 - Don't discard function safety when matching lambdas
The code intended to copy the `TypeFunction` and change the return
type but also dropped the safety level.
2021-10-15 02:23:39 +00:00
Walter Bright
3131d4789f
fix Issue 22315 - ImportC: #pragma pack is not implemented (#13166) 2021-10-14 12:00:11 -07:00
Walter Bright
a0da5b49a0 ImportC: refactor structalign_t from uint to struct 2021-10-14 05:30:04 +00:00
Tim Schendekehl
7c421ded8c fix Issue 19660: 'export' keyword on OSX/Linux globals causing segfaults 2021-10-13 00:04:36 +00:00
MoonlightSentinel
b2555a70cb Fix 21952 - Don't assert for global / tls variables of type noreturn
The old code assumed variables of size 0 must be static arrays `T[0]`
but `noreturn.sizeof` is 0.
2021-10-12 21:38:10 +00:00
Tim Schendekehl
1e6217535f fix Issue 22323: Link error for virtual destructor of C++ class in DLL
The new test test/dshell/dll_cxx.d is based on test/dshell/dll.d, but
builds the DLL/SO from C++ instead of D.
2021-10-12 11:33:25 +00:00
Walter Bright
454b526340
fix Issue 22362 - ImportC: error parsing compound literal with more than one value at function scope (#13143) 2021-10-11 14:32:21 +03:00
MoonlightSentinel
cde0e07730 Fix 21957 - Don't crash when aligning noreturn members
`alignmember` assumes that every type with default alignment has a size
greater than zero - which obviously does not apply for `noreturn`.

A `noreturn` field with default alignment does not affect the layout of
the aggregate because `noreturn.sizeof = noreturn.alignof = 0`. Hence
skip the `alignmember` call unless a custom alignment was requested.
2021-10-11 07:53:15 +00:00
MoonlightSentinel
8989d6653d Fix 22004 - Subsequent return statements override inferred noreturn...
... return type.

Return type inference used to commit to `noreturn` when encountering
a return statement producing a `noreturn` value. This was problematic
when the function contained subsequent `void` returns, raising an error
regarding missmatched function type inference even though `void` and
`noreturn` are compatible (neither produce an actual value).

This patch changes the code to let `noreturn` be overriden by `void`.
2021-10-11 05:13:17 +00:00
Iain Buclaw
64a36bbcc7 fix Issue 22375 - importC: Error: C non-array initializer not supported yet 2021-10-10 14:50:36 +02:00
Walter Bright
57cd571c01 fix Issue 22104 - importC: Parser accepts arrays with incomplete element types 2021-10-10 14:49:37 +02:00