Mohsen Lesani <les...@ucla.edu> wrote on 02/10/2010 03:59:06 PM:

> Hi,
> 
> One of my benchmarks could pass the type checker and then the linker
> failed. It is a large benchmark but I worked to localise the problem.
> Here I present them abstractly in two small examples.
> Both of the problems seem to be with structs (There is no problem if
> we change struct to class.)

Hi, Mohsen,

Thank you for the bug reports.  If you are able to open JIRA issues,
please do so (one for each problem below) -- that way you can track
what is happening with them and will be notified via email when they
are fixed.

More comments inline below.

> ========================================
> Example 1:
> struct A {
> }
> 
> struct B {
>     val array: Array[A] = Array.makeVal[A](1..10, ((p:Point(1)) => new 
A()));
> }
> 
> public class Test { 
>    public static def main(args: Rail[String]): Void {
>        val b = new B();
>    }
> }
> 
> Error Message:
> x10c++: In file included from ./Test.h:16,
>      from Test.cc:1:
>      ./B.struct_h:29: error: ‘A’ was not declared in this scope
>      ./B.struct_h:29: error: template argument 1 is invalid
>      ./B.struct_h:29: error: template argument 1 is invalid
> x10c++: Non-zero return code: 1
> 2 errors.

Looks like a problem with C++ code generation for structs.
Certainly a bug that needs to be fixed.

> ========================================
> Example 1:
> class A {

I presume you mean "struct A" here?

>     public def this(val i: Int) {
>         f(i);
>     }
> 
>     public proto def f(val i: Int) {
>     }
> }
> 
> public class Test { 
>    public static def main(args: Rail[String]): Void {
>        val a = new A(1);
>    }
> }
> 
> Error Message:
> x10c++: A.cc: In static member function ‘static void
> A_methods::_constructor(A*, x10_int)’:
>      A.cc:73: error: no matching function for call to
> ‘A_methods::f(A*&, x10_int&)’
>      ./A.h:30: note: candidates are: static void A_methods::f(A, 
x10_int)
> x10c++: Non-zero return code: 1
> 2 errors.
> ========================================

Again, a problem in code generation of struct methods.

> We would be grateful if you fix these quickly as our translation needs 
them.

Please mark both JIRA issues as "Blocker".  That would ensure that
they will not slip through the cracks and will be addressed asap.
        Igor
P.S. Please let me know if you're unable to open JIRAs and I'll
open them for you.
-- 
Igor Peshansky  (note the spelling change!)
IBM T.J. Watson Research Center
XJ: No More Pain for XML's Gain (http://www.research.ibm.com/xj/)
X10: Parallel Productivity and Performance (http://x10.sf.net/)

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to