SHANGHAI, July 7 (Reuters) - China stocks ended higher on Thursday, as automakers jumped on fresh measures rolled out to spur car sales, while data showing foreign inflows also assuaged concerns over COVID-19 flare-ups.

** The bluechip index CSI300 gained 0.4%, while the Shanghai Composite Index rose 0.3%.

** An index tracking automakers surged 4.7% after the government said it would consider extending a tax break for electric vehicles and outlining plans to build more charging stations and encourage lower charging fees.

** New energy vehicle stocks jumped, with electric car maker BYD gaining 4%.

** Market sentiment was also lifted by the Institute of International Finance (IIF) data showing $9.1 billion of foreign inflows into China's stock market in June, bucking the trend in other emerging markets.

** "For the coming months, several factors will influence flows dynamics, among these the timing of inflation peaking and the outlook for the Chinese economy will be in focus," the IIF report said.

** The inflow data helped ease concerns of fresh COVID-19 outbreaks in China, which reported 409 new coronavirus cases for July 6, including both symptomatic and asymptomatic cases.

** On Thursday, millions in Shanghai queued up for a third day of mass COVID-19 testing as authorities in several Chinese cities scrambled to stamp out new outbreaks.

** Energy and resources shares rose, but banking and real estate shares dropped.

(Reporting by Shanghai Newsroom; Editing by Sherry Jacob-Phillips)