Skip to content
Snippets Groups Projects
Commit 8fcbce72 authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Jakub Jelinek
Browse files

re PR middle-end/60092 (posix_memalign not recognized to derive alias and alignment info)

	PR middle-end/60092
	* tree-ssa-ccp.c (surely_varying_stmt_p): Don't return true
	if TYPE_ATTRIBUTES (gimple_call_fntype ()) contain
	assume_aligned or alloc_align attributes.
	(bit_value_assume_aligned): Add ATTR, PTRVAL and ALLOC_ALIGN
	arguments.  Handle also assume_aligned and alloc_align attributes.
	(evaluate_stmt): Adjust bit_value_assume_aligned caller.
	Handle calls to functions with assume_aligned or alloc_align
	attributes.
	* doc/extend.texi: Document assume_aligned and alloc_align
	attributes.
c-family/
	* c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
	and tree_to_uhwi.
	(handle_alloc_align_attribute, handle_assume_aligned_attribute): New
	functions.
	(c_common_attribute_table): Add alloc_align and assume_aligned
	attributes.
testsuite/
	* gcc.dg/attr-alloc_align-1.c: New test.
	* gcc.dg/attr-alloc_align-2.c: New test.
	* gcc.dg/attr-alloc_align-3.c: New test.
	* gcc.dg/attr-assume_aligned-1.c: New test.
	* gcc.dg/attr-assume_aligned-2.c: New test.
	* gcc.dg/attr-assume_aligned-3.c: New test.

From-SVN: r207628
parent 451bdd23
No related branches found
No related tags found
No related merge requests found
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