https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77980

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at nextmovesoftware dot 
com

--- Comment #8 from Roger Sayle <roger at nextmovesoftware dot com> ---
/* Quantum computing using GCC.  */

unsigned int random_number() __attribute__((pure));

/* Inspired by the classic double split experiment in physics.  */
int is_schrodingers_cat_alive_p()
{
  /* Flip a coin: Heads or tails.  */
  int qin = random_number() & 1;
  /* Quantum logic gate: 1->1 0->boom! */
  int qbit = 1/qin;
  /* Now collapse the wave function */
  return qbit;
}

/* If a tree falls in forest... Does GCC even call random_number? */
/* { dg-final { scan-assembler-not "random_number" } } */
/* "If you think you understand quantum mechanics, then you don't"
        - Richard Feynman */

Reply via email to