Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[ICE] crash on &= for struct #244

Closed
jyn514 opened this issue Feb 4, 2020 · 0 comments
Closed

[ICE] crash on &= for struct #244

jyn514 opened this issue Feb 4, 2020 · 0 comments
Labels
blocked Waiting for another project to implement a feature or fix a bug bug Something isn't working ICE Internal Compiler Error (panic) parser Issue to do with parsing the abstract syntax tree

Comments

@jyn514
Copy link
Owner

jyn514 commented Feb 4, 2020

Expected behavior
The parser should give an error.

Actual Behavior
RCC crashes during codegen.

Code

struct S {
    int x, y, z;
};

int main() {
    struct S s;
    struct S ss;
    s&= ss;
}
Message:  internal error: entered unreachable code: struct should not have a valid complex assignment
Backtrace
 5: rcc::ir::expr::<impl rcc::ir::Compiler>::assignment::ha78a694033530e5c
    at src/ir/expr.rs:501
 6: rcc::ir::expr::<impl rcc::ir::Compiler>::compile_expr::h5a9edf87abd8a6c3
    at src/ir/expr.rs:102
 7: rcc::ir::stmt::<impl rcc::ir::Compiler>::compile_stmt::h7778ce4d5aea5687
    at src/ir/stmt.rs:37
 8: rcc::ir::stmt::<impl rcc::ir::Compiler>::compile_all::h3fb60796f67c8f57
    at src/ir/stmt.rs:15
 9: rcc::ir::Compiler::compile_func::h9a997ea2c8bdcd6f
    at src/ir/mod.rs:322
10: rcc::ir::compile::haeb8251a574ff20c
    at src/ir/mod.rs:78
11: rcc::compile::h87633814d689a39f
    at src/lib.rs:98
12: rcc::real_main::h1dd2cb989e6fa0d8
    at src/main.rs:101
13: rcc::main::h396b827397690aa0
    at src/main.rs:169

Waiting on #151, similar to #214.

@jyn514 jyn514 added bug Something isn't working parser Issue to do with parsing the abstract syntax tree blocked Waiting for another project to implement a feature or fix a bug ICE Internal Compiler Error (panic) labels Feb 4, 2020
@jyn514 jyn514 closed this as completed May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked Waiting for another project to implement a feature or fix a bug bug Something isn't working ICE Internal Compiler Error (panic) parser Issue to do with parsing the abstract syntax tree
Projects
None yet
Development

No branches or pull requests

1 participant