Skip to content

`-O` affects selection of overlapping instances

See https://gist.github.com/viercc/eb6a4231636f91c89ee934d0ae425ba2:

$ ./main.o0  # compiled with -O0
outer:outer:
inner:outer:
$ ./main.o1  # compiled with -O1
top:top:
top:top:

Expected behaviour would be one with -O0 - possible solutions:

  1. find combination of flags that preserves behaviour we want
  2. investigate possibility of using plugin to prevent unwanted optimization in context of FCI
  3. restrict interface to avoid these situations

I'm personally inclined to 1. or 2.. reflection may be source of inspiration with this issue, though AFAIK they simply choose 3. in all cases.

Relevant flags (not exhaustive):

Edited by TheMatten
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information