Kernels of corn are generally safe for dogs to eat, and corn is a common ingredient in commercial dog food, although most high-quality brands avoid it. However, dogs should never be given corn cobs, because they can cause intestinal obstructions, which may require surgery to resolve.
Some dogs have trouble digesting corn, so it may cause stomach upset, and carbohydrates like corn are not part of the diet dogs evolved to eat, so its nutritional value is questionable. However, most dogs can eat it without negative effects. Corn with high-fat toppings like butter can pose a risk of pancreatitis, which is a potentially life-threatening condition.