Fortunately, they can consume cat food without much harm.
They are actually quite attracted to it, likely due to the higher protein levels that cats need in their diet.
While no health problems will occur immediately, it is not completely healthy to feed your dog exclusively cat food.
If it were best, companies would rebrand cat food as dog food.