浏览代码

-- Zusammenführen von r46974 in ».«:
U compiler/nflw.pas
A tests/webtbs/tw37823.pp
-- Aufzeichnung der Informationen für Zusammenführung von r46974 in ».«:
U .

git-svn-id: branches/fixes_3_2@47909 -

florian 4 年之前
父节点
当前提交
e232588635
共有 3 个文件被更改,包括 24 次插入1 次删除
  1. 1 0
      .gitattributes
  2. 2 1
      compiler/nflw.pas
  3. 21 0
      tests/webtbs/tw37823.pp

+ 1 - 0
.gitattributes

@@ -17809,6 +17809,7 @@ tests/webtbs/tw37796.pp svneol=native#text/pascal
 tests/webtbs/tw3780.pp svneol=native#text/plain
 tests/webtbs/tw3780.pp svneol=native#text/plain
 tests/webtbs/tw37806.pp svneol=native#text/pascal
 tests/webtbs/tw37806.pp svneol=native#text/pascal
 tests/webtbs/tw3782.pp svneol=native#text/plain
 tests/webtbs/tw3782.pp svneol=native#text/plain
+tests/webtbs/tw37823.pp svneol=native#text/pascal
 tests/webtbs/tw37844.pp svneol=native#text/pascal
 tests/webtbs/tw37844.pp svneol=native#text/pascal
 tests/webtbs/tw37926.pp svneol=native#text/pascal
 tests/webtbs/tw37926.pp svneol=native#text/pascal
 tests/webtbs/tw37949.pp svneol=native#text/pascal
 tests/webtbs/tw37949.pp svneol=native#text/pascal

+ 2 - 1
compiler/nflw.pas

@@ -1966,7 +1966,8 @@ implementation
                     p2:=current_procinfo;
                     p2:=current_procinfo;
                     while true do
                     while true do
                       begin
                       begin
-                        if (p2.flags*[pi_needs_implicit_finally,pi_uses_exceptions,pi_has_implicit_finally])<>[] then
+                        if ((cs_implicit_exceptions in current_settings.moduleswitches) and ((p2.flags*[pi_needs_implicit_finally,pi_has_implicit_finally])<>[])) or
+                        ((p2.flags*[pi_uses_exceptions])<>[]) then
                           Message(cg_e_goto_across_procedures_with_exceptions_not_allowed);
                           Message(cg_e_goto_across_procedures_with_exceptions_not_allowed);
                         if labelsym.owner=p2.procdef.localst then
                         if labelsym.owner=p2.procdef.localst then
                           break;
                           break;

+ 21 - 0
tests/webtbs/tw37823.pp

@@ -0,0 +1,21 @@
+{$MODE ISO}
+{$implicitExceptions off}
+{$Q+}
+{$R+}
+program gt;
+  label 1;
+  procedure jump;
+  var
+    a: integer;
+    b: rawbytestring;
+  begin
+    b := 'nanu';
+    writeln('nanu');
+    goto 1;
+  end;
+begin
+  jump;
+  writeln('not jumped!');
+1:
+writeln('jumped!');
+end.