Re: [testsuite] Avoid assuming argc != 0

2012-01-24 Thread Richard Sandiford
Mike Stump writes: > On Jan 23, 2012, at 11:13 AM, Richard Sandiford wrote: >> One fix is attached. Another would be to read from a volatile variable >> that has been initialised to 1. Other possibilities exist too of course. >> >> Tested on mipsisa64-elf. OK to install? > > Ok. I have a pref

Re: [testsuite] Avoid assuming argc != 0

2012-01-23 Thread Mike Stump
On Jan 23, 2012, at 11:13 AM, Richard Sandiford wrote: > One fix is attached. Another would be to read from a volatile variable > that has been initialised to 1. Other possibilities exist too of course. > > Tested on mipsisa64-elf. OK to install? Ok. I have a preference for volatile (clearer

[testsuite] Avoid assuming argc != 0

2012-01-23 Thread Richard Sandiford
gcc.c-torture/execute/scal-to-vec1.c uses "argc" as an easy way of injecting a runtime value into a constructor. The test goes on to do divide by this value, so it cannot be zero. This causes problems on embedded targets that don't provide a command line, and that instead set argc to 0. One fix