Commit beb12c62 authored by Siddhesh Poyarekar's avatar Siddhesh Poyarekar
Browse files

tree-optimization/104941: Actually assign the conversion result



Assign the result of fold_convert to offset.  Also make the useless
conversion check lighter since the two way check is not needed here.

gcc/ChangeLog:

	PR tree-optimization/104941
	* tree-object-size.cc (size_for_offset): Make useless conversion
	check lighter and assign result of fold_convert to OFFSET.

gcc/testsuite/ChangeLog:

	PR tree-optimization/104941
	* gcc.dg/builtin-dynamic-object-size-0.c (S1, S2): New structs.
	(test_alloc_nested_structs, g): New functions.
	(main): Call test_alloc_nested_structs.

Signed-off-by: default avatarSiddhesh Poyarekar <siddhesh@gotplt.org>
parent be093b8d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment