All pumpkins, squashes, and gourds are edible except wild-growing: Coyote Melon (Coyote Gourd/Cucurbita californica/Cucurbita palmata), Buffalo Gourd (Wild Pumpkin/Cucurbita Foetidissima), Cucurbita cordata, Cucurbita cylindrata, and Cucurbita digitata.
Although all the other pumpkins, squashes, and gourds are edible they can sometimes cause a condition called toxic squash syndrome or cucurbit poisoning.
All the cucurbits contain Cucurbitacin E that protects them from insects but it can be toxic at high concentration. The increase of Cucurbitacin E may be caused by various factors (for example weather conditions) and it can result in fruits tasting bitter.
Rule of the thumb- if it tastes bitter don't eat it. An exception of the rule is the young snake gourd that may have a slightly bitter flavor when it's raw (it disappears after cooking).
Learn more about uneatable pumpkins:
1) Buffalo Gourd
Cucurbita foetidissima or Buffalo Gourd or Wild Pumpkin
Photo: Outdoor Self Reliance
Wild-growing. Found in northern Mexico and central & southwestern US. It easily survives desert environments. It's small to medium, smooth & round. It has dark-green skin with white stripes, streaks, and spots when it's young, and yellow (melon-like) peel (rind) when it's mature. Uneatable for humans. This gourd is easily recognizable because of its odor (its leaves have a very distinctive smell). Many tribes believed that buffalo gourd roots and leaves had healing properties. Its seeds were often used to make soaps and washing liquids. It can be grown intentionally in fairly dry areas. Although its seeds are suitable for roasting and boiling, I, personally, would stay away! Nowadays, it's usually grown for ornamental purposes.
2) Coyote Melon
Photo: ©2009 Neal Kramer
Wild-growing in desert environments (USA, Mexico). It looks almost exactly like a young buffalo gourd. It's known to be a coyote snack (hence the name), it's uneatable for humans.
3) Cucurbita cordata, Cucurbita cylindrata, and Cucurbita digitata
They look almost exactly the same as buffalo gourds and coyote melons. Small differences being visible only to botanists. It's also worth noting that all those species hybridize easily.