Gurobi got a wrong result when showing "Solved" in a simple question

I got cvx_optval = 0 with Gurobi, and -32.5 with other solvers. So this appears to be a bug either in Gurobi or in the CVX/Gurobi interface. Similar to what was found at Gurobi ignores constraints .

Therefore, I recommend you don’t use Gurobi under CVX.