Minor Bug

Brad Anderson eco at gnuk.net
Sat Jan 11 14:56:03 PST 2014


On Saturday, 11 January 2014 at 22:41:55 UTC, Bug Detector wrote:
> Since I do not have a "The D Programming Language Issue Tracking
> System account" I hope it is acceptable to report a minor issue
> here. Thank all of you for your great work!
>
> // begin bug.d
>
> struct foo(int bar)
> {
>     static const int bar = bar;  // Thou shalt not write shit.
> }
>
> void main()
> {
>     alias foo!(0) foo_t;
> }
>
> // end bug.d
>
> $ dmd bug.d
> Segmentation fault (core dumped)
> $ dmd
> DMD64 D Compiler v2.064
>
> $ gdc bug.d
> gdc: internal compiler error: Segmentation fault (program cc1d)
> $ gdc --version
> gdc (GCC) 4.8.2 20130725 (prerelease)
>
> Platform: GNU/Linux x86_64

On dmd git HEAD this no longer crashes and instead outputs these
errors:

/d28/f520.d(5): Error: variable bar cannot be read at compile time
/d28/f520.d(10): Error: template instance f520.foo!(0) error
instantiating


More information about the Digitalmars-d mailing list