Hello all,
x10c++ generates a code including statement expressions in which an object with
a destructor is used. Unfortunately, branching out of the statement due to the
destructor is not allowed by most of C++ compilers such as Intel icc, Fujitsu
FCCpx although g++ can compile it.
The following piece of C++ code is generated from FT.x10 found in the HPC
Challenge code
110 class FT__closure__1 : public x10::lang::Closure {
111 public:
112
113 static x10::lang::Fun_0_0<FT*>::itable<FT__closure__1> _itable;
114 static x10aux::itable_entry _itables[2];
115
116 virtual x10aux::itable_entry* _getITables() { return _itables; }
117
118 // closure body
119 FT* __apply() {
120
121 //#line 244
"/home/yoshiki/x10/x10.dist/HPC/x10Code/FFT/FT.x10": x10.ast.X10Return_c
122 return (__extension__ ({
123
124 //#line 244
"/home/yoshiki/x10/x10.dist/HPC/x10Code/FFT/FT.x10": x10.ast.X10Loca
lDecl_c
125 FT* alloc4318 = ((new (memset(x10aux::alloc<FT>(), 0,
sizeof(FT))) FT())) 126 ;
127 128 //#line 244
"/home/yoshiki/x10/x10.dist/HPC/x10Code/FFT/FT.x10": x10.ast.X10Cons
tructorCall_c
129 (alloc4318)->::FT::_constructor(nRows, localSize, N, SQRTN,
verify); 130 alloc4318;
131 }))
132 ;
I get the following errors by using both Intel and fujitsu C++ compilers.
FT.cc(122): error: destructible entities are not allowed inside of a
statement expression
return (__extension__ ({
^
FT.cc(301): error: destructible entities are not allowed inside of a
statement expression
this->FMGL(A) = (__extension__ ({
^
FT.cc(350): error: destructible entities are not allowed inside of a
statement expression
this->FMGL(B) = (__extension__ ({
Of course manually transforming statement expressions into a set of statements
can resolve that. Is there any configuration or compile option to disable the
use of statement expressions in x10c++ 2.3.
Thanks,
--yoshiki
--
Yoshiki SATO | Project Assistant Professor
yosh...@ci.i.u-tokyo.ac.jp | +81-3-5209-3534
Grad. School of Information Science and Technology,
The University of Tokyo.
7-3-1 Hongo, Bunkyo-ku, Tokyo 113-8656 Japan
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users