Crude-oil futures gained Tuesday, following better-than-expected home price data and as investors continued to monitor European risks ahead of a leaders' summit later this week. Crude oil for August delivery CLQ2 -0.35% advanced 19 cents, or 0.2%, to $79.39 a barrel on the New York Mercantile Exchange. Prices have wavered between small gains and losses for most of the Asian and European trading hours. Oil ended lower on Monday, pressured by a stronger dollar and a downbeat session for U.S. stocks. The S&P/Case-Shiller 20-city composite index gained 1.3% in April, lessening its on-year decline to 1.9% from 2.6%, according to a Tuesday release. Consumer confidence, however, declined for a fourth month, the Conference Board reported. The index fell to 62 in June, its lowest since January. Investors also looked ahead to a two-day summit of European leaders, which kicks off on Thursday, amid fresh signs of financial distress in the region. Cyprus could be the next European nation in line for a bailout, after asking for financial aid on Monday. Spain formally asked for help for its banking system on Monday. Later that day, Moody's Investor Service downgraded 28 Spanish banks by between one and four notches. The developments added to gloom over an already uncertain global economic outlook, which can reduce expectations for future energy demand. On the supply front, weekly U.S. oil inventory will be released by the American Petroleum Institute on Tuesday, followed by the more closely watched Energy Information Administration report on Wednesday. Analysts polled by Platts expect a drop in crude oil stocks of one million barrels for the week ended June 22. Other energy products were mixed, with gasoline and heating oil tracking oil higher but natural gas trading lower. July gasoline RBN2 -0.37% advanced less than one cent, or 0.1%, to $2.65 a gallon. Heating oil for the same month's delivery HON2 +0.65% was up 2 cents, or 0.9%, to $2.56 a gallon. July natural gas NGN12 -0.82% retreated 2 cents, or 0.6%, to trade at $2.68 per million British thermal units. In its annual energy outlook out Monday, the Energy Information Administration said rising production of domestic crude oil and natural gas is expected to ease U.S. reliance on imported oil. The glut of natural gas will spur natural gas burning for power generation. In tandem with a projected increase in renewable energy. “In our view, the EIA once again appears to be overly optimistic on the oil demand side ... And the risks to our forecast may even be on the downside if sustained cheap natural gas manages to eat into core oil segments such as transportation," analysts at JBC Energy said in a report Tuesday. The EIA projected U.S. energy demand to grow an average of 0.4% on year up to 2035 as economic growth is expected to remain subpar and energy efficiency projected to increase.