This patch does two things to fix setting gnu attribute #4 (long double status)
1) Only set gnu attribute #4 if long double was passed. Passing __float128
when long double is IBM or __ibm128 when long double is IEEE no longer sets the
attribute. This resulted in a lot of false positives, such as using __float128
and no long double support.
2) Do not set the gnu attribute if a mode used by long double (TF or DF) is
used in a move. The moves do not differentiate between the long double type
and similar types. Delete the three tests that tested this.
I wrote the code for the move several years. I wanted to flag that an object
that used the appropriate long double type got flagged. Unfortunately, at the
RTL level, we have lost the type nodes, so we can't tell the difference between
two types that use the same mode (for instance if long double is 64-bit, the
attribute would be set if you used normal doubles, and not long doubles). Alan
Modra and I discussed this, and we think this is just the right thing to do.
gcc/
2020-11-30 Michael Meissner <meissner@linux.ibm.com>
PR gcc/97791
* config/rs6000/rs6000-call.c (init_cumulative_args): Only set
that long double was returned if the type is actually long
double.
(rs6000_function_arg_advance_1): Only set that long double was
passed if the type is actually long double.
* config/rs6000/rs6000.c (rs6000_emit_move): Delete code that sets
whether long double was passed based on the modes used in moves.
gcc/testsuite/
2020-11-30 Michael Meissner <meissner@linux.ibm.com>
PR target/97791
* gcc.target/powerpc/gnuattr1.c: Mark as XFAIL.
* gcc.target/powerpc/gnuattr2.c: Mark as XFAIL.
* gcc.target/powerpc/gnuattr3.c: Mark as XFAIL.