Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: X10 SVN HEAD
-
Fix Version/s: X10 2.3.2
-
Component/s: Native X10: Compiler Codegen
-
Labels:None
-
Number of attachments :
Description
The attached code fails to compile with x10c++. Compiles successfully with Managed backend.
public class S { class Node { var i:Int; var previous:Node; var next:Node; private atomic def casNext(oldVal:Node, newVal:Node){ if(next == oldVal){ newVal.previous = this; next = newVal; return true; } return false; } } public static def main(Array[String]) { } }
Result of running it:
~/x1021/trunk/x10.dist/bin/x10c++ -report postcompile=1 -STATIC_CALLS -v -O -post " # # -lpmi # " -x10rt mpi -MAIN_CLASS=S S.x10 -o stackatomic "/opt/ibm/java-x86_64-60/bin/java" -Xmx512m -classpath "/home/vj/x1021/trunk/x10.dist/lib/x10c.jar:/home/vj/x1021/trunk/x10.dist/classes:/home/vj/x1021/trunk/x10.dist/lib/x10c.jar:/home/vj/x1021/trunk/x10.dist/lib/x10.jar:/home/vj/x1021/trunk/x10.dist/lib/commons-math-2.1.jar:/home/vj/x1021/trunk/x10.dist/lib/lpg.jar:/home/vj/x1021/trunk/x10.dist/lib/com.ibm.wala.cast.java_1.0.0.201012091449.jar:/home/vj/x1021/trunk/x10.dist/lib/com.ibm.wala.cast_1.0.0.201012091449.jar:/home/vj/x1021/trunk/x10.dist/lib/com.ibm.wala.core_1.1.3.201012091449.jar:/home/vj/x1021/trunk/x10.dist/lib/com.ibm.wala.shrike_1.1.3.201012091449.jar:/home/vj/x1021/trunk/x10.dist/lib/x10wala.jar:/home/vj/x1021/trunk/x10.dist/lib/org.eclipse.equinox.common_3.6.0.v20100503.jar" polyglot.main.Main -extclass x10cuda.ExtensionInfo -sourcepath "/home/vj/x1021/trunk/x10.dist/lib/x10.jar" -OPTIMIZE=true '-report' 'postcompile=1' '-STATIC_CALLS' '-post' ' # # -lpmi # ' '-MAIN_CLASS=S' 'S.x10' '-o' 'stackatomic' Executing post-compiler mpicxx -g -I/home/vj/x1021/trunk/x10.dist/include -I/home/vj -I. -O2 -DNDEBUG -DNO_PLACE_CHECKS -finline-functions -Wno-long-long -Wno-unused-parameter -Wreturn-type -pthread -msse2 -mfpmath=sse -o /home/vj/stackatomic xxx_main_xxx.cc S__Node.cc S.cc -lpmi -L/home/vj/x1021/trunk/x10.dist/lib -lx10 -DX10_USE_BDWGC -lgc -lx10rt_mpi -ldl -lm -lpthread -Wl,--rpath -Wl,/home/vj/x1021/trunk/x10.dist/lib -Wl,-export-dynamic -lrt x10c++: S__Node.cc: In member function 'x10_boolean S__Node::casNext(x10aux::ref<S__Node>, x10aux::ref<S__Node>)': S__Node.cc:101: warning: control reaches end of non-void function 1 error. [vj@athos ~]$
Also get an error with: