www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8627] New: Internal error: ../ztc/cgcs.c 343

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8627

           Summary: Internal error: ../ztc/cgcs.c 343
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: blooh_ hotmail.com



01:44:05 PDT ---
The code below errors with an internal error:


// ------------------------------
import std.stdio;

class Test
{
public:  
  auto whatever()
  {
    float[1] tmp;
    return tmp;
  }
}

void main()
{
  auto test = new Test;
  writeln( test.whatever()[0] );
}
// ------------------------------


This looks quite simple, hopefully I'm not doing anything wrong?
It's working when I initialize tmp with a size of at least 3 elements.


Cheers,
Christopher.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 07 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8627


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |clugdbug yahoo.com.au
            Summary|Internal error:             |ICE(cgcs.c): indexing a
                   |../ztc/cgcs.c 343           |returned value of type
                   |                            |float[1]
           Severity|blocker                     |normal



When you see an internal error, you're NEVER doing something wrong.

Reduced test case:
-------------------
float[1] bug8627()
{
    float[1] tmp;
    return tmp;
}

void test8627()
{
   float f = bug8627()[0];
}

Internal error: ../ztc/cgcs.c 343

Dropping importance to normal, because the importance is already covered by the
ICE keyword.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 13 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8627


Don <clugdbug yahoo.com.au> changed:

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



And it's a duplicate anyway.

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

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