D.gnu - In/out contract inheritance in gdc
- Joseph Rushton Wakeling (21/21) Apr 13 2012 Hello all,
- Leandro Lucarella (11/32) Apr 13 2012 Doesn't look exactly like the same problem, but just in case, you might
- Joseph Rushton Wakeling (10/13) Apr 13 2012 Hmmm. Compiling still fails when -inline is removed from the compiler
- Joseph Rushton Wakeling (31/34) Apr 17 2012 Here's a minimal(-ish) example that reproduces the problem (with or with...
- Daniel Green (2/3) Apr 17 2012 Please do. We're still using BitBucket at the moment.
- Joseph Rushton Wakeling (4/7) Apr 18 2012 OK, done:
- Iain Buclaw (12/26) Apr 17 2012 -1727483681u,11,7,-1658038656u,15,-272236544u,18)).SamplingAlgorithmSkip...
- Joseph Rushton Wakeling (2/5) Apr 17 2012 Oh, fantastic! Very pleased to hear that 4.7.0 will be making it into P...
Hello all, I've come across a compilation problem with gdc 4.6.3 (the package in the Ubuntu repositories). I have some code, available from https://github.com/WebDrake/SampleD ... which uses in contracts on some class functions: a base class has one in contract for one of its methods (lines 16-26), and a subclass overrides this method and provides its own in contract (lines 50-66). If I compile without the -release switch, e.g. gdmd -O -inline -oftest sampled.d I get the following error: sampled.d:50: Error: function [classname].select cannot get frame pointer to __require Is this an instance of this bug? https://bitbucket.org/goshawk/gdc/issue/78/d1-d2-in-out-contract-inheritance ... or something different? The code compiles without problem using regular dmd. 'Tis a shame, as in general I'm finding gdc much preferable to dmd -- the code it produces is much, much faster! Thanks and best wishes, -- Joe
Apr 13 2012
Joseph Rushton Wakeling, el 13 de abril a las 23:36 me escribiste:Hello all, I've come across a compilation problem with gdc 4.6.3 (the package in the Ubuntu repositories). I have some code, available from https://github.com/WebDrake/SampleD ... which uses in contracts on some class functions: a base class has one in contract for one of its methods (lines 16-26), and a subclass overrides this method and provides its own in contract (lines 50-66). If I compile without the -release switch, e.g. gdmd -O -inline -oftest sampled.d I get the following error: sampled.d:50: Error: function [classname].select cannot get frame pointer to __requireDoesn't look exactly like the same problem, but just in case, you might want to take a look at this bug: http://d.puremagic.com/issues/show_bug.cgi?id=7699 -- Leandro Lucarella (AKA luca) http://llucax.com.ar/ ---------------------------------------------------------------------- GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05) ---------------------------------------------------------------------- If you don't know what direction you should take You don't know where you are
Apr 13 2012
On 14/04/12 02:11, Leandro Lucarella wrote:Doesn't look exactly like the same problem, but just in case, you might want to take a look at this bug: http://d.puremagic.com/issues/show_bug.cgi?id=7699Hmmm. Compiling still fails when -inline is removed from the compiler statement, but now there are _two_ errors reported: gdc -oftest sampled.d sampled.d:87: Error: function sampled.SamplingAlgorithmSkip!(MersenneTwisterEngine!(uint,32,624,397,31,-1727483681u,11,7,-1658038656u,15,-272236544u,18)).Sampling lgorithmSkip.select cannot get frame pointer to __require sampled.d:50: Error: function sampled.SamplingAlgorithmS!(MersenneTwisterEngine!(uint,32,624,397,31,-1727483681u,11,7,-1658038656u,15,-272236544u,18)).Sampl ngAlgorithmS.select cannot get frame pointer to __require
Apr 13 2012
On 14/04/12 02:11, Leandro Lucarella wrote:Doesn't look exactly like the same problem, but just in case, you might want to take a look at this bug: http://d.puremagic.com/issues/show_bug.cgi?id=7699Here's a minimal(-ish) example that reproduces the problem (with or without -inline statement in place). The same compiler error arises if you replace in{} with out{}. ///////////////////////////////////////////////////////////// class A { double foo(double x) in { assert(x>0); } body { return x+1; } } class B : A { override double foo(double x) in { assert(x>10); } body { return x+10; } } ///////////////////////////////////////////////////////////// Shall I make a new bug report? Is it preferred at BitBucket or GitHub?
Apr 17 2012
On 4/17/2012 9:44 AM, Joseph Rushton Wakeling wrote:Shall I make a new bug report? Is it preferred at BitBucket or GitHub?Please do. We're still using BitBucket at the moment.
Apr 17 2012
On 17/04/12 21:16, Daniel Green wrote:On 4/17/2012 9:44 AM, Joseph Rushton Wakeling wrote:OK, done: https://bitbucket.org/goshawk/gdc/issue/333/in-out-contract-overrides-cause-cannot-get Following Iain's remarks, this will hopefully be short-lived. :-)Shall I make a new bug report? Is it preferred at BitBucket or GitHub?Please do. We're still using BitBucket at the moment.
Apr 18 2012
On 14 April 2012 02:17, Joseph Rushton Wakeling <joseph.wakeling webdrake.net> wrote:On 14/04/12 02:11, Leandro Lucarella wrote:-1727483681u,11,7,-1658038656u,15,-272236544u,18)).SamplingAlgorithmSkip.se= lectDoesn't look exactly like the same problem, but just in case, you might want to take a look at this bug: http://d.puremagic.com/issues/show_bug.cgi?id=3D7699Hmmm. =A0Compiling still fails when -inline is removed from the compiler statement, but now there are _two_ errors reported: gdc -oftest sampled.d sampled.d:87: Error: function sampled.SamplingAlgorithmSkip!(MersenneTwisterEngine!(uint,32,624,397,31,=cannot get frame pointer to __require sampled.d:50: Error: function sampled.SamplingAlgorithmS!(MersenneTwisterEngine!(uint,32,624,397,31,-17=27483681u,11,7,-1658038656u,15,-272236544u,18)).SamplingAlgorithmS.selectcannot get frame pointer to __requireI can't reproduce this or the bug in puremagic on my build, so I will go on the assumption this will be fixed in the 4.7.0 package due to ship with Ubuntu at the end of the month. Regards --=20 Iain Buclaw *(p < e ? p++ : p) =3D (c & 0x0f) + '0';
Apr 17 2012
On 17/04/12 22:56, Iain Buclaw wrote:I can't reproduce this or the bug in puremagic on my build, so I will go on the assumption this will be fixed in the 4.7.0 package due to ship with Ubuntu at the end of the month.Oh, fantastic! Very pleased to hear that 4.7.0 will be making it into Precise.
Apr 17 2012