This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2, #2 of 3], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling


This patch makes __ibm128 use the long double type node if long double uses the
IBM extended double representation, and similarly __float128 will use the long
double type node if long double uses the IEEE 128-bit representation.

I have fixed the pr85657.C test case to only test templates, and not explicit
overloading.

With this fix, the compiler no longer raises an internal error if you use
explicit overloading of __ibm128 and long double.  Instead it generates the
expected error:

foo01.C:33:15: error: 'bool foo::iszero(long double)' cannot be overloaded with 'bool foo::iszero(long double)'
   inline bool iszero (__ibm128 i128) { return i128 == 0.0; }
               ^~~~~~
foo01.C:32:15: note: previous declaration 'bool foo::iszero(long double)'
   inline bool iszero (long double ld) { return ld == 0.0; }

I have checked this patch on a little endian power8 system and there were no
regressions.  As I mentioned previously, the pr85657.C now passes.

[gcc]
2018-06-05  Michael Meissner  <meissner@linux.ibm.com>

	* config/rs6000/rs6000.c (rs6000_init_builtins): Make __ibm128 use
	the long double type if long double is IBM extended double.  Make
	__float128 use the long double type if long double is IEEE 128-bit.

[gcc/testsuite]
2018-06-05  Michael Meissner  <meissner@linux.ibm.com>

	PR target/85657
	* g++.dg/pr85657.C: Only test whether __ibm128 and long double can
	be used in templates.  Don't check for them in overloaded functions.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797

Attachment: ieee128-patch102b
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]