r16-4540-g80af807e52e4f4 exposed a bug in two testcases where the
declaration of local labels was wrongly commented out. That caused
"duplicate label" errors.
Uncommenting declarations fixes it.
Committed as an obvious fix to my own patch.
--
PA
commit f88c3d76fc8820a9f548af460a2b84f879255ed7
Author: Paul-Antoine Arras <[email protected]>
Date: Wed Oct 22 16:14:02 2025 +0200
testsuite: Fix local labels [PR122378]
r16-4540-g80af807e52e4f4 exposed a bug in two testcases where the declaration of
local labels was wrongly commented out. That caused "duplicate label" errors.
Uncommenting declarations fixes it.
PR middle-end/122378
gcc/testsuite/ChangeLog:
* c-c++-common/gomp/attrs-metadirective-2.c: Uncomment local label
declaration.
* c-c++-common/gomp/metadirective-2.c: Likewise.
diff --git gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c
index ff401c86b09..bdb41e1017b 100644
--- gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c
+++ gcc/testsuite/c-c++-common/gomp/attrs-metadirective-2.c
@@ -62,7 +62,7 @@ main (void)
when (device={arch("gcn")}: teams num_teams(256)),
default (teams num_teams(4)))]]
{
- //__label__ l1, l2;
+ __label__ l1, l2;
if (x)
goto l1;
diff --git gcc/testsuite/c-c++-common/gomp/metadirective-2.c gcc/testsuite/c-c++-common/gomp/metadirective-2.c
index 4b05cb96ab2..9f8169a8b02 100644
--- gcc/testsuite/c-c++-common/gomp/metadirective-2.c
+++ gcc/testsuite/c-c++-common/gomp/metadirective-2.c
@@ -61,7 +61,7 @@ main (void)
when (device={arch("gcn")}: teams num_teams(256)) \
default (teams num_teams(4))
{
- //__label__ l1, l2;
+ __label__ l1, l2;
if (x)
goto l1;