www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 49] New: segmentation fault when using tuple over member

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

             Bug #: 49
           Summary: segmentation fault when using tuple over member
                    variable in more than one method
    Classification: Unclassified
           Product: GDC
           Version: development
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gdc
        AssignedTo: ibuclaw gdcproject.org
        ReportedBy: john.loughran.colvin gmail.com


test.d:

template Tuple(Stuff ...) {
    alias Stuff Tuple;
}
struct S {
    int i;
    alias Tuple!i t;
    void a() {
        auto x =3D t;
    }
    void b() {
        auto x =3D t;
    }
}
gdc -c test.d:

ldc_sf.d: In member function =E2=80=98ldc_sf.S.b=E2=80=99:
ldc_sf.d:11: internal compiler error: in expand_expr_real_1, at expr.c:9327
0x6eca3e expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
    /home/john/Git/GDC/gcc_for_gdc/gcc/expr.c:9322
0x6eabd4 expand_expr
    /home/john/Git/GDC/gcc_for_gdc/gcc/expr.h:444
0x6eabd4 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
    /home/john/Git/GDC/gcc_for_gdc/gcc/expr.c:9629
0x6ea03b expand_expr
    /home/john/Git/GDC/gcc_for_gdc/gcc/expr.h:444
0x6ea03b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
    /home/john/Git/GDC/gcc_for_gdc/gcc/expr.c:9890
0x6f3803 store_expr(tree_node*, rtx_def*, int, bool)
    /home/john/Git/GDC/gcc_for_gdc/gcc/expr.c:5239
0x6f4d0a expand_assignment(tree_node*, tree_node*, bool)
    /home/john/Git/GDC/gcc_for_gdc/gcc/expr.c:5025
0x64803f expand_gimple_stmt_1
    /home/john/Git/GDC/gcc_for_gdc/gcc/cfgexpand.c:2213
0x64803f expand_gimple_stmt
    /home/john/Git/GDC/gcc_for_gdc/gcc/cfgexpand.c:2309
0x648e9d expand_gimple_basic_block
    /home/john/Git/GDC/gcc_for_gdc/gcc/cfgexpand.c:4143
0x64aec6 gimple_expand_cfg
    /home/john/Git/GDC/gcc_for_gdc/gcc/cfgexpand.c:4662


ldc has a similar error: https://github.com/ldc-developers/ldc/issues/266

--=20
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are watching all bug changes.=
Apr 08 2013