From 3b6da93331cf333129c97184e491750c1ce1ae9a Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 10 Nov 2011 19:13:15 -0500 Subject: [PATCH] Reuse goto labels inside functions, bug420a --- src/V3LinkJump.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/V3LinkJump.cpp b/src/V3LinkJump.cpp index 0f4649580..9e9f4fb25 100644 --- a/src/V3LinkJump.cpp +++ b/src/V3LinkJump.cpp @@ -82,6 +82,11 @@ private: nodep->v3fatalSrc("Unknown jump point for break/disable/continue"); return NULL; } + // Skip over variables as we'll just move them in a momement + // Also this would otherwise prevent us from using a label twice + // see t_func_return test. + while (underp && underp->castVar()) underp = underp->nextp(); + if (underp) UINFO(5," Underpoint is "<v3fatalSrc("Break/disable/continue not under expected statement");