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 30K TGMO 0W-20
09 Forester 67K PU 5W-30
02 Accord 134K GOil 5W-30
01 Focus ZX3 101K Meijer Syn 5W-20
95 BMW 318iC 150K Defy 10W-40