Skip to content
Snippets Groups Projects
Commit 2f43ad6a authored by Georg-Johann Lay's avatar Georg-Johann Lay
Browse files

AVR: target/114132 - Code sets up a frame pointer without need.

The condition CUMULATIVE_ARGS.nregs == 0 in avr_frame_pointer_required_p()
means that no more argument registers are left, but that's not the same
condition that tells whether an argument pointer is required.

	PR target/114132
gcc/
	* config/avr/avr.h (CUMULATIVE_ARGS) <has_stack_args>: New field.
	* config/avr/avr.cc (avr_init_cumulative_args): Initialize it.
	(avr_function_arg): Set it.
	(avr_frame_pointer_required_p): Use it instead of .nregs.

gcc/testsuite/
	* gcc.target/avr/pr114132-1.c: New test.
	* gcc.target/avr/torture/pr114132-2.c: New test.
parent b83f3cd3
No related branches found
No related tags found
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