diff options
author | Pierre MARECHAL <pierre.marechal@scilab.org> | 2010-03-22 11:41:18 +0100 |
---|---|---|
committer | Pierre MARECHAL <pierre.marechal@scilab.org> | 2010-03-22 11:41:18 +0100 |
commit | f1794fd5a286773cab295787443bb2fb33febfef (patch) | |
tree | e2903a6a382863d5592662ab06e4dae13bfcdec3 /scilab/modules/data_structures | |
parent | 5c780362f52197ed029c0cdfc5d6c68a9d7237bc (diff) | |
parent | 9b0378a86437b33190f7c96d72b2059800d0a4f0 (diff) | |
download | scilab-f1794fd5a286773cab295787443bb2fb33febfef.zip scilab-f1794fd5a286773cab295787443bb2fb33febfef.tar.gz |
Merge commit 'origin/5.2'
Diffstat (limited to 'scilab/modules/data_structures')
3 files changed, 74 insertions, 2 deletions
diff --git a/scilab/modules/data_structures/src/fortran/followpath.f b/scilab/modules/data_structures/src/fortran/followpath.f index 2a2c688..8dea9fb 100644 --- a/scilab/modules/data_structures/src/fortran/followpath.f +++ b/scilab/modules/data_structures/src/fortran/followpath.f | |||
@@ -101,11 +101,17 @@ c extract infos out of the current sublist | |||
101 | llisti=sadr(illisti+mi+3) | 101 | llisti=sadr(illisti+mi+3) |
102 | voll=istk(illisti+mi+2)-1+sadr(3+mi) | 102 | voll=istk(illisti+mi+2)-1+sadr(3+mi) |
103 | c go ahead along the path | 103 | c go ahead along the path |
104 | |||
105 | if(typi.eq.13.or.typi.eq.11) then | ||
106 | c . not an extraction but a function call | ||
107 | info=2 | ||
108 | goto 50 | ||
109 | endif | ||
110 | |||
104 | c | 111 | c |
105 | if(istk(ilindi).eq.10) then | 112 | if(istk(ilindi).eq.10) then |
106 | c . current element index is a name | 113 | c . current element index is a name |
107 | 114 | if (istk(ilindi+1)*istk(ilindi+2).ne.1) then | |
108 | if(istk(ilindi+1)*istk(ilindi+2).ne.1) then | ||
109 | info=3 | 115 | info=3 |
110 | goto 50 | 116 | goto 50 |
111 | c call error(21) | 117 | c call error(21) |
diff --git a/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.dia.ref b/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.dia.ref new file mode 100644 index 0000000..763e20f --- /dev/null +++ b/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.dia.ref | |||
@@ -0,0 +1,29 @@ | |||
1 | // ============================================================================= | ||
2 | // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab | ||
3 | // Copyright (C) 2010 - INRIA -Serge.Steer@inria.fr | ||
4 | // | ||
5 | // This file is distributed under the same license as the Scilab package. | ||
6 | // ============================================================================= | ||
7 | // <-- Non-regression test for bug 6792 --> | ||
8 | // | ||
9 | // <-- Bugzilla URL --> | ||
10 | // http://bugzilla.scilab.org/show_bug.cgi?id=6792 | ||
11 | // | ||
12 | // <-- Short Description --> | ||
13 | // mis-interpretation of macro arguments when the macro call appears in an list extraction | ||
14 | function [x,y]=fun(varargin), x=varargin,y=size(varargin),endfunction | ||
15 | function y=%foo_e(name,ml),y=fun,endfunction | ||
16 | M=mlist(['foo']); | ||
17 | M1=mlist(['foo','meth'],fun); | ||
18 | [x,y]=M.meth(['hello' 'world']); | ||
19 | if or(x<>list(['hello' 'world']))|y<>1 then bugmes();quit;end | ||
20 | [x,y]=M1.meth(['hello' 'world']); | ||
21 | if or(x<>list(['hello' 'world']))|y<>1 then bugmes();quit;end | ||
22 | [x,y]=M.meth('xx',list(1,2,3)); | ||
23 | if or(x<>list('xx',list(1,2,3)))|y<>2 then bugmes();quit;end | ||
24 | [x,y]=M1.meth('xx',list(1,2,3)); | ||
25 | if or(x<>list('xx',list(1,2,3)))|y<>2 then bugmes();quit;end | ||
26 | [x,y]=M.meth('xx',1,2,3); | ||
27 | if or(x<>list('xx',1,2,3))|y<>4 then bugmes();quit;end | ||
28 | [x,y]=M1.meth('xx',1,2,3); | ||
29 | if or(x<>list('xx',1,2,3))|y<>4 then bugmes();quit;end | ||
diff --git a/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst b/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst new file mode 100644 index 0000000..5f01e5d --- /dev/null +++ b/scilab/modules/data_structures/tests/nonreg_tests/bug_6792.tst | |||
@@ -0,0 +1,37 @@ | |||
1 | // ============================================================================= | ||
2 | // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab | ||
3 | // Copyright (C) 2010 - INRIA -Serge.Steer@inria.fr | ||
4 | // | ||
5 | // This file is distributed under the same license as the Scilab package. | ||
6 | // ============================================================================= | ||
7 | |||
8 | // <-- Non-regression test for bug 6792 --> | ||
9 | // | ||
10 | // <-- Bugzilla URL --> | ||
11 | // http://bugzilla.scilab.org/show_bug.cgi?id=6792 | ||
12 | // | ||
13 | // <-- Short Description --> | ||
14 | // mis-interpretation of macro arguments when the macro call appears in an list extraction | ||
15 | function [x,y]=fun(varargin), x=varargin,y=size(varargin),endfunction | ||
16 | function y=%foo_e(name,ml),y=fun,endfunction | ||
17 | |||
18 | M=mlist(['foo']); | ||
19 | M1=mlist(['foo','meth'],fun); | ||
20 | |||
21 | [x,y]=M.meth(['hello' 'world']); | ||
22 | if or(x<>list(['hello' 'world']))|y<>1 then pause,end | ||
23 | [x,y]=M1.meth(['hello' 'world']); | ||
24 | if or(x<>list(['hello' 'world']))|y<>1 then pause,end | ||
25 | |||
26 | [x,y]=M.meth('xx',list(1,2,3)); | ||
27 | if or(x<>list('xx',list(1,2,3)))|y<>2 then pause,end | ||
28 | |||
29 | [x,y]=M1.meth('xx',list(1,2,3)); | ||
30 | if or(x<>list('xx',list(1,2,3)))|y<>2 then pause,end | ||
31 | |||
32 | [x,y]=M.meth('xx',1,2,3); | ||
33 | if or(x<>list('xx',1,2,3))|y<>4 then pause,end | ||
34 | |||
35 | [x,y]=M1.meth('xx',1,2,3); | ||
36 | if or(x<>list('xx',1,2,3))|y<>4 then pause,end | ||
37 | |||