whole grains such as wheat and oats contain fiber, raffinose, and starch. all of these are broken down by bacteria in the large intestine, which leads to gas. in fact, rice is the only grain that doesn't cause gas.