Companies rarely want to be compared with Barrick Gold Corp. (TSX:ABX)(NYSE:ABX), but that’s what’s happening to Canadian Imperial Bank of Commerce (TSX:CM)(NYSE:CM). Unfortunately for CIBC, it’s a well-deserved comparison.

Both companies have had plenty of past difficulties, with shareholders paying a heavy price. Now, they are coming under fire for their compensation practices. Understandably, investors are not pleased and are making their opinions known.

So, what exactly are these companies doing, and does it mean you should avoid their shares?

Barrick Gold: no bad deed goes unrewarded

Barrick is the world’s largest gold miner, and also one of the industry’s worst performers. Its past mistakes are well known, most notable are the Pascua Lama disaster and the Equinox acquisition. In the past three years its shares have slumped by more than 60%, with plenty of management turnover along the way.

Shareholders are not in any mood to hear about generous pay packages, yet that is exactly what the company has announced. Executive Chairman John Thornton received US$13 million in 2014, 35% more than the previous year. Co-Presidents Jim Gowans and Kelvin Dushnisky also got paid handsomely. Combined, the three people pulled in US$25 million.

Even worse, this comes at a time when Barrick is laying off employees; the company plans to reduce the headcount at its head office from 260 to 140 this year. There’s no doubt this sends the wrong message.

CIBC: the gift that keeps on giving

Like Barrick, CIBC has had its share of past issues. Most notable was its $11 billion of write-downs during the U.S. financial crisis, which pummeled the company’s share price. To illustrate, the company’s stock price is down 3% in the past eight years. All the other big five banks are up by at least 10% (Toronto-Dominion Bank shares are up more than 60% in this span).

Granted, CIBC’s shareholders have not suffered as much as Barrick’s have, but they are still in no mood to hear about big pay packages.

Yet CIBC revealed that outgoing executives Gerry McCaughey and Richard Nesbitt received “post-employment arrangements” worth $25 million last year. In response, the bank failed its non-binding “say-on-pay” vote at its annual meeting Thursday.

Does this mean you should avoid these stocks?

In my opinion, this shouldn’t prevent you from buying CIBC shares. The company has performed much better in the past five years, and has acknowledged why it failed the say-on-pay vote. It’s still a very solid company, one that investors can count on for years.

Barrick is a different story. This is the second time in three years it has enraged investors like this. Even worse, the business is still struggling. At this point, there are just too many issues with this company, so I would avoid the stock.

Looking for more reliable stocks than Barrick and CIBC?

These three top stocks have delivered dividends for shareholders for decades (and even centuries!). Check out our special FREE report: "3 Dividend Stocks to Buy and Hold Forever." Click here now to get the full story!

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Benjamin Sinclair has no position in any stocks mentioned.