jkmcnk / sx-gcc

The GNU Compiler Collection port to NEC SX CPU architecture.
GNU General Public License v2.0
0 stars 2 forks source link

the "g++.dg/expr/anew4.C" test case fails if compiled with sx-g++ #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The "g++.dg/expr/anew4.C" test case, which tests the "new" array operator,
with zero-initialization and a variable sized array fails if compiled with
sx-g++.

The problem is in the "p[i].x" value. The test expects 0, whereas our value
is -nan.

Original issue reported on code.google.com by nou...@gmail.com on 1 Jun 2009 at 1:52

GoogleCodeExporter commented 8 years ago
Humm, funny, this test also fails if compiled with the i386 gcc compiler. 
Apparently,
if program is compiled with the default switches, the array constructor doesn't
initialize the array elements to 0 in both cases, SX and i386.

Original comment by nou...@gmail.com on 1 Jun 2009 at 4:23

GoogleCodeExporter commented 8 years ago
As it turns out the test above is expected to fail (now I know what the XFAIL 
tag
means... ;) )

According to the gcc bugtracker (see the link below), the "new" constructor for
arrays shouldn't initialize the elements to 0:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=2123

Original comment by nou...@gmail.com on 1 Jun 2009 at 4:49