For example, for nvptx, these test cases currently indeed fail with
'sorry, unimplemented: target cannot support nonlocal goto'. However,
that's just an artefact of non-existing support for exception handling,
and these test cases already require effective-target 'exceptions'.
gcc/testsuite/
* gcc.dg/cleanup-12.c: Don't 'dg-skip-if "" { ! nonlocal_goto }'.
* gcc.dg/cleanup-13.c: Likewise.
* gcc.dg/cleanup-5.c: Likewise.
* gcc.dg/gimplefe-44.c: Don't
'dg-require-effective-target nonlocal_goto'.
/* { dg-do run } */
/* { dg-options "-O2 -fexceptions" } */
/* { dg-skip-if "" { "ia64-*-hpux11.*" } } */
-/* { dg-skip-if "" { ! nonlocal_goto } } */
/* { dg-require-effective-target exceptions } */
/* Verify unwind info in presence of alloca. */
/* { dg-do run } */
/* { dg-options "-fexceptions" } */
/* { dg-skip-if "" { "ia64-*-hpux11.*" } } */
-/* { dg-skip-if "" { ! nonlocal_goto } } */
/* { dg-require-effective-target exceptions } */
/* Verify DW_OP_* handling in the unwinder. */
/* { dg-do run } */
/* { dg-options "-fexceptions" } */
/* { dg-skip-if "" { "ia64-*-hpux11.*" } } */
-/* { dg-skip-if "" { ! nonlocal_goto } } */
/* { dg-require-effective-target exceptions } */
/* Verify that cleanups work with exception handling. */
/* { dg-do compile } */
/* { dg-require-effective-target exceptions } */
/* { dg-options "-fexceptions -fgimple -fdump-tree-eh-eh" } */
-/* { dg-require-effective-target nonlocal_goto } */
void __GIMPLE foo()
{