Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: internal compiler error: create_function: unexpected sort of node #3708

Closed
ashee opened this issue Oct 9, 2012 · 1 comment
Closed

Comments

@ashee
Copy link

ashee commented Oct 9, 2012

my environment

amitava:l2 amitava$ uname -a
Darwin amitava.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64
amitava:l2 amitava$ rustc --version
rustc 0.4 (c3f9b72 2012-09-30 21:35:32 -0700)
host: x86_64-apple-darwin

This error is generated only with the rustc -g option.

source code

// struct-test.rs

use io::println;

fn main() {
  // define struct
  struct Bomb {
    timer: uint,

    // destructor
    drop {
      for iter::repeat(self.timer) {
        println("bam");
      }
    }
   }

  // use Bomb
  let x = 10;
  match x {
    10 => { let b = Bomb{timer:10}; println(fmt!("%?", b)); }
    _ => { println("not 10") }
  }
}

compile with -g option (error)

amitava:l2 amitava$ rustc -g struct-test.rs 
error: internal compiler error: create_function: unexpected sort of node

compile without -g option (no error)

amitava:l2 amitava$ rustc struct-test.rs
warning: no debug symbols in executable (-arch x86_64)
amitava:l2 amitava$ ./struct-test
{ timer: 10 }
bam
bam
bam
bam
bam
bam
bam
bam
bam
bam
@catamorphism
Copy link
Contributor

Thanks for reporting this, but it's already known that debuginfo needs a lot of work: see #2194.

RalfJung pushed a commit to RalfJung/rust that referenced this issue Jun 29, 2024
tests for when a thread-local gets initialized in a tls dtor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants