Skip to content
Snippets Groups Projects
Commit 9032d2b2 authored by Jakub Jelinek's avatar Jakub Jelinek
Browse files

bswap: Fix up a thinko with empty CONSTRUCTORs [PR98378]

The code I've added recently in find_bswap_or_nop for VECTOR CONSTRUCTORs
is missing punt on an important case - namely empty CONSTRUCTORs, because in that
case the loop will not initialize *n and the code after the loop will then
use the uninitialized structure.

2020-12-19  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/98378
	* gimple-ssa-store-merging.c (find_bswap_or_nop): Punt if CONSTRUCTOR
	has no elements.
parent b1a2242e
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment