Skip to content

Commit

Permalink
build_rabcdasm: Detect DMD bug 15861
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberShadow committed Apr 1, 2016
1 parent 68f6fa2 commit 3713165
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build_rabcdasm.d
@@ -1,5 +1,5 @@
/*
* Copyright 2010, 2011, 2012, 2013 Vladimir Panteleev <vladimir@thecybershadow.net>
* Copyright 2010, 2011, 2012, 2013, 2016 Vladimir Panteleev <vladimir@thecybershadow.net>
* This file is part of RABCDAsm.
*
* RABCDAsm is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -63,6 +63,7 @@ void test(string code, string extraFlags=null)

void testBug(string description, int bugId, string code)
{
stderr.writefln("* Checking for compiler bug %d...", bugId);
scope(failure)
{
stderr.writefln("Compiler bug detected: %s ( https://issues.dlang.org/show_bug.cgi?id=%d ).", description, bugId);
Expand Down Expand Up @@ -99,10 +100,12 @@ int main(string[] args)
void main() {}
`);

stderr.writeln("* Checking for known compiler bugs...");
testBug("[REG 2.064] Wrong code with -O on x86_64 for char comparisons", 11508, `
import assembler; int main() { foreach (c; "_") if (!Assembler.isWordChar(c)) return 1; return 0; }
`);
testBug("[REG 2.069] Wrong double-to-string conversion with -O", 15861, `
import std.format; int main() { return format("%.18g", 4286853117.0) == "4286853117" ? 0 : 1; }
`);

bool haveLZMA;

Expand Down

0 comments on commit 3713165

Please sign in to comment.