Thread overview
Re: Compilation issue
Oct 20, 2015
David Nadlinger
Oct 23, 2015
Russel Winder
Oct 23, 2015
David Nadlinger
Oct 23, 2015
kink
Oct 23, 2015
Russel Winder
October 20, 2015
It's probably a real issue. We've had to change the code that emits this error message (or something very similar) recently - yes, for inexplicable reasons it's in the glue layer.

- David

---
Sent from a mobile device.
On 20 Oct 2015 7:17 pm, "Russel Winder via digitalmars-d-ldc" <
digitalmars-d-ldc@puremagic.com> wrote:

> The construct:
>
>   immutable pi = 4.0 * delta * taskPool.reduce!"a + b"(map!((int i){
>         immutable x = (i - 0.5) * delta;
>         return 1.0 / (1.0 + x * x);})
>     (iota(1, n + 1)));
>
> compiles fine with dmd 2.068.2. I believe it compiles fine with
> LDC 0.14.0 as packaged in Debian Sid. However with LDC compiled from
> Git master, 2.068 branch, I get:
>
> /home/users/russel/Built/include/d/std/parallelism.d(2637): Error: cannot
> access frame pointer of
> pi_parallel_unbatched_reduce.main.MapResult!(__lambda2, Result).MapResult
> /home/users/russel/Built/include/d/std/parallelism.d(2433): Error:
> function std.parallelism.TaskPool.reduce!"a +
> b".reduce!(MapResult!(__lambda2, Result)).reduce no return exp; or
> assert(0); at end of function
> pi_parallel_unbatched_reduce.d(36): Error: template instance
> std.parallelism.TaskPool.reduce!"a + b".reduce!(MapResult!(__lambda2,
> Result)) error instantiating
>
> LDC reports it's version as:
>
> LDC - the LLVM D compiler (d85d25):
>   based on DMD v2.068.0 and LLVM 3.6.2
>   Default target: x86_64-pc-linux-gnu
>   Host CPU: penryn
>   http://dlang.org - http://wiki.dlang.org/LDC
>
> Is this likely a real problem or is it some stupidity I have inflicted on my set up?
>
> --
> Russel.
>
> =============================================================================
> Dr Russel Winder      t: +44 20 7585 2200   voip:
> sip:russel.winder@ekiga.net
> 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk
> London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
>
>


October 23, 2015
On Tue, 2015-10-20 at 19:26 +0200, David Nadlinger via digitalmars-d- ldc wrote:
> It's probably a real issue. We've had to change the code that emits
> this
> error message (or something very similar) recently - yes, for
> inexplicable
> reasons it's in the glue layer.

Since the error appears revolve around code in std.parallelism, and it works with DMD, is this something for a bug report?

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



October 23, 2015
On 23 Oct 2015, at 9:36, Russel Winder via digitalmars-d-ldc wrote:
> Since the error appears revolve around code in std.parallelism, and it
> works with DMD, is this something for a bug report?

Yes – I must have somehow scared you into not reporting bugs on GitHub anymore. ;)

But as soon as you are reasonably confident it is not an issue with your environment (i.e. have cleaned the build directory, removed any non-standard build flags, etc.), please feel free to just create an issue on the tracker with your environment information (ldc2 -version, etc.) and reproduction steps.

 — David
October 23, 2015
On Friday, 23 October 2015 at 07:45:55 UTC, David Nadlinger wrote:
> On 23 Oct 2015, at 9:36, Russel Winder via digitalmars-d-ldc wrote:
>> Since the error appears revolve around code in std.parallelism, and it
>> works with DMD, is this something for a bug report?
>
> Yes – I must have somehow scared you into not reporting bugs on GitHub anymore. ;)
>
> But as soon as you are reasonably confident it is not an issue with your environment (i.e. have cleaned the build directory, removed any non-standard build flags, etc.), please feel free to just create an issue on the tracker with your environment information (ldc2 -version, etc.) and reproduction steps.

I could reproduce it yesterday with current merge-2.068. The first error (cannot access nested frame...) is firmly in front-end territory. It's again that weird issue that (templated) structs (MapResult etc.) get somehow nested in the local scope; in that front-end code, it traverses the struct's parents (the correct ones, i.e., some Phobos scope), but doesn't find the wrong parent it is searching for (my main() function).
I'd suspect an issue with merging the 2.068 front-end.
October 23, 2015
On Fri, 2015-10-23 at 09:45 +0200, David Nadlinger via digitalmars-d- ldc wrote:
> […]
> 
> Yes – I must have somehow scared you into not reporting bugs on
> GitHub
> anymore. ;)

:-)

> But as soon as you are reasonably confident it is not an issue with
> your
> environment (i.e. have cleaned the build directory, removed any
> non-standard build flags, etc.), please feel free to just create an
> issue on the tracker with your environment information (ldc2
> -version,
> etc.) and reproduction steps.

LDC master is fine, LDC 2.068 branch is problematic. Issue raised: http s://github.com/ldc-developers/ldc/issues/1166

I'll have to use LDC 2.067 for now :-(

But LDC remains the Number 1 D compiler, despite this.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder