There are two possible scenarios.
One would be using diesel in a spark ignition engine.
This is common in parts of the world where diesel is more readily available than gasoline, like Cuba.
You start the engine on gasoline and then switch to diesel after it warms up. This works with old, low compression engines.
It might not work as well with more modern engines, since diesel has very low octane.
The second possibility would be a compression ignition engine using gasoline as a fuel. This has been tried as well and there is some serious work going on to evaluate such designs for production.
Of which were you thinking?
12 Accord LX 15K HGMO 0W-20
09 Forester 64K PU 5W-30
02 Accord 119K G-Oil 5W-30
01 Focus ZX3 89K Maxlife 5W-30
95 BMW 318iC 143K Maxlife 10W40