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]

[v3, C++] RFC: PATCH to add decimal floating point typeinfos to libsupc++


Since the DFP types are new fundamental types, their type_infos should be included in libsupc++ like the rest of the fundamental types.

v3 folks: Do my changes to baseline_symbols.txt and gnu.ver look right, particularly the new symbol version group?

Jason
commit b86ae4282df1c23689d92b4d84720154a664ac63
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Nov 10 18:11:45 2009 -0500

    	PR c++/39131
    	* rtti.c (emit_support_tinfos): Add DFP types.
    	* config/abi/pre/gnu.ver: Add DFP types.
    	* config/abi/post/i486-linux-gnu/baseline_symbols.txt: Likewise.
    
    	* testsuite/Makefile.am: Remove use of baseline_file.
    	* testsuite/Makefile.in: Likewise.

diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 3fb6d11..e96abcb 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -1448,6 +1448,7 @@ emit_support_tinfos (void)
     &long_integer_type_node, &long_unsigned_type_node,
     &long_long_integer_type_node, &long_long_unsigned_type_node,
     &float_type_node, &double_type_node, &long_double_type_node,
+    &dfloat32_type_node, &dfloat64_type_node, &dfloat128_type_node,
     0
   };
   int ix;
diff --git a/gcc/testsuite/g++.dg/dfp/typeid1.C b/gcc/testsuite/g++.dg/dfp/typeid1.C
new file mode 100644
index 0000000..cdc33a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/dfp/typeid1.C
@@ -0,0 +1,8 @@
+// PR c++/39131
+// { dg-do link }
+
+#include <typeinfo>
+
+const std::type_info &r = typeid(0.dd);
+
+int main() { }
diff --git a/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt
index 10f4de6..b8b2302 100644
--- a/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt
+++ b/libstdc++-v3/config/abi/post/i486-linux-gnu/baseline_symbols.txt
@@ -2329,6 +2329,7 @@ OBJECT:0:CXXABI_1.3
 OBJECT:0:CXXABI_1.3.1
 OBJECT:0:CXXABI_1.3.2
 OBJECT:0:CXXABI_1.3.3
+OBJECT:0:CXXABI_1.3.4
 OBJECT:0:GLIBCXX_3.4
 OBJECT:0:GLIBCXX_3.4.1
 OBJECT:0:GLIBCXX_3.4.10
@@ -2463,8 +2464,14 @@ OBJECT:15:_ZTSSt8numpunctIcE@@GLIBCXX_3.4
 OBJECT:15:_ZTSSt8numpunctIwE@@GLIBCXX_3.4
 OBJECT:16:_ZNSbIwSt11char_traitsIwESaIwEE4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4
 OBJECT:16:_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4
+OBJECT:16:_ZTIPDd@@CXXABI_1.3.4
+OBJECT:16:_ZTIPDe@@CXXABI_1.3.4
+OBJECT:16:_ZTIPDf@@CXXABI_1.3.4
 OBJECT:16:_ZTIPDi@@CXXABI_1.3.3
 OBJECT:16:_ZTIPDs@@CXXABI_1.3.3
+OBJECT:16:_ZTIPKDd@@CXXABI_1.3.4
+OBJECT:16:_ZTIPKDe@@CXXABI_1.3.4
+OBJECT:16:_ZTIPKDf@@CXXABI_1.3.4
 OBJECT:16:_ZTIPKDi@@CXXABI_1.3.3
 OBJECT:16:_ZTIPKDs@@CXXABI_1.3.3
 OBJECT:16:_ZTIPKa@@CXXABI_1.3
@@ -3346,6 +3353,9 @@ OBJECT:8:_ZGVNSt9money_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE2idE@@G
 OBJECT:8:_ZGVNSt9money_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE2idE@@GLIBCXX_3.4
 OBJECT:8:_ZGVNSt9money_putIcSt19ostreambuf_iteratorIcSt11char_traitsIcEEE2idE@@GLIBCXX_3.4
 OBJECT:8:_ZGVNSt9money_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEE2idE@@GLIBCXX_3.4
+OBJECT:8:_ZTIDd@@CXXABI_1.3.4
+OBJECT:8:_ZTIDe@@CXXABI_1.3.4
+OBJECT:8:_ZTIDf@@CXXABI_1.3.4
 OBJECT:8:_ZTIDi@@CXXABI_1.3.3
 OBJECT:8:_ZTIDs@@CXXABI_1.3.3
 OBJECT:8:_ZTIN10__cxxabiv115__forced_unwindE@@CXXABI_1.3.2
diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver
index 2337a5a..b0001ca 100644
--- a/libstdc++-v3/config/abi/pre/gnu.ver
+++ b/libstdc++-v3/config/abi/pre/gnu.ver
@@ -1198,3 +1198,15 @@ CXXABI_1.3.3 {
     _ZSt17rethrow_exceptionNSt15__exception_ptr13exception_ptrE;
 
 } CXXABI_1.3.2;
+
+CXXABI_1.3.4 {
+
+    # typeinfo for decimal floating point types
+    _ZTID[fde];
+    _ZTIPD[fde];
+    _ZTIPKD[fde];
+    _ZTID[fde];
+    _ZTIPD[fde];
+    _ZTIPKD[fde];
+
+} CXXABI_1.3.3;
diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/Makefile.am
index c817607..a2f4fa4 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -70,7 +70,7 @@ site.exp: Makefile
 extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
 
 baseline_symbols:
-	-@(output=${baseline_file}; \
+	-@(output=${baseline_dir}/baseline_symbols.txt; \
 	  if test ! -f $${output}; then \
 	    echo "Baseline file doesn't exist."; \
 	    echo "Try 'make new-abi-baseline' to create it."; \
@@ -79,7 +79,7 @@ baseline_symbols:
 
 new-abi-baseline:
 	-@$(mkinstalldirs) ${baseline_dir}
-	-@(output=${baseline_file}; \
+	-@(output=${baseline_dir}/baseline_symbols.txt; \
 	  if test -f $${output}; then \
 	    output=$${output}.new; \
 	    t=`echo $${output} | sed 's=.*config/abi/=='`; \
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in
index cae3d6c..bf767cd 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -527,7 +527,7 @@ site.exp: Makefile
 	@mv site.tmp site.exp
 
 baseline_symbols:
-	-@(output=${baseline_file}; \
+	-@(output=${baseline_dir}/baseline_symbols.txt; \
 	  if test ! -f $${output}; then \
 	    echo "Baseline file doesn't exist."; \
 	    echo "Try 'make new-abi-baseline' to create it."; \
@@ -536,7 +536,7 @@ baseline_symbols:
 
 new-abi-baseline:
 	-@$(mkinstalldirs) ${baseline_dir}
-	-@(output=${baseline_file}; \
+	-@(output=${baseline_dir}/baseline_symbols.txt; \
 	  if test -f $${output}; then \
 	    output=$${output}.new; \
 	    t=`echo $${output} | sed 's=.*config/abi/=='`; \

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