aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-07-14 23:22:35 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-11-06 15:47:22 +0100
commit9837f62f066db532c9db6df38ccf2653d0c3a960 (patch)
tree0aeb5f7d05d4deebd002629647a6bd85031b8297
parent9125969086bfa1bf804b246ea574a2329b06d2c5 (diff)
downloadgcc-9837f62f066db532c9db6df38ccf2653d0c3a960.zip
gcc-9837f62f066db532c9db6df38ccf2653d0c3a960.tar.gz
gcc-9837f62f066db532c9db6df38ccf2653d0c3a960.tar.bz2
nvptx: Use the usual '#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)'
With this 'MAKE_DECL_ONE_ONLY' definition, we get 'SUPPORTS_ONE_ONLY', and thus '__GXX_WEAK__', and thus '__GXX_TYPEINFO_EQUALITY_INLINE'. This unblocks build of 'libstdc++-v3/libsupc++/tinfo.cc', which otherwise depends on symbol alias support, which GCC/nvptx doesn't generally provide. Also, this gets us a number of FAIL -> PASS progressions in the test suite. Given that GCC/nvptx support for weak symbols isn't complete, we also get a few more of the already-known 'error: PTX does not support weak declarations (only weak definitions)': [-PASS:-]{+FAIL:+} g++.old-deja/g++.other/crash11.C -std=c++14 (test for excess errors) [-PASS:-]{+FAIL:+} g++.old-deja/g++.other/crash11.C -std=c++17 (test for excess errors) [-PASS:-]{+FAIL:+} g++.old-deja/g++.other/crash11.C -std=c++20 (test for excess errors) [-PASS:-]{+FAIL:+} g++.old-deja/g++.other/crash11.C -std=c++98 (test for excess errors) [-PASS:-]{+FAIL:+} g++.old-deja/g++.pt/crash29.C -std=c++14 (test for excess errors) [-PASS:-]{+FAIL:+} g++.old-deja/g++.pt/crash29.C -std=c++17 (test for excess errors) [-PASS:-]{+FAIL:+} g++.old-deja/g++.pt/crash29.C -std=c++20 (test for excess errors) [-PASS:-]{+FAIL:+} g++.old-deja/g++.pt/crash29.C -std=c++98 (test for excess errors) [-PASS:-]{+FAIL:+} 23_containers/map/56613.cc -std=gnu++17 (test for excess errors) ... as well as one more of the already-known 'sorry, unimplemented: target cannot support nonlocal goto': PASS: g++.dg/tree-ssa/pr22488.C -std=gnu++14 (test for excess errors) PASS: g++.dg/tree-ssa/pr22488.C -std=gnu++17 (test for excess errors) PASS: g++.dg/tree-ssa/pr22488.C -std=gnu++20 (test for excess errors) [-PASS:-]{+FAIL:+} g++.dg/tree-ssa/pr22488.C -std=gnu++98 (test for excess errors) We shall look into these, later. gcc/ * config/nvptx/nvptx.h (MAKE_DECL_ONE_ONLY): Define.
-rw-r--r--gcc/config/nvptx/nvptx.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h
index 129427e..407fd70 100644
--- a/gcc/config/nvptx/nvptx.h
+++ b/gcc/config/nvptx/nvptx.h
@@ -319,6 +319,9 @@ struct GTY(()) machine_function
#define SUPPORTS_WEAK 1
+#define MAKE_DECL_ONE_ONLY(DECL) \
+ (DECL_WEAK (DECL) = 1)
+
/* The documentation states that ASM_OUTPUT_DEF_FROM_DECLS is used in
preference to ASM_OUTPUT_DEF if the tree nodes are available. However, we
need the tree nodes to emit the prototype, so at this point it's not clear