This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, testsuite, cilk] Fix cilk tests for simulators
- From: Jeff Law <law at redhat dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: balaji dot v dot iyer at intel dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 03 Jun 2013 12:27:15 -0600
- Subject: Re: [patch, testsuite, cilk] Fix cilk tests for simulators
- References: <29224af6-f1d5-435e-97dd-ddc463fe534c at BAMAIL02 dot ba dot imgtec dot org>
On 06/03/2013 11:49 AM, Steve Ellcey wrote:
A number of the new cilk tests in gcc/testsuite/c-c++-common/cilk-plus/AN
fail for me when run via the gnu simulator on mips. The problem is that
the gnu simulator does not set up argc and argv. After asking in the gdb
mailing list I believe this is an issue for multiple simulators on multiple
platforms. Looking through the GCC testsuite I did not see any other tests
that looked at argc/argv so I would like to change these tests to not use
argc/argv either. In some tests I added a define (IN_GCC_TESTSUITE) that
I set to 1 and then don't check argc if this is set, in others I just used
the constant value 1 instead of using argc and in one (where argc was being
changed) I replaced the use of argc with a local variable.
Tested on mips-mti-elf with the GNU simulator.
Yea, this should have been caught earlier. argc/argv aren't set
properly in many simulator environments.
{
int x = 0;
- if (argc == 1)
+ if (argc == 1 || IN_GCC_TESTSUITE)
So why not just eliminate the conditional completely and simplify the
test appropriately? The only reason I can think of to keep it as-is
would be if the test were from another suite and we wanted to minimize
the amount of divergence from that other testsuite.
Balaji, is there a good reason to keep the argc/argv usage in these tests?
jeff