This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
dejagnu help again..
- From: "Christopher D. Rickett" <crickett at lanl dot gov>
- To: fortran at gcc dot gnu dot org
- Date: Mon, 26 Feb 2007 16:09:08 -0700 (MST)
- Subject: dejagnu help again..
hi all,
i'm trying to add a new test for the binding labels, but can't get it to
work. the following files are what i'm trying to add:
binding_label_tests_10.f03:
! { dg-do compile }
module x
use iso_c_binding
implicit none
integer(c_int), bind(c,name="c_one") :: one
end module x
binding_label_tests_10_main.f03:
! { dg-do compile }
! { dg-additional-sources binding_label_tests_10.f03 }
module y
use iso_c_binding
implicit none
integer(c_int), bind(c,name="c_one") :: one ! { dg-error "collides" }
end module y
program main
use x ! { dg-error "collides" }
use y
end program main
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'.
thanks.
Chris