In what compounds does oxygen exhibit +½ oxidation state? Theoretically it is said that the compound can show oxidation states in the interval $[n,n-8]$ where $n$ is the number of valence electrons.

Is there any compound in which oxygen shows +1/2 oxidation state. If so, then please provide an example.
Yes. The dioxygenyl ion, $\ce{O_{2}^+}$, is a rarely-encountered oxycation in which both oxygen atoms have a formal oxidation state of +1/2. It is formally derived from oxygen by the removal of an electron:

$$\ce{O_{2} → O_{2}^+ + e^{-}}$$

Source