dejagnu help again..

Christopher D. Rickett crickett@lanl.gov
Mon Feb 26 23:39:00 GMT 2007



On Mon, 26 Feb 2007, Christopher D. Rickett wrote:

>
>
> On Tue, 27 Feb 2007, Tobias Schlüter wrote:
>
>> Christopher D. Rickett wrote:
>>> binding_label_tests_10.f03:
>>> ! { dg-do compile }
>> ...
>>> binding_label_tests_10_main.f03:
>>> ! { dg-do compile }
>>> ! { dg-additional-sources binding_label_tests_10.f03 }
>> ...
>>> however, i get the following error:
>>> gfortran: cannot specify -o with -c or -S with multiple files
>>> 
>>> what's the easiest/best way to get the above code to work?  it should fail 
>>> to compile the *_main.f03 file because it has binding labels that conflict 
>>> with what's in the module 'x'.
>> 
>> I think you need { dg-do link } in the main file and no dg directive in the 
>> additional file so that it doesn't get picked up as a standalone test.
>> 
>
> the compilation should fail though, before trying to link, so dg-do link 
> doesn't seem correct.
>
> i tried the dg-do compile only in the main and removing the dg line from the 
> second file, but that didn't fix it.

there seems to be an easy way to fix this; if i add { dg-do compile } in 
the first file, then try to do a normal compile in the second (*main*) 
w/o any reference to the first source file, it will fail as expected
because of the errors.  this depends on the non-main file being compiled
first.  can that be assumed?

Thanks.
Chris


More information about the Fortran mailing list