During the past year or so, vehicle inventory at General Motors (GM -0.05%) dealers in the U.S. has been rising at an alarming rate. This has cast a pall over the auto giant's otherwise stellar financial results.

General Motors executives have repeatedly assured investors that the inventory situation is under control. However, these claims have seemed increasingly dubious given the extent of the company's inventory increases. Sure enough, GM recently added more downtime for at least two car factories in a tacit admission that the glut of cars on dealer lots won't solve itself.

An inventory glut

GM entered 2016 with very lean inventory in the U.S.: 630,950 vehicles, down by more than 100,000 units year over year. In fact, inventory was a little too low in early 2016, leading to shortages of hot products like the Chevy Colorado midsize pickup.

The Chevy Colorado

Tight inventory was a problem at GM in early 2016. Image source: General Motors.

During the first half of 2016, GM gradually rebuilt its dealer stocks. By the end of June, it had 706,558 vehicles in inventory, equal to a relatively appropriate 72 days of supply.

Unfortunately, the General's inventory increases got a little bit out of hand in the second half of last year. By year-end, GM's U.S. vehicle inventory had surged to 844,942 units. The glut has just gotten worse in the first five months of 2017. As of the end of May, GM dealer lots were filled to bursting with 963,448 vehicles, equal to 101 days of supply.

General Motors makes some tough decisions

To some extent, the recent inventory surge at GM has been planned. The company has some key new vehicle launches scheduled for the second half of 2017, and it knew that it would need to take extra downtime over the summer to retool those factories. In its recent sales release, GM estimated that "launch-related downtime" in the coming months would result in a nearly 100,000 unit inventory reduction.

However, that would still leave GM with too much inventory. (Based on its publicly stated target of exiting the year with days supply similar to the end of 2016, GM probably wants to reduce inventory to 800,000-850,000 units.)

Furthermore, the upcoming vehicle launches are mainly crossovers. This slice of the market is growing at a steady clip. By contrast, consumer interest in cars has faded dramatically in the past few years as low gas prices have become the norm.

To cope with sinking demand for passenger cars, GM will idle the U.S. factories that produce the Chevy Malibu and Chevy Cruze for five weeks this summer, instead of the normal two-week break.

The Chevy Malibu

GM is slashing production of the slow-selling Chevy Malibu. Image source: General Motors.

Neither the Malibu nor the Cruze is an especially big offender in terms of GM's inventory glut. But whereas the company is confident that it can sell all of the crossovers and trucks it has piled up on dealer lots, there are far fewer potential customers for compact and midsize cars right now.

Furthermore, General Motors historically sold a lot of cars like the Cruze and Malibu to rental car companies. GM has been pulling back on these "daily rental" sales for the past couple of years and plans to further reduce its sales to rental car companies in 2017 and 2018. This is another impetus for production cuts.

How much pain will there be?

Automakers like General Motors book revenue when they ship a car to a dealer -- not when it is finally sold to a customer. Thus, the company's recent streak of strong profit growth has been helped by inventory increases in the U.S.

This means that shareholders could be in for some pain in the second half of 2017 as GM undertakes a much-needed inventory correction. Wall Street analysts already expect General Motors to post significantly lower profits in the second half of the year than in the first half of 2017. However, unless a rebound in demand helps drain the inventory glut, GM might need to cut production further, driving even sharper earnings declines later this year.

The good news for investors is that if General Motors takes its medicine in the second half of 2017, it could get back to strong EPS growth in 2018. While the U.S. auto market has already reached its cyclical peak, GM will have fresh products in key segments for 2018. It will also have jettisoned its loss-making European operations, grown its in-house financing arm further, and made progress on restructuring its other international operations.

The looming inventory correction could cause an earnings "hiccup" for GM in the next few quarters. Nevertheless, the company still has solid long-term earnings prospects.