Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/bugs/bug016.diderot
ViewVC logotype

Diff of /branches/vis12/bugs/bug016.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2216, Tue Feb 26 13:57:01 2013 UTC revision 2217, Tue Feb 26 14:03:37 2013 UTC
# Line 1  Line 1 
1    
2  /*  /*
3  ** BUG: not sure what is wrong; something about constructing a tensor (vector)  ** BUG: not sure what is wrong; something about constructing a tensor (vector)
4  ** from elements of a sequence.  The code  ** from elements of a sequence.
 ** ..................  
 ** in here  
 ** ##################  
 ** is what exposes compiler bugs.  The code  
 ** ##################  
 ** in here  
 ** ``````````````````  
 ** is a way to do the equivalent without making a vector.  
 ** Either BUG-A or BUG-B lines below have problems:  
5  **  **
 ** BUG-A:  
6  uncaught exception Fail [Fail: element of tensor construction not tensor]  uncaught exception Fail [Fail: element of tensor construction not tensor]
7    raised at common/phase-timer.sml:76.50-76.52    raised at common/phase-timer.sml:76.50-76.52
8    raised at common/phase-timer.sml:76.50-76.52    raised at common/phase-timer.sml:76.50-76.52
9    raised at simplify/simple.sml:107.21-107.69    raised at simplify/simple.sml:107.21-107.69
   
   
 ** BUG-B: compiles ok but the generated C code is broken  
 low-il DFA: cpu = 0.000 seconds, gc = 0.000 seconds, 10 nodes, 9 visits, 1 iterations  
 bug016.c:277:13: error: too many arguments to function call, expected 4, have 5  
             *((Diderot_real_t *)Diderot_DynSeqAddr(sizeof(Diderot_real_t), glob->xyInit, l__t_5)));  
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
 bug016.c:75:1: note: 'LIC_InitState' declared here  
 static void LIC_InitState (Diderot_Globals_t *glob, Strand_LIC_t *self, Diderot_int_t p_ii_0, ...  
 ^  
 1 error generated.  
 uncaught exception Fail [Fail: error compiling/linking]  
   
10  **  **
11  */  */
12  real {} xyInit = load("data/real.nrrd");  real {} xyInit = load("data/real.nrrd");
13  int xyNum = length(xyInit)/2;  int xyNum = length(xyInit)/2;
14    
 /* .................. */  
   
15  strand LIC (int ii, vec2 pos0) {  strand LIC (int ii, vec2 pos0) {
16      real xx = pos0[0];      real xx = pos0[0];
17      real yy = pos0[1];      real yy = pos0[1];
18    
 /* ################## */  
 /*  
 strand LIC (int ii, real xx, real yy) {  
 */  
 /* `````````````````` */  
19      output vec2 pos = [0,0];      output vec2 pos = [0,0];
20      int step = 0;      int step = 0;
21    
# Line 55  Line 25 
25          stabilize;          stabilize;
26      }      }
27  }  }
 /* .................. */  
   
 initially [ LIC(ii, [xyInit{0 + 2*ii}, xyInit{1 + 2*ii}])    // BUG-A  
 //initially [ LIC(ii, xyInit{0 + 2*ii}, xyInit{1 + 2*ii})      // BUG-B  
             | ii in 0..xyNum-1 ];  
28    
29  /* ################## */  initially [ LIC(ii, [xyInit{0 + 2*ii}, xyInit{1 + 2*ii}])
 /*  
 initially [ LIC(ii, xyInit{0 + 2*ii}, xyInit{1 + 2*ii})  
             | ii in 0..xyNum-1 ];  
 */  
 /* `````````````````` */  

Legend:
Removed from v.2216  
changed lines
  Added in v.2217

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0