Source: The Motley Fool.

Warren Buffett has built one of the largest fortunes in the world by investing in solid and reliable high-quality stocks. Given his international reputation as an investing guru, investors looking for rock-solid companies to hold in retirement have good reasons to search for opportunities among Warren Buffett's favorite stocks. Names such as Berkshire Hathaway (BRK.A 1.18%) (BRK.B 1.30%), Coca-Cola (KO 2.14%), and Wal-Mart (WMT 0.46%) are interesting candidates to consider from this point of view.

Berkshire Hathaway
Berkshire Hathaway is the ultimate Warren Buffett stock. The company is a diversified collection of high-quality business in different industries, most of them carefully selected by Buffett himself over the decades. Safety and reliability are crucial factors to consider when investing for retirement, and Berkshire Hathaway offers both quality and diversification, so the company is truly exceptional in that regard.

Berkshire's business model is unique. The company's insurance and reinsurance operations are remarkably profitable, and Berkshire has turned an underwriting profit over the past 12 consecutive years. In addition, this segment provides the float, meaning money that's not owned by Berkshire but can be used to invest for its own benefit. Over the past 12 years the company has more than doubled the size of its float, from $41 billion to $84 billion. While the size of the float isn't reflected in Berkshire's earnings, it generates significant investment income because of the assets it allows the company to hold.

Size is a major advantage when it comes to safety and stability, but it can also be a drag on performance. Berkshire needs to focus on relatively big investment opportunities because of its gargantuan asset base, and this clearly reduces opportunities for superior returns. It won't be easy for the company to continue beating the market by a wide margin over the years ahead, but Berkshire has what it takes to continue delivering solid returns through good and bad economic times.

Coca-Cola
Coca-Cola is one of Buffett's most iconic investments. The Oracle of Omaha first bought Coca-Cola in 1988, and he has no intention of selling. During Coca-Cola's annual shareholder meeting in April 2013, Buffett was quite clear on his long-term commitment to the company:

We've never sold a share of Coca-Cola stock, and I wouldn't think of selling a share. I'm the kind of guy who likes to bet on sure things. No business has ever failed with happy customers ... and you're selling happiness.

Consumers in big markets such as the U.S are reducing soda consumption because of health considerations, and this trend is hurting the company. In fact, the company's total global sales volume grew only 2% in 2014. The still drinks segment was the main growth driver during the year, as volume grew 4%. On the other hand, global sparkling volume increased only 1% year over year.  

However, Coca-Cola is rapidly expanding its presence in healthier alternatives such as tea, waters, and sport drinks to jump-start growth. Dynamic brands such as Gold Peak tea, Fuze tea, and I LOHAS mineral water, which is sold in Japan, crossed the billion-dollar threshold in 2014, demonstrating that Coca-Cola is rapidly adapting to emerging consumer trends and growing demand for healthier drinks.

When investing for retirement, dividends are a main consideration, and Coca-Cola excels in that area. The company has increased its dividends for the past 52 years, including a generous 9% dividend increase for 2014. At current prices, Coca-Cola's stock is paying a 3.3% dividend yield, not bad at all coming from a rock-solid dividend powerhouse in times of historically low interest rates.

Wal-Mart
With more than $482 billion in total revenues during the last fiscal year, Wal-Mart is the world's biggest retailer. This massive scale allows the company to negotiate conveniently low prices and comfortable payment conditions with suppliers. The company also gets to spread its fixed costs on huge sales volume, which reduces fixed costs per unit. Scale and cost advantages go hand with hand in discount retail, and Wal-Mart is second to none in that department.

Because of its market leadership in a mature industry such as retail, it's not easy for Wal-Mart to generate growth. Increased competition from both online players such as Amazon.com (AMZN -2.56%) and warehouse specialist Costco (COST -0.24%) is also a considerable challenge for Wal-Mart.

But management is investing e-commerce and smaller-format stores to improve performance, and there are some encouraging signs in these areas. Online sales grew 22% during fiscal 2015, with nearly 70% of that traffic coming from mobile. Comparable sales in the Neighborhood Market division also increased by a vigorous 7.7% year over year in the last quarter.

Wal-Mart has raised dividends for 42 years in a row, and Wal-Mart stock yields 2.4% in dividends at current prices.

Foolish takeaway
Investors should never blindly follow the investment decisions of others, not even when it comes to an investing superstar such as Warren Buffett. However, companies such as Berkshire Hathaway, Coca-Cola, and Wal-Mart are remarkably strong businesses with healthy financial statements and rock-solid competitive positions. This makes them particularly convenient investments for investors looking for dependable stocks to hold in retirement.

If they are good enough for Warren Buffett, maybe they also deserve some consideration for your retirement portfolio.