[Issue 6241] New: test sdtor.d on osx not catching
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jul 2 10:13:49 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6241
Summary: test sdtor.d on osx not catching
Product: D
Version: D2
Platform: x86
OS/Version: Mac OS X
Status: NEW
Keywords: EH, wrong-code
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: braddr at puremagic.com
--- Comment #0 from Brad Roberts <braddr at puremagic.com> 2011-07-02 10:08:47 PDT ---
Extracted and slightly reduced from the larger test file:
import std.c.stdio;
import core.exception;
struct S56
{
int x = 1;
this(int i) { printf("ctor %p(%d)\n", &this, i); }
~this() { printf("dtor %p\n", &this); }
}
int foo56()
{
throw new Throwable("hello");
return 5;
}
void test56()
{
int i;
int j;
try
{
i = S56(1).x + foo56() + 1;
}
catch (Throwable o)
{
printf("caught\n");
j = 1;
}
printf("i = %d, j = %d\n", i, j);
assert(i == 0);
assert(j == 1);
}
int main()
{
test56();
return 0;
}
On linux, caught is printed and the asserts are fine.
On osx, it's not, and they're not.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list