On Mon, Feb 28, 2005 at 03:59:52PM -0800, Janis Johnson wrote:
> On Fri, Feb 25, 2005 at 08:14:04PM -0800, Steve Kargl wrote:
> > 
> > at the top of the program to have dejagnu execute the
> > the a.out file.  But, I want to execute "a.out 1 2 3".
> > Is this possible?  I tried looking through gcc.dg and
> > gfortran.dg directories, but nothing jumped out as the 
> > obvious way to do want I need.
> > 
> > If you're wondering the test program would look like
> > 
> > ! { dg-do run }
> > ! { dg?????? }  How to specify "a.out 1 2 3"?   
> > program args
> >   integer i
> >   i = iargc()
> >   if (i /= 3) call abort
> > end program
> 
> DejaGnu's definition of ${tool}_load has an optional argument for flags
> to pass to the test program, but none of the procedures in DejaGnu or in
> gcc/testsuite/* are set up to pass such flags.  It would be fairly
> straightforward to provide a local version of gfortran_load to intercept
> calls to the global one, and have it add flags specified with a new test
> directive to the DejaGnu version of ${tool}_load.  That directive could
> be something like:
> 
>   { dg-program-options options [{ target selector }] }
> 
> Would something like this be useful for other languages as well, or is
> Fortran the only one in GCC that has support to process a program's
> command line?
> 

C and C++ have command line arguments.  Shouldn't we have a way
to test that these features aren't broken by say a rewrite of the
langauge parser?  I spent a couple of hours with google and
decided that adding the feature for fortran was beyond my skills.
I would be grateful if someone could implement the infrastructure.

-- 
Steve

Reply via email to