Skip to content
Snippets Groups Projects
Commit 1d238c84 authored by Eric Botcazou's avatar Eric Botcazou
Browse files

Fix calling convention incompatibility with vendor compiler

For the 20th anniversary of https://gcc.gnu.org/gcc-3.4/sparc-abi.html,
a new calling convention incompatibility with the vendor compiler (and
the ABI) has been discovered in 64-bit mode, affecting small structures
containing arrays of floating-point components.  The decision has been
made to fix it on Solaris only at this point.

gcc/
	PR target/114416
	* config/sparc/sparc.h (SUN_V9_ABI_COMPATIBILITY): New macro.
	* config/sparc/sol2.h (SUN_V9_ABI_COMPATIBILITY): Redefine it.
	* config/sparc/sparc.cc (fp_type_for_abi): New predicate.
	(traverse_record_type): Use it to spot floating-point types.
	(compute_fp_layout): Also deal with array types.

gcc/testsuite/
	* gcc.target/sparc/small-struct-1.c: New test.
	* gcc.target/sparc/pr105573.c: Rename to...
	* gcc.target/sparc/20230425-1.c: ...this.
	* gcc.target/sparc/pr109541.c: Rename to...
	* gcc.target/sparc/20230607-1.c: ...this
parent af7d981b
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