For GCN, this avoids ICEs further down the compilation pipeline. For nvptx,
there's effectively no change: in presence of exception handling constructs,
instead of 'sorry, unimplemented: target cannot support nonlocal goto', we
now emit 'sorry, unimplemented: exception handling not supported'.
Additionally, turn test cases into UNSUPPORTED if running into
'sorry, unimplemented: exception handling not supported'.
gcc/
* config/gcn/gcn.md (exception_receiver): 'define_expand'.
* config/nvptx/nvptx.md (exception_receiver): Likewise.
gcc/testsuite/
* lib/gcc-dg.exp (gcc-dg-prune): Turn
'sorry, unimplemented: exception handling not supported' into
UNSUPPORTED.
* gcc.dg/pr104464.c: Remove GCN XFAIL.
libstdc++-v3/
* testsuite/lib/prune.exp (libstdc++-dg-prune): Turn
'sorry, unimplemented: exception handling not supported' into
UNSUPPORTED.
[(set_attr "type" "sopp")
(set_attr "length" "4")])
+(define_expand "exception_receiver"
+ [(const_int 0)]
+ ""
+{
+ sorry ("exception handling not supported");
+})
+
;; }}}
;; {{{ Conditionals
DONE;
})
+(define_expand "exception_receiver"
+ [(const_int 0)]
+ ""
+{
+ sorry ("exception handling not supported");
+})
+
(define_expand "nonlocal_goto"
[(match_operand 0 "" "")
(match_operand 1 "" "")
{
f += (F)(f != (F){}[0]);
}
-
-/* { dg-xfail-if "-fnon-call-exceptions unsupported" { amdgcn-*-* } } */
return "::unsupported::large return values"
}
+ # If exception handling is not supported, expectant tests are UNSUPPORTED.
+ if { ![check_effective_target_exceptions] } {
+ if [regexp "(^|\n)\[^\n\]*: sorry, unimplemented: exception handling not supported" $text] {
+ return "::unsupported::exception handling not supported"
+ }
+ }
+
# If exception handling is disabled, expectant tests are UNSUPPORTED.
if { ![check_effective_target_exceptions_enabled] } {
if [regexp "(^|\n)\[^\n\]*: error: exception handling disabled" $text] {
# the single uncapitalized "in function" line.
regsub -all "(^|\n)\[^\n\]*: in function\[^\n\]*" $text "" text
+ # If exception handling is not supported, expectant tests are UNSUPPORTED.
+ if { ![check_effective_target_exceptions] } {
+ if [regexp "(^|\n)\[^\n\]*: sorry, unimplemented: exception handling not supported" $text] {
+ return "::unsupported::exception handling not supported"
+ }
+ }
+
# If exception handling is disabled, expectant tests are UNSUPPORTED.
if { ![check_effective_target_exceptions_enabled] } {
if [regexp "(^|\n)\[^\n\]*: error: exception handling disabled" $text] {