Commit Graph

184 Commits

Author SHA1 Message Date
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
Kelly Wilson
e35b95f35e merging 2009-05-29 01:09:38 -06:00
Kelly Wilson
01c608f457 Fix - add Path.native for mingw support...thanks mp4/jaffa 2009-05-29 01:08:39 -06:00
Christian Kamm
5d4fe64ac2 Get rid of old phobos-based tests. 2009-05-28 22:00:08 +02:00
Frits van Bommel
b06fa1f05e I ran into another issue like the one fixed by r1318, so update all of
`tests/mini/norun_debug*` to hopefully keep crashing using the same trick.
2009-05-28 02:28:30 +02:00
Christian Kamm
2665fc4f3c Add test from #308 to minitests. 2009-05-23 00:26:38 +02:00
Frits van Bommel
adfc5b3ee9 Fix scope(exit) foreach (ref v; arr) foo(v); 2009-05-22 21:38:01 +02:00
Frits van Bommel
95c35225bb Don't print the entire declaration of the alliassee when ->toChars() is
called on an `AliasDeclaration`; just printing the name will do. This fixes
#305, which otherwise tries to generate
{{{
  class E {
      void A() {
          alias /* recurse into E->toCBuffer() */ m;
      }
  }
}}}
by way of an infinite recursion (causing a segfault when the stack runs out).
2009-05-20 16:20:59 +02:00
Frits van Bommel
ea4690128b Merge some changes from Tango's object.di into the testincludes version. 2009-05-19 22:35:08 +02:00
Frits van Bommel
541f3723cd Intrinsics shouldn't see struct padding, so use a special TargetABI for them
that removes it.
This unbreaks the `llvm_*_with_overflow` intrinsics.
2009-05-16 13:06:49 +02:00
Tomas Lindquist Olsen
ea00a120e9 Added testcase for #288 . 2009-05-10 14:37:30 +02:00
Frits van Bommel
039edd5cd4 Make sure this testcase keeps crashing with -O3.
Recent optimization improvements made LLVM realize the store-to-null was
unavoidable, so it deleted all of main() and replaced it with 'unreachable'.
Because the body of main() no longer even contained a return instruction,
calling it caused random code to be ran instead. This happened to be the code
that links in the ModuleInfo on my machine, which then returned "successfully".
2009-05-09 00:55:47 +02:00
Christian Kamm
37edd5add6 Fix certain cases of floating point instruction mistranslation. 2009-05-07 21:01:44 +02:00
Christian Kamm
77100f890c Make static int[] a = [1, 2]; a[0] = 4; not segfault
by making the array data ptr a non-const global variable.
2009-05-03 11:16:54 +02:00
Tomas Lindquist Olsen
3bd5cf70c2 Added testcase for overlapping struct default initializer I has missed. Slight tweak of the relevant error message. 2009-04-27 01:43:29 +02:00
Christian Kamm
c6b059ed73 Add (currently failing) test for correct virtual call resolution. 2009-04-26 10:29:39 +02:00
Tomas Lindquist Olsen
f6f12e4241 Added checks for overlapping union initializers, as shown in bug #259 . 2009-04-22 01:18:21 +02:00
Frits van Bommel
909c6dae18 Fix some unittests for 64-bit asm. They were operating on int variables as if
they were longs.
This was causing asm1_1 to fail when compiled with -O3 because it was
overwriting the spilled value of callee-saved register %rbx, which the runtime
was using as a pointer value at the time.
2009-04-13 17:42:36 +02:00
Frits van Bommel
376a825075 Fix a bug in nested context code that occured when calling a function nested in
the outermost scope with a context frame from a function using a more nested
context frame.
2009-04-13 12:19:18 +02:00
Christian Kamm
a6ba7d16b2 Fix mini test runner. 2009-04-12 19:53:41 +02:00
Lars Ivar Igesund
8063e8df9d Ported script to Tango 2009-04-07 18:37:19 +02:00
Tomas Lindquist Olsen
9c4b2b4036 Started seperating type resolution from the rest of codegen again, the merge had too many regressions. 2009-04-03 16:34:11 +02:00
Frits van Bommel
3f49ddb6d5 Fix nested references to 'ref' foreach variables.
These "walk around" the array being iterated over, so they're a bit trickier
than other variables to get right.
2009-04-01 00:01:44 +02:00
Frits van Bommel
b7ca040f7c Fix a bug I noticed. Varargs were broken if preceded by tuple parameters. 2009-03-30 00:00:43 +02:00
Tomas Lindquist Olsen
e61562033d Added support for tuple return with __asmtuple!(int,int) etc. 2009-03-28 08:25:58 +01:00
Frits van Bommel
91698fd0a5 Remove a duplicate minitest 2009-03-25 13:46:49 +01:00
Christian Kamm
a0d93e699a Automated merge with http://hg.dsource.org/projects/ldc 2009-03-24 14:34:16 +01:00
Christian Kamm
eb1deec50d Fix #239. 2009-03-24 14:33:57 +01:00
Frits van Bommel
143e95680f Remove struct padding which was making this test fail on 64-bit systems. 2009-03-24 03:14:22 +01:00
Christian Kamm
372b40dd94 Fix tuple declarations in aggregates. 2009-03-23 14:47:51 +01:00
Frits van Bommel
e242f81475 Fix makewebstatistics: don't try to drop a test multiple times. 2009-03-20 15:47:42 +01:00
Frits van Bommel
3ffaa5c914 Make this test a bit more meaningful 2009-03-14 22:29:31 +01:00
Frits van Bommel
8b185b8b6a Fix field access from inline asm. See tests/mini/asm10.d 2009-03-12 23:48:43 +01:00
Frits van Bommel
d1bea3d6c0 Update testcase broken by intrinsics changes. 2009-03-10 10:46:15 +01:00
Christian Kamm
f0d33b1b20 Move more tests to D_InlineAsm 2009-03-03 19:03:27 +01:00
Christian Kamm
e59ba75553 Adjust mini tests to use D_InlineAsm 2009-03-03 18:26:39 +01:00
Tomas Lindquist Olsen
61dfb11bc5 - Fixed x86-32 C ABI for complex number return values.
- Removed unused code from the ABI class.
2009-03-01 19:01:05 +01:00
Frits van Bommel
03ce6604a0 Fix cfloat return on x86_64: only perform ABI transformation for non-extern(D)
functions.
There's no need to waste cycles with extern(D), which we get to define
ourselves. Fixes tests/mini/asm8.d. (Since the asm abiret code already assumed
{xmm0, xmm1} returns)
2009-02-26 23:35:39 +01:00