Thread overview
[Issue 14987] Internal error: backend/cod1.c 1711
Aug 31, 2015
Luís Marques
Aug 31, 2015
rswhite4@gmail.com
Sep 01, 2015
Vladimir Panteleev
Sep 01, 2015
Vladimir Panteleev
Sep 01, 2015
Kenji Hara
Sep 01, 2015
Vladimir Panteleev
Oct 03, 2015
Walter Bright
August 31, 2015
https://issues.dlang.org/show_bug.cgi?id=14987

Luís Marques <luis@luismarques.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luis@luismarques.eu

--- Comment #1 from Luís Marques <luis@luismarques.eu> ---
rswhite4, although the compiler error should be fixed, I don't think this code was going to work anyway. size_t[4] and size_t[5] are different types, and `auto dim(size_t dim);` is not a template, so you would not be able to return one or the other from the same function.

Did you mean to write something like this?

    import std.range : repeat, take, array;

    auto dim(size_t n)()
    {
        size_t[n] a = n.repeat.take(n).array;
        return a;
    }

    void main()
    {
        auto arr1 = dim!4;
    }

--
August 31, 2015
https://issues.dlang.org/show_bug.cgi?id=14987

--- Comment #2 from rswhite4@gmail.com ---
(In reply to Luís Marques from comment #1)
> rswhite4, although the compiler error should be fixed, I don't think this code was going to work anyway. size_t[4] and size_t[5] are different types, and `auto dim(size_t dim);` is not a template, so you would not be able to return one or the other from the same function.
> 
> Did you mean to write something like this?
> 
>     import std.range : repeat, take, array;
> 
>     auto dim(size_t n)()
>     {
>         size_t[n] a = n.repeat.take(n).array;
>     	return a;
>     }
> 
>     void main()
>     {
>     	auto arr1 = dim!4;
>     }

Nope, just testing.

--
September 01, 2015
https://issues.dlang.org/show_bug.cgi?id=14987

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com
           Severity|major                       |regression

--- Comment #3 from Vladimir Panteleev <thecybershadow@gmail.com> ---
This is a regression.

Introduced by https://github.com/D-Programming-Language/dmd/pull/1361

--
September 01, 2015
https://issues.dlang.org/show_bug.cgi?id=14987

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice

--
September 01, 2015
https://issues.dlang.org/show_bug.cgi?id=14987

--- Comment #4 from Kenji Hara <k.hara.pg@gmail.com> ---
In my local Windows environment, both of -m32 and -m64 didn't cause backend ICE.

--
September 01, 2015
https://issues.dlang.org/show_bug.cgi?id=14987

--- Comment #5 from Vladimir Panteleev <thecybershadow@gmail.com> ---
Mine too, forgot to mention that. It is strange. But I reproduced it on Linux.

--
October 03, 2015
https://issues.dlang.org/show_bug.cgi?id=14987

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|---                         |DUPLICATE

--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> ---


*** This issue has been marked as a duplicate of issue 14782 ***

--