gcc/libgomp/testsuite/libgomp.oacc-c++
Thomas Schwinge fe283dba77 GCN, nvptx: Support '-mfake-exceptions', and use it for offloading compilation [PR118794]
With '-mfake-exceptions' enabled, the user-visible behavior in presence of
exception handling constructs changes such that the compile-time
'sorry, unimplemented: exception handling not supported' is skipped, code
generation proceeds, and instead, exception handling constructs 'abort' at
run time.  (..., or don't, if they're in dead code.)

	PR target/118794
	gcc/
	* config/gcn/gcn.opt (-mfake-exceptions): Support.
	* config/nvptx/nvptx.opt (-mfake-exceptions): Likewise.
	* config/gcn/gcn.md (define_expand "exception_receiver"): Use it.
	* config/nvptx/nvptx.md (define_expand "exception_receiver"):
	Likewise.
	* config/gcn/mkoffload.cc (main): Set it.
	* config/nvptx/mkoffload.cc (main): Likewise.
	* config/nvptx/nvptx.cc (nvptx_assemble_integer)
	<in_section == exception_section>: Special handling for
	'SYMBOL_REF's.
	* except.cc (expand_dw2_landing_pad_for_region): Don't generate
	bogus code for (default)
	'#define EH_RETURN_DATA_REGNO(N) INVALID_REGNUM'.
	libgcc/
	* config/gcn/unwind-gcn.c (_Unwind_Resume): New.
	* config/nvptx/unwind-nvptx.c (_Unwind_Resume): Likewise.
	gcc/testsuite/
	* g++.target/gcn/exceptions-bad_cast-2.C: Set
	'-mno-fake-exceptions'.
	* g++.target/gcn/exceptions-pr118794-1.C: Likewise.
	* g++.target/gcn/exceptions-throw-2.C: Likewise.
	* g++.target/nvptx/exceptions-bad_cast-2.C: Likewise.
	* g++.target/nvptx/exceptions-pr118794-1.C: Likewise.
	* g++.target/nvptx/exceptions-throw-2.C: Likewise.
	* g++.target/gcn/exceptions-bad_cast-2_-mfake-exceptions.C: New.
	* g++.target/gcn/exceptions-pr118794-1_-mfake-exceptions.C:
	Likewise.
	* g++.target/gcn/exceptions-throw-2_-mfake-exceptions.C: Likewise.
	* g++.target/nvptx/exceptions-bad_cast-2_-mfake-exceptions.C:
	Likewise.
	* g++.target/nvptx/exceptions-pr118794-1_-mfake-exceptions.C:
	Likewise.
	* g++.target/nvptx/exceptions-throw-2_-mfake-exceptions.C:
	Likewise.
	libgomp/
	* testsuite/libgomp.c++/target-exceptions-bad_cast-2-offload-sorry-GCN.C:
	Set '-foffload-options=-mno-fake-exceptions'.
	* testsuite/libgomp.c++/target-exceptions-bad_cast-2-offload-sorry-nvptx.C:
	Likewise.
	* testsuite/libgomp.c++/target-exceptions-pr118794-1-offload-sorry-GCN.C:
	Likewise.
	* testsuite/libgomp.c++/target-exceptions-pr118794-1-offload-sorry-nvptx.C:
	Likewise.
	* testsuite/libgomp.c++/target-exceptions-throw-2-offload-sorry-GCN.C:
	Likewise.
	* testsuite/libgomp.c++/target-exceptions-throw-2-offload-sorry-nvptx.C:
	Likewise.
	* testsuite/libgomp.oacc-c++/exceptions-bad_cast-2-offload-sorry-GCN.C:
	Likewise.
	* testsuite/libgomp.oacc-c++/exceptions-bad_cast-2-offload-sorry-nvptx.C:
	Likewise.
	* testsuite/libgomp.oacc-c++/exceptions-throw-2-offload-sorry-GCN.C:
	Likewise.
	* testsuite/libgomp.oacc-c++/exceptions-throw-2-offload-sorry-nvptx.C:
	Likewise.
	* testsuite/libgomp.c++/target-exceptions-bad_cast-2.C: Adjust.
	* testsuite/libgomp.c++/target-exceptions-pr118794-1.C: Likewise.
	* testsuite/libgomp.c++/target-exceptions-throw-2.C: Likewise.
	* testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C: Likewise.
	* testsuite/libgomp.oacc-c++/exceptions-throw-2.C: Likewise.
	* testsuite/libgomp.c++/target-exceptions-throw-2-O0.C: New.
2025-04-14 23:56:05 +02:00
..
c++.exp libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951] 2023-09-12 11:30:37 +02:00
cache-1.C
declare-1.C
declare-pr94120.C
deep-copy-12.C
deep-copy-13.C
deep-copy-17.C
exceptions-bad_cast-1.C Add 'std::bad_cast' exception test cases for GCN, nvptx target and OpenACC, OpenMP 'target' offloading 2025-04-14 23:54:53 +02:00
exceptions-bad_cast-2-offload-sorry-GCN.C GCN, nvptx: Support '-mfake-exceptions', and use it for offloading compilation [PR118794] 2025-04-14 23:56:05 +02:00
exceptions-bad_cast-2-offload-sorry-nvptx.C GCN, nvptx: Support '-mfake-exceptions', and use it for offloading compilation [PR118794] 2025-04-14 23:56:05 +02:00
exceptions-bad_cast-2.C GCN, nvptx: Support '-mfake-exceptions', and use it for offloading compilation [PR118794] 2025-04-14 23:56:05 +02:00
exceptions-bad_cast-3.C Add 'std::bad_cast' exception, dead code test cases for GCN, nvptx target and OpenACC, OpenMP 'target' offloading 2025-04-14 23:54:53 +02:00
exceptions-throw-1.C Add 'throw' test cases for GCN, nvptx target and OpenACC, OpenMP 'target' offloading 2025-04-14 23:54:53 +02:00
exceptions-throw-2-offload-sorry-GCN.C GCN, nvptx: Support '-mfake-exceptions', and use it for offloading compilation [PR118794] 2025-04-14 23:56:05 +02:00
exceptions-throw-2-offload-sorry-nvptx.C GCN, nvptx: Support '-mfake-exceptions', and use it for offloading compilation [PR118794] 2025-04-14 23:56:05 +02:00
exceptions-throw-2.C GCN, nvptx: Support '-mfake-exceptions', and use it for offloading compilation [PR118794] 2025-04-14 23:56:05 +02:00
exceptions-throw-3.C Add 'throw', dead code test cases for GCN, nvptx target and OpenACC, OpenMP 'target' offloading 2025-04-14 23:54:54 +02:00
firstprivate-mappings-1.C
non-scalar-data.C
pr71959-aux.cc
pr71959.C
pr96835-1.C Add 'libgomp.c++/pr96835-1{,-O0}.C', 'libgomp.oacc-c++/pr96835-1.C' [PR96835] 2025-03-24 09:39:21 +01:00
pr101544-1.C driver: Forward '-lstdc++' to offloading compilation [PR101544] 2025-03-26 14:20:20 +01:00
pr119692-1-1.C Add PR119692 "C++ 'typeinfo', 'vtable' vs. OpenACC, OpenMP 'target' offloading" test cases [PR119692] 2025-04-14 23:54:48 +02:00
pr119692-1-2.C Add PR119692 "C++ 'typeinfo', 'vtable' vs. OpenACC, OpenMP 'target' offloading" test cases [PR119692] 2025-04-14 23:54:48 +02:00
pr119692-1-3.C Add PR119692 "C++ 'typeinfo', 'vtable' vs. OpenACC, OpenMP 'target' offloading" test cases [PR119692] 2025-04-14 23:54:48 +02:00
privatized-ref-2.C
privatized-ref-3.C
ref-1.C
routine-1-auto.C
routine-1-template-auto.C
routine-1-template-trailing-return-type.C
routine-1-template.C
routine-1-trailing-return-type.C
template-reduction.C
this.C