The nvptx port can't support exceptions using sjlj, because ptx does not support sjlj. However, default_except_unwind_info still returns UI_SJLJ, even even if we configure with --disable-sjlj-exceptions, because UI_SJLJ is the fallback option. The reason default_except_unwind_info doesn't return UI_DWARF2 is because DWARF2_UNWIND_INFO is not defined in defaults.h, because INCOMING_RETURN_ADDR_RTX is not defined, because there's no ptx equivalent. Testcase libgomp.c++/for-15.C currently doesn't compile unless fno-exceptions is added because: - it tries to generate sjlj exception handling code, and - it tries to generate exception tables using label-addressed .byte sequence. Ptx doesn't support generating random data at a label, nor being able to load/write data relative to a label. This patch fixes the first problem by using UI_TARGET for nvptx. The second problem is worked around by generating all .byte sequences commented out. It would be better to have a narrower workaround, and define TARGET_ASM_BYTE_OP to "error: .byte unsupported " or some such. This patch does not enable exceptions for nvptx, it merely allows c++ programs to run correctly if they do no use exception handling. Build and reg-tested on x86_64 with nvptx accelerator. 2018-08-02 Tom de Vries <tdevries@suse.de> PR target/86660 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New function. Return UI_TARGET unconditionally. (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info. * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'. * testsuite/libgomp.oacc-c++/routine-1-auto.C: Remove -fno-exceptions. * testsuite/libgomp.oacc-c++/routine-1-template-auto.C: Same. * testsuite/libgomp.oacc-c++/routine-1-template-trailing-return-type.C: Same. * testsuite/libgomp.oacc-c++/routine-1-template.C: Same. * testsuite/libgomp.oacc-c++/routine-1-trailing-return-type.C: Same. * testsuite/libgomp.oacc-c-c++-common/routine-1.c: Same. From-SVN: r263265
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| config | Loading commit data... | |
| plugin | Loading commit data... | |
| testsuite | Loading commit data... | |
| ChangeLog | Loading commit data... | |
| ChangeLog.graphite | Loading commit data... | |
| Makefile.am | Loading commit data... | |
| Makefile.in | Loading commit data... | |
| acinclude.m4 | Loading commit data... | |
| aclocal.m4 | Loading commit data... | |
| affinity.c | Loading commit data... | |
| alloc.c | Loading commit data... | |
| atomic.c | Loading commit data... | |
| barrier.c | Loading commit data... | |
| config.h.in | Loading commit data... | |
| configure | Loading commit data... | |
| configure.ac | Loading commit data... | |
| configure.tgt | Loading commit data... | |
| critical.c | Loading commit data... | |
| env.c | Loading commit data... | |
| error.c | Loading commit data... | |
| fortran.c | Loading commit data... | |
| hashtab.h | Loading commit data... | |
| icv-device.c | Loading commit data... | |
| icv.c | Loading commit data... | |
| iter.c | Loading commit data... | |
| iter_ull.c | Loading commit data... | |
| libgomp-plugin.c | Loading commit data... | |
| libgomp-plugin.h | Loading commit data... | |
| libgomp.h | Loading commit data... | |
| libgomp.map | Loading commit data... | |
| libgomp.spec.in | Loading commit data... | |
| libgomp.texi | Loading commit data... | |
| libgomp_f.h.in | Loading commit data... | |
| libgomp_g.h | Loading commit data... | |
| lock.c | Loading commit data... | |
| loop.c | Loading commit data... | |
| loop_ull.c | Loading commit data... | |
| oacc-async.c | Loading commit data... | |
| oacc-cuda.c | Loading commit data... | |
| oacc-host.c | Loading commit data... | |
| oacc-init.c | Loading commit data... | |
| oacc-int.h | Loading commit data... | |
| oacc-mem.c | Loading commit data... | |
| oacc-parallel.c | Loading commit data... | |
| oacc-plugin.c | Loading commit data... | |
| oacc-plugin.h | Loading commit data... | |
| omp.h.in | Loading commit data... | |
| omp_lib.f90.in | Loading commit data... | |
| omp_lib.h.in | Loading commit data... | |
| openacc.f90 | Loading commit data... | |
| openacc.h | Loading commit data... | |
| openacc_lib.h | Loading commit data... | |
| ordered.c | Loading commit data... | |
| parallel.c | Loading commit data... | |
| priority_queue.c | Loading commit data... | |
| priority_queue.h | Loading commit data... | |
| sections.c | Loading commit data... | |
| secure_getenv.h | Loading commit data... | |
| single.c | Loading commit data... | |
| splay-tree.c | Loading commit data... | |
| splay-tree.h | Loading commit data... | |
| target.c | Loading commit data... | |
| task.c | Loading commit data... | |
| taskloop.c | Loading commit data... | |
| team.c | Loading commit data... | |
| work.c | Loading commit data... |