|
From: | Pavel Roskin |
Subject: | Re: Lilypond miscompiled on Fedora 17 |
Date: | Fri, 04 May 2012 15:44:59 -0400 |
User-agent: | Internet Messaging Program (IMP) H3 (4.1.4) |
Quoting David Kastrup <address@hidden>:
Pavel Roskin <address@hidden> writes:Quoting David Kastrup <address@hidden>:That would have been my most likely guess. Probably the "min" function call.You are absolultely right! I was able to work around the gcc bug by making a separate function for Moment comparison and using it instead of min(): Moment min_moment (Moment m1, Moment m2) { return min (m1, m2); }What happens if you declare this (Moment const &m1, Moment const &m2)
The bug is present ("moving back in time") I tried all combinations: (Moment m1, Moment m2) - OK (Moment m1, Moment const &m2) - OK (Moment const &m1, Moment m2) - Bad (Moment const &m1, Moment const &m2) - BadMaybe the produced code is not interested in the result because the original value of next is infinite and gcc think that the comparison only happens once per call? But then it would not call the compare method.
Let me try to find the exact optimization flag responsible for the breakage. -- Regards, Pavel Roskin
[Prev in Thread] | Current Thread | [Next in Thread] |