digitalmars.D.bugs - [Issue 14613] New: DMD: Internal error: backend/cod1.c 1567 on '-O'
- via Digitalmars-d-bugs (35/35) May 21 2015 https://issues.dlang.org/show_bug.cgi?id=14613
https://issues.dlang.org/show_bug.cgi?id=14613 Issue ID: 14613 Summary: DMD: Internal error: backend/cod1.c 1567 on '-O' switch Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: saurabh.das gmail.com Created attachment 1523 --> https://issues.dlang.org/attachment.cgi?id=1523&action=edit reduced_expr.d We have been working on a genetic programming project, and occasionally the compiler fails and gives an internal error. I've captured and reduced one of these down to a single expression. See reduced_expr.d (http://dpaste.dzfl.pl/raw/e7a66aa067ab) When I compile this file using: 'dmd -c -O reduced_expr.d' it fails with: DMD 2.066.1] Internal error: backend/cod1.c 1562 DMD 2.067.1] Internal error: backend/cod1.c 1567 The compile succeeds without the '-O' flag. Using dustmite, the expression in the file reduces to: double someFunction(double AvgPriceChangeNormalized, double TicksTenMinutesNormalized) { return (TicksTenMinutesNormalized?1:AvgPriceChangeNormalized)1:TicksTenMinutesNormalized/(TicksTenMinutesNormalized==0)==0; } This internal error has been reproduced on Linux (x86_64) and MacOS and on DMD versions 2.066.1 and 2.067.1. --
May 21 2015