arocc icon indicating copy to clipboard operation
arocc copied to clipboard

Crash: decayed attributed array

Open ehaas opened this issue 3 years ago • 0 comments

I believe we might need a decayed_attributed type specifier - currently, decaying an attributed array turns it into a .special_va_start

__attribute__((aligned)) int foo[1] = {0};
int *bar = foo;
thread 9698834 panic: reached unreachable code
/Users/ehaas/source/arocc/src/Type.zig:1427:21: 0x10399d5df in Type.Builder.fromType (arocc)
            else => unreachable,
                    ^
/Users/ehaas/source/arocc/src/Type.zig:1515:48: 0x10396060c in Type.printPrologue (arocc)
        else => try w.writeAll(Builder.fromType(ty).str().?),
                                               ^
/Users/ehaas/source/arocc/src/Type.zig:1448:29: 0x10395f8fa in Type.print (arocc)
    _ = try ty.printPrologue(w);

ehaas avatar Feb 05 '22 17:02 ehaas