Index: tests/concurrency/suspend_then.cfa
===================================================================
--- tests/concurrency/suspend_then.cfa	(revision 6fbd475874acf9fb581356065da9888b46a71165)
+++ tests/concurrency/suspend_then.cfa	(revision b3609b2d7adb62e64922155f7611b28417c8f02e)
@@ -80,8 +80,12 @@
 	resume( c ); // Prime the coroutine to avoid one of the threads being its starter
 
+#if defined(__GNUC__) && __GNUC__ == 12
 	#pragma GCC diagnostic push
 	#pragma GCC diagnostic ignored "-Wdangling-pointer"	// this assignment is ok
+#endif // defined(__GNUC__) && __GNUC__ == 12
 	the_cor = &c;
+#if defined(__GNUC__) && __GNUC__ == 12
 	#pragma GCC diagnostic pop
+#endif // defined(__GNUC__) && __GNUC__ == 12
 
 	{
