[Bug 77] New: ICE with static array argument

gdc-bugzilla at gdcproject.org gdc-bugzilla at gdcproject.org
Tue Sep 10 12:29:07 PDT 2013


http://bugzilla.gdcproject.org/show_bug.cgi?id=77

             Bug #: 77
           Summary: ICE with static array argument
    Classification: Unclassified
           Product: GDC
           Version: 4.8.x
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gdc
        AssignedTo: ibuclaw at gdcproject.org
        ReportedBy: marek at janukowicz.net


import std.bitmanip;

void fun (ubyte[3] buf) {
  bigEndianToNative!ushort(buf[0..2]);
}
void main () {
  fun([1,2,3]);
} 

Result:

gdc_arr.d: In function ‘fun’:
gdc_arr.d:4: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have array_type in d_array_value, at
d/d-codegen.cc:1070
0xb7e441 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc-4.8.1/gcc/tree.c:8946
0x622f37 tree_check3
        ../../gcc-4.8.1/gcc/tree.h:3724
0x622f37 tree_check3
        ../../gcc-4.8.1/gcc/d/d-codegen.cc:1064
0x622f37 d_array_value(tree_node*, tree_node*, tree_node*)
        ../../gcc-4.8.1/gcc/d/d-codegen.cc:1070
0x657868 SliceExp::toElem(IRState*)
        ../../gcc-4.8.1/gcc/d/d-elem.cc:1321
0x62652b IRState::call(TypeFunction*, tree_node*, tree_node*,
ArrayBase<Expression>*)
        ../../gcc-4.8.1/gcc/d/d-codegen.cc:2108
0x65868a CallExp::toElem(IRState*)
        ../../gcc-4.8.1/gcc/d/d-elem.cc:1618
0x65893b Expression::toElemDtor(IRState*)
        ../../gcc-4.8.1/gcc/d/d-elem.cc:1639
0x65d2bf ExpStatement::toIR(IRState*)
        ../../gcc-4.8.1/gcc/d/d-toir.cc:525
0x65d1b8 CompoundStatement::toIR(IRState*)
        ../../gcc-4.8.1/gcc/d/d-toir.cc:493
0x62c351 FuncDeclaration::toObjFile(int)
        ../../gcc-4.8.1/gcc/d/d-objfile.cc:1064
0x62d8be Module::genobjfile(int)
        ../../gcc-4.8.1/gcc/d/d-objfile.cc:1251
0x616a89 d_parse_file()
        ../../gcc-4.8.1/gcc/d/d-lang.cc:1105

The same code compiles fine in DMD.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the D.gnu mailing list