Hi devs,

I just found that the Cmm code of `GHC.Base.id` refers to `breakpoint`
in the same module, however, in the Haskell source of `GHC.Base`, the
definition of `id` and `breakpoint` are totally unrelated:

```
id                      :: a -> a
id x                    =  x

breakpoint :: a -> a
breakpoint r = r
```

And here's the pretty-printed Cmm code:

```
base_GHCziBase_id_entry() //  [R2]
          { []
          }
      {offset
        chwa: // global
            R2 = R2;
            call base_GHCziBase_breakpoint_entry(R2) args: 8, res: 0, upd: 8;
      }
base_GHCziBase_breakpoint_entry() //  [R2]
          { []
          }
      {offset
        chvW: // global
            R1 = R2;
            call stg_ap_0_fast(R1) args: 8, res: 0, upd: 8;
      }
```

This looks suspicious. I'm curious if this is intended behavior of ghc.

Regards,
Shao Cheng
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to