Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

[ICE] bug in parser: loaded a variable that was not declared #473

Description

@Byter09

Code

union u2 u2a;

unions()
{
    u2a ;
}

Expected behavior

Not really a C expert so I have no clue :)

Backtrace
The application panicked (crashed).
Message:  bug in parser: loaded a variable that was not declared
Location: /storage/saltwater/src/ir/expr.rs:417

Run with RUST_BACKTRACE=full to include source snippets.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                              ⋮ 4 frames hidden ⋮                               
 5: core::panicking::panic_fmt::h1ac71ad045d55416
    at src/libcore/panicking.rs:111
 6: core::option::expect_failed::h7baa1c60813ff0e3
    at src/libcore/option.rs:1260
 7: core::option::Option<T>::expect::haf0fc5ded7f49bbc
    at /rustc/49cae55760da0a43428eba73abcb659bb70cf2e4/src/libcore/option.rs:347
 8: saltwater::ir::expr::<impl saltwater::ir::Compiler<B>>::load_addr::h96d89eb40825f3f0
    at /storage/saltwater/src/ir/expr.rs:417
 9: saltwater::ir::expr::<impl saltwater::ir::Compiler<B>>::compile_expr::hdc8bc448035e1104
    at /storage/saltwater/src/ir/expr.rs:42
10: saltwater::ir::stmt::<impl saltwater::ir::Compiler<B>>::compile_stmt::h33303ef196213b5a
    at /storage/saltwater/src/ir/stmt.rs:41
11: saltwater::ir::stmt::<impl saltwater::ir::Compiler<B>>::compile_all::ha6f77f726593b383
    at /storage/saltwater/src/ir/stmt.rs:19
12: saltwater::ir::Compiler<B>::compile_func::h06b4843792beea31
    at /storage/saltwater/src/ir/mod.rs:354
13: saltwater::ir::compile::h57a6ec8de4266bb2
    at /storage/saltwater/src/ir/mod.rs:133
14: saltwater::compile::h450fea7b729b8e55
    at /storage/saltwater/src/lib.rs:303
15: swcc::aot_main::hedfb546d31e85013
    at src/main.rs:175
16: swcc::real_main::hbda82e0ba7f269af
    at src/main.rs:164

Metadata

Metadata

Assignees

No one assigned

    Labels

    ICEInternal Compiler Error (panic)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions