Index: uspace/lib/c/generic/rtld/symbol.c
===================================================================
--- uspace/lib/c/generic/rtld/symbol.c	(revision b83c5e408a25b05bd779719d25173f668005f88a)
+++ uspace/lib/c/generic/rtld/symbol.c	(revision d5409daa794d9384555eb540e3baaaa8b6a8600c)
@@ -135,8 +135,21 @@
 	modules_untag(start->rtld);
 
-	/* Insert root (the program) into the queue and tag it */
+	/*
+	 * Insert root (the program) into the queue and tag it.
+	 *
+	 * We disable the dangling-pointer warning because the compiler incorrectly
+	 * assumes that we leak local address (queue) to a parent scope (to start
+	 * argument). However, we always empty the list so the pointer cannot
+	 * actually escape. Probably the compiler can never statically analyze that
+	 * correctly.
+	 */
 	list_initialize(&queue);
 	start->bfs_tag = true;
+#pragma GCC diagnostic push
+#if defined(__GNUC__) && (__GNUC__ >= 12)
+#pragma GCC diagnostic ignored "-Wdangling-pointer"
+#endif
 	list_append(&start->queue_link, &queue);
+#pragma GCC diagnostic pop
 
 	/* If the symbol is found, it will be stored in 'sym' */
