Thread overview
[Issue 7412] New: void16 assignment shows interesting errors
Jan 31, 2012
Manu
[Issue 7412] ICE(mtype.c) void16 assignment shows interesting errors
Oct 07, 2013
Walter Bright
Oct 07, 2013
Manu
Oct 07, 2013
Iain Buclaw
Oct 07, 2013
Iain Buclaw
January 31, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7412

           Summary: void16 assignment shows interesting errors
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: turkeyman@gmail.com


--- Comment #0 from Manu <turkeyman@gmail.com> 2012-01-31 10:44:25 PST ---
This line produces the following error:
  void16 x = 1.0;

$ /opt/gdc/bin/gdc test.d -O2 -S -msse2
Assertion failed: tob->flags & TFLAGSfloating, file ../../gcc/d/dmd2/mtype.c,
line 3290

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
cc1d.exe: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bitbucket.org/goshawk/gdc/issues> for instructions.


This is possibly not the most informative message :)
Also, this line:
  void16 x = 1;

compiles, performs effectively:
  byte16 = 1;

I wonder if you should be able to assign an integer to void16 at all. Assigning
the float fails with an interesting message, assigning an integer should
probably fail too?
I think void16 should only be for blind casting between vector types, or
storage of un-typed values.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 07, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7412


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2013-10-06 22:13:10 PDT ---
With DMD, the following program:

----
  import core.simd;
  void16 x = 1.0;
----

produces the error message:

Error: cannot implicitly convert expression (1.00000) of type double to
__vector(void[16])

Which I believe is correct. It's possible this is a gdc only error - refile at

https://bitbucket.org/goshawk/gdc/issues

?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 07, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7412



--- Comment #2 from Manu <turkeyman@gmail.com> 2013-10-07 03:34:50 PDT ---
(In reply to comment #1)
> With DMD, the following program:
> 
> ----
>   import core.simd;
>   void16 x = 1.0;
> ----
> 
> produces the error message:
> 
> Error: cannot implicitly convert expression (1.00000) of type double to
> __vector(void[16])
> 
> Which I believe is correct. It's possible this is a gdc only error - refile at
> 
> https://bitbucket.org/goshawk/gdc/issues
> 
> ?

Or it could have been fixed in the last almost-2-years :) I'll try it again with GDC.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 07, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7412


Iain Buclaw <ibuclaw@ubuntu.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@ubuntu.com


--- Comment #3 from Iain Buclaw <ibuclaw@ubuntu.com> 2013-10-07 03:42:37 PDT ---
An ICE in mtype.c  ->  Front-end issue, not a gdc problem. :o)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 07, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7412



--- Comment #4 from Iain Buclaw <ibuclaw@ubuntu.com> 2013-10-07 03:50:30 PDT ---
Having a quick test with copies that I've still got lingering around.

This ICE's with v2.060, but not v2.061 or later.

See this commit: https://github.com/D-Programming-Language/dmd/commit/f018414a1b80805d1ac50889907a254653ceabcf#diff-ffafa03255a57832dd09031af6cb915dL3330


Also, please refile gdc bugs at http://bugzilla.gdcproject.org  :-)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------