I assumed, at first, that it was somehow falling through the infinite loop and accidentally runnning the unreachable function, but it clearly explicitly runs it in the assembler generated…

10f4: 48 8d 3d d5 00 00 00  lea    0xd5(%rip),%rdi        # 11d0 <_Z11unreachablev>
10fb: ff 15 b7 2e 00 00     call   *0x2eb7(%rip)        # 3fb8 <__libc_start_main@GLIBC_2.34>

how odd.

edit: ah, it’s called from __start, which suggests that main is being elided entirely by the optimiser, and somehow ‘unreachable’ is simply becoming a defacto ‘main’

anders
link
fedilink
02Y

@yogthos What. That’s not possible? 😃

☆ Yσɠƚԋσʂ ☆
creator
link
fedilink
02Y

my guess is the optimizer detects the infinite loop and removes it

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.48K Posts
  • 32.7K Comments
  • Modlog