Commit Graph

221 Commits

Author SHA1 Message Date
David Nadlinger
060ba45c8e druntime/dmd-testsuite test fixes. 2013-02-06 22:15:37 +01:00
David Nadlinger
b99b78558b Hack to make nested struct .init results an rvalue.
The code still needs closer scrunity, as the 'nested' test
from the DMD testsuite doesn't fully pass yet.
2013-01-11 21:34:45 +01:00
David Nadlinger
5c518a16ec Merged 2.061 frontend. 2013-01-04 06:22:53 +01:00
David Nadlinger
d694e37f4a Fix test suite builds: backport copyright year change. 2013-01-04 01:43:56 +01:00
David Nadlinger
1caf4c9c26 Handle plain AA type <-> AA struct return type mismatch.
GitHub: Fixes #214.
2012-12-31 12:10:46 +01:00
David Nadlinger
f1f0486b6e Implement ordered delegate comparisons.
GitHub: Fixes #256.
2012-12-28 18:08:49 +01:00
David Nadlinger
b25b46f65b Merge test case update. 2012-12-27 23:28:01 +01:00
David Nadlinger
aa4543465d Actually run DMD test suite in 32 bit mode on x86_64 multilib builds.
Yet another regression gone unnoticed because CMake functions
silently accept extra arguments.
2012-12-20 03:57:04 +01:00
David Nadlinger
f68e914da6 Workaround for ICE due to auto return type not being inferred.
GitHub: Fixes #217.
2012-12-19 22:55:18 +01:00
David Nadlinger
6e6e03b154 Fold in testsuite fix. 2012-12-19 22:14:13 +01:00
David Nadlinger
fb363972f0 Fix handling of NewExpression for structs with constructors.
The frontend treats the constructor as returning a reference to
the new instance, we just want the memory, i.e. a pointer.

GitHub: Fixes #246.
2012-12-19 20:57:52 +01:00
David Nadlinger
9cbfc604c7 Fix ICE with closures in member functions.
I chose to fix the problem this way because it increases uniformity
between 'this' and normal explicit parameters. Another possibility
would be to just change the type determinatin code in
DtoCreateNestedContextType to not expect the value to be already
present, because it doesn't need it when isVthisPtr is true anyway.

GitHub: Fixes #217.
2012-12-19 20:27:19 +01:00
David Nadlinger
e068df24b2 Workaround for AA literal initialization ICE.
Just executing toConstElem speculatively in
AssocArrayLiteralExp::toElem probably isn't the best idea
anyway, I would not be surprised if there are other similar bugs.

GitHub: Fixes #248.
2012-12-19 02:09:19 +01:00
David Nadlinger
3fc9a0faa3 CMake 2.8.0 compatibility. 2012-12-11 23:08:13 +01:00
David Nadlinger
ee80f37ddc Ignore in-tree files produced by the D1 tests. 2012-12-08 23:57:21 +01:00
David Nadlinger
a74e4abe58 Fix testsuite target dependency setup.
No idea how this worked locally.
2012-12-07 00:04:03 +01:00
David Nadlinger
5a6176316a Use CMake-detected make program.
This probably doesn't make a huge difference in practice, as the
DMD test suite scripts require a Posix-ish environment anyway.
2012-12-06 23:17:32 +01:00
David Nadlinger
6cb0193c53 Clean files from previous runs before executing DMD testsuite. 2012-12-06 23:15:45 +01:00
David Nadlinger
18e0fafe8e Run tests both in 32 and 64 bit mode on multilib builds. 2012-12-06 21:57:18 +01:00
David Nadlinger
93d4d90239 Inline IR testsuite updates. 2012-11-17 11:07:55 +01:00
David Nadlinger
636b37d056 D1 tests: Updated local copy of object.di.
The type info layout was changed in DMD; Tango already has the changes.
2012-11-11 00:42:08 +01:00
David Nadlinger
8118c846af Fixed unlisted contract parameter issue.
Thanks to alexrp for mentioning it.
2012-10-07 14:58:01 +02:00
David Nadlinger
051cd7302e Fixed two issues with nested functions as template alias parameters.
Fixes #131 (GitHub).
2012-10-07 03:06:07 +02:00
David Nadlinger
5759ee3e6f dmd-testsuite updates. 2012-10-05 23:42:26 +02:00
David Nadlinger
4e49814afb Vector -> static array casts are by address.
Fixes #176 (GitHub).
2012-10-05 17:23:31 +02:00
David Nadlinger
4f6ec96b27 Fixed vector initialization involving implicit conversions.
Fixes first part of GitHub #176.
2012-10-03 19:51:04 +02:00
David Nadlinger
0c0e88dda1 Add missing LDMD option handling code.
Reusing the existing parsing code for DMD compatibility was a good
idea, copy-pasting the tool together in the middle of the night not
so much.
2012-10-03 19:51:04 +02:00
David Nadlinger
d5d649b9c9 Build DMD testsuite in a debug and a release configuration. 2012-09-29 23:10:30 +02:00
David Nadlinger
c0980de3af Testsuite updates; run it as part of CI builds.
Only can run a quick build because of Travis time restrictions. Should
try to find a set of most-likely-to-fail command line args, maybe
"-O -gc -fPIC"?
2012-09-29 20:59:06 +02:00
David Nadlinger
2750541d0a druntime and dmd-testsuite updates. 2012-09-07 03:51:33 +02:00
David Nadlinger
270979ffd6 Testsuite updates. 2012-09-07 03:51:31 +02:00
David Nadlinger
d163799758 Imported D2 testsuite (v2.060) as submodule. 2012-09-07 03:51:31 +02:00
David Nadlinger
1645eff596 Created separate tests directory for D1. 2012-09-07 03:51:31 +02:00
David Nadlinger
1480501f43 Just use -lib now that we have it. 2012-06-24 11:29:26 +02:00
David Nadlinger
3bfc0a04d8 Avoid runtest warnings with GNU sed.
OS X (BSD) sed accepts -i without a string too,  but apparently only if it comes _before_ the -e argument.
2011-04-17 17:40:05 +02:00
David Nadlinger
7b04f45d25 OS X compatibility for testing tools. 2011-04-17 06:42:37 +02:00
David Nadlinger
a121296bd3 Synchronized DStress Phobos compatibility object.di with latest Tango version. 2011-04-17 06:32:38 +02:00
Moritz Warning
6d7fe4d1c3 move mini test set to dsource.org/projects/dstress 2011-01-10 19:49:05 +01:00
Moritz Warning
d5d6d68c47 fix Tango api change 2010-09-04 11:32:12 +02:00
Robert Clipsham
daa102a5cd Merge dmd 1.056. 2010-02-06 15:53:52 +00:00
Robert Clipsham
10e1768c37 Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Changed std.stdarg to import ldc.vararg so it has the correct implementation.
2009-11-15 13:22:02 +00:00
Robert Clipsham
98e869c7ec Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Updated the runtest script to build libtangobos-partial.a if it hasn't already been built.
Added in signbit() and va_arg!()() to libtangobos-partial.a so more of the phobos dependent DStress tests pass.
2009-11-08 16:16:17 +00:00
Christian Kamm
bcd12c0ce1 Fix another test returning a non-void in a void function. 2009-11-07 11:16:09 +01:00
Christian Kamm
4756d2a654 Fix bug in nested13 minitest.
Void functions may no longer return non-void expressions.
2009-11-07 11:01:49 +01:00
Christian Kamm
265cbea170 Make == for associative arrays test for equality, not identity.
_aaEq was added to runtime/internal/aaA.d which forwards to
TypeInfo_AssociativeArray.equals in genobj.d. On the codegen side, DtoAAEquals
was added to gen/aa.cpp and is called from EqualExp::toElem in gen/toir.cpp.

I assume that the frontend will produce an error if == is used on associative
arrays of different type.

This fixes DMD bug 1429.
2009-06-21 19:05:24 +02:00
Christian Kamm
723cfef519 Another shot at fixing the issues with (constant) struct literals and their addresses. See DMD2682, #218, #324.
The idea is to separate the notion of const from 'this variable can always be
replaced with its initializer' in the frontend. To do that, I introduced
Declaration::isSameAsInitializer, which is overridden in VarDeclaration to
return false for constants that have a struct literal initializer.

So
{{{
const S s = S(5);
void foo() { auto ps = &s; }
// is no longer replaced by
void foo() { auto ps = &(S(5)); }
}}}

To make taking the address of a struct constant with a struct-initializer
outside of function scope possible, I made sure that AddrExp::optimize doesn't
try to run the argument's optimization with WANTinterpret - that'd again
replace the constant with a struct literal temporary.
2009-06-14 19:49:58 +02:00
Kelly Wilson
19149bc542 change mingw32 versioning to version(Windows) 2009-05-31 11:20:26 -06:00
Kelly Wilson
23919b4de4 fix assembly code for mingw32 in minitests 2009-05-31 11:01:02 -06:00
Frits van Bommel
46cd6504fa Adjust some more code that was depending on the function and delegate calling
conventions being equal.
There's also an instance in `tango.text.convert.Layout` that should be adjusted:
{{{
Index: tango/text/convert/Layout.d
===================================================================
--- tango/text/convert/Layout.d	(revision 4578)
+++ tango/text/convert/Layout.d	(working copy)
 -660,8 +660,12 @@

                        case TypeCode.STRUCT:
                             auto s = cast(TypeInfo_Struct) type;
-                            if (s.xtoString)
-                                return Utf.fromString8 (s.xtoString(p), result);
+                            if (s.xtoString) {
+                                char[] delegate() toString;
+                                toString.ptr = p;
+                                toString.funcptr = cast(char[] function()) s.xtoString;
+                                return Utf.fromString8 (toString(), result);
+                            }
                             goto default;

                        case TypeCode.INTERFACE:
}}}
2009-05-31 15:27:01 +02:00
Kelly Wilson
2e6e578ea1 Fix test for mingw 2009-05-30 14:57:48 -06:00